Styling changes

This commit is contained in:
Henry Hiles 2022-02-11 09:40:52 -05:00
parent 4630707fe9
commit dfa2aaa07f
2 changed files with 61 additions and 29 deletions

View file

@ -30,7 +30,7 @@ body {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
display: grid; display: grid;
grid-template-rows: 100px 1fr 175px; grid-template-rows: 100px 1fr 150px;
} }
#rooms { #rooms {
@ -45,6 +45,10 @@ body {
flex-direction: column; flex-direction: column;
} }
#rooms #rooms-header {
margin-top: 7px;
}
#rooms h1 { #rooms h1 {
margin-bottom: 30px; margin-bottom: 30px;
} }
@ -78,7 +82,7 @@ body {
} }
#rooms.opened { #rooms.opened {
width: 30vw; width: 20vw;
padding: 20px; padding: 20px;
} }
@ -86,21 +90,8 @@ body {
padding-left: 70px; padding-left: 70px;
} }
#rooms input {
width: 80%;
}
#rooms input::placeholder {
text-align: center;
}
#rooms form { #rooms form {
text-align: center; margin: auto 5px 20px 5px;
margin: auto 0 20px 0;
}
#rooms form button {
margin-top: 10px;
} }
nav, nav,
@ -129,11 +120,9 @@ nav span {
footer { footer {
justify-content: center; justify-content: center;
gap: 30px; gap: 30px;
padding: 20px;
} }
textarea, :is(textarea, input[type="text"]):not(.input-field) {
input[type="text"] {
border: none; border: none;
color: white; color: white;
background-color: transparent; background-color: transparent;
@ -317,6 +306,48 @@ button:is(:disabled, :hover) {
#no-rooms.changed { #no-rooms.changed {
display: none; display: none;
} }
.input-group {
display: flex;
justify-content: center;
}
.input-field {
flex: 1;
width: 100%;
font-size: 1em;
}
.input-field::placeholder {
color: var(--secondary) !important;
}
.input-field:not(:first-child) {
border-left: 0;
}
.input-field:not(:last-child) {
border-right: 0;
}
.input-item {
background-color: var(--secondary);
font: inherit;
}
.input-field,
.input-item {
border: 1px solid #93806c40;
padding: 0.5rem 0.75rem;
}
.input-field:first-child,
.input-item:first-child {
border-radius: 5px 0 0 5px;
}
.input-field:last-child,
.input-item:last-child {
border-radius: 0 5px 5px 0;
}
@media (max-width: 1500px) { @media (max-width: 1500px) {
#rooms-header { #rooms-header {
@ -324,7 +355,7 @@ button:is(:disabled, :hover) {
} }
} }
@media (max-width: 1000px) { @media (max-width: 1300px) {
#rooms.opened { #rooms.opened {
width: 100vw; width: 100vw;
} }
@ -358,7 +389,7 @@ button:is(:disabled, :hover) {
flex-direction: column; flex-direction: column;
} }
button:not(#menu, .button-circle) { button:not(#menu, .button-circle, .input-item) {
display: block; display: block;
width: 100%; width: 100%;
} }

View file

@ -49,14 +49,15 @@
<%} %> <%} %>
</ul> </ul>
<form method="POST" action="/"> <form method="POST" action="/">
<input <div class="input-group">
id="room" <input placeholder="Room Name" type="text" name="room" id="room" class="input-field" />
name="room" <button class="input-item" type="submit">
autocomplete="off" <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-circle" viewBox="0 0 16 16">
type="text" <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
placeholder="Room Name" <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
/> </svg>
<button class="button-primary" type="submit">New Room</button> </button>
</div>
</form> </form>
</div> </div>
<div id="content"> <div id="content">