Skip to content

Commit 01b2513

Browse files
authored
Modern (#23)
📗 New layout details to support Corporate Sponsors page and consolidate styles with recent Open Source page changes.
1 parent 2a41f27 commit 01b2513

File tree

7 files changed

+235
-172
lines changed

7 files changed

+235
-172
lines changed

custom-modern-open-source.hbs

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

custom-modern.hbs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{!< default}}
2+
{{#post}}
3+
<div id="modern">
4+
<div class="{{post_class}}">
5+
<h1>{{title}}</h1>
6+
<aside class="gh-sidebar">
7+
<div class="gh-toc"></div>
8+
</aside>
9+
<div class="post-content">{{content}}</div>
10+
</div>
11+
</div>
12+
{{/post}}
13+
{{#contentFor 'scripts'}}
14+
<script src="{{asset 'dist/post.js'}}" defer></script>
15+
{{/contentFor}}

custom-oss.hbs

-94
This file was deleted.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rubycentral-theme",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A Ghost theme for Ruby Central",
55
"engines": {
66
"ghost": ">=4.0.0"

src/css/app.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/* @import './pages/content.css'; */
2020

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

2424
/* Vendor */
2525
@import './vendors/ghost.css';

src/css/layout/navigation.css

+15-15
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ footer ul {
1212
font-size: var(--small);
1313
}
1414

15-
nav, nav ul {
15+
nav,
16+
nav ul {
1617
display: flex;
1718
width: 100%;
19+
align-items: center;
20+
max-width: 1024px;
1821
justify-content: space-between;
22+
margin: 0 auto;
1923
}
2024

2125
nav .logo-circle {
22-
transition: transform .25s ease-in-out;
26+
transition: transform 0.25s ease-in-out;
2327
flex-shrink: 0;
2428
width: 30px;
2529
height: 30px;
@@ -28,18 +32,14 @@ nav .logo-circle {
2832
margin: 10px 0 0 0;
2933
border-radius: 30px;
3034
box-shadow: 0 9px 18px rgba(129, 0, 0, 0.3), 0 2px 5px rgba(137, 0, 0, 0.2);
31-
background: no-repeat center 6px / 80% url(/assets/images/gem-logo.svg), linear-gradient(to top, #DF3434 0%, #FB5E55 100%);
35+
background: no-repeat center 6px / 80% url(/assets/images/gem-logo.svg),
36+
linear-gradient(to top, #df3434 0%, #fb5e55 100%);
3237
}
3338

3439
nav .logo-circle {
3540
transform: scale(1.05);
3641
}
3742

38-
nav > ul > li:last-child {
39-
margin-left: auto;
40-
margin-right: 1.5rem;
41-
}
42-
4343
footer {
4444
padding: 130px 0;
4545
text-align: center;
@@ -60,15 +60,15 @@ nav > ul > li:last-child > a {
6060
}
6161

6262
nav li.subitem {
63-
text-align: center;
63+
text-align: center;
6464
}
6565

6666
footer ul.nav a {
6767
padding: 15px 20px;
6868
}
6969
footer .nav .nav-contact-us > a > span {
7070
background-attachment: local;
71-
background-image: url("/assets/images/contact-icon.svg");
71+
background-image: url('/assets/images/contact-icon.svg');
7272
background-clip: padding-box;
7373
background-origin: padding-box;
7474
background-repeat: no-repeat;
@@ -133,19 +133,19 @@ nav .menu-icon.close {
133133
margin: 4.5rem 0px;
134134
z-index: 2;
135135
background: #fff;
136-
border: 2px solid #F4EEE6;
136+
border: 2px solid #f4eee6;
137137
border-top: none;
138138
border-radius: 0 0 0 20px;
139-
transition: right .4s ease-in-out;
139+
transition: right 0.4s ease-in-out;
140140
box-shadow: -4px 4px 5px rgba(253, 204, 204, 0.3);
141141
}
142142

143143
nav ul:before {
144-
content: "";
144+
content: '';
145145
position: absolute;
146146
left: -203%;
147147
top: 0;
148-
border: 2px solid #F4EEE6;
148+
border: 2px solid #f4eee6;
149149
border-left: none;
150150
border-bottom: none;
151151
border-radius: 0 20px 0 0;
@@ -174,7 +174,7 @@ nav .menu-icon.close {
174174
}
175175

176176
nav ul {
177-
width: 50%
177+
width: 50%;
178178
}
179179

180180
nav ul::before {

0 commit comments

Comments
 (0)