-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
615 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
__pycache__/ | ||
generated/ | ||
build/ | ||
src/Markdown_SPA.egg-info/ | ||
generated/ | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 MrSpaar | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build and Deploy 🚀 | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🔔 | ||
uses: actions/checkout@v3 | ||
- name: Setup Python 🐍 | ||
uses: actions/setup-python@v4.7.1 | ||
with: | ||
python-version: 3.12 | ||
- name: Install dependencies 🧰 | ||
run: python -m pip install ".[sass]" | ||
- name: Generate HTML 📚 | ||
run: python -m markdown_spa build | ||
env: | ||
REPO: ${{ github.repository }} | ||
- name: Setup Pages ⚙️ | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact 📤 | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: './doc/generated' | ||
- name: Deploy to GitHub Pages 🌍 | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
html { | ||
--alternative-background-color: #f5f1f1; | ||
|
||
font-size: 1.05em; | ||
font-family: sans-serif; | ||
} | ||
|
||
ul:has(input) { | ||
padding-left: 20px; | ||
} | ||
|
||
ul:has(input) li { | ||
list-style-type: none; | ||
} | ||
|
||
img { | ||
display: block; | ||
height: auto; | ||
max-width: 100%; | ||
margin-top: 10px; | ||
border-radius: 3px; | ||
margin: 10px auto; | ||
} | ||
|
||
table:not(.codehilitetable) { | ||
width: 100%; | ||
border-collapse: collapse; | ||
} | ||
|
||
table:not(.codehilitetable) tr { | ||
--table-border-color: #ddd; | ||
border: 1px solid var(--table-border-color); | ||
} | ||
|
||
table:not(.codehilitetable) tr:nth-child(even) { | ||
background: var(--alternative-background-color); | ||
} | ||
|
||
table:not(.codehilitetable) td, table:not(.codehilitetable) th { | ||
padding: 10px; | ||
text-align: left; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
html { | ||
--alternative-background-color: #333232; | ||
|
||
color: white; | ||
background-color: #1d1e22; | ||
} | ||
|
||
table:not(.codehilitetable) tr { | ||
--table-border-color: #444; | ||
} | ||
|
||
a { color: #03a9f4; } | ||
a:visited { color: #87ceeb; } | ||
} | ||
|
||
#error { | ||
opacity: 0; | ||
transition: opacity 0.3s ease-in-out; | ||
|
||
z-index: 1; | ||
top: 20px; | ||
right: 20px; | ||
width: 144px; | ||
position: absolute; | ||
text-align: center; | ||
font-family: Inconsolata, monospace; | ||
background-color: var(--alternative-background-color); | ||
padding: 10px; | ||
border-radius: 3px; | ||
} | ||
|
||
#error.active { | ||
opacity: 1; | ||
} | ||
|
||
@media (max-width: 700px) { | ||
#error { | ||
top: 3px; | ||
right: 50px; | ||
width: auto; | ||
} | ||
} | ||
|
||
@media (max-width: 400px) { | ||
table:not(.codehilitetable) { | ||
display: block; | ||
overflow-x: scroll; | ||
} | ||
} | ||
|
||
code { | ||
padding: 2px 3px; | ||
border-radius: 3px; | ||
font-family: monospace; | ||
background-color: var(--alternative-background-color) | ||
} | ||
|
||
.codehilite { | ||
--header-color: #f14343; | ||
--string-color: #d3671a; | ||
--comment-color: #817676; | ||
--variable-color: #06728d; | ||
--keyword-color: #156579; | ||
--keyword-type-color: #9b9430; | ||
--name-attr-color: #0c728b; | ||
--bash-cmd-color: #0866aa; | ||
--highlight-color: #ffffcc; | ||
--string-color: #bb7d51; | ||
|
||
border-radius: 3px; | ||
background-color: var(--alternative-background-color); | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
.codehilite { | ||
--header-color: #ff834a; | ||
--string-color: #EAB289; | ||
--comment-color: #87ceeb; | ||
--variable-color: #98fb98; | ||
--keyword-color: #f0e68c; | ||
--keyword-type-color: #bdb76b; | ||
--name-attr-color: #8CF0E8; | ||
--bash-cmd-color: #99D4FF; | ||
--highlight-color: #44475a; | ||
} | ||
} | ||
|
||
.codehilite code { | ||
padding: 0; | ||
border-radius: 0; | ||
} | ||
|
||
.codehilite pre { | ||
overflow: auto; | ||
padding: 10px; | ||
line-height: 120%; | ||
} | ||
|
||
.codehilitetable pre { | ||
margin: 0; | ||
} | ||
|
||
.codehilite .hll { background-color: var(--highlight-color) } | ||
.codehilite .c { color: var(--comment-color)} /* Comment */ | ||
.codehilite .err { color: var(--content-color)} /* Error */ | ||
.codehilite .g { color: var(--content-color)} /* Generic */ | ||
.codehilite .k { color: var(--keyword-color)} /* Keyword */ | ||
.codehilite .l { color: var(--content-color)} /* Literal */ | ||
.codehilite .n { color: var(--content-color)} /* Name */ | ||
.codehilite .o { color: var(--content-color)} /* Operator */ | ||
.codehilite .x { color: var(--content-color)} /* Other */ | ||
.codehilite .p { color: var(--content-color)} /* Punctuation */ | ||
.codehilite .cm { color: var(--comment-color)} /* Comment.Multiline */ | ||
.codehilite .cp { color: var(--header-color)} /* Comment.Preproc */ | ||
.codehilite .c1 { color: var(--comment-color)} /* Comment.Single */ | ||
.codehilite .cs { color: var(--comment-color)} /* Comment.Special */ | ||
.codehilite .gd { color: #0000c0; font-weight: bold; background-color: #008080 } /* Generic.Deleted */ | ||
.codehilite .ge { color: #c000c0; text-decoration: underline} /* Generic.Emph */ | ||
.codehilite .gr { color: #c0c0c0; font-weight: bold; background-color: #c00000 } /* Generic.Error */ | ||
.codehilite .gh { color: var(--header-color)} /* Generic.Heading */ | ||
.codehilite .gi { color: var(--content-color); background-color: #0000c0 } /* Generic.Inserted */ | ||
.codehilite span.go { color: #add8e6; font-weight: bold; background-color: #4d4d4d } /* Generic.Output */ | ||
.codehilite .gp { color: var(--content-color)} /* Generic.Prompt */ | ||
.codehilite .gs { color: var(--content-color)} /* Generic.Strong */ | ||
.codehilite .gu { color: var(--header-color)} /* Generic.Subheading */ | ||
.codehilite .gt { color: #c0c0c0; font-weight: bold; background-color: #c00000 } /* Generic.Traceback */ | ||
.codehilite .kc { color: var(--keyword-color)} /* Keyword.Constant */ | ||
.codehilite .kd { color: var(--keyword-color)} /* Keyword.Declaration */ | ||
.codehilite .kn { color: var(--keyword-color)} /* Keyword.Namespace */ | ||
.codehilite .kp { color: var(--keyword-color)} /* Keyword.Pseudo */ | ||
.codehilite .kr { color: var(--keyword-color)} /* Keyword.Reserved */ | ||
.codehilite .kt { color: var(--keyword-type-color)} /* Keyword.Type */ | ||
.codehilite .ld { color: var(--content-color)} /* Literal.Date */ | ||
.codehilite .m { color: var(--string-color)} /* Literal.Number */ | ||
.codehilite .s { color: var(--string-color)} /* Literal.String */ | ||
.codehilite .na { color: var(--name-attr-color)} /* Name.Attribute */ | ||
.codehilite .nb { color: var(--keyword-color)} /* Name.Builtin */ | ||
.codehilite .nc { color: var(--content-color)} /* Name.Class */ | ||
.codehilite .no { color: #ffa0a0} /* Name.Constant */ | ||
.codehilite .nd { color: var(--content-color)} /* Name.Decorator */ | ||
.codehilite .ni { color: #b89a6d} /* Name.Entity */ | ||
.codehilite .ne { color: var(--content-color)} /* Name.Exception */ | ||
.codehilite .nf { color: var(--content-color)} /* Name.Function */ | ||
.codehilite .nl { color: var(--content-color)} /* Name.Label */ | ||
.codehilite .nn { color: var(--content-color)} /* Name.Namespace */ | ||
.codehilite .nx { color: var(--content-color)} /* Name.Other */ | ||
.codehilite .py { color: var(--content-color)} /* Name.Property */ | ||
.codehilite .nt { color: var(--keyword-color)} /* Name.Tag */ | ||
.codehilite .nv { color: var(--variable-color)} /* Name.Variable */ | ||
.codehilite .ow { color: var(--content-color)} /* Operator.Word */ | ||
.codehilite .w { color: var(--content-color)} /* Text.Whitespace */ | ||
.codehilite .mf { color: var(--content-color)} /* Literal.Number.Float */ | ||
.codehilite .mh { color: var(--content-color)} /* Literal.Number.Hex */ | ||
.codehilite .mi { color: var(--content-color)} /* Literal.Number.Integer */ | ||
.codehilite .mo { color: var(--content-color)} /* Literal.Number.Oct */ | ||
.codehilite .sb { color: var(--string-color) } /* Literal.String.Backtick */ | ||
.codehilite .sc { color: var(--string-color) } /* Literal.String.Char */ | ||
.codehilite .sd { color: var(--string-color) } /* Literal.String.Doc */ | ||
.codehilite .s2 { color: var(--string-color) } /* Literal.String.Double */ | ||
.codehilite .se { color: var(--string-color) } /* Literal.String.Escape */ | ||
.codehilite .sh { color: var(--string-color) } /* Literal.String.Heredoc */ | ||
.codehilite .si { color: var(--string-color) } /* Literal.String.Interpol */ | ||
.codehilite .sx { color: var(--string-color) } /* Literal.String.Other */ | ||
.codehilite .sr { color: var(--string-color) } /* Literal.String.Regex */ | ||
.codehilite .s1 { color: var(--string-color) } /* Literal.String.Single */ | ||
.codehilite .ss { color: var(--string-color) } /* Literal.String.Symbol */ | ||
.codehilite .bp { color: var(--content-color)} /* Name.Builtin.Pseudo */ | ||
.codehilite .vc { color: var(--variable-color)} /* Name.Variable.Class */ | ||
.codehilite .vg { color: var(--variable-color)} /* Name.Variable.Global */ | ||
.codehilite .vi { color: var(--variable-color)} /* Name.Variable.Instance */ | ||
.codehilite .il { color: var(--content-color)} /* Literal.Number.Integer.Long */ | ||
.codehilite .language-bash & .nb { color: var(--bash-cmd-color) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[GENERATOR] | ||
port = 8000 | ||
pages_path = pages | ||
assets_path = assets | ||
dist_path = generated | ||
templates_path = templates | ||
|
||
[SASS] ; source_path should contain all the .scss files | ||
enabled = false | ||
source_path = scss | ||
main_path = scss/main.scss | ||
|
||
[DEFAULTS] ; Default values for page attributes | ||
name = | ||
description = | ||
priority = 0.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: Main page | ||
description: This is the main page | ||
|
||
This is a blank Markdown-SPA project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/> | ||
<title>Markdown SPA - {{ meta.name }}</title> | ||
<meta name="description" content="{{ meta.description }}"> | ||
|
||
<script src="/{{ assets_path }}/script.js" defer></script> | ||
<link rel="stylesheet" href="/{{ assets_path }}/style.css" /> | ||
</head> | ||
<body> | ||
<div id="error">The requested page isn't available</div> | ||
|
||
<nav> | ||
{{ nav }} | ||
</nav> | ||
|
||
<div id="content"> | ||
<h1>{{ meta.name }}</h1> | ||
|
||
{{+ page_content -}} | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.