style(attestation): fix for headings style and spacing following charte
This commit is contained in:
parent
72e59b6473
commit
eb55abebfc
4 changed files with 35 additions and 19 deletions
|
@ -110,7 +110,7 @@
|
|||
}
|
||||
|
||||
.body-start {
|
||||
margin-top: 30mm;
|
||||
margin-top: 12.6mm; // from masque traitement de texte
|
||||
}
|
||||
|
||||
.main {
|
||||
|
@ -140,13 +140,13 @@
|
|||
|
||||
h2 {
|
||||
margin: 0;
|
||||
line-height: 6pt;
|
||||
line-height: 8pt;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 11pt;
|
||||
font-weight: normal;
|
||||
line-height: 3pt;
|
||||
font-size: 10pt; // same as text
|
||||
font-weight: bold;
|
||||
line-height: 4pt;
|
||||
}
|
||||
|
||||
li p {
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.15rem;
|
||||
font-weight: normal;
|
||||
font-size: 1rem; // same as text
|
||||
font-weight: bold;
|
||||
line-height: 1rem;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class TiptapService
|
|||
end
|
||||
|
||||
def node_to_html(node, substitutions, level)
|
||||
if level == 0 && !@body_started && node[:type] == 'paragraph' && node.key?(:content)
|
||||
if level == 0 && !@body_started && node[:type].in?(['paragraph', 'heading']) && node.key?(:content)
|
||||
@body_started = true
|
||||
body_start_mark = " class=\"body-start\""
|
||||
end
|
||||
|
@ -47,7 +47,7 @@ class TiptapService
|
|||
in type: 'title', content:, **rest
|
||||
"<h1#{text_align(rest[:attrs])}>#{children(content, substitutions, level + 1)}</h1>"
|
||||
in type: 'heading', attrs: { level: hlevel, **attrs }, content:
|
||||
"<h#{hlevel}#{text_align(attrs)}>#{children(content, substitutions, level + 1)}</h#{hlevel}>"
|
||||
"<h#{hlevel}#{body_start_mark}#{text_align(attrs)}>#{children(content, substitutions, level + 1)}</h#{hlevel}>"
|
||||
in type: 'bulletList', content:
|
||||
"<ul>#{children(content, substitutions, level + 1)}</ul>"
|
||||
in type: 'orderedList', content:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue