File tree 6 files changed +41
-18
lines changed 6 files changed +41
-18
lines changed Original file line number Diff line number Diff line change 34
34
< iframe
35
35
width ="100% "
36
36
height ="100% "
37
- src ="/spec/1.0 ">
37
+ src ="/spec/1.0?hidenav=true ">
38
38
</ iframe >
39
39
</ node >
40
40
Original file line number Diff line number Diff line change 3
3
{% include head.html %}
4
4
< body >
5
5
6
- < nav >
7
- < a href ="/ "> < img width ="120 " height ="44 " src ="/logo.svg " alt ="JSON Feed " /> </ a >
8
- </ nav >
9
-
10
- < hr >
6
+ {% include nav.html %}
11
7
12
8
< div class ="page ">
13
9
{{ content }}
14
10
</ div >
15
11
16
12
< script >
13
+ document . addEventListener ( "DOMContentLoaded" , function ( ) {
14
+ const urlParams = new URLSearchParams ( window . location . search ) ;
15
+ const hideNav = urlParams . get ( 'hidenav' ) ;
16
+ if ( hideNav === 'true' ) {
17
+ document . body . classList . add ( 'hidenav' ) ;
18
+ }
19
+ } ) ;
20
+ </ script >
21
+ < script >
17
22
document . addEventListener ( 'DOMContentLoaded' , function ( ) {
18
23
const links = document . querySelectorAll ( 'a' ) ;
19
24
links . forEach ( link => {
Original file line number Diff line number Diff line change
1
+ < div id ="navbar ">
2
+ < nav >
3
+ < a href ="/ " id ="logo "> < img width ="120 " height ="44 " src ="/logo.svg " alt ="JSON Feed " /> </ a >
4
+ < a href ="/spec/1.0 " class ="link "> Spec</ a >
5
+ < a href ="/docs/apps " class ="link "> Apps</ a >
6
+ < a href ="https://github.com/obsidianmd/jsoncanvas " class ="link "> GitHub</ a >
7
+ </ nav >
8
+
9
+ < hr >
10
+ </ div >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ defaults:
24
24
- scope :
25
25
path : " spec/**/*.md"
26
26
values :
27
- layout : " node "
27
+ layout : " docs "
28
28
- scope :
29
29
path : " docs/**/*.md"
30
30
values :
Original file line number Diff line number Diff line change @@ -208,6 +208,25 @@ nav {
208
208
padding : 24px 36px ;
209
209
max-width : 48em ;
210
210
margin : 0 auto;
211
+ display : flex;
212
+ align-items : center;
213
+ gap : 4px ;
214
+ }
215
+ nav # logo {
216
+ flex-grow : 1 ;
217
+ }
218
+ nav .link {
219
+ color : var (--color-ax-1 );
220
+ text-decoration : none;
221
+ padding : 0.25em 0.5em ;
222
+ border-radius : 6px ;
223
+ }
224
+ nav .link : hover {
225
+ color : var (--color-bg-1 );
226
+ background-color : var (--color-ax-1 );
227
+ }
228
+ .hidenav # navbar {
229
+ display : none;
211
230
}
212
231
213
232
/* Specific nodes */
You can’t perform that action at this time.
0 commit comments