Skip to content

Commit

Permalink
展示ad调整
Browse files Browse the repository at this point in the history
  • Loading branch information
qmdx committed May 27, 2024
1 parent cb744b1 commit 1f70ba4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 43 deletions.
52 changes: 10 additions & 42 deletions src/components/SponsorBanner.svelte
Original file line number Diff line number Diff line change
@@ -1,44 +1,12 @@
<script>
import { onMount } from "svelte";
import { tweened } from "svelte/motion";
import { cubicOut } from "svelte/easing";
export let sponsors = [];
let currentIndex = 0;
let currentSponsor = sponsors[currentIndex];
const opacity = tweened(1, {
duration: 200,
easing: cubicOut,
});
function updateCard() {
opacity.set(0).then(() => {
currentIndex = (currentIndex + 1) % sponsors.length;
currentSponsor = sponsors[currentIndex];
opacity.set(1);
});
}
onMount(() => {
const interval = setInterval(updateCard, 3000);
return () => clearInterval(interval);
});
</script>

<div class="not-content max-w-full w-full text-sm leading-6">
<a href={currentSponsor.link} class="w-full no-underline text-current hover:no-underline" target="_blank" style="opacity: {$opacity}">
<figure class="border rounded-lg p-4 dark:bg-slate-800 dark:highlight-white/5 h-full">
<figcaption class="flex items-center space-x-4">
<img src={currentSponsor.logo} alt="" class="flex-none w-14 h-14 object-contain" loading="lazy" decoding="async">
<div class="flex-auto">
<div class="text-base font-semibold dark:text-slate-200">
{currentSponsor.title}
</div>
<div class="mt-0.5 text-slate-700 dark:text-slate-300 text-xs">
{currentSponsor.description}
</div>
</div>
</figcaption>
</figure>
<div class="not-content max-w-full w-full text-sm leading-6 text-center">
<a href="https://doc.flowlong.com?from=mp" target="_blank">
<img alt="aizuda-Logo" src="https://foruda.gitee.com/images/1715955628416785121/954c16ef_12260.png" width="200px" height="50px">
</a>
<a href="https://gitee.com/gz-yami/mall4j?from=mp" target="_blank">
<img alt="mall4j-Logo" src="https://foruda.gitee.com/images/1716776021837872678/87883b39_12260.gif" width="200px" height="50px">
</a>
<a href="http://github.crmeb.net/u/MyBatis-Plus" target="_blank">
<img alt="crmeb-Logo" src="https://foruda.gitee.com/images/1685339553088166856/b0a6b1a4_12260.gif" width="200px" height="50px">
</a><br/>
<a href="/resources/support#成为赞助商">😍成为赞助商</a>
</div>
3 changes: 2 additions & 1 deletion src/content/docs/resources/support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ sidebar:

相关联系方式(添加烦请注明来意):

- 微信|QQ:[243194995](tencent://message/?uin=243194995&Site=&Menu=yes) | [534308305](tencent://message/?uin=534308305&Site=&Menu=yes)
- 微信 `wx153666`
- QQ:[243194995](tencent://message/?uin=243194995&Site=&Menu=yes) | [534308305](tencent://message/?uin=534308305&Site=&Menu=yes)
- 邮件:[[email protected]](mailto:[email protected]) | [[email protected]](mailto:[email protected])
- Github:[https://github.com/baomidou/mybatis-plus](https://github.com/baomidou/mybatis-plus)

Expand Down

0 comments on commit 1f70ba4

Please sign in to comment.