Skip to content

montasim/login-and-register-page

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LOGIN AND REGISTRATION PAGE

GitHub watchers goto badge GitHub repo file count GitHub repo size GitHub GitHub commit activity GitHub contributors GitHub last commit


CONTENTS:


PREVIEW
Index page Login page Register page

USED TECHNOLOGY

  • HTML
  • CSS
  • JAVASCRIPT

USED COLORS

Color Hex
White #0a192f #fff
Navy #112240 #162938

USED RESOURCES

  • WALLPAPER
  • ICONS
    • CLOSE ICON <ion-icon name="close"></ion-icon>
    • USER ICON <ion-icon name="person"></ion-icon>
    • EMAIL ICON <ion-icon name="mail"></ion-icon>
    • PASSWORD ICON <ion-icon name="lock-closed"></ion-icon>

EXTENDED FEATURES

  • Responsive design
  • Custom CSS variables
  • Manipulation of CSS variables using JavaScript
  • Device orientation detection

MY LEARNING

How to use multiple media queries?

@media only screen and (max-width: 480px) {

}

@media screen and (min-width: 481px) and (max-width: 768px) and (orientation: portrait) {

}

@media screen and (min-width: 481px) and (max-width: 768px) and (orientation: landscape) {

}

How to access CSS variables using javascript?

:root {
    --deviceWidth: 375px;
    --deviceHeight: 667px;
}
const root = document.querySelector(':root');
const defaultDeviceWidth = getComputedStyle(root).getPropertyValue('--deviceWidth');
const defaultDeviceHeight = getComputedStyle(root).getPropertyValue('--deviceHeight');

console.log({defaultDeviceWidth});
console.log({defaultDeviceHeight});

How to change CSS variable value using javascript?

:root {
    --deviceWidth: 375px;
    --deviceHeight: 667px;
}
const root = document.querySelector(':root');

root.style.setProperty('--deviceWidth', '480px');
root.style.setProperty('--deviceHeight', '768px');

console.log({deviceWidth});
console.log({deviceHeight});

How to detect if the device is in portrait or landscape mode?

screen.orientation.addEventListener("change", function() {
    if (screen.orientation.type.includes("portrait")) {
        // Portrait mode
        console.log('Portrait');
    } else {
        // Landscape mode
        console.log('Landscape');
    }
});

๐Ÿ”— LIVE SITE LINK


CREDIT





feel free to contact me

LinkedIn icon GitHub icon StackOverflow icon web icon Gmail icon Facebook icon Twitter icon