diff --git a/backend/app.py b/backend/app.py index c1410501..aab22e3a 100755 --- a/backend/app.py +++ b/backend/app.py @@ -34,7 +34,11 @@ def inject_dbconf(): rows = [dict(row) for row in result] conf = {} for row in rows: - conf[row.get('key')] = json.loads(row.get('value')) + try: + conf[row.get('key')] = json.loads(row.get('value')) + except Exception as exception: + conf[row.get('key')] = row.get('value') + return dict(dbconf=conf) if __name__ == "__main__": diff --git a/backend/config.py.tpl b/backend/config.py.tpl index b6990641..d6478452 100644 --- a/backend/config.py.tpl +++ b/backend/config.py.tpl @@ -1,10 +1,13 @@ SQLALCHEMY_DATABASE_URI='postgres://:@:/' -DATA_IMAGES_PATH='data/images/'# From ./static dir -DATA_NOTICES_PATH='data/notice-photo/'# From ./static dir -BABEL_TRANSLATION_DIRECTORIES='./i18n'# From ./ dir + IGN_KEY='ign_key' PASS_METHOD='md5' COOKIE_EXPIRATION = 36000 COOKIE_AUTORENEW = True SESSION_TYPE = 'filesystem' -SECRET_KEY = 'secret key' \ No newline at end of file +SECRET_KEY = 'secret key' + +# Do not edit except in exceptional cases +DATA_IMAGES_PATH='data/images/'# From ./static dir +DATA_NOTICES_PATH='data/notice-photo/'# From ./static dir +BABEL_TRANSLATION_DIRECTORIES='./i18n'# From ./ dir \ No newline at end of file diff --git a/backend/static/css/home.css b/backend/static/css/home.css index 14cb66b1..03e4e25a 100644 --- a/backend/static/css/home.css +++ b/backend/static/css/home.css @@ -82,7 +82,7 @@ left: 0; height: 8px; width: 8px; - background-color: var(--color-green); + background-color: var(--color-secondary); transform: translateY(25%); } @@ -95,14 +95,6 @@ font-family: 'Hind', sans-serif; } -.page-home .discover{ - text-align: center; - color: #fff; - font-style: italic; - background-color : rgba(153,214,234,0.5); - z-index: 1; - transition: transform .5s ease; -} .page-home .discover { width: 100%; display: flex; diff --git a/backend/static/css/map.css b/backend/static/css/map.css index 5cdb659f..ade9f605 100644 --- a/backend/static/css/map.css +++ b/backend/static/css/map.css @@ -102,13 +102,13 @@ } .app-map .sidebar .filters .card-body .btn:hover { - background: #99d6ea61; - color: #FFF; + background: var(--color-map-filter-bg-hover); + color: var(--color-map-filter-txt-hover); } .app-map .sidebar .filters .card-body .btn.active, .app-map .sidebar .btn-site:hover { - background: #99D6EA; - color: #000; + background: var(--color-map-filter-bg-active); + color: var(--color-map-filter-txt-active); } .app-map .sidebar .filters .filter-years .btn-group-vertical { diff --git a/backend/static/css/style.css b/backend/static/css/style.css index fe5202fd..50953f33 100644 --- a/backend/static/css/style.css +++ b/backend/static/css/style.css @@ -1,10 +1,15 @@ :root { --color-primary: #00188F; --color-primary-light: #303f8a; - --color-blue : #283371; - --color-green : #78BE20; --color-secondary: #78BE20; --color-secondary-light: #72d409; + + --color-discover: rgba(153, 214, 234, 0.5); + + --color-map-filter-txt-hover: #FFF; + --color-map-filter-bg-hover: #99d6ea61; + --color-map-filter-txt-active: #000; + --color-map-filter-bg-active: #99D6EA; } .swiper-pagination-bullet-active { @@ -73,6 +78,11 @@ button{ border-color: var(--color-primary); } +.btn-primary:hover { + background-color: var(--color-primary-light); + border-color: var(--color-primary-light); +} + .btn-secondary { background-color: var(--color-secondary); border-color: var(--color-secondary); @@ -151,26 +161,6 @@ button{ font-size: 1.5em; } -.blue-btn { - background-color: var(--color-blue); - color: #fff; - border: none; - padding: 5px 30px; - text-transform: uppercase; - font-size: 13px; - width: fit-content; -} - -.green-btn{ - background-color: var(--color-green); - color: #fff; - border: none; - padding: 5px 30px; - text-transform: uppercase; - font-size: 13px; - width: fit-content; -} - .progress-bar { background-color: var(--color-primary); } @@ -179,7 +169,7 @@ button{ text-align: center; color: #fff; font-style: italic; - background-color : rgba(153,214,234,0.5); + background-color : var(--color-discover); z-index: 9999; transition: transform .5s ease; } diff --git a/backend/static/custom/css/custom-style.css b/backend/static/custom/css/custom-style.css index 7f35c7b1..685d3253 100644 --- a/backend/static/custom/css/custom-style.css +++ b/backend/static/custom/css/custom-style.css @@ -1,11 +1,16 @@ /* css clors */ :root { --color-primary: #00188F; - --color-primary-light: #303f8a; - --color-blue : #283371; - --color-green : #78BE20; + --color-primary-light: #0069d9; --color-secondary: #78BE20; --color-secondary-light: #72d409; + + --color-discover: rgba(153, 214, 234, 0.5); + + --color-map-filter-txt-hover: #FFF; + --color-map-filter-bg-hover: #99d6ea61; + --color-map-filter-txt-active: #000; + --color-map-filter-bg-active: #99D6EA; } /* css Footer */ diff --git a/backend/static/custom/logo/logo_txt_bleu.png b/backend/static/custom/logo/logo_txt_color.png similarity index 100% rename from backend/static/custom/logo/logo_txt_bleu.png rename to backend/static/custom/logo/logo_txt_color.png diff --git a/backend/tpl/comparator.html b/backend/tpl/comparator.html index 898c2b79..3eab97fb 100644 --- a/backend/tpl/comparator.html +++ b/backend/tpl/comparator.html @@ -101,9 +101,11 @@

{{ site.name_site }} | {{ site.ville.nom_commune }} < {{ _('obs_point.buttons.notice') }} - + {% if dbconf.mailto_observation: %} + {{ _('obs_point.buttons.obs') }} + {% endif %}
{{ _('obs_point.description') }}
diff --git a/backend/tpl/layout.html b/backend/tpl/layout.html index 63c748a4..3db86579 100644 --- a/backend/tpl/layout.html +++ b/backend/tpl/layout.html @@ -33,7 +33,7 @@