Skip to content

Commit f952f65

Browse files
authored
feat: new naming and dark mode (#93)
1 parent e3e178e commit f952f65

File tree

12 files changed

+1051
-1001
lines changed

12 files changed

+1051
-1001
lines changed

app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="">
33
<NuxtLayout>
44
<NuxtPage />
55
</NuxtLayout>

components/TheTag.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts" setup></script>
22

33
<template>
4-
<span class="bg-primary inline-flex px-2 py-1 text-xs rounded">
4+
<span class="bg-primary inline-flex px-2 py-1 text-xs rounded text-dark">
55
<slot />
66
</span>
77
</template>

components/TheToolbar.vue

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,49 @@
11
<script lang="ts" setup>
2-
import Logo from '/assets/logo.svg'
2+
import { useDark, useToggle } from '@vueuse/core'
3+
4+
const isDark = useDark()
5+
const toggleDark = useToggle(isDark)
36
</script>
47

58
<template>
6-
<header class="fixed top-0 z-10 w-full bg-white bg-opacity-60 py-4">
9+
<header class="fixed top-0 z-10 w-full bg-white dark:bg-dark bg-opacity-60 py-4 font-sans">
710
<div class="px-4 sm:px-0 container mx-auto flex justify-between">
811
<div class="flex items-center">
9-
<Logo class="mr-8" />
12+
<img
13+
src="/lab.svg"
14+
alt="Tres.js"
15+
class="h-3 mr-4"
16+
>
1017
<a
1118
class="font-bold"
1219
href="/"
1320
title="Home"
14-
>Playground</a>
21+
>Lab</a>
1522
</div>
16-
<ul class="flex justify-between w-50px">
23+
<ul class="flex gap-4 justify-between items-center">
24+
<button
25+
title="Toggle dark mode"
26+
class="bg-transparent -mt-1"
27+
@click="toggleDark()"
28+
>
29+
<i
30+
v-if="isDark"
31+
class="i-carbon-sun"
32+
/>
33+
<i
34+
v-else
35+
class="i-carbon-moon"
36+
/>
37+
</button>
1738
<a
1839
href="https://tresjs.org/"
1940
target="_blank"
2041
class="i-carbon-document"
2142
/>
2243
<a
23-
href="https://github.com/Tresjs/playground"
44+
href="https://github.com/Tresjs/lab"
2445
target="_blank"
25-
class="i-logos-github-icon"
46+
class="i-carbon-logo-github"
2647
/>
2748
</ul>
2849
</div>

components/content/post-processing-manual/index.vue

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

components/content/scroll-controls-demo/index.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,3 @@ const { hasFinishLoading } = await useProgress()
121121
</TresCanvas>
122122
</template>
123123

124-
<style scoped>
125-
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
126-
127-
* {
128-
font-family: 'Inter', sans-serif;
129-
}
130-
</style>

nuxt.config.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { presetUno, presetIcons, presetTypography, presetWebFonts } from 'unocss'
1+
import { presetUno, presetIcons, presetTypography, presetWebFonts, transformerDirectives } from 'unocss'
22
import svgLoader from 'vite-svg-loader'
33

44
// https://nuxt.com/docs/api/configuration/nuxt-config
55
export default defineNuxtConfig({
66
app: {
77
head: {
8-
title: 'TresJS Playground',
8+
title: 'TresJS Lab',
99
link: [
1010
{
1111
rel: 'icon',
1212
type: 'image/svg',
13-
href: '/favicon.svg',
13+
href: '/flask.svg',
1414
},
1515
],
1616
},
@@ -24,7 +24,7 @@ export default defineNuxtConfig({
2424
'@nuxt/image',
2525
'@nuxt/devtools',
2626
],
27-
css: ['@unocss/reset/tailwind-compat.css', '@tresjs/leches/styles'],
27+
css: ['/styles/main.css', '@unocss/reset/tailwind-compat.css', '@tresjs/leches/styles'],
2828
declare: ['*.glsl'],
2929
tres: {
3030
devtools: true,
@@ -67,7 +67,7 @@ export default defineNuxtConfig({
6767
'border-radius': '0.5rem',
6868
},
6969
code: {
70-
'font-family': 'DM Mono',
70+
'font-family': 'JetBrains Mono',
7171
'font-size': '0.875rem',
7272
},
7373
/* code: {
@@ -88,16 +88,18 @@ export default defineNuxtConfig({
8888
}),
8989
presetWebFonts({
9090
fonts: {
91-
sans: 'DM Sans',
92-
serif: 'DM Serif Display',
93-
mono: 'DM Mono',
91+
sans: 'Inter',
92+
mono: 'JetBrains Mono',
9493
title: 'Sacramento',
9594
},
9695
}),
9796
],
9897
// core options
9998
shortcuts: [],
10099
rules: [],
100+
transformers: [
101+
transformerDirectives(),
102+
],
101103
},
102104
content: {
103105
highlight: {

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,21 @@
2121
"@iconify-json/ic": "^1.1.17",
2222
"@iconify-json/logos": "^1.1.42",
2323
"@nuxt/content": "^2.10.0",
24-
"@nuxt/image": "^1.1.0",
25-
"@nuxt/image-edge": "1.1.0-28396365.97249ca",
24+
"@nuxt/image": "^1.2.0",
25+
"@nuxt/image-edge": "1.2.0-28417792.5fb7d0e",
26+
"@nuxtjs/color-mode": "^3.3.2",
2627
"@tresjs/cientos": "3.7.0",
2728
"@tresjs/core": "3.6.0",
2829
"@tresjs/eslint-config-vue": "^0.2.1",
2930
"@tresjs/leches": "0.15.0-next.1",
3031
"@tresjs/nuxt": "2.0.1",
3132
"@tweakpane/plugin-essentials": "^0.2.1",
32-
"@types/three": "^0.159.0",
33-
"@unocss/nuxt": "^0.58.2",
33+
"@types/three": "^0.160.0",
34+
"@unocss/nuxt": "^0.58.3",
3435
"gsap": "^3.12.4",
35-
"nuxt": "^3.9.0",
36-
"nuxt-svgo": "^3.7.0",
37-
"postprocessing": "^6.34.1",
36+
"nuxt": "^3.9.1",
37+
"nuxt-svgo": "^4.0.0",
38+
"postprocessing": "6.34.1",
3839
"vite-svg-loader": "^5.1.0"
3940
}
4041
}

pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const { data: formattedExperiments } = await useAsyncData('/', () =>
2020

2121
<template>
2222
<main>
23-
<div class="w-full container mx-auto px-4 md:px-0 mb-60 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-8 pt-8">
23+
<div class="w-full container mx-auto px-4 md:px-0 mb-60 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-16 pt-8">
2424
<TheCard
2525
v-for="experiment in formattedExperiments"
2626
:key="experiment._path"

0 commit comments

Comments
 (0)