Skip to content

Commit 26185ff

Browse files
authored
New 1410 look, more (#7)
* New appearance option designed to reflect the likely original appearance of the clock in 1410. * Color adjustments of previous themes. * Fix for the originally skewed angles of the original SVG ecliptic wheel graphics.
1 parent 9cb8857 commit 26185ff

25 files changed

Lines changed: 786 additions & 540 deletions

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 1.4.1
2+
3+
* Fix skewed ecliptic wheel angles than had been baked into the original SVG graphics.
4+
5+
## 1.4.0
6+
7+
* New option for a speculated original 1410 appearance of the orloj.
8+
19
## 1.3.3
210

311
* Added ecliptic longitude tooltips to the large sun and moon icons, instead of just the smaller true positions markers.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ This is a simulation of the world-famous Prague Astronomical Clock *(Pražský O
44

55
The real, physical clock is designed to run at the particular latitude of Prague, which is about 50°N. This simulator, however, can be set for any location on Earth, and you can either show the current time, or set a particular time to see how that time would be displayed.
66

7-
The positioning of the simulator’s clock hands, hour dial, sun, moon, and ecliptic wheel are done using your computer’s clock and modern astronomical calculations, rather than simulating the internal gearing of the mechanical clock.
7+
The positioning of the simulator’s clock hands, hour dial, sun, moon, and ecliptic wheel are by default done using your computer’s clock and modern astronomical calculations, but mechanical clock timing can also be approximately simulated.
88

99
The original SVG clock graphics and font used here were originally developed by Jan Tošovský, as found on [this website](https://drifted.in/horologium-app/).

angular.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,6 @@
5959
},
6060
"configurations": {
6161
"production": {
62-
"budgets": [
63-
{
64-
"type": "initial",
65-
"maximumWarning": "1500kb",
66-
"maximumError": "3mb"
67-
},
68-
{
69-
"type": "anyComponentStyle",
70-
"maximumWarning": "8kb",
71-
"maximumError": "10kb"
72-
}
73-
],
7462
"fileReplacements": [
7563
{
7664
"replace": "src/environments/environment.ts",

messages.xlf

Lines changed: 68 additions & 61 deletions
Large diffs are not rendered by default.

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.3.3",
3+
"version": "1.4.1",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve --configuration=development",

src/_colors.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
$app-background: #4D4D4D;
22
$controls-background: #121212;
33
$controls-text: rgba(white, 0.87);
4+
$dark-background-1410: #070707;
45
$dark-background-2018: #132532;
5-
$dark-metal: #3B3A37;
6+
$dark-metal: #575652;
7+
$dark-metal-1410: #333;
68
$metal-edge: rgba(#2B2B2B, 0.8);
7-
$gold-trim: #FFE696;
9+
$gold-trim: #FFEAA6;
10+
$gold-trim-1410: #C5A987;
11+
$gold-trim-2018: #FFECAE;
12+
$sky-color-1410: #73AABF;
813
$sky-color-2018: #2F9DE7;

src/advanced-options/advanced-options.component.html

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
<i class="pi pi-times closer" (click)="hide()"></i>
22
<div i18n class="header">Advanced Options</div>
33

4-
<div class="colors">
5-
<p-radioButton [value]="true" [(ngModel)]="settingsHolder.post2018"
6-
i18n-label label="Post-2018 colors"></p-radioButton>
7-
<p-radioButton [value]="true" [(ngModel)]="pre2018"
8-
i18n-label label="Pre-2018 colors"></p-radioButton>
9-
</div>
10-
11-
<div class="map-and-colors">
12-
<p-checkbox [(ngModel)]="settingsHolder.hideMap" [binary]="true" [disabled]="!settingsHolder.post2018"
13-
i18n-label label="Hide globe map"></p-checkbox>
14-
<label i18n for="app-background">Background</label>
15-
<input id="app-background" name="clock-background" type="color" [(ngModel)]="settingsHolder.background">
4+
<div class="appearance">
5+
<p-dropdown tzeDropdownFix [autoDisplayFirst]="false"
6+
[style]="{ 'min-width': '250px', 'max-width': '290px' }"
7+
[options]="appearanceOptions" [(ngModel)]="settingsHolder.appearance" appendTo="body"></p-dropdown>
8+
<div class="background-input-wrapper">
9+
<div class="reset" (click)="settingsHolder.background = '#4D4D4D'">
10+
<i class="pi pi-undo" [style.opacity]="settingsHolder.background === '#4D4D4D' ? '0' : '1'"></i>
11+
</div>
12+
<label i18n for="app-background">Background</label>
13+
<input id="app-background" name="clock-background" type="color" [(ngModel)]="settingsHolder.background">
14+
</div>
1615
</div>
1716

1817
<p-checkbox [(ngModel)]="settingsHolder.translucentEcliptic" [binary]="true"

src/advanced-options/advanced-options.component.scss

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,38 @@
2929
top: 0;
3030
}
3131

32-
.colors {
32+
.appearance {
3333
align-items: center;
3434
display: flex;
3535
flex-direction: row;
36+
justify-content: space-between;
3637
gap: 1em;
38+
width: 100%;
3739
}
3840

39-
.map-and-colors {
40-
align-items: center;
41-
display: flex;
42-
flex-direction: row;
43-
gap: 1em;
44-
margin-left: 3em;
45-
margin-top: -0.5em;
41+
.spacer {
42+
height: 0.33em;
4643
}
4744

48-
:lang(de).map-and-colors {
49-
margin-left: 1em;
50-
}
45+
.background-input-wrapper {
46+
position: relative;
5147

52-
.spacer {
53-
height: 0.33em;
48+
label {
49+
position: absolute;
50+
right: 0;
51+
top: calc(100% + 0.5em);
52+
}
53+
54+
.reset {
55+
bottom: 0;
56+
left: -2em;
57+
position: absolute;
58+
top: 0;
59+
width: 2em;
60+
61+
i {
62+
position: relative;
63+
top: 0.33em;
64+
}
65+
}
5466
}

src/advanced-options/advanced-options.component.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import { Component, ElementRef } from '@angular/core';
22

3+
export enum Appearance { CURRENT, CURRENT_NO_MAP, PRE_2018, ORIGINAL_1410 }
34
export enum Timing { MODERN, MECHANICAL_ORIGINAL, MECHANICAL_UPDATED }
45

56
export interface SettingsHolder {
67
additionalPlanets: boolean;
8+
appearance: Appearance;
79
background: string;
810
detailedMechanism: boolean;
911
fasterGraphics: boolean;
10-
hideMap: boolean;
11-
post2018: boolean;
12+
hideMap?: boolean;
13+
post2018?: boolean;
1214
realPositionMarkers: boolean;
1315
showInfoPanel: boolean;
1416
timing: Timing;
@@ -27,6 +29,13 @@ export class AdvancedOptionsComponent {
2729

2830
private shown = false;
2931

32+
appearanceOptions = [
33+
{ label: $localize`Post-2018 colors`, value: Appearance.CURRENT },
34+
{ label: $localize`Post-2018 colors, no map`, value: Appearance.CURRENT_NO_MAP },
35+
{ label: $localize`Pre-2018 colors`, value: Appearance.PRE_2018 },
36+
{ label: $localize`Original 1410 look?`, value: Appearance.ORIGINAL_1410 }
37+
];
38+
3039
settingsHolder: SettingsHolder;
3140

3241
constructor(private elementRef: ElementRef) {}
@@ -49,9 +58,6 @@ export class AdvancedOptionsComponent {
4958
}
5059
}
5160

52-
get pre2018(): boolean { return !this.settingsHolder.post2018; }
53-
set pre2018(value: boolean) { this.settingsHolder.post2018 = !value; }
54-
5561
clicker = (evt: MouseEvent): void => {
5662
const r = this.elementRef.nativeElement?.getBoundingClientRect();
5763

0 commit comments

Comments
 (0)