Compare commits

..

1 commit

Author SHA1 Message Date
b061aebae5
feat: read version number from composer.json
this enables any cached css files to automatically to be discarded on release of a new version.

Signed-off-by: Zoë <code@moiety.me>
2025-05-05 22:40:46 +02:00
4 changed files with 39 additions and 71 deletions

View file

@ -3,12 +3,6 @@ section.index-search {
background: var(--white); background: var(--white);
} }
/* TODO: move to a global file? its not only for forms. */
section.index-search :focus-visible {
outline: 2px solid var(--white);
outline-offset: -4px;
}
section.start a.search-link { section.start a.search-link {
color: var(--highlight); color: var(--highlight);
font-size: 2.5em; font-size: 2.5em;
@ -18,57 +12,36 @@ section.start a.search-link {
} }
form.index-search-form { form.index-search-form {
display: grid;
grid-template-columns: auto max-content;
gap: 15px;
width: 80%; width: 80%;
max-width: 1000px; max-width: 1000px;
margin: 0 auto; margin: 0 auto;
padding: 30px 0; padding: 30px 0;
} }
form.index-search-form > input,
form.index-search-form > button {
display: block;
margin: 0;
width: 100%;
height: 60px;
box-sizing: border-box;
}
form.index-search-form > input:focus {
color: var(--white);
}
form.index-search-form > input[type="text"] { form.index-search-form > input[type="text"] {
width: 88%;
height: 50px;
font: 44px var(--base-type); font: 44px var(--base-type);
} }
form.index-search-form > input[type="hidden"] {
/* This removes it from the grid calculations */
position: absolute;
}
form.index-search-form > button { form.index-search-form > button {
display: grid; height: 60px;
grid-template-columns: auto;
align-items: center;
padding: 0;
width: 60px; width: 60px;
text-transform: uppercase; position: relative;
top: 9px;
right: 0;
} }
form.index-search-form > button > svg { form.index-search-form > button > img#search-icon {
justify-self: center; float: none;
width: 48px;
height: 48px;
} }
form.index-search-form > button > span { form.index-search-form > button > label {
display: none;
margin-top: 3px;
font-weight: 500; font-weight: 500;
top: 15px;
position: relative;
font-size: 1.5em; font-size: 1.5em;
display: none;
} }
::placeholder { ::placeholder {
@ -108,34 +81,37 @@ table.index-meta td {
@media only screen and (max-width: 800px) { @media only screen and (max-width: 800px) {
form.index-search-form > input[type="text"] { form.index-search-form > input[type="text"] {
width: 85%;
height: 50px;
font: 34px var(--base-type); font: 34px var(--base-type);
} }
} }
@media only screen and (max-width: 650px) { @media only screen and (max-width: 650px) {
form.index-search-form > input[type="text"] { form.index-search-form > input[type="text"] {
width: 80%;
height: 50px;
font: 34px var(--base-type); font: 34px var(--base-type);
} }
} }
@media only screen and (max-width: 480px) { @media only screen and (max-width: 480px) {
form.index-search-form {
grid-template-columns: auto;
}
form.index-search-form > input[type="text"] { form.index-search-form > input[type="text"] {
width: 99%;
height: 50px;
font: 27px var(--base-type); font: 27px var(--base-type);
} }
form.index-search-form > input[type="text"],
form.index-search-form > button { form.index-search-form > button {
width: 100%; width: 99%;
top: 15px;
} }
form.index-search-form > button { form.index-search-form > button > label {
grid-template-columns: auto 60px; display: inline;
} }
form.index-search-form > button span { form.index-search-form > button > img#search-icon {
display: block; float: right;
} }
} }

View file

@ -8,25 +8,16 @@ input[type="text"] {
display: inline-block; display: inline-block;
background: var(--white); background: var(--white);
color: var(--primary); color: var(--primary);
transition: 0.2s linear; transition: all 0.2s linear;
transition-property: color, background-color;
height: 30px; height: 30px;
} }
input[type="text"]:focus, input[type="text"]:focus,
input[type="password"]:focus { input[type="password"]:focus {
outline: solid var(--highlight);
background-color: var(--highlight); background-color: var(--highlight);
} }
/* TODO: generalise this a bit */
button:focus,
input[type="submit"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
outline: 2px solid var(--white);
outline-offset: -4px;
}
textarea { textarea {
border: 0; border: 0;
border-radius: 3px; border-radius: 3px;
@ -43,8 +34,7 @@ input[type="submit"] {
position: relative; position: relative;
cursor: pointer; cursor: pointer;
border: 0; border: 0;
transition: 0.3s linear; transition: all 0.3s linear;
transition-property: color, background-color;
height: 35px; height: 35px;
margin-top: 15px; margin-top: 15px;
} }

View file

@ -1,4 +1,8 @@
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" id="search"> <?xml version="1.0" encoding="UTF-8"?>
<path fill="none" stroke="currentcolor" stroke-width="8.777778" stroke-linecap="round" stroke-linejoin="round" d="M 11 41.722221 C 11 58.68964 24.754808 72.444443 41.722221 72.444443 C 58.68964 72.444443 72.444443 58.68964 72.444443 41.722221 C 72.444443 24.754807 58.68964 11 41.722221 11 C 24.754808 11 11 24.754807 11 41.722221"/> <!-- Generated by Pixelmator Pro 3.3.8 -->
<path fill="none" stroke="currentcolor" stroke-width="8.777778" stroke-linecap="round" stroke-linejoin="round" d="M 90 90 L 63.666668 63.666668"/> <svg width="101" height="100" viewBox="0 0 101 100" xmlns="http://www.w3.org/2000/svg">
<g id="Group-copy">
<path id="Path-copy-2" fill="none" stroke="#efebe3" stroke-width="8.777778" stroke-linecap="round" stroke-linejoin="round" d="M 11 41.722221 C 11 58.68964 24.754808 72.444443 41.722221 72.444443 C 58.68964 72.444443 72.444443 58.68964 72.444443 41.722221 C 72.444443 24.754807 58.68964 11 41.722221 11 C 24.754808 11 11 24.754807 11 41.722221"/>
<path id="Path-copy" fill="none" stroke="#efebe3" stroke-width="8.777778" stroke-linecap="round" stroke-linejoin="round" d="M 90 90 L 63.666668 63.666668"/>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 729 B

View file

@ -5,11 +5,9 @@
<section class="index-search"> <section class="index-search">
<form class="index-search-form" action="/search" method="post" enctype="multipart/form-data"> <form class="index-search-form" action="/search" method="post" enctype="multipart/form-data">
<input type="text" name="index_search" value="" placeholder="Hi! This is where you search." /> <input type="text" name="index_search" value="" placeholder="Hi! This is where you search." />
<button aria-labelledby="search-label"> <button aria-label="search-button">
<span id="search-label">Look for it</span> <label id="search-label">LOOK FOR IT</label>
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="trye"> <img id="search-icon" class="button-icon" src="assets/images/global/icon-search.svg" />
<use href="assets/images/global/icon-search.svg#search" />
</svg>
</button> </button>
@csrf @csrf
</form> </form>