Skip to content

Commit

Permalink
cleanup css
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace-Amondi committed Jun 13, 2023
1 parent cfa498e commit d822e06
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 20 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,3 @@ media/
cache/
nginx/
dumpdata.json
site_settings/data/
1 change: 1 addition & 0 deletions forecasts_dump.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion home/templates/section/forecast_include.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% endfor %}
{% endfor %}

<section class="{% if not self.enable_weather_forecasts or not self.get_forecast_by_city.forecasts %} pt-0 {% endif %} pb-6" >
<section class="{% if not self.enable_weather_forecasts or self.get_forecast_by_city.forecasts|length < 1 %} pt-8 {% else %} pt-0 {% endif %} pb-6" >
<div class="container">
<div class="columns is-justify-content-center">
<div class="column is-11">
Expand Down
7 changes: 4 additions & 3 deletions nmhs_cms/templates/navigation/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@

<div class="column is-one-fifth-desktop is-half-mobile">

<p class="footer-link-title is-uppercase title">
<a>OUR OFFICE</a>
</p>

{% comment %} <div class="address"> {% endcomment %}


{% if settings.site_settings.OrganisationSetting.address %}
<p class="footer-link-title is-uppercase title">
<a>OUR OFFICE</a>
</p>
<a class="footer-link">
{{settings.site_settings.OrganisationSetting.address|richtext}}
</a>
Expand Down
2 changes: 2 additions & 0 deletions nmhs_cms/templates/navigation/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
</div>
</div>
</nav>
{% if menu_items|length > 0%}
<nav class="navbar is-justify-content-center is-align-content-center bottom-nav" role="navigation"
aria-label="main navigation" id="sticky_nav" style="z-index:3">

Expand All @@ -169,6 +170,7 @@

</div>
</nav>
{% endif %}

</div>

Expand Down
65 changes: 65 additions & 0 deletions site_settings/data/countries_extents.geojson

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions site_settings/loaders.py

This file was deleted.

Empty file.
Empty file.
38 changes: 38 additions & 0 deletions site_settings/management/commands/load_countries.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import logging
import json

from django.core.management.base import BaseCommand
from django.contrib.gis.geos import GEOSGeometry
from site_settings.models import Country


# Define the base URL for the Met Norway API
BASE_URL = "https://api.met.no/weatherapi/locationforecast/2.0/compact"
headers = {
'User-Agent':'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36'
}

logger = logging.getLogger(__name__)

default_options = () if not hasattr(BaseCommand, 'option_list') \
else BaseCommand.option_list


class Command(BaseCommand):
help = ('autotranslate all the message files that have been generated '
'using the `makemessages` command.')

def handle(self, *args, **options):
with open('/home/app/web/nmhs-cms/site_settings/data/countries_extents.geojson') as f:
data = json.load(f)

for feature in data['features']:
name = feature['properties']['name']
iso = feature['properties']['iso3']
size = feature['properties']['size']
print("Country: ",name)
geom = GEOSGeometry(json.dumps(feature['geometry']))
country = Country(name=name, geom=geom, iso=iso, size=size)
country.save()


0 comments on commit d822e06

Please sign in to comment.