-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add instructions, make some style tweaks
- Loading branch information
1 parent
321a6eb
commit a1eb420
Showing
9 changed files
with
114 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
// since there's no dynamic data here, we can prerender | ||
// it so that it gets served as a static asset in production | ||
export const prerender = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/create-svelte/templates/default/src/routes/about/+page.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { dev } from '$app/environment'; | ||
|
||
// we don't need any JS on this page, though we'll load | ||
// it in dev so that we get hot module replacement... | ||
// it in dev so that we get hot module replacement | ||
export const csr = dev; | ||
|
||
// since there's no dynamic data here, we can prerender | ||
// it so that it gets served as a static asset in prod | ||
// it so that it gets served as a static asset in production | ||
export const prerender = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 88 additions & 2 deletions
90
packages/create-svelte/templates/default/src/routes/sverdle/how-to-play/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,89 @@ | ||
<h1>How to play Sverdle</h1> | ||
<div class="text-column"> | ||
<h1>How to play Sverdle</h1> | ||
|
||
<p>err.... TODO. sorry, been busy</p> | ||
<p> | ||
Sverdle is a clone of <a href="https://www.nytimes.com/games/wordle/index.html">Wordle</a>, the | ||
word guessing game. To play, enter a five-letter English word. For example: | ||
</p> | ||
|
||
<div class="example"> | ||
<span class="close">r</span> | ||
<span class="missing">i</span> | ||
<span class="close">t</span> | ||
<span class="missing">z</span> | ||
<span class="exact">y</span> | ||
</div> | ||
|
||
<p> | ||
The <span class="exact">y</span> is in the right place. <span class="close">r</span> and | ||
<span class="close">t</span> | ||
are the right letters, but in the wrong place. The other letters are wrong, and can be discarded. | ||
Let's make another guess: | ||
</p> | ||
|
||
<div class="example"> | ||
<span class="exact">p</span> | ||
<span class="exact">a</span> | ||
<span class="exact">r</span> | ||
<span class="exact">t</span> | ||
<span class="exact">y</span> | ||
</div> | ||
|
||
<p>This time we guessed right! You have <strong>six</strong> guesses to get the word.</p> | ||
|
||
<p> | ||
Unlike the original Wordle, Sverdle runs on the server instead of in the browser, making it | ||
impossible to cheat. You can even play with JavaScript disabled. | ||
</p> | ||
</div> | ||
|
||
<style> | ||
span { | ||
display: inline-flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-size: 0.8em; | ||
width: 2.4em; | ||
height: 2.4em; | ||
background-color: white; | ||
box-sizing: border-box; | ||
border-radius: 2px; | ||
border-width: 2px; | ||
color: rgba(0, 0, 0, 0.7); | ||
} | ||
.missing { | ||
background: rgba(255, 255, 255, 0.5); | ||
color: rgba(0, 0, 0, 0.5); | ||
} | ||
.close { | ||
border-style: solid; | ||
border-color: var(--color-theme-2); | ||
} | ||
.exact { | ||
background: var(--color-theme-2); | ||
color: white; | ||
} | ||
.example { | ||
display: flex; | ||
justify-content: start; | ||
margin: 1rem 0; | ||
gap: 0.2rem; | ||
} | ||
.example span { | ||
font-size: 1.4rem; | ||
} | ||
p span { | ||
position: relative; | ||
border-width: 1px; | ||
border-radius: 1px; | ||
font-size: 0.4em; | ||
transform: scale(2) translate(0, -10%); | ||
margin: 0 1em; | ||
} | ||
</style> |
9 changes: 9 additions & 0 deletions
9
packages/create-svelte/templates/default/src/routes/sverdle/how-to-play/+page.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { dev } from '$app/environment'; | ||
|
||
// we don't need any JS on this page, though we'll load | ||
// it in dev so that we get hot module replacement | ||
export const csr = dev; | ||
|
||
// since there's no dynamic data here, we can prerender | ||
// it so that it gets served as a static asset in production | ||
export const prerender = true; |