Skip to content

Commit 4b0e535

Browse files
authored
Merge pull request #21 from data-miner00/dev
Minor updates
2 parents 80a6c44 + 9bd7cb6 commit 4b0e535

File tree

6 files changed

+31
-8
lines changed

6 files changed

+31
-8
lines changed

components/LanguageSwitcher.vue

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,41 @@ function closePopup() {
4444
</button>
4545
<div
4646
v-if="isPopupOpen"
47-
class="absolute -bottom-36 right-0 flex flex-col items-stretch rounded"
47+
class="absolute -bottom-40 right-0 flex flex-col items-stretch rounded"
4848
>
4949
<NuxtLink
5050
:to="switchLocalePath('fr')"
5151
@click="closePopup"
5252
class="language"
53-
><span class="block">🇫🇷</span> Français</NuxtLink
5453
>
54+
<span class="block">
55+
<NuxtImg
56+
src="/images/flag-france.svg"
57+
alt="The flag of France"
58+
class="h-8"
59+
/>
60+
</span>
61+
<span class="block"> Français </span>
62+
</NuxtLink>
5563
<NuxtLink
5664
:to="switchLocalePath('en')"
5765
@click="closePopup"
5866
class="language"
59-
><span class="block">🇺🇸</span> English</NuxtLink
6067
>
68+
<span class="block">
69+
<NuxtImg
70+
src="/images/flag-united-states.svg"
71+
alt="The flag of the States"
72+
class="h-8"
73+
/>
74+
</span>
75+
<span class="block">English</span>
76+
</NuxtLink>
6177
</div>
6278
</div>
6379
</template>
6480

6581
<style scoped lang="sass">
6682
.language
67-
@apply p-2 block hover:border-gray-200 dark:hover:border-slate-600 dark:hover:bg-slate-700 hover:bg-white border border-solid border-transparent rounded text-center
83+
@apply p-2 flex flex-col items-center hover:border-gray-200 dark:hover:border-slate-600 dark:hover:bg-slate-700 hover:bg-white border border-solid border-transparent rounded text-center
6884
</style>

components/TableOfContent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var scrollToTop = function () {
2626

2727
<template>
2828
<aside
29-
class="sticky top-[350px] bg-white dark:bg-slate-800 font-bold rounded-lg border border-solid border-gray-200 dark:border-gray-700 xl:w-[272px] text-sm transform -translate-y-60"
29+
class="lg:sticky lg:top-[350px] bg-white dark:bg-slate-800 font-bold rounded-lg border border-solid border-gray-200 dark:border-gray-700 xl:w-[272px] text-sm transform lg:-translate-y-60"
3030
aria-label="Table of Content"
3131
>
3232
<header

nuxt.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,7 @@ export default defineNuxtConfig({
9191
language: "en",
9292
},
9393
},
94+
image: {
95+
provider: "netlify", // Use your own provider!
96+
},
9497
});

pages/[...slug].vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ onBeforeUnmount(() => {
8383
</li>
8484
</ul>
8585
</Landing>
86-
<main class="mx-auto flex justify-center">
86+
<main
87+
class="mx-auto flex flex-col-reverse lg:flex-row justify-center px-6 lg:px-0"
88+
>
8789
<article
88-
class="prose prose-stone dark:prose-invert max-w-[90%] sm:max-w-[65ch] prose-pre:bg-gray-100 dark:prose-pre:bg-slate-700 dark:prose-pre:text-gray-50 prose-pre:border prose-pre:border-gray-200 dark:prose-pre:border-gray-700 prose-pre:border-solid prose-pre:rounded-lg prose-pre:text-slate-800 prose-headings:text-cyan-600 dark:prose-hr:border-gray-700 dark:prose-li:marker:text-gray-200 dark:prose-blockquote:border-gray-200 prose-headings:scroll-mt-24"
90+
class="prose prose-stone dark:prose-invert sm:max-w-[65ch] prose-pre:bg-gray-100 dark:prose-pre:bg-slate-700 dark:prose-pre:text-gray-50 prose-pre:border prose-pre:border-gray-200 dark:prose-pre:border-gray-700 prose-pre:border-solid prose-pre:rounded-lg prose-pre:text-slate-800 prose-headings:text-cyan-600 dark:prose-hr:border-gray-700 dark:prose-li:marker:text-gray-200 dark:prose-blockquote:border-gray-200 prose-headings:scroll-mt-24"
8991
>
9092
<ContentRenderer :value="(data as Record<string, any> | undefined)">
9193
<template #empty>
@@ -112,7 +114,7 @@ onBeforeUnmount(() => {
112114
<div aria-hidden v-else />
113115
</div>
114116
</article>
115-
<div v-if="toc" class="relative ml-10 hidden lg:block">
117+
<div v-if="toc" class="relative lg:ml-10 lg:block">
116118
<TableOfContent :toc="toc.links" />
117119
</div>
118120
</main>

public/images/flag-france.svg

Lines changed: 1 addition & 0 deletions
Loading

public/images/flag-united-states.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)