Basic settings support
This commit is contained in:
parent
239258e324
commit
4960527af3
10 changed files with 189 additions and 20 deletions
|
|
@ -4,11 +4,12 @@
|
|||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
<title>Samey</title>
|
||||
<title>{{ application_name }}</title>
|
||||
<meta name="generator" content="Samey {{ env!("CARGO_PKG_VERSION") }}" />
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>Samey</h1>
|
||||
<h1>{{ application_name }}</h1>
|
||||
<article>
|
||||
<h2>Search</h2>
|
||||
<form method="get" action="/posts/1">
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
<script src=" https://cdn.jsdelivr.net/npm/sortablejs@1.15.6/Sortable.min.js "></script>
|
||||
<title>Pool - {{ pool.name }} - Samey</title>
|
||||
<title>Pool - {{ pool.name }} - {{ application_name }}</title>
|
||||
<meta name="generator" content="Samey {{ env!("CARGO_PKG_VERSION") }}" />
|
||||
<meta property="og:title" content="{{ pool.name }}" />
|
||||
<meta property="og:url" content="/pool/{{ pool.id }}" />
|
||||
<meta property="twitter:title" content="{{ pool.name }}" />
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
<title>Pools - Samey</title>
|
||||
<title>Pools - {{ application_name }}</title>
|
||||
<meta name="generator" content="Samey {{ env!("CARGO_PKG_VERSION") }}" />
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
<title>Posts - Samey</title>
|
||||
<title>Posts - {{ application_name }}</title>
|
||||
<meta name="generator" content="Samey {{ env!("CARGO_PKG_VERSION") }}" />
|
||||
</head>
|
||||
<body>
|
||||
<article>
|
||||
|
|
|
|||
24
templates/settings.html
Normal file
24
templates/settings.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
<title>Settings - {{ application_name }}</title>
|
||||
<meta name="generator" content="Samey {{ env!("CARGO_PKG_VERSION") }}" />
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>Settings</h1>
|
||||
<form hx-put="/settings" hx-swap="none">
|
||||
<label>Application name</label>
|
||||
<input
|
||||
name="application_name"
|
||||
type="text"
|
||||
value="{{ application_name }}"
|
||||
/>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -4,7 +4,8 @@
|
|||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
<title>Post #{{ post.id }} - Samey</title>
|
||||
<title>Post #{{ post.id }} - {{ application_name }}</title>
|
||||
<meta name="generator" content="Samey {{ env!("CARGO_PKG_VERSION") }}" />
|
||||
<meta
|
||||
property="og:title"
|
||||
content="{% if let Some(title) = post.title %}{{ title }}{% endif %}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue