Skip to content

Commit

Permalink
Merge branch 'docs-design' into 'main'
Browse files Browse the repository at this point in the history
Docs design

See merge request reportcreator/reportcreator!392
  • Loading branch information
MWedl committed Jan 8, 2024
2 parents 70d8e43 + 42a3da4 commit 2403d1f
Show file tree
Hide file tree
Showing 122 changed files with 923 additions and 1,543 deletions.
538 changes: 538 additions & 0 deletions docs/docs/assets/dino/eating_cake.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-100.eot
Binary file not shown.
332 changes: 0 additions & 332 deletions docs/docs/assets/fonts/exo/exo-v20-latin-100.svg

This file was deleted.

Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-100.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-100.woff
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-100.woff2
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-200.eot
Binary file not shown.
Empty file.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-200.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-200.woff
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-200.woff2
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-300.eot
Binary file not shown.
331 changes: 0 additions & 331 deletions docs/docs/assets/fonts/exo/exo-v20-latin-300.svg

This file was deleted.

Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-300.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-300.woff
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-300.woff2
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-500.eot
Binary file not shown.
332 changes: 0 additions & 332 deletions docs/docs/assets/fonts/exo/exo-v20-latin-500.svg

This file was deleted.

Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-500.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-500.woff
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-500.woff2
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-600.eot
Binary file not shown.
Empty file.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-600.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-600.woff
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-600.woff2
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-700.eot
Binary file not shown.
Empty file.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-700.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-700.woff
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-700.woff2
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-800.eot
Binary file not shown.
Empty file.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-800.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-800.woff
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-800.woff2
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-900.eot
Binary file not shown.
Empty file.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-900.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-900.woff
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-900.woff2
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-italic.eot
Binary file not shown.
Empty file.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-italic.ttf
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-italic.woff
Binary file not shown.
Binary file not shown.
Binary file removed docs/docs/assets/fonts/exo/exo-v20-latin-regular.eot
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/docs/designer/charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ We provide following plugins:

Plugins are disabled by default. You can enable them using the `plugins` option in the `config` object of charts.

```html
```html
<chart :config="{
plugins: [ chartjsPlugins.DataLabels ]
}" />
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/designer/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The structure of this data depends on your defined report and finding fields, i.

You can view the current data structure by dumping it in the PDF.

```html linenums="1"
```html
<h1>All available data</h1>
<pre>{{ data }}</pre>

Expand Down
12 changes: 6 additions & 6 deletions docs/docs/designer/design-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you want to customize the styles (like fonts, code blocks, etc.), have a look


