Skip to content

Commit 77567d0

Browse files
committed
Do not forget synergy font
1 parent 3d7bc05 commit 77567d0

File tree

5 files changed

+27
-1
lines changed

5 files changed

+27
-1
lines changed

src/main/resources/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ code.server.error.home=Go to the home page!
5858
code.arrow.up=Top
5959
code.arrow.down=Bottom
6060
code.version=Code Polyglot Version:
61+
code.font=Font

src/main/resources/messages_ru.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ code.server.error.home=На главную страницу!
5858
code.arrow.up=Вверх
5959
code.arrow.down=Вниз
6060
code.version=Версия Code Polyglot:
61+
code.font=Шрифт

src/main/resources/static/css/techno/code.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ input::placeholder {
170170
#site-recent-header {
171171
margin-bottom: 0;
172172
}
173+
#font {
174+
cursor: pointer;
175+
}
173176

174177
/* Code Block */
175178
.code-table {
@@ -245,7 +248,7 @@ input::placeholder {
245248
}
246249
.radio-mark {
247250
position: absolute;
248-
top: 0;
251+
top: -1px;
249252
left: 1px;
250253
height: 9px;
251254
width: 9px;
@@ -285,6 +288,11 @@ input::placeholder {
285288
}
286289

287290
/* Custom Fonts */
291+
@font-face {
292+
font-family: "Synergy Full Bold Condensed";
293+
src: url("/font/synergy-full-bold-condensed.woff2") format("woff2");
294+
}
295+
288296
@font-face {
289297
font-family: "Nokia Standard Bold";
290298
src: url("/font/nokia-standard-bold.woff2") format("woff2");

src/main/resources/static/js/code.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,18 @@ if (button_wrap) {
4646
}
4747
}
4848
}
49+
50+
var font = document.getElementById('font');
51+
if (font) {
52+
font.onclick = function () {
53+
if (font.classList.toggle('toggle-font')) {
54+
document.getElementsByClassName('page')[0].style.font = '12px "Synergy Full Bold Condensed", "DejaVu Sans", sans-serif';
55+
document.getElementsByClassName('table')[0].style.fontSize = '12px'
56+
document.querySelectorAll('.radio-mark').forEach(radio => radio.style.left = '2px');
57+
} else {
58+
document.getElementsByClassName('page')[0].style.font = '12px "Nokia Standard Bold", "DejaVu Sans", sans-serif';
59+
document.getElementsByClassName('table')[0].style.fontSize = '11px'
60+
document.querySelectorAll('.radio-mark').forEach(radio => radio.style.left = '1px');
61+
}
62+
}
63+
}

src/main/resources/templates/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ <h2 th:if="*{title}" th:with="head=*{title}">
118118
<span th:text="#{code.powered}">Powered by</span> <a href="https://www.graalvm.org/" title="GraalVM Community">GraalVM</a> v<span th:text="${graalvm_version}"></span>
119119
</span>
120120
<span class="right">
121+
<a id="font" th:if="${#strings.equals(skin, 'techno')}" th:title="#{code.font}">𝑓</a>
121122
<span th:text="#{code.skin}">Skin:</span>
122123
<a title="Techno" th:href="${'/opts/?skin=techno'}">Techno</a>
123124
|

0 commit comments

Comments
 (0)