Skip to content
This repository was archived by the owner on May 21, 2021. It is now read-only.

Commit 11af56f

Browse files
committed
jinja2
--srcpath=templates --static=static --outpath=www --globals=globals.yml
1 parent 5c1cffd commit 11af56f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+283
-1
lines changed

globals.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
jumbotron:
2+
graph: false
3+
4+
ix:
5+
url: "https://monctonix.ca"
6+
shortname: "MonctonIX"
7+
location: "Moncton"
8+
peering_email: "[email protected]"
9+
peeringdb_link: "https://peeringdb.com/fac/3785"
10+
home_questions:
11+
- what_is_ix: "What is an Internet Exchange?"
12+
answer: "An IX (Internet Exchange) allows networks to interconnect on an open-access ethernet fabric -- providing low-latency, high-bandwidth, cost-effectively, in a locale."
13+
- what_is_benefit: "What is the benefit?"
14+
answer: "Networks can exchange traffic faster and better. ISPs, transit providers, DNS services, and content networks will congregate -- it is sensible to interconnect locally."
15+
- how_traffic_exchanged: "How is traffic exchanged?"
16+
answer: "Traffic exchange is facilitated by BGP (Border Gateway Protocol). Networks must have an AS (Autonomous System) number to announce their routes to each other."
17+
- where_is_ix: "Where is MonctonIX"
18+
answer: "The MonctonIX switch is located at Fibre Center, 770 St George Blvd, Moncton, New Brunswick, E1E 2C6, Canada.</p><p>PeeringDB: <a href='https://peeringdb.com/fac/3785' />"
19+
- cost: "How much does it cost?"
20+
answer: "Connecting at the locations is subject to agreements with the facilities, but participation is free until 2019."
21+
- how_to_join: "How do we join?"
22+
answer: "Please read the FAQ (URL to fact) and if this is suitable extend your network into the MonctonIX location please contact <a href='mailto:[email protected]'>[email protected]</a> to connect. Inquiries will be held confidential."

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
hug==2.3.2
2-
staticjinja==0.3.3
2+
git+https://github.com/dzervas/staticjinja.git@b5f40d5

run_ix_website.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import hug
2+
import staticjinja
3+
import yaml

templates/_base.html

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6+
<title>{{ ix.shortname }}: {{ ix.location }} Internet Exchange</title>
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta name="description" content="{{ ix.shortname }}: {{ ix.location }} Internet Exchange Website">
9+
<meta name="author" content="{{ ix.shortname }} - CIRA - CIRA Labs">
10+
11+
12+
{% block css %}
13+
{% endblock %}
14+
<!--<link href="css/bootstrap.css" rel="stylesheet">
15+
<link href="css/bootstrap-responsive.css" rel="stylesheet">-->
16+
17+
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
18+
<!--[if lt IE 9]>
19+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
20+
<![endif]-->
21+
22+
<!-- Fav and touch icons -->
23+
{% include '_icons.html' %}
24+
25+
</head>
26+
27+
<body>
28+
{% block body %}
29+
{% endblock %}
30+
31+
32+
<!-- Le javascript
33+
================================================== -->
34+
<!-- Placed at the end of the document so the pages load faster -->
35+
{% block js %}
36+
{% endblock %}
37+
<!--
38+
<script src="/js/jquery.js"></script>
39+
<script src="/js/bootstrap-transition.js"></script>
40+
<script src="/js/bootstrap-alert.js"></script>
41+
<script src="/js/bootstrap-modal.js"></script>
42+
<script src="/js/bootstrap-dropdown.js"></script>
43+
<script src="/js/bootstrap-scrollspy.js"></script>
44+
<script src="/js/bootstrap-tab.js"></script>
45+
<script src="/js/bootstrap-tooltip.js"></script>
46+
<script src="/js/bootstrap-popover.js"></script>
47+
<script src="/js/bootstrap-button.js"></script>
48+
<script src="/js/bootstrap-collapse.js"></script>
49+
<script src="/js/bootstrap-carousel.js"></script>
50+
<script src="/js/bootstrap-typeahead.js"></script>
51+
-->
52+
53+
54+
55+
56+
57+
</body>
58+
59+
</html>

