jekyll-theme-open-project 1.3.4 → 2.0

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.
@@ -2,56 +2,50 @@
2
2
  {% assign posts = site.posts_combined %}
3
3
  {% assign num_posts = site.num_posts_combined %}
4
4
 
5
- <div class="underlay top-background">
6
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
7
- <polygon fill="white" points="0,0 100,0 100,60 0,100"/>
8
- </svg>
5
+ {% assign featured_projects = projects | where: "featured", true %}
6
+ {% assign num_featured_projects = featured_projects | size %}
7
+ {% if num_featured_projects > 0 %}
8
+ <section class="featured-projects">
9
+ <h2 class="title">Featured Projects</h2>
9
10
 
10
- {% assign featured_projects = projects | where: "featured", true %}
11
- {% assign num_featured_projects = featured_projects | size %}
12
- {% if num_featured_projects > 0 %}
13
- <section class="featured-projects">
14
- <h2 class="title">Featured Projects</h2>
11
+ <div class="items">
15
12
 
16
- <div class="items">
17
-
18
- {% for item in featured_projects limit:3 %}
19
- <a class="item" href="{{ item.home_url }}" role="article">
20
- <header>
21
- <div class="logo-container">
22
- {% assign symbol_path = item.path | split: "/" | slice: 1, 1 | join: "/" | append: "/assets/symbol.svg" %}
23
- {% assign relative_symbol_path = "/projects/" | append: symbol_path %}
24
- <div class="logo"><img src="{{ relative_symbol_path }}"></div>
25
- </div>
26
- <h3 class="title">{{ item.title }}</h3>
27
- </header>
13
+ {% for item in featured_projects limit:3 %}
14
+ <a class="item" href="{{ item.home_url }}" role="article">
15
+ <header>
16
+ <div class="logo-container">
17
+ {% assign symbol_path = item.path | split: "/" | slice: 1, 1 | join: "/" | append: "/assets/symbol.svg" %}
18
+ {% assign relative_symbol_path = "/projects/" | append: symbol_path %}
19
+ <div class="logo"><img src="{{ relative_symbol_path }}"></div>
20
+ </div>
21
+ <h3 class="title">{{ item.title }}</h3>
22
+ </header>
28
23
 
29
- <p class="body">
30
- {{ item.description }}
31
- </p>
24
+ <p class="body">
25
+ {{ item.description }}
26
+ </p>
32
27
 
33
- <div class="cta-view-project">
34
- <div class="button">View Project</div>
35
- </div>
36
- </a>
37
- {% endfor %}
38
- </div>
39
- </section>
40
- {% endif %}
28
+ <div class="cta-view-project">
29
+ <div class="button">Visit Site</div>
30
+ </div>
31
+ </a>
32
+ {% endfor %}
33
+ </div>
34
+ </section>
35
+ {% endif %}
41
36
 
42
- {% if num_posts > 0 %}
43
- <section class="featured-posts">
44
- <div class="puny-label">Latest news</div>
45
- <h2 class="title">From the Blog</h2>
37
+ {% if num_posts > 0 %}
38
+ <section class="featured-posts">
39
+ <div class="puny-label">Latest news</div>
40
+ <h2 class="title">From the Blog</h2>
46
41
 
47
- <div class="items">
48
- {% for item in posts limit:3 %}
49
- {% include post-card.html post=item %}
50
- {% endfor %}
51
- </div>
52
- </section>
53
- {% endif %}
54
- </div>
42
+ <div class="items">
43
+ {% for item in posts limit:3 %}
44
+ {% include post-card.html post=item %}
45
+ {% endfor %}
46
+ </div>
47
+ </section>
48
+ {% endif %}
55
49
 
56
50
  {% assign other_projects = projects | where: "featured", false %}
57
51
  {% assign num_other_projects = other_projects | size %}
@@ -1,117 +1,19 @@
1
- {% assign software = site.all_software %}
2
- {% assign featured_software = site.featured_software %}
3
- {% assign num_software = site.num_all_software %}
4
- {% assign num_featured_software = site.num_featured_software %}
5
- {% if num_featured_software > 0 %}
6
- {% assign software = featured_software %}
7
- {% endif %}
8
-
9
- {% assign specs = site.all_specs %}
10
- {% assign featured_specs = site.featured_specs %}
11
- {% assign num_specs = site.num_all_specs %}
12
- {% assign num_featured_specs = site.num_featured_specs %}
13
- {% if num_featured_specs > 0 %}
14
- {% assign specs = featured_specs %}
15
- {% endif %}
16
-
17
- {% assign posts = site.posts_combined %}
1
+ {% assign num_featured_software = site.featured_software | size %}
2
+ {% assign num_featured_specs = site.featured_specs | size %}
18
3
  {% assign num_posts = site.num_posts_combined %}
