Skip to content

Commit

Permalink
fix: display multiple lines in footer studio
Browse files Browse the repository at this point in the history
Duplicate Richie footer behaviour to allow a multi-line branding footer.
fccn/nau-technical#173
  • Loading branch information
igobranco committed Jun 26, 2024
1 parent d4d8869 commit 5e1ca17
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,46 +78,50 @@ footer {

section#entities-quick-links {
background-color: white;
display: flex;
justify-content: space-between;
padding: 40px 50px;
flex-wrap: wrap;
padding: 25px 65px;

@media screen and (max-width: $breakpoint-medium) {
flex-direction: column;
padding-right: 0;
padding-left: 0;
}

& > div {
text-align: center;
padding-bottom: 10px;
.entities-quick-links__line {
display:flex;
justify-content: center;
gap: 1.5rem;
border-block-end: 1px solid #dedede;
padding: 1rem 0 1.6rem 0;

img {
max-width: 280px;
&:last-child {
border: none;
}

@media screen and (max-width: $breakpoint-small) {
max-width: 200px;
}
@media screen and (max-width: $breakpoint-medium) {
flex-direction: column;
align-items: center;
}
}

.entities-links-logo {
text-align: center;
padding-top: 10px;
padding-right: 5px;
padding-left: 5px;

.wp-caption-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
img {
max-width: calc(100vw - 20px);
max-height: 4.6rem;
}

@media screen and (max-width: $breakpoint-medium) {
padding: 10px 10px 0 10px;
margin-left: auto;
margin-right: auto;
}

&:first-child {
text-align: left;
padding-left: 0px;

@media screen and (max-width: $breakpoint-medium) {
text-align: center;
Expand All @@ -126,6 +130,7 @@ footer {

&:last-child {
text-align: right;
padding-right: 0px;

@media screen and (max-width: $breakpoint-medium) {
text-align: center;
Expand Down Expand Up @@ -159,3 +164,5 @@ footer {
}
}
}

//aaa
43 changes: 23 additions & 20 deletions edx-platform/nau-basic/cms/templates/widgets/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,30 +62,33 @@
</div>
</div>
</div>
<!--
<section id="entities-quick-links">
<ul class="flex-row">
<li><a href="https://nau.edu.pt"><img id="logo-nau" src="${static.url('images/nau_sempre_aprender.svg')}" alt="Logo NAU" title="NAU - Sempre a Aprender"></a>
<span id="copyright" >&copy; 2020 - FCT|FCCN. Todos os direitos reservados.</span>
</li>
<li><a id="logo-compete" href="https://www.fccn.pt/financiamento-projeto-nau/"><img src="${static.url('images/3logos-feder_small.png')}" alt="Logos: Compete, Portugal 2020 e União Europeia - Fundo Europeu de Desenvolvimento Regional" title="Compete 2020, Portugal 2020 e União Europeia - Fundo Europeu de Desenvolvimento Regional"></a></li>
<li><a id="logo-incode2030" href="https://www.incode2030.gov.pt/" target="_blank"><img src="${static.url('images/logo_incode2030_v3.png')}" alt="Portugal - INcode2030" title="Visitar o site INcode.2030"></a></li>
</ul>
</section>
-->

<%
entities_logos = static.get_value('NAU_ENTITIES_FOOTER', {}).get("itens", {})
%>
<!-- corporate entities logos -->
footer_logos = static.get_value('NAU_FOOTER_LOGOS', {}).get("itens", {})
%>
% if len(footer_logos)>0:
<section id="entities-quick-links">
% for entity in entities_logos:
<div class="entities-links-logo">
<a href="${entity['link']}" class="entity-link" target="_blank" rel="noreferer noopener">
<img src="${entity['image']}" alt="${entity['alt'] if 'alt' in entity.keys() else ''}">
</a>
</div>
<!-- institutional logos -->
% for row in footer_logos:
<section class="entities-quick-links__line">
% for item in row:
<div class="entities-links-logo">
<a href="${item.get('link','')}" class="entity-link" target="${item.get('target', '_blank')}" rel="noopener">
<img
loading="lazy"
src="${item.get('image', '')}"
alt="${item.get('alt', '')}"
title="${item.get('title', '')}"
width="${item.get('width', '')}"
height="${item.get('height', '')}" />
</a>
</div>
% endfor
</section>
% endfor
<!-- end of institutional logos -->
</section>
% endif
<section class="site-copyright">
<div class="site-copyright--nau">
<span>&copy; ${datetime.now().year} - FCT|FCCN<br>${_('All rights reserved')}</span>
Expand Down
2 changes: 1 addition & 1 deletion edx-platform/nau-basic/cms/templates/widgets/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="wrapper wrapper-l">
<h1 class="branding">
<a class="brand-link" href="/">
<img class="brand-image" src="${static.url('images/nau_sempre_aprender.svg')}" alt="${settings.STUDIO_NAME}" />
<img class="brand-image" src="${static.url('images/logo_nau_by_fccn_fct.svg')}" alt="${settings.STUDIO_NAME}" />
</a>
</h1>

Expand Down
Binary file modified edx-platform/nau-basic/conf/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions edx-platform/nau-basic/conf/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-06-26 09:27+0000\n"
"POT-Creation-Date: 2024-06-26 17:55+0100\n"
"PO-Revision-Date: 2021-06-02 21:22+0000\n"
"Last-Translator: NAU <[email protected]>\n"
"Language: en\n"
Expand Down Expand Up @@ -926,7 +926,7 @@ msgid ""
"trademarks or trademarks of {link_start}edX Inc.{link_end}"
msgstr ""

#: edx-platform/nau-basic/cms/templates/widgets/footer.html:91
#: edx-platform/nau-basic/cms/templates/widgets/footer.html:94
#: edx-platform/nau-basic/lms/templates/footer.html:95
msgid "All rights reserved"
msgstr ""
Expand Down
Binary file modified edx-platform/nau-basic/conf/locale/en/LC_MESSAGES/djangojs.mo
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-06-26 09:27+0000\n"
"POT-Creation-Date: 2024-06-26 17:55+0100\n"
"PO-Revision-Date: 2021-06-02 21:22+0000\n"
"Last-Translator: NAU <[email protected]>\n"
"Language: en\n"
Expand Down
Binary file modified edx-platform/nau-basic/conf/locale/pt_PT/LC_MESSAGES/django.mo
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-06-26 09:27+0000\n"
"POT-Creation-Date: 2024-06-26 17:55+0100\n"
"PO-Revision-Date: 2021-03-12 12:49+0000\n"
"Last-Translator: NAU <[email protected]>\n"
"Language: pt_PT\n"
Expand Down Expand Up @@ -1052,7 +1052,7 @@ msgid ""
"trademarks or trademarks of {link_start}edX Inc.{link_end}"
msgstr ""

#: edx-platform/nau-basic/cms/templates/widgets/footer.html:91
#: edx-platform/nau-basic/cms/templates/widgets/footer.html:94
#: edx-platform/nau-basic/lms/templates/footer.html:95
msgid "All rights reserved"
msgstr "Todos os direitos reservados"
Expand Down
Binary file modified edx-platform/nau-basic/conf/locale/pt_PT/LC_MESSAGES/djangojs.mo
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-06-26 09:27+0000\n"
"POT-Creation-Date: 2024-06-26 17:55+0100\n"
"PO-Revision-Date: 2021-06-02 21:22+0000\n"
"Last-Translator: NAU <[email protected]>\n"
"Language: pt_PT\n"
Expand Down

0 comments on commit 5e1ca17

Please sign in to comment.