diff --git a/README.md b/README.md index 3c3115ea96191e8a7bbfe70b638d0b2da0c61479..a4ca085905a57c7d77c3a6515385d0fb7e840e37 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,48 @@ contamination by system themes. Switch your browser to English. For highlighting the important part of the screenshot (if you need to, most of the time not necessary) use rectangular shape and 3-pixel red line `rgb(255, 0, 0)` +### Metadata + +The metadata must be the first thing in the file and must take the form of a +valid YAML set between triple-dashed lines. Here is a basic example: +``` +--- +board: mox +competency: expert +--- +``` +Between these triple-dashed lines, use predefined variables (see below for a +reference). + +### Turris boards + +In case you want to specify Turris device(s) in the article, use one or multiple +options provided below. + +- shield +- mox +- omnia +- 1.x + +``` +--- +board: shield, mox, omnia, 1.x +--- +``` +### Competency level + +In case you want to specify competency level choose one of the levels below. + +- novice +- intermediate +- advanced +- expert + +``` +--- +competency: expert +--- +``` ### Formating diff --git a/docs/index.md b/docs/index.md index 0c45d288639aedc5fe7a934900d2c8cca54a9c92..0efbe0a6cee9579490cbc07a2a71fa0b0f7b6574 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,21 +1,22 @@ -!!! warning +# What is Turris project? + +Turris project encompasses both software and hardware development efforts aiming +to provide open and secure routers. Devices that can be truly yours and you can +trust in. + +!!! important This documentation applies primarily to Turris OS version 4.0 and newer. You might still be running Turris OS 3 and in that case you can find old official documentation [on community wiki](https://wiki.turris.cz/doc/en/howto/start). More info about Turris OS versions can also be found [here](basics/tos_versions.md). -# What is Turris project? - -Turris project encompasses both software and hardware development efforts -aiming to provide open and secure routers. Devices that can be truly yours and -you can trust in. - ## Openness Our devices come with open source firmware. You can check what is running on -your router line-by-line, see what we changed or you can even contribute yourself. All -sources are available on our [GitLab](https://gitlab.nic.cz/turris). You get full root account on your device +your router line-by-line, see what we changed or you can even contribute +yourself. All sources are available on our +[GitLab](https://gitlab.nic.cz/turris). You get full root account on your device and you can do whatever you want with it. We are not locking you out. Apart from software, you'll get full schematics for your device so you can check @@ -27,19 +28,19 @@ We consider security as one of our main focus areas. ### Safe defaults -First step in security is setting up your unique password. Therefore we don't enable -internet connection unless user sets a password. We don't provide any +The first step in security is setting up your unique password. Therefore we don't +enable internet connection unless a user sets a password. We don't provide any defaults and you have to come with your own. We also encourage protecting your -Wi-Fi with a password and we provide you with an easy way to create separate network -for devices you don't trust. Last but not least, our devices come with DNSSEC -validation enabled by default. +Wi-Fi with a password and we provide you with an easy way to create separate +network for devices you don't trust. Last but not least, our devices come with +DNSSEC validation enabled by default. ### Updates No software is ever perfect. To keep up with a new security standards and to fix -existing bugs and vulnerabilities, you need your router up to date all the -time. We provide updates for all our devices to fix discovered issues but also -to provide new features. Those updates can be even installed automatically. +existing bugs and vulnerabilities, you need your router up to date all the time. +We provide updates for all our devices to fix discovered issues but also to +provide new features. Those updates can be even installed automatically. ### Data collection diff --git a/docs/theme/main.html b/docs/theme/main.html new file mode 100644 index 0000000000000000000000000000000000000000..35c3d93702f0f399c0bc70442efde265959b8583 --- /dev/null +++ b/docs/theme/main.html @@ -0,0 +1,49 @@ +{% extends "base.html" %} + + +{% block content %} + + +{% if page.edit_url %} + + {% include ".icons/material/pencil.svg" %} + +{% endif %} + + +{% if page and page.meta %} +
+ {% if page.meta.board %} + {% include "partials/board.html" %} + {% endif %} + {% if page.meta.competency %} + {% include "partials/competency.html" %} + {% endif %} +
+{% endif %} + +{% if not "\x3ch1" in page.content %} +

{{ page.title | default(config.site_name, true)}}

