🏑🕶 Checkpoint
./public/style.css:1062301/510 ./src/pages/index.hbs:1062301/1244
This commit is contained in:
1 parent
6f8e0f980b
commit
409d3d7bf9
2 files changed
+20
-13
No files matched your search
+8
-1
@@ -137,8 +137,15 @@ body {
|
|||||||
margin-top: var(--image-margin);
|
margin-top: var(--image-margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* our custom color indicator */
|
/* Styles for our custom color form and its results */
|
||||||
.color-info {
|
.color-info {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
|
form {
|
||||||
|
margin: 0.75rem 0;
|
||||||
|
}
|
||||||
|
button, input {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
+12
-12
@@ -39,27 +39,27 @@
|
|||||||
<!-- this is the start of content for our page -->
|
<!-- this is the start of content for our page -->
|
||||||
<h1 class="title">Hello Node!</h1>
|
<h1 class="title">Hello Node!</h1>
|
||||||
|
|
||||||
<!-- add text indicating that we've changed color OR had an error -->
|
<div class="color-form">
|
||||||
{{#if color}}
|
<!-- add text indicating that we've changed color OR had an error -->
|
||||||
<div class="color-info">Now available in <b>{{color}}</b>!</div>
|
{{#if color}}
|
||||||
{{/if}}
|
<div class="color-info">Now available in <b>{{color}}</b>!</div>
|
||||||
{{#if colorError}}
|
{{/if}}
|
||||||
<div class="color-info">Hmm. Couldn't find <b>"{{colorError}}"</b>. <a href="?randomize=go">Try a random color?</a></div>
|
{{#if colorError}}
|
||||||
{{/if}}
|
<div class="color-info">Hmm. Couldn't find <b>"{{colorError}}"</b>. <a href="?randomize=go">Try a random color?</a></div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div>
|
<!-- the "what's your favorite color?" form sends a POST to the server, check server.js to see how it works -->
|
||||||
<!-- the "what's your favorite color?" form -->
|
|
||||||
<form class="color-search" method="post">
|
<form class="color-search" method="post">
|
||||||
<label for="color">
|
<label for="color">
|
||||||
What's your favorite color?
|
What's your favorite color?<br>
|
||||||
<input id="color" name="color" required="required" type="text">
|
<input id="color" name="color" required="required" type="text">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- this randomize link communicates with the server using a querystring instead of a form post -->
|
<!-- this randomize link communicates with the server (server.js) using a querystring and GET request instead of a form POST -->
|
||||||
<a href="?randomize=go">Pick a random color for me</a>
|
Can't decide? <a href="?randomize=go">Use a random color!</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
|
|||||||
Reference in new issue
Block a user