From f4831733dfd5ed593bbc02c78c464eb4d68f3a3f Mon Sep 17 00:00:00 2001 From: Delvin Date: Tue, 29 Oct 2024 15:48:50 +0200 Subject: [PATCH] Reuse styles for markdown files --- _layouts/default.html | 5 +++ docs/about.md | 77 ---------------------------------- docs/contribute.md | 4 +- docs/skripte/classes/c_info.md | 77 ---------------------------------- markdown.css | 72 +++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 156 deletions(-) create mode 100644 markdown.css diff --git a/_layouts/default.html b/_layouts/default.html index 8de253d..da2dbc5 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -5,6 +5,11 @@ {{site.title}} | {{page.title}} + + {% if page.name contains ".md" %} + + {% endif %} + diff --git a/docs/about.md b/docs/about.md index 0417a0b..040c8db 100644 --- a/docs/about.md +++ b/docs/about.md @@ -1,82 +1,5 @@ # About the Gothic MDK - - - * Flosha * 21.10.2024 {: .doc-info } diff --git a/docs/contribute.md b/docs/contribute.md index ff07825..6b75204 100644 --- a/docs/contribute.md +++ b/docs/contribute.md @@ -1,4 +1,4 @@ -## How to contribute +# How to contribute * Flosha * 21.10.2024 @@ -30,7 +30,7 @@ Then ``git push``. Take care to perform ``git pull`` beforehand in order to avoi If this seems to complicated to you, don't worry. You also can contribute something via GitHub's webinterface. Just write a markdown document on your computer in any random text editor of your choice, then create a new file in the web interface (click on the ``+``, then choose ``add file``). Safe it with the extension ``.md``. -### How to write a document in Markdown +## How to write a document in Markdown You can take this document here as an example. Just take a [look at it in the repository](https://github.com/PhoenixTales/mdk.gothicarchive.org/blob/main/docs/contribute.md). diff --git a/docs/skripte/classes/c_info.md b/docs/skripte/classes/c_info.md index f4af586..062bf87 100644 --- a/docs/skripte/classes/c_info.md +++ b/docs/skripte/classes/c_info.md @@ -1,82 +1,5 @@ # C_INFO Daedalus class - - - * Auronen * 02.08.2022 {: .doc-info } diff --git a/markdown.css b/markdown.css new file mode 100644 index 0000000..e50e397 --- /dev/null +++ b/markdown.css @@ -0,0 +1,72 @@ +.article h1, .article h2, .article h3, .article h4, .article h5 { + font-size: inherit; + } + + .article h1 { + color: #9a5050; /* red colour for the main heading */ + background-color: #262422; /* header bg colour */ + text-align: center; + border-bottom: 1px solid #808080; + padding: 5px; + margin: -7px -7px; /* needed to overcome the article padding */ + } + + .article h2 { + } + + /* Author + Date/Version Section */ + + .doc-info { + background-color: #262422; /* header bg colour */ + font-weight: bold; + display: flex; + justify-content: space-between; + padding: 0; + margin: 7px -7px 0; + border-bottom: 1px solid #808080; + } + .doc-info li { + padding: 3px 7px; + display: flex; + flex-wrap: wrap; /* necessary for very narrow screens */ + } + /* needed for the seperating border */ + .doc-info li:nth-child(1) { + width: 50%; + border-right: 1px solid; + } + /* first child */ + .doc-info li:nth-child(1)::before { + content: "Author:"; + padding-right: 3px; + } + /* second child */ + .doc-info li:nth-child(2)::before { + content: "Version:"; + padding-right: 3px; + } + + + /* ARTICLE SECTION */ + + .article { + background-color: #0f0f0f; + padding: 7px; + border: 1px solid #808080; + margin-top: 20px; + } + + /* Needed for markdown styling in order to have seperate boxes divided into h2 sections */ + .article h2::before { + display: block; + height: 20px; + width: calc(100% + 16px); + background-color: black; + content: ''; + position: relative; + left: -8px; + border: 1px solid #808080; + border-left: black; + border-right: black; + margin-bottom: 10px; + } \ No newline at end of file