mirror of
https://github.com/tiyn/amphora-wiki.git
synced 2025-04-19 15:27:46 +02:00
Compare commits
No commits in common. "d5cf8d6d13227bb53ea040cf2c5767edc7fae101" and "0bc1a955a6dbc96ec389416aa64cfbad5c4dbc95" have entirely different histories.
d5cf8d6d13
...
0bc1a955a6
@ -10,8 +10,6 @@ RUN pip3 install -r requirements.txt
|
|||||||
|
|
||||||
VOLUME /wiki/templates/entry
|
VOLUME /wiki/templates/entry
|
||||||
|
|
||||||
VOLUME /wiki/static/graphics
|
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
ENTRYPOINT [ "python3" ]
|
ENTRYPOINT [ "python3" ]
|
||||||
|
13
README.md
13
README.md
@ -15,7 +15,7 @@ I however just want to put my markdown files in a directory and get a working wi
|
|||||||
- [ ] Option to get plain text file
|
- [ ] Option to get plain text file
|
||||||
- [ ] Optimize CSS for code
|
- [ ] Optimize CSS for code
|
||||||
- [x] Start page
|
- [x] Start page
|
||||||
- [x] Overview of pages and namespaces
|
- [ ] Overview of pages and namespaces
|
||||||
- [x] Search page
|
- [x] Search page
|
||||||
- [x] Full-text search
|
- [x] Full-text search
|
||||||
- [x] Show first few lines of each match (preview)
|
- [x] Show first few lines of each match (preview)
|
||||||
@ -61,12 +61,11 @@ The `config.py` can be found in the `src` folder.
|
|||||||
Set the following volumes with the -v tag.
|
Set the following volumes with the -v tag.
|
||||||
|
|
||||||
| Volume-Name | Container mount | Description |
|
| Volume-Name | Container mount | Description |
|
||||||
| ------------- | ----------------------- | ------------------------------------------------------------ |
|
| ----------- | ------------------------- | ------------------------------------------------------------ |
|
||||||
| `config-file` | `/wiki/config.py` | Config file |
|
| config-file | /wiki/config.py | Config file |
|
||||||
| `entries` | `/wiki/templates/entry` | Directory for wiki entries |
|
| entries | /wiki/templates/entry | Directory for wiki entries |
|
||||||
| `graphics` | `/wiki/static/graphics` | Directory for images needed for entries |
|
| css | /wiki/static/css | (optional) Directory for css files |
|
||||||
| `css` | `/wiki/static/css` | (optional) Directory for css files |
|
| html | /wiki/templates | (optional) Directory for templates (entry-volume not needed) |
|
||||||
| `html` | `/wiki/templates` | (optional) Directory for templates (entry-volume not needed) |
|
|
||||||
|
|
||||||
#### Ports
|
#### Ports
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
docker-compose down
|
docker-compose down
|
||||||
docker-compose up -d --build
|
docker-compose up -d
|
||||||
|
@ -96,9 +96,10 @@ def gen_arch_string(path_ex):
|
|||||||
if filename[0] != "." and filename.__contains__("."):
|
if filename[0] != "." and filename.__contains__("."):
|
||||||
filename = filename.split(".", 1)[0]
|
filename = filename.split(".", 1)[0]
|
||||||
content_string += "<li>"
|
content_string += "<li>"
|
||||||
|
content_string += title + " ["
|
||||||
content_string += "<a href=\"" + "/"+ entry_or_namespace +"/" + \
|
content_string += "<a href=\"" + "/"+ entry_or_namespace +"/" + \
|
||||||
path_ex.rstrip("/") + "/" + pathlib.PurePath(file).name + "\">" + title + "</a>"
|
path_ex.rstrip("/") + "/" + pathlib.PurePath(file).name + "\">" + "standalone" + "</a>"
|
||||||
content_string += "<br>"
|
content_string += "] <br>"
|
||||||
content_string += "</li>\n"
|
content_string += "</li>\n"
|
||||||
content_string += "</ul>\n"
|
content_string += "</ul>\n"
|
||||||
return content_string
|
return content_string
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
from flask_wtf import CSRFProtect, FlaskForm
|
from flask_wtf import FlaskForm
|
||||||
from wtforms import StringField, SubmitField, ValidationError, validators
|
from flask_wtf import CSRFProtect
|
||||||
|
from wtforms import TextField, SubmitField, ValidationError, validators
|
||||||
|
|
||||||
csrf = CSRFProtect()
|
csrf = CSRFProtect()
|
||||||
|
|
||||||
|
|
||||||
class SearchForm(FlaskForm):
|
class SearchForm(FlaskForm):
|
||||||
query_str = StringField("Query", [validators.DataRequired("Please enter the search term")])
|
query_str = TextField(
|
||||||
|
"Query", [validators.Required("Please enter the search term")])
|
||||||
submit = SubmitField("Search")
|
submit = SubmitField("Search")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Markdown
|
Markdown==3.1.1
|
||||||
WTForms
|
WTForms==2.2.1
|
||||||
Flask
|
Flask==1.1.2
|
||||||
Flask_WTF
|
Flask_WTF==0.14.3
|
||||||
Whoosh
|
Whoosh==2.7.4
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
--error: rgb(255,0,0);
|
--error: rgb(255,0,0);
|
||||||
--footerbg0: rgb(192,192,192);
|
--footerbg0: rgb(192,192,192);
|
||||||
--link0: rgb(0,0,120);
|
--link0: rgb(0,0,120);
|
||||||
--link1: rgb(0,0,0);
|
--link1: rgb(255,255,255);
|
||||||
--menulink0: rgb(0,0,120);
|
--menulink0: rgb(0,0,120);
|
||||||
--menulink1: rgb(255,255,255);
|
--menulink1: rgb(255,255,255);
|
||||||
--menubg0: rgb(192,192,192);
|
--menubg0: rgb(192,192,192);
|
||||||
|
@ -29,6 +29,16 @@ html {
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
border-radius: 25px;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
page-break-inside: avoid;
|
||||||
|
font-family: monospace;
|
||||||
|
white-space: pre;
|
||||||
|
display: inline-block
|
||||||
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
@ -38,6 +48,10 @@ footer .center {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
padding-bottom: 50px;
|
padding-bottom: 50px;
|
||||||
@ -76,10 +90,6 @@ footer .center {
|
|||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.main-menu-dropdown img {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
.main-menu-dropdown span {
|
.main-menu-dropdown span {
|
||||||
float: left;
|
float: left;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
@ -155,40 +165,3 @@ footer .center {
|
|||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.entry {
|
|
||||||
border-radius: 0 10px 30px 0;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.entry h1,
|
|
||||||
.entry h2 {
|
|
||||||
margin: 5px auto 2px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.entry ul {
|
|
||||||
padding-left: 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
figure {
|
|
||||||
padding:20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
padding-left:20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol {
|
|
||||||
padding-left:20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
border-radius: 25px;
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
page-break-inside: avoid;
|
|
||||||
font-family: monospace;
|
|
||||||
white-space: pre;
|
|
||||||
display: inline-block
|
|
||||||
}
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB |
@ -2,17 +2,14 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>{{ title }}</title>
|
<title>{{ title }}</title>
|
||||||
<link href="{{ url_for('static', filename='css/' + style + '.css') }}" rel="stylesheet" type="text/css">
|
<link href="{{ url_for('static', filename='css/' + style + '.css') }}" rel="stylesheet" type="text/css">
|
||||||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='graphics/logo.png') }}">
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width" initial-scale=1.0>
|
<meta name="viewport" content="width=device-width" initial-scale=1.0>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Menu -->
|
<!-- Menu -->
|
||||||
<div class="main-menu-dropdown">
|
<div class="main-menu-dropdown">
|
||||||
<a href="{{ url_for('index') }}">
|
<!-- <img class="logo" src="/static/images/logo.png"> -->
|
||||||
<img class="logo" src="{{ url_for('static', filename='graphics/logo.png') }}">
|
|
||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
</a>
|
|
||||||
<input type="checkbox" id="main-menu-check">
|
<input type="checkbox" id="main-menu-check">
|
||||||
<label for="main-menu-check" class="show-menu">☰</label>
|
<label for="main-menu-check" class="show-menu">☰</label>
|
||||||
<div class="main-menu">
|
<div class="main-menu">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user