Restored changes lost during the Gitlab->Gitea migration

This commit is contained in:
Fabio Manganiello 2022-08-03 01:18:02 +02:00
parent 2e863da911
commit 7b501df1ec
3 changed files with 9 additions and 11 deletions

View File

@ -3,7 +3,7 @@ import os
import sys
def get_args():
def get_args(args):
parser = argparse.ArgumentParser(description='''Serve a Markdown folder as a web blog.
The folder should have the following structure:
@ -29,12 +29,12 @@ The folder should have the following structure:
parser.add_argument('--debug', dest='debug', required=False, action='store_true', default=False,
help='Enable debug mode (default: False)')
return parser.parse_known_args(sys.argv[1:])
return parser.parse_known_args(args)
def run():
from .config import init_config
opts, _ = get_args()
opts, _ = get_args(sys.argv[1:])
config_file = os.path.join(opts.dir, 'config.yaml')
init_config(config_file=config_file, content_dir=opts.dir)

View File

@ -41,7 +41,6 @@ main {
.article {
display: block;
width: 100%;
max-height: 80%;
box-shadow: 0 1px 3px 1px #ccc;
overflow: hidden;
text-overflow: ellipsis;
@ -54,12 +53,6 @@ main {
border-radius: .5em;
}
/* @media screen and (min-width: 767px) { */
/* .article { */
/* max-height: 55%; */
/* } */
/* } */
@media screen and (min-width: 640px) and (max-width: 767px) {
.article {
padding: 0 calc(1em + 7vw);

View File

@ -1,9 +1,14 @@
import os
import sys
from .cli import get_args
from .config import init_config
opts, _ = get_args()
arg_delim_idx = [
i for i, arg in enumerate(sys.argv) if arg == 'madblog.uwsgi'
][0]
opts, _ = get_args(sys.argv[arg_delim_idx+1:])
config_file = os.path.join(opts.dir, 'config.yaml')
init_config(config_file=config_file, content_dir=opts.dir)