Skip to content

Commit fb24691

Browse files
update
1 parent 277b95c commit fb24691

11 files changed

Lines changed: 310 additions & 48 deletions

File tree

css/language.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
opacity 0.5s ease,
9999
transform 0.5s ease;
100100
top: 2rem;
101-
white-space: nowrap;
101+
z-index: 100;
102102
}
103103

104104
.language-toast.show {

element/footer.html

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
<footer class="footer">
22
<div class="footer-left">
33
<p>RandomCollection</p>
4-
<p class="footer-left-bottom" data-i18n="footer"></p>
4+
<p
5+
class="footer-left-bottom"
6+
data-i18n="footer"
7+
></p>
58
</div>
69
<div class="footer-right">
710
<a
811
href="https://github.com/RandomCollection"
912
target="_blank"
1013
rel="noopener noreferrer"
1114
>
12-
<svg class="img-social" xmlns="http://www.w3.org/2000/svg">
15+
<svg
16+
class="img-social"
17+
xmlns="http://www.w3.org/2000/svg"
18+
>
1319
<use href="/img/github.svg"></use>
1420
</svg>
1521
</a>
@@ -18,12 +24,22 @@
1824
target="_blank"
1925
rel="noopener noreferrer"
2026
>
21-
<svg class="img-social" xmlns="http://www.w3.org/2000/svg">
27+
<svg
28+
class="img-social"
29+
xmlns="http://www.w3.org/2000/svg"
30+
>
2231
<use href="/img/facebook.svg"></use>
2332
</svg>
2433
</a>
25-
<a href="https://x.com" target="_blank" rel="noopener noreferrer">
26-
<svg class="img-social" xmlns="http://www.w3.org/2000/svg">
34+
<a
35+
href="https://x.com"
36+
target="_blank"
37+
rel="noopener noreferrer"
38+
>
39+
<svg
40+
class="img-social"
41+
xmlns="http://www.w3.org/2000/svg"
42+
>
2743
<use href="/img/x.svg"></use>
2844
</svg>
2945
</a>

element/header.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<header class="header">
22
<span class="logo-word-left">Random</span>
3-
<svg class="img-logo" xmlns="http://www.w3.org/2000/svg">
3+
<svg
4+
class="img-logo"
5+
xmlns="http://www.w3.org/2000/svg"
6+
>
47
<use href="/img/logo.svg#logo"></use>
58
</svg>
69
<span class="logo-word-right">Collection</span>

element/language.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<div class="language">
22
<button class="language-button">
3-
<span class="language-active" data-i18n="language"></span>
4-
<!-- <span class="language-arrow">▾</span> -->
3+
<span
4+
class="language-active"
5+
data-i18n="language"
6+
></span>
57
</button>
68

79
<ul class="language-dropdown">

element/nav.html

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
<nav class="nav">
22
<div class="nav-container">
3-
<button class="nav-hamburger" type="button"></button>
3+
<button
4+
class="nav-hamburger"
5+
type="button"
6+
>
7+
8+
</button>
49
<ul class="nav-page">
510
<li>
6-
<a data-i18n="nav_home" href="/index.html"></a>
11+
<a
12+
data-i18n="nav_home"
13+
href="/index.html"
14+
></a>
715
</li>
816
<li>
9-
<a data-i18n="nav_economics" href="/page/economics/economics.html"></a>
17+
<a
18+
data-i18n="nav_economics"
19+
href="/page/economics/economics.html"
20+
></a>
1021
</li>
1122
<li class="nav-dropdown">
1223
<button
@@ -37,10 +48,22 @@
3748
></button>
3849
<ul class="nav-page-sub">
3950
<li>
40-
<a data-i18n="nav_coding_git" href="/page/coding/git.html"></a>
51+
<a
52+
data-i18n="nav_coding_git"
53+
href="/page/coding/git.html"
54+
></a>
55+
</li>
56+
<li>
57+
<a
58+
data-i18n="nav_coding_html"
59+
href="/page/coding/html.html"
60+
></a>
4161
</li>
4262
<li>
43-
<a data-i18n="nav_coding_html" href="/page/coding/html.html"></a>
63+
<a
64+
data-i18n="nav_coding_linux"
65+
href="/page/coding/linux.html"
66+
></a>
4467
</li>
4568
<li>
4669
<a
@@ -49,10 +72,16 @@
4972
></a>
5073
</li>
5174
<li>
52-
<a data-i18n="nav_coding_sas" href="/page/coding/sas.html"></a>
75+
<a
76+
data-i18n="nav_coding_sas"
77+
href="/page/coding/sas.html"
78+
></a>
5379
</li>
5480
<li>
55-
<a data-i18n="nav_coding_sql" href="/page/coding/sql.html"></a>
81+
<a
82+
data-i18n="nav_coding_sql"
83+
href="/page/coding/sql.html"
84+
></a>
5685
</li>
5786
<li>
5887
<a
@@ -63,7 +92,10 @@
6392
</ul>
6493
</li>
6594
<li>
66-
<a data-i18n="nav_resource" href="/page/resource/resource.html"></a>
95+
<a
96+
data-i18n="nav_resource"
97+
href="/page/resource/resource.html"
98+
></a>
6799
</li>
68100
</ul>
69101
</div>

element/theme.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<div class="theme" role="button" tabindex="0">
1+
<div
2+
class="theme"
3+
role="button"
4+
tabindex="0"
5+
>
26
<div class="toggle-track">
37
<div class="toggle-thumb">
48
<span class="sun"></span>

highlight/LICENSE

Lines changed: 0 additions & 29 deletions
This file was deleted.

js/language.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
window.currentLangData = {};
44

5+
const DE_TOAST_SHOWN_KEY = "deToastShown";
6+
57
// Fetch language data
68
async function fetchLanguageData(lang) {
79
const response = await fetch(`/language/${lang}.json`);
@@ -53,8 +55,12 @@ async function changeLanguage(lang) {
5355
updateButtonText(lang);
5456
highlightSelectedLanguage(lang);
5557

56-
if (lang === "de") {
58+
if (lang === "de" && !sessionStorage.getItem(DE_TOAST_SHOWN_KEY)) {
5759
showToast(langData.language_toast);
60+
sessionStorage.setItem(DE_TOAST_SHOWN_KEY, "true");
61+
}
62+
if (lang !== "de") {
63+
sessionStorage.removeItem(DE_TOAST_SHOWN_KEY);
5864
}
5965
}
6066

language/de.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"nav_coding": "Programmierung",
1010
"nav_coding_git": "Git",
1111
"nav_coding_html": "HTML",
12+
"nav_coding_linux": "Linux",
1213
"nav_coding_python": "Python",
1314
"nav_coding_sas": "SAS",
1415
"nav_coding_sql": "SQL",
@@ -134,6 +135,69 @@
134135
]
135136
},
136137
"coding_html_text_2": "Die Verwendung von JavaScript für <strong>RandomCollection</strong> ist sehr begrenzt, da die Website statischer Natur ist. Auch der Einsatz von responsivem Webdesign ist begrenzt, und eine korrekte Darstellung der Website auf verschiedenen Geräten kann nicht garantiert werden.",
138+
"coding_linux_title": "Linux",
139+
"coding_linux_code_title": "Befehle",
140+
"coding_linux_code": {
141+
"items": [
142+
{
143+
"text": "<code class='language-powershell'>cd &lt;directory&gt;</code>: wechsle in das aktuelle Verzeichnis &lt;directory&gt;"
144+
},
145+
{
146+
"text": "<code class='language-powershell'>cd ~</code>: wechsle in das Heimverzeichnis"
147+
},
148+
{
149+
"text": "<code class='language-powershell'>cd /</code>: wechsle in das Stammverzeichnis"
150+
},
151+
{
152+
"text": "<code class='language-powershell'>cd ..</code>: wechsle in das übergeordnete Verzeichnis"
153+
},
154+
{
155+
"text": "<code class='language-powershell'>clear</code>: leere den Bildschirm"
156+
},
157+
{
158+
"text": "<code class='language-powershell'>cp &lt;from&gt; &lt;to&gt;</code>: kopiere Dateien oder Verzeichnisse von &lt;from&gt; nach &lt;to&gt;"
159+
},
160+
{
161+
"text": "<code class='language-powershell'>echo '&lt;text&gt;'</code>: zeige den Text &lt;text&gt;"
162+
},
163+
{
164+
"text": "<code class='language-powershell'>head &lt;file&gt;</code>: zeige die ersten Zeilen von &lt;file&gt;"
165+
},
166+
{
167+
"text": "<code class='language-powershell'>kill &lt;id&gt;</code>: beende den Prozess mit ID &lt;id&gt;"
168+
},
169+
{
170+
"text": "<code class='language-powershell'>ls</code>: liste Dateien und Verzeichnisse auf"
171+
},
172+
{
173+
"text": "<code class='language-powershell'>ls -a</code>: liste alles auf"
174+
},
175+
{
176+
"text": "<code class='language-powershell'>ls -l</code>: liste Dateien und Verzeichnisse im Langformat mit Berechtigungen auf"
177+
},
178+
{
179+
"text": "<code class='language-powershell'>ls -l</code>: liste Dateien und Verzeichnisse im Langformat einschließlich versteckter Dateien auf"
180+
},
181+
{
182+
"text": "<code class='language-powershell'>mkdir &lt;directory&gt;</code>: erstelle ein neues Verzeichnis &lt;directory&gt;"
183+
},
184+
{
185+
"text": "<code class='language-powershell'>mv &lt;from&gt; &lt;to&gt;</code>: verschiebe Verzeichnisse von &lt;from&gt; nach &lt;to&gt; oder benenne Dateien um"
186+
},
187+
{
188+
"text": "<code class='language-powershell'>ps</code>: liste die laufenden Prozesse auf"
189+
},
190+
{
191+
"text": "<code class='language-powershell'>pwd</code>: zeige den aktuellen Verzeichnispfad an"
192+
},
193+
{
194+
"text": "<code class='language-powershell'>rm &lt;file/directory&gt;</code>: lösche Datei &lt;Datei&gt; oder Verzeichnis &lt;Verzeichnis&gt;"
195+
},
196+
{
197+
"text": "<code class='language-powershell'>rm -r &lt;file/directory&gt;</code>: lösche Datei &lt;Datei&gt; oder Verzeichnis &lt;Verzeichnis&gt; rekursiv"
198+
}
199+
]
200+
},
137201
"coding_python_title": "Python Spickzettel",
138202
"coding_sas_title": "SAS",
139203
"coding_sas_text": "Das <strong>Statistical Analysis System (SAS)</strong> ist eine vom SAS Institute entwickelte Statistik-Software-Suite.",

language/en.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"nav_coding": "Coding",
1010
"nav_coding_git": "Git",
1111
"nav_coding_html": "HTML",
12+
"nav_coding_linux": "Linux",
1213
"nav_coding_python": "Python",
1314
"nav_coding_sas": "SAS",
1415
"nav_coding_sql": "SQL",
@@ -134,6 +135,67 @@
134135
]
135136
},
136137
"coding_html_text_2": "The usage of JavaScript for <strong>RandomCollection</strong> is very limited for the website is static in nature. The usage of responsive web design is limited as well and a correct appearance of the website across different devices cannot be guaranteed.",
138+
"coding_linux_title": "Linux",
139+
"coding_linux_code_title": "Commands",
140+
"coding_linux_code": {
141+
"items": [
142+
{
143+
"text": "<code class='language-powershell'>cd &lt;directory&gt;</code>: change the current directory to &lt;directory&gt;"
144+
},
145+
{
146+
"text": "<code class='language-powershell'>cd ~</code>: change to home directory"
147+
},
148+
{
149+
"text": "<code class='language-powershell'>cd /</code>: change to root directory"
150+
},
151+
{
152+
"text": "<code class='language-powershell'>cd ..</code>: change to parent directory"
153+
},
154+
{
155+
"text": "<code class='language-powershell'>clear</code>: clear the terminal screen"
156+
},
157+
{
158+
"text": "<code class='language-powershell'>cp &lt;from&gt; &lt;to&gt;</code>: copy files or directories from &lt;from&gt; to &lt;to&gt;"
159+
},
160+
{
161+
"text": "<code class='language-powershell'>echo '&lt;text&gt;'</code>: display &lt;text&gt;"
162+
},
163+
{
164+
"text": "<code class='language-powershell'>head &lt;file&gt;</code>: display the first few lines of &lt;file&gt;"
165+
},
166+
{
167+
"text": "<code class='language-powershell'>kill &lt;id&gt;</code>: terminate a process by its ID &lt;id&gt;"
168+
},
169+
{
170+
"text": "<code class='language-powershell'>ls</code>: list files and directories"
171+
},
172+
{ "text": "<code class='language-powershell'>ls -a</code>: list all" },
173+
{
174+
"text": "<code class='language-powershell'>ls -l</code>: list in long format showing permissions"
175+
},
176+
{
177+
"text": "<code class='language-powershell'>ls -l</code>: list in long format including hidden files"
178+
},
179+
{
180+
"text": "<code class='language-powershell'>mkdir &lt;directory&gt;</code>: create a new directory &lt;directory&gt;"
181+
},
182+
{
183+
"text": "<code class='language-powershell'>mv &lt;from&gt; &lt;to&gt;</code>: move or rename files and directories from &lt;from&gt; to &lt;to&gt;"
184+
},
185+
{
186+
"text": "<code class='language-powershell'>ps</code>: display the list of running processes"
187+
},
188+
{
189+
"text": "<code class='language-powershell'>pwd</code>: display the current directory path"
190+
},
191+
{
192+
"text": "<code class='language-powershell'>rm &lt;file/directory&gt;</code>: remove file &lt;file&gt; or directory &lt;directory&gt;"
193+
},
194+
{
195+
"text": "<code class='language-powershell'>rm -r &lt;file/directory&gt;</code>: recursively remove file &lt;file&gt; or directory &lt;directory&gt;"
196+
}
197+
]
198+
},
137199
"coding_python_title": "Python Cheatsheet",
138200
"coding_sas_title": "SAS",
139201
"coding_sas_text": "The <strong>Statistical Analysis System (SAS)</strong> is a statistical software suite developed by the SAS Institute.",

0 commit comments

Comments
 (0)