mirror of
https://github.com/tiyn/amphora-wiki.git
synced 2025-04-19 15:27:46 +02:00
Compare commits
5 Commits
0bc1a955a6
...
d5cf8d6d13
Author | SHA1 | Date | |
---|---|---|---|
d5cf8d6d13 | |||
ff35dbe3ae | |||
ff169d2795 | |||
6287111899 | |||
cdf6660cae |
@ -10,6 +10,8 @@ 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
|
||||||
- [ ] Overview of pages and namespaces
|
- [x] 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,11 +61,12 @@ 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 |
|
||||||
| css | /wiki/static/css | (optional) Directory for css files |
|
| `graphics` | `/wiki/static/graphics` | Directory for images needed for entries |
|
||||||
| html | /wiki/templates | (optional) Directory for templates (entry-volume not needed) |
|
| `css` | `/wiki/static/css` | (optional) Directory for css files |
|
||||||
|
| `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
|
docker-compose up -d --build
|
||||||
|
@ -96,10 +96,9 @@ 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 + "\">" + "standalone" + "</a>"
|
path_ex.rstrip("/") + "/" + pathlib.PurePath(file).name + "\">" + title + "</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,11 +1,9 @@
|
|||||||
from flask_wtf import FlaskForm
|
from flask_wtf import CSRFProtect, FlaskForm
|
||||||
from flask_wtf import CSRFProtect
|
from wtforms import StringField, SubmitField, ValidationError, validators
|
||||||
from wtforms import TextField, SubmitField, ValidationError, validators
|
|
||||||
|
|
||||||
csrf = CSRFProtect()
|
csrf = CSRFProtect()
|
||||||
|
|
||||||
|
|
||||||
class SearchForm(FlaskForm):
|
class SearchForm(FlaskForm):
|
||||||
query_str = TextField(
|
query_str = StringField("Query", [validators.DataRequired("Please enter the search term")])
|
||||||
"Query", [validators.Required("Please enter the search term")])
|
|
||||||
submit = SubmitField("Search")
|
submit = SubmitField("Search")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Markdown==3.1.1
|
Markdown
|
||||||
WTForms==2.2.1
|
WTForms
|
||||||
Flask==1.1.2
|
Flask
|
||||||
Flask_WTF==0.14.3
|
Flask_WTF
|
||||||
Whoosh==2.7.4
|
Whoosh
|
||||||
|
@ -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(255,255,255);
|
--link1: rgb(0,0,0);
|
||||||
--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,16 +29,6 @@ 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;
|
||||||
@ -48,10 +38,6 @@ 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;
|
||||||
@ -90,6 +76,10 @@ ul {
|
|||||||
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;
|
||||||
@ -165,3 +155,40 @@ ul {
|
|||||||
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
|
||||||
|
}
|
||||||
|
0
src/static/graphics/.gitkeep
Normal file
0
src/static/graphics/.gitkeep
Normal file
BIN
src/static/graphics/logo.png
Normal file
BIN
src/static/graphics/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
@ -2,14 +2,17 @@
|
|||||||
<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">
|
||||||
<!-- <img class="logo" src="/static/images/logo.png"> -->
|
<a href="{{ url_for('index') }}">
|
||||||
|
<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