jekyll-theme-open-project 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '002371978d4991d9176ae741dc9201a347144a6e695f05f4e0cf87e584fb75f1'
4
- data.tar.gz: fb89cfd1cdded7ba09f601efac540a6cbecee303ab4a1ecd1a5bf14d6cd1ddee
3
+ metadata.gz: 85878bb8934c388906c78f315ab686d8c57fafe4dce7582c6edef0ded08b6d97
4
+ data.tar.gz: b59c03895746a5ce35fd6f8bdc0067305a9f6042389f2e10633926caef34d516
5
5
  SHA512:
6
- metadata.gz: f390ca879f0da10542a792d6258bbcf7f281717716a2138f693738cbab1692eaed3412ff3f89619f37168502d18f6bb4637fcdfcbb936f5be43eca9959042e44
7
- data.tar.gz: 94bb002f4e13b7dd80cf5da9d8945cecafb144f411f9805ebf5f159d3c2c364d1ad5642be55259bd79ccbfc613681710eefd7f2f6a8ca7811aef11545888b88e
6
+ metadata.gz: dde74ba1fe0e7574e4433d3659bc45efd41b310609da5b766fb15f79457dc1c802b8d671f28978d7b65ce6338ef1d1e95fe24dc4c42f9d19a0439d6278fb5532
7
+ data.tar.gz: 21b2851722be95f000fda06649917552cfdede18d6e2d1e74fbd384e6a15868881a364929223de1dff031e9b4ea71db6dddc8f992e552169963ad22983afa07c
@@ -1,5 +1,11 @@
1
- <section class="documentation">
2
- {% assign product_base_url = page.url | split: "/" | slice: 0, 3 | join: "/" | append: "/" %}
1
+ {% assign product_base_url = page.url | split: "/" | slice: 0, 3 | join: "/" | append: "/" %}
2
+ {% if page.url == product_base_url %}
3
+ {% assign is_docs_landing = true %}
4
+ {% else %}
5
+ {% assign is_docs_landing = false %}
6
+ {% endif %}
7
+
8
+ <section class="documentation {% if is_docs_landing %}docs-landing{% endif %}">
3
9
  {% assign docs_base_url = product_base_url | append: "docs/" %}
4
10
  {% assign item_docs = include.items | where_exp: "item", "item.url contains docs_base_url" %}
5
11
  {% assign nav = item_docs | where_exp: "item", "item.path contains 'docs/navigation'" | first %}
@@ -7,41 +13,29 @@
7
13
  {% assign item_data = include.items | where_exp: "item", "item.url == product_base_url" | first %}
8
14
 
9
15
  <nav class="nav-sidebar">
10
- <header class="sidebar-header">
11
- {% if include.item_type == 'software' %}
12
- <div class="logo-container" role="presentation">
13
- {% include software-symbol.html item_id=page.id %}
14
- </div>
16
+
17
+ {% if is_docs_landing == false %}
18
+ <header class="sidebar-header">
19
+ {% if include.item_type == 'software' %}
20
+ <div class="logo-container" role="presentation">
21
+ {% include software-symbol.html item_id=page.id %}
22
+ </div>
23
+ <h3 class="title">
24
+ <a href="{{ product_base_url | relative_url }}">{{ item_data.title }}</a>
25
+ </h3>
26
+ {% endif %}
27
+ </header>
28
+
29
+ <section class="external-links">
30
+ {% include item-external-links.html item_type=include.item_type item_data=include.item_data %}
31
+ </section>
32
+ {% else %}
33
+ <header class="sidebar-header">
15
34
  <h3 class="title">
16
- <a href="{{ product_base_url | relative_url }}">{{ item_data.title }}</a>
35
+ Documentation
17
36
  </h3>
18
- {% endif %}
19
- </header>
20
-
21
- <section class="external-links">
22
- {% if include.item_type == 'software' and item_data.repo_url or item_data.docs_url %}
23
- <ul class="section-items">
24
- {% if item_data.repo_url %}
25
- <li class="item">
26
- <a href="{{ item_data.repo_url }}">Source Repository</a> {% endif %}
27
- {% if item_data.docs_url %}
28
- <li class="item">
29
- <a href="{{ item_data.docs_url }}">Documentation</a> {% endif %}
30
- </ul>
31
- {% else if include.item_type == 'specs' and item_data.rfc_id or item_data.ietf_datatracker_id or item_data.source_url %}
32
- <ul class="section-items">
33
- {% if item_data.rfc_id %}
34
- <li class="item">
35
- <a href="http://ietf.org/html/rfc{{ item_data.rfc_id }}">IETF RFC {{ item_data.rfc_id }}</a> {% endif %}
36
- {% if item_data.ietf_datatracker_id %}
37
- <li class="item">
38
- <a href="https://datatracker.ietf.org/doc/{{ item_data.ietf_datatracker_id }}{% if page.ietf_datatracker_ver %}-{{ page.ietf_datatracker_ver }}{% endif %}">IETF document</a> {% endif %}
39
- {% if item_data.source_url %}
40
- <li class="item">
41
- <a href="{{ item_data.source_url }}">Source Markup</a> {% endif %}
42
- </ul>
43
- {% endif %}
44
- </section>
37
+ </header>
38
+ {% endif %}
45
39
 
