jekyll-theme-open-project 0.1.6 → 1.0.0.pre.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,54 @@
1
- <h3 class="header">{{ item.title }}</h3>
2
- <p class="body">
3
- {{ item.excerpt | remove: '<p>' | remove: '</p>' }}
4
- </p>
5
- <div class="meta">
6
- {{ item.date | date_to_string }}
7
- </div>
1
+ <a class="item {% if include.post.parent_project %}has-parent-project{% endif %}"
2
+ href="
3
+ {% if include.post.parent_project %}
4
+ {{ include.post.parent_project.home_url }}blog/{{ include.post.date | date: "%m-%d-%Y" }}/{{ include.post.slug }}/
5
+ {% else %}
6
+ {{ include.post.url }}
7
+ {% endif %}
8
+ " role="article">
9
+
10
+ {% if include.post.parent_project == nil %}
11
+ <div class="hub-symbol" role="presentation">
12
+ {% include symbol.svg %}
13
+ </div>
14
+ {% endif %}
15
+
16
+ <header>
17
+ {% if include.post.parent_project %}
18
+ {% assign project_symbol_path = "_projects/" | append: include.post.parent_project.name | append: "/_includes/symbol.svg" %}
19
+ {% assign relative_symbol_path = "/" | append: project_symbol_path %}
20
+ <div class="parent-project">
21
+ <div class="project-logo" role="presentation">
22
+ {% include {{ relative_symbol_path }} %}
23
+ </div>
24
+ <h4 class="project-title">{{ include.post.parent_project.title }}</h4>
25
+ <div class="external-link-icon" role="presentation">
26
+ <img src="{{ "assets/img/external-link.svg" | relative_url }}">
27
+ </div>
28
+ </div>
29
+ {% endif %}
30
+ <h3 class="title">{{ include.post.title }}</h3>
31
+ </header>
32
+
33
+ <p class="body">
34
+ {{ include.post.excerpt | remove: '<p>' | remove: '</p>' }}
35
+ </p>
36
+
37
+ <footer class="meta">
38
+ {% if include.post.author.name %}
39
+ {% if include.post.author.email %}
40
+ <span class="author-avatar">
41
+ <img src="https://gravatar.com/avatar/{{ include.post.author.email }}?s=32">
42
+ </span>
43
+ {% endif %}
44
+ <span class="author-name">
45
+ {{ include.post.author.name }}
46
+ </span>
47
+ {% endif %}
48
+ <span class="date">
49
+ {% if include.post.author.name %}on {% endif %}
50
+ {{ include.post.date | date_to_string }}
51
+ </span>
52
+ </footer>
53
+
54
+ </a>
File without changes
@@ -0,0 +1,35 @@
1
+ {% assign project_symbol_path = "_projects/" | append: include.project_name | append: "/_includes/symbol.svg" %}
2
+ {% assign relative_symbol_path = "/" | append: project_symbol_path %}
3
+ {% assign item_slug = include.item.title | slugify %}
4
+ {% assign product_home_url = include.project_data.home_url | append: item_slug | append: "/" %}
5
+
6
+ <a class="item" href="{{ product_home_url }}" role="article">
7
+ <header>
8
+ <div class="parent-project">
9
+ <div class="project-logo">{% include {{ relative_symbol_path }} %}</div>
10
+ <h4 class="project-title">{{ include.project_data.title }}</h4>
11
+ </div>
12
+ <h3 class="title">{{ include.item.title }}</h3>
13
+ </header>
14
+
15
+ <p class="body">
16
+ {{ include.item.description }}
17
+ </p>
18
+
19
+ <footer class="meta">
20
+ {% assign num_tags = include.item.tags | size %}
21
+ {% if num_tags > 0 %}
22
+ <ul class="tags">
23
+ {% for tag in include.item.tags %}
24
+ <li>{{ tag }}</li>
25
+ {% endfor %}
26
+ </ul>
27
+ {% endif %}
28
+
29
+ {% if include.item.last_update %}
30
+ <div class="last-update">
31
+ Last update: {{ include.item.last_update | date: "%d/%m/%Y" }}
32
+ </div>
33
+ {% endif %}
34
+ </footer>
35
+ </a>
@@ -1,9 +1,11 @@
1
1
  ---