## Headings
```css linenums="1"
```css
/* Avoid page breaks in headlines */
h1, h2, h3, h4, h5, h6 {
break-inside: avoid;
Expand All @@ -27,7 +27,7 @@ h1, h2, h3, h4, h5, h6 {
* `.code-block`: code block rendered from markdown
* `.code-inline`: inline code rendered from markdown

```css linenums="1"
```css
pre code {
display: block !important;
border: 1px solid black;
Expand All @@ -44,14 +44,14 @@ pre {
```

## Prevent page overflow of long texts
```css linenums="1"
```css
html {
overflow-wrap: break-word;
}
```

## Justified texts
```css linenums="1"
```css
p {
text-align: justify;
text-align-last: start;
Expand All @@ -60,7 +60,7 @@ p {

## Lists
Style list marker separately with `::marker`
```css linenums="1"
```css
li::marker {
color: red;
}
Expand All @@ -73,7 +73,7 @@ Following example uses two fonts for the document:
`Roboto` for regular text (set for the whole `html` document) and
the monospace font `Source Code Pro` for `code` blocks.

```css linenums="1"
```css
html {
font-family: "Noto Sans", sans-serif;
font-size: 10pt;
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/designer/figures.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ This allows to add captions with `<figcaption>` tags.
It is recommended that you also use `<figure>` tags when placing images in your HTML template in text.
Except for logos in headers or background images on the title page.

```html linenums="1"
```html
<figure>
<img src="...">
<figcaption>Caption</figcaption>
</figure>
```

### Image width
```md linenums="1"
```md
![Image with half the page width](img.png){width="50%"}
![Exactly sized image](img.png){width="10cm" height="7cm"}
```
Expand All @@ -26,7 +26,7 @@ TODO: support inline images; maybe find/implement a markdown-only without the re
-->

## Basic styling
```css linenums="1"
```css
/* Image styling */
/* Prevent images from overflowing figure or page width */
img {
Expand All @@ -46,7 +46,7 @@ figcaption {


## Figure numbering
```css linenums="1"
```css
html {
counter-reset: figure-counter;
}
Expand All @@ -65,7 +65,7 @@ Works similar like table of contents.
The component uses multi-pass rendering.
In the first render-pass it does nothing, in the second pass it collects all previously rendered `<figcaption>` tags and provides them in the variable `items`.

```html linenums="1"
```html
<list-of-figures id="lof" v-slot="items" >
<section v-if="items.length > 0">
<h1 class="in-toc">List of Figures</h1>
Expand All @@ -80,7 +80,7 @@ In the first render-pass it does nothing, in the second pass it collects all pre
```

### Referencing figure numbers
```css linenums="1"
```css
#lof li {
list-style: none;
margin: 0;
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/designer/footnotes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Footnotes

## Markdown
```md linenums="1"
```md
Text text^[I'm a footnote [link](https://example.com)] text.
```

Expand All @@ -15,11 +15,11 @@ Footnotes use the built-in CSS counter `footnote`. It is incremented automatical
* Styling the footnote number in the footnote box at the bottom of the page: `::footnote-marker { ... }`
* Styling footnote text content (shown at the bottom of the page): same selector (and child elements) where you applied `float: footnote` (e.g. `footnote` element)

```html linenums="1"
```html
This is a text with footnotes<footnote>I'm the footnote content</footnote> in it.
```

```css linenums="1"
```css
/* Footnotes */
@page {
@footnote {
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/designer/headings-and-table-of-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you want to customize heading numberings or table of content (like margins, e
CSS has counters to automatically number items such as headings, figures, etc. and also generate table of contents and list of figures with these numbers.

This allows you to automatically produce a structure similar to
```md linenums="1"
```md
1 Heading
1.1 Subheading
1.2 Subheading
Expand Down Expand Up @@ -57,7 +57,7 @@ Note that this `h2::before` rule is defined only once and applies to all `<h2>`
### Basic Heading Numbering
Add numbering to heading tags which have the class `numbered`.

```css linenums="1"
```css
html {
/* Define counters and reset them */
counter-reset: h1-counter h2-counter h3-counter;
Expand Down Expand Up @@ -99,7 +99,7 @@ E.g. with A, A.1, A.2, B, B.1, etc. instead contiuned numbering 4, 4.1, 4.2, 5,

CSS counters can specify a counter style to use such as `upper-alpha` instead of decimal numbers.

```css linenums="1"
```css
html {
/* NOTE: only one html {} block with counter-reset rules should exist; if there exist multiple, they overwrite each other */
counter-reset: h1-counter h2-counter h3-counter h1-appendix-counter;
Expand Down
14 changes: 7 additions & 7 deletions docs/docs/designer/page-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Set the page margin such that all regular content fits in the page and there is enough space on the page borders for headers and footers.
Page headers and footers should be inside the margin box to not overlap with text content.

```css linenums="1"
```css
@page {
size: A4 portrait;
margin: 35mm 20mm 25mm 20mm;
Expand All @@ -20,7 +20,7 @@ See:
* https://printcss.net/articles/running-headers-and-footers { target=_blank }
* https://www.w3.org/TR/css-gcpm-3/#running-syntax { target=_blank }

```css linenums="1"
```css
@page {
@top-right {
content: element(header-right);
Expand All @@ -34,7 +34,7 @@ See:
}
```

```html linenums="1"
```html
<div id="header">
Text or
<img src="logo.png" alt="logo">
Expand All @@ -45,7 +45,7 @@ See:
Headers and footers are also rendered on the title page by default.
To hide them, override `content` containing the `element(header)` on the first page.

```css linenums="1"
```css
@page :first {
@top-right {
content: "";
Expand All @@ -57,7 +57,7 @@ To hide them, override `content` containing the `element(header)` on the first p

## Page numbers
The page number is a built-in CSS counter that can be used in `content`.
```css linenums="1"
```css
/* Add page number at the bottom right corner of pages */
@page {
@bottom-right-corner {
Expand All @@ -82,7 +82,7 @@ The page counter then has to be used in a pseudo element such as `::before` or `
The easiest way to add a pagebreak is to include a `<pagebreak />` component in the HTML template.

In CSS page breaks can be controlled with
```css linenums="1"
```css
.selector {
break-before: always;
break-inside: avoid;
Expand All @@ -100,7 +100,7 @@ It is best to place element at specific offsets using `position: absolute` in co

You may also want to disable headers and footers on the title page (described above).

```css linenums="1"
```css
#page-cover {
/* Use the full page; overlay page margin box */
margin: -35mm -20mm 26mm -20mm;
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/designer/tables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tables
## Basic Table Styling
```css linenums="1"
```css
table {
width: 100%;
caption-side: bottom;
Expand Down Expand Up @@ -38,7 +38,7 @@ See: https://www.w3.org/WAI/tutorials/tables/irregular/
### Vertial Text in Row headers
Rotate text with `transform`.

```html linenums="1"
```html
<table>
<caption>Complex table with vertical text spanning multiple rows</caption>
<tr>
Expand All @@ -51,7 +51,7 @@ Rotate text with `transform`.
</table>
```

```css linenums="1"
```css
.rowheader-vertical {
width: 2em;
}
Expand All @@ -69,7 +69,7 @@ Rotate text with `transform`.


## Table numbering
```css linenums="1"
```css
html {
counter-reset: table-counter;
}
Expand All @@ -86,7 +86,7 @@ Works similar like table of contents.
The component uses multi-pass rendering.
In the first render-pass it does nothing, in the second pass it collects all previously rendered `<caption>` tags and provides them in the variable `items`.

```html linenums="1"
```html
<list-of-tables v-slot="items">
<section v-if="items.length > 0">
<h1 class="in-toc">List of Tables</h1>
Expand All @@ -103,7 +103,7 @@ In the first render-pass it does nothing, in the second pass it collects all pre
```

### Referencing figure numbers
```css linenums="1"
```css
.lot {
padding-left: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/htb-reporting-with-sysreptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Our free cloud service to write your Hack The Box CPTS, CBBH, and CDSA reports.
1. [Install](/setup/installation/){ target="_blank" } SysReptor
2. Import all HTB Designs:

```shell linenums="1"
```shell
cd sysreptor/deploy
url="https://docs.sysreptor.com/assets/htb-designs.tar.gz"
curl -s "$url" | docker compose exec --no-TTY app python3 manage.py importdemodata --type=design
Expand Down
Binary file removed docs/docs/images/Logo-only.png
Binary file not shown.
73 changes: 0 additions & 73 deletions docs/docs/images/logo-invert.svg

This file was deleted.

19 changes: 5 additions & 14 deletions docs/docs/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/docs/images/syslifters-logo.png
Binary file not shown.
Loading

0 comments on commit 2403d1f

Please sign in to comment.