Style changes

This commit is contained in:
Yusur 2023-05-18 08:47:06 +02:00
parent ba3ed04b44
commit d53677ea66
25 changed files with 389 additions and 371 deletions

View file

@ -37,22 +37,23 @@ body{font-family:sans-serif;background-color:var(--bg-main); color: var(--fg-mai
.article-header {text-align: center;}
#firstHeading {font-family:sans-serif; text-align: center;font-size:3em; font-weight: normal}
@media (min-width:800px) {.homepage #firstHeading {font-size: 4.5em}}
.inner-content{font-family:serif; margin: 1.7em auto; max-width: 1280px; line-height: 1.9; color: var(--fg-main)}
.inner-content em,.inner-content strong{color: var(--fg-sharp)}
.inner-content h1{color: var(--fg-error)}
.inner-content table {font-family: sans-serif}
.inner-content h2, .inner-content h3, .inner-content h4, .inner-content h5, .inner-content h6{font-family:sans-serif; color: var(--fg-sharp); font-weight: normal}
.inner-content h2{border-bottom: 1px solid var(--border)}
.inner-content h3{margin:0.8em 0}
.inner-content h4{margin:0.6em 0}
.inner-content h5{margin:0.5em 0}
.inner-content h6{margin:0.4em 0}
.inner-content p{text-indent: 1.9em; margin: 0}
.inner-content li{margin: .3em 0}
.inner-content blockquote{color:var(--fg-alt); border-left: 4px solid var(--bg-alt);margin-left:0;padding-left:12px}
.inner-content table{border:var(--bg-alt) 1px solid;border-collapse:collapse;line-height: 1.5;overflow-x:auto}
.inner-content table > * > tr > th, .inner-content table > tr > th {background-color:var(--bg-alt);border:var(--border) 1px solid;padding:2px}
.inner-content table > * > tr > td, .inner-content table > tr > td {border:var(--border) 1px solid;padding:2px}
.inner-content, .article-content {margin: 1.7em auto; max-width: 1280px;}
.article-content{font-family:serif; margin: 1.7em auto; max-width: 1280px; line-height: 1.9; color: var(--fg-main)}
.article-content em,.article-content strong{color: var(--fg-sharp)}
.article-content h1{color: var(--fg-error)}
.article-content table {font-family: sans-serif}
.article-content h2, .article-content h3, .article-content h4, .article-content h5, .article-content h6{font-family:sans-serif; color: var(--fg-sharp); font-weight: normal}
.article-content h2{border-bottom: 1px solid var(--border)}
.article-content h3{margin:0.8em 0}
.article-content h4{margin:0.6em 0}
.article-content h5{margin:0.5em 0}
.article-content h6{margin:0.4em 0}
.article-content p{text-indent: 1.9em; margin: 0}
.article-content li{margin: .3em 0}
.article-content blockquote{color:var(--fg-alt); border-left: 4px solid var(--bg-alt);margin-left:0;padding-left:12px}
.article-content table{border:var(--bg-alt) 1px solid;border-collapse:collapse;line-height: 1.5;overflow-x:auto}
.article-content table > * > tr > th, .article-content table > tr > th {background-color:var(--bg-alt);border:var(--border) 1px solid;padding:2px}
.article-content table > * > tr > td, .article-content table > tr > td {border:var(--border) 1px solid;padding:2px}
/* spoiler styles */
.spoiler {color: var(--fg-sharp); background-color: var(--fg-sharp)}

View file

@ -5,19 +5,21 @@
{% block content %}
<h1>Administrative tools</h1>
{% if current_user and current_user.is_admin %}
<ul>
<li>
<a href="/manage/export">Export pages</a>
</li>
<li>
<a href="/manage/import">Import pages</a>
</li>
<li>
<a href="/manage/accounts">Manage accounts</a>
</li>
</ul>
{% else %}
<p>Administrative tools can be accessed by administrator users only.</p>
{% endif %}
<div class="inner-content">
{% if current_user and current_user.is_admin %}
<ul>
<li>
<a href="/manage/export">Export pages</a>
</li>
<li>
<a href="/manage/import">Import pages</a>
</li>
<li>
<a href="/manage/accounts">Manage accounts</a>
</li>
</ul>
{% else %}
<p>Administrative tools can be accessed by administrator users only.</p>
{% endif %}
</div>
{% endblock %}

View file

@ -10,17 +10,20 @@
<h1 id="firstHeading">{{ p.title }}</h1>
<div class="preview-subtitle">{{ T('backlinks') }}</div>
{% if backlinks %}
<ul>
{% for op in backlinks %}
<li><a href="{{ op.get_url() }}">
{{ op.title }} (<strong>#{{ op.id }}</strong>)
</a></li>
{% endfor %}
</ul>
{% else %}
<p class="placeholder">{{ T("backlinks-empty") }}</p>
{% endif %}
<div class="inner-content">
{% if backlinks %}
<ul>
{% for op in backlinks %}
<li><a href="{{ op.get_url() }}">
{{ op.title }} (<strong>#{{ op.id }}</strong>)
</a></li>
{% endfor %}
</ul>
{% else %}
<p class="placeholder">{{ T("backlinks-empty") }}</p>
{% endif %}
</div>
<p>{{ T("back-to") }} <a href="{{ p.get_url() }}">{{ p.title }}</a>.</p>
{% endblock %}

View file

@ -5,5 +5,7 @@
{% block content %}
<h1>Bad request</h1>
<p>You sent a request the server cant understand. If you entered the URL manually please check your spelling and try again.</p>
<div class="inner-content">
<p>You sent a request the server cant understand. If you entered the URL manually please check your spelling and try again.</p>
</div>
{% endblock %}

View file

@ -6,29 +6,31 @@
<article>
<h1 id="firstHeading">{{ T('calendar') }}</h1>
<ul>
{% for year in range(till_year, from_year-1, -1) %}
<li>
<strong>{{ year }} {% if year == now.year %}(current){% endif %}:</strong>
<ul class="inline">
{% for month in range(1, 13) %}
<li><a href="/calendar/{{year}}/{{month}}">{{ year }}.{{ month }}</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
<p>
Show more years:
<ul class="inline">
<div class="inner-content">
<ul>
{% for year in range(till_year, from_year-1, -1) %}
<li>
<a href="?till_year={{ till_year + 15 }}">in the future</a>
</li>
<li>
<a href="?from_year={{ from_year - 15 }}">in the past</a>
<strong>{{ year }} {% if year == now.year %}(current){% endif %}:</strong>
<ul class="inline">
{% for month in range(1, 13) %}
<li><a href="/calendar/{{year}}/{{month}}">{{ year }}.{{ month }}</a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</p>
<p>
Show more years:
<ul class="inline">
<li>
<a href="?till_year={{ till_year + 15 }}">in the future</a>
</li>
<li>
<a href="?from_year={{ from_year - 15 }}">in the past</a>
</li>
</ul>
</p>
</div>
</article>
{% endblock %}

View file

@ -9,33 +9,35 @@
{% block content %}
<h1>Contributions of {{ u.username }}</h1>
<p class="nl-pagination">Showing results <strong>{{ page_n * 20 - 19 }}</strong> to <strong>{{ min(page_n * 20, total_count) }}</strong> of <strong>{{ total_count }}</strong> total.</p>
<div class="inner-content">
<p class="nl-pagination">Showing results <strong>{{ page_n * 20 - 19 }}</strong> to <strong>{{ min(page_n * 20, total_count) }}</strong> of <strong>{{ total_count }}</strong> total.</p>
<ul>
{% if page_n > 1 %}
<li class="nl-prev"><a href="?page={{ page_n - 1 }}">&laquo; Previous page</a></li>
{% endif %}
<ul>
{% if page_n > 1 %}
<li class="nl-prev"><a href="?page={{ page_n - 1 }}">&laquo; Previous page</a></li>
{% endif %}
{% for rev in contributions %}
<li>
<a href="/history/revision/{{ rev.id }}/">
#{{ rev.id }}
&middot;
{{ rev.pub_date.strftime("%B %-d, %Y %H:%M:%S") }}
{% if rev.comment %}
“{{ rev.comment }}”
{% endif %}
</a>
on
<a href="{{ rev.page.get_url() }}">
{{ rev.page.title }}
</a>
</li>
{% endfor %}
{% for rev in contributions %}
<li>
<a href="/history/revision/{{ rev.id }}/">
#{{ rev.id }}
&middot;
{{ rev.pub_date.strftime("%B %-d, %Y %H:%M:%S") }}
{% if rev.comment %}
“{{ rev.comment }}”
{% endif %}
</a>
on
<a href="{{ rev.page.get_url() }}">
{{ rev.page.title }}
</a>
</li>
{% endfor %}
{% if page_n < total_count // 20 %}
<li class="nl-next"><a href="?page={{ page_n + 1 }}">Next page &raquo;</a></li>
{% endif %}
</ul>
{% if page_n < total_count // 20 %}
<li class="nl-next"><a href="?page={{ page_n + 1 }}">Next page &raquo;</a></li>
{% endif %}
</ul>
</div>
{% endblock %}

View file

@ -5,25 +5,27 @@
{% block content %}
<h1>{{ T('easter-date-calc') }}</h1>
<form>
<div>
<label for="y">{{ T('year') }}: </label>
<input type="text" name="y" value="{{ y }}">
<input type="submit" value="{{ T('calculate') }}" class="submit-quick">
<div class="inner-content">
<form>
<div>
<label for="y">{{ T('year') }}: </label>
<input type="text" name="y" value="{{ y }}">
<input type="submit" value="{{ T('calculate') }}" class="submit-quick">
</div>
</form>
{% if easter_dates %}
<div class="easter-results">
<p class="easter-date">{{ T('easter') }}: <strong>{{ easter_dates['easter'].strftime('%B %-d, %Y') }}</strong></p>
<h2>{{ T('other-dates') }}</h2>
<ul>
<li>Mercoledì delle Ceneri: <strong>{{ easter_dates['ceneri'].strftime('%B %-d, %Y') }}</strong></li>
<li>Ascensione: <strong>{{ easter_dates['ascensione'].strftime('%B %-d, %Y') }}</strong></li>
<li>Pentecoste: <strong>{{ easter_dates['pentecoste'].strftime('%B %-d, %Y') }}</strong></li>
<li>Prima Domenica d'Avvento: <strong>{{ easter_dates['avvento1'].strftime('%B %-d, %Y') }}</strong></li>
</ul>
</div>
</form>
{% if easter_dates %}
<div class="easter-results">
<p class="easter-date">{{ T('easter') }}: <strong>{{ easter_dates['easter'].strftime('%B %-d, %Y') }}</strong></p>
<h2>{{ T('other-dates') }}</h2>
<ul>
<li>Mercoledì delle Ceneri: <strong>{{ easter_dates['ceneri'].strftime('%B %-d, %Y') }}</strong></li>
<li>Ascensione: <strong>{{ easter_dates['ascensione'].strftime('%B %-d, %Y') }}</strong></li>
<li>Pentecoste: <strong>{{ easter_dates['pentecoste'].strftime('%B %-d, %Y') }}</strong></li>
<li>Prima Domenica d'Avvento: <strong>{{ easter_dates['avvento1'].strftime('%B %-d, %Y') }}</strong></li>
</ul>
</div>
{% endif %}
{% endblock %}

View file

@ -25,69 +25,71 @@
Remember this is only a preview.
<strong>Your changes were not saved yet!</strong>
<a href="#editing-area">Jump to editing area</a></div>
<div class="inner-content">{{ preview|safe }}</div>
<div class="inner-content article-content">{{ preview|safe }}</div>
<div style="clear:both"></div>
</div>
</article>
{% endif %}
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<label for="title"><span class="material-icons">link</span> /</label>
<input type="text" name="url" class="url-input" placeholder="(No URL)" maxlength="64" value="{{ pl_url or '' }}" {% if pl_readonly %}disabled=""{% endif %}>
</div>
<div>
<input type="text" required name="title" placeholder="Title (required)" class="title-input" maxlength="256" value="{{ pl_title }}" {% if pl_readonly %}disabled=""{% endif %}>
</div>
<div id="editing-area">
{% if not pl_readonly %}
<div class="pre-text-input">
<p>This editor is using Markdown for text formatting (e.g. bold, italic, headers and tables). <a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" rel="nofollow">More info on Markdown</a>.</p>
{% if math_version and pl_enablemath %}
<p>Math with KaTeX is <mark>enabled</mark>. <a href="https://katex.org/docs/supported.html">KaTeX guide</a></p>
{% endif %}
<div class="inner-content">
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<label for="title"><span class="material-icons">link</span> /</label>
<input type="text" name="url" class="url-input" placeholder="(No URL)" maxlength="64" value="{{ pl_url or '' }}" {% if pl_readonly %}disabled=""{% endif %}>
</div>
<div class="over-text-input"></div>
{% else %}
<div class="pre-text-input">
<p>This page was locked by the owner, and is therefore not editable. You can still copy the source text.</p>
<div>
<input type="text" required name="title" placeholder="Title (required)" class="title-input" maxlength="256" value="{{ pl_title }}" {% if pl_readonly %}disabled=""{% endif %}>
</div>
<div id="editing-area">
{% if not pl_readonly %}
<div class="pre-text-input">
<p>This editor is using Markdown for text formatting (e.g. bold, italic, headers and tables). <a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" rel="nofollow">More info on Markdown</a>.</p>
{% if math_version and pl_enablemath %}
<p>Math with KaTeX is <mark>enabled</mark>. <a href="https://katex.org/docs/supported.html">KaTeX guide</a></p>
{% endif %}
</div>
<div class="over-text-input"></div>
{% else %}
<div class="pre-text-input">
<p>This page was locked by the owner, and is therefore not editable. You can still copy the source text.</p>
</div>
{% endif %}
<textarea name="text" class="text-input" {% if pl_readonly %}disabled=""{% endif %}>{{ pl_text }}</textarea>
</div>
<div>
<label for="tags">{{ T('input-tags') }}:</label>
<input type="text" name="tags" class="tags-input" placeholder="{{ T('no-tags') }}" value="{{ pl_tags }}" {% if pl_readonly %}disabled=""{% endif %}>
</div>
{% if not pl_readonly %}
<div>
<input type="submit" value="Save" id="save-button" class="submit-primary">
<input type="submit" name="preview" value="Preview" id="preview-button" class="submit-secondary">
<input type="text" name="comment" value="{{ pl_comment }}" placeholder="{{ T('write-a-comment') }}" />
</div>
<h3>Advanced options</h3>
<div>
<input type="checkbox" id="CB__enablemath" name="enablemath" {% if math_version and pl_enablemath %}checked=""{% elif not math_version %}disabled=""{% endif %}>
<label for="CB__enablemath">Enable math expressions parsing {% if not math_version %}(disabled for this instance){% endif %}</label>
</div>
{% if pl_owner_is_current_user %}
<div>
<input type="checkbox" id="CB__lockpage" name="lockpage" {% if pl_is_locked %}checked=""{% endif %}>
<label for="CB__lockpage">Lock page for editing by other users</label>
</div>
{% endif %}
<textarea name="text" class="text-input" {% if pl_readonly %}disabled=""{% endif %}>{{ pl_text }}</textarea>
</div>
<div>
<label for="tags">{{ T('input-tags') }}:</label>
<input type="text" name="tags" class="tags-input" placeholder="{{ T('no-tags') }}" value="{{ pl_tags }}" {% if pl_readonly %}disabled=""{% endif %}>
</div>
{% if not pl_readonly %}
<div>
<input type="submit" value="Save" id="save-button" class="submit-primary">
<input type="submit" name="preview" value="Preview" id="preview-button" class="submit-secondary">
<input type="text" name="comment" value="{{ pl_comment }}" placeholder="{{ T('write-a-comment') }}" />
</div>
<h3>Advanced options</h3>
<div>
<input type="checkbox" id="CB__enablemath" name="enablemath" {% if math_version and pl_enablemath %}checked=""{% elif not math_version %}disabled=""{% endif %}>
<label for="CB__enablemath">Enable math expressions parsing {% if not math_version %}(disabled for this instance){% endif %}</label>
</div>
{% if pl_owner_is_current_user %}
<div>
<input type="checkbox" id="CB__lockpage" name="lockpage" {% if pl_is_locked %}checked=""{% endif %}>
<label for="CB__lockpage">Lock page for editing by other users</label>
</div>
{% endif %}
<div>
<input type="checkbox" id="CB__usecalendar" name="usecalendar" {% if pl_calendar %}checked=""{% endif %}>
<label for="CB__usecalendar">Use calendar:</label>
<input type="date" name="calendar" {% if pl_calendar %}value="{{ pl_calendar }}"{% endif %}>
</div>
<div>
<input type="checkbox" id="CB__cw" name="cw" {% if pl_cw %}checked=""{% endif %}>
<label for="CB__cw">Content Warning</label>
</div>
{% endif %}
</form>
<div>
<input type="checkbox" id="CB__usecalendar" name="usecalendar" {% if pl_calendar %}checked=""{% endif %}>
<label for="CB__usecalendar">Use calendar:</label>
<input type="date" name="calendar" {% if pl_calendar %}value="{{ pl_calendar }}"{% endif %}>
</div>
<div>
<input type="checkbox" id="CB__cw" name="cw" {% if pl_cw %}checked=""{% endif %}>
<label for="CB__cw">Content Warning</label>
</div>
{% endif %}
</form>
</div>
{% endblock %}

View file

@ -5,20 +5,22 @@
{% block content %}
<h1>Export pages</h1>
<p>You can export how many pages you want, that will be downloaded in JSON format and can be imported in another {{ app_name }} instance.</p>
<div class="inner-content">
<p>You can export how many pages you want, that will be downloaded in JSON format and can be imported in another {{ app_name }} instance.</p>
<p>In order to add page to export list, please enter exact title, /url, #tag or +id. Entering a tag will add all pages with that tag to list. Each page or tag is separated by a newline.</p>
<p>In order to add page to export list, please enter exact title, /url, #tag or +id. Entering a tag will add all pages with that tag to list. Each page or tag is separated by a newline.</p>
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<textarea style="height:20em;width:100%" name="export-list" placeholder="Title, /url, #tag, or +id, newline-separated"></textarea>
</div>
<div>
<input type="checkbox" name="history" value="1"><label>Include history (file can be very large!)</label>
</div>
<div>
<input type="submit" value="Download">
</div>
</form>
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<textarea style="height:20em;width:100%" name="export-list" placeholder="Title, /url, #tag, or +id, newline-separated"></textarea>
</div>
<div>
<input type="checkbox" name="history" value="1"><label>Include history (file can be very large!)</label>
</div>
<div>
<input type="submit" value="Download">
</div>
</form>
</div>
{% endblock %}

View file

@ -5,5 +5,7 @@
{% block content %}
<h1>Forbidden</h1>
<p>You dont have permission to access this resource.</p>
<div class="inner-content">
<p>You dont have permission to access this resource.</p>
</div>
{% endblock %}

View file

@ -10,28 +10,30 @@
<h1 id="firstHeading">{{ p.title }}</h1>
<div class="preview-subtitle">Page history</div>
<ul>
{% for rev in history %}
<li>
<a href="/history/revision/{{ rev.id }}/">
#{{ rev.id }}
&middot;
{{ rev.pub_date.strftime("%B %-d, %Y %H:%M:%S") }}
{% if rev.comment %}
“{{ rev.comment }}”
<div class="inner-content">
<ul>
{% for rev in history %}
<li>
<a href="/history/revision/{{ rev.id }}/">
#{{ rev.id }}
&middot;
{{ rev.pub_date.strftime("%B %-d, %Y %H:%M:%S") }}
{% if rev.comment %}
“{{ rev.comment }}”
{% endif %}
</a>
by
{% if rev.user_id %}
<a href="/u/{{ rev.user.username }}">
{{ rev.user.username }}
</a>
{% else %}
<span>&lt;Unknown User&gt;</span>
{% endif %}
</a>
by
{% if rev.user_id %}
<a href="/u/{{ rev.user.username }}">
{{ rev.user.username }}
</a>
{% else %}
<span>&lt;Unknown User&gt;</span>
{% endif %}
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
<p>{{ T("back-to") }} <a href="{{ p.get_url() }}">{{ p.title }}</a>.</p>
{% endblock %}

View file

@ -5,27 +5,31 @@
{% block content %}
<h1>Import pages</h1>
{% if current_user.is_admin %}
<p>
You can import files produced by the <a href="/manage/export">exporter tool</a>, in JSON format.
Importing pages can be done by users with Admin permissions only.
</p>
<div class="inner-content">
{% if current_user.is_admin %}
<p>
You can import files produced by the <a href="/manage/export">exporter tool</a>, in JSON format.
Importing pages can be done by users with Admin permissions only.
</p>
<form enctype="multipart/form-data" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<input type="file" accept="application/json" name="import" />
<form enctype="multipart/form-data" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<input type="file" accept="application/json" name="import" />
</div>
<div>
<input type="checkbox" name="ovwurls" value="1" checked="" />
<label for="ovwurls">Overwrite URLs</label>
</div>
<div>
<input type="submit" value="Import" />
</div>
</form>
</div>
<div>
<input type="checkbox" name="ovwurls" value="1" checked="" />
<label for="ovwurls">Overwrite URLs</label>
</div>
<div>
<input type="submit" value="Import" />
</div>
</form>
{% else %}
<p>Importing pages can be done by users with Admin permissions only.</p>
{% endif %}
{% else %}
<p>Importing pages can be done by users with Admin permissions only.</p>
{% endif %}
</div>
{% endblock %}

View file

@ -1,9 +1,11 @@
{% extends "base.jinja2" %}
{% block title %}Internal Server Error - {{ app_name }}{% endblock %}
{% block title %}% _ % - {{ app_name }}{% endblock %}
{% block content %}
<h1>Internal Server Error</h1>
<p>Were sorry, an unexpected error occurred. Try refreshing the page.</p>
<div class="inner-content">
<p>Were sorry, an unexpected error occurred. Try refreshing the page.</p>
</div>
{% endblock %}

View file

@ -9,30 +9,32 @@
{% block content %}
<h1>Best pages</h1>
<table>
<thead>
<tr>
<th>#</th>
<th>Page Name</th>
<th>Score</th>
<th><abbr title="Length in bytes">Len</abbr></th>
<th><abbr title="Backlinks">BL</abbr></th>
<th><abbr title="Forward links">FL</abbr></th>
</tr>
</thead>
<tbody>
{% set counters = namespace(row = 0) %}
{% for p, score, bklinks, fwlinks, length in pages %}
<tr>
{% set counters.row = counters.row + 1 %}
<th style="text-align: right">{{ counters.row }}</th>
<td><a href="{{ p.get_url() }}">{{ p.title }}</a> (#{{ p.id }})</td>
<td><strong>{{ score }}</strong></td>
<td>{{ length }}</td>
<td>{{ bklinks }}</td>
<td>{{ fwlinks }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="inner-content">
<table>
<thead>
<tr>
<th>#</th>
<th>Page Name</th>
<th>Score</th>
<th><abbr title="Length in bytes">Len</abbr></th>
<th><abbr title="Backlinks">BL</abbr></th>
<th><abbr title="Forward links">FL</abbr></th>
</tr>
</thead>
<tbody>
{% set counters = namespace(row = 0) %}
{% for p, score, bklinks, fwlinks, length in pages %}
<tr>
{% set counters.row = counters.row + 1 %}
<th style="text-align: right">{{ counters.row }}</th>
<td><a href="{{ p.get_url() }}">{{ p.title }}</a> (#{{ p.id }})</td>
<td><strong>{{ score }}</strong></td>
<td>{{ length }}</td>
<td>{{ bklinks }}</td>
<td>{{ fwlinks }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View file

@ -2,7 +2,7 @@
{% block content %}
<article>
<h1>Notes by date</h1>
<h1 id="firstHeading">Notes by date</h1>
<p class="nl-pagination">Showing results <strong>{{ page_n * 20 - 19 }}</strong> to <strong>{{ min(page_n * 20, total_count) }}</strong> of <strong>{{ total_count }}</strong> total.</p>

View file

@ -5,29 +5,31 @@
{% block content %}
<h1>{{ T('login') }}</h1>
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<label>{{ T('username') }}:</label>
<input type="text" name="username" />
</div>
<div>
<label>{{ T('password') }}:</label>
<input type="password" name="password" />
</div>
<div>
<label>{{ T('remember-me-for') }}</label>
<select name="remember">
<option value="0">This session only</option>
<option value="7">A week</option>
<option value="30">A month</option>
<option value="365">A year</option>
</select>
</div>
<div>
<input type="submit" value="{{ T('login') }}" />
</div>
</form>
<div class="inner-content">
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<label>{{ T('username') }}:</label>
<input type="text" name="username" />
</div>
<div>
<label>{{ T('password') }}:</label>
<input type="password" name="password" />
</div>
<div>
<label>{{ T('remember-me-for') }}</label>
<select name="remember">
<option value="0">This session only</option>
<option value="7">A week</option>
<option value="30">A month</option>
<option value="365">A year</option>
</select>
</div>
<div>
<input type="submit" value="{{ T('login') }}" />
</div>
</form>
<div class="inner-content"></div>
<p>{{ T('no-account-sign-up') }} <a href="/accounts/register" rel="nofollow">{{ T("sign-up") }}</a></p>
{% endblock %}

View file

@ -5,48 +5,48 @@
{% block content %}
<h1>Manage accounts</h1>
<div class="inner-content">
{% if current_user.is_admin %}
<p>
Here is the list of users registered on {{ app_name }}, in reverse chronological order.
<strong>Beware: you are managing sensitive informations.</strong>
</p>
<p>
Here is the list of users registered on {{ app_name }}, in reverse chronological order.
<strong>Beware: you are managing sensitive informations.</strong>
</p>
<p class="nl-pagination">Showing results <strong>{{ page_n * 20 - 19 }}</strong> to <strong>{{ min(page_n * 20, total_count) }}</strong> of <strong>{{ total_count }}</strong> total.</p>
<p class="nl-pagination">Showing results <strong>{{ page_n * 20 - 19 }}</strong> to <strong>{{ min(page_n * 20, total_count) }}</strong> of <strong>{{ total_count }}</strong> total.</p>
<form enctype="multipart/form-data" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<form enctype="multipart/form-data" method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<ul>
{% if page_n > 1 %}
<li class="nl-prev"><a href="?page={{ page_n - 1 }}">&laquo; Previous page</a></li>
{% endif %}
<ul>
{% if page_n > 1 %}
<li class="nl-prev"><a href="?page={{ page_n - 1 }}">&laquo; Previous page</a></li>
{% endif %}
{% for u in users %}
<li>
<input type="checkbox" name="u{{ u.id }}">
<a href="/@{{ u.username }}">{{ u.username }}</a>
{% if u == current_user %}<strong>(you)</strong>{% endif %}
-
Groups:
<ul class="inline">
{% for ug in u.groups %}
<li>{{ ug.name }}</li>
{% endfor %}
</ul>
-
Registered on:
{{ u.join_date }}
</li>
{% endfor %}
{% for u in users %}
<li>
<input type="checkbox" name="u{{ u.id }}">
<a href="/@{{ u.username }}">{{ u.username }}</a>
{% if u == current_user %}<strong>(you)</strong>{% endif %}
-
Groups:
<ul class="inline">
{% for ug in u.groups %}
<li>{{ ug.name }}</li>
{% endfor %}
</ul>
-
Registered on:
{{ u.join_date }}
</li>
{% endfor %}
{% if page_n < total_count // 20 %}
<li class="nl-next"><a href="?page={{ page_n + 1 }}">Next page &raquo;</a></li>
{% endif %}
</ul>
</form>
{% else %}
<p>Managing accounts can be done by users with Admin permissions only.</p>
{% endif %}
{% if page_n < total_count // 20 %}
<li class="nl-next"><a href="?page={{ page_n + 1 }}">Next page &raquo;</a></li>
{% endif %}
</ul>
</form>
{% else %}
<p>Managing accounts can be done by users with Admin permissions only.</p>
{% endif %}
</div>
{% endblock %}

View file

@ -5,5 +5,7 @@
{% block content %}
<h1>{{ T('not-found') }}</h1>
<p>{{ T('not-found-text-1') }} <strong>{{ request.path }}</strong> {{ T('not-found-text-2') }}.</p>
<div class="inner-content">
<p>{{ T('not-found-text-1') }} <strong>{{ request.path }}</strong> {{ T('not-found-text-2') }}.</p>
</div>
{% endblock %}

View file

@ -7,7 +7,7 @@
<h1 id="firstHeading">Privacy Policy</h1>
<div class="inner-content">
<div class="inner-content article-content">
{% filter markdown %}
# Privacy

View file

@ -5,7 +5,8 @@
{% block content %}
<h1>{{ T('sign-up') }}</h1>
<form method="POST">
<div class="inner-content">
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div>
<label>{{ T('username') }}:</label>
@ -30,7 +31,9 @@
<div>
<input type="submit" value="{{ T('sign-up') }}" />
</div>
</form>
</form>
<p>{{ T('already-have-account') }} <a href="/accounts/login" rel="nofollow">{{ T("login") }}</a></p>
</div>
<p>{{ T('already-have-account') }} <a href="/accounts/login" rel="nofollow">{{ T("login") }}</a></p>
{% endblock %}

View file

@ -5,30 +5,32 @@
{% block content %}
<h1>Search</h1>
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div class="search-wrapper">
<label for="q">Search for: </label>
<input type="search" name="q" value="{{ q }}" class="search-input">
</div>
<div>
<input type="checkbox" name="include-tags" value="1" {% if pl_include_tags %}checked{% endif %}>
<label for="include-tags">{{ T('include-tags') }}</label>
</div>
</form>
<div class="inner-content">
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<div class="search-wrapper">
<label for="q">Search for: </label>
<input type="search" name="q" value="{{ q }}" class="search-input">
</div>
<div>
<input type="checkbox" name="include-tags" value="1" {% if pl_include_tags %}checked{% endif %}>
<label for="include-tags">{{ T('include-tags') }}</label>
</div>
</form>
{% if results %}
<h2>Search results for <em>{{ q }}</em></h2>
{% if results %}
<h2>Search results for <em>{{ q }}</em></h2>
<ul class="nl-list">
{% for n in results %}
<li>{% include "includes/nl_item.jinja2" %}</li>
{% endfor %}
</ul>
{% elif q %}
<h2>{{ T('search-no-results') }} <em>{{ q }}</em></h2>
{% else %}
<p>Please note that search queries do not search for page text.</p>
{% endif %}
<ul class="nl-list">
{% for n in results %}
<li>{% include "includes/nl_item.jinja2" %}</li>
{% endfor %}
</ul>
{% elif q %}
<h2>{{ T('search-no-results') }} <em>{{ q }}</em></h2>
{% else %}
<p>Please note that search queries do not search for page text.</p>
{% endif %}
</div>
{% endblock %}

View file

@ -5,12 +5,14 @@
{% block content %}
<h1>Statistics</h1>
<ul>
<li>{{ T("notes-count") }}: <strong>{{ notes_count }}</strong></li>
<li>{{ T("notes-count-with-url") }}: <strong>{{ notes_with_url }}</strong></li>
<li>{{ T("revision-count") }}: <strong>{{ revision_count }}</strong></li>
<li>{{ T("revision-count-per-page") }}: <strong>{{ (revision_count / notes_count)|round(2) }}</strong></li>
<li>{{ T('users-count') }}: <strong>{{ users_count }}</strong></li>
<li>{{ T('groups-count') }}: <strong>{{ groups_count }}</strong></li>
</ul>
<div class="inner-content">
<ul>
<li>{{ T("notes-count") }}: <strong>{{ notes_count }}</strong></li>
<li>{{ T("notes-count-with-url") }}: <strong>{{ notes_with_url }}</strong></li>
<li>{{ T("revision-count") }}: <strong>{{ revision_count }}</strong></li>
<li>{{ T("revision-count-per-page") }}: <strong>{{ (revision_count / notes_count)|round(2) }}</strong></li>
<li>{{ T('users-count') }}: <strong>{{ users_count }}</strong></li>
<li>{{ T('groups-count') }}: <strong>{{ groups_count }}</strong></li>
</ul>
</div>
{% endblock %}

View file

@ -5,7 +5,7 @@
{% block content %}
<h1 id="firstHeading">Terms of Service</h1>
<div class="inner-content">
<div class="inner-content article-content">
{% filter markdown %}
## Scope and Definitions

View file

@ -1,23 +0,0 @@
{% extends "base.jinja2" %}
{% block title %}Info on file "{{ upl.name }}" - {{ app_name }}{% endblock %}
{% block content %}
<h1>Info on file "{{ upl.name }}"</h1>
<div class="upload-frame">
<img src="{{ upl.url }}" alt="{{ upl.name }}">
</div>
<p>You can include this file in other pages with <strong>{{ '{{' }}media:{{ upl.id }}{{ '}}' }}</strong>.</p>
<h2>File info</h2>
<p>Type: {{ type_list[upl.filetype] }}</p>
<p>Upload ID: {{ upl.id }}</p>
<p>Uploaded on: {{ upl.upload_date.strftime('%B %-d, %Y %H:%M:%S') }}</p>
<p>Size: {{ upl.filesize }} bytes</p>
{% endblock %}

View file

@ -42,7 +42,7 @@
</div>
{% endif %}
<div class="inner-content">
<div class="inner-content article-content">
{{ html_and_toc[0]|safe }}
</div>