Skip to content

Commit f144230

Browse files
Divided main layout html into sections: head, navigation, footer, scripts for easier maintenance (all in _includes).
Modified main layout: default.html to use the new basic sections (includes). Created basic pages: 01_about, 02_getting_started, 03_projects, 04_contact (all html). Removed about.md. Added test for adding posts into a section in index.html (to be removed).
1 parent c1377e7 commit f144230

File tree

14 files changed

+276
-259
lines changed

14 files changed

+276
-259
lines changed

_config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ sass:
1414
sass_dir: _sass
1515
kramdown:
1616
input: GFM
17-
include: ["_test.html", "_static", "pandas/guide/_static", "_pages"]
17+
#include: ["_test.html", "_static", "pandas/guide/_static", "_pages"]
18+
include: ["_pages"]
1819
exclude:
1920
- Gemfile
2021
- Gemfile.lock

_config_dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ sass:
1414
sass_dir: _sass
1515
kramdown:
1616
input: GFM
17-
include: ["_test.html", "_static", "pandas/guide/_static", "_pages"]
17+
#include: ["_test.html", "_static", "pandas/guide/_static", "_pages"]
18+
include: ["_pages"]
1819
exclude:
1920
- Gemfile
2021
- Gemfile.lock

_includes/event.html

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ <h3><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h3>
2323

2424
{% for i in (0..1) %}
2525
<div class="row">
26+
{% for j in (0..1) %}
2627
<div class="no-gutters__col col-sm-6">
2728
<div class="events__spacer"></div>
2829
<div class="events__img-container">
@@ -31,27 +32,12 @@ <h3><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h3>
3132
<i class="events__icon fas fa-external-link-square-alt"></i>
3233
</a>
3334
<div class="events__title-container">
34-
<h2 class="events__img-title">Project: www.python.org (Part 1)</h2>
35-
<p class="events__img-subtitle">Bloomberg, November 1, 2017</p>
35+
<h2 class="events__img-title">Project: {{ post.title}}</h2>
36+
<p class="events__img-subtitle">{{ post.venue }}, {{post.date}}</p>
3637
</div>
3738
</div>
3839
<img class="events__img img-fluid" src="static/images/events_past/python_dot_org_part1_bloomberg_960x539px.jpeg">
3940
</div>
4041
</div>
4142

42-
<div class="no-gutters__col col-sm-6">
43-
<div class="events__spacer"></div>
44-
<div class="events__img-container">
45-
<div class="events__img-overlay">
46-
<a class="events__link" href="https://www.meetup.com/Python-Sprints/events/244062594/" target="_blank">
47-
<i class="events__icon fas fa-external-link-square-alt"></i>
48-
</a>
49-
<div class="events__title-container">
50-
<h2 class="events__img-title">Project: PyMC3</h2>
51-
<p class="events__img-subtitle">Zopa, October 24, 2017</p>
52-
</div>
53-
</div>
54-
<img class="events__img img-fluid" src="static/images/events_past/pymc3_zopa_960x539px.jpeg">
55-
</div>
56-
</div>
5743
</div>

_includes/footer.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<footer class="footer">
2+
<div class="row">
3+
<div class="col-md-4 text-center">
4+
<p class="section-content footer__text">Find Us Online</p>
5+
<hr class="footer__divider">
6+
<a href="https://www.meetup.com/Python-Sprints/" target="_blank"><i class="footer__icon fab fa-meetup"></i></a>
7+
<a href="https://twitter.com/py_sprints" target="_blank"><i class="footer__icon fab fa-twitter"></i></a>
8+
</div>
9+
<div class="col-md-4">
10+
<p class="section-content footer__text">Our Sponsors</p>
11+
<hr class="footer__divider">
12+
<div class="row">
13+
<div class="col-lg-6">
14+
<a class="footer__sponsor-link" href="https://www.linkedin.com/in/hamishpitkeathly/">
15+
<img class="footer__img" src="{{ site.baseurl }}/static/images/sponsors/harvey_nash_130x90.png">
16+
</a>
17+
<a class="footer__sponsor-link" href="https://www.python.org/psf/">
18+
<img class="footer__img" src="{{ site.baseurl }}/static/images/sponsors/python_software_foundation.jpeg">
19+
</a>
20+
</div>
21+
<div class="col-lg-6">
22+
<a class="footer__sponsor-link" href="https://www.touchsurgery.com/jobs.html">
23+
<img class="footer__img" src="{{ site.baseurl }}/static/images/sponsors/touch_surgery.png">
24+
</a>
25+
<a class="footer__sponsor-link" href="https://www.bloomberg.com/careers/">
26+
<img class="footer__img" src="{{ site.baseurl }}/static/images/sponsors/bloomberg.png">
27+
</a>
28+
</div>
29+
</div>
30+
</div>
31+
<div class="col-md-4">
32+
<p class="section-content footer__text">Python Sprints</p>
33+
<hr class="footer__divider">
34+
<a class="footer__link" href="#" target="_blank">About</a>
35+
<a class="footer__link" href="#" target="_blank">Getting Started</a>
36+
<a class="footer__link" href="#" target="_blank">Projects</a>
37+
<a class="footer__link" href="#" target="_blank">Contact</a>
38+
<a class="footer__link" href="#" target="_blank">Credits</a>
39+
</div>
40+
</div>
41+
42+
<div class="footer__content row container-fluid">
43+
<div class="col-md-12">
44+
<p class="section-content footer__text-copyright">
45+
© Copyright
46+
<script>document.write(new Date().getFullYear())</script>
47+
- Python Sprints
48+
<img class="footer__brand-img" src="{{ site.baseurl }}/static/images/site_logo/python_sprints_logo.png" alt="Python Sprints Logo">
49+
50+
</p>
51+
</div>
52+
</div>
53+
</footer>

