Skip to content

Commit

Permalink
Merge pull request #32 from data-miner00/fix-styles
Browse files Browse the repository at this point in the history
Fix styles
  • Loading branch information
data-miner00 authored Dec 2, 2024
2 parents 1797235 + d9fab6d commit 74d544f
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 9 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ To run this template project in your local for personal use or contribution, sim
```sh
pnpm dev
```
4. Copy the `.env.example` to `.env` and replace the value for `NUXT_PUBLIC_SITE_UR`. This is used for static-site generation.
```sh
NUXT_PUBLIC_SITE_UR=https://www.mydomain.com
```
5. Build/generate static website
```sh
pnpm generate
```

> ⚠️ Important: **Do not update** the dependencies as it will break due to incompatibilities from the latest Nuxt and Nuxt Content.
Expand Down
4 changes: 4 additions & 0 deletions assets/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
@apply inline-block;
}

&.math-display {
@apply overflow-x-auto;
}

&.math-display svg {
@apply block mx-auto;
}
Expand Down
4 changes: 2 additions & 2 deletions components/MobileSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ const links = [
@click="toggleSidebar"
>
<NuxtLink
class="block px-3 py-2 rounded font-semibold text-sm hover:bg-green-200/50 dark:hover:bg-cyan-400/50"
class="block px-3 py-2 rounded font-semibold text-sm hover:bg-green-200/50 dark:hover:bg-green-400/50"
:to="localePath(link.path)"
exact-active-class="text-green-400 bg-green-200/50 dark:bg-cyan-400/50 dark:text-cyan-400"
exact-active-class="text-green-400 bg-green-200/50 dark:bg-green-400/50 dark:text-green-400"
>
{{ $t(link.translationKey) }}
</NuxtLink>
Expand Down
2 changes: 1 addition & 1 deletion components/TableOfContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var scrollToTop = function () {
<div class="py-3">
<div v-for="(item, index) in toc" :key="index">
<NuxtLink
class="py-2 block pl-7 text-gray-700 dark:text-gray-200"
class="py-2 block pl-7 text-gray-700 dark:text-gray-200 hover:text-green-600 dark:hover:text-green-600"
:to="`#${item.id}`"
>{{ item.text }}</NuxtLink
>
Expand Down
2 changes: 1 addition & 1 deletion components/VFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ nav {
@apply text-gray-500 dark:text-gray-400 block my-2;
&:hover {
@apply text-gray-700 dark:text-gray-300;
@apply text-green-600;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "An opinionated template built for documentations and static websites.",
"author": "Shaun Chong <[email protected]>",
"license": "MIT",
"private": true,
"version": "1.2.2",
"private": false,
"version": "1.2.3",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
Expand Down
6 changes: 3 additions & 3 deletions pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ onBeforeUnmount(() => {
class="mx-auto flex flex-col-reverse lg:flex-row justify-center px-6 lg:px-0"
>
<article
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-green-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 dark:prose-tr:border-gray-500 dark:prose-thead:border-gray-400"
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-green-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 dark:prose-tr:border-gray-500 dark:prose-thead:border-gray-400 sm:mx-auto lg:mx-0"
>
<ContentRenderer :value="(data as Record<string, any> | undefined)">
<template #empty>
Expand All @@ -99,15 +99,15 @@ onBeforeUnmount(() => {
<NuxtLink
v-if="prev"
:to="localePath(prev._path)"
class="block py-1 px-3 border border-solid border-gray-200 dark:border-gray-700 rounded"
class="block py-1 px-3 border border-solid border-gray-200 dark:border-gray-700 rounded hover:text-green-600"
>
← {{ prev.title }}
</NuxtLink>
<div aria-hidden v-else />
<NuxtLink
v-if="next"
:to="localePath(next._path)"
class="block py-1 px-3 border border-solid border-gray-200 dark:border-gray-700 rounded"
class="block py-1 px-3 border border-solid border-gray-200 dark:border-gray-700 rounded hover:text-green-600"
>
{{ next.title }} →
</NuxtLink>
Expand Down

0 comments on commit 74d544f

Please sign in to comment.