Skip to content

Commit

Permalink
Reuse styles for markdown files
Browse files Browse the repository at this point in the history
  • Loading branch information
Delvin committed Oct 29, 2024
1 parent 432a199 commit f483173
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 156 deletions.
5 changes: 5 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{site.title}} | {{page.title}}</title>
<link rel=stylesheet type="text/css" href="/style.css">

{% if page.name contains ".md" %}
<link rel=stylesheet type="text/css" href="/markdown.css">
{% endif %}

<link rel="icon" type="image/x-icon" href="/_img/gmdk.ico" />
</head>

Expand Down
77 changes: 0 additions & 77 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,5 @@
# About the Gothic MDK

<style>

.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;
}
</style>


* Flosha
* 21.10.2024
{: .doc-info }
Expand Down
4 changes: 2 additions & 2 deletions docs/contribute.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## How to contribute
# How to contribute

* Flosha
* 21.10.2024
Expand Down Expand Up @@ -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).

Expand Down
77 changes: 0 additions & 77 deletions docs/skripte/classes/c_info.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,5 @@
# C_INFO Daedalus class

<style>

.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;
}
</style>


* Auronen <!-- Author -->
* 02.08.2022 <!-- Date -->
{: .doc-info }
Expand Down
72 changes: 72 additions & 0 deletions markdown.css
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit f483173

Please sign in to comment.