1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Web stuff

This commit is contained in:
Steffo 2018-07-31 19:15:52 +02:00
parent 0df85a1e61
commit e7ee46722c
6 changed files with 475 additions and 389 deletions

View file

@ -10,3 +10,4 @@ async_timeout
raven raven
bcrypt bcrypt
markdown2 markdown2
pygments

View file

@ -180,15 +180,6 @@ nav {
} }
} }
//Dirtiest hack ever
.game-panels {
font-size: 0;
.game-panel {
font-size: medium;
}
}
.game-panel { .game-panel {
display: inline-block; display: inline-block;
margin: 4px; margin: 4px;
@ -232,7 +223,15 @@ nav {
} }
} }
.osu { //Dirtiest hack ever
.game-panels {
font-size: 0;
.game-panel {
font-size: medium;
}
.osu {
font-family: 'Exo 2', 'Helvetica Neue', 'Arial', sans-serif; font-family: 'Exo 2', 'Helvetica Neue', 'Arial', sans-serif;
font-style: italic; font-style: italic;
border: 8px solid #ffffff; border: 8px solid #ffffff;
@ -302,11 +301,11 @@ nav {
.pp { .pp {
font-size: x-small; font-size: x-small;
} }
} }
.rl { .rl {
background-image: linear-gradient(to bottom,rgba(35,91,139,.5),rgba(16,54,84,.5)), background-image: linear-gradient(to bottom, rgba(35, 91, 139, .5), rgba(16, 54, 84, .5)),
linear-gradient(to right,rgba(35,91,139,.7),rgba(16,54,84,.7)); linear-gradient(to right, rgba(35, 91, 139, .7), rgba(16, 54, 84, .7));
grid-template-columns: 25% 25% 25% 25%; grid-template-columns: 25% 25% 25% 25%;
padding: 18px; padding: 18px;
grid-row-gap: 5px; grid-row-gap: 5px;
@ -350,9 +349,9 @@ nav {
grid-column: 4; grid-column: 4;
} }
} }
.dota { .dota {
padding: 15px; padding: 15px;
border: 3px solid #000000; border: 3px solid #000000;
grid-row-gap: 5px; grid-row-gap: 5px;
@ -403,9 +402,9 @@ nav {
height: 60px; height: 60px;
} }
} }
} }
.lol { .lol {
font-family: "BeaufortLoL", "Times New Roman", serif; font-family: "BeaufortLoL", "Times New Roman", serif;
padding: 15px; padding: 15px;
color: #c9aa71; color: #c9aa71;
@ -456,9 +455,9 @@ nav {
.rank { .rank {
height: 40px; height: 40px;
} }
} }
.steam { .steam {
font-family: "Motiva Sans", sans-serif; font-family: "Motiva Sans", sans-serif;
padding: 18px; padding: 18px;
background: url("https://steamstore-a.akamaihd.net/public/images/v6/colored_body_top2.png?v=2") center; background: url("https://steamstore-a.akamaihd.net/public/images/v6/colored_body_top2.png?v=2") center;
@ -492,7 +491,7 @@ nav {
} }
.button { .button {
background-color: rgba(0,0,0,0.4); background-color: rgba(0, 0, 0, 0.4);
color: #9e9d9b; color: #9e9d9b;
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -504,12 +503,12 @@ nav {
} }
.button:hover, .button:active { .button:hover, .button:active {
background-color: rgba(102,192,244,0.4); background-color: rgba(102, 192, 244, 0.4);
color: #ffffff; color: #ffffff;
} }
} }
.ow { .ow {
padding: 16px; padding: 16px;
font-family: "FuturaNo2D", sans-serif; font-family: "FuturaNo2D", sans-serif;
background-color: #371b00; background-color: #371b00;
@ -568,9 +567,9 @@ nav {
font-size: x-large; font-size: x-large;
} }
} }
} }
.ryg { .ryg {
background-color: rgba(red(@accent-color), green(@accent-color), blue(@accent-color), 0.1); background-color: rgba(red(@accent-color), green(@accent-color), blue(@accent-color), 0.1);
padding: 18px; padding: 18px;
grid-template-columns: 80% 20%; grid-template-columns: 80% 20%;
@ -598,9 +597,9 @@ nav {
.fiorygi.game-score { .fiorygi.game-score {
font-size: x-large; font-size: x-large;
} }
} }
.telegram { .telegram {
font-family: "Lucida Sans Unicode", sans-serif; font-family: "Lucida Sans Unicode", sans-serif;
background-color: #32afed; background-color: #32afed;
border: 6px solid white; border: 6px solid white;
@ -618,9 +617,9 @@ nav {
.useless-stuff { .useless-stuff {
grid-column: 1; grid-column: 1;
} }
} }
.discord { .discord {
background-color: #7289da; background-color: #7289da;
padding: 18px; padding: 18px;
color: white; color: white;
@ -650,6 +649,7 @@ nav {
.none { .none {
color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.3);
} }
}
} }
.wiki { .wiki {
@ -670,6 +670,20 @@ nav {
padding: 0; padding: 0;
} }
} }
//Text generated by the Markdown extension
.codehilite {
border-radius: 4px;
padding: 4px;
pre {
margin: 0;
}
code {
font-family: "Consolas", "Source Code Pro", monospace;
}
}
} }
.entry { .entry {

70
static/pygments.css Normal file
View file

@ -0,0 +1,70 @@
.codehilite .hll { background-color: #ffffcc }
.codehilite { background: #002f52; color: #ffffff; background-color: #002f52 }
.codehilite .c { color: #0088ff; font-style: italic; background-color: #002f52 } /* Comment */
.codehilite .err { color: #ffffff; background-color: #002f52 } /* Error */
.codehilite .g { color: #ffffff; background-color: #002f52 } /* Generic */
.codehilite .k { color: #F6AA11; background-color: #002f52 } /* Keyword */
.codehilite .l { color: #ffffff; background-color: #002f52 } /* Literal */
.codehilite .n { color: #ffffff; background-color: #002f52 } /* Name */
.codehilite .o { color: #ffffff; background-color: #002f52 } /* Operator */
.codehilite .x { color: #ffffff; background-color: #002f52 } /* Other */
.codehilite .p { color: #ffffff; background-color: #002f52 } /* Punctuation */
.codehilite .cm { color: #0088ff; font-style: italic; background-color: #002f52 } /* Comment.Multiline */
.codehilite .cp { color: #F6AA11; background-color: #002f52 } /* Comment.Preproc */
.codehilite .c1 { color: #0088ff; font-style: italic; background-color: #002f52 } /* Comment.Single */
.codehilite .cs { color: #0088ff; font-style: italic; background-color: #002f52 } /* Comment.Special */
.codehilite .gd { color: #ffffff; background-color: #002f52 } /* Generic.Deleted */
.codehilite .ge { color: #ffffff; text-decoration: underline; background-color: #002f52 } /* Generic.Emph */
.codehilite .gr { color: #ffffff; background-color: #002f52 } /* Generic.Error */
.codehilite .gh { color: #ffffff; font-weight: bold; background-color: #002f52 } /* Generic.Heading */
.codehilite .gi { color: #ffffff; background-color: #002f52 } /* Generic.Inserted */
.codehilite .go { color: #242b50; background-color: #002f52 } /* Generic.Output */
.codehilite .gp { color: #ffffff; background-color: #002f52 } /* Generic.Prompt */
.codehilite .gs { color: #ffffff; background-color: #002f52 } /* Generic.Strong */
.codehilite .gu { color: #ffffff; font-weight: bold; background-color: #002f52 } /* Generic.Subheading */
.codehilite .gt { color: #f8f8f8; background-color: #800f00 } /* Generic.Traceback */
.codehilite .kc { color: #F6AA11; background-color: #002f52 } /* Keyword.Constant */
.codehilite .kd { color: #F6AA11; background-color: #002f52 } /* Keyword.Declaration */
.codehilite .kn { color: #F6AA11; background-color: #002f52 } /* Keyword.Namespace */
.codehilite .kp { color: #F6AA11; background-color: #002f52 } /* Keyword.Pseudo */
.codehilite .kr { color: #F6AA11; background-color: #002f52 } /* Keyword.Reserved */
.codehilite .kt { color: #ffdd00; background-color: #002f52 } /* Keyword.Type */
.codehilite .ld { color: #ffffff; background-color: #002f52 } /* Literal.Date */
.codehilite .m { color: #ff628c; font-style: italic; background-color: #002f52 } /* Literal.Number */
.codehilite .s { color: #3ad900; background-color: #002f52 } /* Literal.String */
.codehilite .na { color: #ffdd00; background-color: #002f52 } /* Name.Attribute */
.codehilite .nb { color: #ffffff; background-color: #002f52 } /* Name.Builtin */
.codehilite .nc { color: #ffffff; background-color: #002f52 } /* Name.Class */
.codehilite .no { color: #ff628c; font-style: italic; background-color: #002f52 } /* Name.Constant */
.codehilite .nd { color: #ffffff; background-color: #002f52 } /* Name.Decorator */
.codehilite .ni { color: #ffffff; background-color: #002f52 } /* Name.Entity */
.codehilite .ne { color: #ffffff; background-color: #002f52 } /* Name.Exception */
.codehilite .nf { color: #ffdd00; background-color: #002f52 } /* Name.Function */
.codehilite .nl { color: #3ad900; background-color: #002f52 } /* Name.Label */
.codehilite .nn { color: #ffffff; background-color: #002f52 } /* Name.Namespace */
.codehilite .nx { color: #ffffff; background-color: #002f52 } /* Name.Other */
.codehilite .py { color: #ffffff; background-color: #002f52 } /* Name.Property */
.codehilite .nt { color: #F6AA11; background-color: #002f52 } /* Name.Tag */
.codehilite .nv { color: #F6F080; background-color: #002f52 } /* Name.Variable */
.codehilite .ow { color: #F6AA11; background-color: #002f52 } /* Operator.Word */
.codehilite .w { color: #ffffff; background-color: #002f52 } /* Text.Whitespace */
.codehilite .mf { color: #ff628c; font-style: italic; background-color: #002f52 } /* Literal.Number.Float */
.codehilite .mh { color: #ff628c; font-style: italic; background-color: #002f52 } /* Literal.Number.Hex */
.codehilite .mi { color: #ff628c; font-style: italic; background-color: #002f52 } /* Literal.Number.Integer */
.codehilite .mo { color: #ff628c; font-style: italic; background-color: #002f52 } /* Literal.Number.Oct */
.codehilite .sb { color: #3ad900; background-color: #002f52 } /* Literal.String.Backtick */
.codehilite .sc { color: #3ad900; background-color: #002f52 } /* Literal.String.Char */
.codehilite .sd { color: #3ad900; background-color: #002f52 } /* Literal.String.Doc */
.codehilite .s2 { color: #3ad900; background-color: #002f52 } /* Literal.String.Double */
.codehilite .se { color: #3ad900; background-color: #002f52 } /* Literal.String.Escape */
.codehilite .sh { color: #3ad900; background-color: #002f52 } /* Literal.String.Heredoc */
.codehilite .si { color: #3ad900; background-color: #002f52 } /* Literal.String.Interpol */
.codehilite .sx { color: #3ad900; background-color: #002f52 } /* Literal.String.Other */
.codehilite .sr { color: #3ad900; background-color: #002f52 } /* Literal.String.Regex */
.codehilite .s1 { color: #3ad900; background-color: #002f52 } /* Literal.String.Single */
.codehilite .ss { color: #3ad900; background-color: #002f52 } /* Literal.String.Symbol */
.codehilite .bp { color: #ffffff; background-color: #002f52 } /* Name.Builtin.Pseudo */
.codehilite .vc { color: #F6F080; background-color: #002f52 } /* Name.Variable.Class */
.codehilite .vg { color: #F6F080; background-color: #002f52 } /* Name.Variable.Global */
.codehilite .vi { color: #F6F080; background-color: #002f52 } /* Name.Variable.Instance */
.codehilite .il { color: #ff628c; font-style: italic; background-color: #002f52 } /* Literal.Number.Integer.Long */

View file

@ -6,6 +6,7 @@
<meta name="keywords" content="Royal Games, RYG, gaming"> <meta name="keywords" content="Royal Games, RYG, gaming">
{% block prehead %}{% endblock %} {% block prehead %}{% endblock %}
<title>{% block pagetitle %}{% endblock %} - Royal Games</title> <title>{% block pagetitle %}{% endblock %} - Royal Games</title>
<link href="{{ url_for('static', filename='pygments.css') }}" rel="stylesheet" type="text/css">
<link href="{{ url_for('static', filename='nryg.less') }}" rel="stylesheet/less" type="text/css"> <link href="{{ url_for('static', filename='nryg.less') }}" rel="stylesheet/less" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/less.js/3.0.2/less.min.js" ></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/less.js/3.0.2/less.min.js" ></script>
{% block posthead %}{% endblock %} {% block posthead %}{% endblock %}

View file

@ -221,7 +221,7 @@ def page_wiki(key: str):
if wiki_page is None: if wiki_page is None:
return render_template("wiki.html", key=key, config=config) return render_template("wiki.html", key=key, config=config)
converted_md = Markup(markdown2.markdown(wiki_page.content.replace("<", "&lt;"), converted_md = Markup(markdown2.markdown(wiki_page.content.replace("<", "&lt;"),
extras=["spoiler", "tables"])) extras=["spoiler", "tables", "smarty-pants", "fenced-code-blocks"]))
return render_template("wiki.html", key=key, wiki_page=wiki_page, converted_md=converted_md, return render_template("wiki.html", key=key, wiki_page=wiki_page, converted_md=converted_md,
wiki_log=wiki_latest_edit, config=config) wiki_log=wiki_latest_edit, config=config)
elif request.method == "POST": elif request.method == "POST":