Étendre le Markdown du site public
This commit is contained in:
parent
21ee1bec36
commit
56a2fddc83
12 changed files with 179 additions and 52 deletions
|
|
@ -31,10 +31,10 @@
|
|||
<div class="col-lg-6">
|
||||
<section class="card h-100">
|
||||
<div class="card-body">
|
||||
<span class="badge bg-blue-lt mb-2">1.0.0-rc.34</span>
|
||||
<h3>Un site public qui s’adapte au refuge</h3>
|
||||
<p class="text-muted">Pages personnalisées, contenus longs, panneaux repliables et ordre du menu
|
||||
réorganisable rendent chaque site aussi simple ou aussi complet que nécessaire.</p>
|
||||
<span class="badge bg-blue-lt mb-2">1.0.0-rc.35</span>
|
||||
<h3>Des pages publiques riches et lisibles</h3>
|
||||
<p class="text-muted">Les pages personnalisées accueillent maintenant tableaux responsives, listes,
|
||||
citations et code tout en conservant un rendu strictement sécurisé.</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -265,6 +265,40 @@ if (!function_exists('public_age')) {
|
|||
border-radius: var(--radius)
|
||||
}
|
||||
|
||||
.public-markdown-table {
|
||||
max-width: 100%;
|
||||
margin: 1.25rem 0;
|
||||
overflow-x: auto;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: calc(var(--radius) / 2)
|
||||
}
|
||||
|
||||
.public-markdown-table table {
|
||||
width: 100%;
|
||||
min-width: 420px;
|
||||
border-collapse: collapse;
|
||||
background: var(--surface)
|
||||
}
|
||||
|
||||
.public-markdown-table th,
|
||||
.public-markdown-table td {
|
||||
padding: 11px 14px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
text-align: left;
|
||||
vertical-align: top
|
||||
}
|
||||
|
||||
.public-markdown-table th { background: var(--paper); font-weight: 800 }
|
||||
.public-markdown-table tr:last-child td { border-bottom: 0 }
|
||||
.public-markdown-table .text-center { text-align: center }
|
||||
.public-markdown-table .text-right { text-align: right }
|
||||
blockquote { margin: 1.25rem 0; padding: .75rem 1rem; border-left: 4px solid var(--accent); background: var(--surface) }
|
||||
blockquote p { margin: 0 }
|
||||
pre { max-width: 100%; overflow: auto; padding: 1rem; border-radius: calc(var(--radius) / 2); background: var(--ink); color: var(--surface) }
|
||||
:not(pre)>code { padding: .12rem .35rem; border-radius: 4px; background: var(--line) }
|
||||
.task-list-item { list-style: none }
|
||||
.task-marker { color: var(--accent-dark) }
|
||||
|
||||
.section {
|
||||
padding: 52px 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ const enhancePublicEditor = (textarea) => {
|
|||
textarea.addEventListener('focus', () => { activePublicEditor = textarea; });
|
||||
const toolbar = document.createElement('div');
|
||||
toolbar.className = 'btn-list mb-2';
|
||||
const actions = [['B', '**', '**'], ['I', '*', '*'], ['Titre', '## ', ''], ['Liste', '- ', ''], ['Lien', '[', '](https://)']];
|
||||
const actions = [['B', '**', '**'], ['I', '*', '*'], ['Titre', '## ', ''], ['Liste', '- ', ''], ['Lien', '[', '](https://)'], [<?= json_encode(t('public_site.markdown_table'), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?>, '| Colonne 1 | Colonne 2 |\n| --- | --- |\n| Valeur 1 | Valeur 2 |\n', '']];
|
||||
actions.forEach(([label, before, after]) => {
|
||||
const button = document.createElement('button');
|
||||
button.type = 'button';
|
||||
|
|
|
|||
Loading…
Reference in a new issue