Skip to content

Commit d0fa83a

Browse files
committed
Resolve conflicts
2 parents da73178 + 0f5d1c0 commit d0fa83a

File tree

10 files changed

+304
-26
lines changed

10 files changed

+304
-26
lines changed

content/contents.lr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ 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+
#### recent-posts ####
74+
title: Recent Blog Post
75+
#### featured-projects ####
76+
title: Featured Projects

content/contributing-code/contents.lr

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ _template: page-with-toc.html
44
---
55
title: Contribution Guidelines
66
---
7+
description: We do all of our development [on GitHub](https://github.com/creativecommons/). If you are not familiar with GitHub or pull requests, [here is an excellent guide to get started](https://guides.github.com/activities/hello-world/).
8+
---
79
body:
810

9-
<p class="lead">Thank you for your interest in contributing to Creative Commons open source projects!</p>
10-
11-
We do all of our development [on GitHub](https://github.com/creativecommons/). If you are not familiar with GitHub or pull requests, [here is an excellent guide to get started](https://guides.github.com/activities/hello-world/).
1211

1312
## Finding an issue
1413

flowblocks/featured-projects.ini

Lines changed: 6 additions & 0 deletions
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

flowblocks/recent-posts.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[block]
2+
name = Recent Posts
3+
4+
[fields.title]
5+
label = Title
6+
type = string

models/home.ini

Lines changed: 1 addition & 1 deletion
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, recent-posts, featured-projects

models/page.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ label = {{ this.title }}
66
label = Title
77
type = string
88

9+
[fields.description]
10+
label = Title
11+
type = markdown
12+
913
[fields.body]
1014
label = Body
1115
type = markdown
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
<div class=" column is-one-third">
15+
<article class="card entry-post vertical project-index">
16+
<div class="card-content">
17+
<h4 class="card-title b-header"><a href="{{ repo.url }}">{{ repo.english_name }}</a></h4>
18+
<a class="button is-text tiny site-link" href="{{ repo.website }}">
19+
<span>Visit site</span>
20+
<i class="icon external-link"></i>
21+
</a>
22+
<div class="content">
23+
{{ repo.description }}
24+
</div>
25+
<div class="labels">
26+
{% for technology in repo.technologies %}
27+
<button class="button tag">{{ technology }}</button>
28+
{% endfor %}
29+
</div>
30+
<div class="external-links">
31+
<a class="button is-text tiny" href="{{ repo.url }}">
32+
<i class="icon github"></i>
33+
<span class="link-content">Github Repository</span>
34+
</a>
35+
<br>
36+
<a class="button is-text tiny">
37+
<i class="icon slack"></i>
38+
<span class="link-content">Slack channel (#{{ repo.slack }})</span>
39+
</a>
40+
</div>
41+
</div>
42+
</article>
43+
</div>
44+
{% endif %}
45+
{% endfor %}
46+
</div>
47+
</div>
48+
</section>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{% from "macros/author_name.html" import render_author_name %}
2+
3+
<section class="recent-posts">
4+
<div class="container">
5+
<div class="level">
6+
<h4 class="is-paddingless level-left">
7+
{{ this.title }}
8+
</h4>
9+
<span class="level-right">
10+
<a class="posts-link" href="/blog">See all posts <i class="icon angle-right"></i></a>
11+
</span>
12+
</div>
13+
<div class="columns">
14+
{% for post in site.query('/blog/entries') %}
15+
{% if loop.index <= 3 %}
16+
{% set author = post.parent.parent.children.get('authors').children.get(post.author) %}
17+
<div class="column is-one-third is-paddingless padding-horizontal-big padding-top-bigger">
18+
<article class="card entry-post horizontal no-border blog-entry">
19+
<header>
20+
<figure class="image blog-image">
21+
{% if author.about %}
22+
{% if author.md5_hashed_email %}
23+
<img class="profile" src="https://secure.gravatar.com/avatar/{{ author.md5_hashed_email }}?size=200"
24+
alt="gravatar" />
25+
{% endif %}
26+
{% endif %}
27+
</figure>
28+
</header>
29+
<div class="blog-content">
30+
<h4 class="b-header"><a class="has-color-dark-slate-gray" href="{{ post|url }}">{{ post.title }}</a></h4>
31+
<span class="blog-author">by <a class="author-name" href="{{ author|url }}">{{ render_author_name(author) }}</a>
32+
on {{ post.pub_date|dateformat("YYYY-MM-dd") }}</span>
33+
<div class="excerpt">
34+
{{ post.body | excerpt | string | striptags() | truncate(100) }}
35+
</div>
36+
</div>
37+
</article>
38+
</div>
39+
{% endif %}
40+
{% endfor %}
41+
</div>
42+
</div>
43+
</section>
Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,65 @@
11
{% extends "layout.html" %}
2-
{% block title %}{{ this.title }}{% endblock %}
2+
33
{% block body %}
4-
<div class="card toc-card bg-light">
5-
<div class="card-body">
6-
<ul class="toc list-unstyled">
7-
{% for item in this.body.toc %}
8-
<li><a href="#{{ item.anchor }}">{{ item.title }}</a></li>
9-
{% if item.children %}
10-
<ul class="toc list-unstyled pl-4">
11-
{% for subitem in item.children %}
12-
<li><a href="#{{ subitem.anchor }}">{{ subitem.title }}</a></li>
13-
{% endfor %}
14-
</ul>
4+
<div class="code-guidelines">
5+
<header class="code-guidelines-title">
6+
<div class="container is-paddingless">
7+
<h1>{{ this.title }}</h1>
8+
<div class="description column is-9 is-paddingless">
9+
{{ this.description }}
10+
</div>
11+
</div>
12+
</header>
13+
<div class="container code-guidelines-body">
14+
<div class="columns">
15+
<div class="column is-one-quarter">
16+
<div class="row">
17+
{% if this.is_child_of('/contributing-code') %}
18+
<aside class="menu sidebar-menu">
19+
<ul class="menu-list">
20+
<li>
21+
<a class="{% if this.is_child_of('/contributing-code/projects') %} is-active {% endif%} link" href="{{ '/contributing-code/projects'|url }}">Project List</a>
22+
</li>
23+
<hr class="divider">
24+
<li>
25+
<a class="{% if this.is_child_of('/contributing-code') %} is-active {% endif%} link" href="{{ '/contributing-code'|url }}">Contribution Guidelines</a>
26+
<ul>
27+
<li><a class="{% if this.is_child_of('/contributing-code/pr-guidelines') %} is-active {% endif%} link" href="{{ '/contributing-code/pr-guidelines'|url }}"><i class="icon circle-filled"></i>PR Guidelines</a></li>
28+
<li><a class="{% if this.is_child_of('/contributing-code/github-repo-guidelines') %} is-active {% endif%} link" href="{{ '/contributing-code/github-repo-guidelines'|url }}"><i class="icon circle-filled"></i>Github Repo Guidelines</a></li>
29+
</ul>
30+
</li>
31+
<hr class="divider">
32+
<li>
33+
<a class="link" href="{{ '/contributing-code/cc-search'|url }}">CC Search</a>
34+
</li>
35+
</ul>
36+
</aside>
1537
{% endif %}
16-
{% endfor %}
17-
</ul>
38+
</div>
39+
<div class="row">
40+
<h4 class="b-header">On this page</h4>
41+
<aside class="menu table-of-contents">
42+
<ul class="menu-list">
43+
{% for item in this.body.toc %}
44+
<li>
45+
<a class="link" href="#{{ item.anchor }}">{{ item.title }}</a>
46+
{% if item.children %}
47+
<ul>
48+
{% for subitem in item.children %}
49+
<li><a class="link" href="#{{ subitem.anchor }}"><i class="icon circle-filled"></i>{{ subitem.title }}</a></li>
50+
{% endfor %}
51+
</ul>
52+
{% endif %}
53+
</li>
54+
{% endfor %}
55+
</ul>
56+
</aside>
57+
</div>
58+
</div>
59+
<div class="column markdown content">
60+
{{ this.body }}
61+
</div>
62+
</div>
1863
</div>
1964
</div>
20-
{{ this.body }}
2165
{% endblock %}

0 commit comments

Comments
 (0)