Update template

pull/6/head
beucismis 1 year ago
parent 8b23894ac1
commit 76825373ca
  1. 6
      ozgursozluk/templates/404.html
  2. 10
      ozgursozluk/templates/author.html
  3. 2
      ozgursozluk/templates/base.html
  4. 10
      ozgursozluk/templates/debe.html
  5. 16
      ozgursozluk/templates/index.html
  6. 12
      ozgursozluk/templates/navigation.html
  7. 32
      ozgursozluk/templates/paginate.html
  8. 10
      ozgursozluk/templates/settings.html
  9. 28
      ozgursozluk/templates/topic.html

@ -1,5 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}özgürsözlük - 404{% endblock %} {% block title %}404 - özgürsözlük{% endblock %}
{% block meta %}
<meta name="title" content="404 - özgürsözlük">
<meta name="description" content="{{ description }}">
{% endblock %}
{% block main %} {% block main %}
<nav>{% include "navigation.html" %}</nav> <nav>{% include "navigation.html" %}</nav>
<div class="topic" style="text-align: center; padding-top: 3rem;"> <div class="topic" style="text-align: center; padding-top: 3rem;">

@ -1,9 +1,13 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}özgürsözlük - user: {{ author.nickname }}{% endblock %} {% block title %}author: {{ author.nickname }} - özgürsözlük{% endblock %}
{% block meta %}
<meta name="title" content="özgürsözlük">
<meta name="description" content="author: {{ author.nickname }}">
{% endblock %}
{% block main %} {% block main %}
<nav>{% include "navigation.html" %}</nav> <nav>{% include "navigation.html" %}</nav>
<div class="author"> <div class="author">
<img class="avatar" src="{{ author.avatar_link }}"> <img class="avatar" src="{{ author.avatar_url }}">
<div style="padding: 0 0.5rem 0.5rem 0.5rem;"> <div style="padding: 0 0.5rem 0.5rem 0.5rem;">
{{ author.nickname }} {{ author.nickname }}
{% if author.level %} {% if author.level %}
@ -21,7 +25,7 @@
{% if author.biography %} {% if author.biography %}
<div class="author" style="margin: 0 auto;"> <div class="author" style="margin: 0 auto;">
<div style="padding: 0.5rem; text-align: left;"> <div style="padding: 0.5rem; text-align: left;">
{{ author.biography|safe }} {{ author.biography_html|safe }}
</div> </div>
</div> </div>
{% endif %} {% endif %}

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="description" content="{{ description }}"> {% block meta %}{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="{{ url_for('static', filename='favicon.png') }}"> <link rel="icon" href="{{ url_for('static', filename='favicon.png') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">

@ -1,5 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}özgürsözlük - debe{% endblock %} {% block title %}debe - özgürsözlük{% endblock %}
{% block meta %}
<meta name="title" content="debe - özgürsözlük">
<meta name="description" content="{{ description }}">
{% endblock %}
{% block main %} {% block main %}
<nav>{% include "navigation.html" %}</nav> <nav>{% include "navigation.html" %}</nav>
<div class="topic"> <div class="topic">
@ -8,7 +12,9 @@
<div class="entry"> <div class="entry">
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
<div> <div>
<a style="text-decoration: none;" href="{{ entry.permalink }}">{{ entry.title }}</a> <a style="text-decoration: none;" href="{{ url_for('entry', id=entry.id) }}">
{{ entry.title }}
</a>
</div> </div>
</div> </div>
</div> </div>

@ -1,5 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}özgürsözlük{% endblock %} {% block title %}özgürsözlük{% endblock %}
{% block meta %}
<meta name="title" content="özgürsözlük">
<meta name="description" content="{{ description }}">
{% endblock %}
{% block main %} {% block main %}
<nav>{% include "navigation.html" %}</nav> <nav>{% include "navigation.html" %}</nav>
<div class="topic"> <div class="topic">
@ -22,13 +26,15 @@
<div class="entry"> <div class="entry">
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
<div> <div>
<a style="text-decoration: none;" href="{{ topic.permalink }}"> <a style="text-decoration: none;" href="{{ url_for('topic', path=topic.path, a='popular') }}">
{{ topic.title }} {{ topic.title }}
</a> </a>
</div> </div>
<div> <div>
{% if topic.pinned %}<small style="opacity: 0.5;">pinned</small>{% endif %} {% if topic.pinned %}<small style="opacity: 0.5;">pinned</small>{% endif %}
{% if topic.views %}{{ topic.views|safe }}{% endif %} {% if topic.entry_count %}
<small style="opacity: 0.5;">{{ topic.entry_count }}</small>
{% endif %}
</div> </div>
</div> </div>
</div> </div>
@ -37,12 +43,14 @@
<div class="entry"> <div class="entry">
<div style="display: flex; justify-content: space-between;"> <div style="display: flex; justify-content: space-between;">
<div> <div>
<a style="text-decoration: none;" href="{{ topic.permalink }}"> <a style="text-decoration: none;" href="{{ url_for('topic', path=topic.path, a='popular') }}">
{{ topic.title }} {{ topic.title }}
</a> </a>
</div> </div>
<div> <div>
{% if topic.views %}{{ topic.views|safe }}{% endif %} {% if topic.entry_count %}
<small style="opacity: 0.5;">{{ topic.entry_count }}</small>
{% endif %}
</div> </div>
</div> </div>
</div> </div>

@ -1,6 +1,6 @@
<form method="POST" action="/"> <div class="searchbox">
<div style="display: flex; align-items: center;"> <form method="POST" action="/">
<input style="flex: 1;" type="text" placeholder="search topic... e.g: atatürk" name="q"> <input type="text" placeholder="search topic... e.g: atatürk" name="q">
<button style="margin-left: 0.5rem;" type="submit">fetch</button> <button type="submit">fetch</button>
</div> </form>
</form> </div>