46
40
  {% for section in nav.sections %}
47
41
  <section>
@@ -91,6 +85,12 @@
91
85
  <div role="presentation">
92
86
  <h3 class="lead">{{ page.description }}</h3>
93
87
  </div>
88
+
89
+ {% if is_docs_landing %}
90
+ <div class="external-links">
91
+ {% include item-external-links.html item_type=include.item_type item_data=include.item_data %}
92
+ </div>
93
+ {% endif %}
94
94
  </header>
95
95
 
96
96
  <div class="body" role="presentation">
@@ -0,0 +1,70 @@
1
+ {% if include.item_type == 'software' and item_data.repo_url or item_data.docs_url %}
2
+ <ul class="section-items">
3
+ {% if item_data.repo_url %}
4
+ <li class="item">
5
+ <a href="{{ item_data.repo_url }}">
6
+ {% if item_data.repo_url contains "github.com" %}
7
+ <span class="ico">
8
+ <i class="fab fa-github"></i>
9
+ </span>
10
+ <span class="lbl">
11
+ GitHub Repository
12
+ </span>
13
+ {% else %}
14
+ <span class="ico">
15
+ <i class="far fa-code"></i>
16
+ </span>
17
+ <span class="lbl">
18
+ Source Repository
19
+ </span>
20
+ {% endif %}
21
+ </a> {% endif %}
22
+ {% if item_data.docs_url %}
23
+ <li class="item">
24
+ <a href="{{ item_data.docs_url }}">
25
+ {% if item_data.docs_url contains "rubydoc" %}
26
+ <span class="ico">
27
+ <i class="far fa-gem"></i>
28
+ </span>
29
+ <span class="lbl">
30
+ RubyDocs
31
+ </span>
32
+ {% else %}
33
+ <span class="ico">
34
+ <i class="far fa-book"></i>
35
+ </span>
36
+ <span class="lbl">
37
+ Documentation
38
+ </span>
39
+ {% endif %}
40
+ </a> {% endif %}
41
+ </ul>
42
+ {% else if include.item_type == 'specs' and item_data.rfc_id or item_data.ietf_datatracker_id or item_data.source_url %}
43
+ <ul class="section-items">
44
+ {% if item_data.rfc_id %}
45
+ <li class="item">
46
+ <a href="http://ietf.org/html/rfc{{ item_data.rfc_id }}">IETF RFC {{ item_data.rfc_id }}</a> {% endif %}
47
+ {% if item_data.ietf_datatracker_id %}
48
+ <li class="item">
49
+ <a href="https://datatracker.ietf.org/doc/{{ item_data.ietf_datatracker_id }}{% if page.ietf_datatracker_ver %}-{{ page.ietf_datatracker_ver }}{% endif %}">IETF document</a> {% endif %}
50
+ {% if item_data.source_url %}
51
+ <li class="item">
52
+ <a href="{{ item_data.source_url }}">
53
+ {% if item_data.source_url contains "github" %}
54
+ <span class="ico">
55
+ <i class="fab fa-github"></i>
56
+ </span>
57
+ <span class="lbl">
58
+ Source Markup on GitHub
59
+ </span>
60
+ {% else %}
61
+ <span class="ico">
62
+ <i class="far fa-code"></i>
63
+ </span>
64
+ <span class="lbl">
65
+ Source Markup
66
+ </span>
67
+ {% endif %}
68
+ </a> {% endif %}
69
+ </ul>
70
+ {% endif %}
@@ -10,13 +10,65 @@
10
10
  }
11
11
  }
12
12
 
