mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 23:20:27 +00:00
add 'custom_css' setting to model; check for 'custom_css' in template; create custom css dir in dockerfile
This commit is contained in:
parent
567f66fbde
commit
c13dd2d835
@ -94,6 +94,8 @@ RUN apk add --no-cache mariadb-connector-c postgresql-client py3-gunicorn py3-ps
|
|||||||
COPY --from=builder /usr/bin/flask /usr/bin/
|
COPY --from=builder /usr/bin/flask /usr/bin/
|
||||||
COPY --from=builder /usr/lib/python3.8/site-packages /usr/lib/python3.8/site-packages/
|
COPY --from=builder /usr/lib/python3.8/site-packages /usr/lib/python3.8/site-packages/
|
||||||
COPY --from=builder --chown=root:${USER} /app /app/
|
COPY --from=builder --chown=root:${USER} /app /app/
|
||||||
|
# Create directory for custom css
|
||||||
|
RUN mkdir /app/powerdnsadmin/static/custom
|
||||||
COPY ./docker/entrypoint.sh /usr/bin/
|
COPY ./docker/entrypoint.sh /usr/bin/
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -181,6 +181,7 @@ class Setting(db.Model):
|
|||||||
},
|
},
|
||||||
'ttl_options': '1 minute,5 minutes,30 minutes,60 minutes,24 hours',
|
'ttl_options': '1 minute,5 minutes,30 minutes,60 minutes,24 hours',
|
||||||
'otp_field_enabled': True,
|
'otp_field_enabled': True,
|
||||||
|
'custom_css': '',
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, id=None, name=None, value=None):
|
def __init__(self, id=None, name=None, value=None):
|
||||||
|
@ -11,7 +11,9 @@
|
|||||||
{% assets "css_login" -%}
|
{% assets "css_login" -%}
|
||||||
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
||||||
{%- endassets %}
|
{%- endassets %}
|
||||||
|
{% if SETTING.get('custom_css') %}
|
||||||
|
<link rel="stylesheet" href="/static/custom/{{ custom_css }}">
|
||||||
|
{% endif %}
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
Loading…
Reference in New Issue
Block a user