feat(client): add rss-marquee widget

This commit is contained in:
syuilo 2022-06-30 23:45:11 +09:00
parent bbdc52a7ea
commit 6ba888f476
7 changed files with 141 additions and 8 deletions

View file

@ -6,7 +6,7 @@
<div class="ekmkgxbj">
<MkLoading v-if="fetching"/>
<div v-else class="feed">
<a v-for="item in items" :href="item.link" rel="nofollow noopener" target="_blank" :title="item.title">{{ item.title }}</a>
<a v-for="item in items" class="item" :href="item.link" rel="nofollow noopener" target="_blank" :title="item.title">{{ item.title }}</a>
</div>
</div>
</MkContainer>
@ -23,14 +23,14 @@ import { useInterval } from '@/scripts/use-interval';
const name = 'rss';
const widgetPropsDef = {
showHeader: {
type: 'boolean' as const,
default: true,
},
url: {
type: 'string' as const,
default: 'http://feeds.afpbb.com/rss/afpbb/afpbbnews',
},
showHeader: {
type: 'boolean' as const,
default: true,
},
};
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
@ -79,7 +79,7 @@ defineExpose<WidgetComponentExpose>({
padding: 0;
font-size: 0.9em;
> a {
> .item {
display: block;
padding: 8px 16px;
color: var(--fg);