Skip to content

Commit

Permalink
Use Jinja template to reduce duplication
Browse files Browse the repository at this point in the history
Use a Jinja variable to pass the correct url for each environment.
  • Loading branch information
sturmer committed Feb 8, 2021
1 parent 6a06a77 commit a172553
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
17 changes: 0 additions & 17 deletions content/at.html/contents.lr

This file was deleted.

2 changes: 1 addition & 1 deletion content/beta.html/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ body:
- <a name="#digital" href="#digital">Fragment Digital</a>
- <a name="#textual" href="#textual">Fragment Textual</a>
---
_template: glia-page.html
_template: glia-beta-page.html
1 change: 1 addition & 0 deletions templates/glia-page.html → templates/glia-at-page.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "glia-layout.html" %}
{% block glia_env %}at{% endblock %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
<h2>{{ this.title }}</h2>
Expand Down
7 changes: 7 additions & 0 deletions templates/glia-beta-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "glia-layout.html" %}
{% block glia_env %}beta{% endblock %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
<h2>{{ this.title }}</h2>
{{ this.body }}
{% endblock %}
2 changes: 1 addition & 1 deletion templates/glia-layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>{% block title %}Welcome{% endblock %} — Gergelim</title>

<!-- The only thing I needed :) -->
<script src="https://api.at.samo.io/salemove_integration.js?"></script>
<script src="https://api.{% block glia_env %}{% endblock %}.samo.io/salemove_integration.js?"></script>
</head>
<body>
<header>
Expand Down

0 comments on commit a172553

Please sign in to comment.