_includes/head.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<head>
2+
<meta charset="UTF-8">
3+
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
5+
<link href="https://fonts.googleapis.com/css?family=Share+Tech+Mono" rel="stylesheet">
6+
<link href="https://fonts.googleapis.com/css?family=Encode+Sans+Expanded" rel="stylesheet">
7+
<link href="https://fonts.googleapis.com/css?family=Playfair+Display" rel="stylesheet">
8+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
9+
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/static/css/typography.css">
10+
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/static/css/style.css">
11+
<title>
12+
{% if page.title %}
13+
Python Sprints - {{ page.title }}
14+
{% else %}
15+
{{ site.title }}
16+
{% endif %}
17+
</title>
18+
</head>
19+

_includes/navigation.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<nav class="navigation navbar sticky-top navbar-light">
2+
<div class="navigation__brand">
3+
<a class="navigation__brand-link navbar-brand" href="{{ '/' | prepend: site.baseurl }}">
4+
<img class="navigation__brand-img" src="{{ site.baseurl }}/static/images/site_logo/python_sprints_logo.png" alt="Python Sprints Logo">
5+
<span class="navigation__brand-name">Python Sprints</span>
6+
</a>
7+
</div>
8+
9+
<div class="navigation__button-open-container">
10+
<div class="navigation__hamburger-bar"></div>
11+
<div class="navigation__hamburger-bar"></div>
12+
<div class="navigation__hamburger-bar"></div>
13+
</div>
14+
15+
<div class="navigation__button-close-container">
16+
<a href="javascript:void(0)" class="navigation__button-close">
17+
<i class="navigation__button-close fas fa-times"></i>
18+
</a>
19+
</div>
20+
<div class="navigation__overlay">
21+
<div class="navigation__overlay-content">
22+
<a class="navigation__link" href="{{ '/' | prepend: site.baseurl }}">Home</a>
23+
{% for page in site.pages %}
24+
{% if page.title %}
25+
<a class="navigation__link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
26+
{% endif %}
27+
{% endfor %}
28+
</div>
29+
</div>
30+
</nav>

_includes/scripts.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
2+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
3+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
4+
<script src="{{ site.baseurl }}/static/js/site.js"></script>

_layouts/default.html

