addet some features

This commit is contained in:
pika 2025-03-22 02:13:26 +01:00
parent 0861ae20c3
commit 97e3262506
11 changed files with 1369 additions and 208 deletions

View file

@ -1,69 +1,104 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ filename }} - Markdown Viewer</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/digitallytailored/classless@latest/classless.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<link rel="stylesheet" href="github-markdown.css">-->
<style>
pre {
background-color: #f5f5f5;
padding: 1em;
border-radius: 4px;
overflow-x: auto;
{% extends "base.html" %}
{% block head %}
{{ super() }}
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- This supports light and dark mode automatically. -->
<link rel="stylesheet" href="https://esm.sh/@wooorm/starry-night@3/style/both">
<link rel="stylesheet" href="github-markdown.css">
<!-- <style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
table {
border-collapse: collapse;
width: 100%;
margin: 1em 0;
}
table, th, td {
border: 1px solid #ddd;
}
th, td {
padding: 0.5em;
text-align: left;
}
.document-info {
margin-bottom: 2em;
padding: 1em;
background-color: #f9f9f9;
border-radius: 4px;
}
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}
/* GitHub-style admonitions */
.markdown-alert {
padding: 0.5rem 1rem;
margin-bottom: 16px;
border-radius: 6px;
}
.markdown-alert-title {
font-weight: 600;
margin-bottom: 8px;
display: flex;
align-items: center;
}
.markdown-alert-title svg {
margin-right: 8px;
}
.markdown-alert-note {
border-left: 4px solid #0969da;
background-color: #ddf4ff;
}
.markdown-alert-tip {
border-left: 4px solid #1a7f37;
background-color: #dafbe1;
}
.markdown-alert-important {
border-left: 4px solid #9a6700;
background-color: #fff8c5;
}
.markdown-alert-warning {
border-left: 4px solid #9a6700;
background-color: #fff8c5;
}
.markdown-alert-caution {
border-left: 4px solid #cf222e;
background-color: #ffebe9;
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
.markdown-alert-note {
background-color: rgba(56, 139, 253, 0.15);
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
} </style>
</head>
<body>
<div class="document-info">
<h1>{{ filename }}</h1>
<p>
<strong>Permanent Link:</strong>
<code>{{ url_for('main.view_file', uri=uri, _external=True) }}</code>
</p>
</div>
<div class="content">
{{ content|safe }}
</div>
<div class="actions">
<a href="{{ url_for('main.upload_file') }}">Upload Another Document</a> |
<a href="{{ url_for('main.index') }}">Home</a>
</div>
</body>
</html>
.markdown-alert-tip {
background-color: rgba(46, 160, 67, 0.15);
}
.markdown-alert-important,
.markdown-alert-warning {
background-color: rgba(187, 128, 9, 0.15);
}
.markdown-alert-caution {
background-color: rgba(248, 81, 73, 0.15);
}
}
</style> -->
{% endblock %}
{% block content %}
<div class="markdown-body">
<h1>{{ filename }}</h1>
<p>
<strong>Permanent Link:</strong>
<code>{{ url_for('main.view_file', uri=uri, _external=True) }}</code>
</p>
</div>
<div class="markdown-body">
{{ content|safe }}
</div>
<div>
<button class="glass" href="{{ url_for('main.upload_file') }}">Upload Another Document</button>
<!-- <button class="glass" href="{{ url_for('main.index') }}">Home</button> -->
</div>
{% endblock %}