Skip to content

Commit e753e36

Browse files
committed
Remove unused classes and IDs, standardize attribute order in HTML
1 parent f26f31a commit e753e36

3 files changed

Lines changed: 25 additions & 67 deletions

File tree

public/index.html

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,41 @@
1414
</head>
1515
<body>
1616
<div class="left-side" id="leftSide">
17-
<img id="cookie" class="cookie pointer" src="img/cookie.png" alt="cookie" draggable="false">
17+
<img class="cookie pointer" id="cookie" src="img/cookie.png" alt="cookie" draggable="false">
1818
<div class="cookie-counter-wrapper">
1919
<h3 class="cookie-counter shadow">Cookies: <span id="cookieCount">0</span></h3>
2020
<h4 class="cookies-per-second-counter">Cookies Per Second: <span id="cookiesPerSecondCount">0</span></h4>
2121
</div>
22-
<!-- <h3 class="win shadow" id="win">you win.</h3> -->
2322
<p class="saving-indicator" id="savingIndicator">Saved!</p>
2423
<span class="left-side-push" id="leftSidePush"></span> <!-- for some reason when you open menus it will change the size of the left side's div and smoosh everything, this prevents that (somehow) -->
2524
<div class="social-links">
2625
<a href="404.html" target="_blank" id="githubHyperlink"> <!-- this HREF is changed programmatically in main.ts in the event of a fork and a different GitHub repo link. -->
2726
<img class="github" src="img/github-mark.svg" alt="github">
2827
</a>
29-
<h5 id="versionNumberHolder" class="version-number pointer">Version: <span id="versionNumber">null</span></h5>
30-
<div id="versionSwitchInfo" class="version-switch-info">
31-
<p style="margin:0px; color:black; text-align:center;" id="versionSwitchInfoText">Clicking this will switch to the null branch.</p>
28+
<h5 class="version-number-holder pointer" id="versionNumberHolder">Version: <span id="versionNumber">null</span></h5>
29+
<div class="version-switch-info" id="versionSwitchInfo">
30+
<p style="margin:0px; color:black; text-align:center;">Clicking this will switch to the <span id="versionSwitchInfoBranch">null</span> branch.</p>
3231
</div>
3332
</div>
3433
</div> <!-- end leftSide -->
35-
<div id="middle" class="middle">
34+
<div class="middle" id="middle">
3635
<div class="middle-buttons" id="middleButtons">
3736
<div class="left-middle-buttons pointer">
38-
<div id="statsButton" class="middle-button-base stats-button">
37+
<div class="middle-button-base stats-button" id="statsButton">
3938
<p class="middle-button-name">Stats</p>
4039
</div>
41-
<div id="optionsButton" class="middle-button-base options-button">
40+
<div class="middle-button-base options-button" id="optionsButton">
4241
<p class="middle-button-name">Options</p>
4342
</div>
4443
</div>
4544
<div class="right-middle-buttons pointer">
46-
<div id="infoButton" class="middle-button-base info-button">
45+
<div class="middle-button-base info-button" id="infoButton">
4746
<p class="middle-button-name">Info</p>
4847
</div>
4948
</div>
5049
</div>
5150
<!-- middle text html -->
52-
<div id="statsMiddleText" class="middle-main">
51+
<div class="middle-main" id="statsMiddleText">
5352
<div class="middle-x pointer">
5453
<img src="img/white-x.png" alt="x button" width="38" height="38" class="no-margin">
5554
</div>
@@ -82,7 +81,7 @@ <h3 class="middle-subtitle" style="margin-top:0px;">Changelog:</h3>
8281

8382
</div>
8483
</div>
85-
<div id="optionsMiddleText" class="middle-main">
84+
<div class="middle-main" id="optionsMiddleText">
8685
<div class="middle-x pointer">
8786
<img src="img/white-x.png" alt="x button" width="38" height="38" class="no-margin">
8887
</div>
@@ -124,8 +123,8 @@ <h5 class="middle-subtitle">Miscellaneous:</h5>
124123
<p class="middle-text" style="margin-bottom:0px;">Modding:</p>
125124
<small class="middle-text">You have <span id="modsNumberLoaded">null</span> mods loaded!</small> <br>
126125
<div class="data-buttons">
127-
<button id="addModButton" class="data-button pointer" style="margin-top:3px;">Add Mod</button>
128-
<button id="listModsButton" class="data-button pointer" style="margin-top:3px; margin-left:0px;">List Mods</button>
126+
<button class="data-button pointer" id="addModButton" style="margin-top:3px;">Add Mod</button>
127+
<button class="data-button pointer" id="listModsButton" style="margin-top:3px; margin-left:0px;">List Mods</button>
129128
</div>
130129
</div>
131130
<div class="tooltip absolute no-display" id="tooltip">
@@ -141,13 +140,13 @@ <h5 class="middle-subtitle">Miscellaneous:</h5>
141140
</div> <!-- end middle -->
142141
<div class="right-side" id="rightSide">
143142
<h1 class="store-heading shadow">Store</h1>
144-
<h3 class="upgrades-marker shadow">Upgrades</h3>
143+
<h3 class="upgrades-subheading shadow">Upgrades</h3>
145144
<div class="upgrades-holder-background">
146-
<div id="upgradesHolder" class="upgrades-holder">
145+
<div class="upgrades-holder" id="upgradesHolder">
147146