Lines changed: 11 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,14 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1">
6-
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
7-
<link href="https://fonts.googleapis.com/css?family=Share+Tech+Mono" rel="stylesheet">
8-
<link href="https://fonts.googleapis.com/css?family=Encode+Sans+Expanded" rel="stylesheet">
9-
<link href="https://fonts.googleapis.com/css?family=Playfair+Display" rel="stylesheet">
10-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
11-
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/static/css/typography.css">
12-
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/static/css/style.css">
13-
14-
<title> {{ page.title }}</title>
15-
</head>
16-
<body class="body">
17-
<!--Full screen navigation section-->
18-
<nav class="navigation navbar sticky-top navbar-light">
19-
<div class="navigation__brand">
20-
<a class="navigation__brand-link navbar-brand" href="index.html">
21-
<img class="navigation__brand-img" src="{{ site.baseurl }}/static/images/site_logo/python_sprints_logo.png" alt="Python Sprints Logo">
22-
<span class="navigation__brand-name">Python Sprints</span>
23-
</a>
24-
</div>
25-
26-
<div class="navigation__button-open-container">
27-
<div class="navigation__hamburger-bar"></div>
28-
<div class="navigation__hamburger-bar"></div>
29-
<div class="navigation__hamburger-bar"></div>
30-
</div>
31-
32-
<div class="navigation__button-close-container">
33-
<a href="javascript:void(0)" class="navigation__button-close">
34-
<i class="navigation__button-close fas fa-times"></i>
35-
</a>
36-
</div>
37-
<div class="navigation__overlay">
38-
<div class="navigation__overlay-content">
39-
<a class="navigation__link" href="{{ '/' | prepend: site.baseurl }}">Home</a>
40-
<a class="navigation__link" href="{{ '/about' | prepend: site.baseurl }}">About</a>
41-
<a class="navigation__link" href="#">Getting Started</a>
42-
<a class="navigation__link" href="#">Projects</a>
43-
<a class="navigation__link" href="#">Contact</a>
44-
</div>
45-
</div>
46-
</nav>
47-
48-
49-
{{ content }}
50-
51-
52-
<!--Footer-->
53-
<footer class="footer">
54-
<div class="row">
55-
<div class="col-md-4 text-center">
56-
<p class="section-content footer__text">Find Us Online</p>
57-
<hr class="footer__divider">
58-
<a href="https://www.meetup.com/Python-Sprints/" target="_blank"><i class="footer__icon fab fa-meetup"></i></a>
59-
<a href="https://twitter.com/py_sprints" target="_blank"><i class="footer__icon fab fa-twitter"></i></a>
60-
</div>
61-
<div class="col-md-4">
62-
<p class="section-content footer__text">Our Sponsors</p>
63-
<hr class="footer__divider">
64-
<div class="row">
65-
<div class="col-lg-6">
66-
<a class="footer__sponsor-link" href="https://www.linkedin.com/in/hamishpitkeathly/">
67-
<img class="footer__img" src="{{ site.baseurl }}/static/images/sponsors/harvey_nash_130x90.png">
68-
</a>
69-
<a class="footer__sponsor-link" href="https://www.python.org/psf/">
70-
<img class="footer__img" src="{{ site.baseurl }}/static/images/sponsors/python_software_foundation.jpeg">
71-
</a>
72-
</div>
73-
<div class="col-lg-6">
74-
<a class="footer__sponsor-link" href="https://www.touchsurgery.com/jobs.html">
75-
<img class="footer__img" src="{{ site.baseurl }}/static/images/sponsors/touch_surgery.png">
76-
</a>
77-
<a class="footer__sponsor-link" href="https://www.bloomberg.com/careers/">
78-
<img class="footer__img" src="{{ site.baseurl }}/static/images/sponsors/bloomberg.png">
79-
</a>
80-
</div>
81-
</div>
82-
</div>
83-
<div class="col-md-4">
84-
<p class="section-content footer__text">Python Sprints</p>
85-
<hr class="footer__divider">
86-
<a class="footer__link" href="#" target="_blank">About</a>
87-
<a class="footer__link" href="#" target="_blank">Getting Started</a>
88-
<a class="footer__link" href="#" target="_blank">Projects</a>
89-
<a class="footer__link" href="#" target="_blank">Contact</a>
90-
<a class="footer__link" href="#" target="_blank">Credits</a>
91-
</div>
92-
</div>
93-
94-
<div class="footer__content row container-fluid">
95-
<div class="col-md-12">
96-
<p class="section-content footer__text-copyright">
97-
© Copyright
98-
<script>document.write(new Date().getFullYear())</script>
99-
- Python Sprints
100-
<img class="footer__brand-img" src="{{ site.baseurl }}/static/images/site_logo/python_sprints_logo.png" alt="Python Sprints Logo">
101-
102-
</p>
103-
</div>
104-
</div>
105-
</footer>
106-
<!--Scripts-->
107-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
108-
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
109-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
110-
<script src="{{ site.baseurl }}/static/js/site.js"></script>
111-
</body>
3+
{% include head.html %}
4+
<body class="body">
5+
{% include navigation.html %}
6+
<main>
7+
<article>
8+
{{ content }}
9+
</article>
10+
{% include footer.html %}
11+
</main>
12+
{% include scripts.html %}
13+
</body>
11214
</html>

_pages/01_about.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: default
3+
title: About
4+
permalink: /about/
5+
---
6+
7+
<h1>This is the content of the about page</h1>
8+
<h2>Fill it in !!!!</h2>

_pages/01_about.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)