templates: moved pages to pages

This commit is contained in:
Philippe Loctaux 2023-03-08 23:13:27 +01:00
parent 5b8fef624d
commit f22563b3ec
6 changed files with 21 additions and 38 deletions

View file

@ -18,9 +18,9 @@ impl Page {
/// Template to render, the names comes from the file in "/templates"
fn template_name(&self) -> &'static str {
match self {
Page::Error(_) => "error",
Page::Setup => "setup",
Page::Homepage(_) => "homepage",
Page::Error(_) => "pages/error",
Page::Setup => "pages/setup",
Page::Homepage(_) => "pages/homepage",
}
}

View file

@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<title>{{ title }}</title>
<title>{{ title }} - ezidam</title>
<!-- CSS files -->
<link href="/css/tabler.min.css" rel="stylesheet"/>
<link href="/css/demo.min.css" rel="stylesheet"/>
@ -18,12 +18,5 @@
}
</style>
</head>
{% block content %}{% endblock content %}
<div>
<div>ezidam version {{ version }}</div>
</div>
{% block page %}{% endblock page %}
</html>

View file

@ -1,18 +0,0 @@
{% extends "base" %}
{% block content %}
<body>
<div class="text-center mb-4">
<a href="/" class="navbar-brand navbar-brand-autodark">
<img src="/logo" height="96" alt="logo">
</a>
</div>
<div>
homepage goes here {{ abc }}
</div>
<div>
<span class="avatar" style="background-image: url(/avatar/8tamxHnWFctAeV7)"></span>
<span class="avatar" style="background-image: url(/avatar/8tamxHnWFctAeV7?size=300)"></span>
</div>
</body>
{% endblock content %}

View file

@ -1,6 +1,6 @@
{% extends "base" %}
{% block content %}
{% block page %}
<body class=" border-top-wide border-primary d-flex flex-column">
<script src="/js/demo-theme.min.js"></script>
<div class="page page-center">
@ -26,4 +26,4 @@
<script src="/js/tabler.min.js" defer></script>
<script src="/js/demo.min.js" defer></script>
</body>
{% endblock content %}
{% endblock page %}

View file

@ -0,0 +1,9 @@
{% extends "shell" %}
{% block content %}
<div>
<div>
homepage goes here {{ abc }}
</div>
</div>
{% endblock content %}

View file

@ -1,14 +1,12 @@
{% extends "base" %}
{% block content %}
{% block page %}
<body class=" d-flex flex-column">
<script src="/js/demo-theme.min.js"></script>
<div class="page page-center">
<div class="">
<div class="container container-tight py-4">
<div class="text-center mb-4">
<a href="/" class="navbar-brand navbar-brand-autodark">
<img src="/logo" height="96" alt="logo">
</a>
{% include "utils/logo" %}
</div>
{% if flash %}
@ -57,6 +55,7 @@
</div>
</div>
</form>
{% include "shell/footer" %}
</div>
</div>
<!-- Libs JS -->
@ -64,4 +63,4 @@
<script src="/js/tabler.min.js" defer></script>
<script src="/js/demo.min.js" defer></script>
</body>
{% endblock content %}
{% endblock page %}