-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom 404 page #190
Open
NikhilKottoli
wants to merge
3
commits into
IEEE-NITK:main
Choose a base branch
from
NikhilKottoli:404
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+156
−1
Open
Custom 404 page #190
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% load static %} | ||
|
||
{% block title %}404 - Page Not Found | IEEE-NITK{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<style> | ||
@keyframes ieee404-wiggle { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A lot of CSS here. Can you maybe move it to a separate file? |
||
0%, 100% { transform: rotate(0deg); } | ||
25% { transform: rotate(-5deg); } | ||
75% { transform: rotate(5deg); } | ||
} | ||
@keyframes ieee404-glitch { | ||
2%, 64% { transform: translate(2px, 0) skew(0deg); } | ||
4%, 60% { transform: translate(-2px, 0) skew(0deg); } | ||
62% { transform: translate(0, 0) skew(5deg); } | ||
} | ||
|
||
.error404-body { | ||
height: 100vh; | ||
font-family: 'Arial', sans-serif; | ||
margin: 0; | ||
overflow: hidden; | ||
perspective: 1000px; | ||
{% comment %} background: oklch(0.5686 0.255 257.57); {% endcomment %} | ||
} | ||
|
||
.error404-container { | ||
background: rgba(255, 255, 255, 0.05); | ||
backdrop-filter: blur(15px); | ||
border-radius: 20px; | ||
padding: 3rem; | ||
text-align: center; | ||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); | ||
opacity: 0.9; | ||
max-width: 600px; | ||
width: 90%; | ||
position: relative; | ||
overflow: hidden; | ||
animation: ieee404-float 4s ease-in-out infinite; | ||
transition: all 0.3s ease; | ||
} | ||
|
||
.error404-ieee-logo { | ||
position: absolute; | ||
top: 20px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
width: 120px; | ||
opacity: 0.8; | ||
animation: ieee404-wiggle 2s infinite; | ||
} | ||
|
||
.error404-number-dark{ | ||
font-size: 10rem; | ||
font-weight: bold; | ||
background: linear-gradient(45deg, white, #7EBAE7); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
margin-bottom: 1rem; | ||
margin-top: 10px; | ||
animation: ieee404-glitch 3s infinite; | ||
} | ||
|
||
.error404-number-light { | ||
font-size: 10rem; | ||
font-weight: bold; | ||
background: linear-gradient(45deg, #2B2B2B, #0056b3); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
margin-bottom: 1rem; | ||
margin-top: 10px; | ||
animation: ieee404-glitch 3s infinite; | ||
} | ||
|
||
@keyframes ieee404-fadeIn { | ||
from { opacity: 0; transform: translateY(20px); } | ||
to { opacity: 0.9; transform: translateY(0); } | ||
} | ||
|
||
.error404-back-link { | ||
display: inline-block; | ||
margin-top: 2rem; | ||
padding: 12px 24px; | ||
border-radius: 30px; | ||
transition: all 0.3s ease; | ||
animation: ieee404-pulse 2s infinite; | ||
} | ||
|
||
@keyframes ieee404-pulse { | ||
0% { transform: scale(1); } | ||
50% { transform: scale(1.05); } | ||
100% { transform: scale(1); } | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.error404-container { | ||
padding: 2rem; | ||
width: 95%; | ||
margin: 0 10px; | ||
} | ||
.error404-number { | ||
font-size: 6rem; | ||
margin-top: 20px; | ||
} | ||
.error404-message { | ||
font-size: 1.2rem; | ||
} | ||
.error404-back-link { | ||
padding: 10px 20px; | ||
} | ||
} | ||
|
||
@media (max-width: 480px) { | ||
.error404-number { | ||
font-size: 4rem; | ||
} | ||
.error404-message { | ||
font-size: 1rem; | ||
} | ||
.error404-back-link { | ||
padding: 8px 16px; | ||
} | ||
} | ||
</style> | ||
|
||
<div class="error404-body bg-base-200 w-screen flex items-center justify-center "> | ||
<div class="error404-container flex flex-col items-center justify-center"> | ||
<img src="{% static 'img/ieee-nitk.png' %}" alt="IEEE NITK Logo" class="light-logo"> | ||
<img src="{% static 'img/ieee-nitk-white.png' %}" alt="IEEE NITK Logo" class="dark-logo"> | ||
<div> | ||
<div class="error404-number-dark dark-logo">404</div> | ||
<div class="error404-number-light light-logo">404</div> | ||
<h1 class="text-4xl text-justify flex justify-center">Page Not Found</h1> | ||
<p class="error404-message flex items-center text-2xl mt-4">Oops! The page you are looking for seems to have wandered off.</p> | ||
<div class="flex flex-col items-center"> | ||
<a href="/" class="error404-back-link bg-[#0056b3] text-justify fond-bold dark-logo">Return to Homepage</a> | ||
<a href="/" class="error404-back-link bg-white text-black fond-bold light-logo">Return to Homepage</a> | ||
<button onclick="history.back()" class="error404-back-link bg-[#0056b3] text-justify dark-logo">Go Back</button> | ||
<button onclick="history.back()" class="error404-back-link bg-white text-black light-logo">Go Back</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endblock %} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be required. Just having the 404 file in the HTML should work.