style: liste éditoriale, navbar avec tagline, footer 2 colonnes
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
{"php":"8.3.6","version":"3.89.1:v3.89.1#f34967da2866ace090a2b447de1f357356474573","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"new_with_parentheses":{"anonymous_class":true},"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":{"closure_fn_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"after_heredoc":false,"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"strict_param":true,"declare_strict_types":true,"no_unused_imports":true,"single_quote":true},"hashes":{"templates\/header.php":"f4b64c4ecb4dadec166cb7935309096a","templates\/post_list.php":"191d1349cc7b0972a0ebbb99149590d3","templates\/footer.php":"3111b4701ea698ba11c3423260657e28","public\/login\/oidc.php":"8ec86d6f3af33f64d586109ec17f817d","public\/login\/config.php":"5b7b3e2937b349c76a2fd239c3ae06f8","public\/login\/magic.php":"54ef6b7ef80e608905e64e4fa8539846","public\/login\/index.php":"063d7b997bf8292d2b3f8c34dae3252f","public\/route.php":"f35dadd27dbdea162b67c42002519be9","public\/oidc\/callback.php":"793ff84451299c9984ac4742f02ca842","public\/oidc\/start.php":"87ddb61a0ef796d7303709ffa741c9c7","public\/oidc\/me.php":"d0439342011bb0e58ef8738b3b81cc2f","public\/index.php":"73a917520ea547ae8a122bd90098bf46","src\/Infrastructure\/DbAdapter.php":"3899a835130c146e2d30dbcca88d8f33","src\/Infrastructure\/Database.php":"6f2848ed70b29d9c2e2d259be611b9b0","src\/Infrastructure\/Session.php":"3538a1147cc81678c470d45ea8574a95","src\/Domain\/User.php":"02213454f7edf43f4afae3f2f81aaf01","src\/Http\/Csrf.php":"55631812cab4b1192f8e30c5d35fd5eb","src\/FileManager.php":"a51dda44f293f238aea295fd56b2fa99","src\/PostManager.php":"25f0179c4d96e9aa04218d54bf45a029","src\/helpers.php":"3a83a4872b1e3e3c58898b54f51e72b4","src\/db.php":"8888b7fbc9740eb3c60dd2374d0cb5d6","src\/auth.php":"d237017d90091f5fb75a133d08d5e544","src\/ConfigRepo.php":"c2dcee160a272d27725d480a90e76dcf","src\/Parsedown.php":"85da2b47eca1a703fdfe44753bf912df","src\/Service\/MailQueue.php":"7e040056aec64cfd780e3c9e7d04748a","src\/Service\/Validator.php":"7c267b8b9f3f1bac0f2520dd10364831","src\/Service\/UiFormRenderer.php":"065617191c6d680ce97588f4fa159688","src\/Service\/AuthService.php":"51c714164c6bd453154c024d9aa814e9","src\/Service\/MailService.php":"e1ef847a70551ae8887b86b3fb4167d0","src\/mailer.php":"17e6b19103c880cc9a6c6634486506c2","src\/Repository\/DictionnaryRepository.php":"f937e98cf0f27b59ae00e430b52a586d","src\/Repository\/ProfileRepository.php":"b1cd483652500ee4e2aaaa9e0330ff1d","src\/Repository\/UserRepository.php":"d75fed70910d0e6450a5b6c8ce9608c2","versions.php":"51a72261e1a507d3435b4a24e5f5fc09","config\/config.php":"a8b7698b01ab9b40eea655e8fcc194fc","templates\/post_form.php":"32765f286dc2fc2f9d9790fa3a94bef5"}}
|
||||
{"php":"8.3.6","version":"3.89.1:v3.89.1#f34967da2866ace090a2b447de1f357356474573","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"new_with_parentheses":{"anonymous_class":true},"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":{"closure_fn_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"after_heredoc":false,"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"strict_param":true,"declare_strict_types":true,"no_unused_imports":true,"single_quote":true},"hashes":{"templates\/header.php":"f4b64c4ecb4dadec166cb7935309096a","templates\/footer.php":"3111b4701ea698ba11c3423260657e28","public\/login\/oidc.php":"8ec86d6f3af33f64d586109ec17f817d","public\/login\/config.php":"5b7b3e2937b349c76a2fd239c3ae06f8","public\/login\/magic.php":"54ef6b7ef80e608905e64e4fa8539846","public\/login\/index.php":"063d7b997bf8292d2b3f8c34dae3252f","public\/route.php":"f35dadd27dbdea162b67c42002519be9","public\/oidc\/callback.php":"793ff84451299c9984ac4742f02ca842","public\/oidc\/start.php":"87ddb61a0ef796d7303709ffa741c9c7","public\/oidc\/me.php":"d0439342011bb0e58ef8738b3b81cc2f","public\/index.php":"73a917520ea547ae8a122bd90098bf46","src\/Infrastructure\/DbAdapter.php":"3899a835130c146e2d30dbcca88d8f33","src\/Infrastructure\/Database.php":"6f2848ed70b29d9c2e2d259be611b9b0","src\/Infrastructure\/Session.php":"3538a1147cc81678c470d45ea8574a95","src\/Domain\/User.php":"02213454f7edf43f4afae3f2f81aaf01","src\/Http\/Csrf.php":"55631812cab4b1192f8e30c5d35fd5eb","src\/FileManager.php":"a51dda44f293f238aea295fd56b2fa99","src\/PostManager.php":"25f0179c4d96e9aa04218d54bf45a029","src\/helpers.php":"3a83a4872b1e3e3c58898b54f51e72b4","src\/db.php":"8888b7fbc9740eb3c60dd2374d0cb5d6","src\/auth.php":"d237017d90091f5fb75a133d08d5e544","src\/ConfigRepo.php":"c2dcee160a272d27725d480a90e76dcf","src\/Parsedown.php":"85da2b47eca1a703fdfe44753bf912df","src\/Service\/MailQueue.php":"7e040056aec64cfd780e3c9e7d04748a","src\/Service\/Validator.php":"7c267b8b9f3f1bac0f2520dd10364831","src\/Service\/UiFormRenderer.php":"065617191c6d680ce97588f4fa159688","src\/Service\/AuthService.php":"51c714164c6bd453154c024d9aa814e9","src\/Service\/MailService.php":"e1ef847a70551ae8887b86b3fb4167d0","src\/mailer.php":"17e6b19103c880cc9a6c6634486506c2","src\/Repository\/DictionnaryRepository.php":"f937e98cf0f27b59ae00e430b52a586d","src\/Repository\/ProfileRepository.php":"b1cd483652500ee4e2aaaa9e0330ff1d","src\/Repository\/UserRepository.php":"d75fed70910d0e6450a5b6c8ce9608c2","versions.php":"51a72261e1a507d3435b4a24e5f5fc09","config\/config.php":"a8b7698b01ab9b40eea655e8fcc194fc","templates\/post_form.php":"32765f286dc2fc2f9d9790fa3a94bef5","templates\/post_view.php":"64094ca90fd3d03bb9615bb3772bc189","templates\/layout.php":"d15f6cfe941b8ee69b2add5af6d3ffab","templates\/post_list.php":"d0baeef5a77d44db72d8a6e4d32a514c"}}
|
||||
@@ -370,6 +370,163 @@ footer {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
/* ─── Navbar tagline ────────────────────── */
|
||||
.navbar-tagline {
|
||||
font-size: 0.68rem;
|
||||
font-weight: 400;
|
||||
color: var(--vl-muted);
|
||||
letter-spacing: 0;
|
||||
margin-top: 2px;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
/* ─── Liste éditoriale ───────────────────── */
|
||||
.posts-list {
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.post-entry {
|
||||
padding: 2rem 0;
|
||||
border-bottom: 1px solid var(--vl-border);
|
||||
}
|
||||
|
||||
.post-entry:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.post-entry-title {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.6rem;
|
||||
line-height: 1.35;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
|
||||
.post-entry-title a {
|
||||
color: var(--vl-text);
|
||||
text-decoration: none;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.post-entry-title a:hover {
|
||||
color: var(--vl-accent);
|
||||
}
|
||||
|
||||
.post-entry-excerpt {
|
||||
color: var(--vl-muted);
|
||||
font-size: 0.95rem;
|
||||
margin-bottom: 0.85rem;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.post-entry-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.25rem;
|
||||
font-size: 0.82rem;
|
||||
color: var(--vl-muted);
|
||||
}
|
||||
|
||||
.post-entry-edit {
|
||||
color: var(--vl-muted);
|
||||
text-decoration: none;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.post-entry-edit:hover {
|
||||
color: var(--vl-text);
|
||||
}
|
||||
|
||||
.post-entry-read {
|
||||
color: var(--vl-accent);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
margin-left: auto;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.post-entry-read:hover {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
/* ─── Footer 2 colonnes ──────────────────── */
|
||||
footer {
|
||||
border-top: 1px solid var(--vl-border);
|
||||
background-color: var(--vl-surface);
|
||||
}
|
||||
|
||||
.footer-inner {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.footer-about strong {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
color: var(--vl-text);
|
||||
display: block;
|
||||
margin-bottom: 0.4rem;
|
||||
letter-spacing: -0.2px;
|
||||
}
|
||||
|
||||
.footer-about p {
|
||||
font-size: 0.82rem;
|
||||
color: var(--vl-muted);
|
||||
margin: 0 0 0.5rem;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.footer-about small {
|
||||
font-size: 0.78rem;
|
||||
color: var(--vl-muted);
|
||||
}
|
||||
|
||||
.footer-about small a {
|
||||
color: var(--vl-muted);
|
||||
text-decoration: underline;
|
||||
text-decoration-color: var(--vl-border);
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.footer-about small a:hover {
|
||||
color: var(--vl-accent);
|
||||
}
|
||||
|
||||
.footer-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 0.5rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.footer-nav a {
|
||||
font-size: 0.85rem;
|
||||
color: var(--vl-muted);
|
||||
text-decoration: none;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.footer-nav a:hover {
|
||||
color: var(--vl-accent);
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.footer-inner {
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.footer-nav {
|
||||
align-items: flex-start;
|
||||
flex-direction: row;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* ─── Utilitaires ─────────────────────────── */
|
||||
.text-muted {
|
||||
color: var(--vl-muted) !important;
|
||||
|
||||
+18
-3
@@ -34,7 +34,10 @@
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-lg navbar-light mb-0" role="navigation" aria-label="Navigation principale">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="route.php">📝 varlog</a>
|
||||
<a class="navbar-brand d-flex flex-column lh-1" href="route.php">
|
||||
<span>varlog</span>
|
||||
<small class="navbar-tagline">journal de Cédrix · informatique, hack & loisirs</small>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Basculer la navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@@ -51,8 +54,20 @@
|
||||
<?= $content ?>
|
||||
</main>
|
||||
|
||||
<footer class="text-center text-muted py-4 mt-5 small" role="contentinfo">
|
||||
© <?= date('Y') ?> — <strong>varlog</strong> est un journal personnel développé par Cédrix
|
||||
<footer class="py-5 mt-5" role="contentinfo">
|
||||
<div class="container">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-about">
|
||||
<strong>varlog</strong>
|
||||
<p>Journal personnel de Cédrix.<br>Informatique, hack et loisirs techniques.</p>
|
||||
<small>© <?= date('Y') ?> — <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" rel="noopener">CC BY 4.0</a></small>
|
||||
</div>
|
||||
<nav class="footer-nav" aria-label="Liens du site">
|
||||
<a href="route.php?action=about">À propos</a>
|
||||
<a href="route.php?action=legal">Mentions légales</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- JS -->
|
||||
|
||||
+20
-30
@@ -5,42 +5,32 @@ $Parsedown = new Parsedown();
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<h1 class="mb-4 text-center">📝 Tous les posts</h1>
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-2 g-4">
|
||||
<div class="posts-list">
|
||||
<?php foreach ($posts as $post): ?>
|
||||
<div class="col">
|
||||
<div class="card shadow-sm h-100 border-<?php echo $post['is_published'] ? 'primary' : 'warning'; ?>">
|
||||
<div class="card-body d-flex flex-column">
|
||||
<h5 class="card-title text-primary">
|
||||
<?= htmlspecialchars($post['title']) ?>
|
||||
<?php if (!$post['is_published']): ?>
|
||||
<span class="badge bg-warning text-dark ms-2">⏳ Brouillon</span>
|
||||
<?php endif; ?>
|
||||
</h5>
|
||||
|
||||
<div class="card-text text-body">
|
||||
<?php
|
||||
$html = $Parsedown->text($post['content']);
|
||||
$preview = mb_strimwidth(strip_tags($html), 0, 300, '…');
|
||||
echo '<p>' . $preview . '</p>';
|
||||
<?php
|
||||
$html = $Parsedown->text($post['content']);
|
||||
$preview = mb_strimwidth(strip_tags($html), 0, 240, '…');
|
||||
?>
|
||||
</div>
|
||||
|
||||
<p class="text-muted small mt-auto mb-2">📅 Publié le <?= date('d/m/Y', strtotime($post['created_at'])) ?></p>
|
||||
|
||||
<div class="d-flex justify-content-end gap-2">
|
||||
<a href="route.php?action=view&id=<?= $post['id'] ?>" class="btn btn-sm btn-outline-primary">🔍 Voir</a>
|
||||
<a href="route.php?action=edit&id=<?= $post['id'] ?>" class="btn btn-sm btn-outline-secondary">✏️ Modifier</a>
|
||||
</div>
|
||||
<a href="route.php?action=view&id=<?= $post['id'] ?>" class="stretched-link"></a>
|
||||
</div>
|
||||
<article class="post-entry">
|
||||
<h2 class="post-entry-title">
|
||||
<a href="route.php?action=view&id=<?= $post['id'] ?>">
|
||||
<?= htmlspecialchars($post['title']) ?>
|
||||
</a>
|
||||
<?php if (!$post['is_published']): ?>
|
||||
<span class="badge bg-warning ms-2">Brouillon</span>
|
||||
<?php endif; ?>
|
||||
</h2>
|
||||
<p class="post-entry-excerpt"><?= htmlspecialchars($preview) ?></p>
|
||||
<div class="post-entry-meta">
|
||||
<span><?= date('d/m/Y', strtotime($post['created_at'])) ?></span>
|
||||
<a href="route.php?action=edit&id=<?= $post['id'] ?>" class="post-entry-edit">modifier</a>
|
||||
<a href="route.php?action=view&id=<?= $post['id'] ?>" class="post-entry-read">→ lire</a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$title = 'Liste des posts';
|
||||
$title = 'varlog';
|
||||
include __DIR__ . '/layout.php';
|
||||
|
||||
Reference in New Issue
Block a user