Compare commits
30 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 |
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
|
||||
--|--|--|--
|
6
.gitignore
vendored
Normal file → Executable file
|
@ -1,4 +1,10 @@
|
|||
# victorwesterlund.com #
|
||||
########################
|
||||
.well-known/
|
||||
/content
|
||||
|
||||
# Bootstrapping #
|
||||
#################
|
||||
/node_modules
|
||||
/public/hot
|
||||
/public/storage
|
||||
|
|
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.
|
||||
|
|
40
README.md
Normal file → Executable file
|
@ -1,5 +1,41 @@
|
|||
<div align="center">
|
||||
<img width="100px" src="https://storage.googleapis.com/public.victorwesterlund.com/github/VictorWesterlund/victorwesterlund.com/vw.svg"/>
|
||||
<h3><strong><code>www.victorwesterlund.com</code></strong></h3>
|
||||
<p>The source code for <a href="https://victorwesterlund.com">victorwesterlund.com</a></p>
|
||||
<h3>Source code for <a href="https://victorwesterlund.com"><strong>victorwesterlund.com</strong></a></h3>
|
||||
</div>
|
||||
|
||||
## Local installation
|
||||
|
||||
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:
|
||||
|
||||
1. **Clone this repo**
|
||||
|
||||
```
|
||||
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,179 +0,0 @@
|
|||
/* Victor Westerlund */
|
||||
|
||||
/* -- Transition overrides -- */
|
||||
|
||||
body main .screen {
|
||||
transition: var(--transition) transform, var(--transition) filter;
|
||||
transition-delay: calc(var(--transition) / 2);
|
||||
}
|
||||
|
||||
.modal.active + .modal:nth-child(n+2),
|
||||
body .modal.active ~ main .screen {
|
||||
transition: var(--transition);
|
||||
transition-delay: 1ms;
|
||||
transform: scale(.95);
|
||||
pointer-events: none;
|
||||
filter: blur(2px);
|
||||
}
|
||||
|
||||
.modal.active + .modal {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.modal:first-child {
|
||||
z-index: 15;
|
||||
}
|
||||
|
||||
.modal.active + .modal:nth-child(n+2) {
|
||||
filter: blur(2px) brightness(.5);
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
/* -- Boilerplate -- */
|
||||
|
||||
.modal {
|
||||
transition: var(--transition) transform, var(--transition) filter;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100%;
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
box-sizing: border-box;
|
||||
padding: var(--padding);
|
||||
}
|
||||
|
||||
.modal.active {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.modal .button {
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
.modal .inner {
|
||||
transition: var(--transition) transform, var(--transition) opacity;
|
||||
position: relative;
|
||||
background-color: var(--swatch-background);
|
||||
width: calc(100vw - var(--padding));
|
||||
max-width: 500px;
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
word-break: break-word;
|
||||
box-sizing: border-box;
|
||||
padding: var(--padding);
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: 0 3px 30px 0 rgba(33,33,33,.2);
|
||||
opacity: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--padding);
|
||||
}
|
||||
|
||||
.modal.active .inner {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.modal .inner > h1,
|
||||
.modal .inner > h2,
|
||||
.modal .inner > p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
.spinner.logo {
|
||||
--size: clamp(30px,5vw,60px);
|
||||
--anim-speed: 1s;
|
||||
align-self: center;
|
||||
margin-top: var(--padding);
|
||||
margin-left: calc((var(--size) / 2) * -1);
|
||||
animation: logoSpinner var(--anim-speed) infinite alternate linear;
|
||||
}
|
||||
|
||||
.error {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.error:first-line {
|
||||
font-size: 50px;
|
||||
}
|
||||
|
||||
@keyframes logoSpinner {
|
||||
to {
|
||||
opacity: .1;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
.modal h1 {
|
||||
font-size: clamp(20px,2vw,20px);
|
||||
}
|
||||
|
||||
.modal pre {
|
||||
align-self: stretch;
|
||||
overflow: scroll;
|
||||
background-color: black;
|
||||
color: white;
|
||||
padding: 10px 15px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* -- Cards -- */
|
||||
|
||||
.modal.card .inner {
|
||||
align-self: flex-end;
|
||||
transform: scale(.99) translateY(1vh);
|
||||
}
|
||||
|
||||
.modal.card.active .inner {
|
||||
transform: scale(1) translateY(0);
|
||||
}
|
||||
|
||||
.modal.card .button[data-action="close"] {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
/* -- Dialogs -- */
|
||||
|
||||
.modal.dialog .inner {
|
||||
transform: scale(.95);
|
||||
}
|
||||
|
||||
.modal.dialog.active .inner {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
@media (min-aspect-ratio: 14/9) {
|
||||
/* -- Transition overrides -- */
|
||||
|
||||
body .modal {
|
||||
transition-delay: calc(var(--transition) / 2);
|
||||
}
|
||||
|
||||
body .modal.active {
|
||||
transition-delay: 1ms;
|
||||
}
|
||||
|
||||
/* -- Boilerplate -- */
|
||||
|
||||
.modal.card .inner {
|
||||
align-self: unset;
|
||||
transform: scale(.99) translateY(10px);
|
||||
}
|
||||
|
||||
.modal.dialog .inner {
|
||||
width: unset;
|
||||
min-width: 100px;
|
||||
max-width: 50vw;
|
||||
}
|
||||
|
||||
.modal.dialog .button {
|
||||
align-self: unset;
|
||||
width: clamp(100px,100%,500px);
|
||||
}
|
||||
}
|
585
public/assets/css/style.css
Normal file → Executable file
|
@ -1,496 +1,205 @@
|
|||
/* Victor Westerlund */
|
||||
|
||||
:root {
|
||||
/* Component colors */
|
||||
--palette-background: 255,255,255;
|
||||
--palette-inverted: 0,0,0;
|
||||
--palette-contrast: 33,33,33;
|
||||
--palette-accent: 22,183,255;
|
||||
--color-base: 0, 0, 0;
|
||||
--color-contrast: 256, 256, 256;
|
||||
|
||||
/* Compiled colors */
|
||||
--swatch-background: rgb(var(--palette-background));
|
||||
--swatch-inverted: rgb(var(--palette-inverted));
|
||||
--swatch-contrast: rgb(var(--palette-contrast));
|
||||
--swatch-accent: rgb(var(--palette-accent));
|
||||
|
||||
/* Default styles */
|
||||
--padding: 20px;
|
||||
--border-radius: 10px;
|
||||
--header-height: 100px;
|
||||
--transition: 300ms;
|
||||
}
|
||||
|
||||
.dark {
|
||||
--palette-background: 33,33,33;
|
||||
--palette-inverted: 255,255,255;
|
||||
--palette-contrast: 255,255,255;
|
||||
--palette-accent: 255,255,255;
|
||||
|
||||
--swatch-background: rgb(var(--palette-background));
|
||||
--swatch-inverted: rgb(var(--palette-inverted));
|
||||
--swatch-contrast: rgb(var(--palette-contrast));
|
||||
--swatch-accent: rgb(var(--palette-accent));
|
||||
}
|
||||
|
||||
.wide {
|
||||
display: none; /* Hide wide-screen elements */
|
||||
}
|
||||
|
||||
@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");
|
||||
--padding: clamp(40px, 2vw, 2vw);
|
||||
--border-size: clamp(4px, .25vw, .25vw);
|
||||
}
|
||||
|
||||
/* -- Cornerstones -- */
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
font-family: "Roboto Mono","Arial",sans-serif;
|
||||
color: var(--swatch-contrast);
|
||||
font-family: "Monaco", "Consolas", monospace, sans-serif;
|
||||
color: rgb(var(--color-contrast));
|
||||
}
|
||||
|
||||
*::selection {
|
||||
background-color: var(--swatch-contrast);
|
||||
color: var(--swatch-accent);
|
||||
}
|
||||
|
||||
a,
|
||||
picture {
|
||||
text-decoration: none;
|
||||
display: contents;
|
||||
background-color: rgb(var(--color-contrast));
|
||||
color: rgb(var(--color-base));
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: var(--swatch-background);
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
main {
|
||||
width: 200vw;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
html {
|
||||
background-color: rgba(var(--color-base), .7);
|
||||
background-size: cover;
|
||||
background-blend-mode: overlay;
|
||||
background-position: center;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
body.menuActive {
|
||||
background-color: var(--swatch-contrast);
|
||||
}
|
||||
|
||||
body.dark.menuActive {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
body.menuActive main {
|
||||
transform: translateX(-100vw);
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
.screen {
|
||||
--background-pattern:
|
||||
linear-gradient(90deg, var(--swatch-background) calc(var(--padding) + 1px), transparent 1%) center,
|
||||
linear-gradient(var(--swatch-background) calc(var(--padding) + 1px), transparent 1%) center, var(--swatch-contrast);
|
||||
--background-pattern-size: calc(var(--padding) + 2px) calc(var(--padding) + 2px);
|
||||
|
||||
width: 100vw;
|
||||
background-color: var(--swatch-background);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
body.dark .screen.dark {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.screen .inner {
|
||||
picture {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.screen .content {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: calc(var(--padding) * 1.5);
|
||||
padding-top: 0;
|
||||
flex-grow: 1;
|
||||
h1 {
|
||||
font-size: clamp(45px, 7vw, 6vh);
|
||||
}
|
||||
|
||||
/* -- Positioning -- */
|
||||
|
||||
.center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
p, a {
|
||||
font-size: clamp(20px, 3vw, 2vh);
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
/* -- Components -- */
|
||||
|
||||
.logo {
|
||||
--size: 1em;
|
||||
--skew: calc(var(--size) / 1.7);
|
||||
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: var(--skew) solid transparent;
|
||||
border-top: var(--size) solid var(--swatch-accent);
|
||||
}
|
||||
|
||||
.logo::after {
|
||||
content: "";
|
||||
border: var(--skew) solid transparent;
|
||||
border-top: var(--size) solid rgba(var(--palette-accent),.3);
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
.button {
|
||||
text-align: center;
|
||||
padding: 25px;
|
||||
border-radius: var(--border-radius);
|
||||
font-size: clamp(16px,5vw,22px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: var(--padding);
|
||||
}
|
||||
|
||||
a.button,
|
||||
p.button {
|
||||
padding: unset;
|
||||
display: inline;
|
||||
font-size: inherit;
|
||||
color: var(--swatch-accent);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.button.solid {
|
||||
background-color: var(--swatch-contrast);
|
||||
color: var(--swatch-background);
|
||||
fill: var(--swatch-background);
|
||||
}
|
||||
|
||||
.button.phantom {
|
||||
background-color: rgba(var(--palette-inverted),.05);
|
||||
color: var(--swatch-contrast);
|
||||
fill: var(--swatch-contrast);
|
||||
}
|
||||
|
||||
.button svg {
|
||||
pointer-events: none;
|
||||
fill: inherit;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.button p {
|
||||
pointer-events: none;
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.button.loading p {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.button.loading::after {
|
||||
position: absolute;
|
||||
content: "loading...";
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* -- Screens -- */
|
||||
|
||||
header {
|
||||
--size: var(--header-height,100px);
|
||||
box-sizing: border-box;
|
||||
padding: var(--padding);
|
||||
height: var(--size);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
header > *:nth-child(2) {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
header > *:nth-child(n+3) {
|
||||
margin-left: var(--padding);
|
||||
}
|
||||
|
||||
header .hamburger {
|
||||
width: calc(var(--size) - (var(--padding) * 2));
|
||||
height: calc(var(--size) - (var(--padding) * 2));
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
header .hamburger div {
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: var(--swatch-contrast);
|
||||
box-shadow: 0 -10px 0 0 var(--swatch-contrast), 0 10px 0 0 var(--swatch-contrast);
|
||||
}
|
||||
|
||||
header .hamburger svg {
|
||||
fill: none;
|
||||
stroke: var(--swatch-contrast);
|
||||
stroke-linecap: round;
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
header .spacer {
|
||||
width: 1px;
|
||||
height: 80%;
|
||||
background-color: rgba(var(--palette-contrast),.2);
|
||||
}
|
||||
|
||||
.dark header .spacer {
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
body.dark .dark header .spacer {
|
||||
background-color: rgba(var(--palette-contrast),.2);
|
||||
}
|
||||
|
||||
header .logo {
|
||||
--size: 25px;
|
||||
margin-top: calc(var(--size) / 2);
|
||||
margin-right: calc(var(--size) / 2);
|
||||
}
|
||||
|
||||
/* -- Screen > Landingpage -- */
|
||||
|
||||
.screen.landingpage {
|
||||
background: var(--background-pattern);
|
||||
background-size: var(--background-pattern-size);
|
||||
}
|
||||
|
||||
.screen.landingpage .content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.screen.landingpage img {
|
||||
position: relative;
|
||||
width: clamp(100px,80vw,40vh);
|
||||
align-self: flex-end;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.screen.landingpage .pattern {
|
||||
position: absolute;
|
||||
top: var(--header-height);
|
||||
width: 100vw;
|
||||
height: calc(100% - var(--header-height));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.screen.landingpage .pattern div {
|
||||
--size: clamp(100px,100vw,35vh);
|
||||
position: relative;
|
||||
top: calc((var(--size) - var(--header-height)) * -1);
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: solid var(--size) transparent;
|
||||
border-bottom: solid calc(var(--size) * 2) rgba(var(--palette-accent),.1);
|
||||
transform-origin: 50% 75%;
|
||||
transform: rotate(20deg);
|
||||
}
|
||||
|
||||
/* -- Screen > Menu -- */
|
||||
|
||||
.screen.menu .content {
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
justify-items: center;
|
||||
gap: var(--padding, 30px);
|
||||
}
|
||||
|
||||
.screen.menu .button {
|
||||
width: calc(100% - (var(--padding) * 2));
|
||||
max-width: 400px;
|
||||
flex: 0;
|
||||
body > div {
|
||||
padding: calc(var(--padding) / 2);
|
||||
}
|
||||
|
||||
.screen.menu .button[data-value="contact"] {
|
||||
margin-top: auto;
|
||||
:is(#intro, #card) a {
|
||||
--padding-vert: clamp(17px, 1.1vw, 1.1vw);
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
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);
|
||||
}
|
||||
|
||||
/* WIP */
|
||||
.screen.menu .content > .narrow {
|
||||
align-items: flex-start;
|
||||
max-width: 900px;
|
||||
gap: var(--padding);
|
||||
/* --- */
|
||||
|
||||
#intro {
|
||||
padding: calc(var(--padding) / 2);
|
||||
}
|
||||
|
||||
/* -- Media queries -- */
|
||||
|
||||
@media (max-width: 570px) {
|
||||
.screen.menu .content > .narrow {
|
||||
flex-direction: column;
|
||||
}
|
||||
#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)));
|
||||
}
|
||||
|
||||
/* Wide-screen */
|
||||
@media (min-aspect-ratio: 14/9) and (min-height: 300px) {
|
||||
/* -- Cornerstones -- */
|
||||
|
||||
.narrow,
|
||||
header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
main {
|
||||
width: 100vw;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
/* -- Cornerstones > State overrides -- */
|
||||
|
||||
body.menuActive {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
body.menuActive main {
|
||||
transform: unset;
|
||||
}
|
||||
|
||||
/* -- Screens -- */
|
||||
|
||||
.screen.menu,
|
||||
.screen.landingpage {
|
||||
width: 50vw;
|
||||
flex-direction: row;
|
||||
background: var(--background-pattern);
|
||||
background-size: var(--background-pattern-size);
|
||||
}
|
||||
|
||||
body.dark .screen {
|
||||
--swatch-background: black;
|
||||
}
|
||||
|
||||
/* -- Screens > Menu -- */
|
||||
|
||||
body:not(.dark) .screen.menu {
|
||||
/* Component colors */
|
||||
--palette-background: 255,255,255;
|
||||
--palette-inverted: 0,0,0;
|
||||
--palette-contrast: 33,33,33;
|
||||
--palette-accent: 33,33,33;
|
||||
|
||||
/* Compiled colors */
|
||||
--swatch-background: rgb(var(--palette-background));
|
||||
--swatch-inverted: rgb(var(--palette-inverted));
|
||||
--swatch-contrast: rgb(var(--palette-contrast));
|
||||
--swatch-accent: rgb(var(--palette-accent));
|
||||
}
|
||||
|
||||
.screen.menu .content {
|
||||
padding-top: calc(var(--padding) * 1.5);
|
||||
}
|
||||
|
||||
.screen.menu .wide {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: clamp(var(--padding),5vw,5vh);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.screen.menu .wide .group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--padding);
|
||||
}
|
||||
|
||||
.screen.menu .wide .logo {
|
||||
--size: clamp(20px,3.5vw,5vh);
|
||||
}
|
||||
|
||||
.screen.menu .wide h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(20px,3vw,5vh);
|
||||
}
|
||||
|
||||
.screen.menu .wide h1 span {
|
||||
background: var(--swatch-contrast);
|
||||
color: var(--swatch-background);
|
||||
padding: 0 var(--padding);
|
||||
}
|
||||
|
||||
.screen.menu .wide p {
|
||||
margin: 0;
|
||||
font-size: clamp(16px,5vw,2vh);
|
||||
}
|
||||
|
||||
.screen.menu .wide nav {
|
||||
display: flex;
|
||||
margin-top: calc(var(--padding) * 2);
|
||||
gap: clamp(var(--padding),3vw,500px);
|
||||
}
|
||||
|
||||
.screen.menu .wide nav p {
|
||||
display: inline-block;
|
||||
padding: var(--padding);
|
||||
}
|
||||
|
||||
.screen.menu .button[data-value="contact"] {
|
||||
display: none;
|
||||
}
|
||||
#intro p {
|
||||
margin: 1vh 0;
|
||||
font-size: clamp(20px, 3vw, 3vh);
|
||||
}
|
||||
|
||||
/* Narrow display */
|
||||
@media (max-width: 300px) {
|
||||
.button svg:not(.hidden) ~ p,
|
||||
header .logo {
|
||||
display: none;
|
||||
}
|
||||
/* --- */
|
||||
|
||||
#card,
|
||||
#card > div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: calc(var(--padding) / 2);
|
||||
}
|
||||
|
||||
/* Super-narrow display */
|
||||
@media (max-width: 230px) {
|
||||
header {
|
||||
justify-content: center;
|
||||
}
|
||||
#card {
|
||||
--portrait-size: clamp(128px, 12vw, 12vh);
|
||||
|
||||
header .spacer,
|
||||
header p {
|
||||
display: none;
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
/* -- Media queries > Media features -- */
|
||||
#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) {
|
||||
.button {
|
||||
cursor: pointer;
|
||||
: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 (any-hover: hover) {
|
||||
.button {
|
||||
transition: var(--transition) background-color;
|
||||
@media (max-width: 330px) {
|
||||
p, a {
|
||||
text-align: left;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.button.phantom:hover {
|
||||
background-color: rgba(var(--palette-inverted),.2);
|
||||
#card {
|
||||
padding: calc(var(--padding) / 2);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-aspect-ratio: 14/9) and (min-height: 600px) {
|
||||
body {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: unset;
|
||||
}
|
||||
|
||||
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 |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"/></svg>
|
Before Width: | Height: | Size: 274 B |
|
@ -1 +0,0 @@
|
|||
<svg version="1.1" id="katman_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 1024 1024" xml:space="preserve"><style>.st0{fill:#3a76f0}</style><path class="st0" d="M28.4 241.6v540.7c0 117.7 95.5 213.2 213.2 213.2h540.7c117.7 0 213.2-95.5 213.2-213.2V241.6c0-117.7-95.5-213.2-213.2-213.2H241.6c-117.7 0-213.2 95.5-213.2 213.2z"/><path d="M430.1 180.9l7.7 31c-30.2 7.4-59.1 19.4-85.7 35.4L335.7 220c29.3-17.7 61.2-30.9 94.4-39.1zm163.8 0l-7.7 31c30.2 7.4 59.1 19.4 85.7 35.4l16.5-27.4c-29.4-17.6-61.2-30.8-94.5-39zM220 335.7c-17.7 29.3-30.9 61.2-39.1 94.4l31 7.7c7.4-30.2 19.4-59.1 35.4-85.7L220 335.7zM202.9 512c0-15.5 1.1-31 3.5-46.3l-31.6-4.8c-5.1 33.9-5.1 68.3 0 102.2l31.6-4.8c-2.3-15.3-3.5-30.8-3.5-46.3zm485.4 292l-16.4-27.4c-26.6 16.1-55.4 28-85.6 35.4l7.7 31c33.2-8.2 65-21.3 94.3-39zm132.8-292c0 15.5-1.1 31-3.5 46.3l31.6 4.8c5.1-33.9 5.1-68.3 0-102.2l-31.6 4.8c2.3 15.3 3.5 30.8 3.5 46.3zm22 81.8l-31-7.7c-7.4 30.2-19.4 59.1-35.4 85.7l27.4 16.5c17.6-29.3 30.8-61.2 39-94.5zM558.3 817.6c-30.7 4.6-61.9 4.6-92.6 0l-4.8 31.6c33.9 5.1 68.3 5.1 102.2 0l-4.8-31.6zm202.5-122.3c-18.4 25-40.5 47-65.5 65.4l19 25.7c27.6-20.3 51.9-44.5 72.3-72l-25.8-19.1zm-65.5-432.1c25 18.4 47.1 40.5 65.5 65.5l25.7-19.2c-20.3-27.5-44.6-51.8-72-72l-19.2 25.7zm-432.1 65.5c18.4-25 40.5-47.1 65.5-65.5l-19.2-25.7c-27.5 20.3-51.8 44.6-72 72l25.7 19.2zm540.8 7l-27.4 16.4c16.1 26.6 28 55.4 35.4 85.6l31-7.7c-8.1-33.2-21.3-65-39-94.3zM465.7 206.4c30.7-4.6 61.9-4.6 92.6 0l4.8-31.6c-33.9-5.1-68.3-5.1-102.2 0l4.8 31.6zM279.6 795l-66 15.4 15.4-66-31.1-7.3-15.4 66c-2.5 10.8.7 22.1 8.5 29.9s19.1 11 29.9 8.5l66-15.1-7.3-31.4zm-75.1-86.5l31.1 7.2 10.7-45.8c-15.5-26.1-27.1-54.4-34.4-83.9l-31 7.7c7 28.3 17.5 55.5 31.4 81l-7.8 33.8zm149.2 69.3L308 788.5l7.2 31.1 33.7-7.8c25.6 13.9 52.8 24.5 81.1 31.4l7.7-31c-29.4-7.3-57.6-19-83.7-34.6l-.3.2zM512 234.9c-100.8.1-193.7 54.9-242.4 143.1s-45.7 196 8 281.4L251 773.1l113.7-26.6c99.7 62.8 228.2 55.7 320.4-17.7S812.9 531.7 774 420.5c-39.2-111.3-144.2-185.7-262-185.6z" fill="#fff"/></svg>
|
Before Width: | Height: | Size: 2 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,51 +0,0 @@
|
|||
// Victor Westerlund - www.victorwesterlund.com
|
||||
|
||||
// UI component constructor
|
||||
class Component {
|
||||
constructor(tag) {
|
||||
this.element = document.createElement(tag); // Root element
|
||||
}
|
||||
}
|
||||
|
||||
// ⬇ UI Components ⬇
|
||||
|
||||
export class Button extends Component {
|
||||
constructor(properties) {
|
||||
super("div");
|
||||
this.properties = properties;
|
||||
this.element.classList.add("button");
|
||||
|
||||
this.setText();
|
||||
this.setAction();
|
||||
this.setType();
|
||||
}
|
||||
|
||||
setText() {
|
||||
if(!this.properties.text) {
|
||||
return false;
|
||||
}
|
||||
const textElement = document.createElement("p");
|
||||
textElement.innerText = this.properties.text;
|
||||
this.element.appendChild(textElement);
|
||||
}
|
||||
|
||||
setAction() {
|
||||
if(!this.properties.action) {
|
||||
return false;
|
||||
}
|
||||
this.element.setAttribute("data-action",this.properties.action);
|
||||
}
|
||||
|
||||
setType() {
|
||||
const types = [
|
||||
"solid",
|
||||
"phantom"
|
||||
];
|
||||
const type = types.includes(this.properties.type) ? this.properties.type : false;
|
||||
|
||||
if(!this.properties.type || !type) {
|
||||
return false;
|
||||
}
|
||||
this.element.classList.add(type);
|
||||
}
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
// Copyright © Victor Westerlund - No libraries! 😲
|
||||
|
||||
class Debug {
|
||||
constructor() {
|
||||
console.log("Debug mode is enabled.\nList debug functions by running window._debug.list()");
|
||||
}
|
||||
|
||||
list() {
|
||||
const functions = [
|
||||
"list",
|
||||
"toggleMenu",
|
||||
"openContactsModal",
|
||||
"invalidCard",
|
||||
"infiniteLoadingCard"
|
||||
];
|
||||
console.log("Available functions:",functions.map(f => `window._debug.${f}();`));
|
||||
}
|
||||
|
||||
toggleMenu() {
|
||||
document.getElementsByClassName("hamburger")[0].click();
|
||||
}
|
||||
|
||||
openContactsModal() {
|
||||
document.getElementsByClassName("hamburger")[0].click();
|
||||
document.querySelector("div[data-action='openContactCard']").click();
|
||||
}
|
||||
|
||||
demoCard() {
|
||||
const module = import("./Modals.mjs");
|
||||
const interactions = {
|
||||
hello: () => {
|
||||
console.log("Hello world");
|
||||
}
|
||||
};
|
||||
|
||||
module.then(modals => {
|
||||
const card = new modals.Card(interactions);
|
||||
card.inner.style.height = "80vh";
|
||||
card.inner.insertAdjacentHTML("afterbegin","<p>Hello world</p>");
|
||||
card.open();
|
||||
});
|
||||
}
|
||||
|
||||
invalidCard() {
|
||||
const module = import("./Modals.mjs");
|
||||
const interactions = {
|
||||
hello: () => {
|
||||
console.log("Hello world");
|
||||
}
|
||||
};
|
||||
|
||||
module.then(modals => {
|
||||
const card = new modals.Card(interactions);
|
||||
card.openPage("invalid_card");
|
||||
});
|
||||
}
|
||||
|
||||
infiniteLoadingCard() {
|
||||
const module = import("./Modals.mjs");
|
||||
const spinner = document.createElement("div");
|
||||
spinner.classList = "logo spinner";
|
||||
|
||||
module.then(modals => {
|
||||
const card = new modals.Card(new Object());
|
||||
card.insertElement(spinner);
|
||||
card.open();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default window._debug = new Debug();
|
|
@ -1,34 +0,0 @@
|
|||
// Victor Westerlund - www.victorwesterlund.com
|
||||
|
||||
class Logging {
|
||||
constructor() {
|
||||
this.endpoint = "/log/";
|
||||
this.data = new URLSearchParams();
|
||||
|
||||
document.addEventListener("visibilitychange",() => {
|
||||
if(document.visibilityState === "hidden") {
|
||||
this.send();
|
||||
}
|
||||
});
|
||||
|
||||
this.log("foo","bar");
|
||||
}
|
||||
|
||||
log(key,value) {
|
||||
this.data.append(key,value);
|
||||
}
|
||||
|
||||
send() {
|
||||
const send = navigator.sendBeacon(this.endpoint,this.data);
|
||||
if(send !== true) {
|
||||
const url = this.endpoint + this.data.toString();
|
||||
fetch(url).catch(response => console.log(response));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default class Log {
|
||||
constructor(value,key = "u") {
|
||||
// WIP
|
||||
}
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
// Victor Westerlund - www.victorwesterlund.com
|
||||
|
||||
import { default as Interaction, destroy } from "./UI.mjs";
|
||||
import { Button } from "./Components.mjs";
|
||||
|
||||
// Boilerplate for creating element overlays
|
||||
class Modal extends Interaction {
|
||||
constructor(extendedInteractions = {}) {
|
||||
const element = document.createElement("div");
|
||||
let interactions = {
|
||||
close: () => {
|
||||
this.close();
|
||||
},
|
||||
openPage: (event) => {
|
||||
let modal = undefined;
|
||||
switch(event.target.dataset.type) {
|
||||
case "card":
|
||||
modal = new Card({});
|
||||
break;
|
||||
case "dialog":
|
||||
default:
|
||||
modal = new Dialog({});
|
||||
break;
|
||||
}
|
||||
modal.openPage(event.target.dataset.value);
|
||||
}
|
||||
};
|
||||
// Combine template and incoming interactions into one object
|
||||
interactions = Object.assign(interactions,extendedInteractions);
|
||||
super(interactions,element);
|
||||
|
||||
this.transition = 300;
|
||||
|
||||
this.element = this.applyTemplate(element);
|
||||
this.element.close = () => this.close(); // Bind modal close to element prototype
|
||||
document.body.insertAdjacentElement("afterbegin",this.element);
|
||||
}
|
||||
|
||||
// Fetch page html from "assets/pages"
|
||||
async getPage(page) {
|
||||
const url = `assets/pages/${page}`;
|
||||
const response = await fetch(url);
|
||||
if(!response.ok) {
|
||||
const report = {
|
||||
"self": "Modal.getPage()",
|
||||
"self_page": page,
|
||||
"resp_status": response.status,
|
||||
"resp_statusText": response.statusText,
|
||||
"resp_url": response.url,
|
||||
"rqst_ua": navigator.userAgent
|
||||
};
|
||||
throw new Error(JSON.stringify(report,null,2));
|
||||
}
|
||||
return response.text();
|
||||
}
|
||||
|
||||
insertHTML(element) {
|
||||
this.inner.insertAdjacentHTML("afterbegin",element);
|
||||
}
|
||||
|
||||
insertElement(element) {
|
||||
this.inner.insertAdjacentElement("afterbegin",element);
|
||||
}
|
||||
|
||||
// Apply a modal template to the provided element
|
||||
applyTemplate(element) {
|
||||
// The inner div will contain modal content
|
||||
this.inner = document.createElement("div");
|
||||
this.inner.classList.add("inner");
|
||||
element.appendChild(this.inner);
|
||||
element.classList.add("modal");
|
||||
|
||||
// PointerEvents on the outer div will close the modal
|
||||
element.addEventListener("click",event => {
|
||||
if(event.target == element) {
|
||||
this.close();
|
||||
}
|
||||
});
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
error(message) {
|
||||
const oops = document.createElement("p");
|
||||
const infoButton = document.createElement("p");
|
||||
|
||||
oops.classList.add("error");
|
||||
oops.innerText = "🤯\nSomething went wrong";
|
||||
|
||||
infoButton.innerText = "more info..";
|
||||
infoButton.addEventListener("click",() => {
|
||||
const details = new Dialog();
|
||||
|
||||
details.insertHTML(`<h1>📄 Error report</h1><pre>${message}</pre>`);
|
||||
details.open();
|
||||
|
||||
this.close();
|
||||
});
|
||||
|
||||
this.insertElement(infoButton);
|
||||
this.insertElement(oops);
|
||||
}
|
||||
|
||||
// Open page from "assets/pages"
|
||||
openPage(page) {
|
||||
// Show a spinner while fetching
|
||||
const spinner = document.createElement("div");
|
||||
spinner.classList = "logo spinner";
|
||||
this.element.setAttribute("data-page",page);
|
||||
this.insertElement(spinner);
|
||||
this.open();
|
||||
|
||||
// Fetch the requested page
|
||||
this.getPage(page).then(html => {
|
||||
this.insertHTML(html);
|
||||
this.bindAll(this.inner);
|
||||
})
|
||||
.catch(error => {
|
||||
const tryAgain = new Button({
|
||||
text: "try again",
|
||||
type: "solid"
|
||||
});
|
||||
tryAgain.element.addEventListener("click",() => {
|
||||
// Clear and recreate modal structure
|
||||
destroy(this.inner);
|
||||
this.applyTemplate(this.element);
|
||||
this.init();
|
||||
this.insertElement(spinner);
|
||||
// Attempt to fetch the requested url again (with soft rate-limiting)
|
||||
setTimeout(() => {
|
||||
this.openPage(page);
|
||||
destroy(spinner);
|
||||
},500);
|
||||
});
|
||||
this.insertElement(tryAgain.element);
|
||||
this.error(error);
|
||||
})
|
||||
.finally(() => destroy(spinner));
|
||||
}
|
||||
|
||||
open() {
|
||||
setTimeout(() => this.element.classList.add("active"),this.transition / 2);
|
||||
}
|
||||
|
||||
// Close the modal and remove it from the DOM
|
||||
close() {
|
||||
this.element.classList.remove("active");
|
||||
setTimeout(() => destroy(this.element),this.transition + 1); // Wait for transition
|
||||
}
|
||||
}
|
||||
|
||||
export class Dialog extends Modal {
|
||||
constructor(interactions = {}) {
|
||||
super(interactions);
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
this.element.classList.add("dialog");
|
||||
this.element.classList.add("center");
|
||||
const closeButton = new Button({
|
||||
text: "close",
|
||||
action: "close",
|
||||
type: "phantom"
|
||||
});
|
||||
|
||||
this.bind(closeButton.element);
|
||||
this.inner.appendChild(closeButton.element);
|
||||
}
|
||||
}
|
||||
|
||||
// Overlay with a slide-in animation from the bottom of the viewport
|
||||
export class Card extends Modal {
|
||||
constructor(interactions = {}) {
|
||||
super(interactions);
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
this.element.classList.add("card");
|
||||
this.element.classList.add("center");
|
||||
const closeButton = new Button({
|
||||
text: "close",
|
||||
action: "close",
|
||||
type: "phantom"
|
||||
});
|
||||
|
||||
this.bind(closeButton.element);
|
||||
this.inner.appendChild(closeButton.element);
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
// Victor Westerlund - www.victorwesterlund.com
|
||||
|
||||
// Load assets for later use on this page.
|
||||
// This implements a hybrid of the link types "preload" and "prefetch"
|
||||
export default class Preload {
|
||||
constructor(assets) {
|
||||
this.scripts = [];
|
||||
this.stylesheets = [];
|
||||
|
||||
// Get the type of asset from the file extension
|
||||
assets.forEach(asset => {
|
||||
const components = asset.split(".");
|
||||
const extension = components[components.length - 1];
|
||||
switch(extension) {
|
||||
case "mjs":
|
||||
this.scripts.push(asset);
|
||||
break;
|
||||
case "css":
|
||||
this.stylesheets.push(asset);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// Append tags when DOM is ready
|
||||
window.addEventListener("DOMContentLoaded",() => this.import());
|
||||
}
|
||||
|
||||
import() {
|
||||
this.scripts.forEach(script => {
|
||||
const element = document.createElement("script");
|
||||
element.setAttribute("type","module");
|
||||
element.src = "assets/js/" + script;
|
||||
document.body.appendChild(element);
|
||||
});
|
||||
this.stylesheets.forEach(sheet => {
|
||||
const element = document.createElement("link");
|
||||
element.setAttribute("rel","stylesheet");
|
||||
element.href = "assets/css/" + sheet;
|
||||
document.head.appendChild(element);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
// Victor Westerlund - www.victorwesterlund.com
|
||||
|
||||
import { default as Logging } from "./Logging.mjs";
|
||||
|
||||
// Remove an element and its subtree
|
||||
export function destroy(family) {
|
||||
while(family.firstChild) {
|
||||
family.removeChild(family.lastChild);
|
||||
}
|
||||
family.parentNode.removeChild(family);
|
||||
}
|
||||
|
||||
// General-purpose scoped event handler
|
||||
export default class Interaction extends Logging {
|
||||
constructor(interactions,scope) {
|
||||
super();
|
||||
this.interactions = interactions;
|
||||
this.attribute = "data-action"; // Target elements with this attribute
|
||||
|
||||
this.bindAll(scope);
|
||||
}
|
||||
|
||||
// Bind event listeners to this element
|
||||
bind(element) {
|
||||
if(element.hasAttribute("data-bound") || !element.hasAttribute(this.attribute)) {
|
||||
return false;
|
||||
}
|
||||
element.addEventListener("click",event => this.pointerEvent(event));
|
||||
element.setAttribute("data-bound","");
|
||||
}
|
||||
|
||||
// Get all elements with the target attribute in scope
|
||||
getAll(scope) {
|
||||
return scope.querySelectorAll(`[${this.attribute}]`);
|
||||
}
|
||||
|
||||
// Bind listeners to all attributed elements within scope
|
||||
bindAll(scope) {
|
||||
const elements = this.getAll(scope);
|
||||
for(const element of elements) {
|
||||
this.bind(element);
|
||||
}
|
||||
}
|
||||
|
||||
// Handle click/touch interactions
|
||||
pointerEvent(event) {
|
||||
const target = event.target.closest(`[${this.attribute}]`);
|
||||
const action = target?.getAttribute(this.attribute) ?? null;
|
||||
|
||||
if(!target || !action || !Object.keys(this.interactions).includes(action)) {
|
||||
// Exit if the interaction is invalid or action doesn't exist
|
||||
return false;
|
||||
}
|
||||
// Execute the function from the data-action attribute
|
||||
this.interactions[action](event);
|
||||
}
|
||||
}
|
|
@ -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,79 +0,0 @@
|
|||
// Victor Westerlund - www.victorwesterlund.com
|
||||
import { default as Preload } from "./modules/Preload.mjs";
|
||||
import { default as Interaction, destroy } from "./modules/UI.mjs";
|
||||
|
||||
// Load these assets when the DOM is ready (not needed right away)
|
||||
new Preload([
|
||||
"modules/Modals.mjs",
|
||||
"modules/Components.mjs",
|
||||
"modal.css"
|
||||
]);
|
||||
|
||||
function updateTheme() {
|
||||
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
document.body.classList.remove("dark");
|
||||
|
||||
// Force dark theme on all pages
|
||||
if(media.matches) {
|
||||
document.body.classList.add("dark");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// All default interactions
|
||||
const interactions = {
|
||||
toggleMenu: () => {
|
||||
const transition = 200;
|
||||
const menu = document.getElementsByTagName("main")[0];
|
||||
|
||||
// Animate menu state change
|
||||
menu.style.setProperty("transition",`${transition}ms`);
|
||||
document.body.classList.toggle("menuActive");
|
||||
// Remove transition CSS when finished. Wonky resize effects otherwise
|
||||
setTimeout(() => menu.style.removeProperty("transition"),transition + 1);
|
||||
},
|
||||
// Open page defined with data-value as a card
|
||||
newCard: (event) => {
|
||||
const module = import("./modules/Modals.mjs");
|
||||
const interactions = {
|
||||
// Like newCard() except it closes the previous card
|
||||
getContact: (event) => {
|
||||
const service = event.target.dataset.value;
|
||||
module.then(modals => {
|
||||
event.target.closest(".modal").close();
|
||||
const card = new modals.Card(interactions);
|
||||
card.openPage(service);
|
||||
});
|
||||
},
|
||||
// Copy text defined in data-value to clipboard and play animation
|
||||
copyText: (event) => {
|
||||
const copy = navigator.clipboard.writeText(event.target.dataset.value);
|
||||
copy.then(() => {
|
||||
event.target.classList.add("copied");
|
||||
const copied = document.createElement("p");
|
||||
copied.innerText = "copied!";
|
||||
event.target.appendChild(copied);
|
||||
|
||||
// Reset button state
|
||||
setTimeout(() => {
|
||||
event.target.classList.remove("copied");
|
||||
destroy(copied);
|
||||
},1000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Create card and open the specified page asynchronously
|
||||
module.then(modals => {
|
||||
const card = new modals.Card(interactions);
|
||||
card.openPage(event.target.dataset.value);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Set the current page theme, and listen for changes
|
||||
const theme = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
theme.addEventListener("change",updateTheme);
|
||||
|
||||
new Interaction(interactions,document.body); // Initialize default interactions
|
||||
updateTheme();
|
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 |
|
@ -1,45 +0,0 @@
|
|||
<!-- Victor Westerlund - www.victorwesterlund.com -->
|
||||
<style>
|
||||
.contact {
|
||||
align-self: stretch;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: var(--padding);
|
||||
}
|
||||
|
||||
.contact .item {
|
||||
--size: 1fr;
|
||||
width: var(--size);
|
||||
height: var(--size);
|
||||
border-radius: var(--border-radius);
|
||||
background-color: rgba(var(--palette-inverted),.05);
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: var(--padding);
|
||||
}
|
||||
|
||||
.contact .item * {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.contact .item img {
|
||||
height: 8vh;
|
||||
}
|
||||
|
||||
@media (max-width: 300px) {
|
||||
.contact {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="contact">
|
||||
<div class="item button phantom" data-action="getContact" data-value="contact_signal">
|
||||
<img src="assets/img/icons/signal.svg"/>
|
||||
<p>Signal</p>
|
||||
</div>
|
||||
<div class="item button phantom" data-action="getContact" data-value="contact_email">
|
||||
<img src="assets/img/icons/email.svg"/>
|
||||
<p>E-Mail</p>
|
||||
</div>
|
||||
</div>
|
|
@ -1,65 +0,0 @@
|
|||
<!-- Victor Westerlund - www.victorwesterlund.com -->
|
||||
<style>
|
||||
.button.copied {
|
||||
pointer-events: none;
|
||||
animation: beat 500ms forwards;
|
||||
animation-delay: 200ms;
|
||||
}
|
||||
|
||||
.button.copied svg,
|
||||
.button.copied p:first-of-type {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.button.copied p:last-of-type {
|
||||
position: absolute;
|
||||
animation: slide 1000ms forwards;
|
||||
}
|
||||
|
||||
@keyframes beat {
|
||||
0% { transform: scale(1); }
|
||||
25% { transform: scale(.95); }
|
||||
55% { transform: scale(1.05); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
|
||||
@keyframes slide {
|
||||
0% { transform: translateY(calc(var(--padding))); opacity: 0; }
|
||||
30% { transform: translateY(0); opacity: 1; }
|
||||
70% { transform: translateY(0); opacity: 1; }
|
||||
100% { transform: translateY(calc(var(--padding) * -1)); opacity: 0; }
|
||||
}
|
||||
|
||||
a.button {
|
||||
color: var(--swatch-accent);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.button::before {
|
||||
content: "tap ";
|
||||
}
|
||||
|
||||
@media (max-width: 300px) {
|
||||
.button.copied p:last-of-type {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
|
||||
@media (pointer: fine) {
|
||||
a.button::before {
|
||||
content: "click ";
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div class="button phantom" data-action="openPage" data-value="contact_email_pgp" data-type="card">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></svg>
|
||||
<p>PGP key</p>
|
||||
</div>
|
||||
<p></p>
|
||||
<h1>hello@victorwesterlund.com</h1>
|
||||
<p>You can also <a class="button" href="mailto:hello@victorwesterlund.com?subject=Hello Victor!">here</a> to send a mail directly from your mail app</p>
|
||||
<p></p>
|
||||
<div class="button solid" data-action="copyText" data-value="hello@victorwesterlund.com">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18 2H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H9V4h9v12zM3 15v-2h2v2H3zm0-5.5h2v2H3v-2zM10 20h2v2h-2v-2zm-7-1.5v-2h2v2H3zM5 22c-1.1 0-2-.9-2-2h2v2zm3.5 0h-2v-2h2v2zm5 0v-2h2c0 1.1-.9 2-2 2zM5 6v2H3c0-1.1.9-2 2-2z"/></svg>
|
||||
<p>copy email</p>
|
||||
</div>
|
|
@ -1,9 +0,0 @@
|
|||
<!-- Victor Westerlund - www.victorwesterlund.com -->
|
||||
<h1>🔑 PGP Public Key</h1>
|
||||
<p></p>
|
||||
<p>5466 B1EB 2F44 6D3D DC34 E9F7 5BE0 CB0B E3BB 69DA</p>
|
||||
<p class="button" data-action="openPage" data-value="contact_email_pgp_view" data-type="dialog">show key</p>
|
||||
<a href="https://storage.googleapis.com/public.victorwesterlund.com/publickey.gpg"><div class="button solid">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"/></svg>
|
||||
<p>download .gpg</p>
|
||||
</div></a>
|
|
@ -1,31 +0,0 @@
|
|||
<!-- Victor Westerlund - www.victorwesterlund.com -->
|
||||
<pre>
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQENBF/K6MkBCACkRMhMfYdeNP+M3XQoZHQVJgippQvYZ4QqH6F6brWD5989Xy5W
|
||||
kDCvLbmPJ66boqB0dHExswOvMlhfFha65pRmfP6lIoIxZlZKwll1XASP2osS8f6r
|
||||
63T7hAbL3V2Dkm49tiH1tk578xGomDrxOrd4izpH4mn9AyBIL4M+5j34bKFVZKQ+
|
||||
QfMu7tduF/1oQHfDaXJeLXSfn5cNTy8DlLcLJKUSk4cjabf1D88gMVszqAAC5o1a
|
||||
fI0YxoyZ+Fv+CmyrQm2iIZ3+MyDU9JAvoImtlp1h5aNgbFRDi2vKcSlv158Hq97Z
|
||||
XlH1ttRZuFZiJzb8iukgUUFi4RORoXWt2rtNABEBAAG0LlZpY3RvciBXZXN0ZXJs
|
||||
dW5kIDxoZWxsb0B2aWN0b3J3ZXN0ZXJsdW5kLmNvbT6JATUEEAEIACkFAl/K6MkG
|
||||
CwkIBwMCCRBb4MsL47tp2gQVCAIKAxYCAQIZAQIbAwIeAQAAJ5MIAKDl9yHjwTO7
|
||||
20sDrPa6ECsSBU/FwkvkWecuauvY19/OqtacNk8dEeiITLeUeBXkvNzN+P0y8hoF
|
||||
ABZeir59dsY00iIp8gm03eLalhcblR5jYe3c08HssJH8PksczP3kitRNLvPAf2nU
|
||||
BYg3zca5Ka21/4BPRLFb9SAQGxfHyZdy3Poug+o+pokbeK2wLqqfSMtH+waBB6Lg
|
||||
2dRXuEnaZorUpNBpsahxastvNehv31Ke41Brvft15VKpO25GKZDPhm0odXMth1/J
|
||||
pzWRQtndazY2guB0Ft+5wujv28HFCgVgZn2fKiQVytAetO+/wzPijBkGRvdIE+Zb
|
||||
VRd3Nc0mHI65AQ0EX8royQEIALcoWEurmyXD2LoGvR+sYW+YPAPM6KG8KF4cWUn8
|
||||
8+kZ6F4FH9OW64di2npYe3x+zR7DgQ1yHXcmalAsP0nN4JWTavLwsSO+JAv8NpL5
|
||||
bgDs6fGaEQFl+X4fYOpkBkBmb1JrbnBk1a2u3qsEw8t7+wW1LG9z/Si5+G1KQko8
|
||||
x/PEaZ2ZVv7L51ZfIQRnMtl4vL5X23BPVsDywotvuFqlTiSjGP4CR0lVa5CRv3DJ
|
||||
FSmHxAxeI0vMMlwbIIUTrtwJR320sZvh2cRiwAXHQXm6l0ojzRnl46mmXnB3N6q9
|
||||
PyWOaUgPrMFjT24wtgopIOwbFAT3xTr1Un0FbdeaG9JhdJ8AEQEAAYkBHwQYAQgA
|
||||
EwUCX8royQkQW+DLC+O7adoCGwwAAIV/B/9OLYeQOxbXh1/hvW7/oTvN1py8wfFq
|
||||
buvQSrb/MZKm6lZgG+kQy3DWjGTi/xvNqDHfBiObFSGso8RHSbHFldzEuMgrgoWW
|
||||
/4JH1GDiKOp+rmBxfG30/DzOoFSfVcUfP5r8xNQby4Bh6zJhKPKVB3sZjO8cHNZD
|
||||
HcNAqT3Gh5yFzsUna+ZjvPF7iU5RF1YP46dsIdvuo4xFbHpEPoZs7wgZijf+vmKO
|
||||
lP61UFvKuXzwcLiI6s919EBJ9+7je8ZAxe6BCaazk+AhxXeokVvDgwQ150DNk4up
|
||||
1ftWZI0LHqEpVGNejQ09uu+TdC/ISy/Ti0XKlJDER1eUL577YRUl876Y
|
||||
=2qWm
|
||||
-----END PGP PUBLIC KEY BLOCK-----</pre>
|
|
@ -1,76 +0,0 @@
|
|||
<!-- Victor Westerlund - www.victorwesterlund.com -->
|
||||
<style>
|
||||
body:not(.dark) .modal[data-page="contact_signal"] .inner {
|
||||
--palette-inverted: 255,255,255;
|
||||
--palette-background: 58,118,240;
|
||||
|
||||
--swatch-background: rgb(var(--palette-background));
|
||||
--swatch-inverted: rgb(var(--palette-inverted));
|
||||
}
|
||||
|
||||
body:not(.dark) .modal[data-page="contact_signal"] .button.solid {
|
||||
background-color: var(--swatch-inverted);
|
||||
color: var(--swatch-background);
|
||||
}
|
||||
|
||||
.modal .inner > h1,
|
||||
.modal .inner > p,
|
||||
.modal .button.phantom {
|
||||
color: var(--swatch-inverted);
|
||||
}
|
||||
|
||||
/* ---- */
|
||||
|
||||
#logo_signal {
|
||||
width: clamp(100px,50%,200px);
|
||||
}
|
||||
|
||||
#number {
|
||||
background: black;
|
||||
padding: 10px 15px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.button.copied {
|
||||
pointer-events: none;
|
||||
animation: beat 500ms forwards;
|
||||
animation-delay: 200ms;
|
||||
}
|
||||
|
||||
.button.copied svg,
|
||||
.button.copied p:first-of-type {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.button.copied p:last-of-type {
|
||||
position: absolute;
|
||||
animation: slide 1000ms forwards;
|
||||
}
|
||||
|
||||
@keyframes beat {
|
||||
0% { transform: scale(1); }
|
||||
25% { transform: scale(.95); }
|
||||
55% { transform: scale(1.05); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
|
||||
@keyframes slide {
|
||||
0% { transform: translateY(calc(var(--padding))); opacity: 0; }
|
||||
30% { transform: translateY(0); opacity: 1; }
|
||||
70% { transform: translateY(0); opacity: 1; }
|
||||
100% { transform: translateY(calc(var(--padding) * -1)); opacity: 0; }
|
||||
}
|
||||
|
||||
@media (max-width: 300px) {
|
||||
.button.copied p:last-of-type {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<img id="logo_signal" src="assets/img/icons/signal.svg"/>
|
||||
<h1 id="number">+4670-245-2459</h1>
|
||||
<p>Signal is a free and encrypted message platform with apps for all major platforms.</p>
|
||||
<div class="button solid" data-action="copyText" data-value="+46702452459">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18 2H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H9V4h9v12zM3 15v-2h2v2H3zm0-5.5h2v2H3v-2zM10 20h2v2h-2v-2zm-7-1.5v-2h2v2H3zM5 22c-1.1 0-2-.9-2-2h2v2zm3.5 0h-2v-2h2v2zm5 0v-2h2c0 1.1-.9 2-2 2zM5 6v2H3c0-1.1.9-2 2-2z"/></svg>
|
||||
<p>copy number</p>
|
||||
</div>
|
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 ☕
|
100
public/index.html
Normal file → Executable file
|
@ -1,74 +1,58 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- Victor Westerlund - www.victorwesterlund.com -->
|
||||
<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">
|
||||
<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());
|
||||
|
||||
<link rel="icon" href="assets/img/favicon.png">
|
||||
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 class="screen landingpage">
|
||||
<header>
|
||||
<div class="hamburger center" data-action="toggleMenu" data-theme-color="contrast">
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
<div class="logo"></div>
|
||||
<p>victor westerlund</p>
|
||||
</header>
|
||||
<div class="content center">
|
||||
<div class="pattern center">
|
||||
<div></div>
|
||||
</div>
|
||||
<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">
|
||||
</picture>
|
||||
</div>
|
||||
<div>
|
||||
<div id="intro">
|
||||
<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 class="screen menu dark">
|
||||
<header>
|
||||
<div class="hamburger center" data-action="toggleMenu" data-theme-color="background">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="28.548" height="22.828"><path d="M2.28 11.414h25.269M1.414 11.414l10-10M1.414 11.414l10 10"/></svg>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
<div class="logo"></div>
|
||||
<p>victor westerlund</p>
|
||||
</header>
|
||||
<div class="content">
|
||||
<div class="wide">
|
||||
<div class="logo"></div>
|
||||
<div class="group">
|
||||
<h1><span>victor westerlund</span></h1>
|
||||
<p>I create things with code. The things I've created for the public reside as open-source repositories on GitHub, the rest you might hear about from me some day.</p>
|
||||
<p>Other topics (seemingly irrelevant to programming) I find facinating include but is in no way limited to astronomy, psychology, sociology, economics, ...</p>
|
||||
</div>
|
||||
<nav>
|
||||
<p class="button" data-action="newCard" data-value="contact_signal">signal</p>
|
||||
<p class="button" data-action="newCard" data-value="contact_email">email</p>
|
||||
<a href="https://github.com/VictorWesterlund" target="_blank"><p class="button">github →</p></a>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="narrow center">
|
||||
<p>I create things with code. The things I've created for the public reside as open-source repositories on GitHub, the rest you might hear about from me some day.</p>
|
||||
<p>Other topics (seemingly irrelevant to programming) I find facinating include but is in no way limited to astronomy, psychology, sociology, economics, ...</p>
|
||||
</div>
|
||||
<div class="button phantom" data-action="newCard" data-value="contact">
|
||||
<p>contact me</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="card">
|
||||
<picture>
|
||||
<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>
|
||||
<div>
|
||||
<p>...and ☕, full-time</p>
|
||||
</div>
|
||||
<!--<a href="contact">contact me</a>-->
|
||||
</div>
|
||||
</main>
|
||||
<script type="module" src="assets/js/script.js"></script>
|
||||
<script nomodule src="assets/js/nomodule.js"></script>
|
||||
</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>
|