Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jkjoy committed Oct 29, 2024
1 parent 0b61669 commit adbbd98
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 29 deletions.
25 changes: 0 additions & 25 deletions src/components/Artalk.astro

This file was deleted.

12 changes: 12 additions & 0 deletions src/components/Twikoo.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
const { site, server } = Astro.props;
---

<div id="tcomment"></div>
<script is:inline src="https://cdn.jkjoy.cn/twikoo/twikoo.all.min.js"></script>
<script is:inline>
twikoo.init({
envId: 'https://t.ittst.com',
el: '#tcomment',
})
</script>
5 changes: 4 additions & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ const bannerOffset = bannerOffsetByPosition[siteConfig.banner.position || 'cente
--hue: var(--configHue);
--page-width: 75rem;
}
.atk-copyright {
.tk-avatar {
display: none !important;
}
.tk-footer {
display: none !important;
}
</style>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/posts/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import PostMetadata from '../../components/PostMeta.astro'
import ImageWrapper from '../../components/misc/ImageWrapper.astro'
import { profileConfig, siteConfig } from '../../config'
import { formatDateToYYYYMMDD } from '../../utils/date-utils'
import Artalk from '../../components/Artalk.astro'
import Twikoo from '../../components/Twikoo.astro'
export async function getStaticPaths() {
const blogEntries = await getCollection('posts', ({ data }) => {
Expand Down Expand Up @@ -108,8 +108,6 @@ const jsonLd = {

</div>
</div>
<!-- 使用ArtalkComments组件 -->
<Artalk />
<div class="flex flex-col md:flex-row justify-between mb-4 gap-4 overflow-hidden w-full">
<a href={entry.data.nextSlug ? getPostUrlBySlug(entry.data.nextSlug) : "#"}
class:list={["w-full font-bold overflow-hidden active:scale-95", {"pointer-events-none": !entry.data.nextSlug}]}>
Expand All @@ -131,6 +129,8 @@ const jsonLd = {
</div>}
</a>
</div>
<!-- 使用Twikoo组件 -->
<Twikoo />
</MainGridLayout>

<style is:global>
Expand Down

0 comments on commit adbbd98

Please sign in to comment.