Skip to content

Commit eb1584f

Browse files
authored
Open Source Program (#22)
🟢 * Adds a custom Open Source template Requires a number of new content elements to display correctly. - [page] Open Source Program `slug:open-source` - [post] Program News `slug:program-news` - [post] Our Mission `slug:our-mission` - [post] Our Vision `slug:our-vision` - [post] [6 open source projects: Bundler, Gemstash, RubyAPI, Ruby Gems, RubyGems.org, The Ruby Toolbox] [tag:hash-oss-project] - [page] Program Support `slug:hash-oss-program-support`
1 parent 0781492 commit eb1584f

File tree

5 files changed

+390
-10
lines changed

5 files changed

+390
-10
lines changed

custom-oss.hbs

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{{!< default}}
2+
<div id="open-source">
3+
{{#post}}
4+
<div class="{{post_class}}">
5+
<h1 class="title">{{title}}</h1>
6+
<div class="two-up">{{content}}</div>
7+
</div>
8+
{{/post}}
9+
10+
<div class="{{post_class}} program-news">
11+
{{#get "posts" filter="slug:program-news"}}
12+
{{#foreach posts}}
13+
<h1 class="call-to-action header">Program News</h1>
14+
<ul>
15+
{{#get "posts" order="desc, title asc" filter="tag:[news]"}}
16+
{{#foreach posts limit="3"}}
17+
<li>{{#link href=(url)}}{{title}}{{/link}}</li>
18+
{{/foreach}}
19+
{{/get}}
20+
</ul>
21+
</div>
22+
{{/foreach}}
23+
{{/get}}
24+
25+
<div class="{{post_class}} mission-and-vision">
26+
{{#get "posts" filter="slug:[hash-oss-our-vision, hash-oss-our-mission]"}}
27+
{{#foreach posts}}
28+
<div class="column">
29+
<h1>{{title}}</h1>
30+
{{{html}}}
31+
</div>
32+
{{/foreach}}
33+
{{/get}}
34+
</div>
35+
36+
<div class="{{post_class}} projects">
37+
<h1 class="title">Projects</h1>
38+
<h2>Learn more about our current and past efforts</h2>
39+
<div class="projects-list">
40+
{{#get "posts" order="featured desc, title asc" filter="tag:[hash-oss-project]"}}
41+
{{#foreach posts}}
42+
<div class="{{post_class}} project">
43+
<h1>{{title}}</h1>
44+
{{{html}}}
45+
</div>
46+
{{/foreach}}
47+
{{/get}}
48+
</div>
49+
<div class="contribute">
50+
{{#get "posts" filter="tag:[hash-oss-contribute]"}}
51+
{{#foreach posts}}
52+
{{#if feature_image}}
53+
<img src="{{feature_image}}" alt="{{title}}" class="feature-image">
54+
{{/if}}
55+
<h1 class="call-to-action header">{{title}}</h1>
56+
<div>{{content}}</div>
57+
{{/foreach}}
58+
{{/get}}
59+
</div>
60+
</div>
61+
62+
<div class="post" aria-labelledby="team-heading">
63+
<h1 id="team-heading" class="title">Team</h1>
64+
<h2>Meet the people behind our program</h2>
65+
<div class="grid">
66+
{{#get "pages" order="featured desc, title asc" filter="tags:hash-oss-team" limit="all" include="feature_image"}}
67+
{{#foreach pages}}
68+
<figure>
69+
{{#if feature_image}}
70+
<img src="{{feature_image}}" alt="{{title}}" class="feature-image team-photo">
71+
{{/if}}
72+
<figcaption class="team-info">
73+
<p class="team-name">{{title}}</p>
74+
{{content}}
75+
</figcaption>
76+
</figure>
77+
{{/foreach}}
78+
{{/get}}
79+
</div>
80+
</div>
81+
<div class="{{post_class}} program-support">
82+
{{#get "pages" filter="tag:[hash-oss-program-support]"}}
83+
{{#foreach pages}}
84+
<h1 class="title">{{title}}</h1>
85+
{{{content}}}
86+
<span>Program-Specific Funding</span>
87+
<span>Donated Services</span>
88+
<span>Memberships</span>
89+
<span>Program-Specific Funding</span>
90+
</div>
91+
{{/foreach}}
92+
{{/get}}
93+
</div>
94+
</div>

default.hbs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,18 @@
2525

2626
<main id="theme-main">
2727
{{!-- All content gets inserted here, index.hbs, post.hbs, etc --}}
28-
<header>
29-
<a href="/" id="main-logo">
30-
<div class="logo-square">
31-
<div class="logo-circle"></div>
32-
</div>
33-
<h1>{{@site.title}}</h1>
34-
</a>
35-
<h2>{{@site.description}}</h2>
36-
</header>
28+
29+
{{#is "home"}}
30+
<header>
31+
<a href="/" id="main-logo">
32+
<div class="logo-square">
33+
<div class="logo-circle"></div>
34+
</div>
35+
<h1>{{@site.title}}</h1>
36+
</a>
37+
<h2>{{@site.description}}</h2>
38+
</header>
39+
{{/is}}
3740

3841
{{{body}}}
3942
</main>

src/css/app.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
/* @import './pages/content.css'; */
2020

2121
@import './rubycentral.css';
22+
@import './open-source.css';
2223

2324
/* Vendor */
2425
@import './vendors/ghost.css';

0 commit comments

Comments
 (0)