included settings for theme, project name and title, cleanup
This commit is contained in:
parent
5ee1cec97b
commit
e80a87ab5b
|
@ -1,3 +1,8 @@
|
|||
[project]
|
||||
name = "Husk"
|
||||
title = "The Real Hugo"
|
||||
|
||||
[content]
|
||||
path = "templates/content/"
|
||||
style = "xcode" # Supported styles are one-dark, solarized-dark, solarized-light, github-dark, xcode
|
||||
style = "github-dark" # Supported styles are one-dark, solarized-dark, solarized-light, github-dark, xcode
|
||||
|
||||
|
|
|
@ -20,6 +20,10 @@ Markdown(app)
|
|||
app.config["husk"] = toml.load("settings.toml")
|
||||
content_path = app.config["husk"]["content"]["path"]
|
||||
highlight_style = app.config["husk"]["content"]["style"]
|
||||
stylesheet = f"{highlight_style}.css"
|
||||
stylesheet_auto_complete = f"{highlight_style}-auto-complete.css"
|
||||
project_name = app.config["husk"]["project"]["name"]
|
||||
project_title = app.config["husk"]["project"]["title"]
|
||||
|
||||
|
||||
@app.route('/index.json')
|
||||
|
@ -42,8 +46,12 @@ def content(path="README"):
|
|||
css_string = formatter.get_style_defs()
|
||||
md_css_string = "<style>" + css_string + "</style>"
|
||||
md_template = md_css_string + html
|
||||
res = render_template("documentation.html", toc=md.toc, md_doc=md_template, tree=
|
||||
cut_path_tree(
|
||||
res = render_template(
|
||||
"documentation.html",
|
||||
toc=md.toc, md_doc=md_template,
|
||||
stylesheet=stylesheet, stylesheet_auto_complete=stylesheet_auto_complete,
|
||||
project_name=project_name, project_title=project_title,
|
||||
tree=cut_path_tree(
|
||||
make_tree(content_path), content_path, ".md")
|
||||
)
|
||||
response = make_response(res)
|
||||
|
|
|
@ -4,7 +4,7 @@ blockquote { text-align: center; font-size: 16px; font-style: normal; line-heigh
|
|||
pre { background-color: #0d1117;color: #ecf2f8;border: 1px solid #89929b; font-size: 14px; padding-left: 2ch;padding-top:2ch; padding-bottom: 2ch; overflow: auto; }
|
||||
code { background-color: #0d1117; color: #ecf2f8; }
|
||||
hr { height: 0px; }
|
||||
a {color: inherit; text-decoration: none; }
|
||||
a {color: inherit; }
|
||||
a:hover {color: #77bdfb; text-decoration: solid underline;}
|
||||
details > summary{ background-color: #0d1117; font-size: 18px;}
|
||||
details > summary:hover { background-color: #21262d; color: #ecf2f8;}
|
||||
|
@ -47,47 +47,56 @@ details summary::marker { content: "\1F4C1\20";}
|
|||
background-color: #0d1117;
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
.HolyGrail-nav ul {
|
||||
list-style-type: none!important;
|
||||
padding-left : 0.3em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-nav li {
|
||||
list-style-type: none!important;
|
||||
padding-left : 1em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
.HolyGrail-nav a{
|
||||
}
|
||||
|
||||
.HolyGrail-nav a{
|
||||
overflow-wrap: break-word;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:hover{
|
||||
}
|
||||
.HolyGrail-nav a:hover{
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:before{
|
||||
.HolyGrail-nav a:before{
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a:hover {
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul{
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li:before {
|
||||
.HolyGrail-ads ul li:before {
|
||||
content: "\203B\20";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,12 +4,14 @@ blockquote { text-align: center; font-size: 16px; font-style: normal; line-heigh
|
|||
pre { background-color: #282C34;color: #979FAD;border: 1px solid #282C34; font-size: 14px; padding-left: 2ch;padding-top:2ch; padding-bottom: 2ch; line-height: 18px; overflow: auto; }
|
||||
code { background-color: #282C34; color: #979FAD; }
|
||||
hr { height: 0px; }
|
||||
a {color: inherit; text-decoration: none; }
|
||||
a {color: inherit; }
|
||||
a:hover {color: #2979FF; text-decoration: solid underline;}
|
||||
details > summary{ background-color: #3A3F4B; font-size: 18px;}
|
||||
details > summary:hover { background-color: #2F333D;}
|
||||
details summary::-webkit-details-marker,
|
||||
details summary::marker { content: "\1F4C1\20";}
|
||||
::selection { background-color: #668799; }
|
||||
::-moz-selection { background-color: #668799; }
|
||||
.menu { line-height: 1em; font-size: 32px; line-height: 1em; text-decoration: none; }
|
||||
|
||||
.HolyGrail,
|
||||
|
@ -47,46 +49,56 @@ details summary::marker { content: "\1F4C1\20";}
|
|||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
.HolyGrail-nav ul {
|
||||
list-style-type: none!important;
|
||||
padding-left : 0.3em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-nav li {
|
||||
list-style-type: none!important;
|
||||
padding-left : 1em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
.HolyGrail-nav a{
|
||||
}
|
||||
|
||||
.HolyGrail-nav a{
|
||||
overflow-wrap: break-word;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:hover{
|
||||
}
|
||||
.HolyGrail-nav a:hover{
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:before{
|
||||
.HolyGrail-nav a:before{
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a:hover {
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul{
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li:before {
|
||||
.HolyGrail-ads ul li:before {
|
||||
content: "\203B\20";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ blockquote { text-align: center; font-size: 16px; font-style: normal; line-heigh
|
|||
pre { background-color: #002b36;color: #839496;border: 1px solid #073642; font-size: 14px; padding-left: 2ch;padding-top:2ch; padding-bottom: 2ch; line-height: 18px; overflow: auto; }
|
||||
code { background-color: #002b36; color: #839496; }
|
||||
hr { height: 0px; }
|
||||
a {color: inherit; text-decoration: none; }
|
||||
a {color: inherit; }
|
||||
a:hover {color: #cb4b16; text-decoration: solid underline;}
|
||||
details > summary{ background-color: #002b36; font-size: 18px;}
|
||||
details > summary:hover { background-color: #839496; color: #002b36;}
|
||||
|
@ -47,47 +47,56 @@ details summary::marker { content: "\1F4C1\20";}
|
|||
background-color: #002b36;
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
.HolyGrail-nav ul {
|
||||
list-style-type: none!important;
|
||||
padding-left : 0.3em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-nav li {
|
||||
list-style-type: none!important;
|
||||
padding-left : 1em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
.HolyGrail-nav a{
|
||||
}
|
||||
|
||||
.HolyGrail-nav a{
|
||||
overflow-wrap: break-word;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:hover{
|
||||
}
|
||||
.HolyGrail-nav a:hover{
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:before{
|
||||
.HolyGrail-nav a:before{
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a:hover {
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul{
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li:before {
|
||||
.HolyGrail-ads ul li:before {
|
||||
content: "\203B\20";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ blockquote { text-align: center; font-size: 16px; font-style: normal; line-heigh
|
|||
pre { background-color: #eee8d5;color: #657b83;border: 1px solid #073642; font-size: 14px; padding-left: 2ch;padding-top:2ch; padding-bottom: 2ch; line-height: 18px; overflow: auto; }
|
||||
code { background-color: #eee8d5; color: #657b83; }
|
||||
hr { height: 0px; }
|
||||
a {color: inherit; text-decoration: none; }
|
||||
a {color: inherit; }
|
||||
a:hover {color: #cb4b16; text-decoration: solid underline;}
|
||||
details > summary{ background-color: #eee8d5; font-size: 18px;}
|
||||
details > summary:hover { background-color: #073642 ; color: #eee8d5;}
|
||||
|
@ -47,47 +47,56 @@ details summary::marker { content: "\1F4C1\20";}
|
|||
background-color: #eee8d5;
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
.HolyGrail-nav ul {
|
||||
list-style-type: none!important;
|
||||
padding-left : 0.3em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-nav li {
|
||||
list-style-type: none!important;
|
||||
padding-left : 1em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
.HolyGrail-nav a{
|
||||
}
|
||||
|
||||
.HolyGrail-nav a{
|
||||
overflow-wrap: break-word;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:hover{
|
||||
}
|
||||
.HolyGrail-nav a:hover{
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:before{
|
||||
.HolyGrail-nav a:before{
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a:hover {
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul{
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li:before {
|
||||
.HolyGrail-ads ul li:before {
|
||||
content: "\203B\20";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ blockquote { text-align: center; font-size: 16px; font-style: normal; line-heigh
|
|||
pre { background-color: #fff;color: #262626;border: 1px solid #262626; font-size: 14px; padding-left: 2ch;padding-top:2ch; padding-bottom: 2ch; overflow: auto; }
|
||||
code { background-color: #fff; color: #262626; }
|
||||
hr { height: 0px; }
|
||||
a {color: inherit; text-decoration: none; }
|
||||
a {color: inherit; }
|
||||
a:hover {color: #2e9dff; text-decoration: solid underline;}
|
||||
details > summary{ background-color: #ecf5ff; font-size: 18px;}
|
||||
details > summary:hover { background-color: #2e9dff; color: #ecf2f8;}
|
||||
|
@ -47,47 +47,56 @@ details summary::marker { content: "\1F4C1\20";}
|
|||
background-color: #ecf5ff;
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
.HolyGrail-nav ul {
|
||||
list-style-type: none!important;
|
||||
padding-left : 0.3em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-nav li {
|
||||
list-style-type: none!important;
|
||||
padding-left : 1em;
|
||||
margin: 0em;
|
||||
text-align: left;
|
||||
}
|
||||
.HolyGrail-nav a{
|
||||
}
|
||||
|
||||
.HolyGrail-nav a{
|
||||
overflow-wrap: break-word;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:hover{
|
||||
}
|
||||
.HolyGrail-nav a:hover{
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-nav a:before{
|
||||
.HolyGrail-nav a:before{
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul li {
|
||||
list-style-type: none!important;
|
||||
text-align: left;
|
||||
border: none;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.HolyGrail-ads a:hover {
|
||||
text-decoration: solid underline;
|
||||
}
|
||||
|
||||
.HolyGrail-ads ul{
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.HolyGrail-ads ul li:before {
|
||||
.HolyGrail-ads ul li:before {
|
||||
content: "\203B\20";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
<script type="text/javascript" src="{{ url_for('static', filename='js/auto-complete.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/lunr.min.js')}}"></script>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/search.js')}}"></script>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='stylesheet.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='auto-complete.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename=stylesheet) }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename=stylesheet_auto_complete) }}">
|
||||
<br>
|
||||
<title>{% block title %}The Real Hugo{% endblock %}</title>
|
||||
<title>{% block title %}{{ project_title }}{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<body class="HolyGrail">
|
||||
<header>
|
||||
<div class="menu">
|
||||
<a href="{{ url_for('content') }}" style="text-decoration:none">Husk</a>
|
||||
<a href="{{ url_for('content') }}" style="text-decoration:none">{{ project_name }}</a>
|
||||
</div>
|
||||
<div class="search-container">
|
||||
<label for="search-by"><i class="fas fa-search"></i></label>
|
||||
|
|
Loading…
Reference in New Issue