Skip to content

Commit

Permalink
PERF: Only apply CSS classes to relevant pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhieb committed Jun 6, 2024
1 parent ee85a3b commit 04518d2
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 18 deletions.
3 changes: 3 additions & 0 deletions classes/label.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
label {
font-weight: bold;
}
17 changes: 0 additions & 17 deletions layouts/main/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,10 @@
@import 'components/skip-link/skip-link.css';

/* Global Classes */
@import 'abbreviation.css';
@import 'blockquote.css';
@import 'caption.css';
@import 'code.css';
@import 'cite.css';
@import 'definition.css';
@import 'emphasis.css';
@import 'external-link.css';
@import 'figure.css';
@import 'gloss.css';
@import 'inline-example.css';
@import 'headings.css';
@import 'link.css';
@import 'lists.css';
@import 'pre.css';
@import 'references-list.css';
@import 'table.css';

/* Global Components */
@import 'backlink/backlink.css';
@import 'construction/construction.css';

body {

Expand Down
7 changes: 7 additions & 0 deletions layouts/prose/prose.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
@import 'abbreviation.css';
@import 'backlink/backlink.css';
@import 'cite.css';
@import 'lists.css';
@import 'references-list.css';
@import 'table.css';

.figure {

counter-increment: figures;
Expand Down
3 changes: 3 additions & 0 deletions pages/About/About.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@import 'blockquote.css';
@import 'caption.css';

blockquote p {
margin-inline-start: 1em;
text-indent: -1em;
Expand Down
4 changes: 4 additions & 0 deletions pages/Component/Component.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@import 'code.css';
@import 'construction/construction.css';
@import 'inline-example.css';

.component-page {

& h1 {
Expand Down
4 changes: 4 additions & 0 deletions pages/Components/Components.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@import 'construction/construction.css';
@import 'label.css';
@import 'pre.css';

.components-page {
p {
text-align: center;
Expand Down
19 changes: 18 additions & 1 deletion pages/Components/Components.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
<main class=components-page id=main>

<h1>Search the Database</h1>
<search>
<form method=post>
<label for=search-box>Quick Search</label>
<input
autocomplete=on
autocorrect=off
enterkeyhint=search
id=search-box
inputmode=search
name=q
placeholder='e.g. "atimw-" or "dog"'
spellcheck=false
type=search
>
<button type=submit>Search</button>
<span>Quickly search for a component (in any orthography) or definition.</span>
</form>
</search>

</main>

5 changes: 5 additions & 0 deletions pages/Grammar/Grammar.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
@import 'caption.css';
@import 'definition.css';
@import 'ex-header.css';
@import 'ex-source.css';
@import 'example.css';
@import 'examples.css';
@import 'figure.css';
@import 'gloss.css';
@import 'inline-example.css';
@import 'interlinear.css';

:root {
Expand Down

0 comments on commit 04518d2

Please sign in to comment.