2
- layout: index-page
2
+ layout: default
3
3
  ---
4
4
 
5
- {% for item in site.posts %}
6
- <a class="item" href="{{ item.url }}" role="article">
7
- {% include post-card.html %}
8
- </a>
9
- {% endfor %}
5
+ <section class="items">
6
+ {% include symbol.svg %}
7
+
8
+ {% for item in page.posts_combined %}
9
+ {% include post-card.html post=item %}
10
+ {% endfor %}
11
+ </section>
@@ -5,10 +5,7 @@
5
5
  <meta charset="utf-8">
6
6
 
7
7
  <link rel="stylesheet" href="{{ "assets/css/style.css" | relative_url }}">
8
-
9
- <script defer src="{{ "assets/fa/fa-brands.js" | relative_url }}"></script>
10
- <script defer src="{{ "assets/fa/fa-solid.js" | relative_url }}"></script>
11
- <script src="{{ "assets/fa/fontawesome.js" | relative_url }}"></script>
8
+ <script defer src="https://pro.fontawesome.com/releases/v5.1.0/js/all.js" integrity="sha384-E5SpgaZcbSJx0Iabb3Jr2AfTRiFnrdOw1mhO19DzzrT9L+wCpDyHUG2q07aQdO6E" crossorigin="anonymous"></script>
12
9
 
13
10
  {% seo %}
14
11
  </head>
@@ -22,14 +19,19 @@
22
19
  <h1 class="site-logo"><a href="/">{% include logo.html %}</a></h1>
23
20
  <nav>
24
21
  {% include nav-page-link.html url="/" title="Home" %}
25
- {% for p in site.pages %}
26
- {% comment %}
27
- For project sites, exclude all links except for the blog.
28
- {% endcomment %}
29
- {% if num_projects > 0 or p.url contains "blog" %}
30
- {% include nav-page-link.html url=p.url title=p.title %}
31
- {% endif %}
32
- {% endfor %}
22
+ {% assign contact_link = "mailto:" | append: site.contact_email %}
23
+ {% if num_projects > 0 %}
24
+ {% include nav-page-link.html url="/projects/" title="Open Projects" %}
25
+ {% include nav-page-link.html url="/software/" title="Open Source Software" active_for_nested=true %}
26
+ {% include nav-page-link.html url="/specs/" title="Open Specifications" active_for_nested=true %}
27
+ {% include nav-page-link.html url="/blog/" title="Blog" active_for_nested=true %}
28
+ {% else %}
29
+ {% include nav-page-link.html url="/software/" title="Open Source Software" active_for_nested=true %}
30
+ {% include nav-page-link.html url="/specs/" title="Open Specifications" active_for_nested=true %}
31
+ {% include project-nav.html %}
32
+ {% include nav-page-link.html url="/blog/" title="Blog" active_for_nested=true %}
33
+ {% include nav-page-link.html url=contact_link title="Contact" %}
34
+ {% endif %}
33
35
  </nav>
34
36
  {% include social-links.html %}
35
37
  </header>
data/_layouts/post.html CHANGED
@@ -7,11 +7,63 @@ layout: default
7
7
  <h1 class="title">{{ page.title }}</h1>
8
8
 
9
9
  <div class="meta">
10
- <span>{{ page.author }}</span>
11
- on {{ page.date | date_to_string }}
10
+ {% if page.author.name %}
11
+ {% if page.author.email %}
12
+ <span class="author-avatar">
13
+ <img src="https://gravatar.com/avatar/{{ page.author.email }}?s=32">
14
+ </span>
15
+ {% endif %}
16
+ <span class="author-name">
17
+ {{ page.author.name }}
18
+ </span>
19
+ {% endif %}
20
+ <span class="date">
21
+ {% if page.author.name %}on {% endif %}
22
+ {{ page.date | date_to_string }}
23
+ </span>
12
24
  </div>
