Skip to content

Commit 9bec6ea

Browse files
committed
2 parents 4259dae + e6ff234 commit 9bec6ea

29 files changed

+684
-139
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Clear Cloudflare Cache
2+
on:
3+
push:
4+
branches: [ master ]
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
11+
# Put steps here to build your site, deploy it to a service, etc.
12+
13+
- name: Purge cache
14+
uses: jakejarvis/cloudflare-purge-action@master
15+
env:
16+
# Zone is required by both authentication methods
17+
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
18+
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}

404.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
---
2-
title: Error 404
32
layout: default
3+
suffixes:
4+
- Forgiveness,
5+
- Humour,
6+
- Us
7+
title: Error 404
48
---
59

610
<div class="container">
711
<div class="row">
812
<div class="col-md-12">
913
<div class="error-template">
10-
<h1>
11-
Oops!</h1>
12-
<h2>
13-
404 Not Found</h2>
14+
<h1>Oops!</h1>
15+
<h2>404 Not Found</h2>
1416
<div class="error-details">
15-
Sorry, an error has occured, Requested page not found!
17+
Sorry, an error has occurred. Requested page not found!
1618
</div>
1719
<div class="error-actions">
18-
<a href="index.html" class="btn btn-primary btn-lg"><span class="fas fa-home"></span>
19-
Take Me Home </a><a href="contact.html" class="btn btn-primary btn-lg"><span
20-
class="fas fa-envelope"></span> Contact Us </a>
20+
<a href="index.html" class="btn btn-primary btn-lg"><span class="fas fa-home"></span>Take Me Home</a>
21+
<a href="contact.html" class="btn btn-primary btn-lg"><span class="fas fa-envelope"></span> Contact Us </a>
2122
</div>
2223
</div>
2324
</div>

README.md

Lines changed: 79 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,70 @@
22
This repository holds the code for CodeWith, a group in the UK that offers free coding help and tuition.
33

