Skip to content

Commit 7d4a19c

Browse files
authored
Merge pull request #133 from gtrivedi88/docs/full-ui
Overhaul Antora UI to match Konflux docs
2 parents 7faa370 + 4c2c801 commit 7d4a19c

11 files changed

Lines changed: 121 additions & 30 deletions

File tree

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ jobs:
3535
with:
3636
node-version: '20'
3737

38-
- name: Install Antora
39-
run: npm i -g @antora/cli@3.1 @antora/site-generator@3.1
38+
- name: Install Antora and extensions
39+
run: npm i -g @antora/cli@3.1 @antora/site-generator@3.1 @antora/lunr-extension@1.0.0-alpha.13
4040

4141
- name: Build site
42-
run: antora --fetch antora-playbook.yml
42+
run: SITE_SEARCH_PROVIDER=lunr antora --fetch antora-playbook.yml
4343

4444
- name: Disable Jekyll
4545
run: touch build/site/.nojekyll

antora-playbook.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@ ui:
1414
snapshot: true
1515
supplemental_files: docs/supplemental-ui
1616

17+
antora:
18+
extensions:
19+
- '@antora/lunr-extension'
20+
1721
output:
1822
dir: build/site

docs/antora.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ asciidoc:
1212
idseparator: '-'
1313
idprefix: ''
1414
experimental: ''
15+
pagination: ''
1516
# Product attributes
1617
TSFName: 'Trusted Software Factory'
1718
TSFShortName: 'TSF'

docs/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "tsf-docs",
3+
"private": true,
4+
"devDependencies": {
5+
"@antora/lunr-extension": "^1.0.0-alpha.13",
6+
"antora": "^3.1.14"
7+
},
8+
"scripts": {
9+
"build": "antora generate --clean --fetch ../antora-playbook.yml"
10+
}
11+
}

docs/supplemental-ui/css/extra.css

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/supplemental-ui/css/main.css

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.navbar .button {
2+
display: inline-flex;
3+
-webkit-box-align: center;
4+
align-items: center;
5+
background: #fff;
6+
border: 1px solid #e1e1e1;
7+
border-radius: 0.5rem;
8+
height: auto;
9+
font-size: 18px;
10+
color: #222;
11+
padding: 1em;
12+
margin: 0.8em;
13+
white-space: nowrap;
14+
}
15+
16+
.navbar-burger {
17+
margin-left: 0;
18+
}
19+
20+
.nav-list .nav-item.is-current-page {
21+
border-left: 0.5rem solid #c6c6c6;
22+
padding-left: 1rem;
23+
margin-left: -1.5rem;
24+
background-color: #dadada;
25+
}
26+
27+
.nav-container {
28+
width: 17rem;
29+
}
30+
31+
.nav-container .nav {
32+
background-color: #eee;
33+
}
34+
35+
.doc .title {
36+
font-weight: bold;
37+
color: #3a415f;
38+
}
39+
40+
.doc .admonitionblock .icon {
41+
border-radius: 1rem;
42+
}
43+
44+
.navbar-brand .navbar-item:first-child a {
45+
margin-top: 5px;
46+
}
47+
48+
.pagination {
49+
display: flex;
50+
justify-content: space-between;
51+
padding: 1rem 0;
52+
margin-top: 2rem;
53+
border-top: 1px solid #e1e1e1;
54+
}
55+
56+
.pagination .prev a,
57+
.pagination .next a {
58+
color: #1565c0;
59+
text-decoration: none;
60+
}
61+
62+
.pagination .prev a:hover,
63+
.pagination .next a:hover {
64+
text-decoration: underline;
65+
}
66+
67+
.pagination .next {
68+
margin-left: auto;
69+
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
1+
<footer class="footer" style="text-align: center;">
2+
<a href="https://github.com/redhat-appstudio/tsf-cli" target="_blank">Source on GitHub</a>
3+
| <a href="https://github.com/redhat-appstudio/tsf-cli/issues/new?title=%5BDOCS%5D+&labels=documentation" target="_blank">Raise an issue</a>
4+
</footer>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<link rel="stylesheet" href="{{uiRootPath}}/css/site.css">
2-
<link rel="stylesheet" href="{{uiRootPath}}/css/extra.css">
1+
<link rel="stylesheet" href="{{{uiRootPath}}}/css/site.css">
2+
<link rel="stylesheet" href="{{{uiRootPath}}}/css/main.css">

docs/supplemental-ui/partials/header-content.hbs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
<header class="header" role="banner">
22
<nav class="navbar">
33
<div class="navbar-brand">
4-
<a class="navbar-item" href="{{or siteRootPath (or site.url siteRootPath)}}">{{site.title}}</a>
4+
<div class="navbar-item">
5+
<button class="navbar-burger" data-target="topbar-nav">
6+
<span></span>
7+
<span></span>
8+
<span></span>
9+
</button>
10+
<a href="{{site.url}}/">{{site.title}}</a>
11+
</div>
512
</div>
6-
<div class="navbar-menu">
13+
<div id="topbar-nav" class="navbar-menu">
714
<div class="navbar-end">
8-
<div class="navbar-item">
9-
<a class="button" href="https://github.com/redhat-appstudio/tsf-cli/issues/new?title=%5BDOCS%5D+&labels=documentation">Raise an issue</a>
15+
<div class="button"><a href="https://github.com/redhat-appstudio/tsf-cli" target="_blank">Home</a></div>
16+
<div class="button"><a href="https://github.com/redhat-appstudio/tsf-cli/issues/new?title=%5BDOCS%5D+&labels=documentation&body=Page:%20{{{page.url}}}" target="_blank">Raise an issue</a></div>
17+
{{#if env.SITE_SEARCH_PROVIDER}}
18+
<div class="navbar-item search hide-for-print">
19+
<div id="search-field" class="field">
20+
<input id="search-input" type="text" placeholder="Search the docs"{{#if page.home}} autofocus{{/if}}>
21+
</div>
1022
</div>
23+
{{/if}}
1124
</div>
1225
</div>
1326
</nav>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{#if (or page.previous page.next)}}
2+
<nav class="pagination">
3+
{{#with page.previous}}
4+
<span class="prev"><a href="{{{relativize ./url}}}">&#8249; Prev: {{{./content}}}</a></span>
5+
{{/with}}
6+
{{#with page.next}}
7+
<span class="next"><a href="{{{relativize ./url}}}">Next: {{{./content}}} &#8250;</a></span>
8+
{{/with}}
9+
</nav>
10+
{{/if}}

0 commit comments

Comments
 (0)