From 05f457b7a6126a7ac7d771c20e2463a531bc9dff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Thu, 22 Sep 2016 17:47:00 +0200 Subject: [PATCH] Fix the logos, and add the project details implementation --- app/static/src/sass/modules/_all.scss | 1 + .../src/sass/modules/_project-details.scss | 99 +++++++ app/templates/core/inc/logo.html | 18 +- app/templates/pages/custompage.html | 20 +- app/templates/projects/project_detail.html | 250 +++++++++++++----- 5 files changed, 306 insertions(+), 82 deletions(-) create mode 100644 app/static/src/sass/modules/_project-details.scss diff --git a/app/static/src/sass/modules/_all.scss b/app/static/src/sass/modules/_all.scss index ba59dbaa..cefe9f5e 100755 --- a/app/static/src/sass/modules/_all.scss +++ b/app/static/src/sass/modules/_all.scss @@ -31,6 +31,7 @@ @import 'share-links'; @import 'partners-list'; @import 'banner'; +@import 'project-details'; // Typography modules @import 'dashed'; diff --git a/app/static/src/sass/modules/_project-details.scss b/app/static/src/sass/modules/_project-details.scss new file mode 100644 index 00000000..8ab36648 --- /dev/null +++ b/app/static/src/sass/modules/_project-details.scss @@ -0,0 +1,99 @@ +$module: ".project-details"; + +#{$module} { + + &__title { + + text-align: left; + @include padding-left(2); + margin-left: 200px; + @include margin-top(0); + + @include mq($until: lg) { + margin-left: 150px; + } + + @include mq($until: md) { + margin-left: 150px; + } + + @include mq($until: sm) { + margin-left: 0; + padding-left: 0; + } + + } + + &__item { + + + } + + &__item-title { + + font-weight: weight(bold); + float: left; + clear: both; + width: 200px; + text-align: right; + @include margin-right(2); + + @include mq($until: lg) { + width: 150px; + } + + @include mq($until: md) { + width: 150px; + } + + @include mq($until: sm) { + float: none; + text-align: left; + } + + } + + &__item-desc { + + float: left; + width: 200px; + @include font-size(m); + font-weight: weight(light); + + @include mq($until: lg) { + width: 200px; + } + + @include mq($until: md) { + width: 200px; + } + + @include mq($until: sm) { + float: none; + } + + } + + &__logo { + + clear: both; + @include padding-left(0); + margin-left: 200px; + text-align: left; + + @include mq($until: lg) { + margin-left: 150px; + } + + @include mq($until: md) { + margin-left: 150px; + } + + @include mq($until: sm) { + margin-left: 0; + @include margin-bottom(2); + } + + } + +} diff --git a/app/templates/core/inc/logo.html b/app/templates/core/inc/logo.html index 4cd6b567..a3167990 100644 --- a/app/templates/core/inc/logo.html +++ b/app/templates/core/inc/logo.html @@ -1,18 +1,6 @@ {% load mezzanine_tags i18n %} {% if images %} -
-
-
-
-
-
    - {% for image in images %} -
  • {{ image.title }}
  • - {% endfor %} -
