Skip to content

Commit

Permalink
Added 2048; Cleaned up and organized files.
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCoding22 committed Aug 7, 2023
1 parent a9c80c3 commit 41cd9e9
Show file tree
Hide file tree
Showing 9 changed files with 501 additions and 68 deletions.
210 changes: 210 additions & 0 deletions CSS/2048.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
/* MAIN CONTAINERS */
.overflow-container {
overflow-x: auto;
}

.game-container, .dashboard {
width: 540px;
margin: 50px auto;
border: 8px outset white;
display: flex;
color: white;
}

.game-container {
height: 540px;
margin-top: 20px;
}

.dashboard {
height: 50px;
margin-bottom: 10px;
justify-content: space-around;
align-items: center;
font-size: 24px;
font-weight: bold;
}

.reset {
font-size: 24px;
height: 36px;
border: 2px outset black;
}

.reset:hover {
color: white;
background-color: black;
border-style: inset;
}
/* ********** */

/* GRID */
.grid, .grid-row {
display: flex;
flex-wrap: wrap;
}

.grid {
flex-direction: column;
}

.grid-row {
border-bottom: 8px solid white;
}

.grid-row:last-child {
border-bottom: none;
}

.grid-block {
width: 129px;
height: 129px;
border-right: 8px solid white;
background-color: black;
}

.grid-block:last-child {
border-right: none;
}
/* ********** */


/*POSITIONS*/

.pos-1-1 {
transform: translate(0, 0);
}

.pos-1-2 {
transform: translate(137px, 0);
}

.pos-1-3 {
transform: translate(274px, 0);
}

.pos-1-4 {
transform: translate(411px, 0);
}

.pos-2-1 {
transform: translate(0, 137px);
}

.pos-2-2 {
transform: translate(137px, 137px);
}

.pos-2-3 {
transform: translate(274px, 137px);
}

.pos-2-4 {
transform: translate(411px, 137px);
}

.pos-3-1 {
transform: translate(0, 274px);
}

.pos-3-2 {
transform: translate(137px, 274px);
}

.pos-3-3 {
transform: translate(274px, 274px);
}

.pos-3-4 {
transform: translate(411px, 274px);
}

.pos-4-1 {
transform: translate(0, 411px);
}

.pos-4-2 {
transform: translate(137px, 411px);
}

.pos-4-3 {
transform: translate(274px, 411px);
}

.pos-4-4 {
transform: translate(411px, 411px);
}
/* ********** */

/* TILES */
.tile-container {
position: absolute;
width: 540px;
height: 540px;
}

@keyframes tile-pop {
50% {transform: scale(1.1);}
100% {transform: scale(1);}
}

@keyframes tile-grow {
0% {transform: scale(0.1);}
100% {transform: scale(1);}
}

.tile {
line-height: 129px;
font-size: 48px;
text-align: center;
position: absolute;
width: 129px;
height: 129px;
transition: all 0.25s;
}

.inner-tile {
color: white;
background-color: #33B5FF;
animation-duration: 0.25s;
animation-timing-function:ease-in;
}
/* ********** */

/*MESSAGES*/

@keyframes fadeIn {
0% {opacity: 0%;}
100% {opacity: 90%;}
}

.win-message, .lose-message {
position: absolute;
font-weight: bold;
width: 540px;
height: 540px;
opacity: 0%;
font-size: 48px;
margin-top: auto;
display: flex;
justify-content: center;
align-items: center;
}

.win-message {
color: black;
background-color: gold;
}

.lose-message {
color: white;
background-color: black;
text-align: center;
}

.fade-in-animation {
opacity: 90%;
animation-name: fadeIn;
animation-duration: 2s;
}
/* ********** */
37 changes: 16 additions & 21 deletions CSS/main.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
/* GENERAL */
body {
font-family: Raleway, Arial, Helvetica, sans-serif;
background-color: black;
/*min-width: 1080px;*/
}

a {
color: white;
text-decoration: none;
}
/* ********** */

/* HEADER */
header {
background-color: black;
color: white;
display: flex;
/*justify-content: flex-start;*/
justify-content: space-between;
align-items: center;
align-content: center;
flex-wrap: wrap;
padding: 45px 9.5%;/*10.25%;*/
padding: 45px 9.5%;
padding-bottom: 30px;
}

h1 {
font-size: 48px;
font-weight: bold;
/*margin-right: auto;
margin-left: auto;*/
margin-bottom: 15px;
padding: 6px 10px;
border: 6px double white;
Expand All @@ -38,8 +37,6 @@ h1 {

.nav-bar {
margin: auto 0;
/*margin-left: auto;*/
/*margin-left: 20px;*/
}

header ul {
Expand All @@ -61,13 +58,15 @@ header li a:hover {
header li:hover {
transform: scale(1.1);
}
/* ********** */

/* PROFILE */
.profile {
background-color: black;
color: white;
display: flex;
flex-direction: column;
padding: 50px 9.5%;/*10.25%;*/
padding: 50px 9.5%;
padding-top: 25px;
padding-bottom: 45px;
}
Expand All @@ -83,14 +82,11 @@ header li:hover {
.profile-intro {
font-size: 24px;
font-weight: 400;
text-align: center;
/*width: 50%;*/
/*width: 600px;*/
text-align: left;
width: 572.5px;
min-width: 300px;
margin-right: 5%;
flex: 1;
/*margin-right: auto;*/
margin-bottom: 25px;
}

Expand All @@ -99,20 +95,13 @@ header li:hover {
}

.img-holder {
/*width: 45%;*/
flex: 1;
min-height: 190px;
min-width: 200px;
/*width: 450px;
height: 200px;*/
border: 2px solid white;
background: url("../Graphics/field_view.jpeg");
background-size: cover;
background-position: center;
/*background-size: 120%;
background-position-x: -100px;
background-position-y: -270px;
background-repeat: no-repeat;*/
}

.profile-row-2 {
Expand All @@ -133,13 +122,15 @@ dt {
font-weight: bold;
margin-right: 10px;
}
/* ********** */

/* PORTFOLIO */
.portfolio {
background-color: white;
color: black;
display: flex;
flex-direction: column;
padding: 25px 9.5%;/*10.25%;*/
padding: 25px 9.5%;
}

.portfolio h2 {
Expand Down Expand Up @@ -183,17 +174,20 @@ dt {
.project p, .club p {
font-size: 18px;
}
/* ********** */

/* FOOTER */
footer {
color: white;
background-color: black;
padding: 0 10px;
padding: 10px 0;
text-align: center;
}
/* ********** */


/* FOR GAME MENU */
/* GAME MENU */

.games {
background-color: white;
Expand Down Expand Up @@ -223,6 +217,7 @@ footer {
font-weight: bold;
color: black;
}
/* ********** */

/* Rework project format */
.rework {
Expand Down
Loading

0 comments on commit 41cd9e9

Please sign in to comment.