From ea1ce6cf2d8b87ef4a3621de90de0480e3008cf5 Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Sun, 5 Sep 2021 23:50:25 +0200 Subject: [PATCH 01/11] Add a Publication service to provide shared logic --- services/Publication.php | 156 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 services/Publication.php diff --git a/services/Publication.php b/services/Publication.php new file mode 100644 index 0000000..9e85c34 --- /dev/null +++ b/services/Publication.php @@ -0,0 +1,156 @@ + [ + "title" => '', + "description" => '', + "authors" => '' + ], + "publication-hide-links-url" => '1', + "publication-cover-image" => '', + "publication-cover-page" => '0', + "publication-mode" => 'book', + // Book options + "publication-book" => [ + "print-fold" => '0', + "print-marks" => '0', + "pagination" => 'bottom-center', + "page-format" => 'A4', + "page-orientation" => 'portrait', + ], + // Fanzine options + "publication-fanzine" => [ + "layout" => 'single-page' + ], + ]; + + public function isMode($mode) { + return in_array($mode, $this->modes); + } + + public function isPaged($layout) { + return in_array($layout, $this->pagedLayouts); + } + + private function convertToNewOptionsFormat($options) { + // Publication Options + if (isset($options['publication-title'])) { + $options['publication']['title'] = $options['publication-title']; + unset($options['publication-title']); + } + + if (isset($options['publication-description'])) { + $options['publication']['description'] = $options['publication-description']; + unset($options['publication-description']); + } + + if (isset($options['publication-author'])) { + $options['publication']['authors'] = $options['publication-author']; + unset($options['publication-author']); + } + + // Book Options + if (isset($options['publication-page-orientation'])) { + $options['publication-book']['page-orientation'] = $options['publication-page-orientation']; + unset($options['publication-page-orientation']); + } + + if (isset($options['publication-page-format'])) { + $options['publication-book']['page-format'] = $options['publication-page-format']; + unset($options['publication-page-format']); + } + + if (isset($options['publication-book-fold'])) { + $options['publication-book']['print-fold'] = $options['publication-book-fold']; + unset($options['publication-book-fold']); + } + + if (isset($options['publication-print-marks'])) { + $options['publication-book']['print-marks'] = $options['publication-print-marks']; + unset($options['publication-print-marks']); + } + + if (isset($options['publication-pagination'])) { + $options['publication-book']['pagination'] = $options['publication-pagination']; + unset($options['publication-pagination']); + } + + return $options; + } + + public function getOptions(...$args) { + $options = array_replace_recursive($this->defaultOptions, ...$args); + return $this->convertToNewOptionsFormat($options); + } + + public function getStyles($metadatas, $options = []) { + $isDebug = $options['debug'] === 'yes'; + $mode = $metadatas['publication-mode']; + + return array_merge( + // Common styles + [ + "yeswiki-publication", + "publication--" . $metadatas['publication-mode'], + $isDebug ? 'debug' : '', + // OPTION book-cover + $metadatas['publication-cover-page'] === '1' ? "publication--has-cover" : '', + // OPTION hide-links-from-print + $metadatas['publication-hide-links-url'] === '1' ? "hide-links-url" : '', + ], + /* BOOK Styles */ + $mode === 'book' ? [ + // could be chosen, when creating an eBook + "page-format--" . $metadatas['publication-book']['page-format'], + // could be chosen when creating an eBook + "page-orientation--" . $metadatas['publication-book']['page-orientation'], + // OPTION book-fold + $metadatas['publication-book']['print-fold'] === '1' ? "book-fold" : '', + // OPTION show-print-marks + $metadatas['publication-book']['print-marks'] === '1' ? "show-print-marks" : '', + // OPTION show-print-marks + "page-number-position--" . $metadatas['publication-book']['pagination'], + + ] : [], + /* FANZINE Styles */ + $mode === 'fanzine' ? [ + "fanzine-" . $metadatas['publication-fanzine']['layout'] + ] : [], + ); + } +} From 557f005940d81ae66d78ee169ffa2da3d589b4ef Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Sun, 5 Sep 2021 23:55:22 +0200 Subject: [PATCH 02/11] Add a book mode (book, fanzine) in `{{ publicationgenerator }}` --- actions/publicationgenerator.php | 160 +++++++++--------- presentation/actions/publicationgenerator.js | 12 ++ presentation/styles/publication.css | 22 +++ ...s_table.twig => publicationgenerator.twig} | 97 +++++++---- 4 files changed, 179 insertions(+), 112 deletions(-) rename templates/{exportpages_table.twig => publicationgenerator.twig} (68%) diff --git a/actions/publicationgenerator.php b/actions/publicationgenerator.php index 1c8c953..64d7714 100644 --- a/actions/publicationgenerator.php +++ b/actions/publicationgenerator.php @@ -13,24 +13,24 @@ */ use YesWiki\Bazar\Service\EntryManager; +use YesWiki\Publication\Service\Publication; if (!defined("WIKINI_VERSION")) { die("accès direct interdit"); } $entryManager = $this->services->get(EntryManager::class); +$publicationService = $this->services->get(Publication::class); include_once 'tools/tags/libs/tags.functions.php'; -$this->addCssFile('tools/publication/presentation/styles/publication.css'); - // Format of the output. Either you want to generate an ebook or a newsletter // Default value is ebook $name = _t('PUBLICATION_EBOOK'); $outputFormat = $this->getParameter('outputformat', 'Ebook'); $messages = []; -if ($outputFormat === 'newsletter') { +if (strcasecmp($outputFormat, 'newsletter') === 0) { $formId = $this->getParameter('formid'); // Bazar form used to store the newsletter if (empty($formId)) { exit(_t('PUBLICATION_MISSING_NEWSLETTER_FORM')); @@ -60,23 +60,20 @@ // prefix for created pages // Only used when outputformat="ebook" -$ebookPageNamePrefix = $this->getParameter('pagenameprefix', 'Ebook'); +$ebookPageNamePrefix = $this->getParameter('pagenameprefix', 'ebook'); // include default pages in page listing ? $addInstalledPages = $this->getParameter('addinstalledpage'); -// default publication cover -$default = []; -$default['coverimage'] = $this->getParameter('coverimage'); - -// default publication title -$default['title'] = $this->getParameter('title'); - -// default publication description -$default['desc'] = $this->getParameter('desc'); - -// default publication author -$default['author'] = $this->getParameter('author'); +// defaults from the action +$defaults = [ + "publication-cover-image" => $this->getParameter('coverimage'), + "publication" => [ + "title" => $this->getParameter('title'), + "description" => $this->getParameter('desc'), + "authors" => $this->getParameter('author') ?: $this->getParameter('authors'), + ] +]; // default added pages that can be used to separate content $chapterCoverPages = $this->getParameter('chapterpages'); @@ -92,9 +89,6 @@ $chapterCoverPages = $a; } -// app display template -$template = $this->getParameter('template', 'exportpages_table'); - // titles for groups $titles = $this->getParameter('titles'); if (!empty($titles)) { @@ -206,16 +200,22 @@ // Handling of data submitted by the form // Page creation -if (isset($_POST["page"])) { - do { // use of a do-while loop in order to allow for breaks (in case of errors) + +if (isset($_POST) && count($_POST)) { + do { // use of a do-while loop in order to allow for breaks (in case of errors) if (!isset($_POST['antispam']) || $_POST['antispam'] != 1) { // There may be a spamming problem - $output = '
' . _t('PUBLICATION_SPAM_RISK') . '
' . "\n"; + array_push($messages, array('danger', _t('PUBLICATION_SPAM_RISK'))); + break; // Stops the current do-while loop + } + if (!isset($_POST["page"]) || count($_POST["page"]) === 0) { + // There is no page selected + array_push($messages, array('danger', _t('PUBLICATION_NO_PAGE_FOUND'))); break; // Stops the current do-while loop } - if (!isset($_POST["publication-title"]) || $_POST["publication-title"] == '') { + if (!isset($_POST["publication"]["title"]) || trim($_POST["publication"]["title"]) === '') { // There is no publication-title - $output = '
' . _t('PUBLICATION_NO_TITLE_FOUND') . '
' . "\n"; + array_push($messages, array('danger', _t('PUBLICATION_NO_TITLE_FOUND'))); break; // Stops the current do-while loop } @@ -231,7 +231,7 @@ if (isset($ebookPageName) && !empty($ebookPageName)) { $pageName = $ebookPageName; } else { - $pageName = generatePageName($ebookPageNamePrefix . ' ' . $_POST["publication-title"]); + $pageName = generatePageName($ebookPageNamePrefix . ' ' . $_POST["publication"]["title"]); } @@ -267,7 +267,7 @@ $output = $this->Format('""
' . _t('PUBLICATION_EBOOK_PAGE_CREATION_FAILED') . '.""' . "\n" . '{{button class="btn-primary" link="' . $this->GetPageTag() . '" text="' . _t('PUBLICATION_GOTO_EBOOK_CREATION_PAGE') . ' ' . $this->GetPageTag() . '"}}""
""' . "\n"); } } while (false); // end of ebook specific loop - } elseif (strcasecmp($outputFormat, 'newsletter') == 0) { // We want to produce a newsletter + } elseif (strcasecmp($outputFormat, 'newsletter') === 0) { // We want to produce a newsletter $fiche['id_typeannonce'] = $formId; $fiche['bf_titre'] = $_POST["publication-title"]; $fiche['bf_description'] = $_POST["publication-description"]; @@ -296,66 +296,64 @@ array_push($messages, array('success', _t('PUBLICATION_NEWSLETTER_CREATED'))); } } while (false); // End of global do-while loop -} else { // Not isset($_POST["page"]) - // recuperation des pages creees a l'installation - $installedPageNames = []; - if (!empty($addInstalledPages)) { - $d = dir("setup/doc/"); - while ($doc = $d->read()) { - if ($doc == '.' || $doc == '..' || is_dir($doc) || substr($doc, -4) != '.txt') { - continue; - } +} - if ($doc == '_root_page.txt') { - $installedPageNames[$this->GetConfigValue("root_page")] = $this->GetConfigValue("root_page"); - } else { - $pageName = substr($doc, 0, strpos($doc, '.txt')); - $installedPageNames[$pageName] = $pageName; - } +// recuperation des pages creees a l'installation +$installedPageNames = []; +if (!empty($addInstalledPages)) { + $d = dir("setup/doc/"); + while ($doc = $d->read()) { + if ($doc == '.' || $doc == '..' || is_dir($doc) || substr($doc, -4) != '.txt') { + continue; } - } - if (isset($this->page["metadatas"]["publication-title"])) { - $ebookPageName = $this->GetPageTag(); - preg_match_all('/{{include page="(.*)".*}}/Ui', $this->page['body'], $matches); - $publicationStart = $matches[1][0]; - $last = count($matches[1]) - 1; - $publicationEnd = $matches[1][$last]; - unset($matches[1][0]); - unset($matches[1][$last]); - foreach ($matches[1] as $key => $value) { - $pagesFiltre = filter_by_value($results, 'tag', $value); - $selectedPages[] = array_shift($pagesFiltre); - $key = array_keys($pagesFiltre); - if ($key && isset($pages[$key[0]])) { - unset($pages[$key[0]]); - } + if ($doc == '_root_page.txt') { + $installedPageNames[$this->GetConfigValue("root_page")] = $this->GetConfigValue("root_page"); + } else { + $pageName = substr($doc, 0, strpos($doc, '.txt')); + $installedPageNames[$pageName] = $pageName; } - } else { - $ebookPageName = ''; - $selectedPages = array(); } +} - $this->AddJavascriptFile('tools/publication/libs/vendor/jquery-ui-sortable/jquery-ui.min.js'); - $this->AddJavascriptFile('tools/publication/presentation/actions/publicationgenerator.js'); - - $output .= $this->render('@publication/'.$template.'.twig', [ - 'messages' => $messages, - 'entries' => $results, - 'areParamsReadonly' => $areParamsReadonly, - 'publicationStart' => $this->loadPage($publicationStart), - 'publicationEnd' => $this->loadPage($publicationEnd), - 'addInstalledPages' => $addInstalledPages, - 'installedPageNames' => $installedPageNames, - 'defaults' => $default, - 'ebookPageName' => $ebookPageName, - 'metaDatas' => $this->page["metadatas"], - 'selectedPages' => $selectedPages, - 'chapterCoverPages' => $chapterCoverPages, - 'url' => $this->href('', $this->GetPageTag()), - 'name' => $name, - 'outputFormat' => $outputFormat, - ]); +if (isset($this->page["metadatas"]["publication-title"])) { + $ebookPageName = $this->GetPageTag(); + preg_match_all('/{{include page="(.*)".*}}/Ui', $this->page['body'], $matches); + $publicationStart = $matches[1][0]; + $last = count($matches[1]) - 1; + $publicationEnd = $matches[1][$last]; + unset($matches[1][0]); + unset($matches[1][$last]); + foreach ($matches[1] as $key => $value) { + $pagesFiltre = filter_by_value($results, 'tag', $value); + $selectedPages[] = array_shift($pagesFiltre); + $key = array_keys($pagesFiltre); + if ($key && isset($pages[$key[0]])) { + unset($pages[$key[0]]); + } + } +} else { + $ebookPageName = ''; + $selectedPages = array(); } -echo $output . "\n"; +$this->addCssFile('tools/publication/presentation/styles/publication.css'); +$this->AddJavascriptFile('tools/publication/libs/vendor/jquery-ui-sortable/jquery-ui.min.js'); +$this->AddJavascriptFile('tools/publication/presentation/actions/publicationgenerator.js'); + +echo $this->render('@publication/publicationgenerator.twig', [ + 'messages' => $messages, + 'entries' => $results, + 'areParamsReadonly' => $areParamsReadonly, + 'publicationStart' => $this->loadPage($publicationStart), + 'publicationEnd' => $this->loadPage($publicationEnd), + 'addInstalledPages' => $addInstalledPages, + 'installedPageNames' => $installedPageNames, + 'ebookPageName' => $ebookPageName, + 'metadatas' => $publicationService->getOptions($defaults, $_POST, $this->page["metadatas"] ?: []), + 'selectedPages' => $selectedPages, + 'chapterCoverPages' => $chapterCoverPages, + 'url' => $this->href('', $this->GetPageTag()), + 'name' => $name, + 'outputFormat' => $outputFormat, +]); diff --git a/presentation/actions/publicationgenerator.js b/presentation/actions/publicationgenerator.js index c4cb24e..1198548 100644 --- a/presentation/actions/publicationgenerator.js +++ b/presentation/actions/publicationgenerator.js @@ -112,4 +112,16 @@ $(document).ready(function () { // Update the count filtercount.text(`Nombre de pages : ${count}`); }); + + /* Display ebook publication options (book, fanzine) */ + $('[name="publication-mode"]').on('change', function (event) { + var mode = event.target.value + var $options = $('details.publication-options') + + $options.not(`.options-${mode}`).attr('hidden', true) + $options.filter(`.options-${mode}`).removeAttr('hidden') + }) + + var mode = $('[name="publication-mode"][checked]').val() + $('details.publication-options').filter(`.options-${mode}`).removeAttr('hidden') }); diff --git a/presentation/styles/publication.css b/presentation/styles/publication.css index bac4807..13299db 100644 --- a/presentation/styles/publication.css +++ b/presentation/styles/publication.css @@ -36,6 +36,28 @@ margin-bottom: 1em; } +.export-table-form [type="checkbox"] + span, +.export-table-form [type="radio"] + span { + height: 1.4rem; + padding-left: 1.4rem; /* same as height to be "square" */ +} + +.export-table-form .radio .control-label, +.export-table-form .checkbox .control-label, +.export-table-form .radio-inline .control-label { + font-weight: bold; +} +.export-table-form .text-muted { + font-weight: normal; +} + +.export-table-form .form-group.checkbox .control-label, +.export-table-form .form-group.checkbox .control-label + .form-text, +.export-table-form .form-row .radio-inline { + padding-left: 0; + vertical-align: top; +} + /* we reduce spacing for rows without .col-* elements inside */ .export-table-form .form-row.clearfix .form-group { margin-top: 10px; diff --git a/templates/exportpages_table.twig b/templates/publicationgenerator.twig similarity index 68% rename from templates/exportpages_table.twig rename to templates/publicationgenerator.twig index 4b7fb1d..a257a15 100644 --- a/templates/exportpages_table.twig +++ b/templates/publicationgenerator.twig @@ -37,7 +37,7 @@ {% for nb,form in entries %}
-

{{ form.name }} +

{{ form['name'] }} {{ _t('PUBLICATION_ADD_ALL') }} @@ -163,10 +163,10 @@
{% if areParamsReadonly %} - + {% endif %} - +
@@ -174,21 +174,21 @@
{% if areParamsReadonly %} - + {% endif %} - +
- +
{% if areParamsReadonly %} - + {% endif %} - +
@@ -197,30 +197,46 @@
{% if areParamsReadonly %} - + {% endif %} - +
{% endif %} -
+
+ + + {{ publicationStart ? _t('PUBLICATION_EBOOK_COVER_PAGE_WITH_PUBLICATION_START_HELP') : _t('PUBLICATION_EBOOK_COVER_PAGE_HELP') }} +
+ + {% if outputFormat|lower == 'ebook' %} +
+ + + + +
+ {% endif %} + + + + From 5ed7e3dde9e0c9fadebadcdbb73245eddb90a04c Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Sun, 5 Sep 2021 23:58:32 +0200 Subject: [PATCH 03/11] Refactor of `{{ publicationlist }}` and the Publication view --- actions/publicationlist.php | 10 ++++-- templates/includes/publication.twig | 55 ++++++++++++++++++++++++++++ templates/print-show.twig | 56 ----------------------------- templates/publicationlist.twig | 56 ++--------------------------- templates/show.twig | 5 +++ 5 files changed, 69 insertions(+), 113 deletions(-) create mode 100644 templates/includes/publication.twig delete mode 100644 templates/print-show.twig create mode 100644 templates/show.twig diff --git a/actions/publicationlist.php b/actions/publicationlist.php index 67500be..4605153 100644 --- a/actions/publicationlist.php +++ b/actions/publicationlist.php @@ -33,11 +33,15 @@ *@version $Revision: 0.1 $ $Date: 2010/03/04 14:19:03 $ */ +use YesWiki\Publication\Service\Publication; + if (!defined("WIKINI_VERSION")) { die ("accès direct interdit"); } global $wiki; + +$publicationService = $this->services->get(Publication::class); $ebookPageNamePrefix = $this->getParameter('pagenameprefix', 'Ebook'); $output = ''; @@ -45,13 +49,13 @@ // recuperation des pages wikis $sql = 'SELECT DISTINCT resource FROM '.$this->GetConfigValue('table_prefix').'triples'; $sql .= ' WHERE property="http://outils-reseaux.org/_vocabulary/metadata" - AND value LIKE "%publication-title%" + AND value LIKE "%publication-title%" OR value LIKE "%\publication\":{\"title\":%" AND resource LIKE "'.$ebookPageNamePrefix.'%" '; $sql .= ' ORDER BY resource ASC'; -$pages = array_map(function($page) use ($wiki) { +$pages = array_map(function($page) use ($wiki, $publicationService) { $metas = $wiki->GetMetadatas($page['resource']); - $page['_metas'] = $metas; + $page['_metas'] = $publicationService->getOptions($metas); return $page; }, $wiki->LoadAll($sql)); diff --git a/templates/includes/publication.twig b/templates/includes/publication.twig new file mode 100644 index 0000000..6528c3d --- /dev/null +++ b/templates/includes/publication.twig @@ -0,0 +1,55 @@ +
diff --git a/templates/print-show.twig b/templates/print-show.twig deleted file mode 100644 index 57627ef..0000000 --- a/templates/print-show.twig +++ /dev/null @@ -1,56 +0,0 @@ -
-

{{ _t('PUBLICATION_SHOW_NOTICE') }}

-
- -
-
-
-
- {% if metadata['publication-cover-image'] %} - - {% endif %} - -

{{ metadata['publication-title'] }}

- -

{{ metadata['publication-description'] }}

- - {% if hasWriteAccess %} -

- - {{ metadata['publication-page-format'] }} - {{ _t('PUBLICATION_EBOOK_ORIENTATION_%s' | format(metadata['publication-page-orientation']| upper)) }} - -

- {% endif %} -
-
-
- - -
diff --git a/templates/publicationlist.twig b/templates/publicationlist.twig index b9bf4df..83d7356 100644 --- a/templates/publicationlist.twig +++ b/templates/publicationlist.twig @@ -1,5 +1,4 @@ {% if pages|length == 0 %} -
{{ _t('PUBLICATION_NO_EBOOK_FOUND') }}
@@ -7,59 +6,8 @@ diff --git a/templates/show.twig b/templates/show.twig new file mode 100644 index 0000000..5e2ac7f --- /dev/null +++ b/templates/show.twig @@ -0,0 +1,5 @@ +
+

{{ _t('PUBLICATION_SHOW_NOTICE') }}

+
+ +{% include '@publication/includes/publication.twig' with { 'metas': metadata, 'tag': page.resource } %} From b45fdd43355b172b809e9b680f88581eacc6f041 Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Mon, 6 Sep 2021 00:18:34 +0200 Subject: [PATCH 04/11] Modularize layouts --- handlers/page/preview.php | 127 ++++++----- handlers/page/show__.php | 24 +-- lang/publication_en.inc.php | 13 +- lang/publication_fr.inc.php | 10 +- lang/publication_pt.inc.php | 8 +- .../{base.css => print-layouts/book.css} | 73 +++++++ presentation/styles/print-layouts/fanzine.css | 83 ++++++++ presentation/styles/print.css | 198 +++++------------- templates/includes/image-cover.twig | 8 + templates/print-layouts/base.twig | 42 ++++ templates/print-layouts/book.twig | 1 + templates/print-layouts/fanzine.twig | 16 ++ templates/print-preview.twig | 42 ---- 13 files changed, 367 insertions(+), 278 deletions(-) rename presentation/styles/{base.css => print-layouts/book.css} (86%) create mode 100644 presentation/styles/print-layouts/fanzine.css create mode 100644 templates/includes/image-cover.twig create mode 100644 templates/print-layouts/base.twig create mode 100644 templates/print-layouts/book.twig create mode 100644 templates/print-layouts/fanzine.twig delete mode 100644 templates/print-preview.twig diff --git a/handlers/page/preview.php b/handlers/page/preview.php index 63c4c6c..5ad36f0 100644 --- a/handlers/page/preview.php +++ b/handlers/page/preview.php @@ -4,9 +4,11 @@ use YesWiki\Bazar\Service\EntryManager; use YesWiki\Core\Service\PageManager; use YesWiki\Core\Service\TemplateEngine; +use YesWiki\Publication\Service\Publication; global $wiki; +$publicationService = $this->services->get(Publication::class); $publication = null; $entryManager = $wiki->services->get(EntryManager::class); @@ -14,37 +16,41 @@ $templateEngine = $wiki->services->get(TemplateEngine::class); /** - * We print bazar list results + * Print from {{ bazar2publication }} (dynamic results) */ if ($wiki->HasAccess('read') && isset($_GET['via']) && $_GET['via'] === 'bazarliste') { - // we assemble bazar pages - $content = ''; - $templateName = 'rendered-entries.tpl.html'; - if (!$templateEngine->hasTemplate('@bazar/'.$templateName)) { - // backward compatibilty - preg_match('#{{\s*bazar.+id="(.+)".+}}#siU', $wiki->page['body'], $matches); - list(, $formId) = $matches; - - $query = isset($_GET['query']) ? $_GET['query'] : ''; - - $results = $entryManager->search(['query' => $query, 'formsIds' => [$formId]]); - - $content = array_reduce($results, function ($html, $fiche) use ($entryController) { - return $html . $entryController->view($fiche); - }, ''); - } elseif (preg_match('/({{(bazarliste|bazarcarto|calendrier|map|gogomap)\s[^}]*}})/i', $wiki->page['body'], $matches)) { - $actionText = $matches[1]; - $actionName = $matches[2]; - $matches = []; - $params = []; - if (preg_match_all('/([a-zA-Z0-9_]*)=\"(.*)\"/U', $actionText, $matches)) { - foreach ($matches[0] as $id => $match) { - $params[$matches[1][$id]] = $matches[2][$id]; - } - // redefine template - $params['template'] = $templateName; - $content = $this->Action($actionName, 0, $params); - } + // we assemble bazar pages + $content = ''; + $templateName = 'rendered-entries.tpl.html'; + if (!$templateEngine->hasTemplate('@bazar/'.$templateName)) { + // backward compatibilty + preg_match('#{{\s*bazar.+id="(.+)".+}}#siU', $wiki->page['body'], $matches); + list(, $formId) = $matches; + + $query = isset($_GET['query']) ? $_GET['query'] : ''; + + $results = $entryManager->search(['query' => $query, 'formsIds' => [$formId]]); + + $content = array_reduce($results, function ($html, $fiche) use ($entryController) { + return $html . $entryController->view($fiche); + }, ''); + } + /** + * Print from page, but render its {{ bazar* }} elements + */ + elseif (preg_match('/({{(bazarliste|bazarcarto|calendrier|map|gogomap)\s[^}]*}})/i', $wiki->page['body'], $matches)) { + $actionText = $matches[1]; + $actionName = $matches[2]; + $matches = []; + $params = []; + if (preg_match_all('/([a-zA-Z0-9_]*)=\"(.*)\"/U', $actionText, $matches)) { + foreach ($matches[0] as $id => $match) { + $params[$matches[1][$id]] = $matches[2][$id]; + } + // redefine template + $params['template'] = $templateName; + $content = $this->Action($actionName, 0, $params); + } } // we gather a few things from @@ -67,10 +73,10 @@ } } - $publication = array( - 'metadatas' => isset($templatePage) ? $templatePage['metadatas'] : array(), - 'content' => $content - ); + $publication = [ + 'metadatas' => isset($templatePage) ? $templatePage['metadatas'] : array(), + 'content' => $content + ]; } /** @@ -110,32 +116,32 @@ */ if ($publication) { + // user options + $metadatas = $publicationService->getOptions($publication['metadatas'] ?? [], isset($_GET['layout']) + ? [ "publication-fanzine" => ["layout" => $_GET['layout'] ] ] + : [] + ); + + // + if (!$publicationService->isMode($metadatas['publication-mode'])) { + //TODO turn into template + return 'Mode inconnu'; + } + // Load the cascade of publication styles $cssFiles = array_merge( + glob('tools/publication/presentation/styles/print-layouts/'.$metadatas['publication-mode'].'.css'), glob('tools/publication/presentation/styles/*.css'), glob('themes/'.$wiki->config['favorite_theme'].'/tools/publication/*.css'), + glob('themes/'.$wiki->config['favorite_theme'].'/tools/publication/print-layouts/'.$metadatas['publication-mode'].'.css'), glob('custom/tools/publication/*.css'), + glob('custom/tools/publication/print-layouts/'.$metadatas['publication-mode'].'.css'), ); array_map(function($file) use ($wiki) { $wiki->AddCSSFile($file); }, $cssFiles); - // user options - $options = array( - "publication-hide-links-url" => '1', - "publication-cover-image" => '', - "publication-cover-page" => '0', - "publication-book-fold" => '0', - "publication-page-format" => 'A4', - "publication-page-orientation" => 'portrait', - "publication-pagination" => "bottom-center", - "publication-print-marks" => '0', - ); - - $metadatas = array_merge($options, $publication['metadatas'] ?? []); - $blankpage = $wiki->Format('{{blankpage}}'); - // cover image $coverImage = ''; @@ -150,8 +156,10 @@ } } + $blankpage = $wiki->Format('{{blankpage}}'); + // build the preview/printing page - $output = $templateEngine->render('@publication/print-preview.twig', [ + $output = $templateEngine->render('@publication/print-layouts/'.$metadatas['publication-mode'].'.twig', [ "baseUrl" => $wiki->getBaseUrl(), "blankpage" => $blankpage, "content" => $publication['content'], @@ -159,24 +167,9 @@ "siteTitle" => $wiki->GetConfigValue('wakka_name'), "metadatas" => $metadatas, "styles" => $wiki->Format('{{linkstyle}}{{linkjavascript}}'), - "stylesModifiers" => [ - "yeswiki-publication", - $wiki->config['debug'] === 'yes' ? 'debug' : '', - // could be chosen, when creating an eBook - "page-format--" . $metadatas['publication-page-format'], - // could be chosen when creating an eBook - "page-orientation--" . $metadatas['publication-page-orientation'], - // OPTION book-cover - $metadatas['publication-cover-page'] === '1' ? "book-cover" : '', - // OPTION book-fold - $metadatas['publication-book-fold'] === '1' ? "book-fold" : '', - // OPTION show-print-marks - $metadatas['publication-print-marks'] === '1' ? "show-print-marks" : '', - // OPTION show-print-marks - "page-number-position--" . $metadatas['publication-pagination'], - // OPTION hide-links-from-print - $metadatas['publication-hide-links-url'] === '1' ? "hide-links-url" : '', - ], + // + "initialPublicationState" => $publicationService->isPaged($metadatas['publication-mode']) ?: 'ready', + "stylesModifiers" => $publicationService->getStyles($metadatas, ['debug' => $wiki->config['debug']]), ]); // Insert a blank page after a cover page diff --git a/handlers/page/show__.php b/handlers/page/show__.php index a4a4200..2bb0dec 100644 --- a/handlers/page/show__.php +++ b/handlers/page/show__.php @@ -1,26 +1,18 @@ HasAccess('read') && isset($this->page['metadatas']['publication-title'])) { - // user options - $options = array( - "publication-hide-links-url" => '1', - "publication-cover-page" => '0', - "publication-book-fold" => '0', - "publication-page-format" => 'A4', - "publication-page-orientation" => 'portrait', - "publication-pagination" => "bottom-center", - "publication-print-marks" => '0' - ); +use YesWiki\Publication\Service\Publication; + +global $wiki; - $metadata = array_merge($options, $wiki->page['metadatas']); +if ($this->HasAccess('read') && (isset($this->page['metadatas']['publication-title']) || isset($this->page['metadatas']['publication']['title']))) { + $publicationService = $this->services->get(Publication::class); + $metadata = $publicationService->getOptions($wiki->page['metadatas']); - $output = $wiki->render('@publication/print-show.twig', [ + $output = $wiki->render('@publication/show.twig', [ 'hasWriteAccess' => $wiki->HasAccess('write'), 'hasDeleteAccess' => $wiki->UserIsAdmin() || $wiki->UserIsOwner(), 'metadata' => $metadata, - 'page' => $wiki->page, - 'wiki' => $wiki, + 'page' => $wiki->page ]); $plugin_output_new = preg_replace('#
#siU', '
'. $output .'
', $plugin_output_new); diff --git a/lang/publication_en.inc.php b/lang/publication_en.inc.php index 16fd624..a6d10e2 100644 --- a/lang/publication_en.inc.php +++ b/lang/publication_en.inc.php @@ -23,8 +23,8 @@ 'PUBLICATION_DOWNLOAD' => 'Download', 'PUBLICATION_DOWNLOAD_PDF' => 'PDF', 'PUBLICATION_EBOOK' => 'Ebook', - 'PUBLICATION_EBOOK_AUTHOR' => 'Author\'s first name', - 'PUBLICATION_EBOOK_COVER_IMAGE' => 'Link to ebook cover image', + 'PUBLICATION_EBOOK_AUTHOR' => 'Author(s)', + 'PUBLICATION_EBOOK_COVER_IMAGE' => 'Link to cover image', 'PUBLICATION_EBOOK_COVER_PAGE' => 'Generate a cover page automatically', 'PUBLICATION_EBOOK_COVER_PAGE_HELP' => 'It will reuse the aforementioned informations.', 'PUBLICATION_EBOOK_COVER_PAGE_WITH_PUBLICATION_START_HELP' => 'This setting cannot be enabled because a first page has already been set.', @@ -44,6 +44,11 @@ 'PUBLICATION_END_PAGE' => 'End page', 'PUBLICATION_EXAMPLE_AUTHOR' => 'Ex: Victor Hugo', 'PUBLICATION_EXPORT_PAGES_INFO' => 'Select your ebook content buy clicking on ', + 'PUBLICATION_FANZINE_LAYOUT' => 'Page folding', + 'PUBLICATION_FANZINE_LAYOUT_SINGLE_PAGE' => 'Single sheet (recto only)', + 'PUBLICATION_FANZINE_LAYOUT_SINGLE_PAGE_HELP' => '8 pages printed on a single sheet.', + 'PUBLICATION_FANZINE_LAYOUT_RECTO_FOLIO' => 'Folio (recto only)', + 'PUBLICATION_FANZINE_LAYOUT_RECTO_FOLIO_HELP' => '2 pages per sheet, folded together.', 'PUBLICATION_FILTER_PAGES' => 'Filter content', 'PUBLICATION_FOR_THE_EBOOK' => 'For ebook', 'PUBLICATION_FROM_THE_EBOOK' => 'From ebook', @@ -53,6 +58,9 @@ 'PUBLICATION_INSERT_BLANK_PAGE' => 'Insert blank page', 'PUBLICATION_MANDATORY_FIELD' => 'Mandatory field', 'PUBLICATION_MISSING_NEWSLETTER_FORM' => 'In order to produce a newsletter, you must indicate a form id (See readme.md file).', + 'PUBLICATION_MODE' => 'Disposition', + 'PUBLICATION_MODE_BOOK' => 'Book, booklet', + 'PUBLICATION_MODE_FANZINE' => 'Fanzine', 'PUBLICATION_MORE_OPTIONS' => 'Other customization options', 'PUBLICATION_NEWSLETTER' => 'Newsletter', 'PUBLICATION_NEWSLETTER_CREATED' => 'The newsletter record has successfully been created', @@ -60,6 +68,7 @@ 'PUBLICATION_NO_DESC_FOUND' => 'ERROR : Description hasn\'t been filled in.', 'PUBLICATION_NO_EBOOK_FOUND' => 'No ebook found.', 'PUBLICATION_NO_IMAGE_FOUND' => 'ERROR : Link to cover image hasn\'t been filled in.', + 'PUBLICATION_NO_PAGE_FOUND' => 'ERROR : Please select at least one page to create a publication.', 'PUBLICATION_NO_TITLE_FOUND' => 'ERROR : Publication title hasn\'t been filled in.', 'PUBLICATION_NOT_IMAGE_FILE' => 'ERREUR : Cover image doesn\'t seem to be a jpg file.', 'PUBLICATION_PAGINATION_POSITION' => 'Page number position', diff --git a/lang/publication_fr.inc.php b/lang/publication_fr.inc.php index 1c9e6ba..4380059 100644 --- a/lang/publication_fr.inc.php +++ b/lang/publication_fr.inc.php @@ -24,9 +24,9 @@ 'PUBLICATION_DOWNLOAD' => 'Télécharger', 'PUBLICATION_DOWNLOAD_PDF' => 'PDF', 'PUBLICATION_EBOOK' => 'Ebook', - 'PUBLICATION_EBOOK_AUTHOR' => 'Prénom puis nom de l\'auteur', - 'PUBLICATION_EBOOK_COVER_IMAGE' => 'Lien vers l\'image de couverture de l\'ouvrage', - 'PUBLICATION_EBOOK_COVER_PAGE' => 'Généreration automatique de la page de couverture', + 'PUBLICATION_EBOOK_AUTHOR' => 'Auteur·ice(s)', + 'PUBLICATION_EBOOK_COVER_IMAGE' => 'Lien vers l\'image de couverture', + 'PUBLICATION_EBOOK_COVER_PAGE' => 'Génération automatique de la page de couverture', 'PUBLICATION_EBOOK_COVER_PAGE_HELP' => 'Elle réutilisera les informations mentionnées ci-dessus.', 'PUBLICATION_EBOOK_COVER_PAGE_WITH_PUBLICATION_START_HELP' => 'Ce réglage ne peut être activé car une page de couverture est déjà configurée.', 'PUBLICATION_EBOOK_DESC' => 'Description', @@ -54,6 +54,9 @@ 'PUBLICATION_INSERT_BLANK_PAGE' => 'Insérer une page blanche', 'PUBLICATION_MANDATORY_FIELD' => 'Champ obligatoire', 'PUBLICATION_MISSING_NEWSLETTER_FORM' => 'Vous devez préciser un id de formulaire pour produire une newsletter (reportez-vous au fichier readme.md).', + 'PUBLICATION_MODE' => 'Disposition', + 'PUBLICATION_MODE_BOOK' => 'Livre, livret', + 'PUBLICATION_MODE_FANZINE' => 'Fanzine', 'PUBLICATION_MORE_OPTIONS' => 'Autres options de personnalisation', 'PUBLICATION_NEWSLETTER' => 'Newsletter', 'PUBLICATION_NEWSLETTER_CREATED' => 'La newsletter a bien été créée', @@ -61,6 +64,7 @@ 'PUBLICATION_NO_DESC_FOUND' => 'ERREUR : La description n\'a pas été renseigné.', 'PUBLICATION_NO_EBOOK_FOUND' => 'Pas d\'ebook trouvé.', 'PUBLICATION_NO_IMAGE_FOUND' => 'ERREUR : Le lien vers l\'image de couverture n\'a pas été renseigné.', + 'PUBLICATION_NO_PAGE_FOUND' => '', 'PUBLICATION_NO_TITLE_FOUND' => 'ERREUR : Le titre n\'a pas été renseigné.', 'PUBLICATION_NOT_IMAGE_FILE' => 'ERREUR : Le lien vers l\'image de couverture n\'est pas une image avec l\'extension .jpg.', 'PUBLICATION_PAGINATION_POSITION' => 'Emplacement de la numérotation des pages', diff --git a/lang/publication_pt.inc.php b/lang/publication_pt.inc.php index 4ea184b..c9b0b5d 100644 --- a/lang/publication_pt.inc.php +++ b/lang/publication_pt.inc.php @@ -23,8 +23,8 @@ 'PUBLICATION_DOWNLOAD' => 'Baixar', 'PUBLICATION_DOWNLOAD_PDF' => 'PDF', 'PUBLICATION_EBOOK' => 'Ebook', -'PUBLICATION_EBOOK_AUTHOR' => 'Nome e sobrenome do autor', -'PUBLICATION_EBOOK_COVER_IMAGE' => 'Link para a imagem da capa do livro', +'PUBLICATION_EBOOK_AUTHOR' => 'Autor(es)', +'PUBLICATION_EBOOK_COVER_IMAGE' => 'Link para a imagem da capa', 'PUBLICATION_EBOOK_COVER_PAGE' => 'Geração automática da capa', 'PUBLICATION_EBOOK_COVER_PAGE_HELP' => 'Irá reutilizar as informações mencionadas acima.', 'PUBLICATION_EBOOK_COVER_PAGE_WITH_PUBLICATION_START_HELP' => 'Esta configuração não pode ser ativada porque uma capa já está configurada.', @@ -53,6 +53,9 @@ 'PUBLICATION_INSERT_BLANK_PAGE' => 'Insira uma página em branco', 'PUBLICATION_MANDATORY_FIELD' => 'Campo obrigatório', 'PUBLICATION_MISSING_NEWSLETTER_FORM' => 'Você deve especificar um id de formulário para produzir uma newsletter (consulte o arquivo readme.md).', +'PUBLICATION_MODE' => 'Disposição', +'PUBLICATION_MODE_BOOK' => 'Livro, livreto', +'PUBLICATION_MODE_FANZINE' => 'Fanzine', 'PUBLICATION_MORE_OPTIONS' => 'Outras opções de personalização', 'PUBLICATION_NEWSLETTER' => 'Newsletter', 'PUBLICATION_NEWSLETTER_CREATED' => 'A newsletter foi criada', @@ -60,6 +63,7 @@ 'PUBLICATION_NO_DESC_FOUND' => 'ERRO: A descrição não foi preenchida. ', 'PUBLICATION_NO_EBOOK_FOUND' => 'Nenhum e-book encontrado.', 'PUBLICATION_NO_IMAGE_FOUND' => 'ERRO: O link para a imagem da capa não foi preenchido. ', +'PUBLICATION_NO_PAGE_FOUND' => '', 'PUBLICATION_NO_TITLE_FOUND' => 'ERRO: O título não foi preenchido. ', 'PUBLICATION_NOT_IMAGE_FILE' => 'ERRO: O link para a imagem da capa não é uma imagem com a extensão .jpg.', 'PUBLICATION_PAGINATION_POSITION' => 'Localização da numeração da página', diff --git a/presentation/styles/base.css b/presentation/styles/print-layouts/book.css similarity index 86% rename from presentation/styles/base.css rename to presentation/styles/print-layouts/book.css index 0b2c87d..7414432 100644 --- a/presentation/styles/base.css +++ b/presentation/styles/print-layouts/book.css @@ -1,3 +1,66 @@ +body { + font-size: 1rem; + line-height: 1.33; +} + +@page { + size: A4 portrait; + margin: 20mm 25mm; /* marks: crop; */ + + @footnote { + margin: 0.6rem 0 0 0; + padding: 0.3rem 0 0 0; + max-height: 10rem; + } + @top-center { + vertical-align: bottom; + padding-bottom: 10mm; + content: string(booktitle); + } +} + +@page :left { + margin: 20mm 40mm 20mm 30mm; + @top-left { + vertical-align: bottom; + padding-bottom: 10mm; + content: string(page-number, first-except); + letter-spacing: 0.1rem; + margin-left: -1rem; + font-size: 0.9rem; + } + @bottom-left-corner { + content: counter(page); + } +} + +@page :right { + margin: 20mm 30mm 20mm 40mm; + @top-right { + vertical-align: bottom; + padding-bottom: 10mm; + content: string(page-number, first-except); + letter-spacing: 0.08rem; + margin-right: -1rem; + font-size: 0.9rem; + } + @bottom-right-corner { + content: counter(page); + } + @top-center { + content: string(booktitle); + } +} +@page cover { + @top-center { + content: none; + } +} + +section:nth-child(1) h1 { + string-set: booktitle content(text); +} + /** * Writing helpers */ @@ -337,3 +400,13 @@ .yeswiki-publication.hide-links-url a[href]::after{ content: ""; } + +/* */ +section { + break-before: right; + break-after: always; +} + +h1 { + page-break-before: always; +} diff --git a/presentation/styles/print-layouts/fanzine.css b/presentation/styles/print-layouts/fanzine.css new file mode 100644 index 0000000..95bc0af --- /dev/null +++ b/presentation/styles/print-layouts/fanzine.css @@ -0,0 +1,83 @@ +@page { + size: landscape; + margin: 0; + bleed: 0; +} + +html.html-publication { + font-size: 55% !important; +} + +body.publication--fanzine { + font-size: 1rem !important +} + +/** SINGLE FILE */ +/* fanzine wrapper */ +.fanzine-single-page .fanzine { + width: 100vw; + height: calc(100vh - 2px); + display: grid; + gap: 1px; + background: lightgrey !important; + grid-template-areas: + "page-5 page-4 page-3 page-2" + "page-6 page-7 page-8 page-1"; +} + + /* page */ + .fanzine-single-page .fanzine > * { + background: white !important; + overflow: hidden; + } + + .fanzine-single-page .fanzine > :nth-child(1) { + grid-area: page-1; + } + .fanzine-single-page .fanzine > :nth-child(2) { + grid-area: page-2; + } + .fanzine-single-page .fanzine > :nth-child(3) { + grid-area: page-3; + } + .fanzine-single-page .fanzine > :nth-child(4) { + grid-area: page-4; + } + .fanzine-single-page .fanzine > :nth-child(5) { + grid-area: page-5; + } + .fanzine-single-page .fanzine > :nth-child(6) { + grid-area: page-6; + } + .fanzine-single-page .fanzine > :nth-child(7) { + grid-area: page-7; + } + .fanzine-single-page .fanzine > :nth-child(8) { + grid-area: page-8; + } + + .fanzine-single-page .fanzine > :nth-child(5), + .fanzine-single-page .fanzine > :nth-child(4), + .fanzine-single-page .fanzine > :nth-child(3), + .fanzine-single-page .fanzine > :nth-child(2) { + transform: rotate(180deg) translateX(-0.25px); + } + +/** */ +.fanzine-recto-folio .fanzine { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1px; + background: lightgrey !important; +} + + .fanzine-recto-folio .fanzine > * { + background: white !important; + overflow: hidden; + height: calc(100vh - 2px); + } + .fanzine-recto-folio .fanzine > :nth-child(2n) { + page-break-after: always; + } + + diff --git a/presentation/styles/print.css b/presentation/styles/print.css index 21a6ad4..d0898ca 100644 --- a/presentation/styles/print.css +++ b/presentation/styles/print.css @@ -1,84 +1,4 @@ -@page { - size: 8.5in 11in; - margin: 20mm 25mm; /* marks: crop; */ - @footnote { - margin: 0.6em 0 0 0; - padding: 0.3em 0 0 0; - max-height: 10em; - } - @top-center { - vertical-align: bottom; - padding-bottom: 10mm; - content: string(booktitle); - } -} -@page :left { - margin: 20mm 40mm 20mm 30mm; - @top-left { - vertical-align: bottom; - padding-bottom: 10mm; - content: string(page-number, first-except); - letter-spacing: 0.1em; - margin-left: -1em; - font-size: 0.9em; - } - @bottom-left-corner { - content: counter(page); - } -} -@page :right { - margin: 20mm 30mm 20mm 40mm; - @top-right { - vertical-align: bottom; - padding-bottom: 10mm; - content: string(page-number, first-except); - letter-spacing: 0.08em; - margin-right: -1em; - font-size: 0.9em; - } - @bottom-right-corner { - content: counter(page); - } - @top-center { - content: string(booktitle); - } -} -@page cover { - @top-center { - content: none; - } -} -@font-face { - font-family: "Stix"; - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: "Stix"; - font-weight: bold; - font-style: normal; -} -@font-face { - font-family: "Stix"; - font-weight: normal; - font-style: italic; -} -@font-face { - font-family: "Stix"; - font-weight: bold; - font-style: italic; -} -section:nth-child(1) h1 { - string-set: booktitle content(text); -} -section { - break-before: right; - break-after: always; -} body { - font-size: 1em; - line-height: 1.33em; - font-family: "Stix", serif; font-variant-numeric: oldstyle-nums; } p { @@ -89,26 +9,26 @@ p { header + p:first-line { text-transform: lowercase !important; font-variant: small-caps; - font-size: 1.1em; + font-size: 1.1rem; } p + p { - text-indent: 1.33em; + text-indent: 1.33rem; } .decoration-rw { text-align: center; - padding-top: 1em; - padding-bottom: 1em; - padding-left: 0em; - padding-right: 0em; + padding-top: 1rem; + padding-bottom: 1rem; + padding-left: 0; + padding-right: 0; } .copyright-rw { - font-size: 0.8em; - line-height: 1em; + font-size: 0.8rem; + line-height: 1rem; text-align: left; - padding-top: 2em; + padding-top: 2rem; } .copyright-rw p { - margin-bottom: 1em; + margin-bottom: 1rem; text-indent: 0; } .dedication-rw p { @@ -116,19 +36,20 @@ p + p { text-indent: 0; } .Dedication-rw { - margin-top: 3em; + margin-top: 3rem; } .leading-line-rw { - height: 1.33em; + height: 1.33rem; } .fp-rw { text-indent: 0; } -h1 { - font-size: 1.5em; - line-height: 1.33em; +h1, +.BAZ_fiche_titre { + font-size: 1.5rem; + line-height: 1.33; text-align: center; - padding-bottom: 0em; + padding-bottom: 0; text-align: center; text-transform: uppercase; font-weight: normal; @@ -136,10 +57,10 @@ h1 { } h2 { text-align: center; - font-size: 1.33em; - line-height: 1.2em; + font-size: 1.33rem; + line-height: 1.2rem; text-align: center; - padding-bottom: 0em; + padding-bottom: 0; text-align: center; text-transform: uppercase; font-weight: normal; @@ -147,32 +68,32 @@ h2 { } .title-author-rw { text-align: center; - font-size: 1.5em; + font-size: 1.5rem; text-indent: 0; } .title-num-rw { text-align: center; - font-size: 1.5em; + font-size: 1.5rem; text-indent: 0; - margin-top: 1em; - margin-bottom: 1em; + margin-top: 1rem; + margin-bottom: 1rem; } .title-sub-rw { text-align: center; - font-size: 1.5em; + font-size: 1.5rem; text-indent: 0; } .imprint-rw { text-align: center; } .extract-verse-rw { - margin-top: 1.33em; - margin-bottom: 1.33em; + margin-top: 1.33rem; + margin-bottom: 1.33rem; padding-left: 20pt; } .extract-rw { - margin-top: 1.33em; - margin-bottom: 1.33em; + margin-top: 1.33rem; + margin-bottom: 1.33rem; padding-left: 20pt; } .extract-verse-rw p { @@ -181,8 +102,8 @@ h2 { margin-left: 20pt; } .epigraph-rw { - margin-top: 1.33em; - margin-bottom: 1.33em; + margin-top: 1.33rem; + margin-bottom: 1.33rem; padding-left: 20pt; padding-right: 20pt; } @@ -190,15 +111,15 @@ h2 { font-size: 75%; } .block-rw { - margin-top: 1em; - margin-bottom: 1em; + margin-top: 1rem; + margin-bottom: 1rem; margin-left: 20pt; margin-right: 20pt; } span.dropcap-rw { float: left; - font-size: 2.7em; - line-height: 0.87em; + font-size: 2.7rem; + line-height: 0.87rem; } .signature-rw { margin-left: 50%; @@ -224,17 +145,17 @@ a { } #toc ol { list-style-type: none; - margin: 0 0 0 2em; + margin: 0 0 0 2rem; padding: 0 0 0 0; } #toc ol ol { list-style-type: none; - margin: 0 0 0 1em; + margin: 0 0 0 1rem; padding: 0 0 0 0; } #toc ol li { - margin: 0 0 0 0; - padding: 0 0 0 0; + margin: 0; + padding: 0; } #toc ol li a { text-decoration: none; @@ -246,14 +167,14 @@ a { } .toc-short ol { list-style-type: none; - margin: 0 0 0 2em; - padding: 0 0 0 0; + margin: 0 0 0 2rem; + padding: 0; } #guide { display: none; } header { - padding: 3em 0 2em 0; + padding: 3rem 0 2rem 0; } header a { text-decoration: none; @@ -270,32 +191,32 @@ img { .title-other-rw { text-align: center; text-indent: 0; - margin-top: 0.5em; + margin-top: 0.5rem; } .dateline-rw { text-align: left; text-indent: 0; - margin-top: 1.33em; - margin-bottom: 1.33em; + margin-top: 1.33rem; + margin-bottom: 1.33rem; } .frontmatter-rw h1 { - font-size: 1.5em; + font-size: 1.5rem; } .backmatter-rw h1 { - font-size: 1.5em; + font-size: 1.5rem; } .direction-rw { text-align: center; text-indent: 0; font-style: italic; - margin: 1em 0 1em 0; + margin: 1rem 0 1rem 0; } .source-rw { - margin-bottom: 0em; + margin-bottom: 0; text-align: right !important; font-variant: small-caps; text-transform: lowercase; - font-size: 1.1em; + font-size: 1.1rem; page-break-before: avoid; } div.block-rw { @@ -313,8 +234,8 @@ div.block-rw { padding-top: 6px; } div.photo { - margin-top: 1em; - padding-top: 2em; + margin-top: 1rem; + padding-top: 2rem; text-align: center; } div.photo p { @@ -325,18 +246,3 @@ div.photo p { .-epub-media-overlay-active { background-color: #abc; } - -h1 { - page-break-before: always; -} - -@media all and (orientation: portrait) { - p { - font-family: serif; - } -} -@media all and (orientation: landscape) { - p { - font-family: sans-serif; - } -} diff --git a/templates/includes/image-cover.twig b/templates/includes/image-cover.twig new file mode 100644 index 0000000..8dae0d0 --- /dev/null +++ b/templates/includes/image-cover.twig @@ -0,0 +1,8 @@ +
+

{{ metadatas.publication.title }}

+ + {{ coverImage }} + +

{{ metadatas.publication.description }}

+

{{ metadatas.publication.authors }}

+
diff --git a/templates/print-layouts/base.twig b/templates/print-layouts/base.twig new file mode 100644 index 0000000..eea1ca4 --- /dev/null +++ b/templates/print-layouts/base.twig @@ -0,0 +1,42 @@ + + + + + + {{ metadatas['publication-title'] | default('Publication') }} • {{ siteTitle }} + {{ styles | raw }} + + {% block css %} + + {% endblock %} + + {% block js %} + + + {% endblock %} + + + + + {% block publication %} + {% if metadatas['publication-cover-page'] == '1' %} + {% include "@publication/includes/image-cover.twig" %} + {% endif %} + + {{ content | raw }} + {% endblock %} + + + diff --git a/templates/print-layouts/book.twig b/templates/print-layouts/book.twig new file mode 100644 index 0000000..a82e7a1 --- /dev/null +++ b/templates/print-layouts/book.twig @@ -0,0 +1 @@ +{% extends "@publication/print-layouts/base.twig" %} diff --git a/templates/print-layouts/fanzine.twig b/templates/print-layouts/fanzine.twig new file mode 100644 index 0000000..2a27ad0 --- /dev/null +++ b/templates/print-layouts/fanzine.twig @@ -0,0 +1,16 @@ +{% extends "@publication/print-layouts/base.twig" %} + +{% block css %}{% endblock %} +{% block js %}{% endblock %} + +{% block publication %} +
+ {% if metadatas['publication-cover-page'] == '1' %} + {% include "@publication/includes/image-cover.twig" %} + {% endif %} + + {{ content | raw }} +
+{% endblock %} + + diff --git a/templates/print-preview.twig b/templates/print-preview.twig deleted file mode 100644 index 37b5705..0000000 --- a/templates/print-preview.twig +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - {{ metadatas['publication-title'] | default('Publication') }} • {{ siteTitle }} - {{ styles | raw }} - - - - - - - - - - {% if metadatas['publication-cover-page'] == '1' %} -
-

{{ metadatas['publication-title'] }}

- - - {{ coverImage }} - -

{{ metadatas['publication-description'] }}

-

{{ metadatas['publication-author'] }}

- -
- {% endif %} - - {{ content | raw }} - - - From 4bddd4e9f1f632acc48854f492a8b04de6a9dac3 Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Mon, 6 Sep 2021 00:19:33 +0200 Subject: [PATCH 05/11] Fix an issue with printing within a Docker container with port 80 --- handlers/page/pdf.php | 11 ++++++----- handlers/page/preview__.php | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/handlers/page/pdf.php b/handlers/page/pdf.php index e419936..80d8719 100644 --- a/handlers/page/pdf.php +++ b/handlers/page/pdf.php @@ -47,7 +47,7 @@ $pageTag = $this->GetPageTag(); $pdfTag = $this->MiniHref('pdf', $pageTag); $sourceUrl = $this->href('preview', $pageTag, preg_replace('#^'. $pdfTag .'&?#', '', $_SERVER['QUERY_STRING']), false); - + $pdfHelper = $this->services->get(PdfHelper::class); $hash = substr(sha1($pagedjs_hash . json_encode(array_merge( @@ -107,14 +107,15 @@ // now generate PDF $page->pdf(array( - 'printBackground' => true, - 'displayHeaderFooter' => true, - 'preferCSSPageSize' => true - ))->saveToFile($fullFilename); + 'printBackground' => true, + 'displayHeaderFooter' => true, + 'preferCSSPageSize' => true + ))->saveToFile($fullFilename); $browser->close(); } catch (Exception $e) { echo $this->Header()."\n"; + echo '
'.$sourceUrl.'
'."\n"; echo '
'.$e->getMessage().'
'."\n"; if (($e instanceof HeadlessChromium\Exception\OperationTimedOut) === false) { diff --git a/handlers/page/preview__.php b/handlers/page/preview__.php index 3835010..864c707 100644 --- a/handlers/page/preview__.php +++ b/handlers/page/preview__.php @@ -2,16 +2,16 @@ if ($this->config['htmltopdf_base_url']) { ['scheme' => $scheme, 'host' => $host, 'port' => $port] = parse_url($this->config['base_url']); - $base_url = $scheme . '://' . $host . (!$port || (string)$port === '80' ? '' : ':'.$port); + $base_url = $scheme . '://' . $host . (!$port || (string)$port === '80' ? '' : ':'.$port) . '/'; ['scheme' => $scheme, 'host' => $host, 'port' => $port] = parse_url($this->config['htmltopdf_base_url']); - $new_base_url = $scheme . '://' . $host . (!$port || (string)$port === '80' ? '' : ':'.$port); + $new_base_url = $scheme . '://' . $host . (!$port || (string)$port === '80' ? '' : ':'.$port) . '/'; $full_request_url = $_SERVER['REQUEST_SCHEME'] . '://'. $_SERVER['HTTP_HOST'] . ((string)$_SERVER['SERVER_PORT'] === '80' ? '' : ':'.$_SERVER['SERVER_PORT']) . $_SERVER['REQUEST_URI']; // Replaces https://example.com/?Accueil by http://localhost:8000/?Accueil // Replaces https://example.com/favicon.ico by http://localhost:8000/favicon.ico - if (strpos($full_request_url, $this->config['htmltopdf_base_url']) === 0) { + if (strpos($full_request_url, $new_base_url) === 0) { $plugin_output_new = str_replace([$this->config['base_url'], $base_url], [$this->config['htmltopdf_base_url'], $new_base_url], $plugin_output_new); } } From ba166c54e87c8cd6aa1fed843f75be55684318d4 Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Mon, 6 Sep 2021 11:59:25 +0200 Subject: [PATCH 06/11] Update translations --- lang/publication_fr.inc.php | 7 ++++++- lang/publication_pt.inc.php | 13 +++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lang/publication_fr.inc.php b/lang/publication_fr.inc.php index 4380059..8547499 100644 --- a/lang/publication_fr.inc.php +++ b/lang/publication_fr.inc.php @@ -45,6 +45,11 @@ 'PUBLICATION_END_PAGE' => 'Page de fin', 'PUBLICATION_EXAMPLE_AUTHOR' => 'Ex: Victor Hugo', 'PUBLICATION_EXPORT_PAGES_INFO' => 'Sélectionnez vos pages pour l\'Ebook en cliquant sur ', + 'PUBLICATION_FANZINE_LAYOUT' => 'Pliage des feuilles', + 'PUBLICATION_FANZINE_LAYOUT_SINGLE_PAGE' => 'Feuille individuelle (recto)', + 'PUBLICATION_FANZINE_LAYOUT_SINGLE_PAGE_HELP' => '8 pages imprimée sur une même feuille.', + 'PUBLICATION_FANZINE_LAYOUT_RECTO_FOLIO' => 'Folio (recto)', + 'PUBLICATION_FANZINE_LAYOUT_RECTO_FOLIO_HELP' => '2 pages par feuille, pliée au centre.', 'PUBLICATION_FILTER_PAGES' => 'Filtrer les pages', 'PUBLICATION_FOR_THE_EBOOK' => 'pour l'Ebook', 'PUBLICATION_FROM_THE_EBOOK' => 'de l'Ebook', @@ -64,7 +69,7 @@ 'PUBLICATION_NO_DESC_FOUND' => 'ERREUR : La description n\'a pas été renseigné.', 'PUBLICATION_NO_EBOOK_FOUND' => 'Pas d\'ebook trouvé.', 'PUBLICATION_NO_IMAGE_FOUND' => 'ERREUR : Le lien vers l\'image de couverture n\'a pas été renseigné.', - 'PUBLICATION_NO_PAGE_FOUND' => '', + 'PUBLICATION_NO_PAGE_FOUND' => 'ERREUR : Sélectionne au moins un contenu pour créer une publication.', 'PUBLICATION_NO_TITLE_FOUND' => 'ERREUR : Le titre n\'a pas été renseigné.', 'PUBLICATION_NOT_IMAGE_FILE' => 'ERREUR : Le lien vers l\'image de couverture n\'est pas une image avec l\'extension .jpg.', 'PUBLICATION_PAGINATION_POSITION' => 'Emplacement de la numérotation des pages', diff --git a/lang/publication_pt.inc.php b/lang/publication_pt.inc.php index c9b0b5d..0948b4e 100644 --- a/lang/publication_pt.inc.php +++ b/lang/publication_pt.inc.php @@ -44,6 +44,11 @@ 'PUBLICATION_END_PAGE' => 'Página final', 'PUBLICATION_EXAMPLE_AUTHOR' => 'Ex: Victor Hugo', 'PUBLICATION_EXPORT_PAGES_INFO' => 'Selecione suas páginas para o Ebook clicando em', +'PUBLICATION_FANZINE_LAYOUT' => 'Dobramento de página', +'PUBLICATION_FANZINE_LAYOUT_SINGLE_PAGE' => 'Folha única (apenas frente)', +'PUBLICATION_FANZINE_LAYOUT_SINGLE_PAGE_HELP' => '8 páginas impressas em uma única folha.', +'PUBLICATION_FANZINE_LAYOUT_RECTO_FOLIO' => 'Fólio (apenas frente)', +'PUBLICATION_FANZINE_LAYOUT_RECTO_FOLIO_HELP' => '2 páginas por folha, dobradas juntas.', 'PUBLICATION_FILTER_PAGES' => 'Filtrar as páginas', 'PUBLICATION_FOR_THE_EBOOK' => 'para o Ebook', 'PUBLICATION_FROM_THE_EBOOK' => 'do Ebook', @@ -59,11 +64,11 @@ 'PUBLICATION_MORE_OPTIONS' => 'Outras opções de personalização', 'PUBLICATION_NEWSLETTER' => 'Newsletter', 'PUBLICATION_NEWSLETTER_CREATED' => 'A newsletter foi criada', -'PUBLICATION_NO_AUTHOR_FOUND' => 'ERRO: O autor não foi preenchido. ', -'PUBLICATION_NO_DESC_FOUND' => 'ERRO: A descrição não foi preenchida. ', +'PUBLICATION_NO_AUTHOR_FOUND' => 'ERRO: O autor não foi preenchido.', +'PUBLICATION_NO_DESC_FOUND' => 'ERRO: A descrição não foi preenchida.', 'PUBLICATION_NO_EBOOK_FOUND' => 'Nenhum e-book encontrado.', -'PUBLICATION_NO_IMAGE_FOUND' => 'ERRO: O link para a imagem da capa não foi preenchido. ', -'PUBLICATION_NO_PAGE_FOUND' => '', +'PUBLICATION_NO_IMAGE_FOUND' => 'ERRO: O link para a imagem da capa não foi preenchido.', +'PUBLICATION_NO_PAGE_FOUND' => 'ERRO : Selecione pelo menos uma página para criar uma publicação.', 'PUBLICATION_NO_TITLE_FOUND' => 'ERRO: O título não foi preenchido. ', 'PUBLICATION_NOT_IMAGE_FILE' => 'ERRO: O link para a imagem da capa não é uma imagem com a extensão .jpg.', 'PUBLICATION_PAGINATION_POSITION' => 'Localização da numeração da página', From 5eb9f1b61fd53c9e4a4dbcafa7c93716e614dddc Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Mon, 6 Sep 2021 11:59:40 +0200 Subject: [PATCH 07/11] Add fanzine layouts icons --- actions/publicationlist.php | 2 + presentation/fanzine-layouts/README.md | 8 + presentation/fanzine-layouts/recto-folio.svg | 81 ++ presentation/fanzine-layouts/scene.excalidraw | 1265 +++++++++++++++++ presentation/fanzine-layouts/single-page.svg | 94 ++ presentation/styles/publication.css | 15 + templates/includes/publication.twig | 1 + templates/publicationgenerator.twig | 9 +- 8 files changed, 1472 insertions(+), 3 deletions(-) create mode 100644 presentation/fanzine-layouts/README.md create mode 100644 presentation/fanzine-layouts/recto-folio.svg create mode 100644 presentation/fanzine-layouts/scene.excalidraw create mode 100644 presentation/fanzine-layouts/single-page.svg diff --git a/actions/publicationlist.php b/actions/publicationlist.php index 4605153..e3294f0 100644 --- a/actions/publicationlist.php +++ b/actions/publicationlist.php @@ -59,6 +59,8 @@ return $page; }, $wiki->LoadAll($sql)); +$this->addCssFile('tools/publication/presentation/styles/publication.css'); + echo $wiki->render('@publication/publicationlist.twig', [ 'hasWriteAccess' => $this->HasAccess('write'), 'hasDeleteAccess' => $this->UserIsAdmin() || $this->UserIsOwner(), diff --git a/presentation/fanzine-layouts/README.md b/presentation/fanzine-layouts/README.md new file mode 100644 index 0000000..2f7513c --- /dev/null +++ b/presentation/fanzine-layouts/README.md @@ -0,0 +1,8 @@ +# Fanzine Layouts Icons + +They are designed with Excalidraw. + +- [Read-only source on Excalidraw][source] ; +- [Scene source](./scene.excalidraw). + +[source]: https://excalidraw.com/#json=5767718061998080,6IjJ8eRA7yHZ6SOafTch9Q diff --git a/presentation/fanzine-layouts/recto-folio.svg b/presentation/fanzine-layouts/recto-folio.svg new file mode 100644 index 0000000..77aa91d --- /dev/null +++ b/presentation/fanzine-layouts/recto-folio.svg @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + 3 + + + 4 + + + + + + + + + + + + + + + + + 1 + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + diff --git a/presentation/fanzine-layouts/scene.excalidraw b/presentation/fanzine-layouts/scene.excalidraw new file mode 100644 index 0000000..b90e7c4 --- /dev/null +++ b/presentation/fanzine-layouts/scene.excalidraw @@ -0,0 +1,1265 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "id": "ce1n8FRlihB8drowQ6oVx", + "type": "rectangle", + "x": 1073.1261495273968, + "y": 92.93287192932671, + "width": 13.103510274295246, + "height": 17.567099217306136, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "YVo66wluomAsRYhP1YtTb", + "1mIFkfI_TRp9sPnOGmS_T" + ], + "strokeSharpness": "sharp", + "seed": 1250119514, + "version": 327, + "versionNonce": 500260102, + "isDeleted": false, + "boundElementIds": null + }, + { + "id": "s1N4vddVIeO2fMLszGiZh", + "type": "line", + "x": 1087.8099717237005, + "y": 96.08070352378303, + "width": 12.587789789604034, + "height": 4.915681553135362, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "YVo66wluomAsRYhP1YtTb", + "1mIFkfI_TRp9sPnOGmS_T" + ], + "strokeSharpness": "round", + "seed": 604436826, + "version": 379, + "versionNonce": 1749245530, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + -2.2509198878154675, + -2.019802317832382 + ], + [ + -4.57692452285098, + -4.306165830918591 + ], + [ + -14.838709677419502, + -6.935483870967744 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "l-ckZeZbuKUL2Puf3SvHC", + "type": "line", + "x": 1073.2693761709213, + "y": 90.06402854725972, + "width": 0.3860048856629419, + "height": 2.183721390321864, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "YVo66wluomAsRYhP1YtTb", + "1mIFkfI_TRp9sPnOGmS_T" + ], + "strokeSharpness": "round", + "seed": 777174554, + "version": 306, + "versionNonce": 921422918, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.3860048856629419, + 2.183721390321864 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "IwABXVbIk9oAil2qJsVs3", + "type": "text", + "x": 1078.4915748167814, + "y": 96.48368502382003, + "width": 4, + "height": 8, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "1mIFkfI_TRp9sPnOGmS_T" + ], + "strokeSharpness": "sharp", + "seed": 1728521542, + "version": 271, + "versionNonce": 1471841050, + "isDeleted": false, + "boundElementIds": [ + "LmCjPCDuoKJ1ajm2nKS1X" + ], + "text": "3", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "V9OEI6OLiZOnk4Ih7x4lY", + "type": "text", + "x": 1077.378671590975, + "y": 82.93529792704584, + "width": 3, + "height": 6, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "1mIFkfI_TRp9sPnOGmS_T" + ], + "strokeSharpness": "sharp", + "seed": 1760655386, + "version": 606, + "versionNonce": 2037797766, + "isDeleted": false, + "boundElementIds": [ + "AH0o4JMdARXR7hRy8bchZ", + "LmCjPCDuoKJ1ajm2nKS1X" + ], + "text": "4", + "fontSize": 4.271067766941762, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "top", + "baseline": 5 + }, + { + "id": "kHIwmEYuhXIFebdsAL-m1", + "type": "rectangle", + "x": 1063.1538461538462, + "y": 46.307692307692314, + "width": 30.769230769230944, + "height": 20.708407871198567, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 15375686, + "version": 129, + "versionNonce": 1047465946, + "isDeleted": false, + "boundElementIds": null + }, + { + "id": "-ucgSPFDoiEEwRhRb4nxK", + "type": "rectangle", + "x": 1109.851520572451, + "y": 52.07513416815743, + "width": 7.978533094812507, + "height": 11.638640429338103, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1141232582, + "version": 319, + "versionNonce": 1873670854, + "isDeleted": false, + "boundElementIds": null + }, + { + "id": "UuTAKwg5venSv5BMAz3l8", + "type": "line", + "x": 1063.1538461538462, + "y": 55.23076923076923, + "width": 29.69230769230785, + "height": 0.6153846153846203, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 30, + "groupIds": [], + "strokeSharpness": "round", + "seed": 2033991878, + "version": 81, + "versionNonce": 544474266, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 29.69230769230785, + 0.6153846153846203 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "PB4y8MaDTU-CmvT7lretW", + "type": "line", + "x": 1070.0554561717352, + "y": 46.69409660107333, + "width": 0, + "height": 19.538461538461533, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 20, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1995577158, + "version": 83, + "versionNonce": 1412409862, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 19.538461538461533 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "ebgqIQAuauCGYeCazoPn4", + "type": "line", + "x": 1077.0322003577817, + "y": 46.92665474060822, + "width": 0, + "height": 19.538461538461533, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 20, + "groupIds": [], + "strokeSharpness": "round", + "seed": 901608026, + "version": 121, + "versionNonce": 125591898, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 19.538461538461533 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "LcikUYfGfCcN2a4fhO1XI", + "type": "line", + "x": 1084.7066189624331, + "y": 46.694096601073355, + "width": 0, + "height": 19.538461538461533, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 20, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1369387910, + "version": 152, + "versionNonce": 100170054, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 0, + 19.538461538461533 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "-Te9lFwocd-jRRaIY27oQ", + "type": "text", + "x": 1064.8756708407873, + "y": 56.315643013317384, + "width": 3.5465116279069893, + "height": 7.8811369509044225, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1129877722, + "version": 100, + "versionNonce": 1870877402, + "isDeleted": false, + "boundElementIds": null, + "text": "6", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 6.8811369509044225 + }, + { + "id": "LFvk9Ey34DFde7ffL-jJc", + "type": "text", + "x": 1071.619856887299, + "y": 56.54820115285227, + "width": 4, + "height": 8, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1730921370, + "version": 140, + "versionNonce": 993222598, + "isDeleted": false, + "boundElementIds": null, + "text": "7", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "T4ts7ndoTp7ORjalwiaq-", + "type": "text", + "x": 1079.2942754919502, + "y": 56.315643013317384, + "width": 4, + "height": 8, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1439143322, + "version": 165, + "versionNonce": 1275586458, + "isDeleted": false, + "boundElementIds": null, + "text": "8", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "8crtZ5kXsWpKju9aHFbJw", + "type": "text", + "x": 1087.2012522361363, + "y": 56.54820115285227, + "width": 4, + "height": 8, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 2086250758, + "version": 193, + "versionNonce": 1182758662, + "isDeleted": false, + "boundElementIds": null, + "text": "1", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "OscrxmAvNGbBHEdsWQba4", + "type": "text", + "x": 1112.038461538462, + "y": 53.245875571456935, + "width": 4, + "height": 8, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1176900998, + "version": 229, + "versionNonce": 2090591322, + "isDeleted": false, + "boundElementIds": null, + "text": "1", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "kr-yvOobCWmvC6iscCp3o", + "type": "text", + "x": 1086.5035778175315, + "y": 47.24587557145692, + "width": 4, + "height": 8, + "angle": 3.141592653589793, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1277318810, + "version": 257, + "versionNonce": 857915462, + "isDeleted": false, + "boundElementIds": [ + "JrEI2HZ7HrGiW4YD3c7NH" + ], + "text": "2", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "aJJuyNOL7HOnnJe4Jq4kG", + "type": "text", + "x": 1078.8291592128805, + "y": 46.780759292387174, + "width": 4, + "height": 8, + "angle": 3.141592653589793, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1053259782, + "version": 274, + "versionNonce": 1736387162, + "isDeleted": false, + "boundElementIds": [ + "JrEI2HZ7HrGiW4YD3c7NH" + ], + "text": "3", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "ySw3dNag63ddREEx0oseB", + "type": "text", + "x": 1071.8524150268338, + "y": 46.78075929238715, + "width": 4, + "height": 8, + "angle": 3.141592653589793, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 227570522, + "version": 255, + "versionNonce": 216395142, + "isDeleted": false, + "boundElementIds": null, + "text": "4", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "Bn7GC38iSz548umK7Pzpv", + "type": "text", + "x": 1065.1082289803223, + "y": 46.78075929238715, + "width": 4, + "height": 8, + "angle": 3.141592653589793, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 677807942, + "version": 300, + "versionNonce": 249435610, + "isDeleted": false, + "boundElementIds": null, + "text": "5", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "E3OoR8IwVr7f0enX_c1-T", + "type": "line", + "x": 1111.7857781753135, + "y": 51.649251910879826, + "width": 4.5, + "height": 1.124999999999993, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 70, + "groupIds": [], + "strokeSharpness": "round", + "seed": 591917190, + "version": 80, + "versionNonce": 1494370970, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.5, + -1.124999999999993 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "Pux2i_hIwziAjB4_G7l_n", + "type": "line", + "x": 1110.1607781753135, + "y": 51.649251910879826, + "width": 4.375, + "height": 2.374999999999993, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 70, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1848153926, + "version": 130, + "versionNonce": 805356550, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 4.375, + -2.374999999999993 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "zOm4UDNA1DYlrpfkbHsuw", + "type": "line", + "x": 1116.5357781753135, + "y": 50.27425191087983, + "width": 0.25, + "height": 1.5, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 70, + "groupIds": [], + "strokeSharpness": "round", + "seed": 451977990, + "version": 71, + "versionNonce": 1617028954, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.25, + 1.5 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "OcjKIJ0KePUdjYQgpbMW1", + "type": "line", + "x": 1114.7857781753135, + "y": 48.89925191087983, + "width": 0.125, + "height": 1.625, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 70, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1996129370, + "version": 59, + "versionNonce": 1016484678, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.125, + 1.625 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "7SRX7zsYZZcxX4Iu3UkGj", + "type": "rectangle", + "x": 1062.3968963209113, + "y": 97.07519313872157, + "width": 13.622954795714552, + "height": 18.26348768533057, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "atgNuwkA5NSu6HJLHLbGu", + "OUBz9yFZCkVZxrbn8gaUK" + ], + "strokeSharpness": "sharp", + "seed": 816925786, + "version": 405, + "versionNonce": 372767366, + "isDeleted": false, + "boundElementIds": [ + "4-L0Mx4WoODXO80McFKrq" + ] + }, + { + "id": "Q1JeLYUbPkrHVqIIes4by", + "type": "line", + "x": 1077.643569407847, + "y": 100.59683255604112, + "width": 13.08679030977872, + "height": 4.50374876680746, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [ + "atgNuwkA5NSu6HJLHLbGu", + "OUBz9yFZCkVZxrbn8gaUK" + ], + "strokeSharpness": "round", + "seed": 1338044890, + "version": 381, + "versionNonce": 88037594, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + -1.7519193676407818, + -2.4317351041602846 + ], + [ + -4.170130620534657, + -4.5265019724428175 + ], + [ + -14.838709677419502, + -6.935483870967744 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "8nfce9AgIexgqA6VpuNQD", + "type": "line", + "x": 1063.0893551719453, + "y": 93.92680152476821, + "width": 0.5689908830338481, + "height": 3.0241437537562774, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [ + "atgNuwkA5NSu6HJLHLbGu", + "OUBz9yFZCkVZxrbn8gaUK" + ], + "strokeSharpness": "round", + "seed": 699408774, + "version": 269, + "versionNonce": 1940044230, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 0.5689908830338481, + 3.0241437537562774 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "kJWsvGd_JP4Fha6iT2RMl", + "type": "text", + "x": 1067.2012522361363, + "y": 101.16110437865873, + "width": 4, + "height": 8, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [ + "OUBz9yFZCkVZxrbn8gaUK" + ], + "strokeSharpness": "sharp", + "seed": 1069087834, + "version": 385, + "versionNonce": 408104346, + "isDeleted": false, + "boundElementIds": [ + "LmCjPCDuoKJ1ajm2nKS1X" + ], + "text": "1", + "fontSize": 6.304909560723536, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 7 + }, + { + "id": "cAdtAgUT0ImHnQNa-PohT", + "type": "text", + "x": 1066.8948006232329, + "y": 86.96755599156197, + "width": 3, + "height": 6, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "groupIds": [ + "OUBz9yFZCkVZxrbn8gaUK" + ], + "strokeSharpness": "sharp", + "seed": 1515842842, + "version": 683, + "versionNonce": 1804495450, + "isDeleted": false, + "boundElementIds": [ + "AH0o4JMdARXR7hRy8bchZ", + "LmCjPCDuoKJ1ajm2nKS1X" + ], + "text": "2", + "fontSize": 4.271067766941762, + "fontFamily": 3, + "textAlign": "center", + "verticalAlign": "top", + "baseline": 5 + }, + { + "id": "JrEI2HZ7HrGiW4YD3c7NH", + "type": "arrow", + "x": 1097.0035201107974, + "y": 57.112961588299186, + "width": 8.54838709677415, + "height": 0.16129032258064058, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1415304666, + "version": 119, + "versionNonce": 2131334022, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 8.54838709677415, + -0.16129032258064058 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "aJJuyNOL7HOnnJe4Jq4kG", + "focus": 1.6438368344918368, + "gap": 14.174360897916813 + }, + "endBinding": { + "elementId": "kr-yvOobCWmvC6iscCp3o", + "focus": -1.4927827158219888, + "gap": 15.048329390039953 + }, + "startArrowhead": "bar", + "endArrowhead": "arrow" + }, + { + "id": "gGqrEkkHlsMha8wJozrY_", + "type": "arrow", + "x": 1091.5196491430554, + "y": 102.27425191087984, + "width": 8.54838709677415, + "height": 0.16129032258064058, + "angle": 0, + "strokeColor": "#364fc7", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1624847046, + "version": 144, + "versionNonce": 1926680838, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 8.54838709677415, + -0.16129032258064058 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": "bar", + "endArrowhead": "arrow" + }, + { + "id": "45vQlR4yYo72KQcZPHyuL", + "type": "rectangle", + "x": 1103.6562377988635, + "y": 95.13998834500951, + "width": 13.787600064411544, + "height": 18.484217833994183, + "angle": 0.043522139915114444, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "1fPdkJnLmX7Hh1gcdAu0Z", + "rBgENgrE06H1Z_d2xPY4u" + ], + "strokeSharpness": "sharp", + "seed": 879801370, + "version": 463, + "versionNonce": 83615558, + "isDeleted": false, + "boundElementIds": [ + "c2k5Ae2g-dA9_t_mFnH3B", + "jt5Ti2xog6kGb7uicBDea" + ] + }, + { + "id": "q_FSdAJiF2QHgkVMnqsGR", + "type": "line", + "x": 1118.8034898829976, + "y": 97.01618149109883, + "width": 12.742545592486067, + "height": 2.1595036245463404, + "angle": 6.2485809459707795, + "strokeColor": "#343a40", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "1fPdkJnLmX7Hh1gcdAu0Z", + "rBgENgrE06H1Z_d2xPY4u" + ], + "strokeSharpness": "round", + "seed": 463487322, + "version": 262, + "versionNonce": 1084825626, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + -2.684214429938064, + -0.5824318593246348 + ], + [ + -2.418744730094658, + -2.741935483870975 + ], + [ + -15.161290322580726, + -1.344609609164518 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "qy5JYOiinfMRupNYMN2Jg", + "type": "line", + "x": 1119.041270057384, + "y": 94.40571547525809, + "width": 13.281684394791274, + "height": 4.462974157395768, + "angle": 6.2485809459707795, + "strokeColor": "#343a40", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "1fPdkJnLmX7Hh1gcdAu0Z", + "rBgENgrE06H1Z_d2xPY4u" + ], + "strokeSharpness": "round", + "seed": 470006342, + "version": 305, + "versionNonce": 1376519814, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + -2.1563076860142134, + 1.7210386735247936 + ], + [ + -1.8796059277894523, + -2.741935483870975 + ], + [ + -15.161290322580726, + 0.1458713238557014 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "jruodBRGnudyzYps2vqaz", + "type": "line", + "x": 1116.42478963455, + "y": 112.46472842774322, + "width": 2.0155367162432554, + "height": 19.579499529220268, + "angle": 6.2485809459707795, + "strokeColor": "#343a40", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 100, + "groupIds": [ + "1fPdkJnLmX7Hh1gcdAu0Z", + "rBgENgrE06H1Z_d2xPY4u" + ], + "strokeSharpness": "round", + "seed": 1109385798, + "version": 200, + "versionNonce": 696388826, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 2.0155367162432554, + -19.579499529220268 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "type": "text", + "version": 441, + "versionNonce": 823477702, + "isDeleted": false, + "id": "p_F9PF4MMQO6zseJ3XmX0", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 0, + "opacity": 90, + "angle": 0, + "x": 1108.551907207571, + "y": 99.98392933023467, + "strokeColor": "#364fc7", + "backgroundColor": "transparent", + "width": 4, + "height": 8, + "seed": 1228249882, + "groupIds": [ + "fv8pUffnzLUyWBuQ0cThD", + "rBgENgrE06H1Z_d2xPY4u" + ], + "strokeSharpness": "sharp", + "boundElementIds": [ + "LmCjPCDuoKJ1ajm2nKS1X", + "jt5Ti2xog6kGb7uicBDea" + ], + "fontSize": 6.304909560723536, + "fontFamily": 3, + "text": "1", + "baseline": 7, + "textAlign": "center", + "verticalAlign": "middle" + } + ], + "appState": { + "gridSize": null, + "viewBackgroundColor": "#ffffff" + } +} \ No newline at end of file diff --git a/presentation/fanzine-layouts/single-page.svg b/presentation/fanzine-layouts/single-page.svg new file mode 100644 index 0000000..72efa5a --- /dev/null +++ b/presentation/fanzine-layouts/single-page.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + 7 + + + 8 + + + 1 + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/presentation/styles/publication.css b/presentation/styles/publication.css index 13299db..c9a798d 100644 --- a/presentation/styles/publication.css +++ b/presentation/styles/publication.css @@ -12,6 +12,10 @@ margin: 0; } +.fanzine-layout.img-icon { + height: 2.5em; +} + .yw-publication__show .img-cover { object-fit: cover; height: 250px; @@ -51,6 +55,17 @@ font-weight: normal; } +.export-table-form .radio.pill { + border: 1px solid currentColor; + border-radius: var(--btn-border-radius); + cursor: pointer; +} +.export-table-form .radio.pill:has(:checked), +.export-table-form .radio.pill:focus-within { + border-color: var(--link-color); + border-width: 3px; +} + .export-table-form .form-group.checkbox .control-label, .export-table-form .form-group.checkbox .control-label + .form-text, .export-table-form .form-row .radio-inline { diff --git a/templates/includes/publication.twig b/templates/includes/publication.twig index 6528c3d..da0f09a 100644 --- a/templates/includes/publication.twig +++ b/templates/includes/publication.twig @@ -18,6 +18,7 @@ {{ _t('PUBLICATION_EBOOK_ORIENTATION_%s' | format(metas['publication-book']['page-orientation']| upper)) }} {% elseif metas['publication-mode'] == 'fanzine' %} {{ _t('PUBLICATION_FANZINE_LAYOUT_%s' | format(metas['publication-fanzine']['layout'] | replace({'-': '_'}) | upper)) }} + {% endif %}

diff --git a/templates/publicationgenerator.twig b/templates/publicationgenerator.twig index a257a15..43dc15e 100644 --- a/templates/publicationgenerator.twig +++ b/templates/publicationgenerator.twig @@ -279,18 +279,21 @@
-