Skip to content

Commit a33be1a

Browse files
committed
split up css file + move njks to pages folder
1 parent dc89ee0 commit a33be1a

File tree

11 files changed

+120
-98
lines changed

11 files changed

+120
-98
lines changed

eleventy.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function (eleventyConfig) {
55
eleventyConfig.setUseGitIgnore(false);
66

77
// Copy over static resources.
8-
eleventyConfig.addPassthroughCopy("src/style.css");
8+
eleventyConfig.addPassthroughCopy("src/css");
99

1010
// Directory configurations and template engines.
1111
return {

src/_includes/layout.njk

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
<meta charset="utf-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<title>{{ title }}</title>
9-
<link rel="stylesheet" href="/style.css">
9+
10+
<link rel="stylesheet" href="/css/base.css">
11+
<link rel="stylesheet" href="/css/components.css">
12+
{% if extra_css %}
13+
{% for sheet in extra_css %}
14+
<link rel="stylesheet" href="/css/{{ sheet }}.css">
15+
{% endfor %}
16+
{% endif %}
1017
</head>
1118
<body>
1219
{{ content | safe }}

src/css/base.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
body {
2+
font-family: system-ui, sans-serif;
3+
line-height: 1.5;
4+
margin: 2rem auto;
5+
max-width: 900px;
6+
padding: 0 1rem;
7+
}
8+
9+
ul {
10+
list-style: none;
11+
padding: 0;
12+
}
13+
14+
li {
15+
margin: 6px 0;
16+
}
17+
18+
a {
19+
text-decoration: none;
20+
color: #0366d6;
21+
}
22+
23+
a:hover {
24+
text-decoration: underline;
25+
}
26+
27+
small {
28+
color: #555;
29+
margin-left: 8px;
30+
}

src/css/components.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.primary-callout {
2+
background: #f1f8ff;
3+
border-left: 4px solid #0366d6;
4+
padding: 12px;
5+
margin: 1rem 0;
6+
}
7+
8+
.secondary-callout {
9+
margin-top: 2rem;
10+
}
11+
12+
.extension-description {
13+
margin: 4px 0 0;
14+
color: #586069;
15+
font-size: 0.9rem;
16+
}
17+
18+
.base-width {
19+
display: inline-block;
20+
color: white;
21+
background: #6699d6;
22+
border-radius: 6px;
23+
font-size: 80%;
24+
font-weight: bold;
25+
padding: 1px 3px;
26+
margin-left: 3px;
27+
}

src/css/instruction.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.bitfield-diagram {
2+
border: 1px solid #ddd;
3+
border-radius: 8px;
4+
padding: 0.75rem;
5+
margin-top: 0.5rem;
6+
background: #fafafa;
7+
}
8+
9+
.bits {
10+
margin-top: 0.5rem;
11+
color: #333;
12+
}
13+
14+
svg text {
15+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
16+
}

src/css/search.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#extension-filters-fieldset {
2+
margin: 1rem 0;
3+
padding: 0.75rem 1rem;
4+
border: 1px solid #d0d7de;
5+
border-radius: 6px;
6+
}
7+
8+
#extension-filters-fieldset legend {
9+
font-weight: 600;
10+
font-size: 0.95rem;
11+
padding: 0 6px;
12+
}
13+
14+
.filter-options {
15+
display: flex;
16+
flex-wrap: wrap;
17+
gap: 0.5rem 1rem;
18+
margin-top: 0.5rem;
19+
align-items: center;
20+
}
21+
22+
.filter-option {
23+
display: inline-flex;
24+
align-items: center;
25+
gap: 0.4rem;
26+
font-size: 0.95rem;
27+
white-space: nowrap;
28+
}
29+
30+
.filter-option input {
31+
width: 16px;
32+
height: 16px;
33+
}

src/index.njk renamed to src/pages/index.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: RISC-V Instruction Extensions
3+
permalink: index.html
34
layout: layout.njk
45
---
56
<h1>The Best RISC-V Instruction Set Reference Manual</h1>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ permalink: instructions/{{ inst.name }}/index.html
77
eleventyComputed:
88
title: "{{ inst.name }}"
99
layout: layout.njk
10+
extra_css:
11+
- instructions
1012
---
1113
<h1>{{ inst.name }}</h1>
1214

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Instruction Search
33
permalink: search/index.html
44
layout: layout.njk
5+
extra_css:
6+
- search
57
---
68
<h1>Instruction Search</h1>
79

0 commit comments

Comments
 (0)