Skip to content

Commit

Permalink
Merge pull request #184 from ashcolor/develop
Browse files Browse the repository at this point in the history
deploy
  • Loading branch information
ashcolor authored Aug 12, 2024
2 parents cf25f20 + 4eb0b63 commit 833ff23
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
52 changes: 33 additions & 19 deletions components/content/ProsePre.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,48 @@ const props = defineProps({
},
});
const codeHtml = await codeToHtml(props.code.replace(/\n$/, ""), {
lang: props.language,
theme: "github-dark",
const isLoading = ref(true);
const codeHtml = ref("");
const loadCode = async () => {
codeHtml.value = await codeToHtml(props.code.replace(/\n$/, ""), {
lang: props.language,
theme: "github-dark",
});
isLoading.value = false;
};
onMounted(async () => {
await loadCode();
});
</script>

<template>
<div class="my-4">
<div v-if="props.filename" class="tabs">
<ClientOnly>
<div class="my-4">
<div v-if="props.filename" class="tabs">
<div
class="tab flex cursor-default flex-row justify-start gap-1 bg-primary text-primary-content"
>
<Icon name="mdi:file-outline"></Icon>
<span>{{ props.filename }}</span>
</div>
</div>
<div
v-else-if="
props.filename ||
['bash', 'sh', 'zsh', 'PowerShell', 'Shell'].includes(props.language)
"
class="tab flex cursor-default flex-row justify-start gap-1 bg-primary text-primary-content"
>
<Icon name="mdi:file-outline"></Icon>
<span>{{ props.filename }}</span>
<Icon name="mdi:keyboard-arrow-right"></Icon><span>{{ props.language }}</span>
</div>
<!-- eslint-disable-next-line tailwindcss/no-custom-classname -->
<div v-if="isLoading" :class="props.class" class="prose-code">読み込み中</div>
<!-- eslint-disable-next-line tailwindcss/no-custom-classname -->
<div v-else :class="props.class" class="prose-code" v-html="codeHtml"></div>
</div>
<div
v-else-if="
props.filename ||
['bash', 'sh', 'zsh', 'PowerShell', 'Shell'].includes(props.language)
"
class="tab flex cursor-default flex-row justify-start gap-1 bg-primary text-primary-content"
>
<Icon name="mdi:keyboard-arrow-right"></Icon><span>{{ props.language }}</span>
</div>
<!-- eslint-disable-next-line tailwindcss/no-custom-classname -->
<div :class="props.class" class="prose-code" v-html="codeHtml"></div>
</div>
</ClientOnly>
</template>

<style>
Expand Down
2 changes: 1 addition & 1 deletion content/data/synthesizer-v-singer.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ release,name,language,gender,company,voice,illust,image_url,dlsite_url
未定,夢ノ結唱 HALO,日本語,女声,ブシロード,伊藤美来,あり,,
未定,夢ノ結唱 PASTEL,日本語,女声,ブシロード,前島亜美,あり,,
未定,可不,日本語,女声,神椿スタジオ,花譜,あり,,
未定,NOA,英語,男声,AUDIOLOGIE,非公開,あり,,
2024/09/07,NOA Hex,英語,男声,AUDIOLOGIE,非公開,あり,,
2024/07/19,Ling Wan,広東語,女声,Dreamtonics株式会社,非公開,なし,,
2024/06/03,ロサ(ROSA),日本語,女声,株式会社インターネット,しらゆき,あり,https://img.dlsite.jp/modpub/images2/work/professional/VJ01003000/VJ01002384_img_main.jpg,https://www.dlsite.com/soft/work/=/product_id/VJ01002384.html
2024/04/25,フリモメン,日本語,男声,株式会社 AHS,古賀明,あり,https://img.dlsite.jp/modpub/images2/work/professional/VJ01003000/VJ01002075_img_main.jpg,https://www.dlsite.com/soft/work/=/product_id/VJ01002075.html
Expand Down
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default defineNuxtConfig({
"css",
"javascript",
"js",
"jsx",
"ts",
"php",
"vue",
Expand Down

0 comments on commit 833ff23

Please sign in to comment.