13
25
  </header>
14
26
 
27
+ {% assign num_social_links = page.author.social_links | size %}
28
+ {% if num_social_links > 0 %}
29
+ <aside class="social-links">
30
+ {% for link in page.author.social_links %}
31
+ <a href="{{ link }}" class="ico">
32
+ <span class="fa-layers fa-2x">
33
+ <i class="fas fa-circle"></i>
34
+ <i
35
+ {% if link contains "twitter.com" %}
36
+ class="fab fa-twitter"
37
+ alt="Twitter"
38
+ title="Twitter"
39
+ {% elsif link contains "github.com" %}
40
+ class="fab fa-github"
41
+ alt="Github"
42
+ title="Github"
43
+ {% elsif link contains "linkedin.com" %}
44
+ class="fab fa-linkedin-in"
45
+ alt="LinkedIn"
46
+ title="LinkedIn"
47
+ {% elsif link contains "facebook.com" %}
48
+ class="fab fa-facebook-f"
49
+ alt="Facebook"
50
+ title="Facebook"
51
+ {% elsif link contains "tumblr.com" %}
52
+ class="fab fa-tumblr"
53
+ alt="Tumblr"
54
+ title="Tumblr"
55
+ {% elsif link contains "instagram.com" %}
56
+ class="fab fa-instagram"
57
+ alt="Instagram"
58
+ title="Instagram"
59
+ {% endif %}
60
+ data-fa-transform="shrink-9"></i>
61
+ </span>
62
+ </a>
63
+ {% endfor %}
64
+ </aside>
65
+ {% endif %}
66
+
15
67
  <div class="body" role="presentation">
16
68
  {{ content }}
17
69
  </div>
@@ -0,0 +1,46 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {% assign projects = site.projects | where_exp: "item", "item.home_url != nil" %}
5
+ {% assign num_projects = projects | size %}
6
+
7
+ {% if num_projects > 0 %}
8
+ <section class="items">
9
+ {% include symbol.svg %}
10
+
11
+ {% for project in projects %}
12
+ {% assign symbol_path = project.path | split: "/" | slice: 0, 2 | join: "/" | append: "/_includes/symbol.svg" %}
13
+ {% assign relative_symbol_path = "/" | append: symbol_path %}
14
+
15
+ <a class="item {% if project.featured == true %}featured{% endif %}"
16
+ href="{{ project.home_url }}"
17
+ role="article">
18
+
19
+ <header>
20
+ <div class="logo-container" role="presentation">
21
+ <div class="logo">{% include {{ relative_symbol_path }} %}</div>
22
+ </div>
23
+ <h3 class="title">{{ project.title }}</h3>
24
+ </header>
25
+
26
+ <p class="body">
27
+ {{ project.description }}
28
+ </p>
29
+
30
+ <footer class="meta">
31
+ {% assign num_tags = project.tags | size %}
32
+ {% if num_tags > 0 %}
33
+ <ul class="tags">
34
+ {% for tag in project.tags %}
35
+ <li>{{ tag }}</li>
36
+ {% endfor %}
37
+ </ul>
38
+ {% endif %}
39
+ </footer>
40
+
41
+ </a>
42
+ {% endfor %}
43
+ </section>
44
+ {% else %}
45
+ <p>No projects to display.</p>
46
+ {% endif %}
@@ -1,18 +1,17 @@
1
1
  ---
2
- layout: index-page
2
+ layout: default
3
3
  ---
4
- {% assign software = site.projects | where_exp: "item", "item.url contains '_software'" %}
5
4
 
6
- {% for product in software %}
7
- {% assign project_name = product.url | split: "/" | slice: 2 | first %}
8
- {% assign project_index_path = "_projects/" | append: project_name | append: "/index.md" %}
9
- {% assign project = site.projects | where: "path", project_index_path | first %}
10
- {% assign product_home_url = project.home_url | append: product.slug | append: "/" %}
5
+ {% include index-page-item-filter.html url_tag_prefix="/software/" items=page.items tag=page.tag %}
11
6
 
