[Client] Improve activity home widget
This commit is contained in:
parent
3a78e08bac
commit
4e96a490f8
|
@ -77,12 +77,19 @@
|
||||||
|
|
||||||
<mk-activity-home-widget-calender>
|
<mk-activity-home-widget-calender>
|
||||||
<svg viewBox="0 0 21 7" preserveAspectRatio="none">
|
<svg viewBox="0 0 21 7" preserveAspectRatio="none">
|
||||||
|
<rect each={ data } class="day"
|
||||||
|
width="1" height="1"
|
||||||
|
riot-x={ x } riot-y={ date.weekday }
|
||||||
|
rx="1" ry="1"
|
||||||
|
fill="transparent">
|
||||||
|
<title>{ date.year }/{ date.month }/{ date.day }<br/>Post: { posts }, Reply: { replies }, Repost: { reposts }</title>
|
||||||
|
</rect>
|
||||||
<rect each={ data }
|
<rect each={ data }
|
||||||
width="1" height="1"
|
width="1" height="1"
|
||||||
riot-x={ x } riot-y={ date.weekday }
|
riot-x={ x } riot-y={ date.weekday }
|
||||||
rx="1" ry="1"
|
rx="1" ry="1"
|
||||||
fill={ color }
|
fill={ color }
|
||||||
style="transform: scale({ v });"/>
|
style="pointer-events: none; transform: scale({ v });"/>
|
||||||
<rect class="today"
|
<rect class="today"
|
||||||
width="1" height="1"
|
width="1" height="1"
|
||||||
riot-x={ data[data.length - 1].x } riot-y={ data[data.length - 1].date.weekday }
|
riot-x={ data[data.length - 1].x } riot-y={ data[data.length - 1].date.weekday }
|
||||||
|
@ -101,6 +108,10 @@
|
||||||
> rect
|
> rect
|
||||||
transform-origin center
|
transform-origin center
|
||||||
|
|
||||||
|
&.day
|
||||||
|
&:hover
|
||||||
|
fill rgba(0, 0, 0, 0.05)
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
this.data = this.opts.data;
|
this.data = this.opts.data;
|
||||||
|
|
Loading…
Reference in New Issue