create-apexjs 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-apexjs",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Scaffold a new Apex JS app",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -7,9 +7,11 @@
7
7
  <nav
8
8
  class="mx-auto flex max-w-5xl items-center gap-2 px-6 py-4"
9
9
  x-data="{ dark: false }"
10
- x-init="dark = localStorage.getItem('theme') === 'dark'; document.documentElement.classList.toggle('dark', dark)"
10
+ x-init="dark = localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches); document.documentElement.classList.toggle('dark', dark)"
11
+ client:load
11
12
  >
12
- <a href="/" class="mr-auto font-title text-lg font-bold text-on-surface-strong dark:text-on-surface-dark-strong">
13
+ <a href="/" class="mr-auto flex items-center gap-2 font-title text-lg font-bold text-on-surface-strong dark:text-on-surface-dark-strong">
14
+ <img src="/favicon.svg" alt="" width="24" height="24" class="size-6" />
13
15
  {{name}}
14
16
  </a>
15
17
  <a href="/" class="rounded-radius px-3 py-1.5 text-sm font-medium hover:bg-surface-alt dark:hover:bg-surface-dark-alt">Home</a>
@@ -14,12 +14,16 @@
14
14
  }
15
15
  </script>
16
16
 
17
- <template x-data="{ show: false }">
17
+ <template x-data>
18
18
  <!-- Hero -->
19
- <section class="py-8 text-center">
20
- <h1 class="font-title text-4xl font-extrabold tracking-tight text-on-surface-strong sm:text-5xl dark:text-on-surface-dark-strong" x-text="title"></h1>
19
+ <section class="flex flex-col items-center py-10 text-center sm:py-16">
20
+ <img src="/favicon.svg" alt="Apex JS" width="72" height="72" class="size-16 sm:size-20 drop-shadow" />
21
+ <p class="mt-5 inline-flex items-center gap-2 rounded-full border border-outline px-3 py-1 text-xs font-medium text-on-surface/80 dark:border-outline-dark dark:text-on-surface-dark/80">
22
+ Built with <span class="font-title font-bold text-on-surface-strong dark:text-on-surface-dark-strong">Apex&nbsp;JS</span>
23
+ </p>
24
+ <h1 class="mt-5 font-title text-4xl font-extrabold tracking-tight text-on-surface-strong sm:text-6xl dark:text-on-surface-dark-strong" x-text="title"></h1>
21
25
  <p class="mx-auto mt-4 max-w-2xl text-lg" x-text="tagline"></p>
22
- <div class="mt-6 flex flex-wrap justify-center gap-3">
26
+ <div class="mt-7 flex flex-wrap justify-center gap-3">
23
27
  <a href="/blog"><Button>Read the blog</Button></a>
24
28
  <a href="https://apexjs.site" class="inline-flex items-center justify-center rounded-radius border border-outline px-4 py-2 text-sm font-medium text-on-surface transition hover:opacity-75 dark:border-outline-dark dark:text-on-surface-dark">Docs</a>
25
29
  </div>
@@ -54,8 +58,9 @@
54
58
  </ul>
55
59
  </section>
56
60
 
57
- <!-- A hydrated, interactive component -->
58
- <section class="mt-10 flex flex-col items-start gap-3">
61
+ <!-- A hydrated, interactive island. `client:load` hydrates it immediately in
62
+ islands mode; in default mode the whole page hydrates anyway. -->
63
+ <section class="mt-10 flex flex-col items-start gap-3" x-data="{ show: false }" client:load>
59
64
  <p class="text-sm text-on-surface/80 dark:text-on-surface-dark/80">Hydrated in the browser — click it:</p>
60
65
  <Counter start="0" label="Clicks" />
61
66
  <button type="button" class="text-sm text-primary hover:opacity-75 dark:text-primary-dark" @click="show = !show" x-text="show ? 'Hide details' : 'How does this work?'"></button>
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Apex">
2
+ <defs>
3
+ <linearGradient id="apexLit" x1="0" y1="1" x2="1" y2="0">
4
+ <stop offset="0" stop-color="#22d3ee"/>
5
+ <stop offset="1" stop-color="#6366f1"/>
6
+ </linearGradient>
7
+ </defs>
8
+ <!-- Apex mark: an "A" that is also a summit. Left face lit, right face in shadow. -->
9
+ <path d="M32 7 L32 35 L20 56 L4 56 Z" fill="url(#apexLit)"/>
10
+ <path d="M32 7 L60 56 L44 56 L32 35 Z" fill="#6366f1"/>
11
+ </svg>