@alstar/create 0.0.0-beta.6 → 0.0.0-beta.8

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": "@alstar/create",
3
- "version": "0.0.0-beta.6",
3
+ "version": "0.0.0-beta.8",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create": "main.js"
@@ -2,9 +2,7 @@ import { html } from '@alstar/studio'
2
2
 
3
3
  export default () => {
4
4
  return html`
5
- <link rel="stylesheet" href="/components/Welcome/Welcome.css" />
6
-
7
- <section class="welcome">
5
+ <section id="welcome">
8
6
  <div>
9
7
  <h1>
10
8
  <a href="/" aria-label="Go to Alstars homepage">
@@ -1,6 +1,6 @@
1
1
  import { defineEntry } from '@alstar/studio'
2
2
 
3
3
  import SiteLayout from '../components/SiteLayout.ts'
4
- import Welcome from '../components/Welcome/Welcome.ts'
4
+ import Welcome from '../components/Welcome.ts'
5
5
 
6
6
  export default defineEntry(() => SiteLayout(Welcome()))
@@ -1,4 +1,4 @@
1
- section.welcome {
1
+ #welcome {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -11,13 +11,6 @@ section.welcome {
11
11
  padding-bottom: 10vh;
12
12
  margin-bottom: 0;
13
13
 
14
- color: #333;
15
- font-size: 15px;
16
-
17
- a {
18
- color: dodgerblue;
19
- }
20
-
21
14
  div {
22
15
  > h1 {
23
16
  display: flex;
@@ -35,8 +28,6 @@ section.welcome {
35
28
  }
36
29
 
37
30
  ol {
38
- font-family: monospace;
39
-
40
31
  margin-top: 2rem;
41
32
  padding-left: 1.2rem;
42
33
 
@@ -45,11 +36,5 @@ section.welcome {
45
36
  margin-bottom: 0.25rem;
46
37
  }
47
38
  }
48
-
49
- code {
50
- background-color: #eeeeee;
51
- padding: 0.375rem;
52
- border-radius: 4px;
53
- }
54
39
  }
55
40
  }
@@ -1,3 +1,37 @@
1
+ @import './css/Welcome.css';
2
+
1
3
  body {
2
4
  margin: 0;
3
- }
5
+
6
+ font-family: monospace;
7
+ font-size: 15px;
8
+ color: #333;
9
+
10
+ text-rendering: geometricPrecision;
11
+ }
12
+
13
+ a {
14
+ color: dodgerblue;
15
+ }
16
+
17
+ code {
18
+ background-color: #eee;
19
+
20
+ padding: 0.255rem 0.375rem;
21
+ border-radius: 5px;
22
+ }
23
+
24
+ @media (prefers-color-scheme: dark) {
25
+ body {
26
+ background: #222;
27
+ color: #eee;
28
+ }
29
+
30
+ a {
31
+ color: lightskyblue;
32
+ }
33
+
34
+ code {
35
+ background-color: #555;
36
+ }
37
+ }
@@ -1,9 +1,8 @@
1
1
  // client side script
2
2
  const eventSource = new EventSource('http://localhost:5432')
3
- eventSource.onmessage = () => {
4
- setTimeout(() => {
5
- window.location.reload()
6
- }, 1000)
3
+ eventSource.onmessage = ({ data }) => {
4
+ const delay = data.split(' - ').at(-1) === 'true'
5
+ setTimeout(() => window.location.reload(), delay ? 0 : 1000)
7
6
  }
8
7
 
9
8
  console.log(