Skip to content

Commit 1aa3147

Browse files
committed
Merge branch 'master' into render-markdown
2 parents edaf410 + aa576bb commit 1aa3147

20 files changed

+152
-43
lines changed

content/sass/base/_color.scss

+1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ $body-bg: white;
66

77
$list-bg: lavender;
88

9+
$btn: darkgray;
910
$tags: lightgreen;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
button:focus {
2+
outline:0;
3+
}
4+
5+
#form-submit-button {
6+
background-color: $btn;
7+
padding: .5em;
8+
}
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@import "base/color";
2+
3+
@import "components/form-button";
4+
5+
#contact-form {
6+
width:90%;
7+
margin: 0 auto;
8+
padding: .5em;
9+
text-align: center;
10+
background-color: $list-bg;
11+
12+
@include md {
13+
width: 50%;
14+
}
15+
}
16+
17+
#call-to-action {
18+
width: 95%;
19+
display: block;
20+
margin: 1em auto;
21+
}
22+
23+
form label {
24+
width: 90%;
25+
display: block;
26+
margin: 0 auto;
27+
text-align: left;
28+
}
29+
30+
#name-input, #email-input, #message-input {
31+
width: 90%;
32+
display: block;
33+
margin: 0 auto 1em auto;
34+
padding: .2em 0;
35+
font-family: sans-serif;
36+
font-size: 1.6rem;
37+
}
38+
39+
#message-input {
40+
resize: vertical;
41+
}

pages/about.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
title: About
2+
template: call_to_action.html
23
name: Who We Are
3-
CallToActionText: "We'd love to learn more about your next big project. Get in touch, and let's get started!"
4+
call_to_action_text: We'd love to learn more about your next big project. Get in touch, and let's get started!
45
HideCallToAction: false
56
---
67

pages/blog/helloworld.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
content_type: BlogPost
22
title: Hello World!
33
authors:
4-
- Alysha
5-
- Janis
4+
- Alysha Iannetta
5+
- Janis Lesinskis
66
posted: 2018-07-07T20:00:00
77
modified: 2018-07-08T20:00:00
88
category: software

pages/blog/post.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
content_type: BlogPost
22
title: Post!
33
authors:
4-
- Alysha
4+
- Aapeli Vuorinen
5+
- Allison Smith
6+
- David Lake
57
posted: 2018-07-07T20:00:00
68
category: software
79
tags:

pages/contact.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
title: Contact
2+
template: call_to_action.html
3+
call_to_action_text: call to action text
24
---
35

4-
contact

pages/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
title: Home
23
in_menu: False
34
---

pages/static/css/main.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
@import "base/color", "base/fonts", "base/reset", "base/base";
66

7-
@import "partials/header", "partials/footer", "partials/container";
7+
@import "partials/header", "partials/footer", "partials/container", "partials/contact-form";

plugins.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class BlogPost(Templated, Content):
1919

2020
class Page(Templated, Content):
2121
in_menu: bool = True
22+
call_to_action_text: str
2223

2324
class TeamMember(Templated, Content):
2425
name: str

templates/blog/author_link.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% for member in members %}
2+
3+
<!-- TODO: format authors -->
4+
{% if author.__contains__(member.name) %}
5+
<a href="{{ member.url }}">{{ member.name }}</a>
6+
{% endif %}
7+
8+
{% endfor %}

templates/blog/post_card.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div class="list-container">
2+
<h2 class="post-title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
3+
<p>{{ post.summary }}</p>
4+
<p class="post-about">
5+
Published on <time datetime="">{{ post.posted }}</time> by
6+
{% for author in post.authors %}
7+
{% include "blog/author_link.html" author=author, members=site.content["team.yaml"].pages %}
8+
{% endfor %}.
9+
{% if post.modified %}
10+
<br />
11+
Modified on <time datetime="">{{ post.modified }}</time>.
12+
{% endif %}
13+
</p>
14+
<div class="tags">
15+
{% for tag in post.tags %}<a class="post-tag" href="" class="tags">{{ tag }}</a>{% endfor %}
16+
</div>
17+
</div>

templates/blog/post_detail.html

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ <h1>{{ this.title }}</h1>
88
<h4>
99
Published on <time datetime="">{{ this.posted }}</time> by
1010
{% for author in this.authors %}
11-
<a href="">{{ author }}</a>
11+
{% include "blog/author_link.html" author=author, members=site.content["team.yaml"].pages %}
1212
{% endfor %}.
1313
</h4>
1414
{% if page.modified %}
15-
<br />
16-
<h4>Modified on <time datetime="">{{ this.modified }}</time>.</h4>
15+
<br />
16+
<h4>Modified on <time datetime="">{{ this.modified }}</time>.</h4>
1717
{% endif %}
18-
<p>category: <a href="">{{ this.category }}</a></p>
18+
<p>category: <a href="" class="tags">{{ this.category }}</a></p>
1919
<p>{{ this.content }}</p>
20-
<!-- TODO: include author/s card -->
20+
21+
{% for author in this.authors %}
22+
{% include "team/team_list.html" author=author, members=site.content["team.yaml"].pages %}
23+
{% endfor %}
24+
2125
{% for tag in this.tags %}<a class="post-tag" href="" class="tags">{{ tag }}</a>{% endfor %}
2226
{% endblock %}

