Hey Buddy
56 |
57 | We can't seem to find the page
you are looking for.
58 |
66 |
67 | ├── preview.png ├── assets ├── img │ └── ghost-img.png ├── scss │ ├── styles.scss │ ├── layout │ │ └── _layout.scss │ ├── base │ │ └── _base.scss │ ├── config │ │ └── _variables.scss │ └── components │ │ ├── _header.scss │ │ ├── _breakpoints.scss │ │ └── _home.scss ├── js │ ├── main.js │ └── scrollreveal.min.js └── css │ └── styles.css ├── README.md ├── LICENSE └── index.html /preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bedimcode/responsive-404-page/HEAD/preview.png -------------------------------------------------------------------------------- /assets/img/ghost-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bedimcode/responsive-404-page/HEAD/assets/img/ghost-img.png -------------------------------------------------------------------------------- /assets/scss/styles.scss: -------------------------------------------------------------------------------- 1 | @import 'config/variables'; 2 | @import 'base/base'; 3 | @import 'layout/layout'; 4 | @import 'components/header'; 5 | @import 'components/home'; 6 | @import 'components/breakpoints'; -------------------------------------------------------------------------------- /assets/scss/layout/_layout.scss: -------------------------------------------------------------------------------- 1 | /*=============== REUSABLE CSS CLASSES ===============*/ 2 | .container{ 3 | max-width: 1024px; 4 | margin-left: 1.5rem; 5 | margin-right: 1.5rem; 6 | } 7 | 8 | .main{ 9 | overflow: hidden; /* For the animations ScrollReveal */ 10 | } -------------------------------------------------------------------------------- /assets/scss/base/_base.scss: -------------------------------------------------------------------------------- 1 | /*=============== BASE ===============*/ 2 | *{ 3 | box-sizing: border-box; 4 | padding: 0; 5 | margin: 0; 6 | } 7 | 8 | body{ 9 | font-family: var(--body-font); 10 | font-size: var(--normal-font-size); 11 | font-weight: 500; 12 | color: var(--text-color); 13 | } 14 | 15 | ul{ 16 | list-style: none; 17 | } 18 | 19 | a{ 20 | text-decoration: none; 21 | } 22 | 23 | img{ 24 | max-width: 100%; 25 | height: auto; 26 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 👻 Responsive 404 Page 2 | ## [Watch it on youtube](https://youtu.be/WG2l4ER3_Qc) 3 | ### 👻 Responsive 404 Page 4 | 5 | - Responsive 404 Page Using HTML CSS & JavaScript 6 | - Contains CSS animations. 7 | - Developed first with the Mobile First methodology, then for desktop. 8 | - Compatible with all mobile devices and with a beautiful and pleasant user interface. 9 | 10 | 💙 Join the channel to see more videos like this. [Bedimcode](https://www.youtube.com/c/Bedimcode) 11 | 12 |  13 | -------------------------------------------------------------------------------- /assets/scss/config/_variables.scss: -------------------------------------------------------------------------------- 1 | /*=============== GOOGLE FONTS ===============*/ 2 | @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap'); 3 | 4 | /*=============== VARIABLES CSS ===============*/ 5 | :root{ 6 | --header-height: 3.5rem; 7 | 8 | /*========== Colors ==========*/ 9 | /*Color mode HSL(hue, saturation, lightness)*/ 10 | --first-color: hsl(38, 69%, 59%); 11 | --text-color: hsl(38, 8%, 8%); 12 | 13 | /*========== Font and typography ==========*/ 14 | /*.5rem = 8px | 1rem = 16px ...*/ 15 | --body-font: 'Space Grotesk', sans-serif; 16 | 17 | --biggest-font-size: 2.375rem; 18 | --normal-font-size: .938rem; 19 | --smaller-font-size: .75rem; 20 | 21 | // Responsive typography 22 | @media screen and (min-width: 1024px){ 23 | --biggest-font-size: 5rem; 24 | --normal-font-size: 1rem; 25 | --smaller-font-size: .813rem; 26 | } 27 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Bedimcode 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /assets/js/main.js: -------------------------------------------------------------------------------- 1 | /*=============== SHOW MENU ===============*/ 2 | const navMenu = document.getElementById('nav-menu'), 3 | navToggle = document.getElementById('nav-toggle'), 4 | navClose = document.getElementById('nav-close') 5 | 6 | /*===== MENU SHOW =====*/ 7 | /* Validate if constant exists */ 8 | if(navToggle){ 9 | navToggle.addEventListener('click', () =>{ 10 | navMenu.classList.add('show-menu') 11 | }) 12 | } 13 | 14 | /*===== MENU HIDDEN =====*/ 15 | /* Validate if constant exists */ 16 | if(navClose){ 17 | navClose.addEventListener('click', () =>{ 18 | navMenu.classList.remove('show-menu') 19 | }) 20 | } 21 | 22 | /*=============== REMOVE MENU MOBILE ===============*/ 23 | const navLink = document.querySelectorAll('.nav__link') 24 | 25 | function linkAction(){ 26 | const navMenu = document.getElementById('nav-menu') 27 | // When we click on each nav__link, we remove the show-menu class 28 | navMenu.classList.remove('show-menu') 29 | } 30 | navLink.forEach(n => n.addEventListener('click', linkAction)) 31 | 32 | /*=============== SCROLL REVEAL ANIMATION ===============*/ 33 | const sr = ScrollReveal({ 34 | distance: '90px', 35 | duration: 3000, 36 | }) 37 | 38 | sr.reveal(`.home__data`, {origin: 'top', delay: 400}) 39 | sr.reveal(`.home__img`, {origin: 'bottom', delay: 600}) 40 | sr.reveal(`.home__footer`, {origin: 'bottom', delay: 800}) -------------------------------------------------------------------------------- /assets/scss/components/_header.scss: -------------------------------------------------------------------------------- 1 | /*=============== HEADER & NAV ===============*/ 2 | .header{ 3 | position: fixed; 4 | width: 100%; 5 | background-color: transparent; 6 | top: 0; 7 | left: 0; 8 | z-index: 100; 9 | } 10 | 11 | .nav{ 12 | height: var(--header-height); 13 | display: flex; 14 | justify-content: space-between; 15 | align-items: center; 16 | 17 | &__logo, 18 | &__toggle{ 19 | color: var(--text-color); 20 | display: inline-flex; 21 | } 22 | &__logo{ 23 | font-weight: 700; 24 | } 25 | &__toggle{ 26 | font-size: 1.25rem; 27 | cursor: pointer; 28 | } 29 | &__menu{ 30 | @media screen and (max-width: 767px){ 31 | position: fixed; 32 | background-color: var(--first-color); 33 | left: 0; 34 | top: -100%; 35 | width: 100%; 36 | padding: 5rem 0 4rem; 37 | border-radius: 0 0 1.5rem 1.5rem; 38 | box-shadow: 0 2px 4px hsla(38, 4%, 15%, .15); 39 | transition: .4s; 40 | } 41 | } 42 | &__list{ 43 | text-align: center; 44 | display: flex; 45 | flex-direction: column; 46 | row-gap: 2rem; 47 | } 48 | &__link{ 49 | color: var(--text-color); 50 | } 51 | &__close{ 52 | position: absolute; 53 | top: 1rem; 54 | right: 1.5rem; 55 | font-size: 1.5rem; 56 | color: var(--text-color); 57 | cursor: pointer; 58 | } 59 | } 60 | 61 | /* Show menu */ 62 | .show-menu{ 63 | top: 0 ; 64 | } -------------------------------------------------------------------------------- /assets/scss/components/_breakpoints.scss: -------------------------------------------------------------------------------- 1 | /*=============== BREAKPOINTS ===============*/ 2 | /* For small devices */ 3 | @media screen and (max-width: 320px){ 4 | .home{ 5 | padding-top: 7rem; 6 | } 7 | } 8 | 9 | /* For medium devices */ 10 | @media screen and (min-width: 767px){ 11 | .nav{ 12 | height: calc(var(--header-height) + 1.5rem); 13 | 14 | &__toggle, 15 | &__close{ 16 | display: none; 17 | } 18 | &__list{ 19 | flex-direction: row; 20 | column-gap: 3.5rem; 21 | } 22 | } 23 | } 24 | 25 | /* For large devices */ 26 | @media screen and (min-width: 1024px){ 27 | .home{ 28 | &__container{ 29 | grid-template-columns: repeat(2, 1fr); 30 | align-items: center; 31 | column-gap: 2rem; 32 | } 33 | &__data{ 34 | text-align: initial; 35 | } 36 | &__img img{ 37 | width: 400px; 38 | } 39 | &__shadow{ 40 | width: 250px; 41 | height: 40px; 42 | } 43 | } 44 | } 45 | 46 | @media screen and (min-width: 1048px){ 47 | .container{ 48 | margin-left: auto; 49 | margin-right: auto; 50 | } 51 | } 52 | 53 | /* For 2K resolutions (2048 x 1152, 2048 x 1536) */ 54 | @media screen and (min-width: 2048px) { 55 | body { 56 | zoom: 1.7; 57 | } 58 | .home{ 59 | height: initial; 60 | row-gap: 4rem; 61 | } 62 | } 63 | 64 | /* For 4K resolutions (3840 x 2160, 4096 x 2160) */ 65 | @media screen and (min-width: 3840px) { 66 | body { 67 | zoom: 3.1; 68 | } 69 | } -------------------------------------------------------------------------------- /assets/scss/components/_home.scss: -------------------------------------------------------------------------------- 1 | /*=============== HOME ===============*/ 2 | .home{ 3 | background-color: var(--first-color); 4 | padding: 9rem 0 2rem; 5 | height: 100vh; 6 | display: grid; 7 | 8 | &__container{ 9 | display: grid; 10 | align-content: center; 11 | row-gap: 2.5rem; 12 | } 13 | &__data{ 14 | text-align: center; 15 | } 16 | &__title{ 17 | font-size: var(--biggest-font-size); 18 | margin: .75rem 0; 19 | } 20 | &__button{ 21 | margin-top: 2rem; 22 | display: inline-block; 23 | background-color: var(--text-color); 24 | color: #fff; 25 | padding: .80rem 1.5rem; 26 | border-radius: 3rem; 27 | transition: .4s; 28 | 29 | &:hover{ 30 | box-shadow: 0 4px 12px hsla(38, 69%, 8%, .2); 31 | } 32 | } 33 | &__img img{ 34 | width: 230px; 35 | animation: floaty 1.8s infinite alternate; 36 | } 37 | &__img{ 38 | justify-self: center; 39 | } 40 | &__shadow{ 41 | width: 130px; 42 | height: 24px; 43 | background-color: hsla(38, 21%, 19%, .16); 44 | margin: 0 auto; 45 | border-radius: 50%; 46 | filter: blur(7px); 47 | animation: shadow 1.8s infinite alternate; 48 | } 49 | &__footer{ 50 | display: flex; 51 | justify-content: center; 52 | column-gap: .5rem; 53 | font-size: var(--smaller-font-size); 54 | align-self: flex-end; 55 | } 56 | } 57 | 58 | /* Animate ghost */ 59 | @keyframes floaty{ 60 | 0%{ 61 | transform: translateY(0); 62 | } 63 | 100%{ 64 | transform: translateY(15px); 65 | } 66 | } 67 | 68 | @keyframes shadow{ 69 | 0%{ 70 | transform: scale(1, 1); 71 | } 72 | 100%{ 73 | transform: scale(.85, .85); 74 | } 75 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
57 | We can't seem to find the page
you are looking for.
58 |
66 |
67 |