Skip to content
Open
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
3 changes: 2 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
body {
margin: 0;
background-color: rgb(243, 230, 225);
min-height: 100vh;
}

.jumbotron {
Expand All @@ -42,7 +43,7 @@ body {
}

.footer {
bottom: 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Code Hygiene]
If this is not longer needed, its cleaner to just remove it over commenting it out.

//bottom: 0;
width: 100%;
text-align: center;
position: absolute;
Expand Down
5 changes: 4 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@

<!-- navbar -->
<ul class="nav justify-content-end">
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Groups</a>
</li>
Expand All @@ -43,7 +46,7 @@

<%= yield %>

<footer class="footer bg-warning border-top border-dark pt-2 mb-0">
<footer class="footer bg-warning border-top border-dark pt-2 mb-0 fixed-bottom">
<p>&copy; 2022 </p>
</footer>
</body>
Expand Down
14 changes: 14 additions & 0 deletions app/views/sessions/about.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class "container">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Separation of Responsibilities]
The sessions are responsible for handling authentication/authorization, not really about handling static pages. Putting the about page here creates what's known as "tight coupling" between static pages and sessions, which is bad because it makes maintenance of the two difficult because if you change one the other may get broken.

Instead, we should add separate handling for static pages.
This treehouse blog explains how to accomplish this.

<div class="row">
<div class="col-sm-2"></div>
<div class="col-sm-8">
<h2 class="text-center">ABOUT UNITE</h2>
<p class="text-justify">
Created by the effervescent Candace Fisher, "Unite" aims to be the social hub for entrepeneurs. Meet and greet other
entrepeneurs with similar interests and expertise in your area. Gain the insight needed to get your business off
the ground. Sign Up is completely FREE!
</p>
</div>
<div class="col-sm-2"></div>
</div>
</div>
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
get 'login', to: 'sessions#new'
post 'login', to: 'sessions#create'
get 'welcome', to: 'sessions#welcome'
get 'about', to: 'sessions#about'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you decouple the sessions from static pages, this will need to change as well

get 'authorized', to: 'sessions#page_requires_login'
get "logout", to: 'sessions#destroy', as: :logout

Expand Down