mirror of
https://github.com/DerTyp7/teamspeak-obs-overlay.git
synced 2025-10-29 21:02:10 +01:00
add responsive design
This commit is contained in:
@@ -62,50 +62,54 @@ export default function Generator() {
|
|||||||
<div className="configurations">
|
<div className="configurations">
|
||||||
<h2>Configurations</h2>
|
<h2>Configurations</h2>
|
||||||
|
|
||||||
<div className="option">
|
<div className="options">
|
||||||
<input
|
<section>
|
||||||
type="checkbox"
|
<div
|
||||||
checked={showChannelName}
|
className="option"
|
||||||
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
onClick={() => {
|
||||||
setShowChannelName(e.target.checked);
|
setShowChannelName(!showChannelName);
|
||||||
}}
|
}}
|
||||||
/>
|
>
|
||||||
<label>Show channelname</label>
|
<input type="checkbox" checked={showChannelName} />
|
||||||
</div>
|
<label>Show channelname</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="option">
|
<div
|
||||||
<input
|
className="option"
|
||||||
type="checkbox"
|
onClick={() => {
|
||||||
checked={hideNonTalking}
|
setHideNonTalking(!hideNonTalking);
|
||||||
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
}}
|
||||||
setHideNonTalking(e.target.checked);
|
>
|
||||||
}}
|
<input type="checkbox" checked={hideNonTalking} />
|
||||||
/>
|
<label>Hide non talking clients</label>
|
||||||
<label>Hide non talking clients</label>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<div className="option">
|
<section>
|
||||||
<input
|
<div className="option">
|
||||||
type="number"
|
<input
|
||||||
value={20}
|
type="number"
|
||||||
min={0}
|
value={20}
|
||||||
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
min={0}
|
||||||
setClientLimit(parseInt(e.target.value));
|
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
||||||
}}
|
setClientLimit(parseInt(e.target.value));
|
||||||
/>
|
}}
|
||||||
<label>Client Limit</label>
|
/>
|
||||||
</div>
|
<label>Client Limit</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="option">
|
<div className="option">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value={5899}
|
value={5899}
|
||||||
min={0}
|
min={0}
|
||||||
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: ChangeEvent<HTMLInputElement>) => {
|
||||||
setRemoteAppPort(parseInt(e.target.value));
|
setRemoteAppPort(parseInt(e.target.value));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<label>RemoteApp-Port</label>
|
<label>RemoteApp-Port</label>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Breakpoints
|
// Breakpoints
|
||||||
$breakpoint-1: 760px;
|
$breakpoint-1: 1200px;
|
||||||
$breakpoint-2: 565px;
|
$breakpoint-2: 790px;
|
||||||
|
$breakpoint-3: 600px;
|
||||||
|
|
||||||
@keyframes tooltipAnimation {
|
@keyframes tooltipAnimation {
|
||||||
0% {
|
0% {
|
||||||
@@ -22,7 +23,6 @@ $breakpoint-2: 565px;
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 50px;
|
gap: 50px;
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 50px 0;
|
padding: 50px 0;
|
||||||
|
|
||||||
.headline {
|
.headline {
|
||||||
@@ -48,15 +48,8 @@ $breakpoint-2: 565px;
|
|||||||
background-color: #313136;
|
background-color: #313136;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
@media screen and (max-width: $breakpoint-1) {
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-width: $breakpoint-2) {
|
|
||||||
width: 200px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.copy {
|
.copy {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
border: 2px solid #31f39973;
|
border: 2px solid #31f39973;
|
||||||
@@ -81,6 +74,7 @@ $breakpoint-2: 565px;
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.generatorContent {
|
.generatorContent {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@@ -89,15 +83,96 @@ $breakpoint-2: 565px;
|
|||||||
padding: 0 50px;
|
padding: 0 50px;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.configurations {
|
.configurations {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: left;
|
align-items: center;
|
||||||
gap: 10px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
gap: 50px;
|
||||||
|
|
||||||
|
.options {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
gap: 100px;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
|
section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: left;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.option {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: left;
|
||||||
|
column-gap: 10px;
|
||||||
|
width: 100%;
|
||||||
|
input {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border: 2px solid #31f399;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #202024;
|
||||||
|
outline: none;
|
||||||
|
transition: all 200ms ease-in-out;
|
||||||
|
position: relative;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
&::-webkit-outer-spin-button,
|
||||||
|
&::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// make it a cross when checked
|
||||||
|
&:checked {
|
||||||
|
&:after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
width: 10px;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #31f399;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
&:before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
width: 10px;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #31f399;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after,
|
||||||
|
&:before {
|
||||||
|
top: 7px;
|
||||||
|
left: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="number"] {
|
||||||
|
width: 50px;
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.preview {
|
.preview {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -109,70 +184,45 @@ $breakpoint-2: 565px;
|
|||||||
min-height: 500px;
|
min-height: 500px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.option {
|
@media screen and (max-width: $breakpoint-1) {
|
||||||
display: flex;
|
.generatorContent {
|
||||||
flex-direction: row;
|
flex-direction: column;
|
||||||
align-items: center;
|
|
||||||
justify-content: left;
|
|
||||||
column-gap: 10px;
|
|
||||||
|
|
||||||
input {
|
.preview {
|
||||||
-webkit-appearance: none;
|
width: 80%;
|
||||||
-moz-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border: 2px solid #31f399;
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: #202024;
|
|
||||||
outline: none;
|
|
||||||
transition: all 200ms ease-in-out;
|
|
||||||
position: relative;
|
|
||||||
color: white;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
&::-webkit-outer-spin-button,
|
|
||||||
&::-webkit-inner-spin-button {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// make it a cross when checked
|
|
||||||
&:checked {
|
|
||||||
&:after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
|
||||||
height: 2px;
|
|
||||||
background-color: #31f399;
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
&:before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
|
||||||
height: 2px;
|
|
||||||
background-color: #31f399;
|
|
||||||
transform: rotate(-45deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:after,
|
|
||||||
&:before {
|
|
||||||
top: 7px;
|
|
||||||
left: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
input[type="number"] {
|
@media screen and (max-width: $breakpoint-2) {
|
||||||
width: 50px;
|
.output {
|
||||||
cursor: text;
|
.url {
|
||||||
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
label {
|
.generatorContent {
|
||||||
cursor: pointer;
|
.preview {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: $breakpoint-3) {
|
||||||
|
.output {
|
||||||
|
.url {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.generatorContent {
|
||||||
|
.configurations {
|
||||||
|
.options {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 30px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
gap: 0 0;
|
gap: 0 0;
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
color: white;
|
color: white;
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
@@ -17,6 +16,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
max-width: 20ch;
|
max-width: 20ch;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
.channelNameContainer {
|
.channelNameContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -4,18 +4,20 @@
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
body,
|
body,
|
||||||
html {
|
html {
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
width: 100vw;
|
min-width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#root {
|
#root {
|
||||||
min-height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
min-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@@ -61,7 +63,7 @@ button {
|
|||||||
// custom dark themed scrollbar
|
// custom dark themed scrollbar
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 15px;
|
height: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
|
|||||||
Reference in New Issue
Block a user