Skip to content

Commit e1c0fda

Browse files
authored
Merge pull request #63 from WeeRox/master
Translated files to Swedish and fixed footer
2 parents 175ef37 + 957b196 commit e1c0fda

File tree

5 files changed

+57
-7
lines changed

5 files changed

+57
-7
lines changed

_data/colors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
fails: "#ffcccc"
44
works: "#ccffcc"
55
hint-background-color: "#ffffcc"
6-
default-background-color: white"
6+
default-background-color: "white"
77
regular-expression-text-backgound-color: "#eeeeee"
88
regular-expression-text-border-color: "#bbbbbb"
99
progress-color: "#bbbbbb"

_data/footer.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22
edit:
33
en: improve page
44
de: Seite verbessern
5+
sv: förbättra sidan
56
newissue:
67
en: report problem
78
de: Problem melden
9+
sv: rapportera problem
810
deletecookies:
911
en: delete state
1012
de: Zustand löschen
13+
sv: radera tillstånd
1114
view:
1215
en: view source
1316
de: Quelltext anzeigen
17+
sv: visa källa
1418
nextstep:
1519
en: Next Step
1620
de: Nächster Schritt
21+
sv: Nästa steg

_layouts/step.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@
2323
<link type="text/css" rel="stylesheet" href="../css/lang-{{ language }}.css" media="screen"/>
2424
<link rel="shortcut icon" href="../favicon.ico?v=2" type="image/x-icon">
2525
<meta charset="utf-8">
26-
<title>{{ page.title | escape }} - Interaktive Einführung in Reguläre Ausdrücke</title>
26+
<title>{{ page.title | escape }} -
27+
{% if language == "de" %}
28+
Interaktive Einführung in Reguläre Ausdrücke
29+
{% elsif language == "en" %}
30+
Interactive Introduction to Regular Expressions
31+
{% elsif language == "sv" %}
32+
Interaktiv Introduktion till Reguljära Uttryck
33+
{% endif %}
34+
</title>
2735
<script type="text/javascript">
2836
var current_page_id = "page-" + {{ page.path | jsonify }};
2937
</script>
@@ -86,13 +94,17 @@ <h2>{{ page.title | escape }}</h2>
8694
<span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dct:title" rel="dct:type">Regex-Tutorial</span> von <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Nicco Kunzmann</span> ist lizenziert unter einer <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 4.0 International Lizenz</a>.
8795
{% elsif language == "en" %}
8896
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Regex Tutorial</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Nicco Kunzmann</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
97+
{% elsif language == "sv" %}
98+
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Regex Tutorial</span> av <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Nicco Kunzmann</span> är licenserad under en <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Erkännande 4.0 Internationell Licens</a>.
8999
{% endif %}
90100
{% assign lowercase_content = content | downcase %}
91101
{% if lowercase_content contains "<img" %}
92102
{% if language == "de" %}
93103
Bilder, die eine andere Lizenz haben, können angeklickt werden, um zu dem Erklärungstext oder der Quelle zu gelangen.
94104
{% elsif language == "en" %}
95105
Pictures with a different license can be clicked to reach the source or an explanation.
106+
{% elsif language == "sv" %}
107+
Bilder med en annan licens går att klicka på för att komma till källan eller få en förklaring.
96108
{% endif %}
97109
{% endif %}
98110
</div>

css/lang-sv.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
/* --- hints --- */
3+
.clicked .toggle-hint:before {
4+
content: "Göm ledtråden!";
5+
}
6+
.secret .toggle-hint:before {
7+
content: "Visa en ledtråd?";
8+
}
9+
10+
/* --- more description --- */
11+
.playfield.verbose .match.ok:after {
12+
content: "✓ matchade";
13+
}
14+
.playfield.verbose .match.fail:after {
15+
content: "✓ matchade, men borde inte matcha";
16+
}
17+
.playfield.verbose .nomatch.ok:after {
18+
content: "borde matcha";
19+
}
20+
.playfield.verbose .nomatch.fail:after {
21+
content: "ok, ingen matchning";
22+
}
23+
24+
/* --- quiz --- */
25+
.quiz .expression:before {
26+
content: "Reguljärt uttryck: ";
27+
}
28+
.quiz .expression:after {
29+
content: " visas på vilka rader? Klicka på \"Ja\" eller \"Nej\".";
30+
}

css/tutorial.css

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
border-style: solid;
2222
}
2323

24-
.key {
24+
.key {
2525
background-color: {{ site.data.colors.regular-expression-text-backgound-color }};
2626
display: inline-block;
2727
padding: 3px 5px;
@@ -53,18 +53,21 @@ header h2 {
5353
padding-left: 1em;
5454
margin-top: 0.3em;
5555
margin-bottom: 0.5em;
56-
padding-bottom: 0.5em;
5756
text-align: center;
5857
}
5958

6059
body {
60+
display: flex;
61+
min-height: 100vh;
62+
flex-direction: column;
6163
margin: 0px;
6264
background-color: {{ site.data.colors.default-background-color }};
6365
}
6466

6567
.main {
6668
padding-right: 1em;
6769
padding-left: 1em;
70+
flex: 1;
6871
}
6972
@media (min-width: 40em) {
7073
.main {
@@ -83,10 +86,10 @@ footer img {
8386
vertical-align: middle;
8487
}
8588

86-
footer .links {
89+
footer .links {
8790
padding-bottom: 0.5em;
8891
}
89-
footer .links a {
92+
footer .links a {
9093
margin-left: 1em;
9194
margin-right: 1em;
9295
white-space: nowrap;
@@ -113,4 +116,4 @@ footer a {
113116

114117
img {
115118
max-width: 100%;
116-
}
119+
}

0 commit comments

Comments
 (0)