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

feat: layout and cards #35

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 2 additions & 0 deletions src/_data/translations.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"en": {
"contact-us": "Contact Us",
"contact-us-address": "Address",
"contact-us-email": "Email",
"contact-us-phone": "Phone",
"social-media": "Social Media"
},
"fr": {
"contact-us": "Contactez-nous",
"contact-us-address": "Adresse",
"contact-us-email": "Courriel",
"contact-us-phone": "Téléphone",
Expand Down
82 changes: 80 additions & 2 deletions src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,87 @@
{% include "partials/global/stylesheets.njk" %}
</head>
<body>
{% include "partials/global/language-selector.njk" %}
<h1>{{ title }}</h1>
{# example datas TODO: populate datas from different collections #}
{% set displayItems = ['1', '2', '3'] %}
{% set cardTitle = "Card Title" %}
{% set cardBody = "Lorem ipsum dolor sit amet, consectetur adipiscing elit" %}
{% if hasBanner %}
<div class="banner bg-{{ bannerBGColor }}">
<div class="banner__text">
<div class="banner__title">
{{ bannerTitle | safe }}
</div>
{{ bannerBody }}
</div>
{% if bannerImage %}
<div class="banner__image">
{{ bannerImage }}
</div>
{% endif %}
</div>
{% endif %}
{{ content | safe }}
{% if displayProjects %}
{% set cardImage = "yes" %}
<div class="display bg-indigo-200">
<div class="display__title">
<h2>Projects</h2>
</div>
<div class="display__items">
{% set cardType = "project" %}
{% for item in displayItems %}
{% include "partials/components/card.njk" %}
{% endfor %}
</div>
<div class="display__link">
</div>
</div>
{% endif %}
{% if displayEvents %}
<div class="display bg-indigo-100">
<div class="display__title">
<h2>Events</h2>
</div>
<div class="display__items">
{% set cardType = "event" %}
{% for item in displayItems %}
{% include "partials/components/card.njk" %}
{% endfor %}
</div>
<div class="display__link">
</div>
</div>
{% endif %}
{% if displayResources %}
<div class="display bg-indigo-200">
<div class="display__title">
<h2>Resources</h2>
</div>
<div class="display__items">
{% set cardType = "resource" %}
{% for item in displayItems %}
{% include "partials/components/card.njk" %}
{% endfor %}
</div>
<div class="display__link">
</div>
</div>
{% endif %}
{% if displayNews %}
<div class="display bg-indigo-700">
<div class="display__title">
<h2>Announcements</h2>
</div>
<div class="display__items">
{% set cardType = "news" %}
{% for item in displayItems %}
{% include "partials/components/card.njk" %}
{% endfor %}
</div>
<div class="display__link">
</div>
</div>
{% endif %}
{% include "partials/global/footer.njk" %}
</body>
</html>
36 changes: 36 additions & 0 deletions src/_includes/partials/components/card.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<div class="card">
{% if cardImage %}
<div class="card__image">
</div>
{% endif %}
<div class="card__content">
<div class="card__title">
<h4>{{ cardTitle }}</h4>
</div>
{% if cardType === "event" %}
<div class="card__event-status">
<p>Upcoming</p>
</div>
{% endif %}
{% if cardType === "event" or cardType === "news" %}
<div class="card__date">
<p>March 15, 2024</p>
</div>
{% endif %}
{% if cardType === "resource" %}
<div class="card__publisher">
</div>
{% endif %}
<div class="card__body">
<p>{{ cardBody }}</p>
</div>
{% if cardType === "resource" %}
<div class="card__resource-type">
</div>
{% endif %}
{% if cardType === "resource" or cardType === "news" %}
<div class="card__tag">
</div>
{% endif %}
</div>
</div>
68 changes: 46 additions & 22 deletions src/_includes/partials/global/footer.njk
Original file line number Diff line number Diff line change
@@ -1,29 +1,53 @@
<footer role="contentinfo">
<div class="container">
<div class="social-media">
<nav aria-label="{% __ 'social-media' %}">
{% __ 'social-media' %}
<ul role="list">
<li><a href="https://www.facebook.com/" rel="external">{% include "svg/facebook.svg" %} Facebook</a></li>
<li><a href="https://www.linkedin.com/" rel="external">{% include "svg/linkedin.svg" %} LinkedIn</a></li>
<li><a href="https://twitter.com/" rel="external">{% include "svg/x.svg" %} X</a></li>
<li><a href="https://www.youtube.com/" rel="external">{% include "svg/youtube.svg" %} YouTube</a></li>
</ul>
</nav>
<div class="footer__container">
<div class="footer__title">
<div><b>inclusive</b></div>
<div>standards</div>
</div>
<div class="contact-us">
{% __ 'contact-us' %}
<div class="contact-us-item">
{% __ 'contact-us-email' %}
<div class="footer__content">
<div class="footer__section">
<hr>
<div class="footer__social-media">
<nav aria-label="{% __ 'social-media' %}">
<h4>{% __ 'social-media' %}</h4>
<ul role="list">
<li><a href="https://www.facebook.com/" rel="external">{% include "svg/facebook.svg" %} Facebook</a></li>
<li><a href="https://www.linkedin.com/" rel="external">{% include "svg/linkedin.svg" %} LinkedIn</a></li>
<li><a href="https://www.instagram.com/" rel="external">{% include "svg/instagram.svg" %} Instagram</a></li>
<li><a href="https://twitter.com/" rel="external">{% include "svg/x.svg" %} X</a></li>
<li><a href="https://www.youtube.com/" rel="external">{% include "svg/youtube.svg" %} YouTube</a></li>
</ul>
</nav>
</div>
</div>
<div class="contact-us-item">
{% __ 'contact-us-phone' %}
<div class="footer__section">
<hr>
<div class="footer__contact-us">
<h4>{% __ 'contact-us' %}</h4>
<div class="footer__contact-us-item">
<div class="footer__contact-us-item-title">
{% __ 'contact-us-email' %}
</div>
</div>
<div class="footer__contact-us-item">
<div class="footer__contact-us-item-title">
{% __ 'contact-us-phone' %}
</div>
</div>
<div class="footer__contact-us-item">
<div class="footer__contact-us-item-title">
{% __ 'contact-us-address' %}
</div>
</div>
</div>
</div>
<div class="footer__section">
<hr>
<div class="footer__sponsors">
{% include "svg/IDRC.svg" %}
{% include "svg/OCADU.svg" %}
</div>
</div>
<div class="contact-us-item">
{% __ 'contact-us-address' %}
</div>
</div>
<div class="sponsors">
</div>
</div>
</footer>
Expand Down
Loading