fix bootstrap implementation
This commit is contained in:
parent
fceeabe652
commit
f7137e2d4c
@ -6,10 +6,7 @@
|
|||||||
|
|
||||||
<title>{% block title %}Meine Links{% endblock %}</title>
|
<title>{% block title %}Meine Links{% endblock %}</title>
|
||||||
|
|
||||||
<link
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* common styles */
|
/* common styles */
|
||||||
@ -31,14 +28,13 @@
|
|||||||
.card {
|
.card {
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
.locked { background-color:rgb(255, 255, 255); }
|
.locked { background-color:#eee; }
|
||||||
.unlocked { background-color: #fff3cd; }
|
.unlocked { background-color: #fff3cd; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% block head_extra %}{% endblock %}
|
{% block head_extra %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="{{ url_for('static', filename='functions.js') }}"></script>
|
|
||||||
|
|
||||||
<!-- Navigation Bar -->
|
<!-- Navigation Bar -->
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-secondary mb-3">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-secondary mb-3">
|
||||||
@ -67,5 +63,6 @@
|
|||||||
{% block scripts %}{% endblock %}
|
{% block scripts %}{% endblock %}
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="{{ url_for('static', filename='functions.js') }}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -145,7 +145,7 @@
|
|||||||
<div class="col-md-6 mb-3">
|
<div class="col-md-6 mb-3">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Anzahl Nutzer</h5>
|
<h5 class="card-title">Anzahl Geräte</h5>
|
||||||
<canvas id="distinctDeviceChart"></canvas>
|
<canvas id="distinctDeviceChart"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -246,7 +246,6 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// Data passed from the backend as JSON
|
// Data passed from the backend as JSON
|
||||||
|
|||||||
@ -35,9 +35,8 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<!-- jQuery and Bootstrap JS -->
|
<!-- jQuery -->
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
const ALPHABET = {{ alphabet|tojson }};
|
const ALPHABET = {{ alphabet|tojson }};
|
||||||
let data = [];
|
let data = [];
|
||||||
@ -60,7 +59,7 @@
|
|||||||
const expired = validityISO ? (new Date(validityISO) < new Date()) : false;
|
const expired = validityISO ? (new Date(validityISO) < new Date()) : false;
|
||||||
|
|
||||||
// Build card HTML
|
// Build card HTML
|
||||||
let html = `<div class="card mb-3 ${cls}" data-secret="${key}"><div class="card-body">`;
|
let html = `<div class="card mb-3" data-secret="${key}"><div class="card-body ${cls}">`;
|
||||||
// Show exclamation if expired
|
// Show exclamation if expired
|
||||||
html += `<h5>Link${expired ? ' <span class="text-danger fw-bold"> ! abgelaufen !</span>' : ''}</h5>`;
|
html += `<h5>Link${expired ? ' <span class="text-danger fw-bold"> ! abgelaufen !</span>' : ''}</h5>`;
|
||||||
html += `<div class="mb-2">Secret: <input class="form-control" type="text" value="${rec.secret}" ${isEdit?'':'readonly'} data-field="secret"></div>`;
|
html += `<div class="mb-2">Secret: <input class="form-control" type="text" value="${rec.secret}" ${isEdit?'':'readonly'} data-field="secret"></div>`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user