-
-
-
-
-
+ {% for image in images %} +
  • {{ image.title }}
  • + {% endfor %} {% endif %} diff --git a/app/templates/pages/custompage.html b/app/templates/pages/custompage.html index fbaf1de4..a9d18eb3 100644 --- a/app/templates/pages/custompage.html +++ b/app/templates/pages/custompage.html @@ -115,7 +115,21 @@ {% endblock %} {% block logo %} - {% with page.custompage.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} + {% with page.custompage.images.all|get_type:'logo' as images %} + {% if images %} +
    +
    +
    +
    +
    +
      + {% include 'core/inc/logo.html' %} +
    +
    +
    +
    +
    +
    + {% endif %} + {% endwith %} {% endblock %} diff --git a/app/templates/projects/project_detail.html b/app/templates/projects/project_detail.html index 91a76c83..32a5ccfb 100644 --- a/app/templates/projects/project_detail.html +++ b/app/templates/projects/project_detail.html @@ -1,6 +1,31 @@ {% extends "pages/page.html" %} {% load mezzanine_tags keyword_tags i18n organization_tags %} +{% block meta_title %}{{ project.meta_title }}{% endblock %} + +{% block meta_keywords %}{% metablock %} +{% keywords_for project as keywords %} +{% for keyword in keywords %} + {% if not forloop.first %}, {% endif %} + {{ keyword }} +{% endfor %} +{% endmetablock %}{% endblock %} + +{% block page_class %} + project +{% endblock %} + +{% block breadcrumb_menu %} + + {{ block.super }} + + {% comment %} + + {% endcomment %} + + + +{% endblock %} {% block page_title %} @@ -8,96 +33,193 @@

    {{ project.title }}

    {% endeditable %} + {% if project.description %} + {% editable project.description %} +
    + {{ project.description }} +
    + {% endeditable %} + {% endif %} + {% endblock %} {% block page_content %} - {% if project.description %} - {{ project.description }} - {% endif %} - {% if project.content %} - {{ project.content|richtext_filters|safe }} - {% endif %} + {% if project.content %} + {{ project.content|richtext_filters|safe }} + {% endif %} + {% endblock %} {% block page_audio %} - {% with project.audios.all as audios %} - {% if audios %} - {% include 'core/inc/audio.html' %} - {% endif %} - {% endwith %} + {% with project.audios.all as audios %} + {% if audios %} + {% include 'core/inc/audio.html' %} + {% endif %} + {% endwith %} {% endblock %} {% block page_slider %} - {% with project.images.all|get_type:'page_slider' as slider_images %} - {% if slider_images %} - {% include 'core/inc/slider.html' %} - {% endif %} - {% endwith %} + {% with project.images.all|get_type:'page_slider' as slider_images %} + {% if slider_images %} + {% include 'core/inc/slider.html' %} + {% endif %} + {% endwith %} {% endblock %} {% block page_video %} {% with project.videos.all as videos %} - {% if videos %} - {% include 'core/inc/video.html' %} - {% endif %} + {% if videos %} + {% include 'core/inc/video.html' %} + {% endif %} {% endwith %} {% endblock %} {% block page_sub_content %} {% with project.blocks.all as blocks %} - {% include "core/inc/block.html" %} + {% include "core/inc/block.html" %} {% endwith %} {% endblock %} {% block page_related_content %} -
    -
    - {% trans "Project details" %}
    - - {% if project.program %} - {% trans "Program" %} {{ project.program }}
    - {% endif %} - - {% if project.program_type %} - {% trans "Program type" %} {{ project.program_type }}
    - {% endif %} - {% trans "Beginning" %} {{ project.date_from }}
    - {% trans "End" %} {{ project.date_to }}
    - {% trans "Status" %} {{ project.project_status }}
    +
    +
    +
    +
    +
    +
    +
    +

    {% trans "Project details" %}

    + +
    + {% if project.program %} +
    +
    + {% trans "Program" %} +
    +
    + {{ project.program }} +
    +
    + {% endif %} + + {% if project.program_type %} +
    +
    + {% trans "Program type" %} +
    +
    + {{ project.program_type }} +
    +
    + {% endif %} + +
    +
    + {% trans "Beginning" %} +
    +
    + {{ project.date_from }} +
    +
    + +
    +
    + {% trans "End" %} +
    +
    + {{ project.date_to }} +
    +
    + +
    +
    + {% trans "Status" %} +
    +
    + {{ project.project_status }} +
    +
    + + {% if project.website %} +
    +
    + {% trans "Website" %} +
    + +
    + {% endif %} + + + +
    +
    +
    +
    +
    +

    {% trans "Participants" %}

    + +
    + + {% if project.lead_team %} +
    +
    + {% trans "Project lead team" %} +
    +
    + {{ project.lead_team }} +
    +
    + {% endif %} + +
    +
    + {% trans "Partners" %} +
    +
    + {% for team in project.teams.all %} + {{ team }}
    + {% endfor %} + {% for organization in project.organizations.all %} + {{ organization }}
    + {% endfor %} +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    - {% if project.website %} - {% trans "Website" %} {{ project.website }}
    - {% endif %} - - {% with project.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} -
    -
    - {% trans "Participants" %}
    - - {% if project.lead_team %} - {% trans "Project lead team"%} {{ project.lead_team }}
    - {% endif %} - - {% trans "Partners" %} - - {% for team in project.teams.all %} - {{ team }}
    - {% endfor %} - {% for organization in project.organizations.all %} - {{ organization }}
    - {% endfor %} -
    -
    {% endblock %} {% block logo %} -{% for organization in project.organizations.all %} - {% with organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} -{% endfor %} +
    +
    +
    +
    +
    +
      + {% for organization in project.organizations.all %} + {% with organization.images.all|get_type:'logo' as images %} + {% include 'core/inc/logo.html' %} + {% endwith %} + {% endfor %} +
    +
    +
    +
    +
    +
    {% endblock %} -- 2.39.5