Style changes

This commit is contained in:
Yusur 2022-05-18 02:37:51 +02:00
parent c53cc54d1a
commit 4097e79bbb
3 changed files with 17 additions and 13 deletions

2
app.py
View file

@ -139,7 +139,7 @@ class Page(BaseModel):
def get_url(self):
return '/' + self.url + '/' if self.url else '/p/{}/'.format(self.id)
def short_desc(self):
text = remove_tags(self.latest.text)
text = remove_tags(self.latest.text, convert = not _getconf('site', 'simple_remove_tags', False))
return text[:200] + ('\u2026' if len(text) > 200 else '')
def change_tags(self, new_tags):
old_tags = set(x.name for x in self.tags)

View file

@ -46,6 +46,7 @@ input[type="submit"],input[type="reset"],input[type="button"],button{font-family
.page-tags .tag-count{color:#3c3;font-size:smaller;font-weight:600}
.search-wrapper {display:flex;width:90%;margin:auto}
.search-wrapper > input {flex:1}
.preview-subtitle {text-align: center; margin-top: -1em}
/* Circles extension */
.circles-red{color: #e14}

View file

@ -16,22 +16,25 @@
{% block content %}
{% if preview %}
<h1>{{ pl_title }} (preview)</h1>
<article>
<h1 id="firstHeading">{{ pl_title }}</h1>
<div class="preview-subtitle">Preview</div>
<div class="preview-area">
<div class="preview-warning">
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 style="clear:both"></div>
</div>
<div class="preview-area">
<div class="preview-warning">
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 style="clear:both"></div>
</div>
</article>
{% endif %}
<form method="POST">
<div>
<label for="title">URL: </label>
<input type="text" name="url" class="url-input" placeholder="No URL" maxlength="64" value="{{ pl_url or '' }}">
<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 '' }}">
</div>
<div>
<input type="text" required name="title" placeholder="Title (required)" class="title-input" maxlength="256" value="{{ pl_title }}">