Skip to content

Commit 62c42ec

Browse files
committed
Add bookclub to sidebar menu. Fix link styling
1 parent cd6bc7e commit 62c42ec

File tree

6 files changed

+54
-2
lines changed

6 files changed

+54
-2
lines changed
262 KB
Loading

assets/static/style.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,17 @@ nav a:hover, nav a:focus{
8080
color: #50B990;
8181
}
8282

83-
nav a::before{
83+
nav a::before {
8484
content: "";
8585
display: block;
8686
height: 0.75em;
8787
width: 4px;
88-
background-color: #8aaad9;
88+
background-color: transparent; /* Default to transparent */
8989
position: absolute;
9090
top: 0.25em;
9191
left: 0;
9292
}
93+
94+
nav li.active a::before {
95+
background-color: #8aaad9; /* Only active links get blue */
96+
}

content/bookclub/contents.lr

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,11 @@ we're starting a new book.
3838

3939
---
4040
subtitle: Come Learn with MadPy
41+
---
42+
image: https://madpy.com/static/images/bookclub-logo-1200x630.png
43+
---
44+
image_height: 630
45+
---
46+
image_width: 1200
47+
---
48+
ogdescription: We're a group of folks who meet bi-weekly to talk through a book about programming or software development. This is a great way to learn about new things in the industry, fill in gaps in your knowledge, and talk with other developers.

models/page.ini

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ label = Subtitle
1111
type = string
1212
size = large
1313

14+
[fields.image]
15+
label = Social Media Image
16+
type = url
17+
18+
[fields.image_width]
19+
label = Image width
20+
type = string
21+
22+
[fields.image_height]
23+
label = Image height
24+
type = string
25+
26+
[fields.ogdescription]
27+
label = Social Media Description
28+
type = string
29+
1430
[fields.body]
1531
label = Body
1632
type = markdown

templates/layout.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ <h3 id="logo"><img src="{{ '/static/images/madpy-logo.svg'|url }}" alt="MadPy lo
4444
%}><a href="{{ '/'|url }}">About</a></li>
4545
{% for href, title in [
4646
['/meetups', 'Events'],
47+
['/bookclub', 'Book Club'],
4748
['/sponsorship', 'Sponsorship'],
4849
] %}
4950
<li{% if this.is_child_of(href) %} class="active"{% endif

templates/page.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
{% extends "layout.html" %}
2+
{% block meta_image %}
3+
{% if this.image is defined and this.image_width is defined and this.image_height is defined %}
4+
<meta property="og:image" content="{{ this.image }}"/>
5+
<meta property="og:image:width" content="{{ this.image_width }}"/>
6+
<meta property="og:image:height" content="{{ this.image_height }}"/>
7+
{% else %}
8+
{{ super() }}
9+
{% endif %}
10+
{% endblock %}
11+
{% block meta_title %}
12+
{% if this.title is defined %}
13+
<meta property="og:title" content="{{ this.title }}"/>
14+
{% else %}
15+
{{ super() }}
16+
{% endif %}
17+
{% endblock %}
18+
{% block meta_description %}
19+
{% if this.ogdescription is defined %}
20+
<meta property="og:description" content="{{ this.ogdescription }}"/>
21+
{% else %}
22+
{{ super() }}
23+
{% endif %}
24+
{% endblock %}
225
{% block title %}{{ this.title }}{% endblock %}
326
{% block subtitle %}{{ this.subtitle }}{% endblock %}
427
{% block body %}

0 commit comments

Comments
 (0)