Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mayaif committed Jan 25, 2023
1 parent 28aeb18 commit 704df75
Show file tree
Hide file tree
Showing 10 changed files with 366 additions and 61 deletions.
68 changes: 60 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"nanoid": "^4.0.0",
"react": "^18.2.0",
"react-confetti": "^6.1.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
Expand Down
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link href="https://fonts.googleapis.com/css2?family=Inter&family=Karla:wght@700&display=swap" rel="stylesheet">
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand All @@ -24,7 +25,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Tenzies</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
11 changes: 1 addition & 10 deletions public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}

],
"start_url": ".",
"display": "standalone",
Expand Down
162 changes: 138 additions & 24 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,152 @@
.App {
text-align: center;
*{
box-sizing: border-box;
}

.App-logo {
height: 40vmin;
pointer-events: none;
body {
margin: 0;
background-color: #0B2434;
padding: 60px 30px;
font-family: "Karla", sans-serif;
/* display: flex;
justify-content: center; */
-webkit-user-select: none;
user-select: none;

}
main {
background-color: #F5F5F5;
height: 700px;
max-width: 100%;
padding: 15px;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 20px;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
.title {
font-size: 50px;
margin: 0;
color: #0f3d5a;
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.15);
}

.App-header {
background-color: #282c34;
min-height: 100vh;
.dice-container {
display: grid;
grid-template: auto auto / repeat(5, 1fr);
gap: 10px;
padding: 0px 10px 0px 10px;
margin-bottom: 40px;
}

.dice {
height: 70px;
width: 70px;
padding: 12px;
margin: 4px;
background-color: white;
box-shadow: 0px 2px 2px 1px rgba(0.20, 0.5, 0.5, 0.20);
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
cursor: pointer;

}
.die-face {
border-radius: 10px;
}
.dot {
display: block;
width: 13px;
height: 13px;
border-radius: 50%;
background-color: rgb(32, 29, 29);
display: flex;
align-self:auto;
}

.first-face {
display: flex;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;

.second-face {
display: flex;
justify-content: space-between;
align-items: stretch;
}

.second-face .dot:nth-of-type(2) {
align-self: flex-end;
}

.third-face {
display: flex;
justify-content: space-between;
align-items: stretch;
}

.third-face .dot:nth-of-type(1) {
align-self: flex-end;
}

.third-face .dot:nth-of-type(2) {
align-self: center;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
.fourth-face,
.sixth-face,
.fifth-face {
display: flex;
justify-content: space-between;
align-items: stretch;
}

.fourth-face .column,
.sixth-face .column,
.fifth-face .column {
display: flex;
flex-direction: column;
justify-content: space-between;

}

.fifth-face .column:nth-of-type(2) {
justify-content: center;
}

.roll-dice{
width: 150px;
height: 50px;
border-radius: 6px;
border: none;
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.15);
background-color: #3eb86f;
font-size: 1.2rem;
font-weight: 700;
color: white;
font-family: "Karla";
cursor: pointer;
}
.roll-dice:focus {
outline: none;
}
.roll-dice:active {
box-shadow: inset 5px 5px 10px -3px rgba(0, 0, 0, 0.7);
}

.instructions {
font-family: 'Inter', sans-serif;
font-weight: 400;
color: #0f3d5a;
margin-top: 0;
padding: 0px 30px 0px;
text-align: center;
}
Loading

0 comments on commit 704df75

Please sign in to comment.