diff --git a/assets/jobs/css/map.css b/assets/jobs/css/map.css new file mode 100644 index 00000000..ee16a54c --- /dev/null +++ b/assets/jobs/css/map.css @@ -0,0 +1,95 @@ +/* MAP */ + +.big-box, .mini-box { + text-align: center; + margin: 2px; + font-size: 1.5em; +} + +.big-box { + height: 900px; + line-height: 900px; +} + +.mini-box { + height: 300px; + /* height: auto; */ + line-height: 300px; +} + +.mapboxgl-popup { + max-width: 400px; + font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif; +} + +.map-overlay { + font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif; + position: absolute; + width: 25%; + top: 0; + left: 0; + padding: 10px; +} + +.map-overlay .map-overlay-inner { + background-color: #fff; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + border-radius: 3px; + padding: 10px; + margin-bottom: 10px; +} + +.map-overlay h2 { + line-height: 24px; + display: block; + margin: 0 0 10px; +} + +.map-overlay .legend .bar { + height: 10px; + width: 100%; + background: linear-gradient(to right, #fca107, #7f3121); +} + +.map-overlay input { + background-color: transparent; + display: inline-block; + width: 100%; + position: relative; + margin: 0; + cursor: ew-resize; +} + +a { + text-decoration: none; + color: #2dc4b2; +} + +/* #console { + position: absolute; + width: 240px; + margin: 10px; + padding: 10px 20px; + background-color: white; +} */ + +.map-slider { + margin-bottom: 20px; +} + +.lgd-row { + height: 12px; + width: 100%; +} + +.colors { + background: linear-gradient(to left, #2dc4b2, #3bb3c3, #669ec4, #8b88b6, #a2719b, #aa5e79); + margin-bottom: 5px; +} + +.label { + width: 15%; + display: inline-block; + text-align: center; + color: #000; +} diff --git a/assets/jobs/css/style.css b/assets/jobs/css/style.css index 6657d49f..91427c33 100644 --- a/assets/jobs/css/style.css +++ b/assets/jobs/css/style.css @@ -1,64 +1,33 @@ body { padding-top: 5rem; } + #main { padding: 40px 15px; text-align: center; } div#weekday rect { - fill: #FF0080; + fill: #FF0080; } div.chart svg { - width:110%; + width: 110%; height: 400px; } -/* MAP */ -#map { position: absolute; top:0; bottom:0; right:0; left:0; } -.info { - padding: 6px 8px; - font: 14px/16px Arial, Helvetica, sans-serif; - background: white; - background: rgba(255,255,255,0.8); - box-shadow: 0 0 15px rgba(0,0,0,0.2); - border-radius: 5px; -} -.info h4 { - margin: 0 0 5px; - color: #777; -} - -#map-container { - position: absolute; - padding-top: 5rem; - top:0; bottom:0; right:0; left:0; - height: 100%; - width: 100%; -} - -.mapboxgl-canvas-container { - - height: 100vh; - -} - -.mapboxgl-popup { - max-width: 400px; - font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif; - } - /*FOOTER*/ html { position: relative; min-height: 100%; } + body { /* Margin bottom by footer height */ margin-bottom: 60px; } + .footer { position: absolute; bottom: 0; @@ -69,7 +38,6 @@ body { color: #777; } - /*MISC*/ .btn-circle { @@ -83,8 +51,6 @@ body { border-radius: 15px; } - - /* @group Scroll to Top */ .scroll-to-top { @@ -93,22 +59,20 @@ body { color: #18bc9c; font-size: 12px; text-decoration: none; - position: fixed; bottom: 40px; right: 40px; - display:none; - + display: none; -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - -moz-background-clip: padding; + -moz-border-radius: 5px; + border-radius: 5px; + -moz-background-clip: padding; -webkit-background-clip: padding-box; - background-clip: padding-box; + background-clip: padding-box; } .scroll-to-top:hover { text-decoration: none; } -/* @end Scroll to Top */ +/* @end Scroll to Top */ \ No newline at end of file diff --git a/assets/jobs/js/map.js b/assets/jobs/js/map.js index 0c53cbaa..3ee3063d 100644 --- a/assets/jobs/js/map.js +++ b/assets/jobs/js/map.js @@ -1,6 +1,6 @@ $(document).ready(function () { var map = new mapboxgl.Map({ - container: 'map-container', + container: 'map-fr-metro', style: 'https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json', center: [2.6, 45.5], zoom: 4.7 @@ -17,22 +17,48 @@ $(document).ready(function () { // ADD DATA map.on('load', function () { - map.addSource("departements-fr", { - "type": "geojson", - "data": static_url + "jobs/geojson/fr_departements_jobs.geojson" + map.addLayer({ + id: "boundaries", + type: 'circle', + source: { + type: 'geojson', + data: static_url + "jobs/geojson/fr_departements_jobs_centroids.geojson" + }, + // filter: ['>=', ['number', ['get', 'JOBS_TOTAL']], 1], + paint: { + 'circle-radius': [ + 'interpolate', + ['linear'], + ['number', ['get', 'JOBS_TOTAL']], + 0, 4, + 5, 24 + ], + 'circle-color': [ + 'interpolate', + ['linear'], + ['number', ['get', 'JOBS_TOTAL']], + 0, '#2DC4B2', + 1, '#3BB3C3', + 2, '#669EC4', + 3, '#8B88B6', + 4, '#A2719B', + 5, '#AA5E79' + ], + 'circle-opacity': 0.8 + } }); - map.addLayer({ - "id": "boundaries", - 'type': 'fill', - 'layout': {}, - "source": "departements-fr", - 'paint': { - 'fill-color': '#AEBBFF', - 'fill-opacity': 0.7, - 'fill-outline-color': '#000000' + document.getElementById('slider').addEventListener('input', function (e) { + var year = parseInt(e.target.value); + console.log("selected year: " + year); + console.log("selected property: " + 'JOBS_' + year); - } + // update the map + // map.setFilter('boundaries', ['==', 'JOBS_' + year, 'JOBS_' + year]); + map.setPaintProperty('boundaries', 'circle-radius', ['number', ['get', 'JOBS_' + year]]); + + // update text in the UI + document.getElementById('active-year').innerText = year; }); // Change the cursor to a pointer when the mouse is over the states layer. diff --git a/assets/jobs/js/map_idf.js b/assets/jobs/js/map_idf.js new file mode 100644 index 00000000..24a27e6b --- /dev/null +++ b/assets/jobs/js/map_idf.js @@ -0,0 +1,63 @@ +$(document).ready(function () { + var map = new mapboxgl.Map({ + container: 'map-fr-idf', + style: 'https://openmaptiles.geo.data.gouv.fr/styles/osm-bright/style.json', + center: [2.35, 48.86], + zoom: 8 + }); + + // CUSTOM MAP + // disable map rotation using right click + drag + map.dragRotate.disable(); + // disable map rotation using touch rotation gesture + map.touchZoomRotate.disableRotation(); + + // Add zoom and rotation controls to the map. + // map.addControl(new mapboxgl.NavigationControl()); + + // ADD DATA + map.on('load', function () { + map.addSource("departements-fr", { + "type": "geojson", + "data": static_url + "jobs/geojson/fr_departements_jobs.geojson" + }); + + map.addLayer({ + "id": "boundaries", + 'type': 'fill', + 'layout': {}, + "source": "departements-fr", + 'paint': { + 'fill-color': '#AEBBFF', + 'fill-opacity': 0.7, + 'fill-outline-color': '#000000' + + } + }); + + // Change the cursor to a pointer when the mouse is over the states layer. + map.on('mouseenter', 'boundaries', function () { + map.getCanvas().style.cursor = 'pointer'; + }); + // Change it back to a pointer when it leaves. + map.on('mouseleave', 'boundaries', function () { + map.getCanvas().style.cursor = ''; + }); + + + // When a click event occurs on a feature in the states layer, open a popup at the + // location of the click, with description HTML from its properties. + map.on('click', 'boundaries', function (e) { + new mapboxgl.Popup() + .setLngLat(e.lngLat) + .setHTML('' + e.features[0].properties.nom + '' + + ' (' + e.features[0].properties.code + ')
' + e.features[0].properties.JOBS_TOTAL + ' offres') + .addTo(map); + }); + + map.on("load", function (e) { + map.resize(); + }); + }); + +}); diff --git a/elgeopaso/settings/base.py b/elgeopaso/settings/base.py index 645f91e1..aee9995f 100644 --- a/elgeopaso/settings/base.py +++ b/elgeopaso/settings/base.py @@ -191,23 +191,10 @@ "BACKEND": "django.template.backends.django.DjangoTemplates", # https://docs.djangoproject.com/fr/2.2/ref/settings/#template-dirs "DIRS": [str(PROJ_DIR / "templates")], + "APP_DIRS": False, "OPTIONS": { # https://docs.djangoproject.com/fr/2.2/ref/settings/#template-loaders # https://docs.djangoproject.com/fr/2.2/ref/templates/api/#loader-types - # "loaders": [ - # "django.template.loaders.cached.Loader" - # "django.template.loaders.app_directories.Loader", - # "django.template.loaders.filesystem.Loader", - # ], - "loaders": [ - ( - "django.template.loaders.cached.Loader", - [ - "django.template.loaders.filesystem.Loader", - "django.template.loaders.app_directories.Loader", - ], - ), - ], "context_processors": [ "django.template.context_processors.debug", "django.template.context_processors.request", diff --git a/elgeopaso/settings/local.py b/elgeopaso/settings/local.py index b047e955..1ebc1cc1 100644 --- a/elgeopaso/settings/local.py +++ b/elgeopaso/settings/local.py @@ -52,6 +52,10 @@ # http://whitenoise.evans.io/en/latest/django.html#using-whitenoise-in-development INSTALLED_APPS = ["whitenoise.runserver_nostatic"] + INSTALLED_APPS # noqa F405 +# TEMPLATES +# ------------------------------------------------------------------------------ +# https://docs.djangoproject.com/fr/2.2/ref/settings/#templates +TEMPLATES[-1]["APP_DIRS"] = True # noqa: F405 # EMAIL # ------------------------------------------------------------------------------ diff --git a/elgeopaso/templates/base.html b/elgeopaso/templates/base.html index f27c60a1..47757233 100644 --- a/elgeopaso/templates/base.html +++ b/elgeopaso/templates/base.html @@ -13,12 +13,6 @@ - - - - - - {% block title %}El Paso - Statistiques dynamiques sur l'emploi en géomatique{% endblock %} @@ -40,19 +34,12 @@ - - - - - - + - - {% endblock %} + + {% block custom_css %} {% endblock %} @@ -90,7 +77,8 @@
  • {% else %} -
  • +
  • +
  • {% endif %} {% if user.is_staff %}
  • @@ -101,19 +89,18 @@ {% endblock %} -
    - {% block content %} - {% endblock %} -
    + + {% block content %} + {% endblock %} + {% block js %} @@ -126,15 +113,6 @@ - - - - - - - {% endblock %} {% block custom_js %} {% endblock %} diff --git a/elgeopaso/templates/jobs/home.html b/elgeopaso/templates/jobs/home.html index e87bb2f0..ac05ce18 100644 --- a/elgeopaso/templates/jobs/home.html +++ b/elgeopaso/templates/jobs/home.html @@ -2,49 +2,59 @@ {% load admin_urls %} {% load static %} {% block content %} - -
    -
    -

    El Géo Paso

    -

    Statistiques dynamiques sur l'emploi en géomatique

    -

    - Consulter les statistiques -
    - sur les {{ nb_contrats }} offres parues du {{ first_date|date }} au {{ last_date }} -

    +
    + +
    +
    +

    El Géo Paso

    +

    Statistiques dynamiques sur l'emploi en géomatique

    +

    + Consulter les + statistiques +
    + sur les {{ nb_contrats }} offres parues du {{ first_date|date }} au + {{ last_date }} +

    +
    -
    -

    Une base unique

    -

    Tout géomaticien·ne francophone qui se respecte connaît GeoRezo et passe tôt ou tard par le forum Job. Ce forum, incontournable sans être exhaustif, est représentatif du marché de l'emploi du secteur de l'information géographique.

    +

    Tout géomaticien·ne francophone qui se respecte connaît GeoRezo et passe tôt ou tard par le forum + Job. Ce forum, incontournable sans être exhaustif, est représentatif du marché de l'emploi du + secteur de l'information géographique.

    - Consulter le forum Job sur GeoRezo » + Consulter + le forum Job sur GeoRezo »


    La démarche métier

    -

    Ce travail s'ancre dans la continuité de celui entamé par GeoRezo et l'AFIGéo depuis des années sur la reconnaissance des métiers de l'information géographique.

    +

    Ce travail s'ancre dans la continuité de celui entamé par GeoRezo et l'AFIGéo depuis des années sur + la reconnaissance des métiers de l'information géographique.

    - Consulter la démarche métiers » + Consulter la démarche métiers »


    Profession géomaticien·ne

    -

    Le métier de géomaticien n'a jamais été aussi dynamique… mais ce n'est pour autant pas facile de le décrire et de le faire connaître !
    Dans la continuité des démarches de reconnaissance des métiers de la géomatique, l’AFIGÉO et GeoRezo proposent un nouvel espace d’expression : le blog « Géomaticien » !

    +

    Le métier de géomaticien n'a jamais été aussi dynamique… mais ce n'est pour autant pas facile de le + décrire et de le faire connaître !
    Dans la continuité des démarches de reconnaissance des métiers + de la géomatique, l’AFIGÉO et GeoRezo proposent un nouvel espace d’expression : le blog « + Géomaticien » !

    - Consulter le blog » + Consulter le + blog »


    -
    -
    +
    @@ -53,42 +63,45 @@

    Profession géomaticien·ne


    -
    - -
    -
    -

    Nom

    -
    - - Logo ElPaso - -
    -
    - Pourquoi El Paso ? Depuis des temps immémoriaux, le choix d'un nom de projet informatique est cornélien. Né autour de fajitas et de rhum, le nom El Paso s'est imposé comme une évidence. Bien traduit, il représente le petit pas qui sépare un demandeur d'emploi d'un poste. Une simple offre, un simple pas... non, en fait, rien de tout cela, c'était juste parce-que les fajitas étaient bonnes ! + +
    +
    +

    Nom

    +
    + + Logo ElPaso + +
    +
    + Pourquoi El Paso ? Depuis des temps immémoriaux, le choix d'un nom de projet informatique est cornélien. + Né autour de fajitas et de rhum, le nom El Paso s'est imposé comme une évidence. Bien traduit, il + représente le petit pas qui sépare un demandeur d'emploi d'un poste. Une simple offre, un simple pas... + non, en fait, rien de tout cela, c'était juste parce-que les fajitas étaient bonnes ! +
    -
    -
    -

    Auteurs

    -
    - - Logo ElPaso - -
    -
    -

    Dans l'esprit Geotribu, on avait envie de faire un projet utile en utilisant des technos sympas.

    -
    - - Julien Moura - - - Pierre Vernier - +
    +

    Auteurs

    +
    + + Logo ElPaso + +
    +
    +

    Dans l'esprit Geotribu, on avait envie de faire un projet utile en utilisant des technos sympas.

    +
    -
    - {% endblock content %} diff --git a/elgeopaso/templates/jobs/map.html b/elgeopaso/templates/jobs/map.html index d08b5754..e55ce4c6 100644 --- a/elgeopaso/templates/jobs/map.html +++ b/elgeopaso/templates/jobs/map.html @@ -1,19 +1,80 @@ {% extends "base.html" %} {% load static %} {% block custom_css %} - + + + + + {% endblock %} + {% block content %} -
    +
    +
    +
    +

    Offres

    +
    +
    +
    +
    0
    +
    1
    +
    2
    +
    3
    +
    4
    +
    5+
    +
    +
    +
    +

    Année :

    + +
    +
    +
    -
    +
    +

    Offres d'emploi en Métropole

    +
    +
    +
    +
    +
    +

    Île-de-France

    +
    Carte d'Île-de-France
    +
    +
    +

    La Réunion

    +
    Carte de La Réunion
    +
    +
    +

    Guadeloupe

    +
    Carte de Guadeloupe
    +
    +
    +

    Martinique

    +
    Carte de Martinique
    +
    +
    +

    Guyane

    +
    Carte de Guyane
    +
    +
    +

    Mayotte

    +
    Carte de Mayotte
    +
    +
    +
    {% endblock content %} + {% block custom_js %} - + + + - -{% endblock %} + + +{% endblock %} \ No newline at end of file diff --git a/elgeopaso/templates/jobs/search.html b/elgeopaso/templates/jobs/search.html index 2a265ede..00b0b5d6 100644 --- a/elgeopaso/templates/jobs/search.html +++ b/elgeopaso/templates/jobs/search.html @@ -3,6 +3,7 @@ {% load widget_tweaks %} {% load tpl_extras %} {% block content %} +

    Chercher dans les archives

    @@ -33,12 +34,12 @@

    Chercher dans les archives

    {{ filter.form.content.label_tag }} {% render_field filter.form.content class="form-control" %}
    - {% if user.is_authenticated %} -
    - {{ filter.form.raw_offer__to_update.label_tag }} - {% render_field filter.form.raw_offer__to_update class="form-control" %} -
    - {% endif %} + {% if user.is_authenticated %} +
    + {{ filter.form.raw_offer__to_update.label_tag }} + {% render_field filter.form.raw_offer__to_update class="form-control" %} +
    + {% endif %}
    - - - {{ offer.raw_offer.to_update|yesno }} - {% endif %} - - {% empty %} - - Aucune offre ne correspond à la recherche - + + {{ offer.title }} + {{ offer.pub_date|date }} + {{ offer.contract }} + {{ offer.place }} + {% if user.is_authenticated %} + + + + + + {{ offer.raw_offer.to_update|yesno }} + {% endif %} + + {% empty %} + + Aucune offre ne correspond à la recherche + {% endfor %} @@ -88,17 +89,20 @@

    Chercher dans les archives

    -{% endblock content %} +
    +{% endblock content %} \ No newline at end of file diff --git a/elgeopaso/templates/jobs/stats.html b/elgeopaso/templates/jobs/stats.html index 91ab7359..fff63cc0 100644 --- a/elgeopaso/templates/jobs/stats.html +++ b/elgeopaso/templates/jobs/stats.html @@ -1,193 +1,212 @@ {% extends "base.html" %} {% load static %} + +{% block custom_css %} + + + + +{% endblock %} + {% block content %} -
    - -
    -
    -
    -
    -
    -
    - -
    -
    -
    {{ global_kpi.0 }}
    -
    Offres d'emploi répertoriées
    -
    +
    +
    + +
    +
    + -
    -
    -
    -
    -
    - -
    -
    -
    {{ global_kpi.1 }}%
    -
    ont un type de contrat reconnu
    -
    +
    +
    + -
    -
    -
    -
    -
    - -
    -
    -
    {{ global_kpi.2 }}%
    -
    sont correctement localisées
    -
    +
    +
    + -
    -
    -
    -
    -
    - -
    -
    -
    {{ global_kpi.3 }}%
    -
    d'offres par rapport à la même semaine l'an passé
    -
    +
    + - -
    -
    -
    -
    -

    -
    - -
    - -
    - +
    + +
    +
    +
    +
    +

    - -
    -
    -

    -
    - -
    - -
    - + +
    +
    - -
    -
    -

    -
    - -
    - -
    - + +
    + +
    +
    +

    -
    -
    -

    -
    - -
    - -
    - + +
    +
    - +
    - -
    -
    -
    -

    -
    - -
    - -
    - + +
    +
    +

    - -
    -
    -

    -
    -
    - -
    - + +
    + +
    + +
    +
    +
    +

    +
    + +
    + +
    + +
    + +
    + +
    +
    +
    +

    +
    + +
    + +
    + +
    + +
    +
    +

    +
    +
    +
    +
    -
    - + +
    + +
    + {% endblock content %} + {% block custom_js %} + + + + + + + {% endblock %} diff --git a/elgeopaso/templates/jobs/timeline.html b/elgeopaso/templates/jobs/timeline.html index 90f35521..ef234ff9 100644 --- a/elgeopaso/templates/jobs/timeline.html +++ b/elgeopaso/templates/jobs/timeline.html @@ -1,75 +1,82 @@ {% extends "base.html" %} {% load staticfiles %} + +{% block custom_css %} + + +{% endblock %} + {% block content %} -
    - -
      - {% for offer in last50 %} -
    • -
      - -
      -
      -
      -

      {{ offer.title }}

      -

      - - {{ offer.delay }} - le {{ offer.date|date }} à {{ offer.date|time }} -
      - {{ offer.place }} -
      -

      -
      -
      -

      {{ offer.description|capfirst }}

      -

      - {% for job in offer.jobs %} - - {{ job.name|capfirst }}

      - - {% empty %} - - Aucun métier détecté

      -
      - {% endfor %} -

      - {% for tech in offer.technos %} - {% if tech.type_soft == "SOFTWARE" %} - - {{ tech.name }} - - {% elif tech.type_soft == "LANGUAGE" %} - - {{ tech.name }} - - {% else %} - - {{ tech.name }} - - {% endif %} - {% empty %} - - Aucun logiciel ou langage détecté. - - {% endfor %} -

      - -
      -
      -
    • - {% endfor %} -
    -
    +
    + -

    +
      + {% for offer in last50 %} +
    • +
      + +
      +
      +
      +

      {{ offer.title }}

      +

      + + {{ offer.delay }} - le {{ offer.date|date }} à {{ offer.date|time }} +
      + {{ offer.place }} +
      +

      +
      +
      +

      {{ offer.description|capfirst }}

      +

      + {% for job in offer.jobs %} + + {{ job.name|capfirst }}

      + + {% empty %} + + Aucun métier détecté

      +
      + {% endfor %} +

      + {% for tech in offer.technos %} + {% if tech.type_soft == "SOFTWARE" %} + + {{ tech.name }} + + {% elif tech.type_soft == "LANGUAGE" %} + + + {{ tech.name }} + + {% else %} + + {{ tech.name }} + + {% endif %} + {% empty %} + + Aucun logiciel ou langage détecté. + + {% endfor %} +

      + +
      +
      +
    • + {% endfor %} +
    +
    +
    +

    {% endblock content %}