templates/_icons.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<link rel="apple-touch-icon" sizes="57x57" href="/ico/apple-icon-57x57.png">
2+
<link rel="apple-touch-icon" sizes="60x60" href="/ico/apple-icon-60x60.png">
3+
<link rel="apple-touch-icon" sizes="72x72" href="/ico/apple-icon-72x72.png">
4+
<link rel="apple-touch-icon" sizes="76x76" href="/ico/apple-icon-76x76.png">
5+
<link rel="apple-touch-icon" sizes="114x114" href="/ico/apple-icon-114x114.png">
6+
<link rel="apple-touch-icon" sizes="120x120" href="/ico/apple-icon-120x120.png">
7+
<link rel="apple-touch-icon" sizes="144x144" href="/ico/apple-icon-144x144.png">
8+
<link rel="apple-touch-icon" sizes="152x152" href="/ico/apple-icon-152x152.png">
9+
<link rel="apple-touch-icon" sizes="180x180" href="/ico/apple-icon-180x180.png">
10+
<link rel="icon" type="image/png" sizes="192x192" href="/ico/android-icon-192x192.png">
11+
<link rel="icon" type="image/png" sizes="32x32" href="/ico/favicon-32x32.png">
12+
<link rel="icon" type="image/png" sizes="96x96" href="/ico/favicon-96x96.png">
13+
<link rel="icon" type="image/png" sizes="16x16" href="/ico/favicon-16x16.png">
14+
<link rel="manifest" href="/ico/manifest.json">
15+
<meta name="msapplication-TileColor" content="#ffffff">
16+
<meta name="msapplication-TileImage" content="/ico/ms-icon-144x144.png">
17+
<meta name="theme-color" content="#ffffff">

templates/globals.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
jumbotron:
2+
graph: false
3+
4+
ix:
5+
url: "https://monctonix.ca"
6+
shortname: "MonctonIX"
7+
location: "Moncton"
8+
peering_email: "[email protected]"
9+
peeringdb_link: "https://peeringdb.com/fac/3785"
10+
home_questions:
11+
- what_is_ix: "What is an Internet Exchange?"
12+
answer: "An IX (Internet Exchange) allows networks to interconnect on an open-access ethernet fabric -- providing low-latency, high-bandwidth, cost-effectively, in a locale."
13+
- what_is_benefit: "What is the benefit?"
14+
answer: "Networks can exchange traffic faster and better. ISPs, transit providers, DNS services, and content networks will congregate -- it is sensible to interconnect locally."
15+
- how_traffic_exchanged: "How is traffic exchanged?"
16+
answer: "Traffic exchange is facilitated by BGP (Border Gateway Protocol). Networks must have an AS (Autonomous System) number to announce their routes to each other."
17+
- where_is_ix: "Where is MonctonIX"
18+
answer: "The MonctonIX switch is located at Fibre Center, 770 St George Blvd, Moncton, New Brunswick, E1E 2C6, Canada.</p><p>PeeringDB: <a href='https://peeringdb.com/fac/3785' />"
19+
- cost: "How much does it cost?"
20+
answer: "Connecting at the locations is subject to agreements with the facilities, but participation is free until 2019."
21+
- how_to_join: "How do we join?"
22+
answer: "Please read the FAQ (URL to fact) and if this is suitable extend your network into the MonctonIX location please contact <a href='mailto:[email protected]'>[email protected]</a> to connect. Inquiries will be held confidential."

templates/index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "_base.html" %}
2+
3+
{% block body %}
4+
<div class="container-narrow">
5+
6+
{% block navmenu %}
7+
{% include 'nav/_menu.html' with context %}
8+
{% endblock %}
9+
10+
{% block ix_page_home %}
11+
{% include 'page/ix_home.html' with context %}
12+
{% endblock %}
13+
</div>
14+
{% endblock %}

templates/nav/_menu.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<div class="masthead">
2+
<ul class="nav nav-pills pull-right">
3+
<li class="active">
4+
<a href="#">Home</a>
5+
</li>
6+
<li>
7+
<a href="/about.html">About</a>
8+
</li>
9+
<li>
10+
<a href="/news.html">News</a>
11+
</li>
12+
<li>
13+
<a href="/locations.html">Locations</a>
14+
</li>
15+
<li>
16+
<a href="/peers.html">Peers</a>
17+
</li>
18+
<li>
19+
<a href="/faq.html">FAQ</a>
20+
</li>
21+
<li>
22+
<a href="/links.html">Links</a>
23+
</li>
24+
</ul>
25+
<h3 class="muted">{{ ix.shortname }}</h3>
26+
<hr>
27+
</div>

