md_to_docx_converter feat frontpage to be also in frontmatter, fix minor...

md_to_docx_converter feat frontpage to be also in frontmatter, fix minor issues in darkmode, fix docx styling

Merge request reports

Loading
+65 −0
Changes for md_to_docx_converter/INPUT/file_order/README.md: 65 added lines, 0 removed lines.
Original line number Diff line number Diff line
# File Orderings

Place JSON files here that define how files contained in the conversion source directory should be ordered.

### Considerations

#### Ensure files defined in the JSON exist in the source directory

Unlike when using the script's default file ordering, a file that is defined in a file ordering provided to the script that is not present in the conversion source directory will cause the script to fail. It is important to make sure that any files defined in a provided JSON are present.

#### Preceding numbers in top-level headings override the script ordering

In the top-level heading of each Markdown file, a leading number (for example, `# 4 Clause Heading) will override the file order defined in the script. It is important to ensure that:
1. No two Markdown source files use the same preceding number in their top-level heading. It is best to make sure the numbers correspond with the file's intended place in the overall hierarchy.
2. Numbering of non-standard clauses and annexes begins with **4**, because **1**, **2**, and **3** are reserved for the predefined clauses *Scope*, *References*, and *Definitions*.

### Example

The following example specifies the ordering of a few example files. An [empty template](../../templates/json/file_order.json) is provided for convenience.

``` json
{
  "clauses": [
    "clause-example1",
    "clause-example3",
    "clause-example2",
    "example4"
  ],
  "annexes": [
    "annex-example1",
    "annex-3",
    "example2"
  ]
}
```

This will ensure that the following file order is produced.

1. **Universal ETSI initial files**
    1. Intellectual Property Rights
    2. Foreword
    3. Modal verbs terminology
    4. Executive summary
    5. Introduction
2. **ETSI universal initial clauses**
    1. Scope
    2. References
    3. Definition of terms, symbols and abbreviations
3. **Clauses defined in the JSON**
    1. *clause-example1.md*
    2. *clause-example3.md*
    3. *clause-example2.md*
    4. *example4.md*
4. **Other clauses**[^1]
5. **Annexes defined in the JSON**
    1. *annex-example1.md*
    2. *annex-3.md*
    3. *example2.md*
6. **Other annexes**[^2]
7. **Universal ETSI final files**
    1. History

[^1]: If any other files exist in the conversion source directory whose filenames follow the format *clause-{text}.md*, they will be added alphabetically after the JSON-defined clauses.

[^2]: Similar to [^1], any files in the source directory that follow the format *annex-{text}.md* will be added alphabetically after the JSON-defined annexes.
 No newline at end of file
+11 −0
Changes for md_to_docx_converter/INPUT/README.md: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
# User Inputs Folder

This folder is used to contain various input files introduced to the script.

## Contents

**file_order**: Intended to contain various file ordering JSONS that follow the [template](../templates/json/file_order.json).

**settings**: Intended to specify the conversion steps to be executed, allowing the user to choose which operations to run or skip. An example of the file can be found in the [template](../templates/json/settings.json) folder.

**html_to_pdf**:  Intended to convert the index.html into a pdf file. Guide lines to write a yaml file for the configuration can be found [here](./html_to_pdf/README.md). An example of the configuration can be found in the [template](../templates/yaml/pdf.config.yaml) folder.
 No newline at end of file
+65 −0
Changes for md_to_docx_converter/assets/md/ETSI_front-page_template.md: 65 added lines, 0 removed lines.
Original line number Diff line number Diff line
::: ZA
[@#document#@]{.ondemand_CHAR_size_32} V@#version#@ [(@#date#@)]{.ondemand_CHAR_size_16}
:::

@#title#@


<img src="media/TS-logo.png" alt="ETSI Logo" />

::: ZB
***@#standard_type#@***
:::

::: TAC
***Reference***

@#reference#@

***Keywords***

@#keywords#@

***ETSI***

650 Route des Lucioles \
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00 Fax: +33 4 93 65 47 16

[Siret N° 348 623 562 00017 - APE 7112B]{.ondemand_CHAR_name_Arial_size_7} \
[Association à but non lucratif enregistrée à la]{.ondemand_CHAR_name_Arial_size_7} \
[Sous-préfecture de Grasse (06) N° w061004871]{.ondemand_CHAR_name_Arial_size_7}

***Important notice***

The present document can be downloaded from the [ETSI Search & Browse Standards](https://www.etsi.org/standards-search) application.

The present document may be made available in electronic versions and/or in print. The content of any electronic and/or print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any existing or perceived difference in contents between such versions and/or in print, the prevailing version of an ETSI deliverable is the one made publicly available in PDF format on [ETSI deliver](http://www.etsi.org/deliver) repository.

Users should be aware that the present document may be revised or have its status changed, this information is available in the [Milestones listing](https://portal.etsi.org/Services/editHelp/Standards-development/Tracking-a-draft/Status-codes).

If you find errors in the present document, please send your comments to the relevant service listed under [Committee Support Staff](https://portal.etsi.org/People/Commitee-Support-Staff).

If you find a security vulnerability in the present document, please report it through our [Coordinated Vulnerability Disclosure (CVD)](https://www.etsi.org/standards/coordinated-vulnerability-disclosure) program.

***Notice of disclaimer & limitation of liability***

The information provided in the present deliverable is directed solely to professionals who have the appropriate degree of experience to understand and interpret its content in accordance with generally accepted engineering or other professional standard and applicable regulations.

No recommendation as to products and services or vendors is made or should be implied.

No representation or warranty is made that this deliverable is technically accurate or sufficient or conforms to any law and/or governmental rule and/or regulation and further, no representation or warranty is made of merchantability or fitness for any particular purpose or against infringement of intellectual property rights.

In no event shall ETSI be held liable for loss of profits or any other incidental or consequential damages.

Any software contained in this deliverable is provided "AS IS" with no warranties, express or implied, including but not limited to, the warranties of merchantability, fitness for a particular purpose and non-infringement of intellectual property rights and ETSI shall not be held liable in any event for any damages whatsoever (including, without limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary loss) arising out of or related to the use of or inability to use the software.

***Copyright Notification***

No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm except as authorized by written permission of ETSI. The content of the PDF version shall not be modified without the written authorization of ETSI. The copyright and the foregoing restriction extend to reproduction in all media.

© ETSI @#copyright-year#@.

All rights reserved.
:::
+109 −21
Changes for md_to_docx_converter/css/customCSS.css: 109 added lines, 21 removed lines.
Original line number Diff line number Diff line
@@ -219,24 +219,29 @@ flex-item:has(#TOC):after {
  min-height: 100vh;
}

#editor:has(.ZT) {
#editor:has(> .ZT),
.front-page-content {
  background-color: white;
}

#editor:has(.ZT) img {
#editor:has(> .ZT) img,
.front-page-content img {
  padding: 0 90px; 
  width: 100%;
}

#editor:has(.ZT) .FL {
#editor:has(> .ZT) .FL,
.front-page-content .FL {
  border: none;
}

#editor:has(.ZT) .TAC strong {
#editor:has(> .ZT) .TAC strong,
.front-page-content .TAC strong {
  color: #02488d;
}

#editor:has(.ZT) p[data-replace="{{KEYWORDS}}"] {
#editor:has(> .ZT) p[data-replace="{{KEYWORDS}}"],
.front-page-content p[data-replace="{{KEYWORDS}}"] {
  max-width: 30em;
  margin: auto;
}
@@ -1428,8 +1433,6 @@ table.no-table-stripes tbody tr {
  background-color: #fff !important;
}


/* Dark Mode Toggle - Manuale e basato su preferenze di sistema */
html.dark-mode table tr,
html.dark-mode body {
  color: white;
@@ -1526,33 +1529,37 @@ html.dark-mode flex-item:has(#TOC):after {
  background-color: #252b2f;
}

html.dark-mode code {
  background: rgba(38, 38, 38, 0.3);
}

html.dark-mode .HTML-Code b,
html.dark-mode .HTML-Code strong {
  color: rgb(191, 227, 255);
}

html.dark-mode #editor:has(.ZT) {
  color: rgb(62, 72, 79);
html.dark-mode #editor:has(> .ZT),
html.dark-mode .front-page-content {
  color: white;
  background-color: #3e484f;
}

html.dark-mode #editor:has(.ZT) a {
  color: rgb(2, 72, 141);
html.dark-mode #editor:has(> .ZT) a,
html.dark-mode .front-page-content a {
  color: rgb(191, 227, 255);
}

html.dark-mode #editor:has(.ZT) a:hover {
  color: #012142;
html.dark-mode #editor:has(> .ZT) a:hover,
html.dark-mode .front-page-content a:hover {
  color: rgb(100, 155, 198);
}

html.dark-mode #editor:has(.ZB) strong {
  color: rgb(62, 72, 79);
html.dark-mode #editor:has(> .ZT) .TAC strong,
html.dark-mode #editor:has(> .ZB) strong,
html.dark-mode .front-page-content .TAC strong,
html.dark-mode .front-page-content .ZB strong {
  color: white;
}

html.dark-mode flex-item:has(.ZT) {
  background-color: white;
html.dark-mode flex-item:has(#editor > .ZT),
html.dark-mode .front-page-content {
  background-color: #3e484f;
}

/* Default styles provided by pandoc.
@@ -2530,3 +2537,84 @@ html.dark-mode .dark-mode-toggle-btn:hover {
  -webkit-appearance: none;
  margin: 0;
}

/* Diff visualizer dark mode */
html.dark-mode .diff-visualizer-panel {
  color: #e6edf3;
  background-color: #252b2f;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

html.dark-mode .diff-visualizer-header {
  background-color: #2c343a;
  border-bottom-color: #52606b;
}

html.dark-mode .diff-visualizer-header h2,
html.dark-mode .diff-visualizer-section h3 {
  color: #bfe3ff;
}

html.dark-mode .diff-close-btn {
  color: #c8d1d9;
}

html.dark-mode .diff-close-btn:hover {
  color: #fff;
  background-color: #46515a;
}

html.dark-mode .diff-visualizer-section {
  border-bottom-color: #46515a;
}

html.dark-mode .diff-nav-btn,
html.dark-mode .diff-mode-btn {
  color: #e6edf3;
  background-color: #333d44;
  border-color: #5d6b76;
}

html.dark-mode .diff-nav-btn:hover,
html.dark-mode .diff-mode-btn:hover {
  color: #fff;
  background-color: #46515a;
  border-color: #86bce6;
}

html.dark-mode .diff-nav-btn:active {
  background-color: #52606b;
}

html.dark-mode .diff-mode-btn.active {
  color: #fff;
  background-color: #0b5a99;
  border-color: #86bce6;
}

html.dark-mode .diff-change-counter {
  color: #bfe3ff;
  background-color: #1f2529;
  border-color: #52606b;
}

html.dark-mode .diff-change-input {
  color: #e6edf3;
  background-color: #1f2529;
  border-color: #6b7a86;
  color-scheme: dark;
}

html.dark-mode .diff-separator,
html.dark-mode div.diff-highlight-toggle label,
html.dark-mode .diff-visualizer-stats p {
  color: #d8e0e7;
}

html.dark-mode .diff-visualizer-stats strong {
  color: #bfe3ff;
}

html.dark-mode .diff-highlight-toggle input[type="checkbox"] {
  accent-color: #4f90bd;
}
+111917 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading
Loading