Skip to content

Commit 20bb92a

Browse files
committed
Add featured projects section
1 parent ac2f087 commit 20bb92a

File tree

5 files changed

+89
-1
lines changed

5 files changed

+89
-1
lines changed

content/contents.lr

+2
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,5 @@ links_plugins:
7070
<h5 class="link-heading"><a href="https://opensource.creativecommons.org/ccsearch-browser-extension/" class="has-text-forest-green">CC Search Browser Extension</a></h5>
7171
<p class="link-caption">Search the Catalog using our Extension.</p>
7272
</div>
73+
#### featured-projects ####
74+
title: Featured Projects

flowblocks/featured-projects.ini

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[block]
2+
name = Featured Projects
3+
4+
[fields.title]
5+
label = Title
6+
type = string

models/home.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ type = string
99
[fields.block_content]
1010
label = Block Content
1111
type = flow
12-
flow_blocks = hero, get-involved
12+
flow_blocks = hero, get-involved, featured-projects
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<section class="featured-projects">
2+
<div class="container">
3+
<div class="level">
4+
<h4 class="is-paddingless level-left">
5+
{{ this.title }}
6+
</h4>
7+
<span class="level-right">
8+
<a class="project-page-link" href="/contributing-code/projects/">See all available projects <i class="icon angle-right"></i></a>
9+
</span>
10+
</div>
11+
<div class="project-list columns">
12+
{% for repo in bag('repos.repos') %}
13+
{% if repo.featured %}
14+
<article class="card entry-post vertical project-index column is-one-third">
15+
<div class="card-content">
16+
<h4 class="card-title b-header"><a href="{{ repo.url }}">{{ repo.english_name }}</a></h4>
17+
<a class="button is-text tiny site-link" href="{{ repo.website }}">
18+
<span>Visit site</span>
19+
<i class="icon external-link"></i>
20+
</a>
21+
<div class="content">
22+
{{ repo.description }}
23+
</div>
24+
<div class="labels">
25+
{% for technology in repo.technologies %}
26+
<button class="button tag">{{ technology }}</button>
27+
{% endfor %}
28+
</div>
29+
<div class="external-links">
30+
<a class="button is-text tiny" href="{{ repo.url }}">
31+
<i class="icon github"></i>
32+
<span class="link-content">Github Repository</span>
33+
</a>
34+
<br>
35+
<a class="button is-text tiny">
36+
<i class="icon slack"></i>
37+
<span class="link-content">Slack channel (#{{ repo.slack }})</span>
38+
</a>
39+
</div>
40+
</div>
41+
</article>
42+
{% endif %}
43+
{% endfor %}
44+
</div>
45+
</div>
46+
</section>

webpack/sass/main.scss

+34
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,40 @@ a {
9090
}
9191
}
9292

93+
.featured-projects {
94+
@extend .padding-vertical-xxl;
95+
96+
.container {
97+
@extend .padding-horizontal-big;
98+
}
99+
100+
.project-page-link {
101+
@extend .has-color-forest-green;
102+
@extend .body-normal;
103+
104+
line-height: 1.5rem;
105+
font-weight: bold;
106+
text-decoration: none;
107+
108+
.icon {
109+
@extend .padding-left-small;
110+
@extend .padding-top-smaller;
111+
}
112+
}
113+
114+
.project-list {
115+
@extend .padding-top-bigger;
116+
@extend .padding-bottom-larger;
117+
118+
.column {
119+
@extend .margin-horizontal-big;
120+
@extend .margin-bottom-larger;
121+
122+
height: 100%;
123+
}
124+
}
125+
}
126+
93127
.breadcrumb-container {
94128
border-top: 4px solid $color-forest-green;
95129
background-color: $color-lighter-gray;

0 commit comments

Comments
 (0)