13
+ @mixin reset-list() {
14
+ list-style: none;
15
+ margin: 0;
16
+ padding: 0;
17
+ }
18
+
19
+ @mixin static-link-color($color) {
20
+ &:link, &:hover, &:visited {
21
+ color: $color;
22
+ }
23
+ }
24
+
13
25
  @mixin docs-page($primary-dark-color) {
26
+ $side-margin: 16px; // for external links
27
+
14
28
  flex: 1;
15
29
  display: flex;
16
30
  flex-flow: column nowrap;
17
31
 
32
+ .external-links {
33
+ margin-left: -$side-margin;
34
+
35
+ ul.section-items {
36
+ @include reset-list();
37
+ }
38
+
39
+ > .section-items > .item {
40
+ margin-bottom: 10px;
41
+ margin-right: -$side-margin;
42
+
43
+ > a {
44
+ @include static-link-color(#444);
45
+ background-color: #F7F7F7;
46
+
47
+ display: block;
48
+ font-weight: bold;
49
+ padding: 4px $side-margin 4px $side-margin;
50
+ border-radius: 10px;
51
+
52
+ display: flex;
53
+ flex-flow: row nowrap;
54
+
55
+ .lbl {
56
+ flex: 1;
57
+ white-space: nowrap;
58
+ text-overflow: ellipsis;
59
+ overflow: hidden;
60
+ }
61
+ .ico {
62
+ flex-shrink: 0;
63
+ text-align: right;
64
+ width: 32px;
65
+ padding-right: 10px;
66
+ }
67
+ }
68
+ }
69
+ }
70
+
18
71
  > .nav-sidebar {
19
- flex-shrink: 0;
20
72
  padding-top: 50px;
21
73
 
22
74
  > .sidebar-header {
@@ -29,10 +81,10 @@
29
81
  line-height: 1;
30
82
  font-weight: normal;
31
83
  font-size: 15px;
84
+ text-transform: uppercase;
85
+ letter-spacing: 0.08em;
32
86
 
33
- a:link, a:visited {
34
- color: #444;
35
- }
87
+ a { @include static-link-color(#444); }
36
88
  }
37
89
  .logo-container {
38
90
  margin-right: 10px;
@@ -47,25 +99,6 @@
47
99
  > section {
48
100
  margin-bottom: 15px;
49
101
 
50
- &.external-links {
51
- $side-margin: 16px;
52
-
53
- margin-left: -$side-margin;
54
-
55
- > .section-items > .item {
56
- margin-bottom: 10px;
57
- margin-right: $side-margin;
58
-
59
- a {
60
- background-color: #F7F7F7;
61
- display: block;
62
- font-weight: bold;
63
- padding: 4px 0 4px $side-margin;
64
- border-radius: 10px;
65
- }
66
- }
67
- }
68
-
69
102
  > .section-title {
70
103
  font-size: 20px;
71
104
  font-weight: bold;
@@ -74,9 +107,8 @@
74
107
  }
75
108
 
76
109
  > .section-items {
77
- list-style: none;
78
- margin: 0;
79
- padding: 0;
110
+ @include reset-list;
111
+
80
112
  line-height: 2;
81
113
 
82
114
  > .item {
@@ -105,11 +137,7 @@
105
137
  color: $primary-dark-color;
106
138
  }
107
139
  }
108
- a {
109
- &:link, &:hover, &:visited {
110
- color: #444;
111
- }
112
- }
140
+ a { @include static-link-color(#444); }
113
141
  }
114
142
  }
115
143
  }
@@ -119,6 +147,9 @@
119
147
  @extend .main-article;
120
148
  flex: 1;
121
149
 
150
+ background: white;
151
+ z-index: 1;
152
+
122
153
  > header {
123
154
  > .title {
124
155
  display: flex;
@@ -150,16 +181,81 @@
150
181
  font-size: 20px;
151
182
  }
152
183
  }
184
+ > .body {
185
+ pre {
186
+ overflow-x: scroll;
187
+ overflow-y: hidden;
188
+ line-height: 1;
189
+ font-size: 80%;
190
+ white-space: pre-wrap;
191
+ }
192
+ }
193
+ }
194
+
195
+ &.docs-landing {
196
+ flex-direction: column-reverse;
197
+
198
+ .external-links > .section-items > .item {
199
+ margin: 0 $side-margin $side-margin $side-margin;
200
+
201
+ > a {
202
+ @include static-link-color(#fff);
203
+ background-color: $primary-dark-color;
204
+ }
205
+ }
206
+
207
+ > article {
208
+ max-width: none;
209
+
210
+ > header > .title {
211
+ border-bottom-width: 0;
212
+ padding-bottom: 0;
213
+ }
214
+ }
153
215
  }
154
216
 
155
217
  @media screen and (min-width: $bigscreen-breakpoint) {
156
- flex-flow: row nowrap;
218
+ flex-flow: row wrap;
157
219
 
158
220
  > .nav-sidebar {
159
- width: 320px;
160
- border-right: #F7F7F7 2px solid;
161
- margin-right: 60px;
221
+ flex: 1;
222
+ flex-grow: 1;
162
223
  padding-top: 70px;
163
224
  }
225
+
226
+ > article {
227
+ flex: 2;
228
+ border-left: #F7F7F7 2px solid;
229
+
230
+ > header,
231
+ > .body {
232
+ margin-left: 60px;
233
+ }
234
+ }
235
+
236
+ &.docs-landing {
237
+ flex-direction: column-reverse;
238
+
239
+ > article {
240
+ border-left-width: 0;
241
+
242
+ .external-links {
243
+ > .section-items {
244
+ display: flex;
245
+ flex-flow: row nowrap;
246
+ justify-content: space-between;
247
+
248
+ > * {
249
+ flex: 1;
250
+ }
251
+ }
252
+ }
253
+
254
+ > header,
255
+ > .body {
256
+ margin-left: 0;
257
+ }
258
+ }
259
+ }
164
260
  }
165
261
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-open-project
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-08 00:00:00.000000000 Z
11
+ date: 2018-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -166,6 +166,7 @@ files:
166
166
  - _includes/index-page-hero.html
167
167
  - _includes/index-page-item-filter.html
168
168
  - _includes/item-doc-page.html
169
+ - _includes/item-external-links.html
169
170
  - _includes/legal.html
170
171
  - _includes/logo.html
171
172
  - _includes/nav-links.html