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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1455bc3d106d07589f676621e160bcc927f21723
4
- data.tar.gz: 7ed324c9a0be2aecd73a1cfffd5e057ce76a5e32
3
+ metadata.gz: 5e3183b2c8b57bd349b4bf52814e6f82235e3ca6
4
+ data.tar.gz: 77fc79ad0e9588e6407d121c4abf0960d4be7e75
5
5
  SHA512:
6
- metadata.gz: 951495b57e7b5a4b1b068258e2d7ff744dfa80d570b704696c33d2d10b3fbe464f67a31acc8bd628d95e6369837af06392c3fe422af9867c8a31a6a750ae6895
7
- data.tar.gz: 2e0f09342c69b7b629d4991871acf1b8f7298ae3d524d89e30ad86510e5064d40d4e64d182e61b4c7917af5dbf994daeb763b62caa87bd920889d473db25c135
6
+ metadata.gz: 1ea724c553743a8010118d1fb548a117a817af5a1a1dd29728938300eeb76c4a383eca37580426a334e3174cf55a814ed170032e93ff65441a681f9638431e3c
7
+ data.tar.gz: 3f662fd2af364a8548ce72ffde2f100fd57a5f24030a1a766377353a4224130aaab62be803933ca5098b0c738384146a619cc41eb4ef7fd7e60170935ebcd0a0
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 Anton Strogonoff
3
+ Copyright (c) 2018 Ribose
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -51,14 +51,18 @@ replacing default theme requirement:
51
51
  gem 'jekyll-theme-open-project'
52
52
  ```
53
53
 
54
- Add this line to your Jekyll site's `_config.yml`,
55
- replacing default theme requirement:
54
+ (Jekyll’s default theme was “minima” at the time of this writing.)
56
55
 
57
- ```yaml
58
- theme: jekyll-theme-open-project
59
- ```
56
+ Also in the `Gemfile`, add two important plugins to the `:jekyll_plugins` group.
57
+ (The SEO tag plugin is not mandatory, but these docs assume you use it.)
60
58
 
61
- (Jekyll’s default theme was “minima” at the time of this writing.)
59
+ ```ruby
60
+ group :jekyll_plugins do
61
+ gem "jekyll-seo-tag"
62
+ gem "jekyll-theme-open-project-helpers"
63
+ # ...other plugins, if you use any
64
+ end
65
+ ```
62
66
 
63
67
  Execute to install dependencies:
64
68
 
@@ -85,11 +89,12 @@ and it’ll use localhost.
85
89
 
86
90
  ## Universal setup
87
91
 
88
- These are applicable to both site types (hub and project).
92
+ These settings are required to both site types (hub and project).
89
93
 
90
94
  - You may want to remove the default about.md page added by Jekyll,
91
95
  as this theme does not account for its existence.
92
- - Add following items to _config.yml:
96
+ - Add following items to _config.yml
97
+ (don’t forget to remove default theme requirement):
93
98
 
94
99
  ```yaml
95
100
  title: Site title
@@ -97,6 +102,22 @@ These are applicable to both site types (hub and project).
97
102
  # The above two are used by jekyll-seo-tag for things such as
98
103
  # `<title>` and `<meta>` tags, as well as elsewhere by the theme.
99
104
 
105
+ tagline: Site tagline
106
+ pitch: Site pitch
107
+ # The above two are used on home hero unit.
108
+
109
+
110
+ # Further settings are not expected to be changed,
111
+ # unless you know what you’re doing:
112
+
113
+ markdown: kramdown
114
+ theme: jekyll-theme-open-project
115
+
116
+ # Theme layouts can include from any directory, not just _includes.
117
+ # There’s a quirk in Jekyll’s “safe” behavior around include and gem-based themes
118
+ # which means include_relative wouldn’t cut it.
119
+ includes_dir: .
120
+
100
121
  collections:
101
122
  posts:
102
123
  output: true
@@ -115,9 +136,6 @@ These are applicable to both site types (hub and project).
115
136
  type: posts
116
137
  values:
117
138
  layout: post