19
4
 
20
- {% assign num_top_items = num_software + num_posts %}
21
-
22
- {% if num_posts > 0 %}
23
- <section class="featured-posts">
24
- <h2 class="title">From the <a href="/blog/">Blog</a></h2>
25
-
26
- <div class="items">
27
- {% for item in posts | limit: site.max_featured_posts %}
28
- {% include post-card.html post=item %}
29
- {% endfor %}
30
- </div>
31
- </section>
32
- {% endif %}
33
-
34
- <div class="underlay top-background">
35
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">
36
- <polygon fill="white" points="0,0 100,0 100,60 0,100"/>
37
- </svg>
38
-
39
- {% if num_software > 0 %}
40
- <section class="software">
41
- {% if num_featured_software >= num_software or num_software <= site.max_featured_software %}
42
- <h2 class="title">Open-source Software</h2>
43
- {% else %}
44
- <h2 class="title">
45
- Featured Software
46
- <a class="more-link" href="/software/" title="See all {{ site.title }} software">(see&nbsp;all)</a>
47
- </h2>
48
- {% endif %}
49
-
50
- <div class="items">
51
- {% for item in software | limit: site.max_featured_software %}
52
- <a class="item" href="{{ item.url }}" role="article">
53
- <div class="logo-container">
54
- {% include software-symbol.html item_id=item.id %}
55
- </div>
56
-
57
- <header>
58
- <h3 class="title">{{ item.title }}</h3>
59
- </header>
60
-
61
- <p class="body">
62
- {{ item.description }}
63
- </p>
64
-
65
- <footer class="meta">
66
- {% include tag-list.html tags=item.tags item_type="software" %}
67
-
68
- {% if item.last_update %}
69
- <section class="last-update">
70
- Last update: {{ item.last_update | date: "%d/%m/%Y" }}
71
- </section>
72
- {% endif %}
73
- </footer>
74
- </a>
75
- {% endfor %}
76
- </div>
77
- </section>
78
- {% endif %}
79
-
80
- {% if num_specs > 0 %}
81
- <section class="specs">
82
- <h2 class="title">
83
- {% if num_featured_specs >= num_specs or num_specs <= site.max_featured_specs %}
84
- Open Specifications
85
- {% else %}
86
- Featured Specifications
87
- <a class="more-link"
88
- href="/specs/" title="See all {{ site.title }} specs">(see&nbsp;all)</a>
89
- {% endif %}
90
- </h2>
91
-
92
- <div class="items">
93
- {% for item in specs | limit: site.max_featured_specs %}
94
- <a class="item" href="{{ item.url }}" role="article">
95
- <header>
96
- <h3 class="title">{{ item.title }}</h3>
97
- </header>
98
-
99
- <p class="body">
100
- {{ item.description }}
101
- </p>
102
-
103
- <footer class="meta">
104
- {% include tag-list.html tags=item.tags item_type="specs" %}
105
-
106
- {% if item.last_update %}
107
- <section class="last-update">
108
- Last update: {{ item.last_update | date: "%d/%m/%Y" }}
109
- </section>
110
- {% endif %}
111
- </footer>
112
- </a>
113
- {% endfor %}
114
- </div>
5
+ {% assign num_posts_specs = num_posts | plus: num_featured_specs %}
6
+
7
+ {% for section_name in site.landing_priority %}
8
+ {% if section_name == "specs" and num_featured_specs > 0 %}
9
+ {% include featured_specs.html %}
10
+ {% elsif section_name == "software" and num_featured_software > 0 %}
11
+ {% include featured_software.html %}
12
+ {% elsif section_name == "blog" and num_posts > 0 %}
13
+ {% include featured_posts.html %}
14
+ {% elsif section_name == "custom_intro" %}
15
+ <section class="custom-intro">
16
+ {% include custom-intro.html %}
115
17
  </section>
116
18
  {% endif %}
117
- </div>
19
+ {% endfor %}
@@ -1,4 +1,3 @@
1
1
  <div class="text">
