jekyll-theme-open-project 2.0.15 → 2.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3dfd201cb4a8e24160005f658abcf1de56eed59
4
- data.tar.gz: ea6818b8f0e03ad32aebf194c14004be7a7144c4
3
+ metadata.gz: a4d0759e674a68d04270b5506aa86eb15f332eec
4
+ data.tar.gz: 58118a601f3601d0475d7939b744caefa2d771d3
5
5
  SHA512:
6
- metadata.gz: 855b217e521c3cb691a0e6f639bf3d6a232bbb4aa028fb5c3c010a313f79895cd2bc2130900f13ad1418651189c30370173ddbe028b925020e71914188fdf640
7
- data.tar.gz: 6637f3b27c2d116af706cfb5a43d59c9cacdda51aef7b1079f536833d7be97bcc0401828a61e9ecb1c279cbded4e41efcc2ea356194ad99f56d83b5cd03ffd68
6
+ metadata.gz: b5d0dd62ebe8b920be3af7330acc3f88d4ae866a1f5e3f0271c6cdf1ebd1706910230a2029aa441bc81beb8dbadcfdfebf5aecf9b5ee0ba2d129ac2f957b9180
7
+ data.tar.gz: 1d8b86581475836e01629d100fafca63558064a397c2b59baae0234e8e71eef103c8908bfb31b543893cae3bbab4e53df4cdd685865c72e5e2519b9bc500518e
@@ -0,0 +1,23 @@
1
+ {% assign authors = "" | split: "," %}
2
+ {% if include.post.author %}
3
+ {% assign authors = authors | push: include.post.author %}
4
+ {% endif %}
5
+ {% if include.post.authors %}
6
+ {% assign authors = authors | concat: include.post.authors %}
7
+ {% endif %}
8
+
9
+ <span class="authors">
10
+ {% for author in authors %}
11
+ <span class="author">
12
+ {% if author.name %}
13
+ {% include post-author-pic.html author=author %}
14
+ <span class="author-name">{{ author.name }}</span>
15
+ {% endif %}
16
+ </span>
17
+ {% endfor %}
18
+ </span>
19
+
20
+ <span class="date">
21
+ {% if authors %}on {% endif %}
22
+ {{ include.post.date | date_to_string }}
23
+ </span>
@@ -3,47 +3,57 @@
3
3
  {% else %}
4
4
  {% capture href %}{{ include.post.url }}{% endcapture %}
5
5
  {% endif %}
6
- <a class="item {% if include.post.parent_project %}has-parent-project{% endif %}"
6
+
7
+ {% capture cover_image_src %}{% endcapture %}
8
+ {% if include.post.card_image %}
9
+ {% if include.post.parent_project %}
10
+ {% capture cover_image_src %}{{ include.post.parent_project.home_url }}{{ include.post.card_image }}{% endcapture %}
11
+ {% else %}
12
+ {% capture cover_image_src %}{{ include.post.card_image | relative_url }}{% endcapture %}
13
+ {% endif %}
14
+ {% endif %}
15
+
16
+ <a class="item
17
+ {% if include.post.parent_project %}has-parent-project{% endif %}
18
+ {% if cover_image_src != "" and include.can_be_featured %}has-cover-image{% endif %}"
7
19
  href="{{ href }}" role="article">
8
20
 
9
- {% if include.post.parent_project == nil and site.is_hub == true %}
10
- <div class="hub-symbol">
11
- {% include assets/symbol.svg %}
21
+ {% if cover_image_src != "" and include.can_be_featured %}
22
+ <div class="cover-image">
23
+ <img src="{{ cover_image_src }}" alt="Cover image">
12
24
  </div>
13
25
  {% endif %}
14
26
 
15
- <header>
16
- {% if include.post.parent_project %}
17
- {% assign project_symbol_path = include.post.parent_project.name | append: "/assets/symbol.svg" %}
18
- {% assign relative_symbol_path = "/projects/" | append: project_symbol_path %}
19
- <div class="parent-project">
20
- <div class="project-logo">
21
- <img src="{{ relative_symbol_path }}">
22
- </div>
23
- <h4 class="project-title">{{ include.post.parent_project.title }}</h4>
24
- <div class="external-link-icon">
25
- <img src="{{ "assets/img/external-link.svg" | relative_url }}">
26
- </div>
27
+ <div class="card-body">
28
+ {% if include.post.parent_project == nil and site.is_hub == true %}
29
+ <div class="hub-symbol">
30
+ {% include assets/symbol.svg %}
27
31
  </div>
28
32
  {% endif %}
29
- <h3 class="title">{{ include.post.title }}</h3>
30
- </header>
31
33
 
32
- <p class="body">
33
- {{ include.post.excerpt | remove: '<p>' | remove: '</p>' | remove: '<div class="presentation">' | remove: '</div>' }}
34
- </p>
34
+ <header>
35
+ {% if include.post.parent_project %}
36
+ {% assign project_symbol_path = include.post.parent_project.name | append: "/assets/symbol.svg" %}
37
+ {% assign relative_symbol_path = "/projects/" | append: project_symbol_path %}
38
+ <div class="parent-project">
39
+ <div class="project-logo">
40
+ <img src="{{ relative_symbol_path }}">
41
+ </div>
42
+ <h4 class="project-title">{{ include.post.parent_project.title }}</h4>
43
+ <div class="external-link-icon">
44
+ <img src="{{ "assets/img/external-link.svg" | relative_url }}">
45
+ </div>
46
+ </div>
47
+ {% endif %}
48
+ <h3 class="title">{{ include.post.title }}</h3>
49
+ </header>
35
50
 
36
- <footer class="meta">
37
- {% if include.post.author.name %}
38
- {% include post-author-pic.html author=include.post.author %}
39
- <span class="author-name">
40
- {{ include.post.author.name }}
41
- </span>
42
- {% endif %}
43
- <span class="date">
44
- {% if include.post.author.name %}on {% endif %}
45
- {{ include.post.date | date_to_string }}
46
- </span>
47
- </footer>
51
+ <p class="body">
52
+ {{ include.post.excerpt | remove: '<p>' | remove: '</p>' | remove: '<div class="presentation">' | remove: '</div>' }}
53
+ </p>
48
54
 
55
+ <footer class="meta">
56
+ {% include _post-meta.html post=include.post %}
57
+ </footer>
58
+ </div>
49
59
  </a>
@@ -8,6 +8,12 @@ layout: default
8
8
  {% endif %}
9
9
 
10
10
  {% for item in site.posts_combined %}
11
- {% include post-card.html post=item %}
11
+ {% if forloop.first %}
12
+ {% assign can_be_featured = true %}
13
+ {% else %}
14
+ {% assign can_be_featured = false %}
15
+ {% endif %}
16
+
17
+ {% include post-card.html post=item can_be_featured=can_be_featured %}
12
18
  {% endfor %}
13
19
  </section>
@@ -132,12 +132,14 @@
132
132
  {% endcomment %}
133
133
  <script>
134
134
  window.initAlgolia = function () {
135
- docsearch({
136
- apiKey: '{{ site.algolia_search.api_key }}',
137
- indexName: '{{ site.algolia_search.index_name }}',
138
- inputSelector: 'input[type=search]',
139
- debug: false,
140
- });
135
+ if (window.docsearch) {
136
+ docsearch({
137
+ apiKey: '{{ site.algolia_search.api_key }}',
138
+ indexName: '{{ site.algolia_search.index_name }}',
139
+ inputSelector: 'input[type=search]',
140
+ debug: false,
141
+ });
142
+ }
141
143
  };
142
144
  </script>
143
145
  {% endif %}
@@ -7,16 +7,7 @@ layout: default
7
7
  <h1 class="title">{{ page.title }}</h1>
8
8
 
9
9
  <div class="meta">
10
- {% if page.author.name %}
11
- {% include post-author-pic.html author=page.author %}
12
- <span class="author-name">
13
- {{ page.author.name }}
14
- </span>
15
- {% endif %}
16
- <span class="date">
17
- {% if page.author.name %}on {% endif %}
18
- {{ page.date | date_to_string }}
19
- </span>
10
+ {% include _post-meta.html post=page %}
20
11
  </div>
21
12
  </header>
22
13
 
