From 31f9ae79fb37be0e9fb64ca3551f1fbd12f2ae34 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Mon, 24 Apr 2023 19:18:03 +0200 Subject: [PATCH] template: ajoute les fichiers pour export pagedjs - Ajoute un `.gitignore`. Co-Authored-by: Igor Milhit --- .gitignore | 2 + interface.css | 180 +++++++++++++++++++++++++ {static => intro}/heg-iso-690.csl | 0 intro/intro.md | 26 +++- {static => intro}/logo-md.svg | 0 {static => intro}/references.bib | 0 static/bibliotheque-logo.svg | 210 ++++++++++++++++++++++++++++++ static/by-sa.svg | 199 ++++++++++++++++++++++++++++ style.css | 149 +++++++++++++++++++++ template.html | 86 ++++++++++++ 10 files changed, 846 insertions(+), 6 deletions(-) create mode 100644 .gitignore create mode 100644 interface.css rename {static => intro}/heg-iso-690.csl (100%) rename {static => intro}/logo-md.svg (100%) rename {static => intro}/references.bib (100%) create mode 100644 static/bibliotheque-logo.svg create mode 100644 static/by-sa.svg create mode 100644 style.css create mode 100644 template.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f1ed8e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +intro.html +intro.pdf diff --git a/interface.css b/interface.css new file mode 100644 index 0000000..170f47e --- /dev/null +++ b/interface.css @@ -0,0 +1,180 @@ +/* CSS for Paged.js interface – v0.4 */ + +/* Change the look */ +:root { + --color-background: whitesmoke; + --color-pageSheet: #cfcfcf; + --color-pageBox: violet; + --color-paper: white; + --color-marginBox: transparent; + --pagedjs-crop-color: black; + --pagedjs-crop-shadow: white; + --pagedjs-crop-stroke: 1px; +} + +/* To define how the book look on the screen: */ +@media screen, pagedjs-ignore { + body { + background-color: var(--color-background); + } + + .pagedjs_pages { + display: flex; + width: calc(var(--pagedjs-width) * 2); + flex: 0; + flex-wrap: wrap; + margin: 0 auto; + } + + .pagedjs_page { + background-color: var(--color-paper); + box-shadow: 0 0 0 1px var(--color-pageSheet); + margin: 0; + flex-shrink: 0; + flex-grow: 0; + margin-top: 10mm; + } + + .pagedjs_first_page { + margin-left: var(--pagedjs-width); + } + + .pagedjs_page:last-of-type { + margin-bottom: 10mm; + } + + .pagedjs_pagebox{ + box-shadow: 0 0 0 1px var(--color-pageBox); + } + + .pagedjs_left_page{ + z-index: 20; + width: calc(var(--pagedjs-bleed-left) + var(--pagedjs-pagebox-width))!important; + } + + .pagedjs_left_page .pagedjs_bleed-right .pagedjs_marks-crop { + border-color: transparent; + } + + .pagedjs_left_page .pagedjs_bleed-right .pagedjs_marks-middle{ + width: 0; + } + + .pagedjs_right_page{ + z-index: 10; + position: relative; + left: calc(var(--pagedjs-bleed-left)*-1); + } + + /* show the margin-box */ + + .pagedjs_margin-top-left-corner-holder, + .pagedjs_margin-top, + .pagedjs_margin-top-left, + .pagedjs_margin-top-center, + .pagedjs_margin-top-right, + .pagedjs_margin-top-right-corner-holder, + .pagedjs_margin-bottom-left-corner-holder, + .pagedjs_margin-bottom, + .pagedjs_margin-bottom-left, + .pagedjs_margin-bottom-center, + .pagedjs_margin-bottom-right, + .pagedjs_margin-bottom-right-corner-holder, + .pagedjs_margin-right, + .pagedjs_margin-right-top, + .pagedjs_margin-right-middle, + .pagedjs_margin-right-bottom, + .pagedjs_margin-left, + .pagedjs_margin-left-top, + .pagedjs_margin-left-middle, + .pagedjs_margin-left-bottom { + box-shadow: 0 0 0 1px inset var(--color-marginBox); + } + + /* uncomment this part for recto/verso book : ------------------------------------ */ + + /* + .pagedjs_pages { + flex-direction: column; + width: 100%; + } + + .pagedjs_first_page { + margin-left: 0; + } + + .pagedjs_page { + margin: 0 auto; + margin-top: 10mm; + } + + .pagedjs_left_page{ + width: calc(var(--pagedjs-bleed-left) + var(--pagedjs-pagebox-width) + var(--pagedjs-bleed-left))!important; + } + + .pagedjs_left_page .pagedjs_bleed-right .pagedjs_marks-crop{ + border-color: var(--pagedjs-crop-color); + } + + .pagedjs_left_page .pagedjs_bleed-right .pagedjs_marks-middle{ + width: var(--pagedjs-cross-size)!important; + } + + .pagedjs_right_page{ + left: 0; + } + */ + + + + /*--------------------------------------------------------------------------------------*/ + + + + /* uncomment this par to see the baseline : -------------------------------------------*/ + + + /* .pagedjs_pagebox { + --pagedjs-baseline: 22px; + --pagedjs-baseline-position: 5px; + --pagedjs-baseline-color: cyan; + background: linear-gradient(transparent 0%, transparent calc(var(--pagedjs-baseline) - 1px), var(--pagedjs-baseline-color) calc(var(--pagedjs-baseline) - 1px), var(--pagedjs-baseline-color) var(--pagedjs-baseline)), transparent; + background-size: 100% var(--pagedjs-baseline); + background-repeat: repeat-y; + background-position-y: var(--pagedjs-baseline-position); + } */ + + + /*--------------------------------------------------------------------------------------*/ +} + + + + + +/* Marks (to delete when merge in paged.js) */ + +.pagedjs_marks-crop{ + z-index: 999999999999; + +} + +.pagedjs_bleed-top .pagedjs_marks-crop, +.pagedjs_bleed-bottom .pagedjs_marks-crop{ + box-shadow: 1px 0px 0px 0px var(--pagedjs-crop-shadow); +} + +.pagedjs_bleed-top .pagedjs_marks-crop:last-child, +.pagedjs_bleed-bottom .pagedjs_marks-crop:last-child{ + box-shadow: -1px 0px 0px 0px var(--pagedjs-crop-shadow); +} + +.pagedjs_bleed-left .pagedjs_marks-crop, +.pagedjs_bleed-right .pagedjs_marks-crop{ + box-shadow: 0px 1px 0px 0px var(--pagedjs-crop-shadow); +} + +.pagedjs_bleed-left .pagedjs_marks-crop:last-child, +.pagedjs_bleed-right .pagedjs_marks-crop:last-child{ + box-shadow: 0px -1px 0px 0px var(--pagedjs-crop-shadow); +} diff --git a/static/heg-iso-690.csl b/intro/heg-iso-690.csl similarity index 100% rename from static/heg-iso-690.csl rename to intro/heg-iso-690.csl diff --git a/intro/intro.md b/intro/intro.md index 366118c..ed8009f 100644 --- a/intro/intro.md +++ b/intro/intro.md @@ -1,14 +1,18 @@ --- title: Introduction à la prise de note avec markdown -author: Igor Milhit^[Uni CMU] -date: 2023-04-19T11:35:14+02:00 +author: +- Igor Milhit^[Uni CMU] +date: Printemps 2023 +creation_date: 2023-04-19T11:35:14+02:00 id: 20230419113601 tags: [note, markdown] -logo: ../static/logo-md.svg +logo: +- static/logo-md.svg lang: fr -bibliography: ../static/references.bib -csl-style: ../static/heg-iso-690.csl +bibliography: references.bib +csl: heg-iso-690.csl link-citations: true +toc-title: Table des matières --- ## Objectifs @@ -22,7 +26,15 @@ Les objectifs annoncés pour l'introduction sont les suivants : - Ensemble de notes. - Conversion. -## Pourquoi ? +:::{#licence} +![Logo de la licence CC BY-SA 4.0](../static/by-sa.svg) \ +[CC BY-SA 4.0][cc-by-sa] --- [Sources][sources] +::: + +[cc-by-sa]: https://creativecommons.org/licenses/by-sa/4.0/deed.fr "Texte de la licence en français" +[sources]: https://git.milhit.ch/igor/rdv-info-markdown + +## Pourquoi ? {#1st-section} Cette section repose essentiellement sur [@perretFormatTexte2022]. @@ -39,3 +51,5 @@ Cette section repose essentiellement sur [@perretFormatTexte2022]. - Cette syntaxe est utilisée par de nombreux logiciels ou services en lignes pour la rédaction. Par exemple les notes dans Zotero ou alors des éditeurs en ligne permettant le travail collaboratif. + +## Bibliographie diff --git a/static/logo-md.svg b/intro/logo-md.svg similarity index 100% rename from static/logo-md.svg rename to intro/logo-md.svg diff --git a/static/references.bib b/intro/references.bib similarity index 100% rename from static/references.bib rename to intro/references.bib diff --git a/static/bibliotheque-logo.svg b/static/bibliotheque-logo.svg new file mode 100644 index 0000000..b33b2b1 --- /dev/null +++ b/static/bibliotheque-logo.svg @@ -0,0 +1,210 @@ + + + + diff --git a/static/by-sa.svg b/static/by-sa.svg new file mode 100644 index 0000000..f850297 --- /dev/null +++ b/static/by-sa.svg @@ -0,0 +1,199 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..7062ae7 --- /dev/null +++ b/style.css @@ -0,0 +1,149 @@ +@media print { + body { + font-family: TheSans, "Open Sans", Arial, Helvetica, sans-serif; + counter-reset: figureNumber; + } + /* Définit que string(date) contient la date */ + .date { + string-set: date content(text); + display: none; + } + /* Définit que running(licenceBlock) contient le block licence */ + #licence { + position: running(licenceBlock); + } + @page { + size: A4; + margin: 25mm 0; + bleed: 6mm; + @bottom-center { + content: counter(page); + } + } + @page:left { + margin-left: 25mm; + margin-right: 15mm; + } + @page:right { + margin-left: 15mm; + margin-right: 25mm; + } + @page:first { + @top-right { + content: ""; + background-image: url("./static/bibliotheque-logo.svg"); + background-position: right; + background-repeat: no-repeat; + background-size: 25%; + } + @bottom-left{ + content: element(licenceBlock); + font-size: small; + } + @bottom-center { + content: none; + } + @bottom-right { + content: string(date); + font-size: small; + } + } + @page:nth(11) { + @bottom-center { + content: none; + } + } + h2 { + color: #d80669; + text-decoration: underline; + } + #1st-section, + #bibliographie, + .footnotes { + break-before: page; + } + #title-block-header { + text-align: center; + margin: 2em 0 6em 0; + } + .authors { + display: flex; + justify-content: center; + } + .author { + margin: 0; + padding: 0 1em; + } + pre { + font-family:'Courier New', Courier, monospace; + font-size: 90%; + background-color: #f2f1f1; + border: 2px solid #d80669; + border-radius: .5em; + margin: 1em; + padding: .5em 1em; + } + code { + font-family:'Courier New', Courier, monospace; + font-size: 90%; + background-color: #f2f1f1; + padding: 2px; + border-radius: 5px; + } + .footnotes::before { + content: "Notes"; + color: #d80669; + font-size: 120%; + font-weight: bold; + } + figure { + display: flex; + flex-direction: column; + border: 2px solid #d80669; + border-radius: .5em; + padding: .5em; + } + figure img { + max-width: 85%; + margin: 0 auto; + } + figcaption { + text-align: center; + font-size: 90%; + counter-increment: figureNumber; + padding-top: .5em; + } + figcaption::before { + content: "Figure " counter(figureNumber) " : "; + } + blockquote { + font-style: italic; + } + blockquote em { + font-style: normal; + } + div.csl-entry { + padding: .5em; + } + .logo { + display: flex; + justify-content: center; + width: 60%; + margin: 2em auto 1em auto; + } + .logo img { + max-width: 50%; + padding: .5em; + } + #TOC ul { + list-style: none; + counter-reset: tocCounter; + padding-left: 1.5em; + } + #TOC li { + counter-increment: tocCounter; + } + #TOC li::before { + content: counter(tocCounter) ". "; + } +} diff --git a/template.html b/template.html new file mode 100644 index 0000000..4d48f90 --- /dev/null +++ b/template.html @@ -0,0 +1,86 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ +$if(description-meta)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$for(css)$ + +$endfor$ + + +$for(header-includes)$ + $header-includes$ +$endfor$ +$if(math)$ + $math$ +$endif$ + + + +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +
+

$title$

+$if(subtitle)$ +

$subtitle$

+$endif$ +$if(author)$ +
+$for(author)$ +

$author$

+$endfor$ +
+$endif$ +$if(date)$ +

$date$

+$endif$ +$if(logo)$ + +$endif$ +$if(abstract)$ +
+$abstract$ +
+$endif$ +
+$endif$ +$if(toc)$ + +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + +