Skip to content

Commit fbd0dee

Browse files
committed
Fancy join buttons
1 parent abb2013 commit fbd0dee

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ ipc.on("setServers", function(event, data){
6161
}
6262
// add button to join server, also generate buttons with string manipulation because that is SO SAFE!
6363
// html += "<td onclick='launchFactorio(\""+data[key].publicIP+"\",\""+data[key].serverPort+"\",\""+data[key].rconPort+"\",\""+JSON.stringify(data[key].mods)+"\")'>Join server</td></tr>"
64-
html += '<td id="temp" onclick="launchFactorio(this)">Join server</td>'
64+
html += '<td id="temp" onclick="launchFactorio(this)"><button class="button launchButton">Join server</button></td>'
6565
}
6666
}
6767

style.css

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,29 @@ td {
1818
height:30px;
1919
background-color:lightgray;
2020
font-size:20px;
21-
}
21+
}
22+
23+
.button {
24+
background-color: #4CAF50; /* Green */
25+
border: 2px solid #4CAF50;
26+
color: white;
27+
text-align: center;
28+
text-decoration: none;
29+
display: inline-block;
30+
font-size: 15px;
31+
margin: 1px 1px;
32+
cursor: pointer;
33+
34+
transition-duration: 0.4s;
35+
}
36+
37+
.button:hover {
38+
background-color: white;
39+
color: black;
40+
border: 2px solid #4CAF50;
41+
}
42+
43+
.launchButton {
44+
background-color: #4CAF50;
45+
padding: 0px 20px;
46+
}

0 commit comments

Comments
 (0)