Skip to content

Commit e66db26

Browse files
authored
Merge pull request #1 from kshetline/development
Update theme
2 parents b3a2aba + b9be066 commit e66db26

17 files changed

Lines changed: 153 additions & 54 deletions

.stylelintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
],
66
"rules": {
77
"at-rule-no-unknown": null,
8-
"scss/at-rule-no-unknown": true,
8+
"declaration-block-single-line-max-declarations": null,
99
"color-function-notation": null,
1010
"color-hex-case": "upper",
1111
"no-descending-specificity": null,
1212
"no-empty-source": null,
1313
"no-invalid-position-at-import-rule": null,
14+
"scss/at-rule-no-unknown": true,
1415
"selector-class-pattern": null,
1516
"selector-descendant-combinator-no-non-space": null,
1617
"selector-list-comma-newline-after": null,

.vscode/settings.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
{
22
"cSpell.words": [
3+
"arya",
34
"CREPUSCULUM",
45
"EQUISOLSTICE",
6+
"habs",
7+
"inputtext",
8+
"Kyiv",
9+
"NOCTIS",
510
"OCCASUS",
11+
"orloj",
612
"ORTUS",
7-
"Recents"
13+
"Pražský",
14+
"primeicons",
15+
"primeng",
16+
"radiobutton",
17+
"Rafie",
18+
"Recents",
19+
"subzone",
20+
"subzones",
21+
"Tošovský"
822
]
9-
}
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/).

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"src/assets"
3232
],
3333
"styles": [
34-
"node_modules/primeng/resources/themes/nova/theme.css",
34+
"node_modules/primeng/resources/themes/arya-blue/theme.css",
3535
"node_modules/primeng/resources/primeng.min.css",
3636
"node_modules/primeicons/primeicons.css",
3737
"node_modules/@tubular/ng-widgets/assets/styles.css",

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.0.0",
3+
"version": "1.0.1",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

src/app/app.component.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="controls" [class.short]="lastHeight <= 420 && lastHeight > 380" [class.extra-short]="lastHeight <= 380">
1+
<div class="controls tbw-dark-mode" [class.short]="lastHeight <= 420 && lastHeight > 380" [class.extra-short]="lastHeight <= 380">
22
<div class="place-name-group">
33
<span *ngIf="!canSaveName && placeName" class="place-name">{{placeName}}</span>
44
<span *ngIf="!canSaveName && !placeName" class="no-name">No name provided</span>
@@ -20,6 +20,7 @@
2020
wideSpinner
2121
(click)="checkIfTimeIsEditable()"
2222
pTooltip='Uncheck on "Track current time" to modify the time'
23+
tooltipPosition="bottom"
2324
[tooltipDisabled]="!trackTime"
2425
[options]="isoFormat ? ISO_OPTS : LOCAL_OPTS"
2526
[viewOnly]="trackTime"
@@ -29,13 +30,13 @@
2930
<i class="pi pi-caret-right" (click)="skipToEvent()"></i>
3031
</div>
3132
<div class="button-row">
32-
<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>
3334
<p-checkbox [(ngModel)]="disableDst" [binary]="true" label="Disable DST on clock" (onChange)="updateTime(true)"></p-checkbox>
3435
</div>
3536
<tze-zone-selector [(ngModel)]="zone" [recents]="recentLocations" (clearItem)='clearItem($event)' (clearRecents)="clearRecents()"
3637
[autofocus]="false" [disabled]="canSaveName" (location)="changeLocation($event)"></tze-zone-selector>
37-
<div class="button-row">
38-
<p-checkbox [(ngModel)]="trackTime" [binary]="true" label="Track current time"></p-checkbox>
38+
<div class="button-row time-row">
39+
<p-checkbox [(ngModel)]="trackTime" [binary]="true" label="Track current time"></p-checkbox><span>&nbsp;&nbsp;</span>
3940
<button type="button" pButton (click)="setNow()" [disabled]="trackTime">Now</button>
4041
</div>
4142
<div class="button-row">
@@ -46,8 +47,6 @@
4647
</div>
4748
</div>
4849

49-
<div id="graphics-credit">Original SVG clock graphics by Jan Tošovský</div>
50-
5150
<div id="svg-wrapper">
5251
<svg viewBox="0 0 600 600" xml:space="preserve">
5352
<defs>
@@ -167,6 +166,7 @@
167166
<path id="sunrisePath" [attr.d]="sunriseLabelPath" class="textPath"/>
168167
<path id="sunsetPath" [attr.d]="sunsetLabelPath" class="textPath"/>
169168
<path id="solNoctis" [attr.d]="solNoctisPath" class="textPath"/>
169+
<!-- cspell:disable -->
170170
<text>
171171
<textPath xlink:href="#sunrisePath" [attr.startOffset]="southern ? '40%' : '54%'" class="eventText">
172172
<tspan [style.font-size]="riseSetFontSize">ɐɑɒɓɔ</tspan><!-- ORTUS -->
@@ -192,6 +192,7 @@
192192
<tspan dy="-2" [style.font-size]="'12px'">ⓈⓄⓁ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ⓃⓄⒸⓉⒾⓈ</tspan><!-- CREPUSCULUM -->
193193
</textPath>
194194
</text>
195+
<!-- cspell:enable -->
195196
</g>
196197
<g id="time">
197198
<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"/>
@@ -608,5 +609,7 @@
608609
</svg>
609610
</div>
610611

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

src/app/app.component.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ p-toast, p-confirmDialog {
1616
.controls {
1717
align-items: center;
1818
align-self: start;
19-
background-color: white;
19+
background-color: #121212;
20+
color: rgba(white, 0.87);
2021
display: flex;
2122
flex-direction: column;
2223
font: 14px sans-serif;
@@ -189,6 +190,7 @@ svg {
189190
display: flex;
190191
flex-direction: row;
191192
gap: 4px;
193+
margin-bottom: 0.67rem;
192194
}
193195

194196
#graphics-credit {

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
});

0 commit comments

Comments
 (0)