mirror of
https://github.com/DerTyp7/teamspeak-obs-overlay.git
synced 2025-10-29 12:52:09 +01:00
added style config.js
This commit is contained in:
9
config.js
Normal file
9
config.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const CONFIG = {
|
||||
style: {
|
||||
fontBackground: "rgba(19, 20, 33, 0.5)",
|
||||
fontColor: "#ffffff",
|
||||
fontSize: "70pt",
|
||||
fontStrokeSize: "3px",
|
||||
fontStrokeColor: "#000000",
|
||||
},
|
||||
};
|
||||
@@ -1,12 +1,8 @@
|
||||
* {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
font-size: 70pt;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
-webkit-text-stroke: 3px black;
|
||||
background-color: transparent;
|
||||
}
|
||||
#content div {
|
||||
margin-top: 5px;
|
||||
@@ -23,3 +19,9 @@
|
||||
.content-text {
|
||||
margin-left: 130px;
|
||||
}
|
||||
|
||||
.content-text p {
|
||||
display: inline;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ function drawClients() {
|
||||
|
||||
result = "";
|
||||
getClientsInChannel(thisClient.channel).forEach((c) => {
|
||||
result += '<div> <div class="content-img">';
|
||||
result += `<div style="color:${CONFIG.style.fontColor}; font-size:${CONFIG.style.fontSize}">`;
|
||||
result += '<div class="content-img">';
|
||||
if (c.outputMuted) {
|
||||
result += ' <img src="img/muted_output.svg" />';
|
||||
} else if (c.inputMuted) {
|
||||
@@ -14,7 +15,9 @@ function drawClients() {
|
||||
result += ' <img src="img/off.svg" />';
|
||||
}
|
||||
result += "</div>";
|
||||
result += '<div class="content-text">' + c.name + "</div></div>";
|
||||
result += `<div class="content-text"
|
||||
style="-webkit-text-stroke:${CONFIG.style.fontStrokeSize} ${CONFIG.style.fontStrokeColor};
|
||||
"><p style="background:${CONFIG.style.fontBackground};">${c.name}</p></div></div>`;
|
||||
});
|
||||
elem.innerHTML = result;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<title>TS5 - OBS Overlay</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="config.js"></script>
|
||||
<script src="js/objects.js"></script>
|
||||
<script>
|
||||
let clientList = new List();
|
||||
|
||||
Reference in New Issue
Block a user