added Stufff

This commit is contained in:
2025-06-23 16:52:42 +02:00
parent f1fe4aa05a
commit d9b50ac103
18 changed files with 564 additions and 266 deletions

View File

@@ -0,0 +1,12 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url_for('index') }}" class="a">Home</a></li>
{% for crumb in breadcrumbs %}
<li class="breadcrumb-item">
<a href="{{ url_for('index', dir=crumb.path) }}" class="a">{{ crumb.name }}</a>
</li>
{% endfor %}
</ol>
<hr>
</nav>

7
templates/_folder.html Normal file
View File

@@ -0,0 +1,7 @@
<div class="card-container">
<div class="card">
<a href="{{ url_for('index', dir=dir.path) }}" class="a">
<i class="fas fa-folder"></i> {{ dir.name }}
</a>
</div>
</div>

19
templates/_navbar.html Normal file
View File

@@ -0,0 +1,19 @@
<nav class="navbar">
<div class="navbar-container">
<a href="{{ url_for('index') }}">
<img src="https://www.tu-braunschweig.de/fileadmin/Logos_Einrichtungen/Institute_FK5/logo_IFN.svg"/>
</a>
<div class="navbar-middle">
<h1>
{% if current_dir %}
{{ current_dir }}
{% else %}
All Notebooks
{% endif %}
</h1>
</div>
</div>
</nav>

21
templates/_notebook.html Normal file
View File

@@ -0,0 +1,21 @@
<div class="card-container">
<div class="card">
<a href="{{ url_for('view_notebook', notebook_path=notebook.path) }}" class="a">
<i class="fas fa-file-code"></i> {{ notebook.name }}
</a>
<div class="buttons">
<div class="card-stats">
<p>Last Modified: <strong>{{ notebook.modified }}</strong></p>
<p>Size: <strong>{{ notebook.size }} KB</strong></p>
</div>
{% if config.ENABLE_DOWNLOAD %}
<a href="{{ url_for('download_notebook', notebook_path=notebook.path) }}" class="button download-button">
<i class="fas fa-download"></i> Download
</a>
{% endif %}
</div>
</div>
</div>

19
templates/base.html Normal file
View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<title>{{ config.APP_TITLE }}</title>
</head>
<body class="body">
{% include '_navbar.html' %}
<main class="main">
{% include '_breadcrumb.html' %}
{% block content %}
{% endblock %}
</main>
</body>
</html>

9
templates/error.html Normal file
View File

@@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<div class="error">
<i class="fas fa-triangle-exclamation"></i>
<h1>Error {{error_code}}</h1>
<strong>{{error_message}}</strong>
</div>
{% endblock %}

27
templates/index.html Normal file
View File

@@ -0,0 +1,27 @@
{% extends "base.html" %}
{% block content %}
<!-- Directories -->
{% if directories %}
<div class="row">
<h3><i class="fas fa-folder"></i> Directories</h3>
{% for dir in directories %}
{% include '_folder.html' %}
{% endfor %}
</div>
<hr />
{% endif %}
<!-- Notebooks -->
{% if notebooks %}
<div class="row">
<h3><i class="fas fa-file-code"></i> Notebooks</h3>
{% for notebook in notebooks %}
{% include '_notebook.html' %}
{% endfor %}
</div>
{% endif %}
{% endblock %}

14
templates/notebook.html Normal file
View File

@@ -0,0 +1,14 @@
{% extends 'base.html' %}
{% block content %}
<div class="notebook-header">
<h2>
<i class="fas fa-file-code text-primary"></i> {{ notebook_name }}
</h2>
{% if config.ENABLE_DOWNLOAD %}
<a href="{{ url_for('download_notebook', notebook_path=notebook_path) }}" class="a button download-button">
<i class="fas fa-download"></i> Download
</a>
{% endif %}
</div>
{{ html_content|safe }}
{% endblock %}