Move footer to sidebar on home/post index page (#19784)

* Rebased with main

* Footer visibility bug fix

* Minor fix

* Added tests

* Removed initializeFooter as it is not working as expected

* JS code updated as per suggestion

* Updated cache details

* Rebased with main

* Minor fixes

* Minor fixes

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Update .github/ISSUE_TEMPLATE/-core-team-only---new-approved-feature.md

* Removed JS logic

* Nit fix
This commit is contained in:
Rajat Talesra 2023-08-02 19:13:10 +05:30 committed by GitHub
parent 15e3c5ec7c
commit d1a2fd1e6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 3 deletions

View file

@ -9,6 +9,10 @@
}
}
.stories-index + #footer {
display: none;
}
.crayons-footer {
--footer-padding: var(--su-5);
background: var(--footer-bg);
@ -30,6 +34,10 @@
}
}
.sidebar-footer {
color: var(--color-secondary);
}
.dot {
height: var(--su-1);
width: var(--su-1);
@ -42,6 +50,6 @@
list-style-type: none;
li:last-child .dot {
display:none
display: none;
}
}
}

View file

@ -7,6 +7,9 @@
<% end %>
<div class="js-display-ad-container" data-async-url="<%= billboard_path(placement_area: :sidebar_left) %>"></div>
<div class="js-display-ad-container pt-4" data-async-url="<%= billboard_path(placement_area: :sidebar_left_2) %>"></div>
<% cache("footer-modal-#{ForemInstance.deployed_at}-#{Settings::General.admin_action_taken_at&.rfc3339}", expires_in: 24.hours) do %>
<%= render "layouts/sidebar_footer" %>
<% end %>
</aside>
</div>

View file

@ -5,7 +5,7 @@
}
end %>
<footer class="crayons-footer print-hidden">
<footer id="footer" class="crayons-footer print-hidden">
<div id="footer-container" class="crayons-footer__container">
<p class="fs-s crayons-footer__description">
<%= t("views.main.footer.desc_html", community: link_to(community_name, root_path, class: "c-link c-link--branded fw-medium", "aria-label": t("views.main.aria_home", community: community_name)), desc: Settings::Community.community_description) %>

View file

@ -0,0 +1,15 @@
<footer class="mt-6 fs-s sidebar-footer">
<p>
<%= t("views.main.footer.sidebar_desc_html", community: link_to(community_name, root_path, class: "c-link c-link--branded fw-medium", "aria-label": t("views.main.aria_home", community: community_name)), desc: Settings::Community.community_description) %>
</p>
<%# The following copy is necessary for compatibility with the Forem AGPL licence which requires instances to link back to the source. %>
<p class="mt-4"><%= t("views.main.footer.built.text_html",
forem: link_to(t("views.main.footer.built.forem"), "https://www.forem.com", class: "c-link c-link--branded", target: "_blank", rel: "noopener"),
opensource: link_to(t("views.main.footer.built.opensource"), "https://dev.to/t/opensource", target: "_blank", rel: "noopener", class: "c-link c-link--branded"),
dev: link_to(t("views.main.footer.built.dev"), "https://dev.to", target: "_blank", rel: "noopener", class: "c-link c-link--branded")) %></p>
<p class="mt-4"><%= t("views.main.footer.powered.text_html",
rails: link_to(t("views.main.footer.powered.rails"), "https://dev.to/t/rails", target: "_blank", rel: "noopener", class: "c-link c-link--branded"),
community: community_name,
copyright: copyright_notice) %></p>
</footer>

View file

@ -66,5 +66,6 @@ en:
powered:
text_html: Made with love and %{rails}. %{community} <span title="copyright">&copy;</span> %{copyright}.
rails: Ruby on Rails
sidebar_desc_html: "%{community}\n%{desc}"
create_post: Create Post
signout: Sign Out

View file

@ -66,5 +66,6 @@ fr:
powered:
text_html: Made with love and %{rails}. %{community} <span title="copyright">&copy;</span> %{copyright}.
rails: Ruby on Rails
sidebar_desc_html: "%{community}\n%{desc}"
create_post: Créer une publication
signout: Se déconnecter