Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creat game list section with style #18

Merged
merged 1 commit into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified public/assest/images/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/assest/js/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const onLoadPage = (() => {
fetch('/popImages')
.then((response) => response.json())
.then((data) => {
console.log(data[0]);
firstPopularPhoto.src = data[0].thumbnail;
secondePopularPhoto.src = data[1].thumbnail;
thirdPopularPhoto.src = data[2].thumbnail;
Expand Down
356 changes: 213 additions & 143 deletions public/assest/stylesheet/style.css
Original file line number Diff line number Diff line change
@@ -1,147 +1,217 @@
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root{
font-family: 'Bebas Neue', cursive;
--brandColor: #2DA5FF;
--mainColor: #2A2E33;
--titleColor: #AAAAAA;
--paragraphColor: #999999;
--whiteColor: #FFFFFF;
}
.col-1{
flex: 1;
}
.col-2{
flex: 2;
}
.col-3{
flex: 3;
}
.col-4{
flex: 4;
}
.col-5{
flex: 5;
}
.col-6{
flex: 6;
}
body{
background: #2a2e33;
}
.container{
width: 90%;
margin: auto;
}
.header{
width: 100%;
}
.header-navbar{
position: sticky;
top: 0;
width: 100%;
z-index: 15;
height: 10vh;
border-bottom: 1px solid rgba(0, 0, 0, 0.13);
background: var(--mainColor);
box-shadow: 0 10px 10px 10px #222;
}
.navbar-container{
height: 100%;
display:flex;
align-items: center;
justify-content: center;
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
font-family: "Bebas Neue", cursive;
--brandColor: #2da5ff;
--mainColor: #2a2e33;
--titleColor: #aaaaaa;
--paragraphColor: #999999;
--whiteColor: #ffffff;
}
.col-1 {
flex: 1;
}
.col-2 {
flex: 2;
}
.col-3 {
flex: 3;
}
.col-4 {
flex: 4;
}
.col-5 {
flex: 5;
}
.col-6 {
flex: 6;
}
body {
background: #2a2e33;
}
.container {
width: 90%;
margin: auto;
}
.header {
transition: all .8s ease-in-out;
width: 100%;
}
.header-navbar {
position: fixed;
top: 0;
width: 100%;
z-index: 15;
height: 10vh;
border-bottom: 1px solid rgba(0, 0, 0, 0.13);
background: var(--mainColor);
box-shadow: 0 10px 10px 10px #222;
}
.navbar-container {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}

.navbar-logo{
height: 100%;
display:flex;
align-items: center;
justify-content: flex-start;


}
.navbar-logo-content{
color: var(--brandColor);
font-size: 1.5rem;
.navbar-logo {
height: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
}
.navbar-logo-content {
color: var(--brandColor);
font-size: 1.5rem;
}
.navbar-list {
height: 100%;
display: flex;
align-items: center;
justify-content: space-evenly;
}
.navbar-list-item {
list-style-type: none;
text-align: center;
}
.navbar-list-item-link {
text-decoration: none;
color: var(--titleColor);
font-size: 1.3rem;
}
.navbar-cart-box {
display: flex;
align-items: center;
justify-content: flex-end;
height: 100%;
font-size: 1.3rem;
color: var(--titleColor);
}
.special-games {
margin-top: 5vh;
height: 85vh;
}
.special-games-container {
height: 100%;
padding: 5rem 0 0 0;
display: flex;
flex-direction: column;
}
.special-games-details {
width: 40%;
height: 30%;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 10%;
}
.special-games-title {
color: var(--titleColor);
font-size: 2.5rem;
letter-spacing: 0.5rem;
line-height: 1.5;
}
.special-games-description {
color: var(--paragraphColor);
letter-spacing: 0.1rem;
font-size: 1.8rem;
}
.popular-games-grid {
width: 100%;
height: 40%;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
}
.popular-games-grid-box {
padding-right: 1.5rem;
height: 100%;
}
.popular-games-grid-box:last-child {
padding: 0;
}
.popular-games-grid-box-bg {
width: 100%;
height: 100%;
object-fit: contain;
}
.main {
height: 300vh;
}
.games-list {
height: 100vh;
}
.games-list-container {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.games-list-card {
align-self: flex-start;
width: 28%;
height: 65vh;
box-shadow: -3px -3px 5px 5px #222;
}
.games-list-card-image {

width: 100%;
height: 45%;
}
.games-list-card-img {
width: 100%;
}
.games-list-card-details {
height: 45%;
padding: 0 1rem;
display: flex;
flex-direction: column;
justify-content: space-evenly;
}
.games-list-card-details-content {
height: 50%;

display: flex;
flex-direction: column;
justify-content: flex-start;
}
.games-list-card-details-title {
color: var(--titleColor);
width: 100%;
height: 40%;
overflow: hidden;
font-size: 1.8rem;
letter-spacing: 0.1rem;
line-height: 1.2;
}
.games-list-card-details-description {
color: var(--paragraphColor);
width: 70%;
font-size: 1.2rem;
line-height: 1.4;
}
.games-list-card-details-info {
padding: 0 1rem;
display: flex;
justify-content: space-between;
}
.games-list-card-details-info {
font-size: 1.2rem;
}
.games-list-card-details-info {
display: flex;
align-items: center;
color: var(--titleColor);
}
.games-list-card-details-info-type {
display: flex;
align-items: center;
justify-content: space-between;
height: 52px;
width: 20%;
color: var(--titleColor);
}
.navbar-list{
height: 100%;
display:flex;
align-items: center;
justify-content: space-evenly;
}
.navbar-list-item{
list-style-type: none;
text-align: center;
}
.navbar-list-item-link{
text-decoration: none;
color: var(--titleColor);
font-size: 1.3rem;
}
.navbar-cart-box{
display:flex;
align-items: center;
justify-content: flex-end;
height: 100%;
font-size: 1.3rem;
color: var(--titleColor);

}
.special-games{
margin-top: 5vh;
height: 85vh;

}
.special-games-container{
height: 100%;
padding: 5rem 0 0 0;
display: flex;
flex-direction: column;
}
.special-games-details{
width: 40%;
height: 30%;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-bottom: 10%;
}
.special-games-title{
color: var(--titleColor);
font-size: 2.5rem;
letter-spacing: 0.5rem;
line-height: 1.5;
}
.special-games-description{
color: var(--paragraphColor);
letter-spacing: 0.1rem;
font-size:1.8rem
}
.popular-games-grid{
width: 100%;
height: 40%;
display:flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
}
.popular-games-grid-box{
padding-right: 1.5rem;
height: 100%;
}
.popular-games-grid-box:last-child{
padding: 0;
}
.popular-games-grid-box-bg{
width : 100%;
height: 100%;
object-fit: contain;
}
Loading