44
# Our Event
5-
We run the event monthly and manage it all through
6-
[our Slack group](https://www.slack.com/).
5+
We run events online and manage it all through
6+
[our Slack group](https://www.codewith.org.uk/contact.html).
77
It's all free, so if you're in the area please come along!
88

9-
# To add yourself to the people page
9+
You can see our current events at https://www.codewith.org.uk/events.html
10+
11+
# Contributing to this repository
12+
## Repository branches
13+
14+
Branch | Purpose | Who can commit
15+
------------ | ------------- | ---------------
16+
Master | The **Live** branch, commits here will appear in the live website | Maintainers, only from the release branch
17+
Release | Tested code that is ready for the live website | Maintainers, via pull requests
18+
Feature/* | New code being developed | Contributors
19+
20+
## Pull requests
21+
22+
Please submit pull requests with useful descriptions, if you don't know how to use pull requests ask in [our Slack group](https://www.codewith.org.uk/contact.html).
23+
24+
25+
## Testing
26+
27+
Testing is important for maintainers and contributors alike. Ensure all aspects of the site work as the did previously before submitting a pull request.
28+
29+
Things to look out for when testing
30+
31+
* Responsive design - how does the page display on different devices, and different orientations.
32+
* Browser support - Test your changes in a few major browsers, are there any errors?
33+
34+
Before pull requests are merged maintainers should test all aspects of the site.
35+
36+
# Getting started with this site and Jekyll
37+
38+
## What is Jekyll?
39+
40+
Jekyll is a static site generator. It takes text written in your favorite markup language and uses layouts to create a static website. You can tweak the site’s look and feel, URLs, the data displayed on the page, and more.
41+
42+
Quoted from https://jekyllrb.com/docs/
43+
44+
## Jekyll setup
45+
46+
Use [this guide](https://jekyllrb.com/docs/installation/) to setup Jekyll for your operating system.
47+
48+
## Building the site
49+
50+
Open a command line in the root directory of the repository
51+
52+
Run `jekyll build` to build the site, this will produce a `_site` folder with the required content
53+
54+
>:Warning: do not edit anything in the site folder as it will not be comitted and is overwritten everytime you build the site.
55+
56+
To rebuild the site after a file change append `--watch` to the end of the command.
57+
58+
e,g. `jekyll build --watch`
59+
60+
Once you have a `_site` folder open the `index.html` file inside to view the site.
61+
62+
## Includes
63+
64+
Jeykll has functionality to include files, which this site makes extensive use of. You can find the documentation for includes here: https://jekyllrb.com/docs/includes/
65+
66+
# Useful guides
67+
68+
## To add yourself to the people page
1069

1170
* Create a branch
1271
* Make a copy of one of the existing bios in *_data/people/*
@@ -22,11 +81,11 @@ If you need any help, contact one of the pople who have already added themselves
2281
# Sitemap
2382
All pages not defined as a default in _config.yml are added to the sitemap
2483

25-
To exclude a specific page use the snippet `sitemap:false` at the top of the page
84+
To exclude a specific page use the snippet `sitemap: false` at the top of the page
2685

27-
> :warning: **If you are including the page in another page (using `include_relative`)**: add the page as a default in `_config.yml` otherwise the `sitemap:false` is displayed as HTML on the page.
86+
:warning: **If you are including the page in another page (using `include_relative`)**: add the page as a default in `_config.yml` otherwise the `sitemap:false` is displayed as HTML on the page.
2887

29-
## Example default to add to `_config.yml`
88+
### Example default to add to `_config.yml`
3089
```yml
3190
-
3291
scope:
@@ -36,14 +95,21 @@ To exclude a specific page use the snippet `sitemap:false` at the top of the pag
3695
```
3796
3897
All files in `_include` are excluded from the sitemap automatically
39-
# Adding a page to the typed suffix functionality
40-
* Add a variable to the suffix-lists.js file with the first word of the page title. Assign the array you want to use to the variable.
98+
## Adding a page to the typed suffix functionality
99+
100+
* Add a key to the Jekyll build options at the top of the page
41101

42102
e.g.
43103

44-
For a page named "Home"
104+
```
105+
suffixes:
106+
- Databases,
107+
- Docker,
108+
- Git,
109+
- SQL,
110+
- Kubernetes,
111+
- Us
112+
```
113+
114+
45115
46-
```javascript
47-
var Languages = ["Java","HTML"]
48-
var Home = Languages
49-
```

_includes/head.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@
4141
<link rel="stylesheet" href="css/sidebar.css">
4242

4343
<!-- I know scripts aren't supposed to go in the header, but we need this here in order to pick different suffix lists for the typewriter at the top -->
44-
<script src="./js/suffix-lists.js"></script>
4544
<script lang="javascript">
46-
var suffixOptions = eval("{{ page.title }}".split(" ")[0]).map(function(x) { return x.toUpperCase(); });
45+
var suffixOptions = "{{ page.suffixes }}".split(",").map(function(x) { return x.toUpperCase(); });
4746
</script>
4847

4948
</head>

_includes/scripts.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
$.ajax({
2424
"async": true,
2525
"crossDomain": true,
26-
"url": "https://9buw6tj3aj.execute-api.eu-west-2.amazonaws.com/default/",
26+
"url": "https://9buw6tj3aj.execute-api.eu-west-2.amazonaws.com/CodeWithAPI/",
2727
"method": "GET",
2828
"headers": {
2929
"Content-Type": "application/json"
3030
}
3131
}).done(function(data) {
3232
console.log(data.body);
3333

34-
$("#events-scheduled").append(data.content);
34+
$("#events-scheduled").html(data.content);
3535
$("#eventBriteWidgets").append(data.widgets);
3636
$.globalEval(data.widgets);
3737
});

about.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
---
2-
title: About
32
layout: default
3+
suffixes:
4+
- Committee,
5+
- Equity,
6+
- History,
7+
- Leadership,
8+
- Publicity,
9+
- Support,
10+
- Us
11+
title: About
412
---
513

614
<h1>{{page.title}}</h1>
@@ -46,7 +54,7 @@ <h4><a href="people.html#keiran-wilkinson">Keiran Wilkinson</a></h4>
4654
<div class="col-sm-5 col-md-4 col-lg-3 card text-center">
4755
<img class="profile-photo" src="images/jim-profile-photo.png">
4856
<br />
49-
<h4>Jim Evans</h4>
57+
<h4><a href="people.html#jim-evans">Jim Evans</a></h4>
5058
<smaller>Secretary</smaller>
5159
</div>
5260
<div class="col-sm-5 col-md-4 col-lg-3 card text-center">
@@ -58,7 +66,7 @@ <h4>Simon Davey</h4>
5866
<div class="col-sm-5 col-md-4 col-lg-3 card text-center">
5967
<img class="profile-photo" src="images/sean-profile-photo.png">
6068
<br />
61-
<h4>Sean O'Mahoney</h4>
69+
<h4><a href="people.html#sean-omahoney">Sean O'Mahoney</a></h4>
6270
<smaller>Publicity Officer</smaller>
6371
</div>
6472
</div>

activities.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
---
2-
title: Activities
32
layout: default
3+
suffixes:
4+
- codecademy,
5+
- CodeCombat,
6+
- CSSDiner,
7+
- CSSTricks,
8+
- FreeCodeCamp,
9+
- git,
10+
- Javascript,
11+
- Udemy,
12+
- #100DaysOfCode,
13+
- AdventOfCode,
14+
- Box-256,
15+
- CodeWars,
16+
- CodinGame,
17+
- Edabit,
18+
- Reddit,
19+
- Jupyter,
20+
- Us
21+
title: Activities
422
---
523

624
<h1>{{page.title}}</h1>

admin.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: default
3+
suffixes:
4+
- Assistance,
5+
- Power,
6+
- Resources,
7+
- Responsibility,
8+
- Us
9+
title: Home
10+
sitemap: false
11+
---
12+
13+
14+
<h1>Useful Links</h1>
15+
16+
<div class="row">
17+
<div class="col-12">
18+
<h4>
19+
<a href="https://forms.gle/HDu49ukTBM6uLpBCA" target="_blank">Event Request/Kick-Off Form</a>
20+
</h4>
21+
<h4>
22+
<a href="https://analytics.google.com/analytics/web/#/report/visitors-overview/a174926144w242581676p226110493/_u.date00=20200901&_u.date01=20200913" target="_blank">Google Analytics</a>
23+
</h4>
24+
<h4>
25+
<a href="https://drive.google.com/drive/folders/1Tcl8a0EkjOB1FLnkaqtMES6Wg8xoW_tx?usp=sharing" target="_blank">Meeting Minutes</a>
26+
</h4>
27+
<h4>
28+
<a href="https://trello.com/codewith2" target="_blank">Trello</a>
29+
</h4>
30+
</div>
31+
</div>

aws_lambda/create-package.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pip install --target ./package/ requests
2+
cd package/
3+
zip -r9 ../function.zip .
4+
cd ..
5+
zip -g function.zip eventBriteHelper.py

0 commit comments

Comments
 (0)