118
-
119
- plugins:
120
- - jekyll-seo-tag
121
139
  ```
122
140
 
123
141
  ### Logo
@@ -153,6 +171,9 @@ You may want to supply _includes/legal.html with content like this:
153
171
 
154
172
  Project sites and hub site can have a blog.
155
173
 
174
+ In case of the hub, blog index will show combined timeline
175
+ from hub blog and projects’ blogs.
176
+
156
177
  #### Index
157
178
 
158
179
  Create blog index page as _pages/blog.html, with nothing but frontmatter.
@@ -174,8 +195,26 @@ hero_include: index-page-hero.html
174
195
 
175
196
  #### Posts
176
197
 
177
- Place posts under _posts and name files e.g.
178
- `2018-04-20-welcome-to-jekyll.markdown`. This is typical Jekyll setup.
198
+ In general, posts are authored as per usual Jekyll setup.
199
+
200
+ The following _additional_ data is expected within post document frontmatter:
201
+
202
+ ```yaml
203
+ ---
204
+ author:
205
+ email: <author’s email>
206
+ name: <author’s full name>
207
+ social_links:
208
+ - https://twitter.com/username
209
+ - https://facebook.com/username
210
+ - https://linkedin.com/in/username
211
+ ---
212
+ ```
213
+
214
+ For hub-wide posts, put posts under _posts/ in site root and name files e.g.
215
+ `2018-04-20-welcome-to-jekyll.markdown` (no change from the usual Jekyll setup).
216
+
217
+ For project posts, see below about shared project data structure.
179
218
 
180
219
 
181
220
  ## Hub site
@@ -221,6 +260,23 @@ featured: true | false
221
260
  home_url: <URL to standalone project site>
222
261
  ```
223
262
 
263
+ ### Project index page
264
+
265
+ Create software index in _pages/projects.html, with nothing but frontmatter.
266
+ Use layout called "project-index", pass `hero_include: index-page-hero.html`,
267
+ and set `title` and `description` as appropriate.
268
+
269
+ Example:
270
+
271
+ ```yaml
272
+ ---
273
+ title: Open projects
274
+ description: Projecting goodness into the world!
275
+ layout: project-index
276
+ hero_include: index-page-hero.html
277
+ ---
278
+ ```
279
+
224
280
  ### Software index page
225
281
 
226
282
  Create software index in _pages/software.html, with nothing but frontmatter.
@@ -294,7 +350,7 @@ defaults:
294
350
  ```
295
351
 
296
352
  File layout is the same as described in the section
297
- about shared project data structure, with _software and _specs directories
353
+ about shared project data structure, with _software, _specs, _posts directories
298
354
  found in the root of your Jekyll site.
299
355
 
300
356
 
@@ -307,13 +363,26 @@ Following data structure is shared and used to describe projects,
307
363
  whether on hub home site or each individual project site:
308
364
 
309
365
  - <project-name>/
366
+ - _posts/
367
+ - 2038-02-31-blog-post-title.markdown
310
368
  - _includes/
311
369
  - symbol.svg
312
370
  - _software/
313
- - <name>.md
371
+ - <name>/
372
+ - symbol.svg
373
+ - index.md
374
+ - _docs/
375
+ - <version>/
376
+ - overview.md
377
+ - <documentation-page-name>.md
314
378
  - _specs/
315
379
  - <name>.md
316
380
 
381
+ ### Blog
382
+
383
+ Project blog posts should be authored as described in the universal setup
384
+ section.
385
+
317
386
  ### Software and specs
318
387
 
319
388
  An open project serves as an umbrella for related
@@ -421,6 +490,10 @@ Commonly used layouts are:
421
490
 
422
491
  - post: Blog post
423
492
 
493
+ - project-index: Open project index page (hub site only).
494
+ Suggested to supply hero_include.
495
+ Will show a list of open projects across the hub.
496
+
424
497
  - software-index: Software index page (hub site only).
425
498
  Suggested to supply hero_include.
426
499
  Will show a list of software across projects within the hub.
@@ -456,8 +529,10 @@ under assets/css/style.scss with following exact contents:
456
529
  @import '{{ site.theme }}';
457
530
  ```
458
531
 
459
- You can define custom style rules after the import, and customize variables
460
- before the import.
532
+ There are two aspects to theme customization:
533
+
534
+ * Cutomize SASS variables before the import (such as colors)
535
+ * Define custom style rules after the import
461
536
 
462
537
  ### Custom rules
463
538
 
@@ -494,6 +569,15 @@ $accent-color: red !default;
494
569
  # hero unit respectively. Gradients can be supplied.
495
570
  $header-background: $primary-dark-color !default;
496
571
  $hero-background: $primary-dark-color !default;
