暂存-说明文档(部分)
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
<span class="badge bg-secondary font-monospace">{{ s.ip_address }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<small class="text-muted">{{ s.last_active.strftime('%Y-%m-%d %H:%M:%S') }}</small>
|
||||
<small class="text-muted local-time" data-utc="{{ s.last_active.isoformat() }}Z">{{ s.last_active.strftime('%Y-%m-%d %H:%M:%S') }}</small>
|
||||
</td>
|
||||
<td class="text-end pe-4">
|
||||
{% if s.session_token != current_token %}
|
||||
@@ -111,4 +111,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.querySelectorAll('.local-time').forEach(function(el) {
|
||||
const utcDate = new Date(el.getAttribute('data-utc'));
|
||||
if (!isNaN(utcDate)) {
|
||||
|
||||
const pad = (n) => n.toString().padStart(2, '0');
|
||||
const yyyy = utcDate.getFullYear();
|
||||
const MM = pad(utcDate.getMonth() + 1);
|
||||
const dd = pad(utcDate.getDate());
|
||||
const HH = pad(utcDate.getHours());
|
||||
const mm = pad(utcDate.getMinutes());
|
||||
const ss = pad(utcDate.getSeconds());
|
||||
|
||||
el.textContent = `${yyyy}-${MM}-${dd} ${HH}:${mm}:${ss}`;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
56
app/templates/slice/helper_slice.html
Normal file
56
app/templates/slice/helper_slice.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||
<h1 class="h2">{{ _('Slice Helper') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Helper Content -->
|
||||
<div class="col-12 markdown-body p-4 bg-white rounded shadow-sm">
|
||||
{% if content_html %}
|
||||
{{ content_html|safe }}
|
||||
{% else %}
|
||||
<p class="text-muted">{{ _('Documentation not available.') }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* 简单的 Markdown 样式优化 */
|
||||
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
|
||||
margin-top: 24px;
|
||||
margin-bottom: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.markdown-body h1 {
|
||||
font-size: 2em;
|
||||
padding-bottom: .3em;
|
||||
border-bottom: 1px solid #eaecef;
|
||||
}
|
||||
.markdown-body img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.markdown-body pre {
|
||||
background-color: #f6f8fa;
|
||||
padding: 16px;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.markdown-body code {
|
||||
font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
|
||||
}
|
||||
.markdown-body table {
|
||||
width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
color: #212529;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.markdown-body table th, .markdown-body table td {
|
||||
padding: 0.5rem;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user