Skip to content

Commit b9be066

Browse files
committed
Further adjustment of theme. Documentation updates.
1 parent a27980e commit b9be066

8 files changed

Lines changed: 41 additions & 38 deletions

File tree

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"arya",
44
"CREPUSCULUM",
55
"EQUISOLSTICE",
6+
"habs",
67
"inputtext",
8+
"Kyiv",
79
"NOCTIS",
810
"OCCASUS",
911
"orloj",
@@ -14,6 +16,8 @@
1416
"radiobutton",
1517
"Rafie",
1618
"Recents",
19+
"subzone",
20+
"subzones",
1721
"Tošovský"
1822
]
19-
}
23+
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## 1.0.1
2+
3+
* Updated color theme for controls.
4+
* Minor documentation changes.
5+
6+
## 1.0.0
7+
8+
* Original release

README.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
1-
# PragueClock
1+
# Prague Astronomical Clock Simulator
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.5.
3+
This is a simulation of the world-famous Prague Astronomical Clock *(Pražský Orloj)*, a medieval astronomical clock first installed in 1410, and still running today (with periods of disrepair and various renovations over that span of time).
44

5-
## Development server
5+
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-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
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.
88

9-
## Code scaffolding
10-
11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12-
13-
## Build
14-
15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16-
17-
## Running unit tests
18-
19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20-
21-
## Running end-to-end tests
22-
23-
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24-
25-
## Further help
26-
27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
9+
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/).

src/app/app.component.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<i class="pi pi-caret-right" (click)="skipToEvent()"></i>
3131
</div>
3232
<div class="button-row">
33-
<p-checkbox [(ngModel)]="isoFormat" [binary]="true" label="ISO input format"></p-checkbox>
33+
<p-checkbox [(ngModel)]="isoFormat" [binary]="true" label="ISO time format"></p-checkbox>
3434
<p-checkbox [(ngModel)]="disableDst" [binary]="true" label="Disable DST on clock" (onChange)="updateTime(true)"></p-checkbox>
3535
</div>
3636
<tze-zone-selector [(ngModel)]="zone" [recents]="recentLocations" (clearItem)='clearItem($event)' (clearRecents)="clearRecents()"
@@ -47,8 +47,6 @@
4747
</div>
4848
</div>
4949

50-
<div id="graphics-credit">Original SVG clock graphics by Jan Tošovský</div>
51-
5250
<div id="svg-wrapper">
5351
<svg viewBox="0 0 600 600" xml:space="preserve">
5452
<defs>
@@ -168,6 +166,7 @@
168166
<path id="sunrisePath" [attr.d]="sunriseLabelPath" class="textPath"/>
169167
<path id="sunsetPath" [attr.d]="sunsetLabelPath" class="textPath"/>
170168
<path id="solNoctis" [attr.d]="solNoctisPath" class="textPath"/>
169+
<!-- cspell:disable -->
171170
<text>
172171
<textPath xlink:href="#sunrisePath" [attr.startOffset]="southern ? '40%' : '54%'" class="eventText">
173172
<tspan [style.font-size]="riseSetFontSize">ɐɑɒɓɔ</tspan><!-- ORTUS -->
@@ -193,6 +192,7 @@
193192
<tspan dy="-2" [style.font-size]="'12px'">ⓈⓄⓁ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ⓃⓄⒸⓉⒾⓈ</tspan><!-- CREPUSCULUM -->
194193
</textPath>
195194
</text>
195+
<!-- cspell:enable -->
196196
</g>
197197
<g id="time">
198198
<path id="timeTextPath" d="M0.0 -221.0C122.0 -221.0 221.0 -122.0 221.0 0.0C221.0 122.0 122.0 221.0 0.0 221.0C-122.0 221.0 -221.0 122.0 -221.0 0.0C-221.0 -122.0 -122.0 -221.0 0.0 -221.0" class="textPath"/>
@@ -609,5 +609,7 @@
609609
</svg>
610610
</div>
611611

612+
<div id="graphics-credit">Original SVG clock graphics by Jan Tošovský</div>
613+
612614
<p-toast position="center"></p-toast>
613615
<p-confirmDialog header="Change time"></p-confirmDialog>

