Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Citizen engagement page to show missing message #4056

Merged
merged 16 commits into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions _includes/citizen-engagement-cards.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{% assign visible_projects = site.projects | where: "program-area", "Citizen Engagement" | where: "visible", "true" %}
{% for item in visible_projects %}
<div class="page-card card-primary page-card-lg program-area" data-dropdown>
{%- if
item.problem.size > 0 and
item.solution.size > 0 and
item.impact.size > 0 and
item.sdg.size > 0 and
item.card-image-src.size > 0 and
item.sdg-image-src.size > 0
-%}
<div class="page-card card-primary page-card-lg program-area" data-dropdown>
<img class="card-image" src="{{ item.card-image-src }}" alt="{{ item.card-image-alt }}"/>
<div class="mobile-card-info-container">
<div class="mobile-card-nav">
Expand All @@ -21,14 +29,23 @@ <h4>Solution</h4>
<h4>Impact</h4>
<p>{{ item.impact }}</p>
</div>
</div>
</div>
<div class="sustainable-dev-goal">
<h4>Sustainable Development Goal</h4>
<div class="card-bottom-info">
<img class="sdg-image" src="{{ item.sdg-image-src }}" alt="{{ item.sdg-image-alt }}" />
<p>{{ item.sdg }}</p>
</div>
</div>
</div>
</div>
<div class="sustainable-dev-goal">
<h4>Sustainable Development Goal</h4>
<div class="card-bottom-info">
<img class="sdg-image" src="{{ item.sdg-image-src }}" alt="{{ item.sdg-image-alt }}" />
<p>{{ item.sdg }}</p>
</div>
</div>
</div>
{%- else -%}
<div class="page-card card-primary page-card-lg missing-area" data-dropdown>
<div class="mobile-card-info-container">
{% assign project_relative_path = item.slug | prepend: "../projects/" %}
<h3><a class="project-card-mini-title" href="{{ project_relative_path }}">{{ item.title }}</a></h3>
<p>We are currently drafting the Problem, Solution and Impact statements for this project.</p>
</div>
</div>
{% endfor %}
{%- endif -%}
{% endfor %}
29 changes: 27 additions & 2 deletions _sass/components/_citizen_engagement.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@

//This is the default styling for the cards when they are in mobile view.
//project-dropdown and sustainable-dev-goal are defaulted to display:none until given the "activated" class attribute
.program-area {

.program-area,
.missing-area {
.mobile-card-info-container {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -58,6 +60,20 @@
}
}

.missing-area {
.mobile-card-info-container {
align-items: center;

h3 {
margin-bottom: 10px;
color: $color-red;
}
p {
text-align: center;
}
}
}

.organizations {
padding: 44px;
display: flex;
Expand Down Expand Up @@ -145,7 +161,8 @@
//The styling for the card is column based until we reach desktop width
@media #{$bp-mobile-up} {

.program-area {
.program-area,
.missing-area {
display: flex;
padding: 44px;
flex-direction: column;
Expand Down Expand Up @@ -215,6 +232,14 @@
max-width: 1080px !important;
}

.missing-area {
padding: 44px;
max-width: 1080px;
.mobile-card-info-container {
padding: 0px;
}
}

.program-area {
display: grid;
grid-template-columns: 1fr 1fr;
Expand Down