Skip to content

Commit

Permalink
add back button, fix about text color
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmcclean committed Feb 23, 2024
1 parent ebbc4c2 commit 09c6f71
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<nav>
<ul class="nav-links" role="list">
<li id="home-link" class="nav-link">
<a href="./index.html">Home</a>
<a href="./index.html">Home</a>
</li>
<li class="nav-link">
<a href="#about">About</a>
Expand Down
3 changes: 1 addition & 2 deletions play.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
</head>
<body>
<main>
<div id="top" class="back-button"></div>
<div id="left" class="back-button"></div>
<a class="back-button" href="./index.html"></a>
<div class="faces-wrapper">
<div id="heart" class="face">
<div class="face-background"></div>
Expand Down
5 changes: 0 additions & 5 deletions scripts/play.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ document
.getElementById("dec-bet-amt")
.addEventListener("click", () => adjustBetAmount(false));

// Make top left corner functionally a back button
Array.from(document.getElementsByClassName("back-button")).forEach((part) =>
part.addEventListener("click", () => redirectTransition("./index.html"))
);

/* -----Functions----- */
// Roll dice returning numDice values between 1 and 6
function rollDice(numDice) {
Expand Down
12 changes: 7 additions & 5 deletions styles/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ nav {
text-decoration: none;
font-size: 1.2rem;
font-weight: bold;
transition: background 0.2s;
}

@media only screen and (max-width: 900px) {
Expand Down Expand Up @@ -71,11 +70,11 @@ nav {
}

.nav-link a:hover {
background-color: var(--clr-base);
text-decoration: underline;
}

h2 {
padding-bottom: 1.2rem;
padding-top: 3rem;
color: color-mix(in srgb, var(--clr-primary) 80%, var(--clr-secondary));
text-align: center;
text-decoration: underline
Expand All @@ -84,18 +83,22 @@ h2 {
}

section {
margin-bottom: 3rem;
display: flex;
flex-direction: column;
align-items: center;
}

section p {
max-width: 1000px;
margin-top: 1.5rem;
font-size: clamp(1rem, 1vw + 0.5rem, 1.15rem);
color: color-mix(in srgb, var(--clr-primary) 80%, var(--clr-secondary));
}

section b {
color: color-mix(in srgb, var(--clr-primary) 80%, var(--clr-secondary));
}

#about {
padding-top: 3.5rem;
}
Expand All @@ -107,5 +110,4 @@ section p {
#sources a {
color: var(--clr-primary);
text-decoration: underline;
transition: background 0.2s;
}
18 changes: 8 additions & 10 deletions styles/play.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,16 @@ main::after {

.back-button {
position: fixed;
top: var(--border-dist);
left: var(--border-dist);
}

#top {
height: 1rem;
width: var(--corner-size);
top: calc(var(--border-dist) + 0.1rem);
left: calc(var(--border-dist) + 1rem);
color: var(--clr-primary);
text-decoration: none;
font-weight: bold;
font-size: 2rem;
}

#left {
height: var(--corner-size);
width: 2rem;
.back-button:hover {
color: color-mix(in srgb, var(--clr-primary) 30%, var(--clr-secondary));
}

.faces-wrapper {
Expand Down

0 comments on commit 09c6f71

Please sign in to comment.