mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
frontend: remove the nodejs stuff, I don't think I need it for such a simple project
This commit is contained in:
9
crates/frontend/public/templates/pages/calendar.html
Normal file
9
crates/frontend/public/templates/pages/calendar.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "layouts/default.html" %}
|
||||
|
||||
{% block imports %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Test</h1>
|
||||
<a href="/frontend/user/{{ calendar.principal }}">Back</a>
|
||||
{% endblock %}
|
||||
12
crates/frontend/public/templates/pages/login.html
Normal file
12
crates/frontend/public/templates/pages/login.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "layouts/default.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Login</h1>
|
||||
<form action="login" method="post">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" placeholder="username">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" placeholder="password">
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
50
crates/frontend/public/templates/pages/user.html
Normal file
50
crates/frontend/public/templates/pages/user.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{% extends "layouts/default.html" %}
|
||||
|
||||
{% block imports %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<style>
|
||||
li.calendar-list-item {
|
||||
list-style: none;
|
||||
display: grid;
|
||||
margin: 12px;
|
||||
min-height: 80px;
|
||||
background: #EEE;
|
||||
padding: 8px;
|
||||
border-radius: 12px;
|
||||
grid-template-areas:
|
||||
"title color-chip"
|
||||
"description color-chip";
|
||||
grid-template-rows: auto auto;
|
||||
grid-template-columns: auto 50px;
|
||||
padding: 0;
|
||||
|
||||
a {
|
||||
display: contents;
|
||||
|
||||
.color-chip {
|
||||
background: var(--color);
|
||||
grid-area: color-chip;
|
||||
border-radius: 0 12px 12px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<h2>Welcome {{ user_id }}!</h2>
|
||||
<ul>
|
||||
{% for calendar in calendars %}
|
||||
{% let color = calendar.color.to_owned().unwrap_or("red".to_owned()) %}
|
||||
<li class="calendar-list-item" style="--color: {{ color }}">
|
||||
<a href="/frontend/user/{{ user_id }}/{{ calendar.id}}">
|
||||
<span class="title">{{ calendar.displayname.to_owned().unwrap_or(calendar.id.to_owned()) }}</span>
|
||||
<span class="description">
|
||||
{% if let Some(description) = calendar.description %}{{ description }}{% endif %}
|
||||
</span>
|
||||
<div class="color-chip"></div>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user