Skip to content

Commit 917c04d

Browse files
authored
Merge pull request creativecommons#317 from creativecommons/update_guidelines
Update guidelines page.
2 parents 8bae84e + 0dcbf41 commit 917c04d

File tree

4 files changed

+128
-18
lines changed

4 files changed

+128
-18
lines changed

content/contributing-code/contents.lr

+2-3
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

models/page.ini

+4
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
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 %}

webpack/sass/main.scss

+63
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,33 @@ a {
1010
text-decoration: none;
1111
}
1212

13+
.markdown {
14+
@extend .body-big;
15+
16+
line-height: 1.6875;
17+
18+
p {
19+
@extend .padding-vertical-small;
20+
}
21+
22+
h1,h2,h3,h4,h5,h6 {
23+
@extend .padding-top-large;
24+
@extend .padding-bottom-small;
25+
}
26+
27+
ol,ul {
28+
@extend .padding-horizontal-big;
29+
}
30+
31+
code {
32+
@extend .has-color-dark-slate-gray;
33+
34+
background-color: $color-lighter-gray;
35+
border: 1px solid $color-lighter-gray;
36+
border-radius: 0.25rem;
37+
}
38+
}
39+
1340
.navbar-item {
1441
&.has-dropdown {
1542
.navbar-dropdown {
@@ -317,3 +344,39 @@ a {
317344
@extend .padding-bottom-xxl;
318345
}
319346
}
347+
348+
.code-guidelines {
349+
.code-guidelines-title {
350+
background-color: $color-lighter-gray;
351+
352+
.container {
353+
@extend .padding-horizontal-bigger;
354+
355+
word-wrap: break-word;
356+
357+
.description {
358+
@extend .body-bigger;
359+
@extend .padding-top-small;
360+
@extend .padding-bottom-xl;
361+
}
362+
}
363+
}
364+
.code-guidelines-body {
365+
@extend .padding-horizontal-big;
366+
367+
.link {
368+
@extend .has-color-forest-green;
369+
}
370+
.is-active {
371+
@extend .has-color-dark-slate-gray;
372+
}
373+
374+
.row {
375+
@extend .padding-top-larger;
376+
}
377+
378+
.content {
379+
@extend .padding-bottom-xxl;
380+
}
381+
}
382+
}

0 commit comments

Comments
 (0)