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
import React from "react"; | |
function App() { | |
return ( | |
<div> | |
<header> | |
<img | |
src="https://res.cloudinary.com/dz4tt9omp/image/upload/v1625528354/react.png" | |
alt="logo" | |
/> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="description" content="Starter Snowpack App" /> | |
<link rel="stylesheet" type="text/css" href="/index.css" /> | |
<title>Starter Snowpack App</title> | |
</head> |
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
let modal = document.querySelector(".modal"); | |
let show = document.querySelector(".show"); | |
let closeButton = document.querySelector(".close-button"); | |
function toggleModal() { | |
modal.classList.toggle("show-modal"); | |
} | |
function windowOnClick(event) { | |
if (event.target === modal) { |
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
.btn{ | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
background: pink; | |
font-size: 20px; | |
color: white; | |
padding: 10px 30px; | |
cursor: pointer; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="style.css"/> | |
<title>Pop Up</title> | |
</head> | |
<body> |
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
var modal = null | |
function pop() { | |
if(modal === null) { | |
document.getElementById("box").style.display = "block"; | |
modal = true | |
} else { | |
document.getElementById("box").style.display = "none"; | |
modal = null | |
} | |
} |
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
.btn{ | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
background: pink; | |
font-size: 20px; | |
color: white; | |
padding: 10px 30px; | |
cursor: pointer; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://kit.fontawesome.com/a71707a89a.js" crossorigin="anonymous"></script> | |
<link rel="stylesheet" href="style.css"/> | |
<title>Pop Up</title> | |
</head> | |
<body> |
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
var titleAlert = "It Pops!!!"; | |
var closeModal = "Ok"; | |
if(document.getElementById) { | |
window.alert = function(txt) { | |
createCustomAlert(txt); | |
} | |
} | |
//Function To Create Custom Alert |
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
.btn{ | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
background: rgb(48, 48, 177); | |
font-size: 20px; | |
color: white; | |
padding: 10px 30px; | |
cursor: pointer; |