Remove navigation links from footer (#14041)
* Remove navigation links from footer * Remove unneeded spec * Target correct link * Fix gems
This commit is contained in:
parent
f8e56b356e
commit
9ae417d0ff
3 changed files with 1 additions and 37 deletions
|
|
@ -1,24 +1,5 @@
|
|||
<footer class="crayons-footer print-hidden">
|
||||
<div id="footer-container" class="crayons-layout crayons-layout--limited-m crayons-footer__container">
|
||||
<% unless ForemInstance.private? %>
|
||||
<nav class="m:-mt-4" aria-label="Site information">
|
||||
<a href="/" class="crayons-link inline-block p-2">Home</a>
|
||||
<% NavigationLink.ordered.each do |link| %>
|
||||
<% if !link.display_only_when_signed_in? || (link.display_only_when_signed_in? && user_signed_in?) %>
|
||||
<a href="<%= link.url %>" class="crayons-link inline-block p-2"><%= link.name %></a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% unless user_signed_in? %>
|
||||
<a href="<%= sign_up_path %>" class="crayons-link fw-bold inline-block p-2">Sign In/Up</a>
|
||||
<% else %>
|
||||
<a href="/new" class="crayons-link fw-bold inline-block p-2">Create Post</a>
|
||||
<% end %>
|
||||
|
||||
<div class="pt-4"><%= render partial: "layouts/social_media" %></div>
|
||||
</nav>
|
||||
<hr class="crayons-footer__divider">
|
||||
<% end %>
|
||||
<p class="fs-s crayons-footer__description"><a href="/" aria-label="<%= community_name %> Home" class="crayons-link"><%= community_name %></a> – <%= Settings::Community.community_description %></p>
|
||||
<div class="m:-mb-4 crayons-footer__description">
|
||||
<%# The following copy is necessary for compatibility with the Forem AGPL licence which requires instances to link back to the source. %>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ describe('Home Page Left Sidebar', () => {
|
|||
|
||||
// go back to the homepage with InstantClick
|
||||
cy.intercept('/?i=i').as('homepage');
|
||||
cy.findAllByText('Home').last().click();
|
||||
cy.findAllByRole('link', { name: 'DEV(local) Home' }).first().click();
|
||||
cy.wait('@homepage');
|
||||
|
||||
// Wait for home page to load
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe "Layout", type: :system do
|
||||
context "when rendering the footer" do
|
||||
it "displays navigation links for public Forems" do
|
||||
allow(ForemInstance).to receive(:private?).and_return(false)
|
||||
visit root_path
|
||||
expect(page).to have_selector("footer nav")
|
||||
end
|
||||
|
||||
it "does not display navigation links for private Forems" do
|
||||
allow(ForemInstance).to receive(:private?).and_return(true)
|
||||
visit root_path
|
||||
expect(page).not_to have_selector("footer nav")
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue