mirror of
				https://github.com/tiyn/container-critique.git
				synced 2025-10-31 19:21:20 +01:00 
			
		
		
		
	templates: cleaned up whitespaces
This commit is contained in:
		| @@ -25,7 +25,7 @@ login.login_view = "login" | |||||||
|  |  | ||||||
| @app.context_processor | @app.context_processor | ||||||
| def inject_title(): | def inject_title(): | ||||||
|     return dict(title=config.TITLE, style=config.STYLE, |     return dict(title=config.TITLE, style=config.STYLE, \ | ||||||
|                 description=config.DESCRIPTION, \ |                 description=config.DESCRIPTION, \ | ||||||
|                 registration=config.ALLOW_REGISTRATION, r_to_star=rating_to_star) |                 registration=config.ALLOW_REGISTRATION, r_to_star=rating_to_star) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,26 +1,46 @@ | |||||||
| {% extends "template.html" %} | {% extends "template.html" -%} | ||||||
|  |  | ||||||
| {% block content %} | {% block content -%} | ||||||
|     <div class="container"> |     <div class="container"> | ||||||
|         <div class="archive"> |         <div class="archive"> | ||||||
|             <h1>Archive</h1><br> |             <h1>Archive</h1><br> | ||||||
|         {% set ns = namespace(last_year="") %} |             {% set ns = namespace(last_year="", last_name="", open_li = False, open_ul = False) -%} | ||||||
|         {% for entry in entries %} |             {% for entry in entries -%} | ||||||
|         {% if entry.item.date != ns.last_year %} |             {% if ns.last_name != entry.item.name and ns.last_name != "" -%} | ||||||
|         {% if ns.last_year != "" %} |                 </li> | ||||||
|  |             {% set ns.open_li = False -%} | ||||||
|  |             {% endif -%} | ||||||
|  |             {% if entry.item.date != ns.last_year -%} | ||||||
|  |             {% if ns.last_year != "" -%} | ||||||
|             </ul> |             </ul> | ||||||
|         {% endif %} |             {% set ns.open_ul = False -%} | ||||||
|  |             {% endif -%} | ||||||
|             <h2> {{ entry.item.date }} </h2> |             <h2> {{ entry.item.date }} </h2> | ||||||
|             <ul> |             <ul> | ||||||
|         {% endif %} |             {% set ns.open_ul = True -%} | ||||||
|         {% set ns.last_year = entry.item.date %} |             {% endif -%} | ||||||
|             <li> |             {% if ns.last_name == entry.item.name and ns.last_year == entry.item.date -%} | ||||||
|                 {{ entry.item.name }} |                 <br> | ||||||
|                 <a href="{{ url_for('entry', ident=entry.id) }}"> |                 <a href="{{ url_for('entry', ident=entry.id) }}"> | ||||||
|                     {{ r_to_star(entry.rating) }} by {{ entry.user.name }} |                     {{ r_to_star(entry.rating) }} by {{ entry.user.name }} | ||||||
|                 </a> |                 </a> | ||||||
|             </li><br> |             {% else -%} | ||||||
|         {% endfor %} |                 <li> | ||||||
|  |                     {{ entry.item.name }}<br> | ||||||
|  |                     <a href="{{ url_for('entry', ident=entry.id) }}"> | ||||||
|  |                         {{ r_to_star(entry.rating) }} by {{ entry.user.name }} | ||||||
|  |                     </a> | ||||||
|  |             {% set ns.open_li = True -%} | ||||||
|  |             {% endif -%} | ||||||
|  |             {% set ns.last_year = entry.item.date -%} | ||||||
|  |             {% set ns.last_name = entry.item.name -%} | ||||||
|  |             {% endfor -%} | ||||||
|  |             {% if ns.open_li -%} | ||||||
|  |                 </li> | ||||||
|  |             {% endif -%} | ||||||
|  |             {% if ns.open_ul -%} | ||||||
|  |             </ul> | ||||||
|  |             {% endif -%} | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| {% endblock %} | {% endblock -%} | ||||||
|   | |||||||
| @@ -1,10 +1,10 @@ | |||||||
| {% extends "template.html" %} | {% extends "template.html" -%} | ||||||
|  |  | ||||||
| {% block content %} | {% block content -%} | ||||||
| <div class="container"> | <div class="container"> | ||||||
|     <div class="important"> |     <div class="important"> | ||||||
|         Error<br> |         Error<br> | ||||||
| 	<span>{{ errorcode }}</span> | 	<span>{{ errorcode }}</span> | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock -%} | ||||||
|   | |||||||
| @@ -1,10 +1,10 @@ | |||||||
| {% extends "template.html" %} | {% extends "template.html" -%} | ||||||
|  |  | ||||||
| {% block content %} | {% block content -%} | ||||||
| <div class="container"> | <div class="container"> | ||||||
|     <div class="blog"> |     <div class="blog"> | ||||||
|         <h1>Blog</h1><br> |         <h1>Blog</h1><br> | ||||||
|         {% for entry in entries %} |         {% for entry in entries -%} | ||||||
|         <div class="entry"> |         <div class="entry"> | ||||||
|             <h1 id="{{ entry.id }}"> |             <h1 id="{{ entry.id }}"> | ||||||
|                 <a href="{{ url_for('entry', ident=entry.id) }}"> |                 <a href="{{ url_for('entry', ident=entry.id) }}"> | ||||||
| @@ -17,11 +17,11 @@ | |||||||
|                     {{ entry.user.name }} |                     {{ entry.user.name }} | ||||||
|                 </a> |                 </a> | ||||||
|             </small><br> |             </small><br> | ||||||
|             {% autoescape off %} |             {% autoescape off -%} | ||||||
|             {{ entry.text }} |             {{ entry.text }} | ||||||
|             {% endautoescape %} |             {% endautoescape -%} | ||||||
|         </div><br> |         </div><br> | ||||||
|         {% endfor %} |         {% endfor -%} | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock -%} | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| {% extends "template.html" %} | {% extends "template.html" -%} | ||||||
|  |  | ||||||
| {% block content %} |  | ||||||
|  |  | ||||||
|  | {% block content -%} | ||||||
| <div class="container"> | <div class="container"> | ||||||
|     <div class="logging"> |     <div class="logging"> | ||||||
|         <h1>Sign In</h1> |         <h1>Sign In</h1> | ||||||
| @@ -16,10 +15,10 @@ | |||||||
|                 {{ form.password(size=32) }} |                 {{ form.password(size=32) }} | ||||||
|             </p> |             </p> | ||||||
|             <p>{{ form.submit() }}</p> |             <p>{{ form.submit() }}</p> | ||||||
|             {% for mesg in get_flashed_messages() %} |             {% for mesg in get_flashed_messages() -%} | ||||||
|             <p>{{ mesg }}</p> |             <p>{{ mesg }}</p> | ||||||
|             {% endfor %} |             {% endfor -%} | ||||||
|         </form> |         </form> | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock -%} | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| {% extends "template.html" %} | {% extends "template.html" -%} | ||||||
|  |  | ||||||
| {% block content %} |  | ||||||
|  |  | ||||||
|  | {% block content -%} | ||||||
| <div class="container"> | <div class="container"> | ||||||
|     <div class="logging"> |     <div class="logging"> | ||||||
|         <h1>Register</h1> |         <h1>Register</h1> | ||||||
| @@ -10,29 +9,29 @@ | |||||||
|             <p> |             <p> | ||||||
|                 {{ form.username.label }}<br> |                 {{ form.username.label }}<br> | ||||||
|                 {{ form.username(size=32) }} |                 {{ form.username(size=32) }} | ||||||
|                 {% for error in form.username.errors %} |                 {% for error in form.username.errors -%} | ||||||
|                 <span style="color: red;">[{{ error }}]</span> |                 <span style="color: red;">[{{ error }}]</span> | ||||||
|                 {% endfor %} |                 {% endfor -%} | ||||||
|             </p> |             </p> | ||||||
|             <p> |             <p> | ||||||
|                 {{ form.password.label }}<br> |                 {{ form.password.label }}<br> | ||||||
|                 {{ form.password(size=32) }} |                 {{ form.password(size=32) }} | ||||||
|                 {% for error in form.password.errors %} |                 {% for error in form.password.errors -%} | ||||||
|                 <span style="color: red;">[{{ error }}]</span> |                 <span style="color: red;">[{{ error }}]</span> | ||||||
|                 {% endfor %} |                 {% endfor -%} | ||||||
|             </p> |             </p> | ||||||
|             <p> |             <p> | ||||||
|                 {{ form.password2.label }}<br> |                 {{ form.password2.label }}<br> | ||||||
|                 {{ form.password2(size=32) }} |                 {{ form.password2(size=32) }} | ||||||
|                 {% for error in form.password2.errors %} |                 {% for error in form.password2.errors -%} | ||||||
|                 <span style="color: red;">[{{ error }}]</span> |                 <span style="color: red;">[{{ error }}]</span> | ||||||
|                 {% endfor %} |                 {% endfor -%} | ||||||
|             </p> |             </p> | ||||||
|             <p>{{ form.submit() }}</p> |             <p>{{ form.submit() }}</p> | ||||||
|             {% for mesg in get_flashed_messages() %} |             {% for mesg in get_flashed_messages() -%} | ||||||
|             <p>{{ mesg }}</p> |             <p>{{ mesg }}</p> | ||||||
|             {% endfor %} |             {% endfor -%} | ||||||
|         </form> |         </form> | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock -%} | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <language>en-us</language> |     <language>en-us</language> | ||||||
|     <link>{{ url_for("feed", _external=True) }}</link> |     <link>{{ url_for("feed", _external=True) }}</link> | ||||||
|     <atom:link href="{{ url_for('feed', _external=True) }}" rel="self" type="application/rss+xml" /> |     <atom:link href="{{ url_for('feed', _external=True) }}" rel="self" type="application/rss+xml" /> | ||||||
|     {% for entry in entries %} |     {% for entry in entries -%} | ||||||
|     <item> |     <item> | ||||||
|         <title> |         <title> | ||||||
|             {{ entry.item.name }} ({{ entry.item.date }}) {{ r_to_star(entry.rating) }} by {{ entry.user.name }} |             {{ entry.item.name }} ({{ entry.item.date }}) {{ r_to_star(entry.rating) }} by {{ entry.user.name }} | ||||||
| @@ -19,11 +19,11 @@ | |||||||
|             {{ entry.reviewed }} |             {{ entry.reviewed }} | ||||||
|         </pubDate> |         </pubDate> | ||||||
|         <description> |         <description> | ||||||
|             {% autoescape off %} |             {% autoescape off -%} | ||||||
|             text |             text | ||||||
|             {% endautoescape %} |             {% endautoescape -%} | ||||||
|         </description> |         </description> | ||||||
|     </item> |     </item> | ||||||
|     {% endfor %} |     {% endfor -%} | ||||||
| </channel> | </channel> | ||||||
| </rss> | </rss> | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| {% extends "template.html" %} | {% extends "template.html" -%} | ||||||
|  |  | ||||||
| {% block content %} | {% block content -%} | ||||||
| <div class="container"> | <div class="container"> | ||||||
|     <div class="standalone"> |     <div class="standalone"> | ||||||
|         <h1> |         <h1> | ||||||
| @@ -17,7 +17,7 @@ | |||||||
|                 {{ entry.reviewed }} |                 {{ entry.reviewed }} | ||||||
|             </a> |             </a> | ||||||
|         </small><br> |         </small><br> | ||||||
|         {% if current_user.id == entry.user.id %} |         {% if current_user.id == entry.user.id -%} | ||||||
|         <small> |         <small> | ||||||
|             [ |             [ | ||||||
|             <a href="{{ url_for('delete_entry', ident=entry.id) }}"> |             <a href="{{ url_for('delete_entry', ident=entry.id) }}"> | ||||||
| @@ -25,10 +25,10 @@ | |||||||
|             </a> |             </a> | ||||||
|             ] |             ] | ||||||
|         </small><br> |         </small><br> | ||||||
|         {% endif %} |         {% endif -%} | ||||||
|         {% autoescape off %} |         {% autoescape off -%} | ||||||
|         {{ entry.text }} |         {{ entry.text }} | ||||||
|         {% endautoescape %}<br> |         {% endautoescape -%}<br> | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock -%} | ||||||
|   | |||||||
| @@ -3,12 +3,13 @@ | |||||||
|     (url_for("archive"), 'archive', 'Archive') |     (url_for("archive"), 'archive', 'Archive') | ||||||
| ] -%} | ] -%} | ||||||
|  |  | ||||||
|  | <!DOCTYPE html> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
|     <title>{{ title }}</title> |     <title>{{ title }}</title> | ||||||
|     <link href="{{ url_for('static', filename='css/' + style + '.css') }}" rel="stylesheet" type="text/css"> |  | ||||||
|     <meta charset="utf-8"> |     <meta charset="utf-8"> | ||||||
|     <meta name="viewport" content="width=device-width" initial-scale=1.0> |     <meta name="viewport" content="width=device-width" initial-scale=1.0> | ||||||
|  |     <link href="{{ url_for('static', filename='css/' + style + '.css') }}" rel="stylesheet" type="text/css"> | ||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
|     <!-- Menu --> |     <!-- Menu --> | ||||||
| @@ -18,30 +19,26 @@ | |||||||
|         <input type="checkbox" id="main-menu-check"> |         <input type="checkbox" id="main-menu-check"> | ||||||
|         <label for="main-menu-check" class="show-menu">☰</label> |         <label for="main-menu-check" class="show-menu">☰</label> | ||||||
|         <div class="main-menu"> |         <div class="main-menu"> | ||||||
|             {% for href, id, caption in navigation_bar %} |             {% for href, id, caption in navigation_bar -%} | ||||||
|             <a href="{{ href|e }}">{{ caption|e }}</a> |             <a href="{{ href|e }}">{{ caption|e }}</a> | ||||||
|             {% endfor %} |             {% endfor -%} | ||||||
|             <label for="main-menu-check" class="hide-menu">X</label> |             <label for="main-menu-check" class="hide-menu">X</label> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|     <!-- Menu --> |     {% block content -%} | ||||||
|     <!-- Content --> |     {% endblock -%} | ||||||
| 	{% block content %} |  | ||||||
| 	{% endblock %} |  | ||||||
|     <!-- Content --> |  | ||||||
|     <footer> |     <footer> | ||||||
|         Made with <a href="https://github.com/tiyn/container-critique">Container Critique </a>.<br> |         Made with <a href="https://github.com/tiyn/container-critique">Container Critique </a>.<br> | ||||||
|         {% if current_user.is_anonymous %} |         {% if current_user.is_anonymous -%} | ||||||
|         <a href="{{ url_for('login') }}">Login</a> |         <a href="{{ url_for('login') }}">Login</a> | ||||||
|         {% if registration %} |         {% if registration -%} | ||||||
|         - |         - | ||||||
|         <a href="{{ url_for('register') }}">Register</a> |         <a href="{{ url_for('register') }}">Register</a> | ||||||
|         {% endif %} |         {% endif -%} | ||||||
|         {% else %} |         {% else -%} | ||||||
|         <a href="{{ url_for('logout') }}">Logout</a> |         <a href="{{ url_for('logout') }}">Logout</a> - | ||||||
|         - |  | ||||||
|         <a href="{{ url_for('write_entry') }}">Write entry</a> |         <a href="{{ url_for('write_entry') }}">Write entry</a> | ||||||
|         {% endif %} |         {% endif -%} | ||||||
|     </footer> |     </footer> | ||||||
| </body> | </body> | ||||||
| </html> | </html> | ||||||
|   | |||||||
| @@ -1,29 +1,29 @@ | |||||||
| {% extends "template.html" %} | {% extends "template.html" -%} | ||||||
|  |  | ||||||
| {% block content %} | {% block content -%} | ||||||
| <div class="container"> | <div class="container"> | ||||||
|     <div class="archive"> |     <div class="archive"> | ||||||
|         <h1>User: {{ name }}</h1><br> |         <h1>User: {{ name }}</h1><br> | ||||||
|         {% set ns = namespace(last_year="") %} |         {% set ns = namespace(last_year="") -%} | ||||||
|         {% for entry in entries %} |         {% for entry in entries -%} | ||||||
|         {% if entry.item.date != ns.last_year %} |         {% if entry.item.date != ns.last_year -%} | ||||||
|         {% if ns.last_year != "" %} |         {% if ns.last_year != "" -%} | ||||||
|         </ul> |         </ul> | ||||||
|         {% endif %} |         {% endif -%} | ||||||
|         <h2> {{ entry.item.date }} </h2> |         <h2> {{ entry.item.date }} </h2> | ||||||
|         <ul> |         <ul> | ||||||
|         {% endif %} |         {% endif -%} | ||||||
|         {% set ns.last_year = entry.item.date %} |         {% set ns.last_year = entry.item.date -%} | ||||||
|             <li> |             <li> | ||||||
|                 {{ entry.item.name }} |                 {{ entry.item.name }} | ||||||
|                 <a href="{{ url_for('entry', ident=entry.id) }}"> |                 <a href="{{ url_for('entry', ident=entry.id) }}"> | ||||||
|                     {{ r_to_star(entry.rating) }} by {{ entry.user.name }} |                     {{ r_to_star(entry.rating) }} by {{ entry.user.name }} | ||||||
|                 </a> |                 </a> | ||||||
|             </li><br> |             </li><br> | ||||||
|         {% endfor %} |         {% endfor -%} | ||||||
|         {% autoescape off %} |         {% autoescape off -%} | ||||||
|         {{ content_string }} |         {{ content_string }} | ||||||
|         {% endautoescape %} |         {% endautoescape -%} | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock -%} | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| {% extends "template.html" %} | {% extends "template.html" -%} | ||||||
|  |  | ||||||
| {% block content %} |  | ||||||
|  |  | ||||||
|  | {% block content -%} | ||||||
| <div class="container"> | <div class="container"> | ||||||
|     <div class="writing"> |     <div class="writing"> | ||||||
|         <h1>Write Critique</h1> |         <h1>Write Critique</h1> | ||||||
| @@ -10,39 +9,39 @@ | |||||||
|             <p> |             <p> | ||||||
|                 {{ form.name.label }}<br> |                 {{ form.name.label }}<br> | ||||||
|                 {{ form.name(size=64) }} |                 {{ form.name(size=64) }} | ||||||
|                 {% for error in form.name.errors %} |                 {% for error in form.name.errors -%} | ||||||
|                 <span style="color: red;">[{{ error }}]</span> |                 <span style="color: red;">[{{ error }}]</span> | ||||||
|                 {% endfor %} |                 {% endfor -%} | ||||||
|             </p> |             </p> | ||||||
|             <p> |             <p> | ||||||
|                 {{ form.date.label }}<br> |                 {{ form.date.label }}<br> | ||||||
|                 {{ form.date }} |                 {{ form.date }} | ||||||
|                 {% for error in form.date.errors %} |                 {% for error in form.date.errors -%} | ||||||
|                 <span style="color: red;">[{{ error }}]</span> |                 <span style="color: red;">[{{ error }}]</span> | ||||||
|                 {% endfor %} |                 {% endfor -%} | ||||||
|             </p> |             </p> | ||||||
|             <p> |             <p> | ||||||
|  |  | ||||||
|                 {{ form.text.label }}<br> |                 {{ form.text.label }}<br> | ||||||
|                 {{ form.text }} |                 {{ form.text }} | ||||||
|                 {% for error in form.text.errors %} |                 {% for error in form.text.errors -%} | ||||||
|                 <span style="color: red;">[{{ error }}]</span> |                 <span style="color: red;">[{{ error }}]</span> | ||||||
|                 {% endfor %} |                 {% endfor -%} | ||||||
|                 {{ ckeditor.load() }} |                 {{ ckeditor.load() }} | ||||||
|                 {{ ckeditor.config(name="text") }} |                 {{ ckeditor.config(name="text") }} | ||||||
|             </p> |             </p> | ||||||
|             <p> |             <p> | ||||||
|                 {{ form.rating.label }}<br> |                 {{ form.rating.label }}<br> | ||||||
|                 {{ form.rating }} |                 {{ form.rating }} | ||||||
|                 {% for error in form.rating.errors %} |                 {% for error in form.rating.errors -%} | ||||||
|                 <span style="color: red;">[{{ error }}]</span> |                 <span style="color: red;">[{{ error }}]</span> | ||||||
|                 {% endfor %} |                 {% endfor -%} | ||||||
|             </p> |             </p> | ||||||
|             <p>{{ form.submit() }}</p> |             <p>{{ form.submit() }}</p> | ||||||
|             {% for mesg in get_flashed_messages() %} |             {% for mesg in get_flashed_messages() -%} | ||||||
|             <p>{{ mesg }}</p> |             <p>{{ mesg }}</p> | ||||||
|             {% endfor %} |             {% endfor -%} | ||||||
|         </form> |         </form> | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock -%} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user