2018-02-15 03:36:42 +00:00
|
|
|
<template>
|
2018-06-06 10:22:45 +00:00
|
|
|
<div class="mkw-donation" :data-mobile="platform == 'mobile'">
|
2018-02-15 03:36:42 +00:00
|
|
|
<article>
|
2018-04-14 16:04:40 +00:00
|
|
|
<h1>%fa:heart%%i18n:@title%</h1>
|
2018-08-28 21:46:05 +00:00
|
|
|
<p v-if="meta">
|
2018-05-20 11:26:38 +00:00
|
|
|
{{ '%i18n:@text%'.substr(0, '%i18n:@text%'.indexOf('{')) }}
|
2018-08-26 01:29:24 +00:00
|
|
|
<a :href="meta.maintainer.url">{{ meta.maintainer.name }}</a>
|
2018-05-20 11:26:38 +00:00
|
|
|
{{ '%i18n:@text%'.substr('%i18n:@text%'.indexOf('}') + 1) }}
|
2018-02-15 03:36:42 +00:00
|
|
|
</p>
|
|
|
|
</article>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2018-02-24 15:18:09 +00:00
|
|
|
import define from '../../../common/define-widget';
|
2018-02-15 03:36:42 +00:00
|
|
|
export default define({
|
|
|
|
name: 'donation'
|
2018-08-26 01:11:47 +00:00
|
|
|
}).extend({
|
|
|
|
data() {
|
|
|
|
return {
|
2018-08-26 01:29:24 +00:00
|
|
|
meta: null
|
2018-08-26 01:11:47 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
(this as any).os.getMeta().then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
|
|
|
}
|
2018-02-15 03:36:42 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-04-19 22:45:37 +00:00
|
|
|
root(isDark)
|
2018-09-26 11:28:13 +00:00
|
|
|
background var(--face)
|
2018-04-19 22:45:37 +00:00
|
|
|
border solid 1px isDark ? #c3831c : #ead8bb
|
2018-02-15 03:36:42 +00:00
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
> article
|
|
|
|
padding 20px
|
|
|
|
|
|
|
|
> h1
|
|
|
|
margin 0 0 5px 0
|
|
|
|
font-size 1em
|
2018-04-19 22:45:37 +00:00
|
|
|
color isDark ? #b2bac1 : #888
|
2018-02-15 03:36:42 +00:00
|
|
|
|
|
|
|
> [data-fa]
|
|
|
|
margin-right 0.25em
|
|
|
|
|
|
|
|
> p
|
|
|
|
display block
|
|
|
|
z-index 1
|
|
|
|
margin 0
|
|
|
|
font-size 0.8em
|
2018-04-19 22:45:37 +00:00
|
|
|
color isDark ? #a1a6ab : #999
|
2018-02-15 03:36:42 +00:00
|
|
|
|
2018-02-23 17:46:09 +00:00
|
|
|
&[data-mobile]
|
|
|
|
border none
|
|
|
|
background #ead8bb
|
|
|
|
border-radius 8px
|
2018-04-28 23:51:17 +00:00
|
|
|
box-shadow 0 0 0 1px rgba(#000, 0.2)
|
2018-02-23 17:46:09 +00:00
|
|
|
|
|
|
|
> article
|
|
|
|
> h1
|
|
|
|
color #7b8871
|
|
|
|
|
|
|
|
> p
|
|
|
|
color #777d71
|
|
|
|
|
2018-04-19 22:45:37 +00:00
|
|
|
.mkw-donation[data-darkmode]
|
|
|
|
root(true)
|
|
|
|
|
|
|
|
.mkw-donation:not([data-darkmode])
|
|
|
|
root(false)
|
|
|
|
|
2018-02-15 03:36:42 +00:00
|
|
|
</style>
|