templates/page/ix_home.html

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<div id="ix_homepage" class="current_page">
2+
{% block titlegraph %}
3+
<div class="jumbotron">
4+
<h4>{{ ix.shortname }}: {{ ix.location }} Internet Exchange</h4>
5+
6+
{% if jumbotron.graph %}
7+
<img src="/graph/e_week.png">
8+
{% endif %}
9+
</div>
10+
{% endblock %}
11+
12+
{% block ixp_questions %}
13+
<div class="row-fluid marketing">
14+
15+
{% for qa in ix.home_questions %}{% set outer_loop = loop %}{% for question, answer in qa.items() %}
16+
{% if (outer_loop.index is divisibleby 4 or outer_loop.index == 1) and loop.index == 1 %}
17+
<div class="span6">
18+
{% endif -%}
19+
20+
21+
<h4>{{ question }}</h4>
22+
<p>{{ answer }}</p>
23+
24+
{%- if (outer_loop.index == 3 or outer_loop.index is divisibleby 6) and loop.index == 2 %}
25+
</div>
26+
{% endif %}
27+
{% endfor %}{% endfor %}
28+
</div>
29+
{% endblock %}
30+
</div>

templates/static/browserconfig.xml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<browserconfig><msapplication><tile><square70x70logo src="/ico/ms-icon-70x70.png"/><square150x150logo src="/ico/ms-icon-150x150.png"/><square310x310logo src="/ico/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
File renamed without changes.

templates/static/css/ix.css

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
body {
2+
padding-top: 20px;
3+
padding-bottom: 40px;
4+
}
5+
6+
7+
/* Custom container */
8+
9+
.container-narrow {
10+
margin: 0 auto;
11+
max-width: 800px;
12+
}
13+
14+
.container-narrow>hr {
15+
margin: 30px 0;
16+
}
17+
18+
19+
/* Main marketing message and sign up button */
20+
21+
.jumbotron {
22+
margin: 20px 0;
23+
text-align: center;
24+
}
25+
26+
.jumbotron h1 {
27+
font-size: 72px;
28+
line-height: 1;
29+
}
30+
31+
.jumbotron .btn {
32+
font-size: 21px;
33+
padding: 14px 24px;
34+
}
35+
36+
37+
/* Supporting marketing content */
38+
39+
.marketing {
40+
margin: 60px 0;
41+
}
42+
43+
.marketing p+h4 {
44+
margin-top: 28px;
45+
}
File renamed without changes.
15.9 KB
22.1 KB
2.83 KB
3.83 KB
6.29 KB
9.23 KB
11.6 KB
12.5 KB
15.9 KB
17.2 KB
21.9 KB
4.77 KB
5.02 KB
6.29 KB
6.76 KB
22.5 KB

templates/static/ico/apple-icon.png

22.5 KB
1.28 KB
2.06 KB
9.23 KB

templates/static/ico/favicon.ico

1.12 KB
Binary file not shown.

templates/static/ico/manifest.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "App",
3+
"icons": [
4+
{
5+
"src": "\/ico\/android-icon-36x36.png",
6+
"sizes": "36x36",
7+
"type": "image\/png",
8+
"density": "0.75"
9+
},
10+
{
11+
"src": "\/ico\/android-icon-48x48.png",
12+
"sizes": "48x48",
13+
"type": "image\/png",
14+
"density": "1.0"
15+
},
16+
{
17+
"src": "\/ico\/android-icon-72x72.png",
18+
"sizes": "72x72",
19+
"type": "image\/png",
20+
"density": "1.5"
21+
},
22+
{
23+
"src": "\/ico\/android-icon-96x96.png",
24+
"sizes": "96x96",
25+
"type": "image\/png",
26+
"density": "2.0"
27+
},
28+
{
29+
"src": "\/ico\/android-icon-144x144.png",
30+
"sizes": "144x144",
31+
"type": "image\/png",
32+
"density": "3.0"
33+
},
34+
{
35+
"src": "\/ico\/android-icon-192x192.png",
36+
"sizes": "192x192",
37+
"type": "image\/png",
38+
"density": "4.0"
39+
}
40+
]
41+
}
15.9 KB
16.9 KB
45.5 KB
6.08 KB
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)