Skip to content

Commit b5944f5

Browse files
Add site navigation menu with board and GitHub links.
Configure navigation in _config.yml, render it in the header, and style it to match the Cayman theme. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c2b7890 commit b5944f5

4 files changed

Lines changed: 86 additions & 8 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Helping you focus on results instead of compiling and maintaining. OpenSolvers p
33
Currently working on several generations of RISC-V cores and validating synthetic performance and real-world applications.
44

55
Learnings from different boards:
6-
- [StarFive VisionFive2](boards/VisionFive2.md)
7-
- [OrangePi RV2](boards/RV2.md)
8-
- [BananaPi F3](boards/F3.md)
6+
- [StarFive VisionFive2](boards/VisionFive2.html)
7+
- [OrangePi RV2](boards/RV2.html)
8+
- [BananaPi F3](boards/F3.html)
99

_config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
11
theme: jekyll-theme-cayman
2+
title: OpenSolvers
3+
description: RISC-V learnings and fun
4+
5+
navigation:
6+
- title: Home
7+
url: /
8+
- title: VisionFive 2
9+
url: /boards/VisionFive2.html
10+
- title: OrangePi RV2
11+
url: /boards/RV2.html
12+
- title: BananaPi F3
13+
url: /boards/F3.html
14+
- title: GitHub
15+
url: https://github.com/opensolvers/opensolvers.github.io
16+
external: true

_includes/header.html

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
<header class="page-header" role="banner">
2-
<h1 class="project-name">OpenSolvers</h1>
3-
<h2 class="project-tagline">RISC-V learnings and fun</h2>
4-
5-
<a href="https://github.com/opensolvers/opensolvers.github.io" class="btn">Find us on GitHub</a>
6-
2+
<h1 class="project-name">{{ site.title | default: "OpenSolvers" }}</h1>
3+
<h2 class="project-tagline">{{ site.description | default: "RISC-V learnings and fun" }}</h2>
4+
5+
<nav class="site-nav" aria-label="Main navigation">
6+
<ul class="site-nav-list">
7+
{% for item in site.navigation %}
8+
<li class="site-nav-item">
9+
<a
10+
href="{% if item.external %}{{ item.url }}{% else %}{{ item.url | relative_url }}{% endif %}"
11+
class="site-nav-link{% if item.external %} site-nav-link--external{% endif %}{% if page.url == item.url %} is-active{% endif %}"
12+
{% if item.external %}target="_blank" rel="noopener noreferrer"{% endif %}
13+
>
14+
{{ item.title }}
15+
</a>
16+
</li>
17+
{% endfor %}
18+
</ul>
19+
</nav>
720
</header>

assets/css/style.scss

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
---
3+
4+
@import "{{ site.theme }}";
5+
6+
.site-nav {
7+
margin-top: 1.25rem;
8+
}
9+
10+
.site-nav-list {
11+
display: flex;
12+
flex-wrap: wrap;
13+
justify-content: center;
14+
gap: 0.5rem 0.75rem;
15+
margin: 0;
16+
padding: 0;
17+
list-style: none;
18+
}
19+
20+
.site-nav-link {
21+
display: inline-block;
22+
padding: 0.35rem 0.9rem;
23+
border: 1px solid rgba(255, 255, 255, 0.35);
24+
border-radius: 0.35rem;
25+
color: rgba(255, 255, 255, 0.92);
26+
font-size: 0.95rem;
27+
font-weight: 600;
28+
text-decoration: none;
29+
transition: background-color 0.15s ease, border-color 0.15s ease;
30+
}
31+
32+
.site-nav-link:hover,
33+
.site-nav-link:focus {
34+
background-color: rgba(255, 255, 255, 0.12);
35+
border-color: rgba(255, 255, 255, 0.65);
36+
color: #fff;
37+
text-decoration: none;
38+
}
39+
40+
.site-nav-link.is-active {
41+
background-color: rgba(255, 255, 255, 0.2);
42+
border-color: #fff;
43+
color: #fff;
44+
}
45+
46+
.site-nav-link--external::after {
47+
content: "";
48+
font-size: 0.8em;
49+
opacity: 0.85;
50+
}

0 commit comments

Comments
 (0)