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

Settings Menu development and CSS centralizing #103

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
More Changes
  • Loading branch information
xa31er committed Jul 19, 2024
commit d55f386dc199dd8b4e383c124cb6efeb637c98fd
73 changes: 50 additions & 23 deletions src/client/css/play.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,6 @@ html {

/* Header along the very top of the page */

.flex-container {
display: flex;
flex-direction: row;
justify-content: center;
}

#settingsbutton {
height: 40px;
background-color: #ffffff;
}

#settingsbutton:hover {
background-color: rgb(211, 235, 255);
}

#settingsbutton img {
height: 20px;
margin: 10px;
}

header {
position: fixed;
left: 0;
Expand All @@ -61,24 +41,69 @@ header {
z-index: 1;
}

header a {
#topnavcontainer {
height: var(--nav-bar-height);
}

.topnavsection {
display: inline-block;
}

.topnavitem {
display: inline;
text-decoration: none;
line-height: var(--nav-bar-height);
margin-left: 4px;
min-width: 70px;
font-size: 16px;
color: black;
height: var(--nav-bar-height);
}

.topnavitem a {
display: inline;
text-decoration: none;
line-height: var(--nav-bar-height);
margin-left: 4px;
min-width: 70px;
font-size: 16px;
color: black;
height: var(--nav-bar-height);
}

header a:hover {
.topnavitem a:hover {
background-color: rgb(211, 235, 255);
height: var(--nav-bar-height);
}

header p {
.topnavitem p {
font-size: 16px;
padding: 0 10px;
height: var(--nav-bar-height);
}

.flex-container {
display: flex;
flex-direction: row;
justify-content: center;
}

#settingsbutton {
height: 40px;
background-color: #ffffff;
}

#settingsbutton:hover {
background-color: rgb(211, 235, 255);
}

#settingsbutton img {
height: 20px;
margin: 10px;
}



/* Start increasing header links width */
@media only screen and (min-width: 450px) {

Expand All @@ -91,6 +116,8 @@ header p {
}
}



/* Stop increasing header links width */
@media only screen and (min-width: 715px) {

Expand Down
58 changes: 39 additions & 19 deletions src/client/views/play.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,45 @@
<!-- The onload event listener to call main.start() is now within the htmlscript! -->
<body>
<header>
<nav class="flex-container">
<a href="/">
<p>Home</p>
</a>
<a href="/play">
<p class="currPage">Play</p>
</a>
<a href="/news">
<p>News</p>
</a>
<a href="/login" id="loginlink">
<p id="logintext">Log In</p>
</a>
<a href="/createaccount" id="createaccountlink">
<p id="createaccounttext">Create Account</p>
</a>
<button id="settingsbutton">
<img src="/img/settings_icon.png"></img>
</button>
<script>
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function ToggleDropdown() {
document.getElementById("settingscontainer").classList.toggle("show");
}
</script>
<nav>
<div id="topnavcontainer">
<div class="topnavsection" id="navpages">
<a class="topnavitem" href="/">
<p>Home</p>
</a>
<a class="topnavitem" href="/play">
<p class="currPage">Play</p>
</a>
<a class="topnavitem" href="/news">
<p>News</p>
</a>
</div>
<div class="topnavsection" id="accountsettings">
<a class="topnavitem" href="/login" id="loginlink">
<p id="logintext">Log In</p>
</a>
<a class="topnavitem" href="/createaccount" id="createaccountlink">
<p id="createaccounttext">Create Account</p>
</a>
<div class="dropdown topnavitem" id="settingsdropdown">
<button onclick="ToggleDropdown()" id="settingsbutton" class="dropdownbutton">
<img src="/img/settings_icon.png"></img>
</button>
<div class="dropdowncontent" id="settingscontainer">
<div class="dropdownitem settingsitem">
<a>Test</a>
</div>
</div>
</div>
</div>
</div>
</nav>
</header>
<main>
Expand Down