src/app/app.component.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,4 @@ describe('AppComponent', () => {
1515
const app = fixture.componentInstance;
1616
expect(app).toBeTruthy();
1717
});
18-
19-
it('should render title', () => {
20-
const fixture = TestBed.createComponent(AppComponent);
21-
fixture.detectChanges();
22-
const compiled = fixture.nativeElement as HTMLElement;
23-
expect(compiled.querySelector('.content span')?.textContent).toContain('prague-clock app is running!');
24-
});
2518
});

src/app/app.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { ConfirmationService, MenuItem, MessageService } from 'primeng/api';
33
import { abs, atan2_deg, atan_deg, cos_deg, floor, max, mod, PI, Point, sign, sin_deg, sqrt, tan_deg } from '@tubular/math';
44
import { clone, getCssValue, isChromeOS, isEqual, isLikelyMobile, isSafari, processMillis, toMixedCase } from '@tubular/util';
55
import { AngleStyle, DateTimeStyle, TimeEditorOptions } from '@tubular/ng-widgets';
6-
import { AstroEvent, EventFinder, FALL_EQUINOX, FIRST_QUARTER, FULL_MOON, LAST_QUARTER, MOON, NEW_MOON, RISE_EVENT, SET_EVENT, SkyObserver, SolarSystem, SPRING_EQUINOX, SUMMER_SOLSTICE, SUN, TRANSIT_EVENT, WINTER_SOLSTICE } from '@tubular/astronomy';
6+
import {
7+
AstroEvent, EventFinder, FALL_EQUINOX, FIRST_QUARTER, FULL_MOON, LAST_QUARTER, MOON, NEW_MOON, RISE_EVENT, SET_EVENT,
8+
SkyObserver, SolarSystem, SPRING_EQUINOX, SUMMER_SOLSTICE, SUN, TRANSIT_EVENT, WINTER_SOLSTICE
9+
} from '@tubular/astronomy';
710
import ttime, { DateTime, utToTdt } from '@tubular/time';
811
import julianDay = ttime.julianDay;
912
import { TzsLocation } from '../timezone-selector/timezone-selector.component';
@@ -474,7 +477,7 @@ export class AppComponent implements OnInit {
474477
if (this.zoneFixTimeout)
475478
clearTimeout(this.zoneFixTimeout);
476479

477-
this._longitude = location.longitude;
480+
this.longitude = location.longitude;
478481
this.latitude = location.latitude;
479482
this.placeName = location.name;
480483
this.updateRecentLocations(location);

src/assets/about.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,16 @@ <h2>Animation</h2>
5656
and the clock will quickly progress through a series of times or locations.
5757
<h2>Graphic design</h2>
5858
<p>The original SVG clock graphics and font used here were originally developed by Jan Tošovský, as found on
59-
this <a href="https://drifted.in/horologium-app/" target="_blank">web site</a>.</p>
59+
<a href="https://drifted.in/horologium-app/" target="_blank">this website</a>.</p>
6060
<p>The color scheme here has been altered, the graphics have been modified to cover a full range of latitudes,
6161
and the graphics can now be updated quickly within a web browser, rather than relying on server-based updates.
6262
A central world map, similar to the one featured in the original Prague clock, has been added.</p>
6363

6464
<h2>Differences between the simulator and the original Prague clock</h2>
6565
<ul>
6666
<li>The positioning of the simulator’s clock hands, hour dial, sun, moon, and ecliptic wheel are done using
67-
modern astronomical calculations, rather than simulating the internal gearing of the physical clock.</li>
67+
your computer’s clock and modern astronomical calculations, rather than simulating the internal gearing of
68+
the mechanical clock.</li>
6869
<li>The original clock shows a map of the world in the center of the clock face, done using a
6970
<a href="https://en.wikipedia.org/wiki/Stereographic_projection" target="_blank">stereographic projection</a>,
7071
with the south pole toward the top, centered on Prague. Since this simulation can be set to any location on

src/styles.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ body {
6464
}
6565
}
6666

67+
input {
68+
background-color: #121212;
69+
color: #DDD;
70+
}
71+
72+
::placeholder {
73+
color: rgba(255, 255, 255, 0.33);
74+
font-style: italic;
75+
}
76+
6777
.p-checkbox .p-checkbox-box, .p-dropdown, .p-inputtext, .p-radiobutton .p-radiobutton-box {
6878
border-color: #555;
6979
}

0 commit comments

Comments
 (0)