Skip to content

Commit 14e8247

Browse files
committed
Remove light-mode color scheme for simplicity
1 parent 88fb182 commit 14e8247

File tree

14 files changed

+35
-184
lines changed

14 files changed

+35
-184
lines changed

components/Header.vue

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -222,64 +222,6 @@ const route = useRoute();
222222
</a>
223223
</HeadlessMenuItem>
224224
</div>
225-
226-
<!-- Divider -->
227-
<div class="border-t border-gray-300 dark:border-gray-600"></div>
228-
229-
<!-- Theme Toggle Section -->
230-
<div class="px-1 py-1">
231-
<HeadlessMenuItem v-slot="{ active }">
232-
<button
233-
@click="
234-
$colorMode.preference =
235-
$colorMode.value === 'dark' ? 'light' : 'dark'
236-
"
237-
:class="[
238-
active
239-
? 'bg-orange-500/50 text-white dark:text-white'
240-
: 'text-gray-700 dark:text-white',
241-
'group flex w-full items-center rounded-md px-2 py-2 text-sm',
242-
]"
243-
>
244-
<!-- Sun icon for when we're in dark mode (clicking switches to light) -->
245-
<svg
246-
v-if="$colorMode.value === 'dark'"
247-
class="mr-2 inline h-5 w-5"
248-
fill="none"
249-
stroke="currentColor"
250-
viewBox="0 0 24 24"
251-
xmlns="http://www.w3.org/2000/svg"
252-
>
253-
<path
254-
stroke-linecap="round"
255-
stroke-linejoin="round"
256-
stroke-width="2"
257-
d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"
258-
/>
259-
</svg>
260-
261-
<!-- Moon icon for when we're in light mode (clicking switches to dark) -->
262-
<svg
263-
v-else
264-
class="mr-2 inline h-5 w-5"
265-
fill="none"
266-
stroke="currentColor"
267-
viewBox="0 0 24 24"
268-
xmlns="http://www.w3.org/2000/svg"
269-
>
270-
<path
271-
stroke-linecap="round"
272-
stroke-linejoin="round"
273-
stroke-width="2"
274-
d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"
275-
/>
276-
</svg>
277-
<span class="translate-y-0.5">{{
278-
$colorMode.value === "dark" ? "Light Mode" : "Dark Mode"
279-
}}</span>
280-
</button>
281-
</HeadlessMenuItem>
282-
</div>
283225
</HeadlessMenuItems>
284226
</transition>
285227
</HeadlessMenu>

