More robust
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
<h1 class="page-title" id="dashboard-title">Tableau de bord</h1>
|
||||
|
||||
<div class="page-actions">
|
||||
<a class="button" href="{{ @BASE }}/dashboard/posts/create">Nouvel article</a>
|
||||
<a class="button button--ghost" href="{{ @BASE }}/dashboard/media">Médiathèque</a>
|
||||
<a class="button" href="{{ 'post_create' | alias }}">Nouvel article</a>
|
||||
<a class="button button--ghost" href="{{ 'media_index' | alias }}">Médiathèque</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
<section class="stack-lg" aria-labelledby="media-title">
|
||||
<header class="page-header">
|
||||
<h1 class="page-title" id="media-title">Médiathèque</h1>
|
||||
<div>
|
||||
<h1 class="page-title" id="media-title">Médiathèque</h1>
|
||||
<p class="field-help">Parcourir les images par page évite de charger toute la bibliothèque d'un coup.</p>
|
||||
</div>
|
||||
|
||||
<div class="page-actions">
|
||||
<a class="button button--ghost" href="{{ @BASE }}/dashboard">Retour</a>
|
||||
<a class="button button--ghost" href="{{ 'dashboard' | alias }}">Retour</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<form class="panel stack" method="post" action="{{ @BASE }}/dashboard/media" enctype="multipart/form-data">
|
||||
<form class="panel stack" method="post" action="{{ 'media_upload' | alias }}" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" value="{{ @csrfToken }}">
|
||||
<label class="field">
|
||||
<span class="field-label">Nouvelle image</span>
|
||||
<input class="control" type="file" name="image" accept="image/jpeg,image/png,image/webp" required>
|
||||
<span class="field-help">Formats acceptés : JPG, PNG, WebP.</span>
|
||||
<span class="field-help">Formats acceptés : JPG, PNG, WebP. Limite : 10 Mo, 8000 × 8000 px et 40 mégapixels.</span>
|
||||
</label>
|
||||
<button class="button" type="submit">Envoyer</button>
|
||||
</form>
|
||||
@@ -24,6 +27,7 @@
|
||||
<include href="partials/media_card.html" />
|
||||
</repeat>
|
||||
</div>
|
||||
<include href="partials/pagination.html" />
|
||||
</true>
|
||||
<false>
|
||||
<section class="empty-state" aria-labelledby="media-empty-title">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h1 class="page-title" id="post-form-title">{{ @pageTitle }}</h1>
|
||||
|
||||
<div class="page-actions">
|
||||
<a class="button button--ghost" href="{{ @BASE }}/dashboard">Retour</a>
|
||||
<a class="button button--ghost" href="{{ 'dashboard' | alias }}">Retour</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -94,6 +94,11 @@
|
||||
</button>
|
||||
</repeat>
|
||||
</div>
|
||||
<check if="{{ @mediaPickerTruncated }}">
|
||||
<true>
|
||||
<p class="field-help">Affichage limité aux {{ @mediaPickerLimit }} images les plus récentes sur {{ @mediaCount }}. Utilise la <a href="{{ 'media_index' | alias }}">médiathèque</a> pour parcourir toute la bibliothèque.</p>
|
||||
</true>
|
||||
</check>
|
||||
</true>
|
||||
<false>
|
||||
<section class="empty-state" aria-labelledby="media-picker-empty-title">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h1 class="page-title" id="login-title">Connexion</h1>
|
||||
</header>
|
||||
|
||||
<form class="stack" method="post" action="{{ @BASE }}/login">
|
||||
<form class="stack" method="post" action="{{ 'login_submit' | alias }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ @csrfToken }}">
|
||||
|
||||
<label class="field">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ @errorTitle ?: 'Erreur' }}</title>
|
||||
<link rel="icon" href="{{ @BASE }}/assets/favicon.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="{{ @BASE }}/min/app.css">
|
||||
<link rel="stylesheet" href="{{ 'asset', 'file=app.css' | alias }}">
|
||||
</head>
|
||||
<body>
|
||||
<main class="page error-page">
|
||||
@@ -15,7 +15,7 @@
|
||||
<h1 class="error-page__title">{{ @errorTitle ?: 'Erreur' }}</h1>
|
||||
<p class="error-page__message">{{ @errorMessage ?: 'Une erreur est survenue.' }}</p>
|
||||
<p class="error-page__hint">Vérifie l’adresse ou reviens à l’accueil.</p>
|
||||
<p class="error-page__actions"><a class="button" href="{{ @BASE }}/">Retour à l’accueil</a></p>
|
||||
<p class="error-page__actions"><a class="button" href="{{ 'home' | alias }}">Retour à l’accueil</a></p>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<title>{{ @pageTitle ? @pageTitle . ' · ' . @app.name : @app.name }}</title>
|
||||
<meta name="description" content="{{ @app.tagline }}">
|
||||
<link rel="icon" href="{{ @BASE }}/assets/favicon.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="{{ @BASE }}/min/app.css">
|
||||
<script defer src="{{ @BASE }}/min/app.js"></script>
|
||||
<link rel="stylesheet" href="{{ 'asset', 'file=app.css' | alias }}">
|
||||
<script defer src="{{ 'asset', 'file=app.js' | alias }}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<include href="partials/site_navigation.html" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="card-body article-card__body">
|
||||
<p class="meta-text">{{ @item.width }} × {{ @item.height }}<br>{{ @item.created_at_label }}</p>
|
||||
|
||||
<form class="stack" method="post" action="{{ @BASE }}/dashboard/media/{{ @item.id }}/alt">
|
||||
<form class="stack" method="post" action="{{ 'media_update_alt', 'id='.@item.id | alias }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ @csrfToken }}">
|
||||
<label class="field">
|
||||
<span class="field-label">Texte alternatif</span>
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<div class="card-actions">
|
||||
<button class="button button--ghost" type="button" data-copy-text="{{ @item.markdown }}" data-markdown-template="">Copier le Markdown</button>
|
||||
<form method="post" action="{{ @BASE }}/dashboard/media/{{ @item.id }}/delete" data-confirm="Supprimer cette image ?">
|
||||
<form method="post" action="{{ 'media_delete', 'id='.@item.id | alias }}" data-confirm="Supprimer cette image ?">
|
||||
<input type="hidden" name="csrf_token" value="{{ @csrfToken }}">
|
||||
<button class="button button--danger" type="submit">Supprimer</button>
|
||||
</form>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<check if="{{ @currentUser }}">
|
||||
<true>
|
||||
<li class="nav-items__item">
|
||||
<a class="nav-items__link" href="{{ @BASE }}/dashboard">Dashboard</a>
|
||||
<a class="nav-items__link" href="{{ 'dashboard' | alias }}">Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-items__item">
|
||||
<form class="nav-items__form" method="post" action="{{ @BASE }}/logout">
|
||||
<form class="nav-items__form" method="post" action="{{ 'logout' | alias }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ @csrfToken }}">
|
||||
<button class="nav-items__button" type="submit">Déconnexion</button>
|
||||
</form>
|
||||
@@ -13,8 +13,8 @@
|
||||
</true>
|
||||
<false>
|
||||
<li class="nav-items__item">
|
||||
<a class="nav-items__link" href="{{ @BASE }}/login">Connexion</a>
|
||||
<a class="nav-items__link" href="{{ 'login' | alias }}">Connexion</a>
|
||||
</li>
|
||||
</false>
|
||||
</check>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<nav class="pagination" aria-label="Pagination">
|
||||
<check if="{{ @pagination.page > 1 }}">
|
||||
<true>
|
||||
<a class="button button--ghost" href="{{ @paginationBase }}?page={{ @pagination.page - 1 }}">Précédent</a>
|
||||
<a class="button button--ghost" href="{{ @paginationAlias | alias }}?page={{ @pagination.page - 1 }}">Précédent</a>
|
||||
</true>
|
||||
<false>
|
||||
<span class="button button--ghost pagination__disabled">Précédent</span>
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<check if="{{ @pagination.page < @pagination.pages }}">
|
||||
<true>
|
||||
<a class="button button--ghost" href="{{ @paginationBase }}?page={{ @pagination.page + 1 }}">Suivant</a>
|
||||
<a class="button button--ghost" href="{{ @paginationAlias | alias }}?page={{ @pagination.page + 1 }}">Suivant</a>
|
||||
</true>
|
||||
<false>
|
||||
<span class="button button--ghost pagination__disabled">Suivant</span>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<article class="card article-card">
|
||||
<a class="card-media-link" href="{{ @BASE }}/posts/{{ @post.slug }}">
|
||||
<a class="card-media-link" href="{{ 'post_show', 'slug='.@post.slug | alias }}">
|
||||
<check if="{{ @post.cover_url }}">
|
||||
<true><img class="media-frame" src="{{ @post.cover_url }}" alt="{{ @post.title }}"></true>
|
||||
<false>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<article class="card article-card">
|
||||
<a class="card-media-link" href="{{ @BASE }}/dashboard/posts/{{ @post.id }}/edit">
|
||||
<a class="card-media-link" href="{{ 'post_edit', 'id='.@post.id | alias }}">
|
||||
<check if="{{ @post.cover_url }}">
|
||||
<true><img class="media-frame" src="{{ @post.cover_url }}" alt="{{ @post.title }}"></true>
|
||||
<false>
|
||||
@@ -17,10 +17,9 @@
|
||||
</p>
|
||||
<p class="card-summary">{{ @post.excerpt }}</p>
|
||||
<div class="card-actions">
|
||||
<a class="button button--ghost" href="{{ @BASE }}/posts/{{ @post.slug }}">Voir</a>
|
||||
<a class="button button--ghost" href="{{ @BASE }}/dashboard/posts/{{ @post.id }}/edit">Modifier</a>
|
||||
<form method="post" action="{{ @BASE }}/dashboard/posts/{{ @post.id }}/delete"
|
||||
data-confirm="Supprimer cet article ?">
|
||||
<a class="button button--ghost" href="{{ 'post_show', 'slug='.@post.slug | alias }}">Voir</a>
|
||||
<a class="button button--ghost" href="{{ 'post_edit', 'id='.@post.id | alias }}">Modifier</a>
|
||||
<form method="post" action="{{ 'post_delete', 'id='.@post.id | alias }}" data-confirm="Supprimer cet article ?">
|
||||
<input type="hidden" name="csrf_token" value="{{ @csrfToken }}">
|
||||
<button class="button button--danger" type="submit">Supprimer</button>
|
||||
</form>
|
||||
|
||||
@@ -1 +1 @@
|
||||
<a class="site-brand__title" href="{{ @BASE }}/">{{ @app.name }}</a>
|
||||
<a class="site-brand__title" href="{{ 'home' | alias }}">{{ @app.name }}</a>
|
||||
|
||||
Reference in New Issue
Block a user