2
2
  <h1 class="title">{{ page.title }}</h1>
3
- <p class="desc">{{ page.description }}</p>
4
3
  </div>
@@ -28,20 +28,22 @@ supporting expandable navigation widget.
28
28
 
29
29
  {% if is_docs_landing != true %}
30
30
  <header class="documentation-header {% if num_top_nav_items > 0 %} has-nav {% endif %}">
31
- <span class="section-title">
32
- {{ page.title|replace: " ", "&nbsp;" }}
33
- </span>
34
-
35
31
  <div class="nav-header">
36
- {% if include.item_type == 'software' %}
37
- <div class="logo-container">
38
- {% include software-symbol.html item_id=page.id %}
39
- </div>
40
- {% endif %}
32
+ {% if site.one_software %}
33
+ <h3 class="title">
34
+ Docs
35
+ </h3>
36
+ {% else %}
37
+ {% if include.item_type == 'software' %}
38
+ <div class="logo-container">
39
+ {% include software-symbol.html item_id=page.id %}
40
+ </div>
41
+ {% endif %}
41
42
 
42
- <h3 class="title">
43
- <a href="javascript: void 0;">{{ item_data.title }}</a>
44
- </h3>
43
+ <h3 class="title">
44
+ <a href="javascript: void 0;">{{ item_data.title }}</a>
45
+ </h3>
46
+ {% endif %}
45
47
 
46
48
  {% if num_top_nav_items > 0 %}
47
49
  <span class="nav-toggle-icon">
@@ -71,7 +73,7 @@ supporting expandable navigation widget.
71
73
  </span>
72
74
  </a>
73
75
  </li>
74
- {% include item-external-links.html item_type=include.item_type item_data=item_data %}
76
+ {% include item-external-links.html item_data=item_data %}
75
77
  </ul>
76
78
  </li>
77
79
 
@@ -109,7 +111,7 @@ supporting expandable navigation widget.
109
111
  {% if is_docs_landing %}
110
112
  <div class="external-links">
111
113
  <ul class="nav-items">
112
- {% include item-external-links.html item_type=include.item_type item_data=item_data %}
114
+ {% include item-external-links.html item_data=item_data %}
113
115
  </ul>
114
116
  </div>
115
117
  {% endif %}
@@ -1,81 +1,5 @@
1
- {% if include.item_type == 'software' and item_data.repo_url or item_data.docs_url %}
2
- {% if item_data.repo_url %}
3
- <li class="item">
4
- <a href="{{ item_data.repo_url }}">
5
- {% if item_data.repo_url contains "github.com" %}
6
- <span class="ico">
7
- <i class="fab fa-github"></i>
8
- </span>
9
- <span class="lbl">
10
- GitHub
11
- </span>
12
- {% else %}
13
- <span class="ico">
14
- <i class="far fa-code"></i>
15
- </span>
16
- <span class="lbl">
17
- Source Code
18
- </span>
19
- {% endif %}
20
- </a> {% endif %}
21
- {% if item_data.docs_url %}
22
- <li class="item">
23
- <a href="{{ item_data.docs_url }}">
24
- {% if item_data.docs_url contains "rubydoc" %}
25
- <span class="ico">
26
- <i class="far fa-gem"></i>
27
- </span>
28
- <span class="lbl">
29
- RubyDocs
30
- </span>
31
- {% else if item_data.docs_url contains "docs.rs" %}
32
- <span class="ico">
33
- <i class="far fa-book"></i>
34
- </span>
35
- <span class="lbl">
36
- Docs.rs
37
- </span>
38
- {% else %}
39
- <span class="ico">
40
- <i class="far fa-book"></i>
41
- </span>
42
- <span class="lbl">
43
- Docs
44
- </span>
45
- {% endif %}
46
- </a> {% endif %}
47
- {% else if include.item_type == 'specs' and item_data.rfc_id or item_data.ietf_datatracker_id or item_data.source_url %}
48
- {% if item_data.rfc_id %}
49
- <li class="item">
50
- <a href="http://ietf.org/html/rfc{{ item_data.rfc_id }}">
51
- <span class="lbl">
52
- IETF RFC {{ item_data.rfc_id }}
53
- </span>
54
- </a> {% endif %}
55
- {% if item_data.ietf_datatracker_id %}
56
- <li class="item">
57
- <a href="https://datatracker.ietf.org/doc/{{ item_data.ietf_datatracker_id }}{% if page.ietf_datatracker_ver %}-{{ page.ietf_datatracker_ver }}{% endif %}">
58
- <span class="lbl">
59
- IETF document
60
- </span>
61
- </a> {% endif %}
62
- {% if item_data.source_url %}
63
- <li class="item">
64
- <a href="{{ item_data.source_url }}">
65
- {% if item_data.source_url contains "github" %}
66
- <span class="ico">
67
- <i class="fab fa-github"></i>
68
- </span>
69
- <span class="lbl">
70
- Source
71
- </span>
72
- {% else %}
73
- <span class="ico">
74
- <i class="far fa-code"></i>
75
- </span>
76
- <span class="lbl">
77
- Source
78
- </span>
79
- {% endif %}
80
- </a> {% endif %}
81
- {% endif %}
1
+ {% for link in include.item_data.external_links %}
2
+ <li class="{% if forloop.first %}featured{% endif %}">
3
+ {% include external-link.html url=link.url title=link.title %}
4
+ </li>
5
+ {% endfor %}
@@ -1,4 +1,3 @@
1
- {% include nav-page-link.html url="/" title="Home" %}
2
1
  {% assign contact_link = "mailto:" | append: site.contact_email %}