12
- <a class="item" href="{{ product_home_url }}" role="article">
13
- <h3 class="header">{{ product.title }}</h3>
14
- <p class="body">
15
- {{ product.description }}
16
- </p>
17
- </a>
18
- {% endfor %}
7
+ <section class="items">
8
+ {% include symbol.svg %}
9
+
10
+ {% for product in page.items %}
11
+ {% assign project_name = product.url | split: "/" | slice: 2 | first %}
12
+ {% assign project_index_path = "_projects/" | append: project_name | append: "/index.md" %}
13
+ {% assign project = site.projects | where: "path", project_index_path | first %}
14
+
15
+ {% include software-card-hub.html item=product project_name=project_name project_data=project %}
16
+ {% endfor %}
17
+ </section>
@@ -1,18 +1,17 @@
1
1
  ---
2
- layout: index-page
2
+ layout: default
3
3
  ---
4
- {% assign specs = site.projects | where_exp: "item", "item.url contains '_specs'" %}
5
4
 
6
- {% for spec in specs %}
7
- {% assign project_name = spec.url | split: "/" | slice: 2 | first %}
8
- {% assign project_index_path = "_projects/" | append: project_name | append: "/index.md" %}
9
- {% assign project = site.projects | where: "path", project_index_path | first %}
10
- {% assign spec_home_url = project.home_url | append: spec.slug | append: "/" %}
5
+ {% include index-page-item-filter.html url_tag_prefix="/specs/" items=page.items tag=page.tag %}
11
6
 
12
- <a class="item" href="{{ spec_home_url }}" role="article">
13
- <h3 class="header">{{ spec.title }}</h3>
14
- <p class="body">
15
- {{ spec.description }}
16
- </p>
17
- </a>
18
- {% endfor %}
7
+ <section class="items">
8
+ {% include symbol.svg %}
9
+
10
+ {% for spec in page.items %}
11
+ {% assign project_name = spec.url | split: "/" | slice: 2 | first %}
12
+ {% assign project_index_path = "_projects/" | append: project_name | append: "/index.md" %}
13
+ {% assign project = site.projects | where: "path", project_index_path | first %}
14
+
15
+ {% include software-card-hub.html item=spec project_name=project_name project_data=project %}
16
+ {% endfor %}
17
+ </section>
@@ -6,6 +6,14 @@ $header-background: $primary-dark-color !default;
6
6
  $hero-background: $primary-dark-color !default;
7
7
  $superhero-background: $primary-dark-color !default;
8
8
 
9
+ $hub-software--primary-color: lightsalmon !default;
10
+ $hub-software--primary-dark-color: tomato !default;
11
+ $hub-software--hero-background: $hub-software--primary-dark-color !default;
12
+
13
+ $hub-specs--primary-color: lightpink !default;
14
+ $hub-specs--primary-dark-color: palevioletred !default;
15
+ $hub-specs--hero-background: $hub-specs--primary-dark-color !default;
16
+
9
17
  $gutter: 30px;
10
18
  $featured-cols: 3;
11
19
  $grid-cols: 4;
@@ -18,12 +26,42 @@ $bigscreen-breakpoint: 900px + $gutter * 2;
18
26
  @import "open-project-header-footer";
19
27
 
20
28
 
