summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-12 07:00:40 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-12 07:00:40 +0900
commitd0f01ef2334421d8b724ca4d1999e543eb4b5175 (patch)
tree6102c00b39024f39f2e04714e9743519510cbac5 /src
parentv3033 (diff)
downloadmisskey-d0f01ef2334421d8b724ca4d1999e543eb4b5175.tar.gz
misskey-d0f01ef2334421d8b724ca4d1999e543eb4b5175.tar.bz2
misskey-d0f01ef2334421d8b724ca4d1999e543eb4b5175.zip
:art:
Diffstat (limited to 'src')
-rw-r--r--src/web/app/desktop/tags/home-widgets/activity.tag12
-rw-r--r--src/web/app/desktop/tags/home-widgets/calendar.tag19
-rw-r--r--src/web/app/desktop/tags/home-widgets/photo-stream.tag19
-rw-r--r--src/web/app/desktop/tags/home-widgets/profile.tag20
-rw-r--r--src/web/app/desktop/tags/home-widgets/server.tag12
-rw-r--r--src/web/app/desktop/tags/home-widgets/timemachine.tag27
6 files changed, 87 insertions, 22 deletions
diff --git a/src/web/app/desktop/tags/home-widgets/activity.tag b/src/web/app/desktop/tags/home-widgets/activity.tag
index 255f6442e0..fd2f4a2794 100644
--- a/src/web/app/desktop/tags/home-widgets/activity.tag
+++ b/src/web/app/desktop/tags/home-widgets/activity.tag
@@ -1,5 +1,5 @@
-<mk-activity-home-widget>
- <virtual if={ !data.compact }>
+<mk-activity-home-widget data-melt={ data.design == 2 }>
+ <virtual if={ data.design == 0 }>
<p class="title"><i class="fa fa-bar-chart"></i>%i18n:desktop.tags.mk-activity-home-widget.title%</p>
<button onclick={ toggle } title="%i18n:desktop.tags.mk-activity-home-widget.toggle%"><i class="fa fa-sort"></i></button>
</virtual>
@@ -11,6 +11,10 @@
display block
background #fff
+ &[data-melt]
+ background transparent !important
+ border none !important
+
> .title
z-index 1
margin 0
@@ -54,7 +58,7 @@
<script>
this.data = {
view: 0,
- compact: false
+ design: 0
};
this.mixin('widget');
@@ -82,7 +86,7 @@
};
this.func = () => {
- this.data.compact = !this.data.compact;
+ if (++this.data.design == 3) this.data.design = 0;
this.save();
};
</script>
diff --git a/src/web/app/desktop/tags/home-widgets/calendar.tag b/src/web/app/desktop/tags/home-widgets/calendar.tag
index 9aa4ac6326..6f45ea20f1 100644
--- a/src/web/app/desktop/tags/home-widgets/calendar.tag
+++ b/src/web/app/desktop/tags/home-widgets/calendar.tag
@@ -1,4 +1,4 @@
-<mk-calendar-home-widget data-special={ special }>
+<mk-calendar-home-widget data-melt={ data.design == 1 } data-special={ special }>
<div class="calendar" data-is-holiday={ isHoliday }>
<p class="month-and-year"><span class="year">{ year }年</span><span class="month">{ month }月</span></p>
<p class="day">{ day }日</p>
@@ -34,6 +34,10 @@
&[data-special='on-new-years-day']
border-color #ef95a0 !important
+ &[data-melt]
+ background transparent !important
+ border none !important
+
&:after
content ""
display block
@@ -106,6 +110,12 @@
</style>
<script>
+ this.data = {
+ design: 0
+ };
+
+ this.mixin('widget');
+
this.draw = () => {
const now = new Date();
const nd = now.getDate();
@@ -130,7 +140,7 @@
this.isHoliday = now.getDay() == 0 || now.getDay() == 6;
- this.special =
+ this.special =
nm == 0 && nd == 1 ? 'on-new-years-day' :
false;
@@ -146,5 +156,10 @@
this.on('unmount', () => {
clearInterval(this.clock);
});
+
+ this.func = () => {
+ if (++this.data.design == 2) this.data.design = 0;
+ this.save();
+ };
</script>
</mk-calendar-home-widget>
diff --git a/src/web/app/desktop/tags/home-widgets/photo-stream.tag b/src/web/app/desktop/tags/home-widgets/photo-stream.tag
index 7f8dd8563a..84d0020a6b 100644
--- a/src/web/app/desktop/tags/home-widgets/photo-stream.tag
+++ b/src/web/app/desktop/tags/home-widgets/photo-stream.tag
@@ -1,5 +1,5 @@
-<mk-photo-stream-home-widget>
- <virtual if={ !data.compact }>
+<mk-photo-stream-home-widget data-melt={ data.design == 2 }>
+ <virtual if={ data.design == 0 }>
<p class="title"><i class="fa fa-camera"></i>%i18n:desktop.tags.mk-photo-stream-home-widget.title%</p>
</virtual>
<p class="initializing" if={ initializing }><i class="fa fa-spinner fa-pulse fa-fw"></i>%i18n:common.loading%<mk-ellipsis/></p>
@@ -14,6 +14,17 @@
display block
background #fff
+ &[data-melt]
+ background transparent !important
+ border none !important
+
+ > .stream
+ padding 0
+
+ > .img
+ border solid 4px transparent
+ border-radius 8px
+
> .title
z-index 1
margin 0
@@ -58,7 +69,7 @@
</style>
<script>
this.data = {
- compact: false
+ design: 0
};
this.mixin('widget');
@@ -94,7 +105,7 @@
};
this.func = () => {
- this.data.compact = !this.data.compact;
+ if (++this.data.design == 3) this.data.design = 0;
this.save();
};
</script>
diff --git a/src/web/app/desktop/tags/home-widgets/profile.tag b/src/web/app/desktop/tags/home-widgets/profile.tag
index 1439a423b2..7d4cf862f6 100644
--- a/src/web/app/desktop/tags/home-widgets/profile.tag
+++ b/src/web/app/desktop/tags/home-widgets/profile.tag
@@ -1,4 +1,4 @@
-<mk-profile-home-widget data-compact={ data.compact }>
+<mk-profile-home-widget data-compact={ data.design == 1 || data.design == 2 } data-melt={ data.design == 2 }>
<div class="banner" style={ I.banner_url ? 'background-image: url(' + I.banner_url + '?thumbnail&size=256)' : '' } title="クリックでバナー編集" onclick={ setBanner }></div>
<img class="avatar" src={ I.avatar_url + '?thumbnail&size=96' } onclick={ setAvatar } alt="avatar" title="クリックでアバター編集" data-user-preview={ I.id }/>
<a class="name" href={ '/' + I.username }>{ I.name }</a>
@@ -36,6 +36,20 @@
> .username
display none
+ &[data-melt]
+ background transparent !important
+ border none !important
+
+ > .banner
+ visibility hidden
+
+ > .avatar
+ box-shadow none
+
+ > .name
+ color #666
+ text-shadow none
+
> .banner
height 100px
background-color #f5f5f5
@@ -77,7 +91,7 @@
import updateBanner from '../../scripts/update-banner';
this.data = {
- compact: false
+ design: 0
};
this.mixin('widget');
@@ -93,7 +107,7 @@
};
this.func = () => {
- this.data.compact = !this.data.compact;
+ if (++this.data.design == 3) this.data.design = 0;
this.save();
};
</script>
diff --git a/src/web/app/desktop/tags/home-widgets/server.tag b/src/web/app/desktop/tags/home-widgets/server.tag
index b2e3b9d904..094af87594 100644
--- a/src/web/app/desktop/tags/home-widgets/server.tag
+++ b/src/web/app/desktop/tags/home-widgets/server.tag
@@ -1,5 +1,5 @@
-<mk-server-home-widget>
- <virtual if={ !data.compact }>
+<mk-server-home-widget data-melt={ data.design == 2 }>
+ <virtual if={ data.design == 0 }>
<p class="title"><i class="fa fa-server"></i>%i18n:desktop.tags.mk-server-home-widget.title%</p>
<button onclick={ toggle } title="%i18n:desktop.tags.mk-server-home-widget.toggle%"><i class="fa fa-sort"></i></button>
</virtual>
@@ -15,6 +15,10 @@
display block
background #fff
+ &[data-melt]
+ background transparent !important
+ border none !important
+
> .title
z-index 1
margin 0
@@ -60,7 +64,7 @@
this.data = {
view: 0,
- compact: false
+ design: 0
};
this.mixin('widget');
@@ -90,7 +94,7 @@
};
this.func = () => {
- this.data.compact = !this.data.compact;
+ if (++this.data.design == 3) this.data.design = 0;
this.save();
};
</script>
diff --git a/src/web/app/desktop/tags/home-widgets/timemachine.tag b/src/web/app/desktop/tags/home-widgets/timemachine.tag
index 75e9f3a339..984258d2ba 100644
--- a/src/web/app/desktop/tags/home-widgets/timemachine.tag
+++ b/src/web/app/desktop/tags/home-widgets/timemachine.tag
@@ -1,10 +1,12 @@
-<mk-timemachine-home-widget>
- <button onclick={ prev } title="%i18n:desktop.tags.mk-timemachine-home-widget.prev%"><i class="fa fa-chevron-circle-left"></i></button>
- <p class="title">{ '%i18n:desktop.tags.mk-timemachine-home-widget.title%'.replace('{1}', year).replace('{2}', month) }</p>
- <button onclick={ next } title="%i18n:desktop.tags.mk-timemachine-home-widget.next%"><i class="fa fa-chevron-circle-right"></i></button>
+<mk-timemachine-home-widget data-melt={ data.design == 4 || data.design == 5 }>
+ <virtual if={ data.design == 0 || data.design == 1 }>
+ <button onclick={ prev } title="%i18n:desktop.tags.mk-timemachine-home-widget.prev%"><i class="fa fa-chevron-circle-left"></i></button>
+ <p class="title">{ '%i18n:desktop.tags.mk-timemachine-home-widget.title%'.replace('{1}', year).replace('{2}', month) }</p>
+ <button onclick={ next } title="%i18n:desktop.tags.mk-timemachine-home-widget.next%"><i class="fa fa-chevron-circle-right"></i></button>
+ </virtual>
<div class="calendar">
- <div class="weekday" each={ day, i in Array(7).fill(0) }
+ <div class="weekday" if={ data.design == 0 || data.design == 2 || data.design == 4} each={ day, i in Array(7).fill(0) }
data-today={ year == today.getFullYear() && month == today.getMonth() + 1 && today.getDay() == i }
data-is-donichi={ i == 0 || i == 6 }>{ weekdayText[i] }</div>
<div each={ day, i in Array(paddingDays).fill(0) }></div>
@@ -22,6 +24,10 @@
color #777
background #fff
+ &[data-melt]
+ background transparent !important
+ border none !important
+
> .title
z-index 1
margin 0
@@ -130,6 +136,12 @@
</style>
<script>
+ this.data = {
+ design: 0
+ };
+
+ this.mixin('widget');
+
const eachMonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function isLeapYear(year) {
@@ -225,5 +237,10 @@
});
this.opts.tl.warp(date);
};
+
+ this.func = () => {
+ if (++this.data.design == 6) this.data.design = 0;
+ this.save();
+ };
</script>
</mk-timemachine-home-widget>