more cleanup

This commit is contained in:
Your Name 2023-06-09 03:01:17 -04:00 committed by Henri Dickson
parent 80fa8366ac
commit 16bbd72ae0
36 changed files with 70 additions and 223 deletions

View file

@ -56,6 +56,6 @@
{% include "_sidebar_edit.html" %}
</aside>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -107,6 +107,6 @@
{% include "partial/_sidebar_anonymous.html" %}
{% endif %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -33,6 +33,6 @@
{% include "_sidebar_search.html" %}
</aside>
</main>
{% include 'partial/_footer.html' %}
{% include '_footer.html' %}
</body>
</html>

View file

@ -415,6 +415,6 @@
</div>
<div style="clear: both;display: table;"></div>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -88,6 +88,6 @@
{% include "_sidebar_item.html" %}
</aside>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -82,6 +82,6 @@
{% include "_sidebar_item.html" %}
</aside>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -130,6 +130,6 @@
{% include "_sidebar_search.html" %}
</aside>
</main>
{% include 'partial/_footer.html' %}
{% include '_footer.html' %}
</body>
</html>

View file

@ -142,20 +142,18 @@ body {
padding-top: 0.4em !important;
text-align: center;
margin-bottom: 4px !important;
width: 100%;
.footer__border {
width: 100%;
>div {
padding-top: 4px;
}
.footer__link {
margin: 0 12px;
white-space: nowrap;
min-width: 15vw;
>div {
white-space: nowrap;
min-width: 15vw;
}
}
@media (min-width: 769px) {
width: 60%;
clear: both;
position: absolute !important;
left: 50%;

View file

@ -30,6 +30,6 @@
</section>
</article>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -25,6 +25,6 @@
您可能访问了错误的网址,或者相关内容已被作者删除。如果您确信这是我们的错误,请通过页面底部的链接联系我们。
</article>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -24,6 +24,6 @@
您可能输入了一个无效的网址,或者相关内容已被作者删除。如果您确信这是我们的错误,请通过页面底部的链接联系我们。
</article>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -24,6 +24,6 @@
发生了一个内部错误,如果这个错误多次出现,后台会记录并会由人工处理。如果您有紧急情况或任何疑问,请通过页面底部的链接联系我们。
</article>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -0,0 +1,34 @@
<footer class="footer">
<div class="grid">
{% if social_link %}
<a class="footer__link"
target="_blank"
rel="noopener"
href="{{ social_link }}">关注我们</a>
{% endif %}
{% if support_link %}
<a class="footer__link"
target="_blank"
rel="noopener"
href="{{ support_link }}">问题反馈</a>
{% endif %}
{% if donation_link %}
<a class="footer__link"
target="_blank"
rel="noopener"
href="{{ donation_link }}">捐助本站</a>
{% endif %}
<a class="footer__link" href="{% url 'management:list' %}">公告栏</a>
<a class="footer__link" href="{% url 'common:developer' %}">API</a>
<a class="footer__link"
target="_blank"
rel="noopener"
href="https://github.com/neodb-social">源代码</a>
</div>
</footer>
<div class="player"></div>
<script>
document.body.addEventListener('htmx:configRequest', (event) => {
event.detail.headers['X-CSRFToken'] = '{{ csrf_token }}';
})
</script>

View file

@ -24,6 +24,6 @@
{{ secondary_msg|default:"" }}
</article>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -65,6 +65,6 @@
})
</script>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -1,52 +0,0 @@
{% load static %}
{% load i18n %}
{% load admin_url %}
{% load mastodon %}
{% load oauth_token %}
{% load truncate %}
{% load thumb %}
<div id="modals">
<style>
.bottom-link {
margin-top: 30px; text-align: center; margin-bottom: 5px;
}
.bottom-link a {
color: #ccc;
}
</style>
<div class="announcement-modal modal">
<div class="announcement-modal__head">
<h4 class="announcement-modal__title">{% trans '公告' %}</h4>
<span class="announcement-modal__close-button modal-close">
<i class="fa-solid fa-xmark"></i>
</span>
</div>
<div class="announcement-modal__body">
<ul>
{% for ann in request.user.unread_announcements %}
<li class="announcement">
<a href="{% url 'management:retrieve' ann.pk %}">
<h5 class="announcement__title">{{ ann.title }}</h5>
</a>
<span class="announcement__datetime">{{ ann.created_time }}</span>
<p class="announcement__content">{{ ann.get_plain_content | truncate:200 }}</p>
</li>
{% if not forloop.last %}<div class="dividing-line" style="border-top-style: dashed;"></div>{% endif %}
{% endfor %}
</ul>
<div class="bottom-link">
<a href="{% url 'management:list' %}">{% trans '查看全部公告' %}</a>
</div>
</div>
</div>
</div>
<div class="bg-mask"></div>
<script>
// because the modal and mask elements only exist when there are new announcements
$(".announcement-modal").show();
$(".bg-mask").show();
$(".modal-close").on('click', function () {
$(this).parents(".modal").hide();
$(".bg-mask").hide();
});
</script>

View file

@ -1,36 +0,0 @@
<footer class="footer">
<div class="grid">
<div class="footer__border">
{% if social_link %}
<a class="footer__link"
target="_blank"
rel="noopener"
href="{{ social_link }}">关注我们</a>
{% endif %}
{% if support_link %}
<a class="footer__link"
target="_blank"
rel="noopener"
href="{{ support_link }}">问题反馈</a>
{% endif %}
{% if donation_link %}
<a class="footer__link"
target="_blank"
rel="noopener"
href="{{ donation_link }}">捐助本站</a>
{% endif %}
<a class="footer__link" href="{% url 'management:list' %}">公告栏</a>
<a class="footer__link" href="{% url 'common:developer' %}">API</a>
<a class="footer__link"
target="_blank"
rel="noopener"
href="https://github.com/neodb-social">源代码</a>
</div>
</div>
</footer>
<div class="player"></div>
<script>
document.body.addEventListener('htmx:configRequest', (event) => {
event.detail.headers['X-CSRFToken'] = '{{ csrf_token }}';
})
</script>

View file

@ -1,97 +0,0 @@
{% load static %}
{% load i18n %}
{% load admin_url %}
<form method="get" action="{% url 'catalog:search' %}">
<section id="navbar">
<nav class="navbar">
<div class="grid">
<div class="navbar__wrapper">
<a href="{% url 'common:home' %}" class="navbar__logo">
<img src="{% static 'img/logo.svg' %}" alt="" class="navbar__logo-img">
</a>
<div class="navbar__search-box">
<!-- <input type="search"
name="q"
id="searchInput"
required="true"
value="{% for v in request.GET.values %}{{ v }}{% endfor %}"
-->
<input type="search"
name="q"
id="searchInput"
required="true"
value="{% if request.GET.q %}{{ request.GET.q }}{% endif %}"
placeholder="搜索书影音游戏播客,或输入站外条目链接如 https://movie.douban.com/subject/1297880/ 支持站点列表见页底公告栏">
<select class="navbar__search-dropdown" id="searchCategory" name="c">
<option value="all"
{% if request.GET.c and request.GET.c == 'all' or not request.GET.c %}selected{% endif %}>
{% trans '任意' %}
</option>
<option value="book"
{% if request.GET.c and request.GET.c == 'book' or '/book/' in request.path %}selected{% endif %}>
{% trans '书籍' %}
</option>
<option value="movie"
{% if request.GET.c and request.GET.c == 'movie' or '/movie/' in request.path %}selected{% endif %}>
{% trans '电影' %}
</option>
<option value="tv"
{% if request.GET.c and request.GET.c == 'tv' or '/tv/' in request.path %}selected{% endif %}>
{% trans '剧集' %}
</option>
<option value="podcast"
{% if request.GET.c and request.GET.c == 'podcast' or '/podcast/' in request.path %}selected{% endif %}>
{% trans '播客' %}
</option>
<option value="music"
{% if request.GET.c and request.GET.c == 'music' or '/album/' in request.path %}selected{% endif %}>
{% trans '音乐' %}
</option>
<option value="game"
{% if request.GET.c and request.GET.c == 'game' or '/game/' in request.path %}selected{% endif %}>
{% trans '游戏' %}
</option>
</select>
</div>
<ul class="navbar__link-list">
{% if request.user.is_authenticated %}
<a class="navbar__link {% if current == 'discover' %}current{% endif %}"
href="{% url 'catalog:discover' %}">{% trans '发现' %}</a>
<a class="navbar__link {% if current == 'timeline' %}current{% endif %}"
href="{% url 'social:feed' %}">{% trans '动态' %}</a>
<a class="navbar__link {% if current == 'home' %}current{% endif %}"
href="{% url 'journal:user_profile' request.user.mastodon_username %}">{% trans '个人主页' %}</a>
<div class="navbar__link dropdown">
<a class="dropbtn"><i class="fa-solid fa-gear" title="{% trans '更多' %}"></i></a>
<div class="dropdown-content">
<a class="navbar__link {% if current == 'data' %}current{% endif %}"
href="{% url 'users:data' %}">{% trans '数据' %}</a>
<a class="navbar__link {% if current == 'preferences' %}current{% endif %}"
href="{% url 'users:preferences' %}">{% trans '设置' %}</a>
<a class="navbar__link" id="logoutLink" href="{% url 'users:logout' %}">{% trans '登出' %}</a>
{% if request.user.is_superuser %}
<a class="navbar__link" href="{% admin_url %}">{% trans '后台' %}</a>
{% endif %}
</div>
</div>
{% else %}
<a class="navbar__link"
href="{% url 'users:login' %}?next={{ request.path }}">{% trans '登录' %}</a>
{% endif %}
</ul>
</div>
</div>
</nav>
</section>
</form>
{% if messages %}
<div class="main-section-wrapper"
style="margin-bottom: 10px;
text-align:center">
<ul class="messages">
{% for message in messages %}
<li {% if message.tags %}class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}

View file

@ -131,6 +131,6 @@
</div>
{% include "_sidebar.html" with user=collection.owner show_profile=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -55,6 +55,6 @@
</div>
{% include "_sidebar.html" with show_profile=1 fold_profile=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -37,6 +37,6 @@
</footer>
</article>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -186,6 +186,6 @@
</div>
{% include "_sidebar.html" with show_progress=1 show_profile=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -88,6 +88,6 @@
$(this).toggleClass('revealed');
})
</script>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -125,6 +125,6 @@ Content Cell | Content Cell
$(this).toggleClass('revealed');
})
</script>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -54,6 +54,6 @@
</div>
{% include "_sidebar.html" with show_profile=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -54,6 +54,6 @@
</div>
{% include "_sidebar.html" with show_profile=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -36,6 +36,6 @@
</div>
{% include "_sidebar.html" with show_profile=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -28,6 +28,6 @@
</footer>
</article>
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -62,6 +62,6 @@
<p>{% trans '暂无公告' %}</p>
{% endfor %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -33,6 +33,6 @@
</div>
{% include "_sidebar.html" with show_progress=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -232,6 +232,6 @@
</div>
{% include "_sidebar.html" with show_profile=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -28,6 +28,6 @@
</article>
{% endfor %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -142,6 +142,6 @@
</div>
{% include "_sidebar.html" with show_profile=1 %}
</main>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
</body>
</html>

View file

@ -49,7 +49,7 @@
</div>
{% include "_sidebar.html" with show_profile=1 %}
</main>
{% include 'partial/_footer.html' %}
{% include '_footer.html' %}
<div id="oauth2Token" hidden="true">{% oauth_token %}</div>
<div id="mastodonURI" hidden="true">{% mastodon request.user.mastodon_site %}</div>
<!--current user mastodon id-->

View file

@ -24,7 +24,7 @@
<input class="button" type="submit" value="{% trans '提交' %}">
</form>
</div>
{% include "partial/_footer.html" %}
{% include "_footer.html" %}
<script>
// preview uploaded pic
$("input[type='file']").on("change", function () {