Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit aac3d49

Browse files
committed
mods borders now on top
1 parent 624936b commit aac3d49

File tree

5 files changed

+33
-13
lines changed

5 files changed

+33
-13
lines changed

package-lock.json

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/_renderer.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,13 @@ resumeInit = () => {
7070
initUI = () => {
7171
document.body.innerHTML += `<section class="mod_column" id="mod_column_left">
7272
<h3 class="title"><p>PANEL</p><p>SYSTEM</p></h3>
73-
<h3 class="title" style="top:27px;width:14.5%;left:8px;"><p></p><p></p></h3>
7473
</section>
7574
<section id="main_shell" style="height:0%;width:0%;opacity:0;">
7675
<h3 class="title" style="opacity:0;"><p>TERMINAL</p><p>MAIN SHELL</p></h3>
7776
<pre id="terminal"></pre>
7877
</section>
7978
<section class="mod_column" id="mod_column_right">
8079
<h3 class="title"><p>PANEL</p><p>NETWORK</p></h3>
81-
<h3 class="title" style="top:27px;width:14.5%;right:8px;"><p></p><p></p></h3>
8280
</section>
8381
<section id="keyboard" style="opacity:0;">
8482
</section>`;
@@ -117,14 +115,19 @@ initUI = () => {
117115
};
118116

119117
initMods = () => {
120-
document.querySelectorAll(".mod_column").forEach((e) => {
121-
e.setAttribute("class", "mod_column activated");
122-
});
123-
124118
window.mods = {};
119+
120+
// Left column
125121
window.mods.clock = new Clock("mod_column_left");
126122
window.mods.sysinfo = new Sysinfo("mod_column_left");
127123
window.mods.cpuinfo = new Cpuinfo("mod_column_left");
124+
125+
// Right column
126+
127+
128+
document.querySelectorAll(".mod_column").forEach((e) => {
129+
e.setAttribute("class", "mod_column activated");
130+
});
128131
};
129132

130133
// Prevent showing menu, exiting fullscreen or app with keyboard shortcuts

src/assets/css/mod_clock.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ div#mod_clock {
22
display: flex;
33
height: 80px;
44
padding-top: 7px;
5-
border-bottom: 1px solid rgba(190, 230, 193, 0.3);
5+
border-top: 1px solid rgba(190, 230, 193, 0.3);
66
font-family: var(--font_main_light);
77
}
88

@@ -11,7 +11,7 @@ div#mod_clock::before {
1111
border-left: 1px solid rgba(190, 230, 193, 0.3);
1212
position: relative;
1313
left: -1px;
14-
bottom: -76px;
14+
top: -12px;
1515
height: 9px;
1616
}
1717

@@ -20,7 +20,7 @@ div#mod_clock::after {
2020
border-right: 1px solid rgba(190, 230, 193, 0.3);
2121
position: relative;
2222
right: -1px;
23-
bottom: -76px;
23+
top: -12px;
2424
height: 9px;
2525
}
2626

src/assets/css/mod_sysinfo.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ div#mod_sysinfo {
44
align-items: center;
55
justify-content: space-between;
66
height: 60px;
7-
border-bottom: 1px solid rgba(190, 230, 193, 0.3);
7+
border-top: 1px solid rgba(190, 230, 193, 0.3);
88
font-size: 12px;
99
font-family: var(--font_main_light);
1010
letter-spacing: 1px;
@@ -15,7 +15,7 @@ div#mod_sysinfo::before {
1515
border-left: 1px solid rgba(190, 230, 193, 0.3);
1616
position: relative;
1717
left: -1px;
18-
bottom: -30px;
18+
top: -31px;
1919
height: 9px;
2020
}
2121

@@ -24,7 +24,7 @@ div#mod_sysinfo::after {
2424
border-right: 1px solid rgba(190, 230, 193, 0.3);
2525
position: relative;
2626
right: -1px;
27-
bottom: -30px;
27+
top: -31px;
2828
height: 9px;
2929
}
3030

src/classes/sysinfo.class.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class Sysinfo {
104104
document.querySelector("#mod_sysinfo > div:nth-child(2) > h2").innerHTML = uptime.days+":"+uptime.hours+":"+uptime.minutes;
105105
}
106106
updateBattery() {
107+
// Note: SystemInformation's battery tools seems to be kinda broken (at least on Arch), so we're going with another dep for this one
107108
let btrlvl = require("battery-level");
108109
btrlvl().then((level) => {
109110
document.querySelector("#mod_sysinfo > div:last-child > h2").innerHTML = (level*100)+"%";

0 commit comments

Comments
 (0)