Skip to content

Commit 792d01d

Browse files
committed
fix sizing problems
1 parent 4a41180 commit 792d01d

File tree

4 files changed

+47
-53
lines changed

4 files changed

+47
-53
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
22
.DS_Store
33
.env
4-
.idea
4+
.idea
5+
dist/

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<section class="gameSection">
2222
<div id="score"></div>
2323
<!-- <canvas id="tetris" width="640" height="1000"></canvas> -->
24-
<canvas id="tetris" width="240" height="400"></canvas>
24+
<canvas id="tetris" width="480" height="800"></canvas>
2525
<canvas id="next" width="200" height="200"></canvas>
2626
<div id="rules">Rules</div>
2727
</section>

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const player = {
5858
};
5959

6060

61-
context.scale(20, 20);
61+
context.scale(40, 40);
6262

6363

6464
function arenaSweep() {

src/styles.css

Lines changed: 43 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ body {
44
font-family: sans-serif;
55
font-size: 2em;
66
text-align: center;
7-
padding: 0;
8-
margin: 0;
7+
padding: 0;
8+
margin: 0;
99
}
1010

1111
#next {
12-
border: solid .2em #fff;
13-
height: 30vh;
12+
border: solid .2em #fff;
13+
height: 30vh;
1414
}
1515

1616
#header {
@@ -21,19 +21,18 @@ body {
2121
}
2222

2323
.gameSection {
24-
display: grid;
25-
grid-template-columns: 1fr 1fr 1fr;
26-
grid-gap: 30px;
27-
background-image: url('./assets/header.gif');
28-
height: 100vh;
24+
display: grid;
25+
grid-template-columns: 1fr 1fr 1fr 1fr;
26+
grid-gap: 30px;
27+
background-image: url('./assets/header.gif');
28+
height: 100vh;
2929
background-size: cover;
30-
31-
}
32-
#tetris {
33-
opacity: .5;
3430
}
3531

32+
#tetris {
33+
border: solid .2em #fff;
3634

35+
}
3736

3837
#logo-pic {
3938
width: 300px;
@@ -43,14 +42,9 @@ body {
4342
animation: logoAnimate .8s ease-in;
4443
}
4544

46-
47-
4845
.nav-box {
4946
display: flex;
5047
justify-content: center;
51-
52-
53-
5448
}
5549

5650
.nav-list {
@@ -66,7 +60,7 @@ body {
6660
font-weight: bold;
6761
}
6862

69-
.nav-logo{
63+
.nav-logo {
7064
font-size: 2em;
7165
letter-spacing: 10px;
7266
text-transform: uppercase;
@@ -89,7 +83,7 @@ body {
8983
background-color: #03a8f485;
9084
}
9185

92-
.nav-button:before{
86+
.nav-button:before {
9387
content: '';
9488
position: absolute;
9589
background: linear-gradient(to right, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
@@ -103,9 +97,10 @@ body {
10397
z-index: -1;
10498
border-radius: 30px;
10599
}
100+
106101
.nav-button:after {
107102
content: '';
108-
background: linear-gradient(to right,#03a9f4,#f441a5,#ffeb3b,#03a9f4);
103+
background: linear-gradient(to right, #03a9f4, #f441a5, #ffeb3b, #03a9f4);
109104
background-size: 400%;
110105
position: absolute;
111106
top: -5px;
@@ -121,45 +116,43 @@ body {
121116

122117
.nav-button:hover {
123118
border: 1px solid transparent;
124-
transform: scale(1);
119+
transform: scale(1);
125120
}
126121

127-
.nav-button:hover:before{
122+
.nav-button:hover:before {
128123
height: 100%;
129-
animation: a 8s linear Infinite;
124+
animation: a 8s linear Infinite;
130125
}
131-
.nav-button:hover:after{
126+
127+
.nav-button:hover:after {
132128
opacity: 1;
133-
filter: blur(20px);
134-
animation: a 8s linear Infinite;
129+
filter: blur(20px);
130+
animation: a 8s linear Infinite;
135131
}
136132

137-
138-
139133
@keyframes a {
140-
0%{
141-
background-position: 0%;
134+
0% {
135+
background-position: 0%;
142136
}
143-
100%{
144-
background-position: 400%;
137+
100% {
138+
background-position: 400%;
145139
}
146-
}
147-
148-
@keyframes logoAnimate {
149-
0%{
150-
height: 0%
151-
}
152-
25% {
153-
height: 50px;
154-
}
155-
50%{
140+
}
141+
142+
@keyframes logoAnimate {
143+
0% {
144+
height: 0%
145+
}
146+
25% {
147+
height: 50px;
148+
}
149+
50% {
156150
height: 100px;
157-
}
158-
75%{
151+
}
152+
75% {
159153
height: 150px;
160-
}
161-
100%{
154+
}
155+
100% {
162156
height: 200px;
163-
}
164-
165-
}
157+
}
158+
}

0 commit comments

Comments
 (0)