21
- /* Generic */
29
+ main {
22
30
 
23
- body {
31
+ /* Generic */
24
32
 
25
- &.layout-home > main {
26
- > .featured-posts {
33
+ body.layout-home > & {
34
+ > .underlay {
35
+ > svg {
36
+ display: none;
37
+ }
38
+ @media screen and (min-width: $bigscreen-breakpoint) {
39
+ position: relative;
40
+
41
+ > * {
42
+ z-index: 1;
43
+ }
44
+ > svg {
45
+ display: block;
46
+ z-index: 0;
47
+ position: absolute;
48
+ }
49
+
50
+ // Top section(s) background
51
+ &:first-child {
52
+ padding-bottom: 80px;
53
+ background-color: #F7F7F7;
54
+
55
+ > svg {
56
+ top: 0;
57
+ width: 100%;
58
+ height: 35vw;
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ > .underlay > .featured-posts {
27
65
  @extend .main-section;
28
66
 
29
67
  .items {
@@ -54,8 +92,38 @@ body {
54
92
  }
55
93
  }
56
94
 
57
- &.layout-spec-index > main,
58
- &.layout-software-index > main {
95
+ body.layout-spec-index > &,
96
+ body.layout-software-index > & {
97
+ > .item-filter {
98
+ padding: 18px 40px;
99
+ background-color: #F3F3F3;
100
+ align-self: stretch;
101
+ text-align: center;
102
+
103
+ ul.tags {
104
+ list-style: none;
105
+ margin: 0;
106
+ padding: 0;
107
+ font-size: 14px;
108
+
109
+ > li {
110
+ display: inline;
111
+ margin: 0;
112
+ padding: 0;
113
+
114
+ > * {
115
+ font-weight: 800;
116
+ margin: 0 4px;
117
+ padding: 3px 10px 3px 10px;
118
+ white-space: nowrap;
119
+ }
120
+ > a {
121
+ color: grey;
122
+ }
123
+ }
124
+ }
125
+ }
126
+
59
127
  > .items {
60
128
  @extend .item-grid;
61
129
  @extend .index-item-grid;
@@ -68,7 +136,7 @@ body {
68
136
  @extend .item-card;
69
137
  @include hoverable-card(4px, 12px, rgba(0, 0, 0, 0.08));
70
138
 
71
- padding: 32px 30px;
139
+ padding: 16px 30px 22px 30px;
72
140
 
73
141
  .header {
74
142
  font-size: 18px;
@@ -85,8 +153,19 @@ body {
85
153
  }
86
154
  }
87
155
  }
156
+ // Item filter: color override for selected tags
157
+ > .item-filter ul.tags li > span {
158
+ body.layout-software-index > & {
159
+ color: $hub-software--primary-color;
160
+ background-color: rgba($hub-software--primary-color, 0.1);
161
+ }
162
+ body.layout-spec-index > & {
163
+ color: $hub-specs--primary-color;
164
+ background-color: rgba($hub-specs--primary-color, 0.1);
165
+ }
166
+ }
88
167
 
89
- &.layout-blog-index > main {
168
+ body.layout-blog-index > & {
90
169
  > .items {
91
170
  @extend .item-grid;
92
171
  @extend .index-item-grid;
@@ -118,11 +197,54 @@ body {
118
197
  }
119
198
  }
120
199
 
121
- &.layout-post > main > article {
122
- @extend .main-article;
200
+ body.layout-post > & {
201
+ > article {
202
+ @extend .main-article;
203
+
204
+ > header > .meta {
205
+ @extend .post-meta-row;
206
+ margin-bottom: 36px;
207
+ }
208
+ aside.social-links {
209
+ position: relative;
210
+ top: -10px;
211
+ margin-bottom: 14px;
212
+
213
+ @media screen and (min-width: $bigscreen-breakpoint) {
214
+ // “Remove” from the flow, and offset to the left
215
+ $height: 100px;
216
+
217
+ height: $height;
218
+ width: 80px;
219
+
220
+ margin-bottom: -$height;
123
221
 
124
- > header > .meta {
125
- color: grey;
222
+ top: 10px;
223
+ left: -140px;
224
+
225
+ display: flex;
226
+ flex-flow: column nowrap;
227
+ align-items: flex-start;
228
+ }
229
+
230
+ > .ico {
231
+ margin-right: 5px;
232
+
233
+ @media screen and (min-width: $bigscreen-breakpoint) {
234
+ margin-right: 0;
235
+ margin-bottom: 5px;
236
+ }
237
+
238
+ .fa-layers {
239
+ > .fa-circle {
240
+ color: $primary-color;
241
+ }
242
+ > :not(.fa-circle) {
243
+ color: white;
244
+ }
245
+ }
246
+ }
247
+ }
126
248
  }
127
249
  }
128
250
  }
@@ -133,9 +255,13 @@ body {
133
255
  body.hub {
134
256
 
135
257
  &.layout-home > main {
136
- > .featured-projects {
258
+ > .underlay > .featured-projects {
137
259
  @extend .main-section;
138
260
 
261
+ > .title:after {
262
+ border-bottom-color: rgba($primary-dark-color, 0.12);
263
+ }
264
+
139
265
  .items {
140
266
  justify-content: center;
141
267
  }
@@ -152,9 +278,12 @@ body.hub {
152
278
  height: 80px;
153
279
  width: 80px;
154
280
  }
155
- .header {
281
+
282
+ header > .title {
156
283
  font-size: 24px;
284
+ margin: 0;
157
285
  }
286
+
158
287
  .body {
159
288
  font-size: 16px;
160
289
  height: 100px;
@@ -162,38 +291,83 @@ body.hub {
162
291
  text-overflow: ellipsis;
163
292
  }
164
293
 
294
+ .cta-view-project {
295
+ text-align: center;
296
+
297
+ .button {
298
+ display: inline-block;
299
+ padding: 8px 18px;
300
+ border-radius: 4px;
301
+ font-size: 16px;
302
+ font-weight: 800;
303
+ color: white;
304
+ background-color: $accent-color;
305
+ }
306
+ }
307
+
165
308
  @media screen and (min-width: $bigscreen-breakpoint) {
166
309
  box-sizing: border-box;
167
310
  flex-basis: calc( 100%/#{$featured-cols} - #{$gutter} );
168
311
  }
169
312
  }
170
313
  }
171
-
172
314
  > .other-projects {
173
315
  @extend .main-section;
316
+ @extend .with-symbol-background;
174
317
 
175
- .items.one-row {
176
- justify-content: center;
318
+ > .title:after {
319
+ border-bottom-color: rgba($primary-color, 0.12);
177
320
  }
321
+ }
322
+ }
178
323
 
179
- .item {
180
- @extend .item-card;
181
- @include hoverable-card(2px, 10px, rgba(desaturate($primary-color, 50), 0.08));
324
+ &.layout-project-index > main {
325
+ .items {
326
+ @extend .item-grid;
327
+ @extend .index-item-grid;
328
+ }
329
+ }
182
330
 
183
- padding: 32px 30px;
331
+ &.layout-project-index > main,
332
+ &.layout-blog-index > main,
333
+ &.layout-software-index > main,
334
+ &.layout-spec-index > main {
335
+ > .items {
336
+ @extend .with-symbol-background;
337
+ }
338
+ }
184
339
 
185
- .header {
186
- font-size: 18px;
187
- }
188
- .body {
189
- font-size: 15px;
190
- }
340
+ &.layout-home > main > .other-projects,
341
+ &.layout-project-index > main {
342
+ .items.one-row {
343
+ justify-content: center;
344
+ }
191
345
 
192
- @media screen and (min-width: $bigscreen-breakpoint) {
193
- box-sizing: border-box;
194
- flex-basis: calc( 100%/#{$grid-cols} - #{$gutter} );
195
- margin-bottom: $gutter;
196
- }
346
+ .item {
347
+ @extend .item-card;
348
+ @include hoverable-card(2px, 10px, rgba(desaturate($primary-color, 50), 0.08));
349
+
350
+ padding: 32px 30px;
351
+ text-align: center;
352
+
353
+ .logo {
354
+ display: inline-block;
355
+ height: 60px;
356
+ width: 60px;
357
+ }
358
+
359
+ header > .title {
360
+ font-size: 18px;
361
+ margin: 0;
362
+ }
363
+
364
+ .body {
365
+ font-size: 15px;
366
+ }
367
+
368
+ @media screen and (min-width: $bigscreen-breakpoint) {
369
+ box-sizing: border-box;
370
+ flex-basis: calc( 100%/#{$featured-cols} - #{$gutter} );
197
371
  }
198
372
  }
199
373
  }