Skip to content

Commit 8616751

Browse files
authored
Updating to use sass modules (#12)
This makes some minor improvements in appearance. It now uses sass modules instead of @import to eliminate warnings. The theme switcher was removed, only the light-theme is supported, and some responsive layout was lost during the transition to modules. Every attempt was made to be backward compatible with any light-theme overrides. However, variables declared in _sass/_overrides.scss are not visible to _sass/_overrides-light.scss. If someone has more sass experience, I'm open to suggestions for improving this.
1 parent 254ac9f commit 8616751

23 files changed

+559
-802
lines changed

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.2
1+
3.3.4

Gemfile.lock

+23-20
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
PATH
22
remote: .
33
specs:
4-
jekyll-theme-adobe-hyde (2.0.1)
4+
jekyll-theme-adobe-hyde (2.0.2)
55
jekyll (~> 4.3)
66
jekyll-seo-tag (~> 2.0)
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
addressable (2.8.5)
12-
public_suffix (>= 2.0.2, < 6.0)
11+
addressable (2.8.7)
12+
public_suffix (>= 2.0.2, < 7.0)
1313
colorator (1.1.0)
14-
concurrent-ruby (1.2.2)
14+
concurrent-ruby (1.3.3)
1515
em-websocket (0.5.3)
1616
eventmachine (>= 0.12.9)
1717
http_parser.rb (~> 0)
1818
eventmachine (1.2.7)
19-
ffi (1.15.5)
19+
ffi (1.17.0-x86_64-darwin)
20+
ffi (1.17.0-x86_64-linux-gnu)
2021
forwardable-extended (2.6.0)
21-
google-protobuf (3.24.3-x86_64-darwin)
22-
google-protobuf (3.24.3-x86_64-linux)
22+
google-protobuf (3.25.4-x86_64-darwin)
23+
google-protobuf (3.25.4-x86_64-linux)
2324
http_parser.rb (0.8.0)
24-
i18n (1.14.1)
25+
i18n (1.14.5)
2526
concurrent-ruby (~> 1.0)
26-
jekyll (4.3.2)
27+
jekyll (4.3.3)
2728
addressable (~> 2.4)
2829
colorator (~> 1.0)
2930
em-websocket (~> 0.5)
@@ -50,27 +51,29 @@ GEM
5051
kramdown-parser-gfm (1.1.0)
5152
kramdown (~> 2.0)
5253
liquid (4.0.4)
53-
listen (3.8.0)
54+
listen (3.9.0)
5455
rb-fsevent (~> 0.10, >= 0.10.3)
5556
rb-inotify (~> 0.9, >= 0.9.10)
5657
mercenary (0.4.0)
5758
pathutil (0.16.2)
5859
forwardable-extended (~> 2.6)
59-
public_suffix (5.0.3)
60+
public_suffix (6.0.1)
6061
rake (12.3.3)
6162
rb-fsevent (0.11.2)
62-
rb-inotify (0.10.1)
63+
rb-inotify (0.11.1)
6364
ffi (~> 1.0)
64-
rexml (3.2.6)
65-
rouge (4.1.3)
65+
rexml (3.3.4)
66+
strscan
67+
rouge (4.3.0)
6668
safe_yaml (1.0.5)
67-
sass-embedded (1.66.1-x86_64-darwin)
68-
google-protobuf (~> 3.23)
69-
sass-embedded (1.66.1-x86_64-linux-gnu)
70-
google-protobuf (~> 3.23)
69+
sass-embedded (1.77.5-x86_64-darwin)
70+
google-protobuf (>= 3.25, < 5.0)
71+
sass-embedded (1.77.5-x86_64-linux-gnu)
72+
google-protobuf (>= 3.25, < 5.0)
73+
strscan (3.1.0)
7174
terminal-table (3.0.2)
7275
unicode-display_width (>= 1.1.1, < 3)
73-
unicode-display_width (2.4.2)
76+
unicode-display_width (2.5.0)
7477
webrick (1.8.1)
7578

7679
PLATFORMS
@@ -84,4 +87,4 @@ DEPENDENCIES
8487
rake (~> 12.0)
8588

8689
BUNDLED WITH
87-
2.4.14
90+
2.5.17

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ The following configuration options can be used in the `_config.yml` file
6666
adobe_hyde:
6767
# The header image to use on the site
6868
header_image: <relative url of image>
69-
# The source url root for the documented code, i.e. `https://github.com/<org>/<repo>/blob/main`
69+
# The source url root for the documented code, i.e. `https://github.com/<org>/<repo>/blob/main/include`
7070
source_root: <source url root>
71-
# The path root for the documented code, corresponding to the `hyde --hyde-yaml-dir=` option, i.e. `/includes` if `hyde --hyde-yaml-dir=./includes`
71+
# The path root for the documented code, corresponding to the `hyde --hyde-yaml-dir=` option, i.e. `/include` if `hyde --hyde-yaml-dir=./include`
7272
hyde_yaml_dir: <hyde yaml dir>
7373
```
7474

_includes/breadcrumb.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<div class="breadcrumb-wrapper">
1717
<ol class="breadcrumb">
18-
<li><a href="{{ site.baseurl }}/">&#x1F3E0;</a></li>
18+
<li><a href="{{ site.baseurl }}/"><i class="fa fa-house"></i></a></li>
1919
{% for crumb in crumbs %}
2020
{% if crumb == "/" %} {% continue %} {% endif %}
2121
<script>

_includes/head.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
77
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
8-
<noscript>
9-
<link rel="stylesheet" href="{{ "assets/css/main-light.css" | prepend: site.baseurl }}">
10-
</noscript>
8+
<link rel="stylesheet" href="{{ "/assets/css/root.css" | relative_url }}">
119
<link rel="stylesheet" id="main-style">
1210
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
1311
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro|Source+Sans+Pro|Source+Serif+Pro" rel="stylesheet">

_includes/overloads.html

+118-112
Original file line numberDiff line numberDiff line change
@@ -7,142 +7,148 @@
77
<tr>
88
<td>
99
{% highlight c++ %}{{ overload.signature_with_names }}{% endhighlight %}
10-
</td>
11-
{% if overload_count > 1 %}
12-
<td><a href="#overload_{{ forloop.index }}">({{ forloop.index }})</a></td>
13-
{% endif %}
14-
<td>
1510
{% if overload.annotation %}
1611
<span class='annotation'>({{overload.annotation | join: ", "}})</span>
1712
{% endif %}
1813
</td>
14+
{% if overload_count > 1 %}
15+
<td><a href="#overload_{{ forloop.index }}">({{ forloop.index }})</a></td>
16+
{% endif %}
1917
</tr>
2018
{% endfor %}
2119
</table>
2220

23-
{% if page.hyde.inline.description %}
24-
{{ page.hyde.inline.description | markdownify }}
25-
{% endif %}
26-
27-
{% if page.hyde.description %}
28-
{{ page.hyde.description | markdownify }}
21+
{% if page.hyde.brief and
22+
page.hyde.brief != "__MISSING__" and
23+
page.hyde.brief != "__OPTIONAL__" and
24+
page.hyde.brief != "__INLINED__" %}
25+
{{page.hyde.brief | markdownify}}
2926
{% endif %}
3027

3128
{% for entity in page.hyde.overloads %}
3229
{% assign overload = entity[1] %}
3330
{% if overload_count > 1 %}
34-
<h4 id="overload_{{ forloop.index }}">({{ forloop.index }}) {% highlight c++ %}{{ overload.signature_with_names }}{%endhighlight%}</h4>
35-
36-
{% if overload.annotation %}
37-
<span class='annotation'>({{overload.annotation | join: ", "}})</span>
38-
{% endif %}
39-
{% endif %}
40-
{% comment %}
41-
`brief` isn't required for specific functions, but _is_ required for the top-level file that
42-
documents all the function's overloads. Thus a developer may define a `brief` for an
43-
overload though it is not required for `hyde`. Since it is the brief it should precede any
44-
enusuing descriptions.
45-
{% endcomment %}
4631
{% if overload.inline.brief %}
47-
{{overload.inline.brief | join: "<br/>" | markdownify }}
32+
<div id="overload_{{ forloop.index }}">{{ forloop.index }})
33+
{{overload.inline.brief | join: "<br/>" | markdownify }}
34+
</div>
4835
{% endif %}
36+
{% endif %}
37+
{% endfor %}
4938

50-
{% if overload.inline.description %}
51-
{{overload.inline.description | join: "<br/>" | markdownify }}
52-
{% endif %}
39+
{% for entity in page.hyde.overloads %}
40+
{% assign overload = entity[1] %}
41+
{% comment %}
42+
`brief` isn't required for specific functions, but _is_ required for the top-level file that
43+
documents all the function's overloads. Thus a developer may define a `brief` for an
44+
overload though it is not required for `hyde`. Since it is the brief it should precede any
45+
enusuing descriptions.
46+
{% endcomment %}
5347

54-
{% if overload.description and
55-
overload.description != "__INLINED__" and
56-
overload.description != "__OPTIONAL__" %}
57-
{{overload.description | markdownify}}
58-
{% endif %}
48+
{% if overload.inline.description %}
49+
{{overload.inline.description | join: "<br/>" | markdownify }}
50+
{% endif %}
5951

60-
{% if overload.inline.pre %}
61-
<h5>Preconditions</h5>
62-
{{overload.inline.pre | markdownify}}
63-
{% endif %}
52+
{% if overload.description and
53+
overload.description != "__INLINED__" and
54+
overload.description != "__OPTIONAL__" %}
55+
{{overload.description | markdownify}}
56+
{% endif %}
6457

65-
{% if overload.arguments %}
66-
<h5>Parameters</h5>
67-
<table class='declaration-table'>
68-
{% for arg in overload.arguments %}
69-
<tr>
70-
<td style="padding-right: 1em">
71-
{% if overload.inline.arguments[arg.name].direction %}
72-
<span class="annotation">{{overload.inline.arguments[arg.name].direction}}</span>
73-
{% else %}
74-
&nbsp;
75-
{% endif %}
76-
</td>
77-
<td style="white-space: nowrap; padding-right: 1em">
78-
{% highlight c++ %}{{arg.type}}{% endhighlight %}
79-
</td>
80-
<td style="padding-right: 1em">
81-
{% if (arg.name != "") and (arg.unnamed == false) %}
82-
{% highlight c++ %}{{arg.name}}{% endhighlight %}
83-
{% else %}
84-
<i>unnamed</i>
85-
{% endif %}
86-
</td>
87-
<td width='100%'>
88-
{% if arg.description and (arg.description != "__OPTIONAL__") %}
89-
{{arg.description | markdownify}}
90-
{% else if arg.name and overload.inline.arguments[arg.name].description %}
91-
{{overload.inline.arguments[arg.name].description | markdownify}}
92-
{% endif %}
93-
</td>
94-
</tr>
95-
{% endfor %}
96-
</table>
97-
{% endif %}
58+
{% if overload.inline.pre %}
59+
<h5>Preconditions</h5>
60+
{{overload.inline.pre | markdownify}}
61+
{% endif %}
9862

99-
{% if (overload.return and
100-
(overload.return != "__OPTIONAL__")) or
101-
overload.inline.return %}
102-
<h5>Returns</h5>
103-
{%endif%}
104-
{% if overload.return and (overload.return != "__OPTIONAL__") %}
105-
{{overload.return | markdownify}}
106-
{% endif %}
107-
{% if overload.inline.return %}
108-
{{overload.inline.return | markdownify}}
109-
{% endif %}
63+
{% if overload.arguments %}
64+
<h5>Parameters</h5>
65+
<table class='declaration-table'>
66+
{% for arg in overload.arguments %}
67+
<tr>
68+
<td style="padding-right: 1em">
69+
{% if overload.inline.arguments[arg.name].direction %}
70+
<span class="annotation">{{overload.inline.arguments[arg.name].direction}}</span>
71+
{% else %}
72+
&nbsp;
73+
{% endif %}
74+
</td>
75+
<td style="white-space: nowrap; padding-right: 1em">
76+
{% highlight c++ %}{{arg.type}}{% endhighlight %}
77+
</td>
78+
<td style="padding-right: 1em">
79+
{% if (arg.name != "") and (arg.unnamed == false) %}
80+
{% highlight c++ %}{{arg.name}}{% endhighlight %}
81+
{% else %}
82+
<i>unnamed</i>
83+
{% endif %}
84+
</td>
85+
<td width='100%'>
86+
{% if arg.description and (arg.description != "__OPTIONAL__") %}
87+
{{arg.description | markdownify}}
88+
{% else if arg.name and overload.inline.arguments[arg.name].description %}
89+
{{overload.inline.arguments[arg.name].description | markdownify}}
90+
{% endif %}
91+
</td>
92+
</tr>
93+
{% endfor %}
94+
</table>
95+
{% endif %}
11096

111-
{% if overload.inline.post %}
112-
<h5>Postconditions</h5>
113-
{{overload.inline.post | markdownify}}
114-
{% endif %}
97+
{% if (overload.return and
98+
(overload.return != "__OPTIONAL__")) or
99+
overload.inline.return %}
100+
<h5>Returns</h5>
101+
{%endif%}
102+
{% if overload.return and (overload.return != "__OPTIONAL__") %}
103+
{{overload.return | markdownify}}
104+
{% endif %}
105+
{% if overload.inline.return %}
106+
{{overload.inline.return | markdownify}}
107+
{% endif %}
115108

116-
{% if overload.inline.throw %}
117-
<h5>Exceptions</h5>
118-
{{overload.inline.throw | markdownify}}
119-
{% endif %}
109+
{% if overload.inline.post %}
110+
<h5>Postconditions</h5>
111+
{{overload.inline.post | markdownify}}
112+
{% endif %}
120113

121-
{% if overload.inline.todo %}
122-
<h5>To Do</h5>
123-
{{overload.inline.todo | markdownify}}
124-
{% endif %}
114+
{% if overload.inline.throw %}
115+
<h5>Exceptions</h5>
116+
{{overload.inline.throw | markdownify}}
117+
{% endif %}
125118

126-
{% if overload.inline.warning %}
127-
<h5>Warning</h5>
128-
{{overload.inline.warning | markdownify}}
129-
{% endif %}
119+
{% if overload.inline.todo %}
120+
<h5>To Do</h5>
121+
{{overload.inline.todo | markdownify}}
122+
{% endif %}
130123

131-
{% for entry in overload.inline %}
132-
{% if entry[0] == "owner" or
133-
entry[0] == "brief" or
134-
entry[0] == "description" or
135-
entry[0] == "pre" or
136-
entry[0] == "post" or
137-
entry[0] == "arguments" or
138-
entry[0] == "return" or
139-
entry[0] == "throw" or
140-
entry[0] == "todo" or
141-
entry[0] == "warning" %}
142-
{% continue %}
143-
{% endif %}
144-
<h5>{{entry[0]}} <span class='annotation'>(additional inline)</span></h5>
145-
{{entry[1] | markdownify }}
146-
{% endfor %}
124+
{% if overload.inline.warning %}
125+
<h5>Warning</h5>
126+
{{overload.inline.warning | markdownify}}
127+
{% endif %}
128+
129+
{% for entry in overload.inline %}
130+
{% if entry[0] == "owner" or
131+
entry[0] == "brief" or
132+
entry[0] == "description" or
133+
entry[0] == "pre" or
134+
entry[0] == "post" or
135+
entry[0] == "arguments" or
136+
entry[0] == "return" or
137+
entry[0] == "throw" or
138+
entry[0] == "todo" or
139+
entry[0] == "warning" %}
140+
{% continue %}
141+
{% endif %}
142+
<h5>{{entry[0]}} <span class='annotation'>(additional inline)</span></h5>
143+
{{entry[1] | markdownify }}
144+
{% endfor %}
147145
{% endfor %}
146+
147+
{% if page.hyde.inline.description %}
148+
{{ page.hyde.inline.description | markdownify }}
149+
{% endif %}
150+
151+
{% if page.hyde.description %}
152+
{{ page.hyde.description | markdownify }}
153+
{% endif %}
148154
{% endif %}

_includes/top-bar.html

+2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
{% include breadcrumb.html %}
55
</div>
66
<div class="top-bar-spacer"></div>
7+
<!--
78
<div class="top-bar-theme">
89
{% include theme.html %}
910
</div>
11+
-->
1012
</div>
1113
</div>

0 commit comments

Comments
 (0)