Skip to content

Commit 2243ceb

Browse files
Creating development principles section (#22)
* Creating development principles section * Update _principles/innersource.md * Update _principles/innersource.md * Minor adjustment on mobile view
1 parent 73b25b5 commit 2243ceb

27 files changed

+512
-93
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ gem "minima", "~> 2.5"
1616
# If you have any plugins, put them here!
1717
group :jekyll_plugins do
1818
gem "jekyll-category-pages"
19+
gem "jekyll-paginate-v2"
1920
end
2021

2122
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem

Gemfile.lock

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ GEM
7373
jekyll-include-cache (0.2.1)
7474
jekyll (>= 3.7, < 5.0)
7575
jekyll-paginate (1.1.0)
76+
jekyll-paginate-v2 (3.0.0)
77+
jekyll (>= 3.0, < 5.0)
7678
jekyll-sass-converter (2.1.0)
7779
sassc (> 2.0.1, < 3.0)
7880
jekyll-seo-tag (2.7.1)
@@ -182,6 +184,7 @@ DEPENDENCIES
182184
bootstrap (~> 5.0.0.beta3)
183185
jekyll (~> 4.2.0)
184186
jekyll-category-pages
187+
jekyll-paginate-v2
185188
jekyll_asset_pipeline (~> 0.6.2)
186189
minima (~> 2.5)
187190
minimal-mistakes-jekyll
@@ -191,4 +194,4 @@ DEPENDENCIES
191194
webrick (~> 1.7)
192195

193196
BUNDLED WITH
194-
2.2.12
197+
2.2.24

_config.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ categories:
3232
- DevOps
3333
- Architecture
3434

35+
collections:
36+
principles:
37+
label: "Our Principles"
38+
permalink: /:collection/:title
39+
output: true
40+
order:
41+
- software-engineering.md
42+
- innersource.md
43+
3544
# Build settings
3645
theme: minimal-mistakes-jekyll
3746
bb_engineering_logo: true
@@ -43,6 +52,7 @@ atom_feed:
4352

4453
plugins:
4554
- jekyll-category-pages
55+
- jekyll-paginate
4656

4757
permalink: /:year/:month/:day/:title
4858

@@ -116,3 +126,34 @@ defaults:
116126
values:
117127
layout: page
118128
author_profile: true
129+
130+
pagination:
131+
enabled: true
132+
debug: false
133+
collection: 'posts'
134+
per_page: 9
135+
permalink: '/page/:num/' # Pages are index.html inside this folder (default)
136+
title: ':title - page :num'
137+
limit: 0
138+
sort_field: 'date'
139+
sort_reverse: true
140+
category: 'posts'
141+
tag: ''
142+
locale: ''
143+
trail:
144+
before: 1
145+
after: 1
146+
extension: html
147+
indexpage: 'index'
148+
149+
autopages:
150+
enabled: true
151+
categories:
152+
layouts:
153+
- 'category.html'
154+
title: 'Posts in category :cat'
155+
permalink: '/category/:cat'
156+
silent: false
157+
slugify:
158+
mode: 'default'
159+
case: false

_data/authors.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,13 @@ Rafael Nascimento:
3434
name : "Rafael Nascimento"
3535
avatar : "assets/images/avatars/rn.png"
3636
bio : "Senior Mobile Engineer - Customer Success"
37+
38+
Craig Walker:
39+
name : "Craig Walker"
40+
avatar : "assets/images/avatars/craig_walker.jpeg"
41+
bio : "Product Director Developer Enablement"
42+
43+
Marco Santarelli:
44+
name : "Marco Santarelli"
45+
avatar : "assets/images/avatars/marco.jpeg"
46+
bio : "Director of Frontend"

_data/navigation.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# main links links
22
main:
3-
- title: "Categories"
4-
id: categories
3+
# removed temporarily as we don't have so many posts
4+
# to be moved to the page body
5+
# - title: "Categories"
6+
# id: categories
7+
- title: "Our Principles"
8+
url: /principles
59
- title: "About"
610
url: /about
711
- title: "Jobs"

_includes/archive-single.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
{% assign title = post.title %}
1111
{% endif %}
1212

13-
<div class="grid__item col-12 {% if include.type == 'grid' %}{% if include.class %}{{ include.class }}{% else %}col-md{% endif %}{% endif %} mb-4">
13+
<div class="{% if include.type == 'grid' %}grid{% else %}list{% endif %}__item col-12 {% if include.type == 'grid' %}{% if include.class %}{{ include.class }}{% else %}col-md{% endif %}{% endif %} mb-4">
1414
<article class="archive__item card" itemscope itemtype="https://schema.org/CreativeWork">
15-
{% if include.type == "grid" and teaser %}
16-
<div class="archive__item-teaser">
15+
{% if teaser %}
16+
<div class="archive__item-teaser {{ post.header.teaser_class }}">
1717
<img src="{{ teaser | relative_url }}" alt="{{ post.header.teaser_alt }}" class="rounded-top">
1818
</div>
1919
{% endif %}

_includes/feature_row.html

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,59 @@
11
{% include base_path %}
22

3-
{% if include.id %}
4-
{% assign feature_row = page.[include.id] %}
5-
{% else %}
6-
{% assign feature_row = page.feature_row %}
7-
{% endif %}
8-
93
<div class="feature__wrapper container">
104

11-
{% for f in feature_row %}
12-
13-
{% if f.url contains "://" %}
14-
{% capture f_url %}{{ f.url }}{% endcapture %}
15-
{% else %}
16-
{% capture f_url %}{{ f.url | prepend: base_path }}{% endcapture %}
17-
{% endif %}
18-
19-
<div class="feature__item{% if include.type %}--{{ include.type }}{% endif %}">
20-
<div class="archive__item">
21-
{% if f.image_path %}
22-
<div class="archive__item-teaser">
23-
<img src=
24-
{% if f.image_path contains "://" %}
25-
"{{ f.image_path }}"
26-
{% else %}
27-
"{{ f.image_path | prepend: "/images/" | prepend: base_path }}"
28-
{% endif %}
29-
alt="{% if f.alt %}{{ f.alt }}{% endif %}">
5+
{% if page.featured %}
6+
{% assign post = site.posts | concat: site.principles | where:"slug",page.featured | first %}
7+
{% else %}
8+
{% assign post = site.posts | first %}
9+
{% endif %}
10+
11+
{% if post.header.teaser %}
12+
{% capture teaser %}{{ post.header.teaser }}{% endcapture %}
13+
{% else %}
14+
{% assign teaser = site.teaser %}
15+
{% endif %}
16+
17+
<div class="feature__item{% if include.type %}--{{ include.type }}{% endif %}">
18+
<div class="archive__item">
19+
{% if teaser %}
20+
<div class="archive__item-teaser {{ post.header.teaser_class }}">
21+
<div class="card overflow-hidden">
22+
<img src="{{ teaser | relative_url }}" alt="{{ post.header.teaser_alt }}">
3023
</div>
31-
{% endif %}
24+
</div>
25+
{% endif %}
3226

33-
<div class="archive__item-body">
34-
{% if f.title %}
35-
<h2 class="archive__item-title">{{ f.title }}</h2>
36-
{% endif %}
27+
<div class="archive__item-body">
28+
{% if post.title %}
29+
<h2 class="archive__item-title">{{ post.title }}</h2>
30+
{% endif %}
3731

38-
{% if f.excerpt %}
39-
<div class="archive__item-excerpt">
40-
{{ f.excerpt | markdownify }}
41-
</div>
42-
{% endif %}
32+
{% if post.excerpt %}
33+
<div class="archive__item-excerpt">
34+
{{ post.excerpt | markdownify }}
35+
</div>
36+
{% endif %}
4337

44-
{% if f.url %}
45-
<p><a href="{{ f_url }}" class="btn {{ f.btn_class }}">{{ f.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a></p>
46-
{% endif %}
47-
</div>
38+
{% if post.url %}
39+
<div class="d-flex">
40+
{% assign categories = post.categories | default: post.category %}
41+
{% for category_name in categories %}
42+
<a class="align-self-end" href="/{{ site.category_path | default: 'category' }}/{{ category_name | slugify }}">
43+
<span class="badge rounded-pill bg-light text-primary">{{ category_name }}</span>
44+
</a>
45+
{% endfor %}
46+
{% unless post.collection contains 'posts' %}
47+
<a class="align-self-end" href="/{{ post.collection }}">
48+
<span class="badge rounded-pill bg-light text-primary">{{ post.collection }}</span>
49+
</a>
50+
{% endunless %}
51+
52+
<a href="{{ post.url }}" class="btn btn-info ms-auto">{{ post.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a>
53+
</div>
54+
{% endif %}
4855
</div>
4956
</div>
50-
{% endfor %}
57+
</div>
5158

5259
</div>

_includes/paginator.html

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{% if paginator.total_pages > 1 %}
2+
<nav>
3+
{% if paginator.page_trail %}
4+
<ul class="pagination justify-content-center">
5+
{% if paginator.previous_page_path %}
6+
<li class="page-item">
7+
<a class="page-link" href="{{ paginator.previous_page_path | prepend: site.baseurl }}" aria-label="Previous">
8+
{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}
9+
</a>
10+
</li>
11+
{% endif %}
12+
{% unless paginator.page_trail.first.num == 1 %}
13+
<li class="page-item"><a class="page-link" href="{{ paginator.first_page_path | prepend: site.baseurl }}">{{ paginator.first_page }}</a></li>
14+
{% unless paginator.page_trail.first.num == 2 %}
15+
<li class="page-item"><span class="page-link">&hellip;</span></li>
16+
{% endunless %}
17+
{% endunless %}
18+
{% for trail in paginator.page_trail %}
19+
<li class="page-item{% if paginator.page == trail.num %} active{% endif %}">
20+
{% if paginator.page == trail.num %}
21+
<span class="page-link">{{ trail.num }}</a>
22+
{% else %}
23+
<a class="page-link" href="{{ trail.path | prepend: site.baseurl }}" title="{{trail.title}}">{{ trail.num }}</a>
24+
{% endif %}
25+
</li>
26+
{% endfor %}
27+
{% unless paginator.page_trail.last.num == paginator.total_pages %}
28+
{% assign penultimate = paginator.total_pages | minus: 1 %}
29+
{% unless paginator.page_trail.last.num == penultimate %}
30+
<li class="page-item"><span class="page-link">&hellip;</span></li>
31+
{% endunless %}
32+
<li class="page-item"><a class="page-link" href="{{ paginator.last_page_path | prepend: site.baseurl }}">{{ paginator.last_page }}</a></li>
33+
{% endunless %}
34+
{% if paginator.next_page_path %}
35+
<li class="page-item">
36+
<a class="page-link" href="{{ paginator.next_page_path | prepend: site.baseurl }}" aria-label="Next">
37+
{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}
38+
</a>
39+
</li>
40+
{% endif %}
41+
</ul>
42+
{% endif %}
43+
</nav>
44+
{% endif %}

_includes/post_pagination.html

Lines changed: 0 additions & 16 deletions
This file was deleted.

_layouts/category.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
---
22
layout: archive
33
---
4-
4+
{% if paginator %}
5+
{% assign posts = paginator.posts %}
6+
{% else %}
7+
{% assign posts = site.posts %}
8+
{% endif %}
59
<div class="row">
610
<section class="col-md-8 col-lg-10">
711
<div class="row">
8-
{% for post in page.posts %}
12+
{% for post in posts %}
913
{% include archive-single.html type="grid" class="col-md-6 col-lg-4" %}
1014
{% endfor %}
1115
</div>

0 commit comments

Comments
 (0)