diff --git a/royalnet/database/tables/wikipages.py b/royalnet/database/tables/wikipages.py
index 38ee8562..914a59b8 100644
--- a/royalnet/database/tables/wikipages.py
+++ b/royalnet/database/tables/wikipages.py
@@ -27,3 +27,7 @@ class WikiPage:
@declared_attr
def format(self):
return Column(String, nullable=False, default="markdown")
+
+ @declared_attr
+ def css(self):
+ return Column(String)
diff --git a/royalnet/web/blueprints/wikiview/__init__.py b/royalnet/web/blueprints/wikiview/__init__.py
index 5e6ec5c3..cd15676b 100644
--- a/royalnet/web/blueprints/wikiview/__init__.py
+++ b/royalnet/web/blueprints/wikiview/__init__.py
@@ -35,9 +35,15 @@ def prepare_page_markdown(page):
def prepare_page(page):
if page.format == "markdown":
- return f.render_template("wikiview_page.html", page=page, parsed_content=f.Markup(prepare_page_markdown(page)))
+ return f.render_template("wikiview_page.html",
+ page=page,
+ parsed_content=f.Markup(prepare_page_markdown(page)),
+ css=page.css)
elif page.format == "html":
- return f.render_template("wikiview_page.html", page=page, parsed_content=f.Markup(page.content))
+ return f.render_template("wikiview_page.html",
+ page=page,
+ parsed_content=f.Markup(page.content),
+ css=page.css)
else:
return "Format not available", 500
@@ -45,7 +51,7 @@ def prepare_page(page):
@bp.route("/")
def wikiview_index():
from ...alchemyhandler import alchemy, alchemy_session
- pages = alchemy_session.query(alchemy.WikiPage).all()
+ pages = sorted(alchemy_session.query(alchemy.WikiPage).all(), key=lambda page: page.title)
return f.render_template("wikiview_index.html", pages=pages)
diff --git a/royalnet/web/blueprints/wikiview/templates/wikiview_page.html b/royalnet/web/blueprints/wikiview/templates/wikiview_page.html
index 2cec36bc..60b46dca 100644
--- a/royalnet/web/blueprints/wikiview/templates/wikiview_page.html
+++ b/royalnet/web/blueprints/wikiview/templates/wikiview_page.html
@@ -8,19 +8,14 @@
- Wiki page
+ {{ page.title }}
#
-
- {{ page.title }}
-
-
- {{ parsed_content }}
-
+ {{ parsed_content }}
{% endblock %}
diff --git a/royalnet/web/static/styling.css b/royalnet/web/static/ryg.css
similarity index 99%
rename from royalnet/web/static/styling.css
rename to royalnet/web/static/ryg.css
index a97959fb..93f2bd48 100644
--- a/royalnet/web/static/styling.css
+++ b/royalnet/web/static/ryg.css
@@ -407,4 +407,4 @@ nav .nav-login-unavailable {
.faded {
opacity: 0.3;
}
-/*# sourceMappingURL=styling.css.map */
\ No newline at end of file
+/*# sourceMappingURL=ryg.css.map */
\ No newline at end of file
diff --git a/royalnet/web/static/ryg.css.map b/royalnet/web/static/ryg.css.map
new file mode 100644
index 00000000..c65823ac
--- /dev/null
+++ b/royalnet/web/static/ryg.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["ryg.less"],"names":[],"mappings":"AAiBA;EACI,aALS,SAAS,4BAKlB;EACA,yBAAA;EACA,cAAA;EACA,sBAAA;;AAGJ;EACI,cAAA;EACA,qBAAA;;AAEA,CAAC;EACG,cAAA;;AAGJ,CAAC;EACG,YAAA;;AAOA,CAFH,IAAI,UAEA;EACG,aAAa,qBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAVH,IAAI,UAUA,sBAAsB;EACnB,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlBH,IAAI,UAkBA,iCAAiC;AAAU,CAlB/C,IAAI,UAkB4C,0BAA0B;EACnE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CA1BH,IAAI,UA0BA,2BAA2B;AAAU,CA1BzC,IAAI,UA0BsC,kCAAkC;EACrE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlCH,IAAI,UAkCA,4BAA4B;AAAU,CAlC1C,IAAI,UAkCuC,iCAAiC;EACrE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CA1CH,IAAI,UA0CA,yBAAyB;AAAU,CA1CvC,IAAI,UA0CoC,gCAAgC;EACjE,aAAa,uBA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P,MA+CG,SASK;EACG,aAAa,qBAAb;EACA,mBAAA;EACA,SAAS,YAAT;;AA3DZ,SAAC,MA+DG;EACI,iBAAA;;AAEA,SAlEP,MA+DG,SAGK;EACG,aAAa,qBAAb;EACA,iBAAA;EACA,SAAS,sBAAT;;AAGJ,SAxEP,MA+DG,SASK;EACG,aAAa,qBAAb;EACA,mBAAA;EACA,SAAS,OAAT;;AA3EZ,SAAC,MA+EG;EACI,iBAAA;;AAEA,SAlFP,MA+EG,SAGK;EACG,aAAa,qBAAb;EACA,iBAAA;EACA,SAAS,2BAAT;;AAKZ,SAAC,IAAI,OAAO,IAAI,QAAQ,IAAI;EACxB,cAAA;EACA,0CAAA;;AAEA,SAJH,IAAI,OAAO,IAAI,QAAQ,IAAI,QAIvB;EACG,aAAa,qBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIR,SAAC;EACG,mBAAA;;AAIR;EACI,uBAAA;EACA,0CAAA;EACA,kBAAA;;AAEA,QAAC;EACG,cAAA;;AAIR;EACI,YAAA","file":"ryg.css"}
\ No newline at end of file
diff --git a/royalnet/web/static/styling.less b/royalnet/web/static/ryg.less
similarity index 100%
rename from royalnet/web/static/styling.less
rename to royalnet/web/static/ryg.less
diff --git a/royalnet/web/static/styling.css.map b/royalnet/web/static/styling.css.map
deleted file mode 100644
index 7d3aa720..00000000
--- a/royalnet/web/static/styling.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["styling.less"],"names":[],"mappings":"AAiBA;EACI,aALS,SAAS,4BAKlB;EACA,yBAAA;EACA,cAAA;EACA,sBAAA;;AAGJ;EACI,cAAA;EACA,qBAAA;;AAEA,CAAC;EACG,cAAA;;AAGJ,CAAC;EACG,YAAA;;AAOA,CAFH,IAAI,UAEA;EACG,aAAa,qBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAVH,IAAI,UAUA,sBAAsB;EACnB,aAAa,uBAAb;EACA,iBAAA;EACA,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.less
new file mode 100644
index 00000000..2e0980b2
--- /dev/null
+++ b/royalnet/web/static/tf2.less
@@ -0,0 +1,363 @@
+@bg: #2e2a28; //Background color
+@fg: #d2cdc8; //Foreground color
+@li: #9a4713; //Link
+@ec: #ffffff; //Extra color
+
+
+@font-face {
+ font-family: 'TF2';
+ src: url('https://scaleway.steffo.eu/tf2.ttf');
+}
+
+@font-face {
+ font-family: 'TF2 Build';
+ src: url('https://scaleway.steffo.eu/tf2build.ttf');
+}
+
+@font-face {
+ font-family: 'TF2 Professor';
+ src: url('https://scaleway.steffo.eu/tf2professor.ttf');
+}
+
+@font-face {
+ font-family: 'TF2 Secondary';
+ src: url('https://scaleway.steffo.eu/tf2secondary.ttf');
+}
+
+@main-fonts: "TF2 Secondary", sans-serif;
+@monospace-fonts: "Consolas", "Source Code Pro", monospace;
+
+//General
+body {
+ font-family: @main-fonts;
+ background-color: @bg;
+ color: @fg;
+ box-sizing: border-box;
+}
+
+a {
+ color: @li;
+ text-decoration: none;
+
+ &:hover {
+ color: lighten(@li, 25%);
+ }
+
+ &:active {
+ color: white;
+ }
+
+ //Icon link
+ //noinspection CssNoGenericFontName
+ &:not(.no-icon) {
+ //External link
+ &::before {
+ font-family: "Font Awesome 5 Free";
+ font-weight: bold;
+ content: "\f0c1";
+ margin-right: 4px;
+ }
+
+ //Telegram link
+ &[href^="https://t.me"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f2c6";
+ margin-right: 3px;
+ }
+
+ //YouTube link
+ &[href^="https://www.youtube.com"]::before, &[href^="https://youtu.be"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f167";
+ margin-right: 3px;
+ }
+
+ //Vimeo link
+ &[href^="https://vimeo.com"]::before, &[href^="https://player.vimeo.com"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f27d";
+ margin-right: 4px;
+ }
+
+ //GitHub link
+ &[href^="https://github.com"]::before, &[href^="https://gist.github.com"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f09b";
+ margin-right: 4px;
+ }
+
+ //Itchio link
+ &[href^="https://itch.io"]::before, &[href^="https://steffo.itch.io"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f83a";
+ margin-right: 3px;
+ }
+
+ //Kickstarter link
+ &[href^="https://www.kickstarter.com"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f3bb";
+ margin-right: 4px;
+ }
+
+ //Reddit link
+ &[href^="https://reddit.com"]::before, &[href^="https://new.reddit.com"]::before, &[href^="https://old.reddit.com"]::before, &[href^="https://redd.it"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f281";
+ margin-right: 3px;
+ }
+
+ //Twitch link
+ &[href^="https://www.twitch.tv"]::before, &[href^="https://clips.twitch.tv"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f1e8";
+ margin-right: 4px;
+ }
+
+ //Steam link
+ &[href^="https://store.steampowered.com"]::before, &[href^="https://steamcommunity.com"]::before, &[href^="https://partner.steamgames.com"]::before, &[href^="steam:"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f1b6";
+ margin-right: 4px;
+ }
+
+ //Twitter link
+ &[href^="https://twitter.com"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f099";
+ margin-right: 3px;
+ }
+
+ //Wikipedia link
+ &[href^="https://it.wikipedia.org"]::before, &[href^="https://en.wikipedia.org"]::before {
+ font-family: "Font Awesome 5 Brands";
+ font-weight: bold;
+ content: "\f266";
+ margin-right: 3px;
+ }
+
+ //Anchor
+ &[href^="#"]::before {
+ font-family: "Font Awesome 5 Free";
+ font-weight: bold;
+ content: "\f13d";
+ margin-right: 3px;
+ }
+
+ //Unsafe link
+ &[href^="http:"]::before {
+ font-family: "Font Awesome 5 Free";
+ font-weight: bold;
+ content: "\f09c";
+ margin-right: 4px;
+ }
+
+ //Magnet link
+ &[href^="magnet:"]::before {
+ font-family: "Font Awesome 5 Free";
+ font-weight: bold;
+ content: "\f076";
+ margin-right: 4px;
+ }
+ }
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-family: "TF2 Build", sans-serif;
+ color: @ec;
+ margin-top: 0;
+ margin-bottom: 0;
+ font-weight: normal;
+}
+
+code {
+ font-family: @monospace-fonts;
+}
+
+blockquote {
+ color: @fg;
+ border-left: 3px solid @fg;
+ background-color: fade(@fg, 10%);
+ padding: 2px 4px 2px 8px;
+ margin: 8px;
+}
+
+textarea {
+ background-color: fade(@fg, 10%);
+ color: @fg;
+ border: 1px solid @fg;
+ padding: 2px;
+ margin: 1px;
+ font-size: small;
+ font-family: @monospace-fonts;
+ width: 100%;
+ height: 300px;
+}
+
+button, input[type="submit"], .btn {
+ background-color: fade(@fg, 10%);
+ color: @fg !important;
+ border: 1px solid @fg;
+ border-radius: 0;
+ padding: 2px 8px;
+ margin: 1px;
+ font-size: medium;
+ font-family: sans-serif;
+ text-decoration: none;
+ cursor: default;
+
+ &:hover {
+ background-color: fade(@fg, 20%);
+ color: lighten(@fg, 25%);
+ border-color: lighten(@fg, 25%);
+ }
+
+ &:active {
+ background-color: fade(@fg, 30%);
+ color: white;
+ border-color: white;
+ }
+}
+
+pre {
+ margin: 0;
+}
+
+img {
+ margin-left: auto;
+ margin-right: auto;
+ display: block;
+ max-width: 100%;
+}
+
+nav {
+ display: flex;
+ justify-content: space-between;
+ height: 50px;
+ line-height: 50px;
+
+ .nav-left {
+ text-align: left;
+ }
+
+ .nav-center {
+ text-align: center;
+ }
+
+ .nav-right {
+ text-align: right;
+ }
+
+ .nav-image {
+ height: 50px;
+ display: none;
+ vertical-align: middle;
+ }
+
+ .nav-sitename {
+ color: @ec;
+ font-weight: bold;
+ }
+
+ .nav-login-unavailable {
+ opacity: 0.25;
+ }
+}
+
+//Elements
+
+.h-container {
+ display: flex;
+ justify-content: center;
+ align-content: center;
+ flex-direction: column;
+
+ @media (min-width: 800px)
+ {
+ flex-direction: row;
+ }
+}
+
+.main-container {
+ width: 100%;
+
+ @media (min-width: 800px)
+ {
+ width: 800px;
+ }
+
+ @media (min-width: 1200px)
+ {
+ width: 1200px;
+ }
+}
+
+.box {
+ background-color: @fg;
+ color: black;
+ border-radius: 2px;
+ padding: 4px;
+ margin: 8px;
+}
+
+.doublebox {
+ margin: 8px;
+
+ .top {
+ display: flex;
+ justify-content: space-between;
+ background-color: @li;
+ padding: 8px;
+ border-radius: 4px 4px 0 0;
+ color: @ec;
+ font-family: "TF2 Build", sans-serif;
+ font-weight: normal;
+
+ .left {
+ align-self: flex-start;
+ }
+
+ .right {
+ align-self: flex-end;
+ }
+
+ a {
+ color: #00caca;
+ }
+ }
+
+ .bot {
+ background-color: @fg;
+ color: black;
+ padding: 8px;
+ border-radius: 0 0 4px 4px;
+
+ h1, h2, h3, h4, h5, h6 {
+ color: black;
+ }
+ }
+}
+
+.spoiler {
+ color: rgba(0, 0, 0, 0);
+ border: 1px solid fade(@fg, 10%);
+ border-radius: 2px;
+
+ &:hover {
+ color: @fg;
+ }
+}
+
+.faded {
+ opacity: 0.3;
+}
\ No newline at end of file
diff --git a/royalnet/web/templates/base.html b/royalnet/web/templates/base.html
index d40f84a8..cbc57690 100644
--- a/royalnet/web/templates/base.html
+++ b/royalnet/web/templates/base.html
@@ -10,7 +10,11 @@
{% block title %}{% endblock %}
-
+ {% if css %}
+
+ {% else %}
+
+ {% endif %}