Compare commits
37 commits
Author | SHA1 | Date | |
---|---|---|---|
d739b4cfe8 | |||
6cde286d3b | |||
![]() |
7ce5ceea9e | ||
![]() |
750ae4a6cb | ||
![]() |
83d8ca71c1 | ||
![]() |
062f324783 | ||
597b13c01a | |||
be42bc7cbb | |||
5c3569eed8 | |||
36345199e3 | |||
1dd61b7596 | |||
64db7544b7 | |||
cb6a0e9ec5 | |||
a63714304b | |||
1f0024afa6 | |||
52a7961f36 | |||
![]() |
9413b2ac4e | ||
0cd5d11cd8 | |||
9526e7bf52 | |||
![]() |
b08169fe88 | ||
![]() |
24b35e36fd | ||
![]() |
54da8f9be2 | ||
![]() |
d5ea7961fe | ||
![]() |
5f9be25aca | ||
4aa37dd129 | |||
ad20c8118b | |||
04ccab7927 | |||
88414d897b | |||
68f064ba23 | |||
a457357583 | |||
5c07d93535 | |||
6645f2b672 | |||
![]() |
cbd4a2c80d | ||
ac2c81f3b9 | |||
3080caf1bf | |||
52b8945086 | |||
bfa9babb35 |
13
.github/ISSUE_TEMPLATE/lighthouse.md
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
name: Lighthouse
|
||||
about: Audit non-conformity (issue or fix)
|
||||
title: "[Category]"
|
||||
labels: lighthouse
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
> Replace with description
|
||||
|
||||
Device|Category|Score before fix|Score after fix
|
||||
--|--|--|--
|
54
.gitignore
vendored
Normal file → Executable file
|
@ -1 +1,55 @@
|
|||
# victorwesterlund.com #
|
||||
########################
|
||||
.well-known/
|
||||
/content
|
||||
|
||||
# Bootstrapping #
|
||||
#################
|
||||
/node_modules
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/vendor
|
||||
.env
|
||||
.env.backup
|
||||
.phpunit.result.cache
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
public/robots.txt
|
||||
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
Icon?
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
.directory
|
||||
|
||||
# Tool specific files #
|
||||
#######################
|
||||
# vim
|
||||
*~
|
||||
*.swp
|
||||
*.swo
|
||||
# sublime text & textmate
|
||||
*.sublime-*
|
||||
*.stTheme.cache
|
||||
*.tmlanguage.cache
|
||||
*.tmPreferences.cache
|
||||
# Eclipse
|
||||
.settings/*
|
||||
# JetBrains, aka PHPStorm, IntelliJ IDEA
|
||||
.idea/*
|
||||
# NetBeans
|
||||
nbproject/*
|
||||
# Visual Studio Code
|
||||
.vscode
|
||||
# Sass preprocessor
|
||||
.sass-cache/
|
||||
|
|
355
LICENSE
Normal file → Executable file
|
@ -1,24 +1,339 @@
|
|||
This is free and unencumbered software released into the public domain.
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
Preamble
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
For more information, please refer to <https://unlicense.org>
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
|
49
README.md
Normal file → Executable file
|
@ -1,16 +1,41 @@
|
|||

|
||||
<div align="center">
|
||||
<img width="100px" src="https://storage.googleapis.com/public.victorwesterlund.com/github/VictorWesterlund/victorwesterlund.com/vw.svg"/>
|
||||
<h3>Source code for <a href="https://victorwesterlund.com"><strong>victorwesterlund.com</strong></a></h3>
|
||||
</div>
|
||||
|
||||
## Source for [*victorwesterlund.com*](https://victorwesterlund.com)
|
||||

|
||||
## Local installation
|
||||
|
||||
This repo contains the source code for the root-domain `victorwesterlund.com`.
|
||||
If someone for whatever reason want to set up their own environment of this. Here's how you do so assuming you have [NGINX](https://nginx.org/en/) up and running:
|
||||
|
||||
While some sub-domains host code which isn't open source, here's at least an explanation on what they're used for:
|
||||
1. **Clone this repo**
|
||||
|
||||
Domain name|Description
|
||||
--|--
|
||||
`public.victorwesterlund.com`|GCS bucket with public content *(the beautiful screenshot above)*
|
||||
`*.github.victorwesterlun.com`|CNAME for my public repositories using [GitHub Pages](https://pages.github.com/)
|
||||
`api.victorwesterlund.com`|Hosted endpoints (most of which contain the back-end component of my public repos)
|
||||
`friday.victorwesterlund.com`|Self-hosted content
|
||||
`info.victorwesterlund.com`|(old and useless) Google Pages site
|
||||
```
|
||||
git clone https://github.com/VictorWesterlund/victorwesterlund.com
|
||||
```
|
||||
|
||||
2. **Create an NGINX site config**
|
||||
|
||||
Create and enable a new site + server config with the `root` pointed to the **/public** folder inside the repo.
|
||||
|
||||
3. **Add support for `.mjs`**
|
||||
|
||||
I'm using the hyped .mjs extension for the ES modules and NGINX does not serve the correct MIME-type for these yet.
|
||||
|
||||
Open **/etc/nginx/mime.types** with your text editor of choice and add `mjs` to the `application/javascript` MIME-type. Save and exit.
|
||||
|
||||
```
|
||||
types {
|
||||
...
|
||||
application/javascript js mjs;
|
||||
...
|
||||
}
|
||||
```
|
||||
*Psst: if you shiver at the sight of JS using another type than your HTML:s and CSS:ess (you are my kind of nerd), replace **application/javascript** with **text/javascript** and remain [WHATWG compliant](https://mimesniff.spec.whatwg.org/#javascript-mime-type)😚*
|
||||
|
||||
4. **Fire up NGINX with the new config**
|
||||
|
||||
Verify that your changes are valid and restart NGINX. Hop over to your browser and navigate to your set endpoint - fingers crossed 🤞
|
||||
```
|
||||
nginx -t
|
||||
sudo systemctl restart nginx
|
||||
```
|
||||
|
|
70
codeql-analysis.yml
Normal file
|
@ -0,0 +1,70 @@
|
|||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '44 17 * * 3'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
|
@ -1,17 +0,0 @@
|
|||
@font-face {
|
||||
font-family: "Roboto Mono";
|
||||
font-weight: 400;
|
||||
src: local("Roboto Mono Regular"),
|
||||
local("RobotoMono-Regular"),
|
||||
url("../fonts/RobotoMono-Regular.woff2"),
|
||||
url("../fonts/RobotoMono-Regular.ttf");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto Mono";
|
||||
font-weight: 700;
|
||||
src: local("Roboto Mono Bold"),
|
||||
local("RobotoMono-Bold"),
|
||||
url("../fonts/RobotoMono-Bold.woff2"),
|
||||
url("../fonts/RobotoMono-Bold.ttf");
|
||||
}
|
337
public/assets/css/style.css
Normal file → Executable file
|
@ -1,242 +1,205 @@
|
|||
@import url("fonts.css");
|
||||
|
||||
:root {
|
||||
--comp-background: 255,255,255;
|
||||
--comp-highlight: 244,242,255;
|
||||
--comp-accent: 33,33,33;
|
||||
--color-base: 0, 0, 0;
|
||||
--color-contrast: 256, 256, 256;
|
||||
|
||||
--color-background: rgb(var(--comp-background));
|
||||
--color-highlight: rgb(var(--comp-highlight));
|
||||
--color-accent: rgb(var(--comp-accent));
|
||||
|
||||
--page-padding: 5vw;
|
||||
--padding: clamp(40px, 2vw, 2vw);
|
||||
--border-size: clamp(4px, .25vw, .25vw);
|
||||
}
|
||||
|
||||
/* -- Cornerstones -- */
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
font-family: "Roboto Mono","Arial",sans-serif;
|
||||
color: var(--color-accent);
|
||||
font-family: "Monaco", "Consolas", monospace, sans-serif;
|
||||
color: rgb(var(--color-contrast));
|
||||
}
|
||||
|
||||
*::selection {
|
||||
background-color: var(--color-highlight);
|
||||
color: var(--color-accent);
|
||||
background-color: rgb(var(--color-contrast));
|
||||
color: rgb(var(--color-base));
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
main,
|
||||
main > div {
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
.logo {
|
||||
--size: 5em;
|
||||
--skew: calc(var(--size) / 1.7);
|
||||
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: var(--skew) solid transparent;
|
||||
border-top: var(--size) solid var(--color-accent);
|
||||
html {
|
||||
background-color: rgba(var(--color-base), .7);
|
||||
background-size: cover;
|
||||
background-blend-mode: overlay;
|
||||
background-position: center;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
.logo::after {
|
||||
content: "";
|
||||
border: var(--skew) solid transparent;
|
||||
border-top: var(--size) solid rgba(var(--comp-accent),.3);
|
||||
picture {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
font-size: clamp(45px, 7vw, 6vh);
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-weight: normal;
|
||||
font-size: 1.42em;
|
||||
p, a {
|
||||
font-size: clamp(20px, 3vw, 2vh);
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
h2 span {
|
||||
color: var(--color-background);
|
||||
background-color: var(--color-accent);
|
||||
}
|
||||
/* -- Components -- */
|
||||
|
||||
/* -- Layout -- */
|
||||
|
||||
main {
|
||||
--grid-spacing: 3vh;
|
||||
|
||||
margin: auto;
|
||||
max-width: 200vh;
|
||||
background: radial-gradient(circle, rgba(var(--comp-accent),.2) .1vh, var(--color-background) .1vh),url("../img/pattern.gif");
|
||||
background-size: var(--grid-spacing) var(--grid-spacing),auto 90%;
|
||||
background-position: 100% 100%;
|
||||
background-repeat: repeat,no-repeat;
|
||||
background-blend-mode: multiply;
|
||||
image-rendering: pixelated;
|
||||
image-rendering: -moz-crisp-edges;
|
||||
}
|
||||
|
||||
main * {
|
||||
image-rendering: initial;
|
||||
}
|
||||
|
||||
main > div {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
#intro {
|
||||
left: 0;
|
||||
width: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding: var(--page-padding);
|
||||
body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#intro .inner {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
gap: var(--padding, 30px);
|
||||
}
|
||||
|
||||
#intro .logo {
|
||||
--size: 7vh;
|
||||
margin-bottom: calc(var(--page-padding) / 2);
|
||||
body > div {
|
||||
padding: calc(var(--padding) / 2);
|
||||
}
|
||||
|
||||
#intro .block {
|
||||
width: 100%;
|
||||
font-size: 3vh;
|
||||
}
|
||||
:is(#intro, #card) a {
|
||||
--padding-vert: clamp(17px, 1.1vw, 1.1vw);
|
||||
|
||||
#intro .block:last-child {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
#intro .block p {
|
||||
font-size: .7em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
#intro .block p span {
|
||||
margin-right: .9em;
|
||||
background-color: var(--color-background);
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
nav a {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
margin-right: 2em;
|
||||
font-size: .9em;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
background-color: rgba(var(--color-contrast), .13);
|
||||
backdrop-filter: blur(2px);
|
||||
-webkit-backdrop-filter: blur(2px);
|
||||
box-shadow:
|
||||
inset 0 .3vh 1.6vh rgba(0, 0, 0, 0),
|
||||
0 .1vh .3vh rgba(0, 0, 0, .12),
|
||||
0 .1vh .2vh rgba(0, 0, 0, .24);
|
||||
}
|
||||
|
||||
nav a::after {
|
||||
content: "→";
|
||||
padding-left: .5em;
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
#myface {
|
||||
right: 0;
|
||||
width: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#myface picture,
|
||||
#myface img {
|
||||
position: absolute;
|
||||
height: 80%;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#myface img {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* -- Size Queries -- */
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
:root {
|
||||
--page-padding: 50px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 7vw;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 5vw;
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
main {
|
||||
max-width: unset;
|
||||
background-position: 100% 0;
|
||||
background-size: var(--grid-spacing) var(--grid-spacing), auto 100vw;
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
/* --- */
|
||||
|
||||
#intro {
|
||||
width: initial;
|
||||
padding: calc(var(--padding) / 2);
|
||||
}
|
||||
|
||||
#intro .logo {
|
||||
--size: 10vw;
|
||||
#intro a {
|
||||
padding: var(--padding-vert) 2vw;
|
||||
border-radius: 100px;
|
||||
border: solid var(--border-size) rgba(var(--color-contrast), 0);
|
||||
margin: var(--padding) 0;
|
||||
width: calc(100% - ((var(--padding) / 2) + var(--border-size)));
|
||||
}
|
||||
|
||||
#intro p {
|
||||
margin: 1vh 0;
|
||||
font-size: clamp(20px, 3vw, 3vh);
|
||||
}
|
||||
|
||||
/* --- */
|
||||
|
||||
#card,
|
||||
#card > div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: calc(var(--padding) / 2);
|
||||
}
|
||||
|
||||
#card {
|
||||
--portrait-size: clamp(128px, 12vw, 12vh);
|
||||
|
||||
position: relative;
|
||||
max-width: 600px;
|
||||
padding: var(--padding);
|
||||
border-radius: clamp(18px, 1vw, 1vw);
|
||||
backdrop-filter: saturate(100) brightness(.4);
|
||||
-webkit-backdrop-filter: saturate(100) brightness(.4);
|
||||
border: solid var(--border-size) rgba(var(--color-contrast), .1);
|
||||
box-shadow: 0 1vh 2vh rgba(0, 0, 0, .19), 0 6px 6px rgba(0, 0, 0, .23);
|
||||
}
|
||||
|
||||
#card img {
|
||||
width: var(--portrait-size);
|
||||
height: var(--portrait-size);
|
||||
position: absolute;
|
||||
border-radius: 100%;
|
||||
top: calc(((var(--portrait-size) / 2) + var(--border-size)) * -1);
|
||||
background-color: rgb(var(--color-base));
|
||||
box-shadow: 0 1vh 2vh rgba(0, 0, 0 , .19), 0 6px 6px rgba(0, 0, 0 , .23);
|
||||
}
|
||||
|
||||
#card a {
|
||||
width: 100%;
|
||||
padding: var(--padding-vert) 0;
|
||||
margin-top: calc(var(--padding) / 2);
|
||||
border-radius: clamp(9px, .5vw, .5vw);
|
||||
}
|
||||
|
||||
/* -- Media Queries -- */
|
||||
|
||||
@supports ((not ((backdrop-filter: saturate(1)) and (backdrop-filter: brightness(1)))) and (not ((-webkit-backdrop-filter: saturate(1)) and (-webkit-backdrop-filter: brightness(1))))) {
|
||||
#card {
|
||||
background-color: rgba(var(--color-base), .7);
|
||||
}
|
||||
}
|
||||
|
||||
@media (pointer: fine) {
|
||||
:is(#intro, #card) a {
|
||||
--transition-speed: 200ms;
|
||||
transition:
|
||||
var(--transition-speed) background-color,
|
||||
var(--transition-speed) box-shadow,
|
||||
var(--transition-speed) border-color;
|
||||
}
|
||||
|
||||
:is(#intro, #card) a:hover {
|
||||
background-color: rgba(var(--color-contrast), .2);
|
||||
border-color: rgba(var(--color-contrast), .2);
|
||||
box-shadow:
|
||||
inset 0 .3vh 1.6vh rgba(0, 0, 0, .16),
|
||||
0 .3vh .6vh rgba(0, 0, 0, .16),
|
||||
0 .3vh .6vh rgba(0, 0, 0, .23);
|
||||
}
|
||||
|
||||
:is(#intro, #card) a:active {
|
||||
background-color: rgba(var(--color-contrast), .15);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 330px) {
|
||||
p, a {
|
||||
text-align: left;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#intro .block p:last-of-type {
|
||||
text-align: initial;
|
||||
}
|
||||
|
||||
#myface {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
nav a {
|
||||
text-decoration: none;
|
||||
margin-right: 5vw;
|
||||
font-size: 5vw;
|
||||
#card {
|
||||
padding: calc(var(--padding) / 2);
|
||||
}
|
||||
}
|
||||
|
||||
/* -- Accessibility -- */
|
||||
|
||||
@media (hover: hover) {
|
||||
nav a:hover {
|
||||
background: var(--color-highlight);
|
||||
font-weight: bold;
|
||||
}
|
||||
@media (min-aspect-ratio: 14/9) and (min-height: 600px) {
|
||||
body {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: unset;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--comp-background: 0,0,0;
|
||||
--comp-accent: 255,255,255;
|
||||
body > div {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
body > div:last-of-type {
|
||||
padding: calc(var(--padding) * 2);
|
||||
}
|
||||
|
||||
#intro a {
|
||||
width: unset;
|
||||
}
|
||||
|
||||
#card {
|
||||
min-width: 300px;
|
||||
max-width: 30vw;
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 671 KiB |
Before Width: | Height: | Size: 786 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 226 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 49 B |
|
@ -1,8 +0,0 @@
|
|||
<?php
|
||||
|
||||
$gif = imagecreatefromgif("./pattern.gif");
|
||||
|
||||
header("Content-Type: image/gif");
|
||||
|
||||
imagegif($gif);
|
||||
imagedestroy($gif);
|
Before Width: | Height: | Size: 5 MiB |
Before Width: | Height: | Size: 4.2 MiB |
Before Width: | Height: | Size: 721 KiB |
79
public/assets/js/glitch/Generator.mjs
Normal file
|
@ -0,0 +1,79 @@
|
|||
// Fetch and create glitchy background effects
|
||||
class Generator {
|
||||
constructor() {
|
||||
this.bg = {
|
||||
_this: this,
|
||||
_image: null,
|
||||
_dir: location,
|
||||
_dir_rel: "assets/media/b64/",
|
||||
count: 4,
|
||||
// Get or set current background
|
||||
get current () { return this._image; },
|
||||
set current (image) {
|
||||
this._image = image;
|
||||
this._this.setBg(image);
|
||||
},
|
||||
// Get or set the path to where base64 images are stored
|
||||
get dir () { return this._dir; },
|
||||
set dir (newPath) {
|
||||
const url = new URL(newPath);
|
||||
|
||||
// Replace pathname of this file with relative path to assets
|
||||
const path = url.pathname.split("/");
|
||||
path[path.length - 1] = this._dir_rel;
|
||||
|
||||
url.pathname = path.join("/");
|
||||
this._dir = url.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Genrate random int in range
|
||||
static randInt(min, max) {
|
||||
if(min === max) return min;
|
||||
return Math.round(Math.random() * (max - min) + min);
|
||||
}
|
||||
|
||||
// Generate random string of length from charset
|
||||
static randStr(length = 2) {
|
||||
const charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
let output = "";
|
||||
for(let i = 0; i < length; i++) {
|
||||
output += charset.charAt(Math.floor(Math.random() * charset.length));
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
// Give generated background image to parent thread
|
||||
setBg(image) {
|
||||
if(typeof image !== "string") throw new TypeError("Image must be of type 'string'");
|
||||
postMessage(["BG_UPDATE", image]);
|
||||
}
|
||||
|
||||
// Generate and set a glitchy image
|
||||
glitch() {
|
||||
if(!this.bg.current) return;
|
||||
const image = this.bg.current.replaceAll(Generator.randStr(), Generator.randStr());
|
||||
this.setBg(image);
|
||||
}
|
||||
|
||||
// Fetch a base64 encoded background image
|
||||
async fetchBg(id) {
|
||||
const url = new URL(this.bg.dir);
|
||||
|
||||
url.pathname += id + ".txt";
|
||||
|
||||
const image = await fetch(url);
|
||||
if(!image.ok) throw new Error("Failed to fetch background image");
|
||||
|
||||
return image.text();
|
||||
}
|
||||
|
||||
// Load a random background from the image set
|
||||
async randBg() {
|
||||
const id = Generator.randInt(1, this.bg.count);
|
||||
|
||||
const image = await this.fetchBg(id);
|
||||
this.bg.current = image;
|
||||
}
|
||||
}
|
41
public/assets/js/glitch/Glitch.mjs
Normal file
|
@ -0,0 +1,41 @@
|
|||
export default class Glitch {
|
||||
constructor(target) {
|
||||
this.worker = new Worker(this.getWorkerScriptURL());
|
||||
this.worker.addEventListener("message", event => this.message(event));
|
||||
|
||||
this.target = target ? target : document.body;
|
||||
}
|
||||
|
||||
// Update the target CSS background with an image URL
|
||||
setVisibleBg(image) {
|
||||
this.target.style.setProperty("background-image", `url(${image})`);
|
||||
}
|
||||
|
||||
// Get URL for the dedicated worker
|
||||
getWorkerScriptURL() {
|
||||
const name = "GlitchWorker.js";
|
||||
const url = new URL(import.meta.url);
|
||||
|
||||
// Replace pathname of this file with worker
|
||||
const path = url.pathname.split("/");
|
||||
path[path.length - 1] = name;
|
||||
|
||||
url.pathname = path.join("/");
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
// Event handler for messages from worker thread
|
||||
message(event) {
|
||||
const data = typeof event.data === "object" ? event.data : [event.data];
|
||||
|
||||
switch(data[0]) {
|
||||
case "READY":
|
||||
this.worker.postMessage(["START", new URL(location).toString()]);
|
||||
break;
|
||||
|
||||
case "BG_UPDATE":
|
||||
this.setVisibleBg(data[1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
54
public/assets/js/glitch/GlitchWorker.js
Normal file
|
@ -0,0 +1,54 @@
|
|||
importScripts("./Generator.mjs");
|
||||
|
||||
class GlitchWorker extends Generator {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// Delay between these values
|
||||
this.config = {
|
||||
glitch: { min: 500, max: 2500 },
|
||||
randBg: { min: 5000, max: 5000 }
|
||||
}
|
||||
|
||||
this._timers = {};
|
||||
|
||||
self.addEventListener("message", event => this.message(event));
|
||||
self.postMessage("READY");
|
||||
}
|
||||
|
||||
// Run a scoped function on a random interval between
|
||||
queue(func) {
|
||||
clearTimeout(this._timers[func]);
|
||||
const next = Generator.randInt(this.config[func].min, this.config[func].max);
|
||||
this._timers[func] = setTimeout(() => this.queue(func), next);
|
||||
|
||||
this[func]?.();
|
||||
}
|
||||
|
||||
// Set background by id and stop randBg animation
|
||||
async forceBg(id) {
|
||||
clearTimeout(this._timers.randBg);
|
||||
|
||||
const image = await this.fetchBg(id);
|
||||
this.bg.current = image;
|
||||
|
||||
this.setBg(image);
|
||||
}
|
||||
|
||||
// Event handler for messages from parent thread
|
||||
message(event) {
|
||||
const data = typeof event.data === "object" ? event.data : [event.data];
|
||||
|
||||
switch(data[0]) {
|
||||
case "START":
|
||||
this.bg.dir = data[1];
|
||||
this.randBg();
|
||||
for(const func of Object.keys(this.config)) {
|
||||
this.queue(func);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.glitch = new GlitchWorker();
|
|
@ -1,7 +0,0 @@
|
|||
// Promote IE to Edge
|
||||
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
|
||||
window.location = 'microsoft-edge:' + window.location;
|
||||
setTimeout(function() {
|
||||
window.location = 'https://go.microsoft.com/fwlink/?linkid=2135547';
|
||||
},1);
|
||||
}
|
6
public/assets/js/noscript.js
Executable file
|
@ -0,0 +1,6 @@
|
|||
const search = document.getElementById("search").children[0];
|
||||
const results = document.getElementById("results").children[0];
|
||||
|
||||
search.style.setProperty("display","none");
|
||||
results.classList.add("error");
|
||||
results.innerText = "Sorry, your browser isn't supported yet";
|
|
@ -1,6 +0,0 @@
|
|||
// Register SW if supported by browser
|
||||
if(navigator.serviceWorker) {
|
||||
navigator.serviceWorker.register("sw.js",{
|
||||
scope: "/"
|
||||
});
|
||||
}
|
14
public/assets/js/script.mjs
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { default as Glitch } from "./glitch/Glitch.mjs";
|
||||
|
||||
const logging = "https://victorwesterlund-logging-dnzfgzf6za-lz.a.run.app";
|
||||
|
||||
// Log link clicks
|
||||
for(let link of document.getElementsByTagName("a")) {
|
||||
link.addEventListener("click", event => {
|
||||
event.preventDefault();
|
||||
navigator?.sendBeacon(logging, event);
|
||||
window.location.href = event.target.href;
|
||||
});
|
||||
}
|
||||
|
||||
window.glitch = new Glitch(document.body.parentElement);
|
1
public/assets/media/b64/1.txt
Normal file
1
public/assets/media/b64/2.txt
Normal file
1
public/assets/media/b64/3.txt
Normal file
1
public/assets/media/b64/4.txt
Normal file
BIN
public/assets/media/banner.jpg
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
public/assets/media/favicon-dark.png
Executable file
After Width: | Height: | Size: 628 B |
BIN
public/assets/media/favicon-light.png
Executable file
After Width: | Height: | Size: 638 B |
BIN
public/assets/media/pfp/128.jpg
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
public/assets/media/pfp/128.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
public/assets/media/pfp/256.jpg
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
public/assets/media/pfp/256.webp
Normal file
After Width: | Height: | Size: 4.2 KiB |
1
public/assets/media/signature.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="81.968" height="45.389"><path d="M1.172 9.641c5.062.216 7.335 9.392 8.326 13.13 1.116 4.363 1.748 8.825 2.814 13.2.833 3.43 2.456 12.139 7.651 8.584 6-4.1 8.326-13.779 10.182-20.265a119.035 119.035 0 0 0 3.014-13.471c.425-2.573 1.815-6.794.466-9.158-2.614-4.646-6.86 1.665-7.285 4.438-1.232 8.218 2.1 18.317 5.22 25.727.733 1.74 1.773 5.828 4.1 6.369s3.9-2.173 4.712-3.822a29.121 29.121 0 0 0 1.782-5.3c.325-1.174.741-5 1.865-5.6 2.623-1.349 3.115 6.469 3.264 7.443.275 1.807.491 3.971 1.6 5.5 4.687 6.494 10.108-8.717 11.306-11.331C64.5 15.661 71.425 8.343 81.134 4.438c1.474-.591.833-3.014-.667-2.406-11.606 4.679-18.575 13.229-23.595 24.394a56.539 56.539 0 0 1-2.5 5.1 6.551 6.551 0 0 1-1.1 1.8 2.66 2.66 0 0 1-3.081-.241c-.916-1.041-.691-4.279-.916-5.712a16.236 16.236 0 0 0-1.141-4.488c-1.54-3.2-4.754-3.4-6.511-.266-1.315 2.34-1.665 5.2-2.431 7.718-.375 1.191-1.4 5.362-3.455 4.654-1.207-.416-2.539-5.67-2.9-6.661a69.05 69.05 0 0 1-2.914-10.182c-.7-3.38-2.09-8.409-1.066-11.881.316-1.082 1.99-4.163 2.681-2.29a5.7 5.7 0 0 1-.2 1.973c-.25 2.173-.608 4.338-1.007 6.494Q29.3 18.1 27.723 23.646a95.743 95.743 0 0 1-3.28 9.791c-.949 2.331-6.128 12.822-8.25 7.044-2.5-6.752-2.906-14.062-5-20.914-1.482-4.812-4.08-12.147-9.991-12.4C-.4 7.1-.4 9.6 1.206 9.666Z" fill="#fff"/></svg>
|
After Width: | Height: | Size: 1.3 KiB |
28
public/error.html
Executable file
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Victor Westerlund</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Full-stack web developer from Stockholm, Sweden.">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<meta property='og:title' content='Victor Westerlund'>
|
||||
<meta property='og:image' content='//victorwesterlund.com/assets/media/banner.jpg'>
|
||||
<meta property='og:description' content='Full-stack web developer from Stockholm, Sweden.'>
|
||||
<meta property='og:url' content='https://victorwesterlund.com'>
|
||||
<link rel="icon" href="/assets/media/favicon-dark.png" media="(prefers-color-scheme:no-preference)">
|
||||
<link rel="icon" href="/assets/media/favicon-dark.png" media="(prefers-color-scheme:light)">
|
||||
<link rel="icon" href="/assets/media/favicon-light.png" media="(prefers-color-scheme:dark)">
|
||||
<link rel="stylesheet" href="/assets/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div id="intro">
|
||||
<h1>there is nothing here</h1>
|
||||
<p>and that's all I know</p>
|
||||
<a href="/">take me home -></a>
|
||||
</div>
|
||||
</div>
|
||||
<script type="module" src="/assets/js/script.mjs"></script>
|
||||
</body>
|
||||
</html>
|
1
public/humans.txt
Normal file
|
@ -0,0 +1 @@
|
|||
This website was designed and built by me (Victor Westerlund) in 2022 using code and ☕
|
73
public/index.html
Normal file → Executable file
|
@ -2,46 +2,57 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Victor Westerlund</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Full-stack web developer from Stockholm, Sweden.">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<link href="assets/img/favicon.png" rel="icon">
|
||||
<link href="assets/css/style.css" rel="stylesheet">
|
||||
<title>Victor Westerlund</title>
|
||||
<meta name="theme-color" content="#000000">
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-2RKGE84YP9"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-2RKGE84YP9');
|
||||
</script>
|
||||
<meta property='og:title' content='Victor Westerlund'>
|
||||
<meta property='og:image' content='//victorwesterlund.com/assets/media/banner.jpg'>
|
||||
<meta property='og:description' content='Full-stack web developer from Stockholm, Sweden.'>
|
||||
<meta property='og:url' content='https://victorwesterlund.com'>
|
||||
<link rel="icon" href="assets/media/favicon-dark.png" media="(prefers-color-scheme:no-preference)">
|
||||
<link rel="icon" href="assets/media/favicon-dark.png" media="(prefers-color-scheme:light)">
|
||||
<link rel="icon" href="assets/media/favicon-light.png" media="(prefers-color-scheme:dark)">
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div>
|
||||
<div id="intro">
|
||||
<div class="inner">
|
||||
<div class="block">
|
||||
<div class="logo"></div>
|
||||
<h1><span>victor westerlund</span></h1>
|
||||
<h2><span>full-stack web developer</span></h2>
|
||||
</div>
|
||||
<div class="block">
|
||||
<p><span>I create things with code. The things I've created for the public reside as open-source repositories on <a href="https://github.com/VictorWesterlund" ping="https://api.victorwesterlund/log/ping/" target="_blank">GitHub</a>, the rest you'll be lucky to hear about some day.</span></p>
|
||||
<p><span>Other topics (seemingly irrelevant to programming) I find facinating include but is in no way limited to astronomy, psychology, sociology, economics, ...</span></p>
|
||||
<p><span><strong>hello@victorwesterlund.com</strong></span>​(<a href="https://storage.googleapis.com/public.victorwesterlund.com/publickey.gpg" ping="https://api.victorwesterlund/log/ping/" target="_blank">PGP Key</a>)</p>
|
||||
</div>
|
||||
<div class="block">
|
||||
<nav>
|
||||
<!--<a href="#">contact</a>-->
|
||||
<a href="https://github.com/VictorWesterlund" ping="https://api.victorwesterlund/log/ping/" target="_blank">github</a>
|
||||
</nav>
|
||||
<p>hello, my name is</p>
|
||||
<h1>victor</h1>
|
||||
<p>I'm a</p>
|
||||
<h1>full-stack</h1>
|
||||
<h1>developer</h1>
|
||||
<p>from Sweden</p>
|
||||
<a href="https://github.com/VictorWesterlund">my github -></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="myface">
|
||||
<div>
|
||||
<div id="card">
|
||||
<picture>
|
||||
<source srcset="assets/img/myface/highres.avif" type="image/avif" media="(min-width: 1920px)">
|
||||
<source srcset="assets/img/myface/highres.webp" type="image/webp" media="(min-width: 1920px)">
|
||||
<source srcset="assets/img/myface/mediumres.avif" type="image/avif">
|
||||
<source srcset="assets/img/myface/mediumres.webp" type="image/webp">
|
||||
<img src="assets/img/myface/mediumres.png" type="image/png">
|
||||
<source srcset="assets/media/pfp/256.webp" type="image/webp" media="(min-width: 600px)">
|
||||
<source srcset="assets/media/pfp/128.webp" type="image/webp">
|
||||
<source srcset="assets/media/pfp/256.jpg" type="image/jpg" media="(min-width: 600px)">
|
||||
<img src="assets/media/pfp/128.jpg" alt="portrait of victor"/>
|
||||
</picture>
|
||||
<div>
|
||||
<p>I create things with code. When I'm not creating things with code, I enjoy skiing, watching movies and some occasional gaming</p>
|
||||
<p>And beyond computer science, I'm also an armchair rabbit-holer for engineering, physics and astronomy</p>
|
||||
</div>
|
||||
</main>
|
||||
<script src="assets/js/script.js" type="module"></script>
|
||||
<script src="assets/js/nomodule.js" nomodule></script>
|
||||
<div>
|
||||
<p>...and ☕, full-time</p>
|
||||
</div>
|
||||
<!--<a href="contact">contact me</a>-->
|
||||
</div>
|
||||
</div>
|
||||
<script type="module" src="assets/js/script.mjs"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
6
public/robots.txt
Normal file → Executable file
|
@ -1,5 +1,5 @@
|
|||
User-agent: *
|
||||
|
||||
Disallow: /.git/
|
||||
Disallow: */.git/
|
||||
Disallow: /*.git$
|
||||
Disallow: /./
|
||||
Disallow: */./
|
||||
Disallow: /*.$
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<url>
|
||||
<loc>https://victorwesterlund.com/</loc>
|
||||
<lastmod>2021-02-09T06:54:02+00:00</lastmod>
|
||||
</url>
|
||||
</urlset>
|
102
public/sw.js
|
@ -1,102 +0,0 @@
|
|||
const version = "1622708674";
|
||||
const root = "/";
|
||||
|
||||
let activeCaches = [
|
||||
`content-${version}`
|
||||
];
|
||||
|
||||
let cacheManifest = [
|
||||
"index.html",
|
||||
"assets/css/style.css",
|
||||
"assets/css/fonts.css",
|
||||
"assets/img/favicon.png",
|
||||
"assets/img/pattern.gif",
|
||||
"assets/fonts/RobotoMono-Bold.woff2",
|
||||
"assets/fonts/RobotoMono-Regular.woff2",
|
||||
"assets/js/script.js"
|
||||
];
|
||||
|
||||
// Download assets and install ServiceWorker
|
||||
self.addEventListener("install", event => {
|
||||
event.waitUntil(
|
||||
caches.open(`content-${version}`).then(cache => cache.addAll(cacheManifest.map(asset => {
|
||||
// Append the root path to all assets
|
||||
return root + asset;
|
||||
})))
|
||||
)
|
||||
});
|
||||
|
||||
// Wipe old assets from Cache Storage
|
||||
self.addEventListener("activate", event => {
|
||||
event.waitUntil(
|
||||
// Delete inactive caches
|
||||
caches.keys().then(cacheNames => {
|
||||
return Promise.all(
|
||||
cacheNames.map(cacheName => {
|
||||
if(!activeCaches.includes(cacheName)) {
|
||||
return caches.delete(cacheName);
|
||||
}
|
||||
})
|
||||
)
|
||||
})
|
||||
)
|
||||
});
|
||||
|
||||
// Fetch and cache an asset not defined in the manifest
|
||||
async function fetchToCache(event) {
|
||||
const networkFetch = fetch(event.request);
|
||||
|
||||
event.waitUntil(
|
||||
networkFetch.then(response => {
|
||||
const responseClone = response.clone();
|
||||
caches.open("bucket").then(cache => cache.put(event.request, responseClone));
|
||||
})
|
||||
);
|
||||
|
||||
const response = await caches.match(event.request);
|
||||
return response || networkFetch;
|
||||
}
|
||||
|
||||
// Fetch and follow redirects without caching
|
||||
async function fetchContent(url,i = 0) {
|
||||
if(i >= 5) {
|
||||
throw new Error("ERR_TOO_MANY_REDIRECTS");
|
||||
}
|
||||
|
||||
return await fetch(url).then(response => {
|
||||
if(response.redirected) {
|
||||
i++;
|
||||
return fetchContent(response.url,i);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
}
|
||||
|
||||
self.addEventListener("fetch", event => {
|
||||
const url = new URL(event.request.url);
|
||||
const origin = (url.origin == location.origin) ? true : false; // Is same-origin
|
||||
|
||||
// Speed up TTFB by serving index file first
|
||||
if(origin && url.pathname == "/") {
|
||||
event.respondWith(caches.match(root + "index.html"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Fetch cross-origin content using the network
|
||||
if(!origin || (url.pathname.substring(1,7) != "assets")) {
|
||||
event.respondWith(fetchContent(url.href));
|
||||
return;
|
||||
}
|
||||
|
||||
// Get pattern.gif from generator. Fallback to cache on failure
|
||||
if(origin && url.pathname.endsWith("pattern.gif")) {
|
||||
const pattern = new Request(`${location.origin}${root}assets/img/pattern.php`);
|
||||
event.respondWith(fetch(pattern).catch(() => caches.match(root + "assets/img/pattern.gif")));
|
||||
return;
|
||||
}
|
||||
|
||||
// Respond with content from cache or fetch and save
|
||||
event.respondWith(
|
||||
caches.match(event.request).then(response => response || fetchToCache(event))
|
||||
);
|
||||
});
|