components/MoreLink.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const props = defineProps({
1313
<div class="flex justify-end">
1414
<NuxtLink
1515
:to="props.to"
16-
class="flex items-center text-sm font-bold text-gray-700 hover:text-orange-500 dark:text-white"
16+
class="flex items-center text-sm font-bold hover:text-orange-500 text-white"
1717
>
1818
<span class="translate-y-0.5">More</span>
1919
<CursorArrowRaysIcon class="ml-1 h-5 w-5" aria-hidden="true" />

components/ThemeToggle.vue

Lines changed: 0 additions & 53 deletions
This file was deleted.

components/section/BlogPosts.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const props = defineProps({
1111
<div v-for="(article, ix) of articles" :key="ix">
1212
<NuxtLink :to="article.path">
1313
<div
14-
class="h-full space-y-4 rounded-lg p-4 text-gray-700 drop-shadow-lg hover:ring-1 hover:ring-gray-300 dark:bg-orange-400/50 dark:text-white dark:hover:ring-white"
14+
class="h-full space-y-4 rounded-lg p-4 drop-shadow-lg hover:ring-1 bg-orange-400/50 text-white hover:ring-white"
1515
>
1616
<div>
1717
<div
@@ -24,7 +24,7 @@ const props = defineProps({
2424
<NuxtTime
2525
v-if="show_dates"
2626
:datetime="article.date"
27-
class="text-sm text-gray-600 dark:text-gray-200"
27+
class="text-sm text-gray-200"
2828
year="numeric"
2929
month="short"
3030
day="2-digit"
@@ -34,7 +34,7 @@ const props = defineProps({
3434
>
3535
</div>
3636
</div>
37-
<div class="line-clamp-3 text-sm text-gray-700 dark:text-gray-100">
37+
<div class="line-clamp-3 text-sm text-gray-100">
3838
{{ article.description }}
3939
</div>
4040
</div>

components/section/Playground.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ const filtered_links = computed(() => {
100100

101101
<template>
102102
<section
103-
class="bg-gradient-to-b from-transparent to-background text-gray-700 dark:to-background-dark dark:text-white"
103+
class="bg-gradient-to-b from-transparent to-background-dark text-white"
104104
>
105-
<div class="container mx-auto py-8 text-gray-700 dark:text-white">
105+
<div class="container mx-auto py-8 text-white">
106106
<div class="mb-2 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
107107
<nuxt-link
108-
class="relative hover:ring-1 hover:ring-gray-300 dark:hover:ring-white rounded-lg"
108+
class="relative hover:ring-1 hover:ring-white rounded-lg"
109109
v-for="link in filtered_links"
110110
:key="link.title"
111111
:to="link.link"
@@ -115,16 +115,16 @@ const filtered_links = computed(() => {
115115
:src="link.img || 'images/placeholder.png'"
116116
/>
117117
<div
118-
class="absolute bottom-2 flex w-full items-center justify-center"
118+
class="absolute bottom-2 px-2 flex w-full items-center justify-center"
119119
>
120120
<div
121-
class="w-full bg-black bg-[url('/images/noise.svg')] px-6 py-2 border-t border-b border-white"
121+
class="w-full bg-black bg-[url('/images/noise.svg')] px-6 py-2 rounded-lg"
122122
>
123-
<h3 class="text-xl font-bold text-gray-700 dark:text-white">
123+
<h3 class="text-xl font-bold text-white">
124124
{{ link.title }}
125125
</h3>
126126
<div
127-
class="line-clamp-1 text-sm text-gray-700 dark:text-gray-300"
127+
class="line-clamp-1 text-sm text-gray-300"
128128
v-html="link.description"
129129
></div>
130130
</div>

layouts/default.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="bg-gradient-to-b from-orange-500 to-red-500">
33
<div class="p-[10px]">
4-
<main class="flex h-[calc(100vh-20px)] flex-col rounded-3xl bg-background dark:bg-background-dark font-display">
4+
<main class="flex h-[calc(100vh-20px)] flex-col rounded-3xl bg-background font-display">
55
<Header />
66
<main class="flex-1 overflow-scroll no-scrollbar">
77
<slot />

nuxt.config.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
// https://nuxt.com/docs/api/configuration/nuxt-config
22
export default defineNuxtConfig({
33
components: true,
4-
modules: ["@nuxt/content", "@nuxtjs/tailwindcss", "@nuxtjs/color-mode", "nuxt-headlessui"],
4+
modules: ["@nuxt/content", "@nuxtjs/tailwindcss", "nuxt-headlessui"],
55

66
app: {
77
head: {
88
bodyAttrs: {
9-
class: 'bg-background dark:bg-background-dark'
9+
class: 'bg-background'
1010
}
1111
}
1212
},
1313

14-
// Color mode configuration
15-
colorMode: {
16-
preference: 'system', // default value of $colorMode.preference
17-
fallback: 'dark', // fallback value if not system preference found
18-
hid: 'nuxt-color-mode-script',
19-
globalName: '__NUXT_COLOR_MODE__',
20-
componentName: 'ColorScheme',
21-
classPrefix: '',
22-
classSuffix: '',
23-
storageKey: 'nuxt-color-mode'
24-
},
25-
2614
// Optionally change the default prefix.
2715
headlessui: {
2816
prefix: "Headless",
@@ -34,10 +22,7 @@ export default defineNuxtConfig({
3422
// Disable highlighting until interoperability with by the Tailwind Typography plugin is sorted
3523
// highlight: false
3624
highlight: {
37-
theme: {
38-
light: 'github-light',
39-
default: 'github-dark'
40-
},
25+
theme: 'github-dark',
4126
preload: [
4227
'bash',
4328
'js',

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"webpack": "^5.99.9"
2424
},
2525
"dependencies": {
26-
"@nuxtjs/color-mode": "^3.5.2",
2726
"chords.ts": "^0.1.0",
2827
"p5": "^1.11.7",
2928
"tailwindcss": "^3.4.17"

pages/articles/[...slug].vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const { data: page } = await useAsyncData(route.path, () => {
88

99
<template>
1010
<div
11-
class="container mx-auto mb-10 max-w-[1024px] space-y-6 text-gray-700 shadow-lg dark:text-white"
11+
class="container mx-auto mb-10 max-w-[1024px] space-y-6 shadow-lg text-white"
1212
v-if="page"
1313
>
1414
<!-- title -->
@@ -26,12 +26,12 @@ const { data: page } = await useAsyncData(route.path, () => {
2626
<!-- Meta -->
2727
<div class="flex space-x-2">
2828
<div>
29-
<div class="mb-2 text-xs uppercase text-gray-600 dark:text-gray-400">
29+
<div class="mb-2 text-xs uppercase text-gray-400">
3030
Category
3131
</div>
3232
<div class="flex flex-row space-x-2">
3333
<NuxtLink
34-
class="mr-2 w-min rounded-md bg-background text-sm font-bold hover:cursor-pointer hover:text-orange-500 dark:bg-background-dark"
34+
class="mr-2 w-min rounded-md text-sm font-bold hover:cursor-pointer hover:text-orange-500 bg-background"
3535
v-for="(category, ix) in page.categories"
3636
:key="ix"
3737
:to="`/articles?category=${category}`"
@@ -41,15 +41,15 @@ const { data: page } = await useAsyncData(route.path, () => {
4141
</div>
4242
</div>
4343

44-
<div class="border-r border-gray-400 dark:border-gray-400"></div>
44+
<div class="border-r border-gray-400"></div>
4545

4646
<div>
47-
<div class="mb-2 text-xs uppercase text-gray-600 dark:text-gray-400">
47+
<div class="mb-2 text-xs uppercase text-gray-400">
4848
Tags
4949
</div>
5050
<div class="flex flex-row md:space-x-2">
5151
<NuxtLink
52-
class="mr-2 w-min rounded-md bg-background text-sm font-bold hover:cursor-pointer hover:text-orange-500 dark:bg-background-dark"
52+
class="mr-2 w-min rounded-md text-sm font-bold hover:cursor-pointer hover:text-orange-500 bg-background"
5353
v-for="(tag, ix) in page.tags"
5454
:key="ix"
5555
:to="`/articles?tag=${tag}`"
@@ -65,7 +65,7 @@ const { data: page } = await useAsyncData(route.path, () => {
6565
- Use prose-pre:bg-white to work with @nuxt/content syntax highlighting, otherwise background-color defaults to `.prose:where(pre)`
6666
-->
6767
<article
68-
class="prose max-w-[1024px] text-gray-700 prose-h2:mt-8 prose-p:text-justify prose-a:font-bold prose-a:text-orange-400 prose-a:no-underline hover:prose-a:text-orange-500 prose-blockquote:text-gray-400 prose-code:text-white prose-pre:bg-black dark:text-gray-300"
68+
class="prose max-w-[1024px] prose-h2:mt-8 prose-p:text-justify prose-a:font-bold prose-a:text-orange-400 prose-a:no-underline hover:prose-a:text-orange-500 prose-blockquote:text-gray-400 prose-code:text-white prose-pre:bg-black text-gray-300"
6969
>
7070
<ContentRenderer v-if="page" :value="page" />
7171
</article>

pages/articles/index.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function toggleCategory(cat) {
8686
</script>
8787

8888
<template>
89-
<section class="container mx-auto font-mono text-gray-700 dark:text-white">
89+
<section class="container mx-auto font-mono text-white">
9090
<div class="grid grid-cols-4 gap-4">
9191
<div class="col-span-4 lg:col-span-3">
9292
<div class="grid grid-cols-10 gap-y-4 lg:gap-y-6">
@@ -106,15 +106,15 @@ function toggleCategory(cat) {
106106
<ContentRenderer
107107
v-if="article.meta?.excerpt"
108108
:value="article.meta.excerpt"
109-
class="line-clamp-5 text-xs text-gray-600 dark:text-gray-400"
109+
class="line-clamp-5 text-xs text-gray-400"
110110
/>
111111
</div>
112112
</div>
113113
</template>
114114
</div>
115115
</div>
116116
<div
117-
class="col-span-4 border-l border-gray-300 pl-4 dark:border-gray-700 lg:col-span-1"
117+
class="col-span-4 border-l pl-4 border-gray-700 lg:col-span-1"
118118
>
119119
<div class="my-2 space-y-2">
120120
<p class="text-xl font-bold">Categories</p>
@@ -124,7 +124,7 @@ function toggleCategory(cat) {
124124
:class="{
125125
'bg-orange-500 text-white': selectedCategories.includes(category),
126126
}"
127-
class="cursor-pointer p-1 text-sm text-gray-600 hover:bg-orange-500 hover:text-white dark:text-gray-400"
127+
class="cursor-pointer p-1 text-sm hover:bg-orange-500 hover:text-white text-gray-400"
128128
@click="toggleCategory(category)"
129129
>
130130
{{ category }}
@@ -139,7 +139,7 @@ function toggleCategory(cat) {
139139
:class="{
140140
'bg-orange-500 text-white': selectedTags.includes(tag),
141141
}"
142-
class="cursor-pointer select-none p-1 text-sm text-gray-600 hover:bg-orange-500 hover:text-white dark:text-gray-400"
142+
class="cursor-pointer select-none p-1 text-sm hover:bg-orange-500 hover:text-white text-gray-400"
143143
@click="toggleTag(tag)"
144144
>
145145
{{ tag }}

0 commit comments

Comments
 (0)