572
+
573
+ # Below customize colors for different sections of the site.
574
+ $hub-software--primary-color: lightsalmon !default;
575
+ $hub-software--primary-dark-color: tomato !default;
576
+ $hub-software--hero-background: $hub-software--primary-dark-color !default;
577
+
578
+ $hub-specs--primary-color: lightpink !default;
579
+ $hub-specs--primary-dark-color: palevioletred !default;
580
+ $hub-specs--hero-background: $hub-specs--primary-dark-color !default;
497
581
  ```
498
582
 
499
583
 
@@ -1,2 +1,15 @@
1
- <h1>{{ site.title }}</h1>
2
- <p class="desc">{{ site.description }}</p>
1
+ <div role="presentation" class="text">
2
+ <h1 class="title">{{ site.tagline }}</h1>
3
+ <p class="desc">{{ site.pitch | safe }}</p>
4
+ <div class="cta explore-projects" role="presentation">
5
+ <a class="button" href="{{ "/projects/" | relative_url }}">
6
+ <i class="icon far fa-search"></i>
7
+ Explore Projects
8
+ </a>
9
+ </div>
10
+ </div>
11
+ <div role="presentation" class="illustration">
12
+ <div role="presentation" class="logo">
13
+ {% include symbol-hero.svg %}
14
+ </div>
15
+ </div>
@@ -1,59 +1,91 @@
1
- {% assign featured_projects = site.projects | where: "featured", true %}
2
- {% assign num_featured_projects = featured_projects | size %}
3
- {% if num_featured_projects > 0 %}
4
- <section class="featured-projects">
5
- <h2 class="title">Featured Projects</h2>
1
+ {% assign projects = site.projects | where_exp: "item", "item.home_url != nil" %}
6
2
 
7
- <div class="items" role="presentation">
3
+ <div class="underlay top-background" role="presentation">
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
5
+ <polygon fill="white" points="0,0 100,0 100,60 0,100"/>
6
+ </svg>
8
7
 
9
- {% for item in featured_projects limit:3 %}
10
- {% assign symbol_path = item.path | split: "/" | slice: 0, 2 | join: "/" | append: "/_includes/symbol.svg" %}
11
- {% assign relative_symbol_path = "/" | append: symbol_path %}
8
+ {% assign featured_projects = projects | where: "featured", true %}
9
+ {% assign num_featured_projects = featured_projects | size %}
10
+ {% if num_featured_projects > 0 %}
11
+ <section class="featured-projects">
12
+ <h2 class="title">Featured Projects</h2>
12
13
 
13
- <a class="item" href="{{ item.home_url }}" role="article">
14
- <div class="logo-container" role="presentation">
15
- <div class="logo">{% include_relative {{ relative_symbol_path }} %}</div>
16
- </div>
17
- <h3 class="header">{{ item.title }}</h3>
18
- <p class="body">
19
- {{ item.description }}
20
- </p>
21
- </a>
22
- {% endfor %}
23
- </div>
24
- </section>
25
- {% endif %}
14
+ <div class="items" role="presentation">
26
15
 
27
- {% assign num_featured_posts = site.posts | size %}
28
- {% if num_featured_posts > 0 %}
29
- <section class="featured-posts">
30
- <div role="presentation" class="puny-label">Latest news</div>
31
- <h2 class="title">From the Blog</h2>
32
-
33
- <div class="items" role="presentation">
34
- {% for item in site.posts limit:3 %}
35
- <a class="item" href="{{ item.url }}" role="article">
36
- {% include post-card.html %}
37
- </a>
38
- {% endfor %}
39
- </div>
40
- </section>
41
- {% endif %}
16
+ {% for item in featured_projects limit:3 %}
17
+ {% assign symbol_path = item.path | split: "/" | slice: 0, 2 | join: "/" | append: "/_includes/symbol.svg" %}
18
+ {% assign relative_symbol_path = "/" | append: symbol_path %}
19
+
20
+ <a class="item" href="{{ item.home_url }}" role="article">
21
+ <header>
22
+ <div class="logo-container" role="presentation">
23
+ <div class="logo">{% include {{ relative_symbol_path }} %}</div>
24
+ </div>
25
+ <h3 class="title">{{ item.title }}</h3>
26
+ </header>
27
+
28
+ <p class="body">
29
+ {{ item.description }}
30
+ </p>
31
+
32
+ <div class="cta-view-project">
33
+ <div class="button">View Project</div>
34
+ </div>
35
+ </a>
36
+ {% endfor %}
37
+ </div>
38
+ </section>
39
+ {% endif %}
42
40
 
43
- {% assign other_projects = site.projects | where: "featured", false %}
41
+ {% assign num_featured_posts = site.posts | size %}
42
+ {% if num_featured_posts > 0 %}
43
+ <section class="featured-posts">
44
+ <div role="presentation" class="puny-label">Latest news</div>
45
+ <h2 class="title">From the Blog</h2>
46
+
47
+ <div class="items" role="presentation">
48
+ {% for item in site.posts limit:3 %}
49
+ {% include post-card.html post=item %}
50
+ {% endfor %}
51
+ </div>
52
+ </section>
53
+ {% endif %}
54
+ </div>
55
+
56
+ {% assign other_projects = projects | where: "featured", true %}
44
57
  {% assign num_other_projects = other_projects | size %}
45
58
  {% if num_other_projects > 0 %}
46
59
  <section class="other-projects">
60
+ {% include symbol.svg %}
61
+
47
62
  <h2 class="title">Other Projects</h2>
48
63
 
49
64
  <div class="items {% if num_other_projects < 5 %}one-row{% endif %}"
50
65
  role="presentation">
51
66
  {% for item in other_projects %}
52
67
  <a class="item" href="{{ item.home_url }}" role="article">
53
- <h3 class="header">{{ item.title }}</h3>
68
+ <header>
69
+ <div class="logo-container" role="presentation">
70
+ <div class="logo">{% include {{ relative_symbol_path }} %}</div>
71
+ </div>
72
+ <h3 class="title">{{ item.title }}</h3>
73
+ </header>
74
+
54
75
  <p class="body">
55
76
  {{ item.description }}
56
77
  </p>
78
+
79
+ {% assign num_tags = item.tags | size %}
80
+ {% if num_tags > 0 %}
81
+ <footer class="meta">
82
+ <ul class="tags">
83
+ {% for tag in item.tags %}
84
+ <li>{{ tag }}</li>
85
+ {% endfor %}
86
+ </ul>
87
+ </footer>
88
+ {% endif %}
57
89
  </a>
58
90
  {% endfor %}
59
91
  </div>
@@ -47,9 +47,7 @@
47
47
 
48
48
  <div class="items" role="presentation">
49
49
  {% for item in site.posts %}
50
- <a class="item" href="{{ item.url }}" role="article">
51
- {% include post-card.html %}
52
- </a>
50
+ {% include post-card.html post=item %}
53
51
  {% endfor %}
54
52
  </div>
55
53
  </section>
@@ -1,2 +1,4 @@
1
- <h1>{{ page.title }}</h1>
2
- <p class="desc">{{ page.description }}</p>
1
+ <div role="presentation" class="text">
2
+ <h1 class="title">{{ page.title }}</h1>
3
+ <p class="desc">{{ page.description }}</p>
4
+ </div>
@@ -0,0 +1,28 @@
1
+ {% capture rawtags %}{% for doc in include.items %}{% for tag in doc.tags %}{{ tag }} {% endfor %}{% endfor %}{% endcapture %}
2
+
3
+ {% assign tags = rawtags | split: " " | uniq %}
4
+ {% assign num_tags = tags | size %}
5
+
6
+ {% if num_tags > 0 %}
7
+ <nav class="item-filter">
8
+ <ul class="tags">
9
+ <li>
10
+ {% if include.tag %}
11
+ <a href="{{ include.url_tag_prefix }}">All</a>
12
+ {% else %}
13
+ <span>All</span>
14
+ {% endif %}
15
+ </li>
16
+
17
+ {% for tag in tags %}
18
+ <li>
19
+ {% if tag == include.tag %}
20
+ <span>{{ tag }}</span>
21
+ {% else %}
22
+ <a href="{{ include.url_tag_prefix }}{{ tag }}">{{ tag }}</a>
23
+ {% endif %}
24
+ </li>
25
+ {% endfor %}
26
+ </ul>
27
+ </nav>
28
+ {% endif %}
@@ -1,5 +1,16 @@
1
- {% if page.url == include.url %}
1
+ {% if include.active_for_nested %}
2
+ {% assign first_component = page.url | split: '/' | slice: 0, 2 | join: '/' | append: '/' %}
3
+ {% if first_component == include.url %}
4
+ {% assign active_nested = true %}
5
+ {% else %}
6
+ {% assign active_nested = false %}
7
+ {% endif %}
8
+ {% endif %}
9
+
10
+ {% if active_nested or page.url == include.url %}
2
11
  <span>{{ include.title }}</span>
3
12
  {% else %}
4
13
  <a href="{{ include.url }}">{{ include.title }}</a>
5
14
  {% endif %}
15
+
16
+ {% assign active_nested = false %}