148147
</div>
149148
</div>
150-
<h3 class="buildings-marker shadow">Buildings</h3>
149+
<h3 class="buildings-subheading shadow">Buildings</h3>
151150
<div class="buildings-wrapper" id="buildingsWrapper">
152151

153152
</div>

src/scss/main.scss

Lines changed: 9 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ small {
204204
left: -28px;
205205
bottom: -28px;
206206
}
207-
.version-number {
207+
.version-number-holder {
208208
position: absolute;
209209
left: 50px;
210210
top: 9.5px;
@@ -227,35 +227,6 @@ small {
227227
background-color: variables.$colored-container;
228228
}
229229

230-
/* building icon css */
231-
.keyboard-icon {
232-
background: url(img/keyboard.png);
233-
}
234-
235-
.grandpa-icon {
236-
background: url(img/grandpa.png);
237-
}
238-
239-
.ranch-icon {
240-
background: url(img/ranch.png);
241-
}
242-
243-
.tv-icon {
244-
background: url(img/tv.png);
245-
}
246-
247-
.worker-icon {
248-
background: url(img/worker.png);
249-
}
250-
251-
.wallet-icon {
252-
background-image: url(img/wallet.png);
253-
}
254-
255-
.church-icon {
256-
background-image: url(img/church.png);
257-
}
258-
259230
/* middle buttons */
260231
.left-middle-buttons {
261232
display: flex;
@@ -409,41 +380,29 @@ small {
409380
width: 100%;
410381
background-color: rgb(215, 215, 215);
411382
}
412-
.mod-id {
413-
font-style: italic;
414-
color: gray;
415-
}
416383

417384
/* random specific stuff */
418-
.upgrades-marker {
385+
.store-heading {
386+
margin: 3px;
387+
margin-bottom: 0px;
388+
font-size: 50px;
389+
text-align: center;
390+
}
391+
.upgrades-subheading {
419392
margin-top: 10px;
420393
margin-bottom: 3px;
421394
text-align: center;
422395
}
423-
424-
.buildings-marker {
396+
.buildings-subheading {
425397
margin-top: 5px;
426398
margin-bottom: 3px;
427399
text-align: center;
428400
}
429401

430-
.store-heading {
431-
margin: 3px;
432-
margin-bottom: 0px;
433-
font-size: 50px;
434-
text-align: center;
435-
}
436-
437402
.left-side-push {
438403
width: 320px;
439404
}
440405

441-
.win {
442-
display: none;
443-
margin-top: 2px;
444-
margin-bottom: 6px;
445-
text-align: center;
446-
}
447406
.saving-indicator {
448407
position: absolute;
449408
bottom: 20px;

src/ts/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export class Game implements SaveProvider<GameSaveData> {
217217
document.title = branchQuickSwitch("Clicker Cookie", "Clicker Cookie Beta", "Clicker Cookie Develop");
218218
// change version displayed
219219
document.getElementById("versionNumber").innerText = branchQuickSwitch(Game.VERSION, `${Game.VERSION} Beta`, `${Game.VERSION} Develop`);
220-
document.getElementById("versionSwitchInfoText").innerText = (Game.VERSION_BRANCH === VersionBranch.MAIN) ? "Clicking this will switch to the beta branch" : "Clicking this will switch to the main branch";
220+
document.getElementById("versionSwitchInfoBranch").innerText = (Game.VERSION_BRANCH === VersionBranch.MAIN) ? "beta" : "main";
221221

222222
if (Game.IN_DEVELOPMENT)
223223
document.title = `cc_${Game.VERSION}_${Game.VERSION_BRANCH}_dev`;

0 commit comments

Comments
 (0)