mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-14 19:57:27 +08:00
mai2: rework photo uploads, relates to #67
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<ul class="mai2-navi">
|
||||
<li><a class="nav-link" href="/game/mai2/">PROFILE</a></li>
|
||||
<li><a class="nav-link" href="/game/mai2/playlog/">RECORD</a></li>
|
||||
<li><a class="nav-link" href="/game/mai2/playlog/photos">PHOTOS</a></li>
|
||||
{% if sesh is defined and sesh is not none and "{:08b}".format(sesh.permissions)[4] == "1" %}
|
||||
<li><a class="nav-link" href="/game/mai2/events/">EVENTS</a></li>
|
||||
{% endif %}
|
||||
@@ -13,6 +14,8 @@
|
||||
var currentPath = window.location.pathname;
|
||||
if (currentPath === '/game/mai2/') {
|
||||
$('.nav-link[href="/game/mai2/"]').addClass('active');
|
||||
} else if (currentPath.startsWith('/game/mai2/playlog/photos')) {
|
||||
$('.nav-link[href="/game/mai2/playlog/photos"]').addClass('active');
|
||||
} else if (currentPath.startsWith('/game/mai2/playlog/')) {
|
||||
$('.nav-link[href="/game/mai2/playlog/"]').addClass('active');
|
||||
} {% if sesh is defined and sesh is not none and "{:08b}".format(sesh.permissions)[4] == "1" %}else if (currentPath.startsWith('/game/mai2/events/')) {
|
||||
|
||||
28
titles/mai2/templates/mai2_photos.jinja
Normal file
28
titles/mai2/templates/mai2_photos.jinja
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends "core/templates/index.jinja" %}
|
||||
{% block content %}
|
||||
<style>
|
||||
{% include 'titles/mai2/templates/css/mai2_style.css' %}
|
||||
</style>
|
||||
<div class="container">
|
||||
{% include 'titles/mai2/templates/mai2_header.jinja' %}
|
||||
<div class="row">
|
||||
<h4 style="text-align: center;">Memorial Photos</h4><sub style="text-align: center;">Photos expire after {{ expire_days }} days</sub>
|
||||
{% if photos is defined and photos is not none and photos|length > 0 %}
|
||||
{% for photo in photos %}
|
||||
<div class="col-lg-6 mt-3" style="text-align: center;">
|
||||
Playlog #{{ photo.playlog_num }} | Track #{{ photo.track_num }}
|
||||
<br>
|
||||
{{ photo.when_upload }}
|
||||
<br>
|
||||
<img src="/game/mai2/photo/{{ photo.id }}.jpeg">
|
||||
</div>
|
||||
<br>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="col-lg-6 mt-3" style="text-align: center;">
|
||||
<i>No photos</i>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user