init
This commit is contained in:
3
app/templates/includes/footer.html
Normal file
3
app/templates/includes/footer.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<footer>
|
||||
<hr>
|
||||
</footer>
|
4
app/templates/includes/header.html
Normal file
4
app/templates/includes/header.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<header>
|
||||
<h1>App</h1>
|
||||
<hr>
|
||||
</header>
|
13
app/templates/layouts/base.html
Normal file
13
app/templates/layouts/base.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
{% include "includes/header.html" %}
|
||||
{% block content %}{% endblock content %}
|
||||
{% include "includes/footer.html" %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
11
app/templates/macros/render_field.html
Normal file
11
app/templates/macros/render_field.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% macro render_text_field(field) %}
|
||||
<div class="form__group">
|
||||
{{ field.label(class_="form__label") }}
|
||||
{{ field(class_="form__field")}}
|
||||
|
||||
{%- for error in field.errors %}
|
||||
<span class="form__error">{{ error }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
22
app/templates/pages/index.html
Normal file
22
app/templates/pages/index.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "layouts/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% for site in data["sites"] %}
|
||||
<details>
|
||||
<summary>
|
||||
{{site.name}}
|
||||
</summary>
|
||||
<ul>
|
||||
|
||||
{% for article in site.articles %}
|
||||
<li>
|
||||
<details>
|
||||
<summary><b>{{article.title}}</b></summary>
|
||||
<p>{{article.summarized_content}}</p>
|
||||
</details>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
15
app/templates/pages/submit_site.html
Normal file
15
app/templates/pages/submit_site.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% from "macros/render_field.html" import render_text_field %}
|
||||
{% block content %}
|
||||
|
||||
<form method="POST">
|
||||
{{ data["form"].hidden_tag() }}
|
||||
{{render_text_field(data["form"].name)}}
|
||||
{{render_text_field(data["form"].base_url)}}
|
||||
{{render_text_field(data["form"].feed_url)}}
|
||||
|
||||
<div>
|
||||
{{data["form"].submit_url}}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user