Skip to content

Commit 6bcf779

Browse files
authored
chore: improve frontpage visuals, frontmatter dx (#112)
* chore: remove code examples #90 * chore: resize thumbnails to 16 x 9, add README instructions #111 * chore: add Github links * refactor(frontmatter): generate default values, default to published * fix: fill in white bottom margin in dark mode * oops * chore(frontmatter): change unpublished to draft * chore: add Github button to demos * fix: remove nuxtLink from TheCodeButton
1 parent 6349d3c commit 6bcf779

72 files changed

Lines changed: 170 additions & 1122 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,14 @@ Every demo or experiment consist on two parts
8686
- A vue component containing the scene under `components/content`
8787

8888
1. Create a `your-awesome-demo.md` file under `content/experiments` directory.
89-
2. Add [Frontmatter](https://content.nuxtjs.org/guide/writing/markdown#front-matter) to provide the meta-data of your experiment, this is crucial to get the cards on the home page nice and pretty. Remember to add the `slug` of your `author` to the correspondant field. Be sure to add `status: published`, otherwise the thumbnail won't show up during your tests.
89+
2. Add [Frontmatter](https://content.nuxtjs.org/guide/writing/markdown#front-matter) to provide the meta-data of your experiment, this is crucial to get the cards on the home page nice and pretty. Remember to add the `slug` of your `author` to the correspondant field.
9090

9191
```md
9292
---
9393
thumbnail: /lowpoly-planet.png
9494
title: Low Poly Planet
9595
slug: lowpoly-planet
9696
author: alvarosabu
97-
status: published
9897
description: Low Poly Planet exported from Blender
9998
tags: ['basic', 'cientos', 'useGLTF', 'blender']
10099
---
@@ -117,7 +116,6 @@ thumbnail: /lowpoly-planet.png
117116
title: Low Poly Planet
118117
slug: lowpoly-planet
119118
author: alvarosabu
120-
status: published
121119
description: Low Poly Planet exported from Blender
122120
tags: ['basic', 'cientos', 'useGLTF', 'blender']
123121
---
@@ -127,6 +125,12 @@ tags: ['basic', 'cientos', 'useGLTF', 'blender']
127125

128126
5. Take a screenshot of your scene ot the `public` directory.
129127

128+
### Broken Github demo links
129+
130+
Note that the system will automatically add a link to your demo's source code on Github, so that visitors can see how you made your demo.
131+
132+
The link will be broken until your demo is merged into the main Lab branch.
133+
130134
## License
131135

132136
[MIT](/LICENSE)

components/TheCard.vue

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<script setup lang="ts">
2+
import TheCodeButton from './TheCodeButton.vue'
3+
24
defineProps<{
35
title: string
46
path: string
7+
repoTitle: string
8+
repoPath: string
59
media: string
610
description: string
711
author: {
@@ -13,16 +17,25 @@ defineProps<{
1317
</script>
1418

1519
<template>
16-
<NuxtLink :to="path">
20+
<div class="relative">
21+
<NuxtLink :to="path">
22+
<div class="absolute h-full w-full" />
23+
</NuxtLink>
1724
<div class="shadow-lg rounded-lg overflow-hidden">
1825
<img
1926
class="aspect-video object-cover"
2027
:src="media"
2128
>
2229
<div class="p-4">
23-
<h2 class="font-bold text-lg mb-2">
24-
{{ title }}
25-
</h2>
30+
<div class="flex gap-2 mb-2">
31+
<h2 class="grow font-bold text-lg">
32+
{{ title }}
33+
</h2>
34+
<TheCodeButton
35+
:to="repoPath"
36+
:title="repoTitle"
37+
/>
38+
</div>
2639
<p class="text-sm text-gray-400 mb-2 min-h-75px">
2740
{{ description }}
2841
</p>
@@ -46,5 +59,5 @@ defineProps<{
4659
</div>
4760
</footer>
4861
</div>
49-
</NuxtLink>
62+
</div>
5063
</template>

components/TheCodeButton.vue

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
title: string
4+
to: string
5+
}>()
6+
</script>
7+
8+
<template>
9+
<span class="rounded-full border-3">
10+
<a
11+
:href="to"
12+
:title="title"
13+
class="i-carbon-logo-github w-6 h-6"
14+
/>
15+
</span>
16+
</template>
17+
18+
<style scoped>
19+
.dark span {
20+
background-color: rgb(34, 34, 34);
21+
border-color: rgb(34, 34, 34);
22+
}
23+
24+
.dark a {
25+
background-color: rgb(209, 213, 219);
26+
text-shadow: rgb(34, 34, 34) 1px 0 10px;
27+
}
28+
29+
span, .sepia span {
30+
background-color: #FFF;
31+
border-color: #FFF;
32+
}
33+
34+
a, .sepia a {
35+
background-color: rgb(75, 85, 99);
36+
text-shadow: rgb(209, 213, 219) 1px 0 10px;
37+
}
38+
</style>
File renamed without changes.
File renamed without changes.

components/content/scroll-controls-demo/LowPolyPlanet.vue renamed to components/content/scroll-controls/LowPolyPlanet.vue

File renamed without changes.
File renamed without changes.
File renamed without changes.

components/content/synthwave/components/gradientSky.vue renamed to components/content/synthwave-landscape/components/gradientSky.vue

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)