Skip to content
Merged
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/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism';
import Analytics from './components/Analytics';
import NotFound from './pages/NotFound/NotFound';
import Home from './pages/Home/Home';
import Footer from './components/Footer/Footer';
import './styles/App.css';

export default function App() {
Expand Down Expand Up @@ -106,6 +107,7 @@ export default function App() {
<a href="/" className="back-link">← Back to Home</a>
</article>
)}
<Footer />
</div>
</>
);
Expand Down
18 changes: 18 additions & 0 deletions src/components/Footer/Footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.site-footer {
margin-top: 4rem;
padding: 2rem 1rem;
border-top: 1px solid #333;
text-align: center;
color: #888;
font-size: 0.9rem;
}

.footer-content a {
color: #ff7875;
text-decoration: none;
}

.footer-content a:hover {
color: #ff4d4f;
text-decoration: underline;
}
Comment on lines +10 to +18

Choose a reason for hiding this comment

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

medium

To align with the suggested simplification in Footer.jsx (removing the .footer-content div), these selectors should be updated to target links within .site-footer directly. This makes the CSS less dependent on a specific HTML structure.

Suggested change
.footer-content a {
color: #ff7875;
text-decoration: none;
}
.footer-content a:hover {
color: #ff4d4f;
text-decoration: underline;
}
.site-footer a {
color: #ff7875;
text-decoration: none;
}
.site-footer a:hover {
color: #ff4d4f;
text-decoration: underline;
}

20 changes: 20 additions & 0 deletions src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import './Footer.css';

export default function Footer() {
return (
<footer className="site-footer">
<div className="footer-content">
<p>
My Technical Writing Licensed under{' '}
<a
href="https://creativecommons.org/licenses/by-nc-sa/4.0/"
target="_blank"
rel="noopener noreferrer"
>
CC BY-NC-SA 4.0
</a>
</p>
</div>
Comment on lines +6 to +17

Choose a reason for hiding this comment

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

medium

The div with className="footer-content" is an unnecessary wrapper. You can simplify the component's structure by removing this div and placing the <p> tag directly inside the <footer>. This change should be accompanied by an update to the CSS selectors in Footer.css, as suggested in a separate comment.

        <p>
          My Technical Writing Licensed under{' '}
          <a 
            href="https://creativecommons.org/licenses/by-nc-sa/4.0/" 
            target="_blank" 
            rel="noopener noreferrer"
          >
            CC BY-NC-SA 4.0
          </a>
        </p>

</footer>
);
}
Loading