templates/blog/post_list.html

+9-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
<div class="list-container">
2-
<h2 class="post-title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
3-
<p>{{ post.summary }}</p>
4-
<p class="post-about">
5-
Published on <time datetime="">{{ post.posted }}</time> by
6-
{% for authors in post.authors %}
7-
<a href="">{{ authors }}</a>
8-
{% endfor %}.
9-
{% if post.modified %}
10-
<br />
11-
Modified on <time datetime="">{{ post.modified }}</time>.
12-
{% endif %}
13-
</p>
14-
<div class="tags">
15-
{% for tag in post.tags %}<a class="post-tag" href="" class="tags">{{ tag }}</a>{% endfor %}
16-
</div>
17-
</div>
1+
{% if this.url.__contains__('/blog.html') %}
2+
{% include "blog/post_card.html" %}
3+
{% else %}
4+
{% for author in post.authors %}
5+
{% if member.__contains__(author) %}
6+
{% include "blog/post_card.html" %}
7+
{% endif }
8+
{% endif %}
9+
{% endfor %}

templates/call_to_action.html

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% extends "base.html" %}
2+
3+
{% block title %}{{ this.title }}{% endblock %}
4+
5+
{% block content %}
6+
<h2>{{ this.title }}</h2>
7+
<p>{{ this.content }}</p>
8+
{% include "contact/contact_form.html" %}
9+
{% endblock %}

templates/contact/contact_form.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<form id="contact-form" action="" method="">
2+
<h3 id="call-to-action">{{ this.call_to_action_text }}</h3>
3+
<label for="name">Name and/or company: </label>
4+
<input type="text" id="name-input" name="name" placeholder="Your name and/or company">
5+
<label for="contact">Email address or contact number: </label>
6+
<input type="email" id="email-input" name="contact" placeholder="Email address or contact number">
7+
<label for="message">Message: </label>
8+
<textarea id="message-input" name="message" rows=5 placeholder="Tell us a little bit about you and/or your company"></textarea>
9+
<button type="submit" id="form-submit-button">Submit</button>
10+
</form>

templates/team.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@
44
{% block css %}<link rel="stylesheet" type="text/css" href="/static/css/pages/team.css">{% endblock %}
55

66
{% block content %}
7-
{% for member in site.content["team.yaml"].pages %}
8-
{% include "team/team_list.html" %}
9-
{% endfor %}
7+
{% include "team/team_list.html" members=site.content["team.yaml"].pages %}
108
{% endblock %}

templates/team/team_card.html

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="list-container">
2+
<h2 class="team-title">{{ member.name }}</h2>
3+
<p class="team-role">{{ member.role }}, {{ member.location }}</p>
4+
<div class="team-content">
5+
<img class="team-img" href="static/images/{{ member.photo }}" alt="picture of {{ member.name }}">
6+
<p class="team-summary">{{ member.summary }}</p>
7+
</div>
8+
<a class="team-link" href="{{ member.url }}">read more</a>
9+
</div>

templates/team/team_detail.html

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
{% extends "base.html" %}
22

33
{% block title %}{{ this.title }}{% endblock %}
4+
{% block css %}<link rel="stylesheet" type="text/css" href="/static/css/pages/team.css">{% endblock %}
45

56
{% block content %}
67
<h1>{{ this.name }}</h1>
78
<p>{{ this.role }}, {{ this.location }}</p>
89
<img href="static/images/{{ this.img }}" alt="picture of {{ this.name }}">
910
<p>{{ this.content }}</p>
1011
{% if this.personalURL %}
11-
<p>{{ this.name }} has a personal website here: <a href="{{ this.personalURL }}">{{ this.personalURL }}</a></p>
12+
<p>{{ this.name }} has a personal website here: <a href="{{ this.personalURL }}">{{ this.personalURL }}</a></p>
1213
{% endif %}
1314
{% for url in this.socialURL %}
14-
<a href="{{ this.socialURL[url] }}">{{ url }}</a>
15+
<a href="{{ this.socialURL[url] }}">{{ url }}</a>
16+
{% endfor %}
17+
18+
<h4>Posts by {{ this.name }}</h4>
19+
{% for post in site.content["blog.yaml"].pages %}
20+
{% include "blog/post_list.html" member=this.name %}
1521
{% endfor %}
16-
<!-- TODO: include posts by this team member -->
1722

1823
{% endblock %}

templates/team/team_list.html

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
<div class="list-container">
2-
<h2 class="team-title">{{ member.name }}</h2>
3-
<p class="team-role">{{ member.role }}, {{ member.location }}</p>
4-
<div class="team-content">
5-
<img class="team-img" href="static/images/{{ member.photo }}" alt="picture of {{ member.name }}">
6-
<p class="team-summary">{{ member.summary }}</p>
7-
</div>
8-
<a class="team-link" href="{{ member.url }}">read more</a>
9-
</div>
1+
{% for member in members %}
2+
{% if not author %}
3+
{% include "team/team_card.html" %}
4+
{% else %}
5+
{% if author.__contains__(member.name) %}
6+
{% include "team/team_card.html" %}
7+
{% endif %}
8+
9+
{% endif %}
10+
{% endfor %}

0 commit comments

Comments
 (0)