Skip to content

Commit

Permalink
feat(topic): add tab comp to topic06 (#255)
Browse files Browse the repository at this point in the history
* feat(topic): add tab component for topic6

* feat(topic): added tab comp for topic6

---------

Co-authored-by: Kiyoshi <44930252+Kiyo5hi@users.noreply.github.com>
  • Loading branch information
Jimmykoki and Kiyo5hi authored May 6, 2024
1 parent d03ff3a commit 80c6af6
Show file tree
Hide file tree
Showing 4 changed files with 1,185 additions and 1,081 deletions.
2 changes: 1 addition & 1 deletion src/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export const topics: Topic[] = [
index: 6,
snapshot: "images/snapshots/topic06.png",
essay: "pdfs/topic06.pdf",
animationContributors: [ZEJIN_XU],
animationContributors: [ZEJIN_XU, JIANLIN_LI],
essayContributors: [ZHIQIN_LU, XIANFU_LIU],
captionContributors: [CHEN_XU],
},
Expand Down
8 changes: 7 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ createApp(App)
.use(Antd)
.directive("katex", (el, binding) => {
const isDisplay = binding.arg === "display";
katex.render(el.innerHTML, el, { displayMode: isDisplay });
try {
katex.render(el.innerHTML, el, { displayMode: isDisplay });
} catch (e) {
console.error("KaTeX rendering error:", e);
}
})
.directive("tikz", (el) => {
const scripts = el.innerHTML;
Expand All @@ -34,3 +38,5 @@ createApp(App)
el.appendChild(scriptTag);
})
.mount("#app");

// 函数用于解码 HTML 实体
9 changes: 7 additions & 2 deletions src/views/TopicsView.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<ATypographyTitle :level="1">Topics</ATypographyTitle>
<AList itemLayout="horizontal" :dataSource="topics" :grid="{gutter: 16}">
<AList itemLayout="horizontal" :dataSource="topics" :grid="{ gutter: 16 }">
<template #renderItem="{ item: topic }">
<AListItem>
<RouterLink :to="`/topic/${topic.index}`" target="_blank">
Expand All @@ -10,7 +10,7 @@
</template>
<ACardMeta :title="`Topic ${topic.index}`">
<template #description>
<div style="height: 3rem; width: 250px;">
<div style="height: 3rem; width: 250px">
{{ topic.name }}
</div>
</template>
Expand Down Expand Up @@ -49,4 +49,9 @@ export default defineComponent({
width: 300px;
padding: 1px;
}
.animation-layout {
display: flex;
gap: 20px;
}
</style>
Loading

0 comments on commit 80c6af6

Please sign in to comment.