@@ -238,7 +238,7 @@ main {
238
238
  @extend .post-card;
239
239
  @include hoverable-card(4px, 12px, rgba(0, 0, 0, 0.08));
240
240
 
241
- padding: 32px 30px 16px 30px;
241
+ padding: 30px 30px 16px 30px;
242
242
 
243
243
  .header {
244
244
  font-size: 22px;
@@ -251,11 +251,19 @@ main {
251
251
  box-sizing: border-box;
252
252
  flex-basis: calc( 100%/#{$featured-cols-narrow} - #{$gutter} );
253
253
  margin-bottom: $gutter;
254
+
255
+ &.has-cover-image {
256
+ flex-basis: 100%;
257
+ }
254
258
  }
255
259
  @media screen and (min-width: $widescreen-breakpoint) {
256
260
  box-sizing: border-box;
257
261
  flex-basis: calc( 100%/#{$featured-cols} - #{$gutter} );
258
262
  margin-bottom: $gutter;
263
+
264
+ &.has-cover-image {
265
+ flex-basis: calc( 100%/#{$featured-cols} * 2 - #{$gutter} );
266
+ }
259
267
  }
260
268
  }
261
269
  }
@@ -154,6 +154,12 @@ a {
154
154
  position: relative;
155
155
  overflow: hidden;
156
156
 
157
+ .card-body {
158
+ height: 100%;
159
+ display: flex;
160
+ flex-flow: column nowrap;
161
+ }
162
+
157
163
  .body {
158
164
  flex: 1;
159
165
  }
@@ -274,35 +280,45 @@ a {
274
280
  }
275
281
 
276
282
  .post-meta-row {
277
- display: flex;
278
- flex-flow: row wrap;
279
- align-items: center;
280
-
281
283
  color: grey;
282
284
  font-size: 14px;
283
285
 
284
- .author-name {
285
- margin-right: 10px;
286
+ .date {
286
287
  white-space: nowrap;
287
-
288
- font-weight: 600;
289
- color: $primary-color;
290
288
  }
291
289
 
292
- .author-avatar {
293
- margin-right: 10px;
294
- width: 32px;
295
- height: 32px;
296
- border-radius: 50%;
297
- overflow: hidden;
290
+ .authors {
291
+ .author {
292
+ white-space: nowrap;
293
+ display: inline-block;
294
+ margin: .2em 0;
298
295
 
299
- display: inline-block;
300
- vertical-align: middle;
296
+ .author-name {
297
+ margin-right: 10px;
298
+ white-space: nowrap;
301
299
 
302
- img {
303
- vertical-align: middle;
304
- width: 100%;
305
- height: 100%;
300
+ font-weight: 600;
301
+ color: $primary-color;
302
+
303
+ text-overflow: ellipsis;
304
+ overflow: hidden;
305
+ }
306
+
307
+ .author-avatar {
308
+ margin-right: 10px;
309
+ width: 32px;
310
+ height: 32px;
311
+ border-radius: 50%;
312
+ overflow: hidden;
313
+
314
+ display: inline-block;
315
+ vertical-align: middle;
316
+
317
+ img {
318
+ width: 100%;
319
+ height: 100%;
320
+ }
321
+ }
306
322
  }
307
323
  }
308
324
  }
@@ -313,6 +329,34 @@ a {
313
329
  &.has-parent-project {
314
330
  padding-top: 20px;
315
331
  }
332
+ &.has-cover-image {
333
+ .cover-image {
334
+ display: none;
335
+ }
336
+ @media screen and (min-width: $bigscreen-breakpoint) {
337
+ position: relative;
338
+
339
+ .card-body {
340
+ margin-left: calc(50% + #{$gutter} / 2 + 30px);
341
+ }
342
+ .cover-image {
343
+ display: block;
344
+ margin: 0;
345
+ position: absolute;
346
+ left: 0;
347
+ top: 0;
348
+ bottom: 0;
349
+ right: 50%;
350
+
351
+ img {
352
+ display: block;
353
+ height: 100%;
354
+ width: 100%;
355
+ object-fit: cover;
356
+ }
357
+ }
358
+ }
359
+ }
316
360
  .hub-symbol {
317
361
  position: absolute;
318
362
  top: 10px;
@@ -1,6 +1,11 @@
1
1
  (function () {
2
2
  'use strict';
3
3
 
4
+ // NOTE: This contains various JS helpers for Open Project theme,
5
+ // moving forward the functionality will be refactored into smaller modules
6
+ // (potentially native reusable web components) which would written in ES6
7
+ // and compiled, minified and combined at front-end build step.
8
+
4
9
 
5
10
  var bigscreenBreakpoint = 800;
6
11
  // Conforms to CSS @media rules
@@ -238,6 +243,9 @@
238
243
 
239
244
 
240
245
  // Initializing stuff
246
+ // The order is significant in many cases, since it involves
247
+ // UI components that depend on each other.
248
+
241
249
  var hamburgerMenu = initCollapsibleMenu(
242
250
  document.querySelector('header nav.top-menu'),
243
251
  document.getElementById('hamburgerButton'),
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: 2.0.15
4
+ version: 2.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-22 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 2.0.15
75
+ version: 2.0.16
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 2.0.15
82
+ version: 2.0.16
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -161,6 +161,7 @@ files:
161
161
  - README.md
162
162
  - _config.yml
163
163
  - _includes/_nav-item.html
164
+ - _includes/_post-meta.html
164
165
  - _includes/external-link.html
165
166
  - _includes/featured_posts.html
166
167
  - _includes/featured_software.html