Skip to content

Commit 5aea6af

Browse files
authored
Merge pull request #3 from banua-coder/feature/update-documentation-national-endpoint
feat: implement complete i18n translations and documentation updates
2 parents 62dc3d6 + c24cc38 commit 5aea6af

28 files changed

+1495
-38
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ temp/
104104

105105
# Claude Code specific
106106
.claude
107-
CLAUDE.md
107+
CLAUDE.mdimage.png

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,4 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
162162
**Created for PICO SulTeng API**
163163
[Banua Coder](https://banuacoder.com) • Central Sulawesi COVID-19 Data API
164164

165-
**Developer**: [Fajrian Aidil Pratama](https://github.com/ryanaidilp)
165+
**Developer**: [Fajrian Aidil Pratama](https://github.com/ryanaidilp)

image.png

511 KB
Loading

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
},
2828
"dependencies": {
2929
"aos": "^2.3.4",
30+
"katex": "^0.16.22",
3031
"vue": "^3.5.21",
31-
"vue-i18n": "^9.14.5",
32+
"vue-i18n": "9",
3233
"vue-router": "^4.5.1"
3334
}
3435
}

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ export default {
33
tailwindcss: {},
44
autoprefixer: {},
55
},
6-
}
6+
}

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
#app {
1313
min-height: 100vh;
1414
}
15-
</style>
15+
</style>

src/components/DataSources.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ const dataSources: DataSource[] = [
5656
url: 'https://hack.co.id'
5757
}
5858
]
59-
</script>
59+
</script>

src/components/MathFormula.vue

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<template>
2+
<span v-html="renderedMath" class="katex-formula"></span>
3+
</template>
4+
5+
<script setup lang="ts">
6+
import { computed } from 'vue'
7+
import katex from 'katex'
8+
import 'katex/dist/katex.min.css'
9+
10+
interface Props {
11+
formula: string
12+
displayMode?: boolean
13+
}
14+
15+
const props = withDefaults(defineProps<Props>(), {
16+
displayMode: true
17+
})
18+
19+
const renderedMath = computed(() => {
20+
try {
21+
return katex.renderToString(props.formula, {
22+
displayMode: props.displayMode,
23+
throwOnError: false
24+
})
25+
} catch (error) {
26+
console.error('KaTeX rendering error:', error)
27+
return props.formula
28+
}
29+
})
30+
</script>
31+
32+
<style scoped>
33+
.katex-formula {
34+
display: block;
35+
text-align: center;
36+
}
37+
</style>

src/components/Navigation.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,4 @@ onUnmounted(() => {
215215
// Restore body scroll on component unmount
216216
document.body.style.overflow = 'auto'
217217
})
218-
</script>
218+
</script>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<template>
2+
<section v-show="isActive" id="authentication" class="mb-16">
3+
<div class="mb-8">
4+
<h1 class="text-3xl font-bold text-gray-900 mb-4">{{ t('documentation.authentication.title') }}</h1>
5+
<p class="text-lg text-gray-600">{{ t('documentation.authentication.subtitle') }}</p>
6+
</div>
7+
8+
<div class="bg-white rounded-2xl shadow-lg border border-gray-200 overflow-hidden">
9+
<div class="bg-gradient-to-r from-yellow-600 to-orange-600 px-8 py-6">
10+
<h2 class="text-2xl font-bold text-white mb-2">{{ t('documentation.authentication.title') }}</h2>
11+
<p class="text-yellow-100">{{ t('documentation.authentication.subtitle') }}</p>
12+
</div>
13+
14+
<div class="p-8">
15+
<div class="bg-green-50 border-l-4 border-green-400 p-6 mb-8">
16+
<div class="flex items-center">
17+
<svg class="w-6 h-6 text-green-400 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
18+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
19+
</svg>
20+
<div>
21+
<h3 class="text-lg font-semibold text-green-800 mb-1">{{ t('documentation.authentication.noAuthRequired') }}</h3>
22+
<p class="text-green-700">{{ t('documentation.authentication.noAuthDescription') }}</p>
23+
</div>
24+
</div>
25+
</div>
26+
27+
<div class="grid md:grid-cols-2 gap-8">
28+
<div class="bg-blue-50 rounded-xl p-6">
29+
<h3 class="text-xl font-semibold text-gray-900 mb-4">{{ t('documentation.authentication.rateLimiting') }}</h3>
30+
<ul class="space-y-2 text-gray-600">
31+
<li v-for="(detail, index) in $tm('documentation.authentication.rateLimitDetails')" :key="index" class="flex items-center">
32+
<svg class="w-4 h-4 text-blue-500 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
33+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path>
34+
</svg>
35+
{{ detail }}
36+
</li>
37+
</ul>
38+
</div>
39+
40+
<div class="bg-purple-50 rounded-xl p-6">
41+
<h3 class="text-xl font-semibold text-gray-900 mb-4">{{ t('documentation.authentication.bestPractices') }}</h3>
42+
<ul class="space-y-2 text-gray-600">
43+
<li v-for="(practice, index) in $tm('documentation.authentication.practiceDetails')" :key="index" class="flex items-center">
44+
<svg class="w-4 h-4 text-purple-500 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
45+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4"></path>
46+
</svg>
47+
{{ practice }}
48+
</li>
49+
</ul>
50+
</div>
51+
</div>
52+
</div>
53+
</div>
54+
</section>
55+
</template>
56+
57+
<script setup lang="ts">
58+
import { useI18n } from 'vue-i18n'
59+
60+
interface Props {
61+
isActive: boolean
62+
}
63+
64+
defineProps<Props>()
65+
const { t, tm: $tm } = useI18n()
66+
</script>

0 commit comments

Comments
 (0)