You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

61 lines
1.1 KiB

<!DOCTYPE html>
<html>
<head>
<title>Fifty shades of cold</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link id="fav" rel="shortcut icon" type="image/x-icon" href="data:image/x-icon;,">
<style>
:root {
--background: hsl(0, 0%, 12%);
--text: hsl(0, 0%, 80%);
--clear: hsl(0, 0%, 65%);
--disabled: hsl(0, 0%, 35%);
--purple: #bb73e6;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: sans-serif;
letter-spacing: 1.5px;
background: var(--background);
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: center;
width: 100vw;
padding: 5rem;
font-size: 12px;
}
div {
cursor: pointer;
width: 150px;
height: 150px;
margin: 20px;
padding: 5px 8px;
}
</style>
</head>
<body>
<script type="module">
import { generateClasses, generateColdShades, choseShade } from './fifty-shades-of-cold.js'
generateClasses()
generateColdShades()
const divs = [...document.querySelectorAll('div')]
divs.map((d) => {
d.addEventListener('click', () => choseShade(d.textContent))
})
</script>
</body>
</html>