Add initial content, styles and variables

This commit is contained in:
lolabird 2023-11-09 14:15:23 -07:00
commit 08272480e2
3 changed files with 28 additions and 0 deletions

View file

@ -7,6 +7,12 @@
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
</head> </head>
<body> <body>
<h1>Etch-A-Sketch</h1>
<div class="area">
<div class="container">
</div>
</div>
<script src="script.js"></script> <script src="script.js"></script>

View file

@ -0,0 +1,7 @@
const container = document.querySelector(".container");
const conWidth = container.clientWidth;
const conHeight = container.clientHeight
const grid = document.createElement("div");
let numGrid = 16;
const gridWidth = conWidth / numGrid;
const gridHeight = conHeight / numGrid;

View file

@ -0,0 +1,15 @@
body{
background-color: #333;
color: #eee
}
.area{
display: flex;
justify-content: center;
align-items: center;
height: 90vh;
}
.container{
border: 1px solid #eee;
height: 500px;
width: 500px;
}