@ -1,23 +1,35 @@
<div> <div>
{% if a %} {% if a %}
{% if p > 1 %} {% if p > 1 %}
<a href="{{ url_for('topic', title=topic.path, p=p-1) }}">previous</a> <a href="{{ url_for('topic', path=topic.path, p=p-1) }}">
{% if p < topic.pagecount %}/{% endif %} previous
</a>
{% if p < topic.page_count %}/{% endif %}
{% endif %} {% endif %}
{% if p < topic.pagecount %}<a href="{{ url_for('topic', title=topic.path, p=p+1) }}">next</a>{% endif %} {% if p < topic.page_count %}
{% if topic.pagecount > 1 %} <a href="{{ url_for('topic', path=topic.path, p=p+1) }}">next</a>
{% endif %}
{% if topic.page_count > 1 %}
- -
<a href="{{ url_for('topic', title=topic.path, p=topic.pagecount) }}">last page</a> <a href="{{ url_for('topic', path=topic.path, p=topic.page_count) }}">
last page
</a>
{% endif %} {% endif %}
{% else %} {% else %}
{% if p > 1 %} {% if p > 1 %}
<a href="{{ url_for('topic', title=topic.path, p=p-1, a=a) }}">previous</a> <a href="{{ url_for('topic', path=topic.path, p=p-1, a=a) }}">
{% if p < topic.pagecount %}/{% endif %} previous
</a>
{% if p < topic.page_count %}/{% endif %}
{% endif %}
{% if p < topic.page_count %}
<a href="{{ url_for('topic', path=topic.path, p=p+1, a=a) }}">next</a>
{% endif %} {% endif %}
{% if p < topic.pagecount %}<a href="{{ url_for('topic', title=topic.path, p=p+1, a=a) }}">next</a>{% endif %} {% if topic.page_count > 1 %}
{% if topic.pagecount > 1 %}
- -
<a href="{{ url_for('topic', title=topic.path, p=topic.pagecount, a=a) }}">last page</a> <a href="{{ url_for('topic', path=topic.path, p=topic.page_count, a=a) }}">
last page
</a>
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>

@ -1,5 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}özgürsözlük - settings{% endblock %} {% block title %}settings - özgürsözlük{% endblock %}
{% block meta %}
<meta name="title" content="settings - özgürsözlük">
<meta name="description" content="{{ description }}">
{% endblock %}
{% block main %} {% block main %}
<div class="settings"> <div class="settings">
<form method="POST" action="/settings"> <form method="POST" action="/settings">
@ -42,14 +46,14 @@
</div> </div>
</form> </form>
<div style="text-align: center;"> <div style="text-align: center;">
note: settings are saved in browser cookies. clearing your cookies will reset them. note: settings are saved in browser cookies.</br>clearing your cookies will reset them.
</br></br> </br></br>
v{{ version }} v{{ version }}
- -
last commit: last commit:
<a href="{{ source }}/commit/{{ last_commit }}" target="_blank">{{ last_commit[:8] }}</a> <a href="{{ source }}/commit/{{ last_commit }}" target="_blank">{{ last_commit[:8] }}</a>
- -
made with <3 on the <a href="{{ url_for('topic', title='thinkpad-t61--1883047') }}">t61</a> made with <3 on the <a href="{{ url_for('topic', path='thinkpad-t61--1883047') }}">t61</a>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

@ -1,5 +1,9 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}özgürsözlük - {{ topic.title }}{% endblock %} {% block title %}{{ topic.title }} {% if p > 1 %}- page: {{ p }}{% endif %} - özgürsözlük{% endblock %}
{% block meta %}
<meta name="title" content="özgürsözlük">
<meta name="description" content="topic: {{ topic.title }}">
{% endblock %}
{% block main %} {% block main %}
<nav>{% include "navigation.html" %}</nav> <nav>{% include "navigation.html" %}</nav>
<div class="topic"> <div class="topic">
@ -8,15 +12,11 @@
<p> <p>
{{ topic.title }} - şükela: {{ topic.title }} - şükela:
{% if topic.nice %} {% if topic.nice %}
<a href="{{ url_for('topic', title=topic.path) }}"> <a href="{{ url_for('topic', path=topic.path) }}"><b>nice</b></a>
<b>nice</b>
</a>
{% else %} {% else %}
<a href="{{ url_for('topic', title=topic.path, a='nice') }}">nice</a> <a href="{{ url_for('topic', path=topic.path, a='nice') }}">
{% endif %} nice
{% if not topic.pagecount %} </a>
|
<a href="{{ url_for('topic', title=topic.path) }}">all</a>
{% endif %} {% endif %}
</p> </p>
</div> </div>
@ -24,17 +24,21 @@
</div> </div>
{% for entry in topic.entrys %} {% for entry in topic.entrys %}
<div class="entry"> <div class="entry">
{{ entry.content|safe }} {{ entry.content_html|safe }}
</br> </br>
<div style="text-align: right;"> <div style="text-align: right;">
{% if request.cookies.get('display_author_nicknames') == 'true' %} {% if request.cookies.get('display_author_nicknames') == 'true' %}
<small> <small>
<a href="{{ url_for('author', nickname=entry.author) }}">{{ entry.author }}</a> <a href="{{ url_for('author', nickname=entry.author) }}">
{{ entry.author }}
</a>
</small> </small>
- -
{% endif %} {% endif %}
<small> <small>
<a href="{{ url_for('entry', id=entry.id) }}">{{ entry.datetime }}</a> <a href="{{ url_for('entry', id=entry.id) }}">
{{ entry.datetime }}
</a>
</small> </small>
</div> </div>
</div> </div>

Loading…
Cancel
Save