diff --git a/Dockerfile b/Dockerfile index 1e85bd4..66dace6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,4 @@ RUN mkdir -p /static && \ USER app -CMD uvicorn --host=0.0.0.0 asgi:application +CMD sh ./run.sh diff --git a/asgi.py b/asgi.py index 3c2ab47..d930b5d 100644 --- a/asgi.py +++ b/asgi.py @@ -1,8 +1,15 @@ import os +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +from django.conf import settings from django.core.asgi import get_asgi_application from django_simple_task import django_simple_task_middlware - -os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' +from asgi_middleware_static_file import ASGIMiddlewareStaticFile app = get_asgi_application() +app = ASGIMiddlewareStaticFile( + app, + static_url=settings.STATIC_URL, + static_root_paths=[settings.STATIC_ROOT] +) application = django_simple_task_middlware(app) diff --git a/docker-compose.yml b/docker-compose.yml index c2def98..525806e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,8 +5,8 @@ services: image: 'gedgo_app' env_file: '.env' container_name: 'gedgo_app' - # command: ['python', 'manage.py', 'runserver', '0.0.0.0:8000'] - command: ['uvicorn', '--host=0.0.0.0', '--reload', 'asgi:application'] + command: ['python', 'manage.py', 'runserver', '0.0.0.0:8000'] + # command: ['uvicorn', '--host=0.0.0.0', '--reload', 'asgi:application'] ports: - '8000:8000' volumes: diff --git a/gedgo/static/js/timeline.js b/gedgo/static/js/timeline.js index 4670049..31d2110 100644 --- a/gedgo/static/js/timeline.js +++ b/gedgo/static/js/timeline.js @@ -36,7 +36,7 @@ .append("line") .attr("x1", w/2).attr("y1", 10) .attr("x2", w/2).attr("y2", h - 10) - .attr("stroke", "teal"); + .attr("stroke", "#004643"); svg.selectAll("circle") .data(events) @@ -45,9 +45,9 @@ .attr("cx", w/2) .attr("cy", (d) => scale(d.year)) .attr("r", 5) - .attr("fill", d => (d.year === birthyear || d.year === deathyear) ? "teal" : "white") + .attr("fill", d => (d.year === birthyear || d.year === deathyear) ? "#004643" : "#fffffe") .attr("stroke-width", 3) - .attr("stroke", d => (d.type === 'personal') ? "teal" : "orange"); + .attr("stroke", d => (d.type === 'personal') ? "#004643" : "#f9bc60"); svg.selectAll("text") .data(events) diff --git a/gedgo/static/styles/style-default.css b/gedgo/static/styles/style-default.css index 273e3bf..fb1486c 100644 --- a/gedgo/static/styles/style-default.css +++ b/gedgo/static/styles/style-default.css @@ -1,16 +1,23 @@ /* Move down content because we have a fixed navbar that is 50px tall */ body { - background-color: #d5dce0; + background-color: #abd1c6; font-family: Camphor, Open Sans, Segoe UI, sans-serif; text-rendering: optimizeLegibility; + color: #001e1d; } a { - color: #537484; + color: #004643; +} +a:hover { + color: #004643; } .navbar { - background-color: #538463 !important; + background-color: #004643; +} +.navbar.navbar-inverse { + border: none; } .navbar-nav li a { color: #fcfcfc !important; @@ -18,30 +25,55 @@ a { .navbar-nav .dropdown .footlist a { color: #666 !important; } + +a.dropdown-toggle { + margin-top: 3px; + padding-bottom: 0; +} +.navbar-nav .open .dropdown-toggle, .navbar-nav .active a { - background-color: #6e9b7d !important; + background-color: #004643 !important; + color: #f9bc60 !important; } -.navbar-nav .open .dropdown-toggle { - background-color: #6e9b7d !important; +.btn-primary { + border: none; + background-color: #f9bc60 !important; } .navbar-brand { color: #fff !important; + padding-bottom: 35px; } .main-container { margin-top: 65px; } +.main-container > .row > div { + padding: 0 5px; +} + +.blog .time { + color: #999; +} + +.documentary, +.blog { + padding: 20px 0; + border-bottom: 1px solid #eee; +} + +.documentary:first-child, +.blog:first-child { + padding-top: 0; +} + .main { margin: 5px; - color: #666; - background-color: #fff; + color: #001e1d; + background-color: #fffffe; padding: 20px; border-radius: 5px; - border-style: solid; - border-color: #d3d3d3; - border-width: 1px; } .section { margin-top: 35px; @@ -55,6 +87,7 @@ a { min-height: 100%; max-height: 100%; margin-bottom: 10px; + border: 1px solid #eee } .subsection-thumb { display: block; @@ -84,9 +117,23 @@ a { min-height: 64px; } -.comment-area { +textarea.comment-area.form-control { resize: none; + appearance: none; + box-shadow: none; + outline: none; + border-radius: 0; + border: none; + background-color: #eee; + border-bottom: 2px solid #004643; +} +textarea.comment-area.form-control:focus { + background-color: #fffffe; + border-top: 1px solid #004643; + border-left: 1px solid #004643; + border-right: 1px solid #004643; } + .card { margin-bottom: 5px; } @@ -106,7 +153,7 @@ a { rect { fill: white; - stroke: teal; + stroke: #004643; stroke-width: 2; } path { diff --git a/gedgo/static/styles/style-login.css b/gedgo/static/styles/style-login.css index 538604c..699e738 100644 --- a/gedgo/static/styles/style-login.css +++ b/gedgo/static/styles/style-login.css @@ -28,16 +28,11 @@ body { .form-signin .form-control:focus { z-index: 2; } -.form-signin input[type="email"] { - margin-bottom: -1px; +.form-signin input { + margin-bottom: 5px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } -.form-signin input[type="password"] { - margin-bottom: 10px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} .pod { background-color: #FFFBFF; border-radius: 10px; @@ -45,4 +40,4 @@ body { margin: 0 auto; min-height: 80px; max-width: 380px; -} \ No newline at end of file +} diff --git a/gedgo/templates/default/base.html b/gedgo/templates/default/base.html index 4ac5275..fb6a02d 100644 --- a/gedgo/templates/default/base.html +++ b/gedgo/templates/default/base.html @@ -5,7 +5,7 @@ - + {% block headappend %}{% endblock %}
diff --git a/gedgo/templates/default/blogpost_list.html b/gedgo/templates/default/blogpost_list.html index 37266c8..ed47ba8 100644 --- a/gedgo/templates/default/blogpost_list.html +++ b/gedgo/templates/default/blogpost_list.html @@ -20,10 +20,10 @@