Bug fixes and improvements

This commit is contained in:
schmelczerandras 2020-09-11 21:51:21 +02:00
parent a9de28e056
commit 5ea9094ed1
13 changed files with 20 additions and 15 deletions

View file

@ -12,6 +12,8 @@ RUN npm run build
FROM nginx:alpine FROM nginx:alpine
HEALTHCHECK --interval=1m --timeout=10s CMD curl --fail http://localhost/ || exit 1
WORKDIR /usr/share/nginx/html WORKDIR /usr/share/nginx/html
RUN rm -rf * RUN rm -rf *

View file

@ -1,4 +1,4 @@
version: "3.8" version: '3.8'
services: services:
timeline: timeline:
@ -13,7 +13,7 @@ services:
# no cpu limit # no cpu limit
memory: 16M memory: 16M
reservations: reservations:
cpus: "0.2" cpus: '0.2'
memory: 16M memory: 16M
placement: placement:
max_replicas_per_node: 1 max_replicas_per_node: 1

View file

@ -11,6 +11,7 @@ events {
http { http {
server_tokens off; server_tokens off;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;

View file

@ -9,16 +9,16 @@ export class Image implements Primitive {
private readonly alt: string private readonly alt: string
) {} ) {}
public toHTML(noContainer = false): html { public toHTML(container = false): html {
return ` return `
${!noContainer ? `<div class="figure-container">` : ''} ${container ? `<div class="figure-container">` : ''}
<img tabindex="0" <img tabindex="0"
srcset="${this.image.srcSet}" srcset="${this.image.srcSet}"
sizes="${this.getSizes()}" sizes="${this.getSizes()}"
src="${last(this.image.images)?.path}" src="${last(this.image.images)?.path}"
alt="${this.alt}" alt="${this.alt}"
/> />
${!noContainer ? `</div>` : ''} ${container ? `</div>` : ''}
`; `;
} }

View file

@ -8,16 +8,16 @@ export class Video implements Primitive {
private readonly webm: url, private readonly webm: url,
private readonly options?: string private readonly options?: string
) {} ) {}
public toHTML(noContainer = false): string { public toHTML(container = false): string {
return ` return `
${!noContainer ? `<div class="figure-container">` : ''} ${container ? `<div class="figure-container">` : ''}
<video ${this.options} ${ <video ${this.options} ${
this.poster ? `poster="${this.poster}` : '' this.poster ? `poster="${this.poster}` : ''
}" > }" >
<source src="${this.webm}" type="video/webm"/> <source src="${this.webm}" type="video/webm"/>
<source src="${this.mp4}" type="video/mp4"/> <source src="${this.mp4}" type="video/mp4"/>
</video> </video>
${!noContainer ? `</div>` : ''} ${container ? `</div>` : ''}
`; `;
} }
} }

View file

@ -5,7 +5,7 @@ import './about.scss';
export const generate = ({ name, picture }: Header): html => ` export const generate = ({ name, picture }: Header): html => `
<section id="about"> <section id="about">
${picture.toHTML(true)} ${picture.toHTML()}
<div class="placeholder"></div> <div class="placeholder"></div>
<h1>${name}</h1> <h1>${name}</h1>
</section> </section>

View file

@ -16,6 +16,7 @@ section#about {
@include square($img-size); @include square($img-size);
border-radius: 100%; border-radius: 100%;
cursor: pointer; cursor: pointer;
box-shadow: var(--shadow);
} }
p { p {

View file

@ -21,7 +21,8 @@ export class PageThemeSwitcher extends PageElement {
super(createElement(generate())); super(createElement(generate()));
const storedIsDark = PageThemeSwitcher.loadFromLocalStorage(); const storedIsDark = PageThemeSwitcher.loadFromLocalStorage();
const isDark = storedIsDark ? storedIsDark : isSystemLevelDarkModeEnabled(); const isDark =
storedIsDark !== null ? storedIsDark : isSystemLevelDarkModeEnabled();
if (isDark) { if (isDark) {
(this.element as HTMLInputElement).checked = true; (this.element as HTMLInputElement).checked = true;

View file

@ -15,7 +15,7 @@ export const generate = (
</div> </div>
<div class="card"> <div class="card">
<h2>${title}</h2> <h2>${title}</h2>
${figure.toHTML()} ${figure.toHTML(true)}
${description.toHTML()} ${description.toHTML()}
${ ${
more more

View file

@ -290,7 +290,7 @@ export const create = () => {
curiumVitaes: [{ name: `Curriculum vitae`, url: cvEnglish }], curiumVitaes: [{ name: `Curriculum vitae`, url: cvEnglish }],
email: `andras@schmelczer.dev`, email: `andras@schmelczer.dev`,
lastEditText: `Last modified on `, lastEditText: `Last modified on `,
lastEdit: new Date(2020, 8 + 1, 30), // months are 0 indexed lastEdit: new Date(2020, 9 - 1, 10), // months are 0 indexed
}), }),
}; };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 4.2 MiB

Before After
Before After

View file

@ -12,7 +12,7 @@ a {
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
padding-bottom: $line-width; padding: 0 3px $line-width 0;
&:before, &:before,
&:after { &:after {

View file

@ -22,7 +22,7 @@
--large-margin: 70px; --large-margin: 70px;
--normal-margin: 45px; --normal-margin: 45px;
--small-margin: 25px; --small-margin: 25px;
--shadow: 0 0 10px 2px rgba(0, 0, 0, 0.075), 0 0 1px rgba(0, 0, 0, 0.2); --shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.2);
--inset-shadow: inset 0 0 10px 2px rgba(0, 0, 0, 0.075), --inset-shadow: inset 0 0 10px 2px rgba(0, 0, 0, 0.075),
inset 0 0 1px rgba(0, 0, 0, 0.2); inset 0 0 1px rgba(0, 0, 0, 0.2);
--icon-size: 35px; --icon-size: 35px;
@ -36,7 +36,7 @@
--large-margin: 60px; --large-margin: 60px;
--normal-margin: 30px; --normal-margin: 30px;
--small-margin: 15px; --small-margin: 15px;
--shadow: 0 0 10px 2px rgba(0, 0, 0, 0.05), 0 0 1px rgba(0, 0, 0, 0.125); --shadow: 0 0 10px 2px rgba(0, 0, 0, 0.75), 0 0 1px rgba(0, 0, 0, 0.125);
--inset-shadow: inset 0 0 10px 2px rgba(0, 0, 0, 0.05), --inset-shadow: inset 0 0 10px 2px rgba(0, 0, 0, 0.05),
inset 0 0 1px rgba(0, 0, 0, 0.125); inset 0 0 1px rgba(0, 0, 0, 0.125);
--icon-size: 25px; --icon-size: 25px;