diff --git a/flasky.sh b/flasky.sh
index 2b2e0e1..574ed69 100755
--- a/flasky.sh
+++ b/flasky.sh
@@ -6,7 +6,7 @@ HOME_PATH=$(eval echo ~${SUDO_USER})
SCRIPT_FILE=$(basename $(readlink -f "${0}"))
SCRIPT_PATH=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
-if [ ${#} -eq 0 ]; then
+if [[ ${#} -eq 0 ]]; then
OPTION='run'
else
OPTION=${1}
@@ -34,11 +34,31 @@ if [[ ${#} -eq 0 || ${OPTION} == 'debug' ]]; then
elif [ ${OPTION} == 'clean' ]; then
clean
elif [ ${OPTION} == 'init' ]; then
+ if [[ ${#} -ne 5 ]]; then
+ echo "${SCRIPT_FILE} init --mail_address EMAIL_ADDRESS --mail_password EMAIL_PASSWORD"
+ exit -1
+ fi
sudo apt install libgl1 -y
cd ${SCRIPT_PATH}
source ${PYTHON_ENV}
pip3 install -r ${SCRIPT_PATH}/requirements.txt
- flask init
+ flask init --mail_address ${3} --mail_password ${5}
+elif [ ${OPTION} == 'addusr' ]; then
+ if [[ ${#} -ne 5 ]]; then
+ echo "${SCRIPT_FILE} addusr --username USERNAME --password PASSWORD"
+ exit -1
+ fi
+ cd ${SCRIPT_PATH}
+ source ${PYTHON_ENV}
+ flask addusr --username ${3} --password ${5}
+elif [ ${OPTION} == 'delusr' ]; then
+ if [[ ${#} -ne 3 ]]; then
+ echo "${SCRIPT_FILE} delusr --username"
+ exit -1
+ fi
+ cd ${SCRIPT_PATH}
+ source ${PYTHON_ENV}
+ flask delusr --username ${3}
elif [ ${OPTION} == 'test' ]; then
cd ${SCRIPT_PATH}
source ${PYTHON_ENV}
@@ -67,6 +87,6 @@ elif [ ${OPTION} == 'restore' ]; then
source ${PYTHON_ENV}
flask restore
else
- echo "Usage: ${SCRIPT_FILE} [run|clean|test|init|deploy]"
+ echo "Usage: ${SCRIPT_FILE} [init|debug|run|deploy|test|clean|addusr|delusr|backup|restore]"
fi
diff --git a/hallelujah/static/css/markdown_patch.css b/hallelujah/static/css/markdown_patch.css
index 890d14c..86541cf 100644
--- a/hallelujah/static/css/markdown_patch.css
+++ b/hallelujah/static/css/markdown_patch.css
@@ -1,8 +1,16 @@
/* markdown code block */
.markdown-body {
+ background-color: transparent;
box-sizing: border-box;
padding: 15px;
}
+.markdown-body table tr {
+ background-color: transparent;
+}
+.markdown-body table tr:nth-child(2n) {
+ background-color: transparent;
+ opacity: 0.7;
+}
.markdown-body pre {
margin-top, margin-bottom: 5px;
padding: 0;
@@ -24,7 +32,6 @@
display: table;
}
.markdown-body code.hljs table.hljs-ln tr {
- background-color: #f6f8fa;
border: 0;
}
.markdown-body code.hljs table.hljs-ln td.hljs-ln-line {
diff --git a/hallelujah/templates/_highlight.html b/hallelujah/templates/_highlight.html
index 4ec64e3..9cf71a0 100644
--- a/hallelujah/templates/_highlight.html
+++ b/hallelujah/templates/_highlight.html
@@ -1,10 +1,10 @@
{% extends '_base.html' %}
{% block styles %}
-
- {{ super() }}
+ {{ super() }}
+
{% endblock styles %}
{% block scripts %}
diff --git a/hallelujah/utility.py b/hallelujah/utility.py
index 59c9f4c..614bd3f 100644
--- a/hallelujah/utility.py
+++ b/hallelujah/utility.py
@@ -134,7 +134,7 @@ def send_async_email(app, message):
try:
mail.send(message)
except Exception as e:
- app.config.logger.error('send_async_email: {}'.format(str(e)))
+ app.logger.error('send_async_email: {}'.format(str(e)))
def send_email(to, subject, msg):