3
2
 
4
3
  {% if site.algolia_search %}
@@ -22,9 +21,14 @@
22
21
 
23
22
  {% else %}
24
23
 
25
- {% if site.num_all_software > 0 %}
26
- {% include nav-page-link.html url="/software/" title="Software ecosystem" active_for_nested=true %}
24
+ {% if site.one_software %}
25
+ {% include nav-page-link.html url=site.one_software.url title="Docs" active_for_nested=true %}
26
+ {% else %}
27
+ {% if site.num_all_software > 0 %}
28
+ {% include nav-page-link.html url="/software/" title="Software" active_for_nested=true %}
29
+ {% endif %}
27
30
  {% endif %}
31
+
28
32
  {% if site.num_all_specs > 0 %}
29
33
  {% include nav-page-link.html url="/specs/" title="Specifications" active_for_nested=true %}
30
34
  {% endif %}
@@ -1,6 +1,7 @@
1
1
  {% if include.active_for_nested %}
2
- {% assign first_component = page.url | split: '/' | slice: 0, 2 | join: '/' | append: '/' %}
3
- {% if first_component == include.url %}
2
+ {% assign first_component_of_current_url = page.url | split: '/' | slice: 0, 2 | join: '/' | append: '/' %}
3
+ {% assign first_component_of_link_url = include.url | split: '/' | slice: 0, 2 | join: '/' | append: '/' %}
4
+ {% if first_component_of_current_url == first_component_of_link_url %}
4
5
  {% assign active_nested = true %}
5
6
  {% else %}
6
7
  {% assign active_nested = false %}
@@ -33,7 +33,12 @@
33
33
  {% assign num_projects = site.projects | size %}
34
34
  <body class="
35
35
  {{ page.html-class }} {{ layout.html-class }}
36
- {% if num_projects > 0 %}site--hub{% else %}site--project{% endif %}
36
+ {% if num_projects > 0 %}
37
+ site--hub
38
+ {% else %}
39
+ site--project
40
+ {% if site.one_software %}site--project--one-software{% endif %}
41
+ {% endif %}
37
42
  {% if page.layout %}layout--{{ page.layout }}{% endif %}">
38
43
  <div class="underlay header">
39
44
  <header>
@@ -9,12 +9,6 @@ layout: default
9
9
  {% assign num_top_nav_items = nav.items | size %}
10
10
 
11
11
  <header class="documentation-header {% if num_top_nav_items > 0 %} has-nav {% endif %}">
12
- {% if title %}
13
- <span class="section-title">
14
- {{ title|replace: " ", "&nbsp;" }}
15
- </span>
16
- {% endif %}
17
-
18
12
  <div class="nav-header">
19
13
  <h3 class="title">
20
14
  {% capture docs_nav_title %}
data/_layouts/home.html CHANGED
@@ -1,7 +1,11 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
+
5
+ {{ content }}
6
+
4
7
  {% assign num_projects = site.projects | size %}
8
+
5
9
  {% if num_projects > 0 %}
6
10
  {% include home-hub.html %}
7
11
  {% else %}