-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.njk
More file actions
111 lines (108 loc) · 4.62 KB
/
template.njk
File metadata and controls
111 lines (108 loc) · 4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{% if options.css %}
{% for cssFile in css %}
<link rel="stylesheet" href="{{ cssFile }}"/>
{% endfor %}
{% endif %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.1/themes/prism.min.css">
<div class="margin-top-md">
<div id="colors" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Colors</div>
<div class="flex-row flex-wrap">
{% for hex, color in colors %}
<div class="flex-3">
<div style="width: 100%; position: relative; background-color: {{color.backgroundColor}}; color: {{color.textColor}};" class="padding-yaxis-md padding-xaxis-xs margin-right-sm border-all text-center margin-bottom-sm">
<strong class="display-block">Variables:</strong>
{% set classes = [] %}
<code>{% for name in color.names %}
{{ name }}{% if not loop.last %},{% endif %}
{% if name.indexOf('background-text') !== -1 %}
{% set className = name | replace('background-text-', '.bg-') %}
{% set classes = (classes.push(className), classes) %}
{% elif name.indexOf('background') !== -1 %}
{% set className = name | replace('background-', '.bg-') %}
{% set classes = (classes.push(className), classes) %}
{% endif %}
{% if name.indexOf('text-color-') !== -1 %}
{% set className = name | replace('text-color-', '.color-') %}
{% set classes = (classes.push(className), classes) %}
{% endif %}
{% endfor %}</code>
{% if classes.length %}
<strong class="display-block margin-top-xs">Classes:</strong>
<code>{{ classes | join(",") }}</code>
{% endif %}
<span class="color-light" style="position: absolute; right: 0; top: 0; background: #000; padding: 2px 5px;">
<code>{{ color.backgroundColor }}</code>
</span>
</div>
</div>
{% endfor %}
</div>
</div>
<div id="fonts" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Fonts</div>
<h1 class="heading-1">Heading 1</h1>
<h2 class="heading-2">Heading 2</h2>
<h3 class="heading-3">Heading 3</h3>
<h4 class="heading-4">Heading 4</h4>
<h5 class="heading-5">Heading 5</h5>
<h6 class="heading-6">Heading 6</h6>
<p class="font-large">Large Font</p>
<p>Body Font</p>
<p class="font-small">Small Font</p>
</div>
<div id="buttons" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Buttons</div>
<button class="button">Primary Button</button>
<button class="button-secondary">Secondary Button</button>
<button class="button-outline">Outline Button</button>
<button class="button-link">Link button</button>
<button class="button button-lg">Large Button</button>
<button class="button button-sm">Small Button</button>
</div>
<div id="links" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Links</div>
<a href="">Primary Link</a>
</div>
<div id="breakpoints" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Breakpoints</div>
<pre><code class="language-yaml">
{% for key, value in breakpoints -%}
{{key}}: {{value}}
{% endfor %}
</code></pre>
</div>
<div id="spacing" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Spacing</div>
<pre><code class="language-yaml">
{% for key, value in spacing -%}
{{key}}: {{value}}
{% endfor %}
</code></pre>
</div>
<div id="grid" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Grid</div>
<pre><code class="language-yaml">
{% for key, value in grid -%}
{{key}}: {{value}}
{% endfor %}
</code></pre>
</div>
<div id="variables" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Variables</div>
<pre><code class="language-yaml">
{% for key, value in variables -%}
{{key}}: {{value}}
{% endfor %}
</code></pre>
</div>
<div id="config" class="container">
<div class="heading-2 border-bottom margin-bottom-md margin-top-lg">Config</div>
<pre><code class="language-json">
{{configString}}
</code></pre>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.1/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.1/components/prism-json.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.8.1/components/prism-yaml.min.js"></script>