Browse Source

Move description to config file

mistress
Daniel Muckerman 4 years ago
parent
commit
a29d4602b8
3 changed files with 6 additions and 2 deletions
  1. +3
    -1
      app.py
  2. +2
    -0
      config/config.yaml
  3. +1
    -1
      templates/index.j2

+ 3
- 1
app.py View File

@ -13,6 +13,8 @@ with open('config/config.yaml') as f:
search = yaml_data['search'] search = yaml_data['search']
account_url = yaml_data['accounts']['account_url'] account_url = yaml_data['accounts']['account_url']
description = yaml_data['description']
apps = [] apps = []
for itm in yaml_data['apps'].items(): for itm in yaml_data['apps'].items():
apps.append(itm[1]) apps.append(itm[1])
@ -20,7 +22,7 @@ for itm in yaml_data['apps'].items():
@app.route('/') @app.route('/')
def index(): def index():
return render_template('index.j2', apps = apps, search = search, account_url = account_url)
return render_template('index.j2', apps = apps, search = search, account_url = account_url, description = description)
if __name__ == '__main__': if __name__ == '__main__':

+ 2
- 0
config/config.yaml View File

@ -5,6 +5,8 @@ search:
accounts: accounts:
account_url: 'https://account.technicalincompetence.club' account_url: 'https://account.technicalincompetence.club'
description: "It turns out Technical Incompetence's amazingness is just too great for this lame internet - we need a new one to maximize our full potential. Welcome to the Technical Incompetence internet. Population - US."
apps: apps:
chat: chat:
name: "Rocket Chat" name: "Rocket Chat"

+ 1
- 1
templates/index.j2 View File

@ -25,7 +25,7 @@
</div> </div>
<br><br> <br><br>
{% endif %} {% endif %}
<p>It turns out dCloud's amazingness is just too great for this lame internet - we need a new one to maximize our full potential. Welcome to the Technical Incompetence internet. Population - US.</p>
<p>{{ description }}</p>
<div class="row"> <div class="row">
{% for app in apps %} {% for app in apps %}
{% include "card.j2" %} {% include "card.j2" %}

Loading…
Cancel
Save