mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-22 17:03:50 +01:00
4222a8f21b
* 関西弁
* try updating deps
* Revert "try updating deps"
This reverts commit d20bedb5cb
.
* fix
* fix
* Update trs
* tweak
* 修正
34 lines
852 B
Vue
34 lines
852 B
Vue
<template>
|
|
<section>
|
|
<h2 class="text-2xl lg:text-3xl font-title font-bold mb-4">
|
|
{{ $t(`_docs._${sectionId}.title`) }}
|
|
</h2>
|
|
<MkIndex :wide="true" :base-path="basePath" />
|
|
</section>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const props = defineProps<{
|
|
sectionId: "forUsers" | "forAdmin" | "forDevelopers";
|
|
}>();
|
|
|
|
const { locale } = useI18n();
|
|
|
|
const convertToKebabCase = (str: string): string => {
|
|
if (typeof str !== "string") return str;
|
|
|
|
str = str.replace(/^ *?[A-Z]/, function (allStr) {
|
|
return allStr.toLowerCase();
|
|
});
|
|
str = str.replace(/_/g, "-");
|
|
str = str.replace(/ *?[A-Z]/g, function (allStr, i) {
|
|
return "-" + allStr.replace(/\s/g, "").toLowerCase();
|
|
});
|
|
return str;
|
|
};
|
|
|
|
const basePath = `/${locale.value === 'ja-ks' ? 'ja' : locale.value}/docs/${convertToKebabCase(props.sectionId)}/`;
|
|
</script>
|
|
|
|
<style scoped></style>
|