From ae6b2cb1f2aa9c96f0d4ecff00158dbb4e6d5ed7 Mon Sep 17 00:00:00 2001 From: Liam Johnston Date: Tue, 11 Jun 2024 16:47:31 +1200 Subject: [PATCH] Person page FED updates --- .../global/components/person-hero.scss | 10 ++- templates/includes/person_hero.html | 77 ++++++++++--------- templates/people/person_page.html | 61 ++++++++++----- 3 files changed, 86 insertions(+), 62 deletions(-) diff --git a/cdhweb/static_src/global/components/person-hero.scss b/cdhweb/static_src/global/components/person-hero.scss index f809b8df..3b6cf848 100644 --- a/cdhweb/static_src/global/components/person-hero.scss +++ b/cdhweb/static_src/global/components/person-hero.scss @@ -31,19 +31,21 @@ Person hero. Similar to standard hero. Key differences: } @include lg { --title-top-space: 80px; - grid-template-areas: '. h h h h h h h h h h .' - '. . c c c c c c c c .'; + '. . c c c c c c c c c .'; } @include xl { --title-top-space: 104px; + grid-template-areas: + '. h h h h h h h h . . .' + '. . c c c c c c c . . .'; } @include xxl { --title-top-space: 160px; grid-template-areas: - '. h h h h h h h h h . .' - '. . c c c c c c c c . .'; + '. h h h h h h h h . . .' + '. . c c c c c c c . . .'; } // Different layout if the hero has an image: diff --git a/templates/includes/person_hero.html b/templates/includes/person_hero.html index d128bfa3..98852b1f 100644 --- a/templates/includes/person_hero.html +++ b/templates/includes/person_hero.html @@ -6,45 +6,48 @@

{{ self.title}}

{{ person.current_title }}

{{ page.education|richtext }}
- {% if self.tags %} -
- {% for tag in self.tags.all %} -
{{ tag }}
- {% endfor %} -
+ {% if self.tags.all %} +
+ {% for tag in self.tags.all %} +
{{ tag }}
+ {% endfor %} +
{% endif %} -
- - -
+ + {% if person.email or person.phone_number or person.office_location %} +
+ + +
+ {% endif %} {% if page.image %} {% comment %} diff --git a/templates/people/person_page.html b/templates/people/person_page.html index 8edf298b..9b9ff4c0 100644 --- a/templates/people/person_page.html +++ b/templates/people/person_page.html @@ -12,29 +12,48 @@ {% if page.body %} {% include_block page.body %} {% endif %} + + {% if recent_projects %} +
+
+

Recent projects

+
+
+ {% for project in recent_projects %} + {% include 'cdhpages/blocks/tile.html' with internal_page=project tile_type='internal_page_tile' %} + {% endfor %} +
+
+ {% endif %} + + {% if recent_events %} +
+
+

Recent events

+
+
+ {% for event in recent_events %} + {% include 'cdhpages/blocks/tile.html' with internal_page=event tile_type='internal_page_tile' %} + {% endfor %} +
+
+ {% endif %} + + {# TODO - when blog page exists #} + {% if recent_posts %} +
+
+

Recent posts

+
+
+ {% for post in recent_posts %} + {% include 'cdhpages/blocks/tile.html' with internal_page=post tile_type='internal_page_tile' %} + {% endfor %} +
+
+ {% endif %} -{% if recent_projects %} -

Recent Projects

- {% for project in recent_projects %} - {% include 'cdhpages/blocks/tile.html' with internal_page=project tile_type='internal_page_tile' %} - {% endfor %} -{% endif %} - -{% if recent_events %} -

Recent Events

- {% for event in recent_events %} - {% include 'cdhpages/blocks/tile.html' with internal_page=event tile_type='internal_page_tile' %} - {% endfor %} -{% endif %} - -{# TODO - when blog page exists #} -{% if recent_posts %} -

Recent Posts

- {% for post in recent_posts %} - {% include 'cdhpages/blocks/tile.html' with internal_page=post tile_type='internal_page_tile' %} - {% endfor %} -{% endif %} {% endblock %} \ No newline at end of file