Skip to content

Commit 0cff177

Browse files
authored
Fix layer for central pin, Firefox bug. (#12)
* Fix layering of the other pivot pin. * Add ability to acquire old settings forwarded from previous web location. * Fix Firefox bug where filter meant to create shadowing on unequal-hour borders made them disappear instead. * Fix French translation of "First quarter".
1 parent 36fb5e4 commit 0cff177

11 files changed

Lines changed: 86 additions & 24 deletions

fwd/index.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Pražský Orloj - Prague Astronomical Clock Simulator</title>
6+
<meta name="description" content="A simulation of the Prague Astronomical Clock (Pražský Orloj), configurable for any location on Earth, with user-settable time.">
7+
<meta name="keywords" content="astronomy, astronomical clocks, prague, pražský, clocks, medieval, horology, timekeeping">
8+
<meta name="author" content="Kerry Shetline">
9+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
10+
<link rel="icon" type="image/x-icon" href="favicon.ico">
11+
<style>
12+
body {
13+
background-color: #4D4D4D;
14+
color: white;
15+
font: 14px Arial, sans-serif;
16+
margin: 1em;
17+
}
18+
19+
b {
20+
color: dodgerblue;
21+
}
22+
</style>
23+
</head>
24+
<body>
25+
This page has moved to <b>orloj.org</b>...
26+
<script>
27+
(() => {
28+
// Forward settings to new site
29+
let href = 'https://orloj.org' + location.pathname;
30+
const settings = localStorage.getItem('pac-settings');
31+
32+
if (settings)
33+
href += '?ls=' + encodeURIComponent(settings);
34+
35+
location.href = href;
36+
})();
37+
</script>
38+
</body>
39+
</html>

messages.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,14 @@
248248
<source>Original SVG clock graphics by Jan Tošovský</source>
249249
<context-group purpose="location">
250250
<context context-type="sourcefile">src/app/app.component.html</context>
251-
<context context-type="linenumber">659</context>
251+
<context context-type="linenumber">658</context>
252252
</context-group>
253253
</trans-unit>
254254
<trans-unit id="7419523574846171274" datatype="html">
255255
<source>Change time</source>
256256
<context-group purpose="location">
257257
<context context-type="sourcefile">src/app/app.component.html</context>
258-
<context context-type="linenumber">662</context>
258+
<context context-type="linenumber">661</context>
259259
</context-group>
260260
</trans-unit>
261261
<trans-unit id="5441122631150042416" datatype="html">

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "prague-clock",
3-
"version": "1.4.4",
3+
"version": "1.4.6",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve --configuration=development",

src/app/app.component.html

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,12 @@
328328
<g *ngIf="!self.southern" [attr.filter]="filterRelief" [innerHTML]="self.romanHours | safe"/>
329329
<g *ngIf="self.southern" [attr.filter]="filterRelief" [innerHTML]="self.romanHoursSouth | safe"/>
330330
</g>
331-
<g id="unequalHourBorders" mask="url(#dayArea)" [attr.filter]="filterRelief"
332-
[attr.stroke-width]="self.hourStroke + 'px'">
331+
<g id="unequalHourBorders" mask="url('#dayArea')" [attr.stroke-width]="self.hourStroke + 'px'">
333332
<path *ngFor='let item of [].constructor(11); let i = index'
334-
[attr.d]="self.hourArcs[i + 1]" class="unequalHourBorder"/>
335-
<path d="M0 0L0 -400" class="unequalHourBorder"/>
333+
[attr.d]="self.hourArcs[i + 1]" class="unequalHourBorder" [attr.filter]="filterRelief"/>
334+
<path d="M0 0L0 -400" class="unequalHourBorder" [attr.filter]="filterRelief"/>
336335
</g>
337-
<g id="horizonBorder" [attr.mask]="emptyCenter ? 'url(#baseArea-center-hole)': 'url(#baseArea)'"
336+
<g id="horizonBorder" [attr.mask]="emptyCenter ? 'url(&quot;#baseArea-center-hole&quot;)': 'url(&quot;#baseArea&quot;)'"
338337
[attr.filter]="filterRelief">
339338
<circle *ngIf="self.midnightSunR" [attr.r]="self.midnightSunR" cx="0" cy="0" class="midnightSunCircle"/>
340339
<circle id="horizonBorder" [attr.r]="self.horizonR" cx="0" [attr.cy]="self.horizonCy" class="baseCircle"/>
@@ -503,6 +502,8 @@
503502
</g>
504503
</g>
505504
</g>
505+
<circle cx="0" cy="0" r="4.5" class="pin"/>
506+
<circle cx="0" cy="0" r="4.5" class="pinSphere"/>
506507
<g id="sunGroup">
507508
<g *ngIf="detailedMechanism" [attr.filter]="filterHand">
508509
<g [attr.filter]="filterRelief">
@@ -633,7 +634,7 @@
633634
<title>{{ true_sunAngle.orig | number: '1.1-1' }}°</title>
634635
<circle cx="0" cy="-178.9" r="7" fill="yellow"/>
635636
<circle cx="0" cy="-178.9" r="7" fill="url('#sphere-effect')"/>
636-
<text x="0" y="-176.5" width="7" height="7"></text>
637+
<text x="0" y="-176.1" width="7" height="7"></text>
637638
</g>
638639
<g *ngIf="realPositionMarkers" id="moon-true" [attr.transform]="rotate(true_moonAngle.oe * rotateSign)">
639640
<title>{{ true_moonAngle.orig | number: '1.1-1' }}°</title>
@@ -645,8 +646,6 @@
645646
</g>
646647
</g>
647648
</g>
648-
<circle cx="0" cy="0" r="4.5" class="pin"/>
649-
<circle cx="0" cy="0" r="4.5" class="pinSphere"/>
650649
</g>
651650
</g>
652651
</svg>

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export class AppComponent implements OnInit, SettingsHolder, SvgHost {
280280
}
281281

282282
get filterRelief(): string {
283-
return this.fasterGraphics && (!this.svgFilteringOn || this.playing) ? null : 'url("#filterRelief")';
283+
return this.fasterGraphics && (!this.svgFilteringOn || this.playing) ? null : 'url("#filterRelief")';
284284
}
285285

286286
constructor(

src/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,30 @@
1414
<base href="/">
1515
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
1616
<link rel="icon" type="image/x-icon" href="favicon.ico">
17+
<script>
18+
(() => {
19+
// Handle forwarding of settings from old site.
20+
if (!location.search)
21+
return;
22+
23+
let ls = (new URL(document.location)).searchParams.get('ls');
24+
25+
if (ls) {
26+
try {
27+
JSON.parse(ls);
28+
}
29+
catch (e) {
30+
console.error(e);
31+
ls = '';
32+
}
33+
34+
if (ls && !localStorage.getItem('pac-settings'))
35+
localStorage.setItem('pac-settings', ls);
36+
37+
location.href = location.origin + location.pathname;
38+
}
39+
})();
40+
</script>
1741
<style>
1842
.startup-spinner {
1943
animation-delay: 0s;

src/locales/messages.cs.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,15 @@
283283
<target>Originální grafika orloje SVG od Jana Tošovského</target>
284284
<context-group purpose="location">
285285
<context context-type="sourcefile">src/app/app.component.html</context>
286-
<context context-type="linenumber">659</context>
286+
<context context-type="linenumber">658</context>
287287
</context-group>
288288
</trans-unit>
289289
<trans-unit id="7419523574846171274" datatype="html">
290290
<source>Change time</source>
291291
<target>Změňte čas</target>
292292
<context-group purpose="location">
293293
<context context-type="sourcefile">src/app/app.component.html</context>
294-
<context context-type="linenumber">662</context>
294+
<context context-type="linenumber">661</context>
295295
</context-group>
296296
</trans-unit>
297297
<trans-unit id="5441122631150042416" datatype="html">

src/locales/messages.de.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,15 @@
283283
<target>Originale SVG-Uhrengrafik von Jan Tošovský</target>
284284
<context-group purpose="location">
285285
<context context-type="sourcefile">src/app/app.component.html</context>
286-
<context context-type="linenumber">659</context>
286+
<context context-type="linenumber">658</context>
287287
</context-group>
288288
</trans-unit>
289289
<trans-unit id="7419523574846171274" datatype="html">
290290
<source>Change time</source>
291291
<target>Zeit ändern</target>
292292
<context-group purpose="location">
293293
<context context-type="sourcefile">src/app/app.component.html</context>
294-
<context context-type="linenumber">662</context>
294+
<context context-type="linenumber">661</context>
295295
</context-group>
296296
</trans-unit>
297297
<trans-unit id="5441122631150042416" datatype="html">

src/locales/messages.es.xlf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,15 @@
283283
<target>Gráficos de reloj originales de Jan Tošovský</target>
284284
<context-group purpose="location">
285285
<context context-type="sourcefile">src/app/app.component.html</context>
286-
<context context-type="linenumber">659</context>
286+
<context context-type="linenumber">658</context>
287287
</context-group>
288288
</trans-unit>
289289
<trans-unit id="7419523574846171274" datatype="html">
290290
<source>Change time</source>
291291
<target>Cambio de hora</target>
292292
<context-group purpose="location">
293293
<context context-type="sourcefile">src/app/app.component.html</context>
294-
<context context-type="linenumber">662</context>
294+
<context context-type="linenumber">661</context>
295295
</context-group>
296296
</trans-unit>
297297
<trans-unit id="5441122631150042416" datatype="html">

0 commit comments

Comments
 (0)