File tree 5 files changed +58
-57
lines changed
5 files changed +58
-57
lines changed Original file line number Diff line number Diff line change 2
2
layout: skeleton
3
3
---
4
4
5
- {% from ' nav.njk' import nav_link with context %}
6
- {% set nav %}
7
- {{ nav_link (' /' , false ) }}
8
- {{ nav_link (' /foundations' ) }}
9
- {{ nav_link (' /components' ) }}
10
- {{ nav_link (' /usage' ) }}
11
- {% endset %}
5
+ {% from ' macros.njk' import nav_link with context %}
6
+ {% set nav %}{% include ' nav.njk' %}{% endset %}
12
7
13
8
{% set toc = content | toc %}
14
9
@@ -23,12 +18,12 @@ layout: skeleton
23
18
<div class =" z-50 pointer-events-none responsive-container fixed h-full top-0 left-0 right-0 opacity-10" >
24
19
<div class =" responsive-grid grid md:hidden h-full" >
25
20
{% for i in range (0, 6) %}
26
- <div style =" background-color : ' #FF0000' " ></div >
21
+ <div style =" background-color : #FF0000 " ></div >
27
22
{% endfor %}
28
23
</div >
29
24
<div class =" responsive-grid hidden md:grid h-full" >
30
25
{% for i in range (0, 12) %}
31
- <div style =" background-color : ' #FF0000' " ></div >
26
+ <div style =" background-color : #FF0000 " ></div >
32
27
{% endfor %}
33
28
</div >
34
29
</div >
Original file line number Diff line number Diff line change
1
+ {% macro nav_link (url , deep = true ) %}
2
+ {% set node = url | node (collections .all ) %}
3
+ {% set children = node .data .page | children (collections .all ) %}
4
+ <div class =" mb-20" >
5
+ <a
6
+ class =" flex justify-center title-xs no-underline mb-20"
7
+ href =" {{ url }}"
8
+ {% if node.data.page.url === page.url %}
9
+ aria-current =" page"
10
+ {% endif %}
11
+ >
12
+ <div class =" flex-auto" >{{ node .data .title }} </div >
13
+ <div >
14
+ {% if deep and children .length %}
15
+ <sfgov-icon symbol =" chevron-down" role =" img" aria-label =" arrow pointing down" ></sfgov-icon >
16
+ {% endif %}
17
+ </div >
18
+ </a >
19
+ {% if deep %}
20
+ {% if url == = ' /' %}
21
+ {% set parent_active = page .url == = url %}
22
+ {% else %}
23
+ {% set parent_active = page .url .startsWith (url ) %}
24
+ {% endif %}
25
+ {% if parent_active %}
26
+ <ul class =" m-0 p-0 list-none" >
27
+ {% for child in children %}
28
+ {% set child_active = child .url == = page .url %}
29
+ <li class =" pl-16 m-0 mb-20 {{ 'bg-slate-2 rounded-4' if child_active }}" >
30
+ <a
31
+ href =" {{ child.url }}"
32
+ {% if child_active %}
33
+ aria-current =" page"
34
+ {% endif %}
35
+ class =" block no-underline {{ 'text-white' if child_active else 'text-slate-4' }}"
36
+ >
37
+ {{ child .data .title }}
38
+ </a >
39
+ </li >
40
+ {% endfor %}
41
+ </ul >
42
+ {% endif %}
43
+ {% endif %}
44
+ </div >
45
+ {% endmacro %}
46
+
1
47
{% macro swatch (color , width , height ) %}
2
48
<div class =" mr-20 mb-20" >
3
49
<h4 class =" title-xs mt-0 mb-4" >
Original file line number Diff line number Diff line change 1
- {% macro nav_link (url , deep = true ) %}
2
- {% set node = url | node (collections .all ) %}
3
- {% set children = node .data .page | children (collections .all ) %}
4
- <div class =" mb-20" >
5
- <a
6
- class =" flex justify-center title-xs no-underline mb-20"
7
- href =" {{ url }}"
8
- {% if node.data.page.url === page.url %}
9
- aria-current =" page"
10
- {% endif %}
11
- >
12
- <div class =" flex-auto" >{{ node .data .title }} </div >
13
- <div >
14
- {% if deep and children .length %}
15
- <sfgov-icon symbol =" chevron-down" role =" img" aria-label =" arrow pointing down" ></sfgov-icon >
16
- {% endif %}
17
- </div >
18
- </a >
19
- {% if deep %}
20
- {% if url == = ' /' %}
21
- {% set parent_active = page .url == = url %}
22
- {% else %}
23
- {% set parent_active = page .url .startsWith (url ) %}
24
- {% endif %}
25
- {% if parent_active %}
26
- <ul class =" m-0 p-0 list-none" >
27
- {% for child in children %}
28
- {% set child_active = child .url == = page .url %}
29
- <li class =" pl-16 m-0 mb-20 {{ 'bg-slate-2 rounded-4' if child_active }}" >
30
- <a
31
- href =" {{ child.url }}"
32
- {% if child_active %}
33
- aria-current =" page"
34
- {% endif %}
35
- class =" block no-underline {{ 'text-white' if child_active else 'text-slate-4' }}"
36
- >
37
- {{ child .data .title }}
38
- </a >
39
- </li >
40
- {% endfor %}
41
- </ul >
42
- {% endif %}
43
- {% endif %}
44
- </div >
45
- {% endmacro %}
1
+ {{ nav_link (' /' , false ) }}
2
+ {{ nav_link (' /foundations' ) }}
3
+ {{ nav_link (' /components' ) }}
4
+ {{ nav_link (' /resources' ) }}
5
+ {{ nav_link (' /usage' ) }}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " sfgov-design-system" ,
3
- "version" : " 2.2.0 " ,
3
+ "version" : " 2.2.1 " ,
4
4
"repository" : " SFDigitalServices/design-system" ,
5
5
"author" : " City & County of San Francisco, California" ,
6
6
"license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments