feat: add CSS styles and JavaScript functionality for projects and scenarios, including filtering and layout enhancements

This commit is contained in:
2025-11-09 17:36:31 +01:00
parent d36611606d
commit faea6777a0
9 changed files with 247 additions and 3 deletions

View File

@@ -1,6 +1,10 @@
{% extends "base.html" %}
{% block title %}{{ project.name }} · Project · CalMiner{% endblock %}
{% block head_extra %}
<link rel="stylesheet" href="/static/css/projects.css" />
{% endblock %}
{% block content %}
<nav class="breadcrumb">
<a href="{{ url_for('projects.project_list_page') }}">Projects</a>

View File

@@ -1,6 +1,10 @@
{% extends "base.html" %}
{% block title %}{% if project %}Edit {{ project.name }}{% else %}New Project{% endif %} · CalMiner{% endblock %}
{% block head_extra %}
<link rel="stylesheet" href="/static/css/projects.css" />
{% endblock %}
{% block content %}
<nav class="breadcrumb">
<a href="{{ url_for('projects.project_list_page') }}">Projects</a>

View File

@@ -1,17 +1,29 @@
{% extends "base.html" %}
{% block title %}Projects · CalMiner{% endblock %}
{% block head_extra %}
<link rel="stylesheet" href="/static/css/projects.css" />
{% endblock %}
{% block content %}
<section class="page-header">
<div>
<h1>Projects</h1>
<p class="text-muted">Manage mining projects and explore their scenarios.</p>
</div>
<a class="btn btn-primary" href="{{ url_for('projects.create_project_form') }}">New Project</a>
<div class="actions">
<input
type="search"
class="form-control"
placeholder="Filter projects..."
data-project-filter
/>
<a class="btn btn-primary" href="{{ url_for('projects.create_project_form') }}">New Project</a>
</div>
</section>
{% if projects %}
<table class="table">
<table class="projects-table" data-project-table>
<thead>
<tr>
<th>Name</th>
@@ -40,3 +52,8 @@
<p>No projects yet. <a href="{{ url_for('projects.create_project_form') }}">Create your first project.</a></p>
{% endif %}
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="/static/js/projects.js"></script>
{% endblock %}

View File

@@ -1,6 +1,14 @@
{% extends "base.html" %}
{% block title %}{{ scenario.name }} · Scenario · CalMiner{% endblock %}
{% block head_extra %}
<link rel="stylesheet" href="/static/css/scenarios.css" />
{% endblock %}
{% block head_extra %}
<link rel="stylesheet" href="/static/css/scenarios.css" />
{% endblock %}
{% block content %}
<nav class="breadcrumb">
<a href="{{ url_for('projects.project_list_page') }}">Projects</a>

View File

@@ -1,6 +1,10 @@
{% extends "base.html" %}
{% block title %}{% if scenario %}Edit {{ scenario.name }}{% else %}New Scenario{% endif %} · CalMiner{% endblock %}
{% block head_extra %}
<link rel="stylesheet" href="/static/css/scenarios.css" />
{% endblock %}
{% block content %}
<nav class="breadcrumb">
<a href="{{ url_for('projects.project_list_page') }}">Projects</a>