+{% endif %} + + +{{ page.content }} + + +{% if page and page.meta %} +{% if page.meta.git_revision_date_localized or page.meta.revision_date %} +{% include "partials/source-date.html" %} +{% endif %} +{% endif %} +{% endblock %} + + +{% block disqus %} +{% include "partials/integrations/disqus.html" %} +{% endblock %} + + \ No newline at end of file diff --git a/docs/theme/partials/board.html b/docs/theme/partials/board.html new file mode 100644 index 0000000000000000000000000000000000000000..03922b0335dbc69aa521aa3dd48a6007e4679f30 --- /dev/null +++ b/docs/theme/partials/board.html @@ -0,0 +1,17 @@ + +{% if "shield" in page.meta.board %} +Shield +{% endif %} +{% if "mox" in page.meta.board %} +Mox +{% endif %} +{% if "omnia" in page.meta.board %} +Omnia +{% endif %} +{% if "1.x" in page.meta.board %} +1.x +{% endif %} \ No newline at end of file diff --git a/docs/theme/partials/competency.html b/docs/theme/partials/competency.html new file mode 100644 index 0000000000000000000000000000000000000000..6bb546cc0a18d747c4bd03b7c26862b1bd944cca --- /dev/null +++ b/docs/theme/partials/competency.html @@ -0,0 +1,13 @@ + +{% if "novice" in page.meta.competency %} +Novice +{% endif %} +{% if "intermediate" in page.meta.competency %} +Intermediate +{% endif %} +{% if "advanced" in page.meta.competency %} +Advanced +{% endif %} +{% if "expert" in page.meta.competency %} +Expert +{% endif %} \ No newline at end of file diff --git a/docs/theme/turris.css b/docs/theme/turris.css index 00fb461c1eb0707734e910275fd7373a078185e1..6e55ba36433bbdb84c252fbe11eb281f1bc48c99 100644 --- a/docs/theme/turris.css +++ b/docs/theme/turris.css @@ -1,18 +1,114 @@ /* Set turris colors */ :root { - --md-primary-fg-color: rgb(38, 38, 38); - --md-accent-fg-color: rgb(00, 123, 255); + --md-primary-fg-color: rgb(38, 38, 38); + --md-accent-fg-color: rgb(00, 123, 255); } /* Make links in articles always visible */ .md-typeset a { - color: rgb(00, 00, 255); + color: rgb(00, 00, 255); } /* Add border to images to make them stand out */ .md-typeset img { - border: solid; - border-width: 1px; - border-color: lightgrey; + border: solid; + border-width: 1px; + border-color: lightgrey; } +.metadata a.badge { + color: #fff; +} + +.metadata span.badge { + cursor: help; +} + +.badge { + display: inline-block; + padding: .25em .4em; + font-size: 70%; + font-weight: 700; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: middle; + border-radius: .25rem; + cursor: pointer; +} + +/* Labels: Devices */ +.badge-shield { + color: #fff; + background-color: #438bca; +} + +.badge-shield:hover { + background-color: #2D6A9F; +} + +.badge-mox { + color: #fff; + background-color: #343a40; +} + +.badge-mox:hover { + background-color: #1d2124; +} + +.badge-omnia { + color: #fff; + background-color: #00a2e2; +} + +.badge-omnia:hover { + background-color: #0075A3; +} + +.badge-turris { + color: #fff; + background-color: #ce1126; +} + +.badge-turris:hover { + color: #fff; + background-color: #970C1C; +} + +/* Labels: Competency levels */ +.badge-novice { + color: #fff; + background-color: #54b445; +} + +.badge-novice:hover { + background-color: #449438; +} + +.badge-intermediate { + color: #fff; + background-color: #efd000; +} + +.badge-intermediate:hover { + background-color: #B89F00; +} + +.badge-advanced { + color: #fff; + background-color: #f89217; +} + +.badge-advanced:hover { + background-color: #DA7B07; +} + +.badge-expert { + color: #fff; + background-color: #e64f3b; +} + +.badge-expert:hover { + color: #fff; + background-color: #D9321C; +} diff --git a/mkdocs.yml b/mkdocs.yml index da225e4af69a798f1816063ccad83c77678b4d3a..d91b81cfc5a2643e8c9d6726fb38144a2ca4f7cd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,6 +6,7 @@ copyright: CC-BY-SA-4.0 theme: name: 'material' + custom_dir: docs/theme logo: '/theme/turris-logo.svg' favicon: '/theme/favicon.ico' font: false @@ -21,6 +22,7 @@ extra_css: markdown_extensions: + - meta - markdown_include.include: base_path: docs - admonition