Skip to content

Commit 48dab4e

Browse files
committed
Separate content and template for hero section
1 parent 71b336a commit 48dab4e

File tree

6 files changed

+40
-14
lines changed

6 files changed

+40
-14
lines changed

content/contents.lr

+22-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,25 @@ _template: home.html
55
block_content:
66

77
#### hero ####
8-
_template: blocks/hero.html
8+
title:
9+
10+
We have been building <span class="has-text-forest-green">free software</span> at <span class="has-text-gold">Creative Commons</span> for over a decade.
11+
----
12+
description:
13+
14+
We work on code and products that support digital creativity and sharing, from usability of our legal tools to enabling discovery of CC-licensed content.
15+
----
16+
links:
17+
18+
<a class="button small is-info margin-top-bigger" href="/community">Join the Developer Community</a>
19+
<br />
20+
<a class="button small margin-top-normal" href="https://twitter.com/creativecommons"><i class="icon twitter margin-right-small padding-vertical-smaller"></i>Follow us on twitter</a>
21+
22+
#### get-involved ####
23+
title:
24+
25+
26+
----
27+
content:
28+
29+

flowblocks/hero.ini

+12
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
[block]
22
name = Hero
3+
4+
[fields.title]
5+
label = Title
6+
type = html
7+
8+
[fields.description]
9+
label = Description
10+
type = text
11+
12+
[fields.links]
13+
label = Links
14+
type = html

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
12+
flow_blocks = hero, get-involved
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% block title %}{{ this.title }}{% endblock %}
21
<div>
2+
{{ this.title }}
33
{{ this.content }}
44
</div>

themes/vocabulary_theme/templates/blocks/hero.html

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1+
12
<section>
23
<h1 class="column is-9 is-paddingless">
3-
We have been building
4-
<span class="has-text-forest-green">free software</span> at
5-
<span class="has-text-gold">Creative Commons</span> for over a decade.
4+
{{ this.title }}
65
</h1>
76
<div class="columns">
87
<div class="column is-one-third">
98
<p class="body-bigger margin-top-big">
10-
We work on code and products that support digital creativity and
11-
sharing, from usability of our legal tools to enabling discovery of
12-
CC-licensed content.
9+
{{ this.description }}
1310
</p>
14-
<a class="button small is-info margin-top-bigger" href="/community">Join the Developer Community</a>
15-
<br />
16-
<a class="button small margin-top-normal" href="https://twitter.com/creativecommons"><i
17-
class="icon twitter margin-right-small"></i>Follow us on twitter</a>
11+
{{ this.links }}
1812
</div>
1913
<div class="column">
2014
<img src="./github.svg" />

themes/vocabulary_theme/templates/home.html

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{% extends "layout.html" %}
2-
{% block title %}{{ this.title }}{% endblock %}
32

43
{% block body %}
54
{% for block in this.block_content.blocks %}

0 commit comments

Comments
 (0)