This commit is contained in:
Tim-Niclas Oelschläger 2024-01-24 00:10:01 +01:00
commit 2bf2be7d95
97 changed files with 17811 additions and 0 deletions
.eslintrc.cjs
.gitea/workflows
.gitignore.prettierrc
.vscode
LICENSEREADME.mdastro.config.tspackage-lock.jsonpackage.json
patches
public
scripts
src
tsconfig.json

80
.eslintrc.cjs Normal file
View File

@ -0,0 +1,80 @@
const tsconfig = require('./tsconfig.json');
module.exports = {
root: true,
ignorePatterns: ['.eslintrc.cjs', 'dist', 'node_modules', 'public', '**/*.d.ts', '*.*js'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
project: ['tsconfig.json'],
sourceType: 'module',
},
env: {
node: true,
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', fixStyle: 'separate-type-imports' }],
'@typescript-eslint/semi': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-restricted-imports': [
'error',
{
patterns: [
{ group: ['.**'], message: 'Use absolute Paths!' },
{ group: ['**//**'], message: "'//' not allowed!" },
{
group: Object.keys(tsconfig.compilerOptions.paths)
.map(path => '@/' + path.slice(1) + '*')
.slice(1),
message: 'Not allowed!',
},
],
},
],
'no-duplicate-imports': 'error',
'max-classes-per-file': 'error',
eqeqeq: 'error',
'no-throw-literal': 'error',
semi: 'error',
'no-console': 'error',
'guard-for-in': 'off',
},
overrides: [
{
files: ['*.astro'],
plugins: ['astro', 'jsx-a11y'],
extends: ['plugin:astro/recommended', 'plugin:jsx-a11y/recommended'],
env: {
'astro/astro': true,
},
parser: 'astro-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.astro'],
},
rules: {
// @HACK: don't work with for-attribute
'jsx-a11y/label-has-associated-control': 'off',
// @HACK: don't work with set:html-attribute
'jsx-a11y/heading-has-content': 'off',
// @HACK: don't work with set:html-attribute
'jsx-a11y/anchor-has-content': 'off',
// @HACK: don't work with AstroShorthandAttribute
'jsx-a11y/html-has-lang': 'off',
},
},
],
};

View File

@ -0,0 +1,51 @@
name: Release a tag
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-pr[0-9]+' # Optional prerelease pattern
jobs:
release-tag:
runs-on: ubuntu-latest
steps:
- name: Hack to use local-ips
run: |
echo "192.168.178.189 zokki.net" >> /etc/hosts
echo "192.168.178.189 gitea.zokki.net" >> /etc/hosts
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js with lts
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install deps
run: npm ci --omit=dev
- name: Build
run: npm run build
- name: Zip folder
uses: edgarrc/action-7z@v1
with:
args: 7z a -t7z -mx=9 website-${{ github.ref_name }}.7z ./dist/*
- name: Make pre-release
if: ${{ contains(github.ref_name, '-pr') }}
uses: https://gitea.com/akkuman/gitea-release-action@main
with:
prerelease: true
files: |-
website-${{ github.ref_name }}.7z
- name: Make release
if: ${{ ! contains(github.ref_name, '-pr') }}
uses: https://gitea.com/akkuman/gitea-release-action@main
with:
files: |-
website-${{ github.ref_name }}.7z

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
# build output
dist/
# generated types
.astro/
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store

20
.prettierrc Normal file
View File

@ -0,0 +1,20 @@
{
"singleQuote": true,
"useTabs": true,
"tabWidth": 2,
"semi": true,
"bracketSameLine": false,
"arrowParens": "avoid",
"endOfLine": "lf",
"printWidth": 140,
"plugins": ["prettier-plugin-astro"],
"astroAllowShorthand": true,
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}

4
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"],
"unwantedRecommendations": []
}

13
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
"editor.insertSpaces": false,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"liveServer.settings.root": "./dist",
"prettier.documentSelectors": ["**/*.astro"],
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.validate": ["typescript", "astro", "javascript"]
}

661
LICENSE Normal file
View File

@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
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
them 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.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero 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 that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
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
state 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 Affero General Public License as published
by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

83
README.md Normal file
View File

@ -0,0 +1,83 @@
# Zokki's Softwareschmiede - Website Repository
Welcome to the official repository for the Zokki's Softwareschmiede website, [zokki.net](https://zokki.net). This repository houses the source code for the website, which includes information about software development, blog posts, and various references.
## Technologies Used
The website is built using Astro, a modern static site generator. Key technologies and languages include:
- **Astro**: The main static site generator for the website.
- **Translated Routes**: Custom implementation for handling translated routes without relying on JavaScript.
- **Typescript**: Used for scripting and enhancing functionality.
- **SCSS**: The preferred style sheet language for styling.
- **Custom Scripts**: Specialized scripts for compressing Astro data attributes.
## Getting Started
To get started with development or contribute to the project, follow these steps:
1. Clone the Repository:
</br>https
```bash
git clone https://gitea.zokki.net/zokki/softwareschmiede.git
```
</br>ssh
```bash
git clone gitea@zokki.net:zokki/softwareschmiede.git
```
1. Install Dependencies:
```bash
cd softwareschmiede
npm ci
```
1. Run the Development Server:
```bash
npm run start
```
This will start a local development server. Open your browser and navigate to http://localhost:4321 to view the website.
## Project Structure
The project structure is organized as follows:
<pre>
📦softwareschmiede/
┣ 📂.vscode/
┃ ┣ 📜extensions.json # extension recommendations for vscode
┃ ┗ 📜settings.json # vscode settings
┣ 📂dist/ # build output from astro
┣ 📂patches/ # patches to node_modules with patch-package
┣ 📂public/ # non-code, uncompressed assets
┣ 📂scripts/ # custom scripts
┣ 📂src/
┃ ┣ 📂components/ # reusable components
┃ ┣ 📂i18n/ # translations
┃ ┣ 📂layouts/ # page layouts - like wrapper
┃ ┣ 📂pages/ # html and ts for all pages
┃ ┣ 📂shared/ # utils
┃ ┗ 📂styles/ # SCSS styles
┣ 📜.eslintrc.cjs # eslint(linter) configuration
┣ 📜.gitignore # git ignore file
┣ 📜.prettierrc # prettier(formatter) configuration
┣ 📜LICENSE # AGPL-3.0 License of the Website
┣ 📜README.md # project documentation (you are here)
┣ 📜astro.config.ts # astro configuration
┣ 📜package.json # node.js package file
┗ 📜tsconfig.json # TypeScript configuration
</pre>
## Contributing
We welcome contributions from the community! If you find any issues or have improvements to suggest, feel free to open an issue.
## License
[AGPL-3.0](LICENSE) © Tim-Niclas Oelschläger

100
astro.config.ts Normal file
View File

@ -0,0 +1,100 @@
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import compress from 'astro-compress';
import purgecss from 'astro-purgecss';
import robotsTxt from 'astro-robots-txt';
import { defineConfig } from 'astro/config';
import linkTranslations from './src/i18n/link';
const site = 'https://zokki.net';
const locales = {
de: 'de-DE',
en: 'en-US',
} as const;
export const indexSuffixRegEx = /\/?(index)?(\.html)?$/;
type Language = keyof typeof locales;
const defaultLocale = 'de' satisfies Language;
// @HACK: https://github.com/withastro/astro/pull/9789
export const translateHref =
(pathname: string, currLang: Language) =>
(newLang: Language): string => {
let currTranslationPath = linkTranslations[currLang] as any;
let newTranslationPath = linkTranslations[newLang] as any;
const newPath = pathname
.replace(site, '')
.split('/')
.filter(subPath => Boolean(subPath) && !(subPath in locales))
.map(subPath => {
subPath = subPath.replace(indexSuffixRegEx, '');
if (!subPath || subPath in locales) return '/' + newLang;
const translationPathEntry = Object.entries(currTranslationPath).find(([, val]) => {
if (typeof val === 'string') {
return encodeURI(val) === '/' + subPath;
}
return encodeURI((val as any).href) === '/' + subPath;
});
if (!translationPathEntry) {
throw new Error(`No route found for '${pathname}'!`);
}
currTranslationPath = currTranslationPath[translationPathEntry[0]];
newTranslationPath = newTranslationPath[translationPathEntry[0]];
return typeof newTranslationPath === 'string' ? newTranslationPath : newTranslationPath.href;
})
.join('');
const prefix = newLang !== defaultLocale ? '/' + newLang : '';
return prefix + (prefix === newPath ? '' : newPath || '/') || '/';
};
// https://astro.build/config
export default defineConfig({
site,
integrations: [
purgecss({ variables: true }), //
compress({ CSS: false }),
mdx(),
robotsTxt({
policy: [
{
userAgent: '*',
disallow: ['/_astro', '/fonts'],
},
],
}),
sitemap({
i18n: { defaultLocale, locales },
changefreq: 'monthly',
priority: 1.0,
lastmod: new Date(),
serialize(item) {
if (new RegExp(site + `/(${Object.keys(locales).join('|')})/`).test(item.url)) return undefined;
item.links =
item.links?.map(link => ({ ...link, url: link.url.replace(indexSuffixRegEx, '') })) ||
Object.entries(locales).map(([hreflang, lang]) => ({
lang,
hreflang,
url: translateHref(item.url.replace(indexSuffixRegEx, ''), 'de')(hreflang as Language),
}));
return item;
},
}),
],
build: {
format: 'file',
},
i18n: {
defaultLocale,
locales: Object.keys(locales) as Language[],
routing: {
strategy: 'pathname',
prefixDefaultLocale: false,
},
},
} as const);

11377
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

45
package.json Normal file
View File

@ -0,0 +1,45 @@
{
"name": "softwareschmiede",
"version": "1.0.0",
"author": "Tim-Niclas Oelschläger",
"description": "Website of Zokki's Softwareschmiede",
"license": "AGPL-3.0",
"type": "module",
"scripts": {
"postinstall": "patch-package || true",
"start": "astro dev --host",
"check": "astro check --tsconfig ./tsconfig.json && tsc --noEmit",
"build": "npm run check && astro build",
"build:dev": "NODE_ENV=\"DEVELOPMENT\" npm run build",
"postbuild": "node ./scripts/after-build.mjs",
"preview": "astro preview",
"astro": "astro",
"lint": "eslint ."
},
"dependencies": {
"@astrojs/check": "^0.4.1",
"@astrojs/mdx": "^2.0.5",
"@astrojs/sitemap": "^3.0.5",
"@astrojs/ts-plugin": "^1.4.0",
"astro": "^4.2.1",
"astro-compress": "astro-community/AstroCompress#no-sharp",
"astro-purgecss": "^4.0.0",
"astro-robots-txt": "^1.0.0",
"node-html-parser": "^6.1.12",
"patch-package": "^8.0.0",
"purgecss": "^5.0.0",
"sass": "^1.70.0",
"typescript": "^5.3.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-astro": "^0.31.3",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.4",
"prettier-plugin-astro": "^0.13.0"
}
}

View File

@ -0,0 +1,13 @@
diff --git a/node_modules/@astrojs/sitemap/dist/index.js b/node_modules/@astrojs/sitemap/dist/index.js
index 37e0cbf..2e8879f 100644
--- a/node_modules/@astrojs/sitemap/dist/index.js
+++ b/node_modules/@astrojs/sitemap/dist/index.js
@@ -49,7 +49,7 @@ const createPlugin = (options) => {
let pageUrls = pages.filter((p) => !isStatusCodePage(p.pathname)).map((p) => {
if (p.pathname !== "" && !finalSiteUrl.pathname.endsWith("/"))
finalSiteUrl.pathname += "/";
- const fullPath = finalSiteUrl.pathname + p.pathname;
+ const fullPath = (finalSiteUrl.pathname + p.pathname).replaceAll('//', '/');
return new URL(fullPath, finalSiteUrl).href;
});
let routeUrls = routes.reduce((urls, r) => {

145
patches/astro+4.2.1.patch Normal file
View File

@ -0,0 +1,145 @@
diff --git a/node_modules/astro/components/Picture.astro b/node_modules/astro/components/Picture.astro
index f42846f..d94d67c 100644
--- a/node_modules/astro/components/Picture.astro
+++ b/node_modules/astro/components/Picture.astro
@@ -9,9 +9,10 @@ type Props = (LocalImageProps | RemoteImageProps) & {
formats?: ImageOutputFormat[];
fallbackFormat?: ImageOutputFormat;
pictureAttributes?: HTMLAttributes<'picture'>;
+ showPlaceholderImage?: boolean;
};
-const defaultFormats = ['webp'] as const;
+const defaultFormats = ['avif', 'webp'] as const;
const defaultFallbackFormat = 'png' as const;
// Certain formats don't want PNG fallbacks:
@@ -21,7 +22,7 @@ const defaultFallbackFormat = 'png' as const;
// For those, we'll use the original format as the fallback instead.
const specialFormatsFallback = ['gif', 'svg', 'jpg', 'jpeg'] as const;
-const { formats = defaultFormats, pictureAttributes = {}, fallbackFormat, ...props } = Astro.props;
+const { formats = defaultFormats, pictureAttributes = {}, fallbackFormat, showPlaceholderImage = true, ...props } = Astro.props;
if (props.alt === undefined || props.alt === null) {
throw new AstroError(AstroErrorData.ImageMissingAlt);
@@ -50,6 +51,16 @@ const fallbackImage = await getImage({
densities: props.densities,
});
+const placeholderImage = await getImage({
+ ...props,
+ quality: 15,
+ format: formats[0],
+ widths: props.widths,
+ densities: props.densities,
+ width: props.height ? props.width ? (props.width / 2) : undefined : ((props.width || props.src.width) / 2),
+ height: props.width ? props.height ? (props.height / 2) : undefined : ((props.height || props.src.height) / 2),
+});
+
const imgAdditionalAttributes: HTMLAttributes<'img'> = {};
const sourceAdditionaAttributes: HTMLAttributes<'source'> = {};
@@ -79,5 +90,5 @@ if (fallbackImage.srcSet.values.length > 0) {
);
})
}
- <img src={fallbackImage.src} {...imgAdditionalAttributes} {...fallbackImage.attributes} />
+ <img src={fallbackImage.src} {...imgAdditionalAttributes} {...fallbackImage.attributes} style={{'background-image': showPlaceholderImage ? `url(${placeholderImage.src})` : undefined}} />
</picture>
diff --git a/node_modules/astro/config.d.ts b/node_modules/astro/config.d.ts
index b859f0b..0af6679 100644
--- a/node_modules/astro/config.d.ts
+++ b/node_modules/astro/config.d.ts
@@ -8,7 +8,7 @@ type SharpImageServiceConfig = import('./dist/assets/services/sharp.js').SharpIm
* See the full Astro Configuration API Documentation
* https://astro.build/config
*/
-export function defineConfig(config: AstroUserConfig): AstroUserConfig;
+export function defineConfig<const TConfig extends AstroUserConfig>(config: TConfig): TConfig;
/**
* Use Astro to generate a fully resolved Vite config
diff --git a/node_modules/astro/dist/@types/astro.d.ts b/node_modules/astro/dist/@types/astro.d.ts
index 01756c2..d05226c 100644
--- a/node_modules/astro/dist/@types/astro.d.ts
+++ b/node_modules/astro/dist/@types/astro.d.ts
@@ -1401,7 +1401,7 @@ export interface AstroUserConfig {
* })
*```
* */
- redirectToDefaultLocale: boolean;
+ redirectToDefaultLocale?: boolean;
/**
* @name i18n.routing.strategy
* @type {"pathname"}
diff --git a/node_modules/astro/dist/core/render/route-cache.js b/node_modules/astro/dist/core/render/route-cache.js
index fc1eade..acced22 100644
--- a/node_modules/astro/dist/core/render/route-cache.js
+++ b/node_modules/astro/dist/core/render/route-cache.js
@@ -1,3 +1,4 @@
+import path from "path";
import { stringifyParams } from "../routing/params.js";
import { validateDynamicRouteModule, validateGetStaticPathsResult } from "../routing/validation.js";
import { generatePaginateFunction } from "./paginate.js";
@@ -64,7 +65,11 @@ class RouteCache {
}
function findPathItemByKey(staticPaths, params, route, logger) {
const paramsKey = stringifyParams(params, route);
- const matchedStaticPath = staticPaths.keyed.get(paramsKey);
+ const matchedStaticPath =
+ staticPaths.keyed.get(paramsKey)
+ || staticPaths.keyed.get(paramsKey.replace(/"$/, '/index"'))
+ || staticPaths.keyed.get(JSON.stringify('/' + (Object.values(params)[0] || '')))
+ || staticPaths.keyed.get(JSON.stringify(path.join('/', Object.values(params)[0] || '')));
if (matchedStaticPath) {
return matchedStaticPath;
}
diff --git a/node_modules/astro/dist/core/routing/manifest/create.js b/node_modules/astro/dist/core/routing/manifest/create.js
index d96be68..2c4f190 100644
--- a/node_modules/astro/dist/core/routing/manifest/create.js
+++ b/node_modules/astro/dist/core/routing/manifest/create.js
@@ -59,7 +59,7 @@ function getPattern(segments, config, addTrailingSlash) {
if (addTrailingSlash === "never" && base !== "/") {
initial = "";
}
- return new RegExp(`^${pathname || initial}${trailing}`);
+ return segments.length > 1 ? /^(?:\/(.*?))?\/?$/ : new RegExp(`^${pathname || initial}${trailing}`);
}
function getTrailingSlashPattern(addTrailingSlash) {
if (addTrailingSlash === "always") {
diff --git a/node_modules/astro/dist/runtime/client/dev-toolbar/apps/audit/a11y.js b/node_modules/astro/dist/runtime/client/dev-toolbar/apps/audit/a11y.js
index e143a2e..85030ee 100644
--- a/node_modules/astro/dist/runtime/client/dev-toolbar/apps/audit/a11y.js
+++ b/node_modules/astro/dist/runtime/client/dev-toolbar/apps/audit/a11y.js
@@ -281,7 +281,7 @@ const a11y = [
if (!hasFor && !nestedLabellableElement)
return true;
const innerText = element.innerText.trim();
- if (innerText === "")
+ if (innerText === "" && !element.querySelector(':scope > svg'))
return true;
}
},
@@ -334,7 +334,7 @@ const a11y = [
message: "Headings and anchors must have an accessible name, which can come from: inner text, aria-label, aria-labelledby, an img with alt property, or an svg with a tag <title></title>.",
selector: a11y_required_content.join(","),
match(element) {
- const innerText = element.innerText.trim();
+ const innerText = element.textContent.trim();
if (innerText !== "")
return false;
const ariaLabel = element.getAttribute("aria-label")?.trim();
diff --git a/node_modules/astro/dist/vite-plugin-astro/compile.js b/node_modules/astro/dist/vite-plugin-astro/compile.js
index 8a9b334..b4150ee 100644
--- a/node_modules/astro/dist/vite-plugin-astro/compile.js
+++ b/node_modules/astro/dist/vite-plugin-astro/compile.js
@@ -52,7 +52,7 @@ const $$url = ${JSON.stringify(
}
return {
...transformResult,
- code: esbuildResult.code + SUFFIX,
+ code: `const __dirname = '${compileProps.filename}';` + esbuildResult.code + SUFFIX,
map: esbuildResult.map
};
}

View File

@ -0,0 +1,53 @@
diff --git a/node_modules/astro-purgecss/dist/index.mjs b/node_modules/astro-purgecss/dist/index.mjs
index b2f5889..803f105 100644
--- a/node_modules/astro-purgecss/dist/index.mjs
+++ b/node_modules/astro-purgecss/dist/index.mjs
@@ -1,8 +1,10 @@
+import glob from "glob";
+import { parse } from 'node-html-parser';
+import { readFile, writeFile } from "node:fs/promises";
+import { fileURLToPath } from "node:url";
import {
PurgeCSS
} from "purgecss";
-import { writeFile } from "node:fs/promises";
-import { fileURLToPath } from "node:url";
function handleWindowsPath(outputPath) {
if (process.platform !== "win32")
return outputPath;
@@ -18,15 +20,33 @@ function src_default(options = {}) {
hooks: {
"astro:build:done": async ({ dir }) => {
const outDir = handleWindowsPath(fileURLToPath(dir));
+ const inlineUsedCSSVariables = (
+ await Promise.all(glob(outDir + '/**/*.html', { sync: true }).map(file => readFile(file, { encoding: 'utf-8' })))
+ )
+ .flatMap(fileContent => parse(fileContent).querySelectorAll('style'))
+ .map(style => style?.textContent.matchAll(/--[\w-/:]+(?<!:)/g))
+ .flatMap(iter => Array.from(iter))
+ .map(val => val?.[0]);
+ const layoutFile = (await Promise.all(
+ glob(outDir + '/_astro/**/*.css', { sync: true }).map(async file => ({
+ file,
+ includes: (await readFile(file, { encoding: 'utf-8' })).includes('.global-style-file{only-for:a-hack}'),
+ })),
+ )).find(val => val.includes)?.file;
+
const purged = await new PurgeCSS().purge({
...options,
+ safelist: {
+ ...options.safelist,
+ variables: inlineUsedCSSVariables.concat(options.safelist?.variables).filter(Boolean),
+ },
content: [
`${outDir}/**/*.html`,
`${outDir}/**/*.js`,
...options.content || []
],
- css: [`${outDir}/**/*.css`],
- defaultExtractor: (content) => content.match(/[\w-/:]+(?<!:)/g) || []
+ css: [`${outDir}/**/*.css`, layoutFile].filter(Boolean),
+ defaultExtractor: (content) => content.match(/(--)?[!\w%-/:]+(?<!:)/g) || []
});
await Promise.all(
purged.filter(({ file }) => file == null ? void 0 : file.endsWith(".css")).map(async ({ css, file }) => await writeFile(file, css))

View File

@ -0,0 +1,13 @@
diff --git a/node_modules/jsx-ast-utils/lib/propName.js b/node_modules/jsx-ast-utils/lib/propName.js
index 5057886..cf95c41 100644
--- a/node_modules/jsx-ast-utils/lib/propName.js
+++ b/node_modules/jsx-ast-utils/lib/propName.js
@@ -10,7 +10,7 @@ exports.default = propName;
function propName() {
var prop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- if (!prop.type || prop.type !== 'JSXAttribute') {
+ if (!prop.type || (prop.type !== 'JSXAttribute' && prop.type !== 'AstroShorthandAttribute')) {
throw new Error('The prop must be a JSXAttribute collected by the AST parser.');
}

5
public/favicon.svg Normal file
View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" viewBox="0 0 5665 6308">
<path d="m155 6173-1-212h-154v-160h155v-267l287-364h-170l180-225h180l474-591h147l273-345h-136l356-456h-236l153-191h248l421-525h163l241-300h-154l489-618h268l-484 618h150l-240 300h-163l-420 525h-250l-153 191h238l-365 456h136l-265 345h-148l-472 591h-181l-180 225h170l-346 436v195h-153v160h153v212zm2605-4254 149-182h268l-149 182zm600-183h-134l365-469h-168l127-157h181l269-335h270l-273 335h-181l-123 157h170l-369 470zm-3110-1036v-310h150v-190h-150v-200h4850v70h-4640v130h140v190h-140v310z" fill="#00fae5"/>
<path d="m577 6308v-67h4826v-280h-153v-160h152v-196h212v196h-152v160h152v347zm829-774 287-364h-171l182-225h180l474-591h146l273-345h-141l364-456h-239l154-191h249l420-525h163l241-300h-154l486-618h273l-486 618h154l-243 300h-164l-425 525h-244l-156 191h240l-363 456h135l-264 345h-150l-472 591h-181l-180 225h170l-290 364zm2607-3615 147-182h270l-150 182zm463-182 262-330h172l163-208h-161l397-497v-312h144v-190h-144v-64h212v64h144v190h-144v382l-348 427h162l-156 208h-170l-263 330z" fill="#fa3045"/>
<path d="M366 6241v-280H213v-160h153v-195l346-436H542l180-225h180l473-591h148l265-345h-136l365-456h-238l153-191h250l420-525h164l240-300h-151l484-618h-311l149-182h317l369-470h-170l123-157h180l274-335-3810-3V390h140l2-190H460V70h4849v130h144v190h-144v312l-397 497h161l-163 208h-172l-262 330h-316l-147 182h307l-486 618h154l-241 300h-163l-420 525h-249l-154 191h239l-364 456h141l-273 345h-146l-474 591h-180l-182 225h171l-287 364h3996v267h-152v160h153v280z"/>
</svg>

After

(image error) Size: 1.5 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

(image error) Size: 92 KiB

Binary file not shown.

After

(image error) Size: 70 KiB

View File

@ -0,0 +1,16 @@
<svg id="hamburger" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" stroke="currentColor" stroke-width=".6"
fill="none" stroke-linecap="round" style="cursor: pointer">
<path d="M2,3L5,3L8,3M2,5L8,5M2,7L5,7L8,7">
<animate dur="0.2s" attributeName="d" values="M2,3L5,3L8,3M2,5L8,5M2,7L5,7L8,7;M3,3L5,5L7,3M5,5L5,5M3,7L5,5L7,7"
fill="freeze" begin="start.begin" />
<animate dur="0.2s" attributeName="d" values="M3,3L5,5L7,3M5,5L5,5M3,7L5,5L7,7;M2,3L5,3L8,3M2,5L8,5M2,7L5,7L8,7"
fill="freeze" begin="reverse.begin" />
</path>
<rect width="10" height="10" stroke="none">
<animate dur="2s" id="reverse" attributeName="width" begin="click" />
</rect>
<rect width="10" height="10" stroke="none">
<animate dur="0.001s" id="start" attributeName="width" values="10;0" fill="freeze" begin="click" />
<animate dur="0.001s" attributeName="width" values="0;10" fill="freeze" begin="reverse.begin" />
</rect>
</svg>

After

(image error) Size: 929 B

View File

@ -0,0 +1 @@
<svg id="checkmark-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M4 18l7 10L28 5.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="var(--stroke-width, 4)" /></svg>

After

(image error) Size: 235 B

4
public/images/copy.svg Normal file
View File

@ -0,0 +1,4 @@
<svg viewBox="0 0 256 256" id="copy-icon" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" fill-rule="nonzero"
d="m50 40-0.03 25v126c0 22 17 39 39 39l103 3e-3c-4 10-14 18-25 18h-78c-31 0-57-26-57-57v-126c0-12 8-22 18-25zm147-32c15 0 27 12 27 27v156c0 15-12 27-27 27h-108c-15 0-27-12-27-27v-156c0-15 12-27 27-27zm0 18h-108c-5 0-9 4-9 9v156c0 5 4 9 9 9h108c5 0 9-4 9-9v-156c0-5-4-9-9-9z" />
</svg>

After

(image error) Size: 411 B

View File

@ -0,0 +1,5 @@
<svg viewBox="0 0 256 256" id="download-icon" xmlns="http://www.w3.org/2000/svg" fill="none"
style="stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5rem;stroke:currentColor;">
<path d="m24 128v87h208v-87" />
<path id="arrow" d="m128 48v128l48-48-48 48-48-48"></path>
</svg>

After

(image error) Size: 286 B

View File

@ -0,0 +1,6 @@
<svg viewBox="0 0 256 256" id="error-filled-icon" xmlns="http://www.w3.org/2000/svg">
<path d="m75 0-75 75v106c25 25 50 50 75 75h106l75-75v-106c-25-25-50-50-75-75z" fill="currentColor" />
<path
d="m54 54c-5 5-5 12 0 17l57 57-57 57c-5 5-5 12 0.1 17 5 5 12 5 17 0.1l57-57 57 57c5 5 12 5 17 0 5-5 5-12 0-17l-57-57 57-57c7-8 2-20-9-20-3-0.02-6 1-8 3l-57 57-57-57c-5-5-13-4-17 0z"
style="color:#000000;stroke-linecap:round;stroke-linejoin:round;" />
</svg>

After

(image error) Size: 457 B

4
public/images/error.svg Normal file
View File

@ -0,0 +1,4 @@
<svg viewBox="0 0 256 256" id="error-icon" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path
d="m75 0-75 75v106c25 25 50 50 75 75h106l75-75v-106c-25-25-50-50-75-75zm118 51c11 0.08 16 13 9 20l-57 57 57 57c5 5 5 12 0 17-5 5-12 5-17 0l-57-57-57 57c-5 5-12 5-17-0.1-5-5-5-12-0.1-17l57-57-57-57c-5-5-5-12 0-17 4-4 12-5 17 0l57 57 57-57c2-2 5-3 8-3z" />
</svg>

After

(image error) Size: 369 B

Binary file not shown.

After

(image error) Size: 22 KiB

View File

@ -0,0 +1,47 @@
<svg width="512" height="512" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path d="m137 339c-0.574 0.156-1.01 0.656-1.34 1.11-0.808 4.34-1.35 8.74-1.99 13.1-1.74 12.7-3.42 25.3-4.45 38.1-1.25 16.5-1.5 33.1-2.23 49.6-0.205 3.84-0.862 7.65-1.01 11.5-0.282 4.72 0.182 9.49 1.5 14 2.26 8.39 6.35 16.4 12.6 22.6 5.49 5.5 12.4 9.45 19.7 12 9.71 3.5 19.9 5.65 30.1 6.72 6.85 0.479 13.7 0.383 20.6 0.35 9.88-0.137 19.8-0.326 29.6-1.1 7.7-0.828 15.4-1.9 23-3.12 17-2.7 33.8-6.7 50.3-11.5 1.47-0.397 3.26-0.772 3.94-2.32 0.653-1.25-0.15-2.91-1.52-3.23-1.41-0.381-2.78 0.38-4.18 0.516-10 1.75-20.1 3.12-30.2 4.4-4 0.501-8.05 0.898-12 1.09-12.1 0.614-24.4 0.507-36.5 0.09-6.27-0.232-12.4-0.567-18.7-1.1-1.6-0.15-3.42-0.32-5.01-0.508-5.9-0.618-11.8-1.8-17.2-4.43-5.1-2.47-9.85-6.34-12-11.7-1.9-4.78-1.59-10.5 1.26-14.9 2.25-3.72 5.91-6.52 10.1-7.77 3.8-1.2 7.91-1.42 11.8-0.554 6.44 1.35 12.6 3.57 18.9 5.51 19 6.02 38.1 11.8 57.7 15.2 5 0.838 10 1.69 15 2.24 8.4 0.62 16.8 0.637 25.2 0.629 7.37-0.072 14.8-0.12 22.1-0.782 8.19-1.04 16.3-2.38 24.5-3.88 1.35-0.331 2.84-0.387 4.02-1.19 0.488-0.684 0.926-1.56 0.542-2.4-0.358-1.26-1.81-1.64-2.96-1.87-4.22-0.795-8.6-1.33-12.8-2a326 326 0 0 1-16.4-3.02c-13.4-2.81-26.6-6.55-39.4-11.3-11.6-4.27-23-9.14-34.4-13.9-15.9-6.57-31.8-13-48.4-17.7-12.5-3.53-25.4-5.93-38.4-6.03-9.21 0.06-18.6 1.44-27 5.3-1.1 0.528-2.21 1.07-3.37 1.54-1.28-3.96-1.26-8.24-1.51-12.3-0.564-11.5-0.9-23.1-1.85-34.6-1.02-9.72-2.64-19.4-4.5-29-0.228-0.878-0.266-1.86-0.667-2.66-0.555-0.854-1.7-1.3-2.66-0.886z"/>
<path d="m346 332c4.24 8.69 6.17 18.3 7.09 27.9 0.741 8.28 0.54 16.6 0.454 24.9-0.096 5.57-0.184 11.2-0.372 16.7-0.057 1.66-0.123 3.32-0.287 4.98-3.87-2-7.69-4.1-11.6-5.92-12.1-5.66-24.5-10.6-37.2-14.6-23.7-7.41-48.3-11.7-73-13.3-13.1-0.775-26.2-0.786-39.3 0.232-1.2 0.19-2.67 0.056-3.58 0.977-0.252 0.504-0.968 0.943-0.577 1.54a2.56 2.56 0 0 0 1.73 1.99c2.5 0.887 5.2 0.943 7.8 1.39a596 596 0 0 1 24.2 3.95c8.07 1.5 16.2 3.2 24.3 5.12 19.9 4.76 39.6 10.9 58.3 19.4 7.43 3.42 14.7 7.28 21.9 11.2 8.71 4.74 17.5 9.46 25.3 15.6 6.08 4.79 11.8 10.3 15.8 17 1.45 2.36 2.34 4.98 3.3 7.56 0.502 1.13 0.928 2.56 2.25 2.97l1.94 0.927c0.32-1.51 0.72-3.02 0.636-4.58 0.174-16.8 0.14-33.7 0.244-50.5 0.116-26.1 0.473-52.1 0.609-78.2h-31.2l1.36 2.86zm-157-295c-1.35 0.239-2.31 1.36-3.37 2.15-3.48 2.97-6.78 6.16-10.5 8.88-10.1 7.71-21.7 13.1-33.6 17.2-11.2 3.82-22.6 6.91-34 10.1-11.5 3.24-23.1 6.26-34.4 10.1-5.95 2.03-11.7 4.58-17.1 7.98-11.8 7.3-21.8 17.5-29.5 29-11.4 17.2-18.1 37.2-21.1 57.6-1.35 9.49-1.69 19.1-1.57 28.7 0.094 8.45 0.932 16.9 2.37 25.2l0.564 3.4h20.2c-0.946-3.95-1.86-7.85-2.48-11.9a92.6 92.6 0 0 1-0.657-5.02c-0.587-5.87-0.687-11.7-0.55-17.6 0.272-9.49 1.08-19 3.07-28.3 0.726-3.36 1.57-6.69 2.53-9.99 0.158-0.501 0.409-1.34 0.602-1.97 3.72-12 9.37-23.6 17.5-33.3a82.9 82.9 0 0 1 3.18-3.56 80.7 80.7 0 0 1 9.47-8.51c6.68-5.05 14-9.29 21.7-12.5 7.66-3.18 15.5-5.83 23.3-8.48 7.45-2.47 14.9-4.95 22.2-7.88 9.45-3.79 18.8-7.95 27.7-12.8 10.6-5.84 20.2-13.4 28-22.7 2.87-3.6 5.59-7.34 7.88-11.3 0.596-1.04 1.15-2.29 0.595-3.47-0.151-0.582-0.933-0.685-1.36-1.06l-0.67 0.075z"/>
<path d="m276 4.02c-10.2 0.19-20.3 2.43-29.5 6.83-8.96 4.22-16.9 10.3-24.1 17.1-12.3 11.3-24.6 22.6-37.3 33.4-7.45 6.38-15.1 12.7-22.9 18.5-6.43 4.8-13.1 9.22-20 13.4 6.38 4.03 12 9.17 16 14.7a208 208 0 0 0 9.02-3.44c13.2-5.39 25.9-12.1 38.2-19.4 10.6-6.22 20.9-12.8 31.3-19.3 5.06-3.12 10.3-6.31 15.9-8.62 3.93-1.63 7.89-3.25 12-4.3a95.3 95.3 0 0 1 2.94-0.706 88.2 88.2 0 0 1 4.31-0.838c1.33-0.232 2.46-0.384 3.8-0.569a94.7 94.7 0 0 1 6.67-0.626 68.7 68.7 0 0 1 16.1 0.83 78.6 78.6 0 0 1 8.34 1.8 67.2 67.2 0 0 1 13.6 5.38 92.1 92.1 0 0 1 2.8 1.56c7.06 4.2 13.8 9.17 19.1 15.4 4.72 5.47 8.99 11.3 12.6 17.6 1.64 2.83 3.1 5.76 4.47 8.74a62.7 62.7 0 0 1 15.1-11c2.46-1.15 5-2.18 7.58-3-1.02-2.92-2.11-5.81-3.36-8.64-3.47-7.68-7.96-14.9-12.8-21.8-4.35-6.21-9.1-12.2-14.5-17.5-11.7-11.9-25.4-22.2-40.9-28.7-11-4.61-22.8-7.16-34.7-6.86zm150 105a73.4 73.4 0 0 0-8.55 0.38c0.363 2.12 0.626 4.27 0.73 6.43 0.324 6.65-0.453 13.5-2.18 19.6a52.3 52.3 0 0 1 9.99-1.69c0.427-0.014 1.09-0.06 1.58-0.07 5.47-0.13 11 0.04 16.3 1.78 10.3 3.15 19.3 9.84 25.9 18.2 8.59 10.7 13.8 23.7 16.5 37.1 1.18 5.72 1.33 11.6 1.46 17.4 0.047 6.37-0.038 12.8-0.94 19.1-0.438 2.69-1.13 5.54-1.76 8.29l-0.41 1.77h21.7c0.73-4.46 1.6-8.92 1.74-13.5 0.403-8.91 0.353-17.8-0.083-26.8-0.158-4.18-0.763-8.32-1.57-12.4-2.8-14.8-8.21-29.3-17-41.6-5.92-8.36-13.2-15.9-21.9-21.4-5.71-3.64-11.9-6.51-18.2-8.81-7.46-2.67-15.4-3.86-23.3-3.86z"/>
<g fill="#9a2424">
<path d="m138 341c-0.1-0.153-0.293-0.127-0.428 0.056-0.135 0.184-4.14 27-5.91 45.8-1.83 19.4-2.19 51.8-2.83 57.1-1.3 10.8-1.16 15.4 0.66 22 3.75 13.6 11.1 23.1 22.8 29.5 8.57 4.7 23.4 8.74 37.4 10.2 8.38 0.878 42.2 0.294 52.3-0.902 26.9-3.2 46.8-7.26 72.7-14.8 0.604-0.177 1.1-0.592 1.1-0.922s-0.494-0.457-1.1-0.283c-3.15 0.907-25.6 4.2-37.2 5.44-19.1 2.06-62.1 0.868-75.9-2.1-15.1-3.26-24.5-12.1-24.6-23.1-0.014-4.19 1.05-7.48 3.56-11 3.47-4.87 8.68-7.73 15.4-8.48 4.9-0.54 9.27 0.36 22.8 4.7 34.6 11.1 51.3 15.2 74.5 18.4 8.21 1.13 40.6 1.12 49.6-0.02 8.56-1.08 26.3-4.06 26.6-4.48 0.451-0.613-0.319-0.78-10.4-2.26-19.4-2.84-38.2-7.34-54.5-13.1-10.4-3.68-15.7-5.74-41.5-16.5-37.2-15.5-58.7-21.6-79.6-22.7-11.9-0.648-23.3 1.29-31.6 5.36-1.91 0.941-3.82 1.71-4.23 1.71-0.563 0-2.01-2.41-2.5-10.1-0.473-7.48-1.24-31.7-2.26-40.7-1.55-13.6-4.6-28.7-4.7-28.9z"/>
<path d="m348 331c3.86 7.79 6.43 18 7.41 30.1 0.439 5.42 0.524 12.9 0.291 25.9-0.34 19.1-0.535 21.9-1.5 21.9-0.32 0-2.44-1.02-4.7-2.26-11.6-6.34-30.4-14.2-45.7-19-31.7-9.99-67.6-14.8-101-13.6-7.05 0.255-12.8 0.69-12.8 0.964s1.48 0.7 3.3 0.946c45.7 6.16 83 16 113 29.7 9.08 4.19 28.8 14.7 36.6 19.6 15.1 9.4 25.6 20.2 28.9 30.1 0.75 2.19 1.53 3.99 1.73 3.99 0.201 4e-3 0.177-28.8 0.367-64.1l0.546-64.3zm-158-293c-0.137-0.187-2.73 1.92-5.76 4.7-8.5 7.76-17.7 13.6-29 18.6-10.9 4.8-20 7.67-51.7 16.4-30.8 8.49-37.3 10.9-47.6 17.6-24.9 16.2-42 46.2-47.7 83.6-1.73 11.3-2.14 28.5-0.989 40.8 0.468 4.97 1.18 9.82 2.01 14.6h16c-0.983-4.08-1.8-8.22-2.34-12.4-1.76-13.7-0.818-34.4 2.2-48.4 6.25-29.1 19.1-49.4 39.8-62.8 10.7-6.96 18.3-10.1 47-19.6 13.3-4.42 27.7-10.4 39.8-16.7 11.3-5.85 21.1-13.3 28.9-22.3 3.8-4.3 9.93-13.4 9.47-14z"/>
<path d="m278 6c-19.8 0-36.2 6.88-52.6 22-42 38.8-60.5 54-81.2 66.5 4.98 3.39 9.41 7.46 12.9 11.8 11-3.91 21.9-8.75 33.3-14.8 9.06-4.83 22.2-12.7 37.3-22.2 16.9-10.7 19.9-12.3 30.5-16.4 9.99-3.8 25.3-5.73 36-4.53 13.8 1.55 24.4 5.44 35.5 13.1 8.17 5.6 13 10.3 19.5 18.9 4.93 6.55 8.6 12.6 11.9 19.7a63.1 63.1 0 0 1 13.6-9.47 66.4 66.4 0 0 1 5.72-2.34c-1.22-3.5-2.53-6.82-3.9-9.77-5.03-10.8-14.9-25.4-23.1-34.1-23.2-24.9-49.6-38.3-75.5-38.3zm147 105a74.7 74.7 0 0 0-7.64 0.388c0.19 1.47 0.33 2.95 0.402 4.43a62.9 62.9 0 0 1-1.61 17.3c4.14-0.975 8.31-1.46 12.8-1.49 5.14-0.027 9.06 0.325 12.2 1.1 23.6 5.8 41.2 28 47 59.3 1.49 8.04 1.6 26.8 0.205 35.5-0.417 2.6-1.04 5.18-1.63 7.77h17.5c0.344-2.14 0.732-4.26 1.02-6.44 1-7.65 0.87-30.7-0.223-38-2.84-19.1-9.02-35-18.7-48-8.09-10.9-16.7-18.3-28-23.8-11.9-5.79-21.1-8.02-33.3-8.03z"/>
</g>
<path d="m450 149c-38.3 0.555-78.3 16.5-110 44.6-12.3 10.8-23 22.9-31.8 36h106c15.8-7.37 32.4-10.5 47.1-8.44 19.6 2.75 37.6-10.9 40.4-30.4 2.75-19.6-10.9-37.6-30.4-40.4a137 137 0 0 0-21-1.29z" fill="#e95353"/>
<path d="m330 205 0.015-0.012c38.1-33.3 87.3-49.5 131-43.3 19.6 2.75 33.2 20.8 30.4 40.4a35.6 35.6 0 0 1-3.92 12c6.77-5.49 11.6-13.5 12.9-22.8 2.75-19.6-10.9-37.6-30.4-40.4-44.2-6.22-93.4 9.97-131 43.3a189 189 0 0 0-25 26.5 190 190 0 0 1 15.7-15.4c0.11-0.096 0.222-0.187 0.332-0.284z" fill="#202020" opacity=".15"/>
<path d="m455 147c-15.1-0.295-30.3 1.82-44.9 5.87-1.02 0.282-2.02 0.583-3.03 0.883l-3.59 6.22c16.8-5.58 34.5-8.57 52.2-8.11 5.39 0.147 10.8 0.582 16.1 1.41 7.09 1.2 13.7 4.78 18.6 10.1 4.9 5.23 8.08 12.1 8.82 19.2 0.842 7.8-1.16 15.9-5.62 22.4-4.66 6.86-12 11.9-20 13.7-4.16 0.983-8.5 1.09-12.7 0.457-7.17-0.949-14.5-0.639-21.6 0.484l-1.27 0.182c-0.474-7.01-0.918-14-1.41-21-0.178-1.37-1.68-2.36-3.01-1.96-1.2 0.286-1.99 1.58-1.78 2.78l1.41 21.2c-4.19 1.04-8.34 2.26-12.4 3.79-3.68 1.36-7.26 2.98-10.8 4.69-3.34-6.6-6.67-13.2-10-19.8-0.669-1.21-2.43-1.57-3.52-0.71-1.01 0.71-1.27 2.2-0.625 3.23 3.04 6.02 6.08 12 9.12 18h15.1a103 103 0 0 1 5.19-1.94c10.2-3.47 21.1-5.34 31.8-4.5 2.76 0.204 5.5 0.754 8.28 0.765 8.08 0.17 16.2-2.33 22.8-7.02a38.7 38.7 0 0 0 3.94-3.21 38.6 38.6 0 0 0 8.66-12c0.345-0.734 0.708-1.61 0.97-2.29 3.36-8.71 3.4-18.7 5e-3 -27.4-3.46-8.99-10.4-16.6-19.1-20.7-3.95-1.9-8.24-3.06-12.6-3.56a138 138 0 0 0-15.1-1.11zm-85 81.4c-0.674 0.042-1.33 0.347-1.75 0.903-0.178 0.213-0.294 0.46-0.38 0.717h4.79c-0.274-0.311-0.545-0.624-0.819-0.936-0.48-0.501-1.17-0.724-1.84-0.683z"/>
<path d="m58 149a136 136 0 0 0-16.8 1.29c-19.6 2.75-33.2 20.8-30.4 40.4s20.8 33.2 40.4 30.4c14.9-2.09 31.8 1.2 47.8 8.82 17.3-0.037 57-0.155 100-0.256-7.28-11.4-16.1-23.5-26.4-36.1-33.3-29.2-75.1-45.2-115-44.6z" fill="#e95353"/>
<path d="m182 205-0.015-0.012c-38.1-33.3-87.3-49.5-131-43.3-19.6 2.75-33.2 20.8-30.4 40.4a35.6 35.6 0 0 0 3.93 12c-6.78-5.49-11.6-13.5-12.9-22.8-2.75-19.6 10.9-37.6 30.4-40.4 44.2-6.22 93.4 9.97 131 43.3a189 189 0 0 1 25 26.5 190 190 0 0 0-15.7-15.4c-0.109-0.096-0.222-0.187-0.332-0.284z" fill="#202020" opacity=".15"/>
<path d="m57.3 147c-5.04 0.098-10.1 0.463-15.1 1.11-4.36 0.494-8.64 1.65-12.6 3.56-8.71 4.14-15.7 11.7-19.1 20.7-3.4 8.71-3.36 18.7 6e-3 27.4a38.6 38.6 0 0 0 0.969 2.29 38.6 38.6 0 0 0 8.66 12 38.7 38.7 0 0 0 3.94 3.21c6.58 4.7 14.7 7.2 22.8 7.03 2.78-0.01 5.51-0.561 8.28-0.765 10.8-0.84 21.6 1.03 31.8 4.5 2.01 0.689 3.99 1.46 5.95 2.27 1.41 0.017 10-0.018 14.2-0.024 3.09-6.12 6.18-12.2 9.28-18.4 0.644-1.04 0.382-2.52-0.625-3.23-1.09-0.86-2.85-0.501-3.52 0.709-3.35 6.59-6.68 13.2-10 19.8-3.54-1.7-7.12-3.32-10.8-4.69-4.04-1.53-8.19-2.75-12.4-3.79 0.468-7.08 0.94-14.2 1.41-21.2 0.212-1.21-0.578-2.5-1.78-2.78-1.33-0.398-2.83 0.585-3.01 1.96-0.491 7.01-0.935 14-1.41 21l-1.27-0.181c-7.13-1.12-14.4-1.43-21.6-0.485-4.22 0.636-8.56 0.526-12.7-0.457-8.08-1.85-15.4-6.85-20-13.7-4.46-6.47-6.46-14.6-5.62-22.4 0.74-7.14 3.92-14 8.82-19.2 4.88-5.28 11.5-8.86 18.6-10.1 5.33-0.824 10.7-1.26 16.1-1.41 17.7-0.46 35.4 2.54 52.2 8.11l-3.59-6.22c-1.01-0.3-2.02-0.601-3.03-0.883-14.6-4.05-29.7-6.16-44.9-5.87zm85 81.4c-0.675-0.04-1.36 0.183-1.84 0.684-0.346 0.394-0.69 0.79-1.04 1.18 1.33-5e-3 3.7-7e-3 5.07-0.012-0.077-0.344-0.206-0.674-0.44-0.953-0.415-0.556-1.08-0.861-1.75-0.902z"/>
<path d="m107 88.5c-9.16 5.29-12.7 16.2-13.2 27.1s1.86 22.2 6.6 30.4l56.3 97.5 87.9 14.2-84.4-146c-4.75-8.23-13.4-16-23.1-20.9-9.68-4.54-20.7-7.31-30.1-2.07z" fill="#fca311"/>
<path d="m131 110a4.2 4.2 0 0 0-5.14 2.99 4.2 4.2 0 0 0 2.96 5.13 4.2 4.2 0 0 0 5.16-2.95 4.2 4.2 0 0 0-2.98-5.17zm12.5 56.6a4.2 4.2 0 0 0-5.14 2.99 4.2 4.2 0 0 0 8.12 2.18 4.2 4.2 0 0 0-2.98-5.17zm21.5 46.4a4.2 4.2 0 0 0-2.18 8.12 4.2 4.2 0 1 0 2.18-8.12zm-23.5-93.2c-7.1-0.123-9.25 4.11-13.6 9.26a19.2 19.2 0 0 0-4.25 15.8c0.413 6.8 2.56 11.5 7.16 14.8 7.1 0.123 9.25-4.11 13.6-9.26a19.2 19.2 0 0 0 4.25-15.8c-0.413-6.8-2.56-11.5-7.16-14.8z" fill="#fec872"/>
<path d="m144 133a19.2 19.2 0 0 1-4.25 15.9c-3.22 4.72-6.06 7.44-11.1 8.2 0.74 0.556 1.76 2.37 2.69 2.45 7.34-0.04 10-4.63 13.6-9.26a19.2 19.2 0 0 0 4.25-15.9c-0.318-6.13-2.12-11.3-6.37-14.1-0.704-0.969-2.62-0.929-2.27-0.268 2.46 3.86 2.63 8.52 3.45 13z" fill="#ca7d02"/>
<path d="m405 88.5c9.16 5.29 12.7 16.2 13.2 27.1s-1.86 22.2-6.61 30.4l-56.3 97.5-87.9 14.2 84.4-146c4.75-8.23 13.4-16 23.1-20.9 9.68-4.54 20.7-7.31 30.1-2.07z" fill="#fca311"/>
<path d="m381 110a4.2 4.2 0 0 1 5.14 2.99 4.2 4.2 0 0 1-8.12 2.18 4.2 4.2 0 0 1 2.98-5.17zm-12.5 56.6a4.2 4.2 0 0 1 5.14 2.99 4.2 4.2 0 0 1-2.96 5.13 4.2 4.2 0 0 1-5.16-2.95 4.2 4.2 0 0 1 2.98-5.17zm2-46.8c7.1-0.124 9.25 4.11 13.6 9.26a19.2 19.2 0 0 1 4.25 15.8c-0.413 6.8-2.56 11.5-7.16 14.8-7.1 0.124-9.25-4.11-13.6-9.26a19.2 19.2 0 0 1-4.25-15.8c0.413-6.8 2.56-11.5 7.16-14.8z" fill="#fec872"/>
<path d="m368 133a19.2 19.2 0 0 0 4.25 15.9c3.22 4.72 6.06 7.44 11.1 8.21-0.74 0.555-1.76 2.37-2.69 2.45-7.34-0.04-10-4.63-13.6-9.26a19.2 19.2 0 0 1-4.25-15.9c0.317-6.13 2.12-11.3 6.37-14.1 0.704-0.969 2.62-0.928 2.27-0.268-2.46 3.86-2.63 8.52-3.45 13zm-26.4 44.5a19.2 19.2 0 0 0 4.25 15.9c3.22 4.72 6.06 7.44 11.1 8.2-0.74 0.556-1.76 2.37-2.69 2.45-7.34-0.04-10-4.63-13.6-9.26a19.2 19.2 0 0 1-4.25-15.9c0.317-6.13 2.12-11.3 6.37-14.1 0.703-0.969 2.61-0.929 2.27-0.268-2.46 3.86-2.64 8.52-3.45 13zm-23.8 41.2a19.2 19.2 0 0 0 4.25 15.9c3.22 4.72 6.06 7.44 11.1 8.2-0.74 0.556-1.76 2.37-2.69 2.45-7.34-0.041-10-4.63-13.6-9.26a19.2 19.2 0 0 1-4.25-15.9c0.318-6.13 2.12-11.3 6.37-14.1 0.703-0.969 2.61-0.928 2.27-0.268-2.46 3.86-2.63 8.52-3.45 13zm-26.3 47.6a19.2 19.2 0 0 0 4.25 15.9c3.22 4.72 6.06 7.44 11.1 8.21-0.74 0.555-1.76 2.37-2.69 2.45-7.34-0.04-10-4.63-13.6-9.26a19.2 19.2 0 0 1-4.25-15.9c0.317-6.13 2.12-11.3 6.37-14.1 0.704-0.969 2.62-0.928 2.27-0.268-2.46 3.86-2.63 8.52-3.45 13z" fill="#ca7d02"/>
<path d="m151 202c11.6 13.3 37 10.2 56.8-7.05 19.9-17.2 26.6-42 15-55.3-11.5-13.3-37-10.2-56.8 7.05-19.9 17.2-26.6 42-15 55.3" fill="#ce6f3d"/>
<path d="m223 148c-4.31-2.68-7.67-7.52-12.4-8.79-4.87-1.3-10.2 1.27-15.1 1.53-4.98 0.241-10.5-1.74-15.2 0.12-4.53 1.82-7.16 7.08-11 10.5-3.83 3.4-9.35 5.39-11.7 9.68-2.4 4.38-1.07 10.2-1.91 15.1-0.82 4.86-3.99 9.84-3.28 14.8 0.707 4.84 5.13 8.75 7.28 13.3" fill="#8dc440"/>
<path d="m165 198c-9.35-7.19-7.45-17-3.56-20.4a9.61 9.61 0 0 1 7.03-2.4c-0.233-5.08 1.74-10.2 5.83-13.8 0.145-0.129 0.29-0.225 0.426-0.346a16.5 16.5 0 0 1 5.4-10.2 16.6 16.6 0 0 1 19.5-1.83c0.185-0.177 0.362-0.362 0.546-0.53 6.31-5.63 16-5.06 21.6 1.27" fill="#935223"/>
<path d="m187 199 27.9-24.8c-6.96-7.85-18.9-8.66-26.6-1.82-7.69 6.85-8.27 18.8-1.3 26.6" fill="#ea1f26"/>
<path d="m201 178 27.9-24.8c-6.99-7.85-18.9-8.65-26.6-1.82-7.68 6.85-8.27 18.8-1.3 26.6m-36.9 32.8 27.9-24.8c-6.97-7.85-18.9-8.66-26.6-1.82s-8.29 18.8-1.32 26.6" fill="#ea1f26"/>
<path d="m150 195s65.4-38.2 111 16.8c45.6 55-1.85 100-1.85 100s-3.37 3.79-7.17 0.418c-3.8-3.38-102-112-102-112s-4.69-2.93-0.314-5.18" fill="#f2985a"/>
<path d="m216 139s-25.7 43.8-3.03 73.3c25.2 32.7 55.4 62.6 113 42 0 0 4.68-2.27-0.45-7.98-5.14-5.71-104-108-104-108s-2.3-3.88-5.98 0.345" fill="#fcbe7b"/>
<path d="m224 179c2.5 2.81 6.82 3.04 9.66 0.515 2.84-2.52 3.12-6.85 0.627-9.66-2.51-2.81-6.84-3.05-9.67-0.515-2.85 2.52-3.12 6.84-0.619 9.66m-2.19 24.3c2.19 2.45 6.21 2.45 8.97 0 2.77-2.47 3.24-6.46 1.05-8.91-2.18-2.47-6.21-2.47-8.97 0-2.77 2.45-3.23 6.45-1.05 8.91" fill="#f39a59"/>
<path d="m270 198 2.87-2.75c-20.7-21.6-38.1-38.6-38.9-37.8-0.788 0.755 15.3 18.9 36 40.6" fill="#f7d7b6"/>
<path d="m283 265 13 8.5 75.8-47.1c-3.57-3.23-6.49-7.47-9.32-10.8z" fill="#ca7d02"/>
<path d="m257 151-11.4 78.7c4.18-2e-3 6.69-0.023 11-0.023h82.6l23.3-14.5c-12.2-14.4-26.1-26.7-41.5-36.8-17.9-11.7-37.9-20.4-59.4-25.8-1.49-0.37-3-0.967-4.49-1.68z" fill="#fca311"/>
<path d="m261 151-21.5 123c-0.766 5.06 0.101 11.3 3.35 16.4 3.98-27.7 8.03-55.4 12-83 3.23-22.3 23.4-35 44-26.2 9.38 4.04 18.2 8.46 25.8 13.4 11.1 7.24 21.3 15.7 30.8 25.2l7.32-4.56c-12.2-14.4-26.1-26.7-41.5-36.7-21.4-14.2-37.9-21.5-60.3-27.3z" fill="#db8d11"/>
<path d="m355 220c2.69 2.27 7.66 7.78 9.84 10.5l6.81-4.23c-2.87-3.64-5.86-7.93-9.32-10.8z" fill="#ba7302"/>
<path d="m248 135c-1.3 4.62-0.777 8.88 2.41 11.9 3.19 3.07 7.33 5.32 11.3 6.3 21.6 5.37 41.5 14.1 59.4 25.8 17.9 11.7 33.9 26.5 47.4 44.1 5.57 6.46 14.6 13.3 23 6.98 16.3-16.8 6.88-22.8-0.942-33.8-11.2-12.6-28.2-32.6-50.1-47-21.9-14.3-46.7-24.3-73.6-29.3-11.8-1.67-16.3 6.55-18.9 14.9z" fill="#e05e10"/>
<path d="m247 220-5.89 40.5c10.8 7.17 24.7 4.94 32.5-6.18 6.9-10.5 3.92-24.8-6.63-31.7-6.02-3.74-13.1-4.66-20-2.65zm7.72-53.1-3.59 33.1 1.13 1.05c0.033 0.032 0.065 0.063 0.098 0.092 1.02 0.867 1.72 2.76 3.61 3.82 0.571-1.01 1.24-0.97 0.018 0.012 10.4 6.16 22.6 3.71 29.3-6.53 6.9-10.5 4.64-24.3-5.91-31.2a2.94 2.94 0 0 0-0.037-0.024l-0.018-0.012c-6.2-3.91-15.7-4.84-23.3-0.999-0.025 0.018-0.06 0.03-0.084 0.048zm78.5 39.6c-10.5-6.9-22.9-6.78-29.8 3.77-7.55 14.3-1.99 27.6 11.9 34.4l30-18.6c0.856-8.8-5.4-15.3-12.1-19.5z" fill="#c00f0c"/>
<path d="m247 220-5.89 40.5c1.69 1.1 3.69 2 5.32 2.71l6.42-44.2c-2.16 0.182-3.78 0.543-5.86 1zm7.88-14.2c3.38-17.5 17.4-28.6 33.6-26.9-1.59-4.64-4.65-8.81-9.06-11.7a2.94 2.94 0 0 0-0.037-0.024l-0.019-0.012c-7.69-4.36-16.3-4.87-24.6-0.255-1.68 11.6-3.36 23.1-5.05 34.7 1.63 1.64 3.67 3.08 5.21 4.22z" fill="#a80f0c"/>
<path d="m397 205c-15.4-22.7-34.4-41.4-56.3-55.7-21.9-14.3-46.7-24.3-73.6-29.3-4.84-0.552-8.18-2.44-13.1 2.27-6.76 6.36-8.67 15-3.15 25.2 4.54-13.3 13.4-15.6 21.4-14.1 26.9 5.03 51.7 15 73.6 29.3 21.2 13.9 39.7 31.9 54.8 53.6 1.5-5.35-1.41-7.28-3.67-11.2z" fill="#c75410"/>
<path d="m86.3 230c0-0.213-0.274 4.48-0.274 9.63v9.29l-79.9 0.241 15.2 21.3c8.37 11.8 15.2 21.6 15.3 21.9 0.039 0.338-6.84 10.2-15.3 22l-15.3 21.4 46.7 0.144c25.7 0.048 46.8 0 46.8-0.096s-0.117-3.9-0.43-8.43c-0.352-4.58-0.625-8.72-0.625-9.2 0-0.963 1.56-0.963 158-0.963 129 0 158 0.096 158 0.626 0 0.337-0.274 4.38-0.587 8.96-0.352 4.62-0.547 8.43-0.469 8.52 0.078 0.097 21.1 0.145 46.8 0.097l46.6-0.146-15.3-21.4c-8.41-11.8-15.2-21.7-15.1-22 0.117-0.289 6.92-10 15.2-21.6 8.25-11.5 15.1-21.2 15.1-21.4 0.078-0.337-14.2-0.481-39.6-0.481h-39.7v-18.8h-170c-93.5 0-170 0.563-170 0.337z" fill="#191919"/>
<g fill="#e6e6e6">
<path d="m133 252q-4.37 0.138-6.72 3.33-2.29 3.19-2.29 11 0 2.57 0.485 3.61 0.486 0.97 0.486 1.11-3.74 0-5.62-1.53-1.8-1.6-1.8-5.2 0-4.92 2.43-8.94 2.43-4.09 7.7-6.59 5.34-2.5 13.5-2.5 1.66 0 4.44 0.347 4.99 0.485 7.07 0.485 3.67 0 6.24-0.832-0.208 0.624-0.763 2.77-0.555 2.08-2.01 3.6-1.39 1.46-3.81 1.94-4.09 0-9.71-1.32l-2.91 13.8h10.1l-1.11 5.13h-10.1l-5.62 26.1h-9.98zm25.9 46.6q-5.13 0-8.11-2.63-2.98-2.64-2.98-8.32 0-4.72 1.94-10.5 1.94-5.75 6.24-9.91 4.3-4.23 10.8-4.23 8.88 0 8.88 11.1v0.07q0.208 0.068 0.763 0.068 2.29 0 5.27-1.18 2.98-1.25 5.41-2.98l0.624 1.87q-2.01 2.15-5.27 3.68-3.19 1.46-7 2.08-0.555 6.31-2.84 11-2.29 4.72-5.89 7.28t-7.84 2.56zm2.77-6.24q1.66 0 3.33-1.87 1.66-1.94 2.91-5.2 1.25-3.33 1.8-7.35-1.87-0.416-1.87-2.91 0-2.84 2.15-3.74-0.139-2.29-0.694-3.12-0.554-0.901-1.94-0.901-2.29 0-4.44 3.33-2.15 3.33-3.47 7.97t-1.32 8.18q0 3.33 0.762 4.51 0.763 1.11 2.77 1.11z"/>
<path d="m189 298q-5.13 0-8.11-2.63-2.98-2.64-2.98-8.32 0-4.72 1.94-10.5 1.94-5.75 6.24-9.91 4.3-4.23 10.8-4.23 8.87 0 8.87 11.1v0.07q0.208 0.068 0.763 0.068 2.29 0 5.27-1.18 2.98-1.25 5.41-2.98l0.624 1.87q-2.01 2.15-5.27 3.68-3.19 1.46-7 2.08-0.555 6.31-2.84 11-2.29 4.72-5.89 7.28-3.6 2.56-7.83 2.56zm2.77-6.24q1.66 0 3.33-1.87 1.66-1.94 2.91-5.2 1.25-3.33 1.8-7.35-1.87-0.416-1.87-2.91 0-2.84 2.15-3.74-0.139-2.29-0.693-3.12-0.555-0.901-1.94-0.901-2.29 0-4.44 3.33-2.15 3.33-3.47 7.97t-1.32 8.18q0 3.33 0.763 4.51 0.762 1.11 2.77 1.11z"/>
<path d="m218 298q-3.95 0-6.59-2.7-2.63-2.7-2.63-8.46 0-5.13 2.01-10.7 2.08-5.69 6.1-9.57 4.09-3.95 9.71-3.95 2.84 0 4.23 0.97t1.39 2.57v0.277l3.4-15.9 10.3-1.39-7.97 37.4q-0.278 1.04-0.278 2.01 0 2.77 2.84 2.77 1.25 0 2.22-0.416-0.278 3.47-2.5 5.34-2.15 1.8-5.13 1.8-2.77 0-4.72-1.39-1.87-1.46-2.5-4.37-4.16 5.76-9.84 5.76zm4.51-6.72q1.52 0 3.05-1.32 1.6-1.32 2.36-3.67l0.277-1.11 3.4-15.9q-0.624-2.43-2.84-2.43-2.77 0-4.99 3.26-2.22 3.19-3.47 7.76-1.25 4.51-1.25 7.97t0.97 4.44q1.04 0.97 2.5 0.97zm42.4-41.3q-5.27 1.73-8.18 5.76-2.84 3.95-2.84 9.84 0 2.64 0.485 3.6 0.485 0.971 0.485 1.18-7.42 0-7.42-6.31 0-4.3 3.26-8.6 3.33-4.37 8.46-7.07 5.2-2.77 10.3-2.77 2.57 0 5.27 0.97l-1.6 36.5 15.3-36.5h9.98l-7.28 51h-9.98l4.44-31.1-13 31.1h-9.5l1.39-31.3-11.6 31.3h-5.55zm42.4 47.9q-5.13 0-8.11-2.63-2.98-2.64-2.98-8.32 0-4.72 1.94-10.5t6.24-9.91q4.3-4.23 10.8-4.23 8.88 0 8.88 11.1v0.07q0.208 0.068 0.762 0.068 2.29 0 5.27-1.18 2.98-1.25 5.41-2.98l0.624 1.87q-2.01 2.15-5.27 3.68-3.19 1.46-7 2.08-0.555 6.31-2.84 11-2.29 4.72-5.89 7.28t-7.84 2.56zm2.77-6.24q1.66 0 3.33-1.87 1.66-1.94 2.91-5.2 1.25-3.33 1.8-7.35-1.87-0.416-1.87-2.91 0-2.84 2.15-3.74-0.14-2.29-0.694-3.12-0.555-0.901-1.94-0.901-2.29 0-4.44 3.33-2.15 3.33-3.47 7.97t-1.32 8.18q0 3.33 0.762 4.51 0.763 1.11 2.77 1.11z"/>
<path d="m338 298q-5.13 0-8.11-2.63-2.98-2.64-2.98-8.32 0-4.72 1.94-10.5 1.94-5.75 6.24-9.91 4.3-4.23 10.8-4.23 8.88 0 8.88 11.1v0.07q0.208 0.068 0.763 0.068 2.29 0 5.27-1.18 2.98-1.25 5.41-2.98l0.624 1.87q-2.01 2.15-5.27 3.68-3.19 1.46-7 2.08-0.555 6.31-2.84 11-2.29 4.72-5.89 7.28t-7.84 2.56zm2.77-6.24q1.66 0 3.33-1.87 1.66-1.94 2.91-5.2 1.25-3.33 1.8-7.35-1.87-0.416-1.87-2.91 0-2.84 2.15-3.74-0.14-2.29-0.694-3.12-0.554-0.901-1.94-0.901-2.29 0-4.44 3.33-2.15 3.33-3.47 7.97t-1.32 8.18q0 3.33 0.762 4.51 0.763 1.11 2.77 1.11z"/>
<path d="m366 298q-3.95 0-6.59-2.7t-2.64-8.46q0-5.13 2.01-10.7 2.08-5.69 6.1-9.57 4.09-3.95 9.71-3.95 2.84 0 4.23 0.97t1.39 2.57v0.277l3.4-15.9 10.3-1.39-7.97 37.4q-0.277 1.04-0.277 2.01 0 2.77 2.84 2.77 1.25 0 2.22-0.416-0.277 3.47-2.5 5.34-2.15 1.8-5.13 1.8-2.77 0-4.72-1.39-1.87-1.46-2.5-4.37-4.16 5.76-9.84 5.76zm4.51-6.72q1.53 0 3.05-1.32 1.6-1.32 2.36-3.67l0.278-1.11 3.4-15.9q-0.624-2.43-2.84-2.43-2.77 0-4.99 3.26-2.22 3.19-3.47 7.76-1.25 4.51-1.25 7.97t0.97 4.44q1.04 0.97 2.5 0.97z"/>
</g>
</svg>

After

(image error) Size: 21 KiB

Binary file not shown.

After

(image error) Size: 124 KiB

Binary file not shown.

After

(image error) Size: 112 KiB

6
public/images/info.svg Normal file
View File

@ -0,0 +1,6 @@
<svg viewBox="0 0 256 256" id="info-icon" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path d="m128 96c-9 2e-4 -16 7-16 15v82c2e-4 8 7 15 16 15 9-2e-4 16-7 16-15v-82c-2e-4 -8-7-15-16-15z" />
<path d="m144 64a16 16 0 0 1-16 16 16 16 0 0 1-16-16 16 16 0 0 1 16-16 16 16 0 0 1 16 16z" />
<path
d="m128 8c-66 0-120 54-120 120s54 120 120 120 120-54 120-120-54-120-120-120zm0 24c53 0 96 43 96 96 0 53-43 96-96 96-53 0-96-43-96-96 0-53 43-96 96-96z" />
</svg>

After

(image error) Size: 469 B

Binary file not shown.

After

(image error) Size: 1.2 MiB

BIN
public/images/server.webp Normal file

Binary file not shown.

After

(image error) Size: 95 KiB

Binary file not shown.

After

(image error) Size: 38 KiB

View File

@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 310 310">
<path
fill="#009036"
d="m24.06,214.52L205.58,16.58c-15.56-5.8-32.39-9-49.96-9.08C75.6,7.15,10.45,71.74,10.1,151.76c-.1,22.46,4.92,43.75,13.96,62.76"
></path>
<path
fill="#009036"
d="m166.65,296.85L247.31,40.67c12.8,10.58,23.99,23.55,32.84,38.73,40.31,69.13,16.96,157.85-52.17,198.16-19.4,11.32-40.35,17.61-61.33,19.29"
></path>
<path
fill="#acacac"
d="m175.95,116.09c-3.51-2.03-8-.82-10.03,2.69l-26.21,45.4c-2.03,3.51-.82,8,2.69,10.03,1.23.71,2.59,1.03,3.92.98,2.45-.08,4.79-1.39,6.11-3.66l26.21-45.4c2.03-3.51.82-8-2.69-10.03"
></path>
<path
fill="#e2001a"
d="m214.58,48.86c-2.64-1.5-6-.57-7.5,2.07l-15.66,27.59c-1.5,2.64-.57,6,2.07,7.5.92.52,1.92.75,2.9.71,1.85-.06,3.62-1.06,4.6-2.78l15.66-27.59c1.5-2.64.57-6-2.07-7.5"
></path>
<path
fill="#009036"
d="m65.68,288.74c-2.53,4.39-1.03,10,3.36,12.53,1.54.89,3.24,1.28,4.9,1.23,3.06-.11,5.99-1.74,7.63-4.58l47.18-81.72c2.53-4.39,1.03-10-3.36-12.53-4.39-2.53-10-1.03-12.53,3.36l-47.18,81.72Z"
></path>
</svg>

After

(image error) Size: 1.0 KiB

BIN
public/images/topdown.jpg Normal file

Binary file not shown.

After

(image error) Size: 1.7 MiB

4
public/images/trash.svg Normal file
View File

@ -0,0 +1,4 @@
<svg viewBox="0 0 256 256" id="trash-icon" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor"
d="m112 13c-19 0-34 15-34 34v7h-36c-10 0-18 8-18 18s8 18 18 18h1l6 117c1 20 18 36 38 36h79c20 0 37-16 38-36l6-117h1c10 0 18-8 18-18s-8-18-18-18h-36v-7c0-19-15-34-34-34zm0 32h32c1 0 2 1 2 2v7h-36v-7c0-1 1-2 2-2zm-37 45h106l-6 115c-0.2 4-3 7-7 7h-79c-4 0-7-3-7-7zm53 9c-5 0-9 4-9 9v81c0 5 4 9 9 9s9-4 9-9v-81c0-5-4-9-9-9zm-30 9e-3c-5 0.2-9 4-9 9l3 81c0.2 5 4 9 9 9 0.1 0 0.2-4e-3 0.3-9e-3 5-0.2 9-4 9-9l-3-81c-0.2-5-5-9-9-9zm59 0c-5-0.1-9 4-9 9l-3 81c-0.2 5 4 9 9 9 0.1 5e-3 0.2 9e-3 0.3 9e-3 5 0 9-4 9-9l3-81c0.2-5-4-9-9-9z" />
</svg>

After

(image error) Size: 641 B

5
public/images/upload.svg Normal file
View File

@ -0,0 +1,5 @@
<svg viewBox="0 0 256 256" id="upload-icon" xmlns="http://www.w3.org/2000/svg" fill="none"
style="stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5rem;stroke:currentColor;">
<path d="m24 128v87h208v-87" />
<path id="arrow" d="m128 176-8e-4 -128-48 48 48-48 48 48"></path>
</svg>

After

(image error) Size: 291 B

56
scripts/after-build.mjs Normal file
View File

@ -0,0 +1,56 @@
import { readFile, writeFile } from 'fs/promises';
import glob from 'glob';
const padNums = num => String(num).padStart(2, '0');
const getTime = () => {
const currDate = new Date();
return [currDate.getHours(), currDate.getMinutes(), currDate.getSeconds()].map(padNums).join(':');
};
const log = text => console.log(getTime(), '[after-build]', text);
log('Start!');
const astroCidRegex = /data-astro-cid-[a-zA-Z0-9]{7,10}/g;
glob('./dist/**/*.{html,css}', async (err, files) => {
if (err) return console.error(err);
/** @type {{ file: string, content: string }[]} */
const fileContents = await Promise.all(files.map(async file => ({ file, content: await readFile(file, { encoding: 'utf-8' }) })));
/** @type {Set<string>} */
const astroCids = new Set();
fileContents.forEach(({ content }) => [...content.matchAll(astroCidRegex)].forEach(i => astroCids.add(i[0])));
const astroCidsMap = setToMap(astroCids);
fileContents.forEach(({ file, content }, index) => {
astroCidsMap.forEach((val, key) => (content = content.replaceAll(key, val)));
writeFile(file, content).then(index === fileContents.length - 1 ? () => log('Done!') : () => {});
});
});
/** @param {number} number */
function generateStringFromNumber(number) {
let result = '';
const baseCharCode = 'a'.charCodeAt(0) - 1;
while (number > 0) {
const remainder = (number - 1) % 52;
result = String.fromCharCode(baseCharCode + remainder + (remainder < 26 ? 1 : -57)) + result;
number = Math.floor((number - 1) / 52);
}
return result;
}
/** @param {Set<string>} set */
function setToMap(set) {
/** @type {Map<string, string>} */
const resultMap = new Map();
[...set].forEach((val, i) => resultMap.set(val, 'z-' + generateStringFromNumber(i + 1)));
return resultMap;
}

View File

@ -0,0 +1,25 @@
---
import { getLangFromUrl, useTranslations } from '@i18n/utils';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
interface Props {
street?: string;
zip?: string;
country?: string;
}
const {
street = 'Sallgaster Straße 6', //
zip = '01994 Annahütte',
country = translate('ui.country'),
} = Astro.props;
---
<address>
<slot />
<p set:html={street} />
<p set:html={zip} />
<p set:html={country} />
</address>

View File

@ -0,0 +1,40 @@
---
import { type HTMLAttributes } from 'astro/types';
interface Props extends HTMLAttributes<'div'> {}
---
<div class:list={['carousel', 'flex', 'w-full', Astro.props.class]} {...Astro.props}>
<slot />
</div>
<style lang="scss">
@use '@styles/helpers' as helpers;
.carousel {
padding-block: 0.75rem;
overflow-x: auto;
gap: 0.5rem;
align-items: center;
scroll-snap-type: inline mandatory;
scroll-padding-inline: 1rem;
> :global(*) {
flex: 1 0 var(--slide-size, 40%);
aspect-ratio: 1;
flex-flow: column nowrap;
display: flex;
justify-content: center;
align-items: center;
scroll-snap-align: end;
}
}
@include helpers.breakpoint-media(small) {
.carousel > :global(*) {
flex: 1 0 var(--small-slide-size, 60%);
}
}
</style>

View File

@ -0,0 +1,70 @@
---
import { type HTMLAttributes } from 'astro/types';
import { getLangFromUrl, useTranslations } from '@i18n/utils';
interface Props extends HTMLAttributes<'div'> {}
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
---
<div
id="cookie-banner"
class:list={['none', 'bg-second-950', 'fs-350', 'w-full', 'text-center', 'p-3', 'overflow-hidden', Astro.props.class]}
{...Astro.props}
>
{translate('ui.cookieBanner')}
</div>
<script>
{
const storageItem = 'cookie-banner';
if (!localStorage.getItem(storageItem)) {
document.querySelector('#cookie-banner')?.classList.add('show');
localStorage.setItem(storageItem, 'true');
}
}
</script>
<style lang="scss">
@use '@styles/helpers' as helpers;
@use '@styles/variables' as vars;
$visible-time: 4s;
div.show {
display: unset;
position: fixed;
bottom: 0;
left: 50%;
translate: -50% 0;
max-width: vars.$section-width;
border-radius: 0.5rem;
animation: hideAnimation 0s linear $visible-time forwards;
@keyframes hideAnimation {
100% {
max-height: 0;
padding: 0;
}
}
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
background-color: var(--bg-highlight);
transition: width $visible-time linear;
height: 0.5rem;
width: 0;
animation: growAnimation $visible-time linear;
}
@keyframes growAnimation {
100% {
width: 100%;
}
}
}
</style>

View File

@ -0,0 +1,83 @@
---
import { type HTMLAttributes } from 'astro/types';
interface Props extends HTMLAttributes<'section'> {
show?: boolean;
canClose?: boolean;
fill?: boolean;
idSuffix?: string;
title?: string;
}
const {
idSuffix = Math.random().toString(36).slice(2), //
title,
show = false,
canClose = true,
fill = true,
...rest
} = Astro.props;
---
<dialog open={show} class:list={['min-w-full', 'min-h-full', { fill }, rest.class]} {...rest}>
<div class="relative max-w-full m-auto">
{
canClose && (
<form method="dialog">
<button class="bg-second fw-700 px-3 py-1">X</button>
</form>
)
}
{title && <h3 id={'dialog-heading-' + idSuffix}>{title}</h3>}
<section class="p-0">
<slot />
</section>
</div>
</dialog>
<style lang="scss">
@use '@styles/variables' as vars;
$dialog-padding: 2rem;
dialog[open] {
background-color: transparent;
border: none;
outline: none;
display: flex;
&::backdrop {
background-color: currentColor;
opacity: 0.5;
filter: invert(0.05);
}
> div {
padding: $dialog-padding;
border-radius: 4px;
// width: calc(100vw - 1rem);
max-width: min(calc(vars.$section-width + 2.5rem), calc(100vw - 2rem));
display: flex;
flex-direction: column;
gap: calc($dialog-padding / 2);
max-height: 85vh;
overflow: auto;
}
&.fill > div {
background-color: var(--bg-third);
outline: 2px solid white;
}
}
form {
position: absolute;
right: calc($dialog-padding / 2);
top: calc($dialog-padding / 2);
}
</style>

View File

@ -0,0 +1,11 @@
---
interface Props {
email?: string;
}
export const defaultEmail = 'zokki.softwareschmiede@gmail.com';
const { email = defaultEmail } = Astro.props;
---
<a href={'mailto:' + email} set:html={email.replace('@', '<wbr>@')} />

View File

@ -0,0 +1,63 @@
---
import * as packageJson from '@/package.json';
import Email from '@components/Email.astro';
import Mobile from '@components/Mobile.astro';
import { getHrefFromLink, getLangFromUrl, useTranslations, type Language, type translations } from '@i18n/utils';
import { type HTMLAttributes } from 'astro/types';
interface Props extends HTMLAttributes<'footer'> {}
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
const getHref = (link: keyof (typeof translations)['link'][Language]): string => getHrefFromLink(lang)(link);
---
<footer class:list={['content-grid', Astro.props.class]} {...Astro.props}>
<div>
<div id="contact">
<strong>{translate('ui.contact')}</strong>
<p>{translate('ui.name')}: {packageJson.author}</p>
<p>{translate('ui.telefon')}: <Mobile /></p>
<p>{translate('ui.email')}: <Email /></p>
</div>
<div id="links">
<a href={getHref('imprint')}>{translate('footer.imprint')}</a>
<a href={getHref('privacy')}>{translate('footer.privacy')}</a>
<a href={getHref('copyright')}>{translate('footer.copyright')}</a>
<a href={getHref('disclaimer')}>{translate('footer.disclaimer')}</a>
</div>
</div>
<slot />
<p id="copyright" class="!vfs-100 text-center mt-2 mx-auto" set:html={translate('ui.copyright')} />
</footer>
<style lang="scss">
@use '@styles/helpers' as helpers;
footer {
background-color: var(--bg-second);
padding: 1rem;
> div {
display: flex;
justify-content: space-around;
}
#contact,
#links {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
p,
a {
padding-block: 0.25rem;
font-size: var(--vfs-200);
}
}
</style>

266
src/components/Header.astro Normal file
View File

@ -0,0 +1,266 @@
---
import ThemeSwitcher from '@components/ThemeSwitcher.astro';
import hamburgerIcon from '@public/images/burger-menu.svg?raw';
import { defaultLang, getLangFromUrl, useTranslations } from '@i18n/utils';
import LangSwitcher from '@components/LangSwitcher.astro';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
const langPrefix = lang === defaultLang ? '' : '/' + lang;
---
<header class="px-4 s:px-2">
<nav>
<a id="logo" href={'/' + (lang === defaultLang ? '' : lang + '/')} class="fw-900 vfs-500 es:vfs-450">
<img src="/favicon.svg" alt="S" />
<span id="title" class="ees:none">oftwareschmiede</span>
</a>
<div>
<LangSwitcher />
<ThemeSwitcher />
<div>
<label for="nav-toggle"><Fragment set:html={hamburgerIcon} /></label>
<input type="checkbox" id="nav-toggle" class="focusable" hidden aria-hidden />
<ul class="container">
<li><a href={langPrefix + translate('link.services.href')} set:html={translate('link.services.text')} /></li>
<li><a href={langPrefix + translate('link.references.href')} set:html={translate('link.references.text')} /></li>
<li><a href={langPrefix + translate('link.blog.href')} set:html={translate('link.blog.text')} /></li>
<li><a href={langPrefix + translate('link.fileTransfer.href')} set:html={translate('link.fileTransfer.text')} /></li>
</ul>
</div>
</div>
</nav>
</header>
<script>
{
const addedEvents = [] as ((...args: any) => unknown)[];
const init = () => {
document.querySelector('header')?.classList.remove('loading');
const navToggle = document.querySelector<HTMLInputElement>('#nav-toggle')!;
navToggle.addEventListener('change', () =>
document.querySelector<SVGAnimateElement>(navToggle.checked ? '#start' : '#reverse')?.beginElement(),
);
const blur = (ev: Event) => {
if (navToggle.checked && !navToggle.parentElement!.contains(ev.target as any)) {
navToggle.checked = false;
navToggle.dispatchEvent(new Event('change'));
}
};
addedEvents.forEach(ev => {
document.removeEventListener('click', ev);
document.removeEventListener('touchend', ev);
});
addedEvents.length = 0;
addedEvents.push(blur);
document.addEventListener('click', blur);
document.addEventListener('touchend', blur);
};
init();
document.addEventListener('astro:after-swap', init);
document.addEventListener('astro:before-preparation', () => {
document.querySelector('header')?.classList.add('loading');
});
}
</script>
<style lang="scss">
@use '@styles/variables' as vars;
@use '@styles/helpers' as helpers;
header {
box-shadow: 0 0.25rem 1rem 0 rgba(0, 0, 0, 0.5);
background-color: var(--bg-second);
position: sticky;
width: 100%;
z-index: 9999;
top: 0;
#logo {
padding-block: 0.5rem;
display: flex;
align-items: center;
text-decoration: none;
}
img {
height: 2rem;
aspect-ratio: 1;
}
nav {
height: 100%;
display: grid;
justify-content: space-between;
align-items: center;
grid-auto-flow: column;
> div {
display: flex;
align-items: center;
gap: 0.5rem;
}
}
&::after {
content: '';
position: absolute;
left: 0;
width: 100%;
background-size: 200% 200%;
background-image: repeating-linear-gradient(
-45deg,
var(--bg-highlight) 0%,
var(--bg-third) 15%,
var(--bg-fourth) 30%,
var(--bg-highlight) 50%
);
}
&.loading::after {
height: 0.25rem;
animation: loading 5s infinite linear;
}
@keyframes loading {
0% {
background-position: 0% 50%;
}
100% {
background-position: 200% 50%;
}
}
}
.container {
display: grid;
grid-auto-flow: column;
padding: 0;
list-style: none;
a {
--font-size: var(--fs-300);
font-size: var(--font-size);
text-decoration: none;
display: block;
padding: 1rem 1vw;
position: relative;
&::before,
&::after {
content: '';
position: absolute;
left: 50%;
width: 75%;
height: 2px;
opacity: 0;
background: var(--bg-text);
transform: translate(-50%, 10px);
transition:
transform 0.3s,
opacity 0.3s;
}
&:hover:after,
&:focus-visible:after {
opacity: 1;
transform: translate(-50%, calc(var(--font-size) + var(--font-size) / 3));
}
&:hover:before,
&:focus-visible:before {
opacity: 1;
transform: translateX(-50%);
}
&:hover,
&:focus-visible {
background-color: var(--bg-invert-500);
}
}
}
#nav-toggle {
visibility: hidden;
}
[for='nav-toggle'] {
display: none;
flex-direction: column;
justify-content: space-between;
width: 3rem;
height: 3rem;
border-radius: 50%;
&:hover,
&:focus-visible {
background-color: var(--bg-primary-500);
}
}
@include helpers.breakpoint-media(extra-small) {
header #title {
letter-spacing: -1px;
}
}
@include helpers.breakpoint-media(large) {
#nav-toggle {
visibility: unset;
}
[for='nav-toggle'] {
display: flex;
&:has(+ #nav-toggle:focus-visible) {
outline: 2px solid var(--bg-highlight-600);
}
}
#nav-toggle:not(:checked) ~ .container a {
visibility: hidden;
}
.container {
position: absolute;
background-color: var(--bg-third);
top: 100%;
left: 0;
width: 100vw;
grid-auto-flow: row;
scale: 1 0;
transition: scale 250ms;
transform-origin: top left;
a {
--font-size: var(--vfs-300);
text-align: center;
padding: 0.5rem 1rem;
font-size: var(--font-size);
border-block: 1px solid var(--bg-primary);
&::before,
&::after {
width: 20%;
}
}
}
#nav-toggle:checked + .container {
scale: 1 1;
}
}
</style>

View File

@ -0,0 +1,20 @@
---
import { type ImageMetadata } from 'astro';
import { Image, Picture, type LocalImageProps } from 'astro:assets';
type Props = Omit<LocalImageProps, 'src' | 'alt'> & {
readonly value: { readonly image?: ImageMetadata } | { readonly picture?: ImageMetadata } | Record<string, unknown>;
};
const { value, ...rest } = Astro.props as any;
---
<>
{
'image' in value ? (
<Image src={value.image.src} alt={value.image.alt} {...rest} />
) : 'picture' in value ? (
<Picture src={value.picture.src} alt={value.picture.alt} {...rest} />
) : undefined
}
</>

View File

@ -0,0 +1,153 @@
---
import { translateHref } from '@/astro.config';
import { getLangFromUrl, languages, type Language } from '@i18n/utils';
import { getKeys } from '@shared/helpers';
const currLang = getLangFromUrl(Astro.url);
const flags = {
de: '🇩🇪',
en: '🇺🇸',
} as const satisfies Record<Language, string>;
const pathname = Astro.url.pathname;
const getNewLangHref = (newLang: Language): string => translateHref(pathname, currLang)(newLang);
---
<div id="lang-switcher-wrapper" class="relative">
<input id="lang-switcher" type="checkbox" class="focusable" hidden aria-hidden />
<label for="lang-switcher" class="fs-350 s:fs-300">
<span role="img" aria-label={languages[currLang]}>{flags[currLang]}</span>
</label>
<ul id="langs-wrapper" class="absolute bg-third p-0">
{
getKeys(languages)
.filter(lang => lang !== currLang)
.map(lang => (
<li>
<a href={getNewLangHref(lang)} class="fs-350 s:fs-300">
<span role="img" aria-label={languages[lang]}>
{flags[lang]}
</span>
</a>
</li>
))
}
</ul>
</div>
<script>
{
const addedEvents = [] as ((...args: any) => unknown)[];
const init = () => {
const langSwitcher = document.querySelector<HTMLInputElement>('#lang-switcher')!;
langSwitcher.labels?.[0]?.addEventListener('click', ev => {
ev.preventDefault();
langSwitcher.checked = !langSwitcher.checked;
});
const blur = (ev: Event) => {
if (langSwitcher.checked && !langSwitcher.parentElement!.contains(ev.target as any)) {
langSwitcher.checked = false;
}
};
addedEvents.forEach(ev => {
document.removeEventListener('click', ev);
document.removeEventListener('touchend', ev);
});
addedEvents.length = 0;
addedEvents.push(blur);
document.addEventListener('click', blur);
document.addEventListener('touchend', blur);
};
init();
document.addEventListener('astro:after-swap', init);
}
</script>
<style lang="scss">
@use '@styles/variables' as vars;
@use '@styles/helpers' as helpers;
#lang-switcher-wrapper {
border-radius: 0.75rem;
&:has(#lang-switcher:checked) {
background-color: var(--bg-third);
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
#lang-switcher:focus-visible + label span {
outline: 2px solid var(--bg-highlight-600);
border-radius: 0.25rem;
}
label {
display: block;
padding: 0.15rem 0.5rem;
user-select: none;
&:hover {
border-radius: 50%;
background-color: var(--bg-invert-500);
}
}
}
#langs-wrapper {
transition: scale 250ms;
transform-origin: top left;
list-style: none;
> li {
display: flex;
padding: 0.75rem 0.5rem;
}
}
#lang-switcher:not(:checked) ~ #langs-wrapper {
scale: 1 0;
a {
visibility: hidden;
}
}
#lang-switcher:checked ~ #langs-wrapper {
display: grid;
grid-auto-flow: row;
list-style: none;
scale: 1 1;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
li:hover {
border-radius: 50%;
background-color: var(--bg-invert-500);
}
a,
span {
line-height: 0.75;
text-decoration: none;
}
}
@include helpers.breakpoint-media(small) {
#lang-switcher-wrapper label {
padding: 0.075rem 0.25rem;
}
#langs-wrapper > li {
padding: 0.5rem 0.25rem;
}
}
</style>

View File

@ -0,0 +1,240 @@
---
import Dialog from '@components/Dialog.astro';
interface Props {
animation?: (typeof animations)[number];
}
const animations = ['ring', 'spinner', 'roller'] as const;
const { animation = animations[Math.floor(Math.random() * animations.length)] } = Astro.props;
---
<Dialog id="loading" fill={false} canClose={false}>
<div id={'loading-' + animation} class="m-auto">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</Dialog>
<style lang="scss">
$width: 160px;
$height: 160px;
#loading-ring {
display: inline-block;
position: relative;
width: $width;
height: $height;
div {
box-sizing: border-box;
display: block;
position: absolute;
width: 128px;
height: 128px;
margin: 16px;
border: 16px solid transparent;
border-radius: 50%;
animation: ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-top-color: var(--color);
&:nth-child(1n) {
animation-delay: -0.45s;
}
&:nth-child(2n) {
animation-delay: -0.3s;
}
&:nth-child(3n) {
animation-delay: -0.15s;
}
}
}
#loading-spinner {
display: inline-block;
position: relative;
width: $width;
height: $height;
div {
transform-origin: 80px 80px;
animation: spinner 1.2s linear infinite;
&::after {
content: '';
display: block;
position: absolute;
top: 6px;
left: 74px;
width: 12px;
height: 36px;
border-radius: 25%;
background: #fff;
}
&:nth-child(1n) {
transform: rotate(0deg);
animation-delay: -1.1s;
}
&:nth-child(2n) {
transform: rotate(30deg);
animation-delay: -1s;
}
&:nth-child(3n) {
transform: rotate(60deg);
animation-delay: -0.9s;
}
&:nth-child(4n) {
transform: rotate(90deg);
animation-delay: -0.8s;
}
&:nth-child(5n) {
transform: rotate(120deg);
animation-delay: -0.7s;
}
&:nth-child(6n) {
transform: rotate(150deg);
animation-delay: -0.6s;
}
&:nth-child(7n) {
transform: rotate(180deg);
animation-delay: -0.5s;
}
&:nth-child(8n) {
transform: rotate(210deg);
animation-delay: -0.4s;
}
&:nth-child(9n) {
transform: rotate(240deg);
animation-delay: -0.3s;
}
&:nth-child(10n) {
transform: rotate(270deg);
animation-delay: -0.2s;
}
&:nth-child(11n) {
transform: rotate(300deg);
animation-delay: -0.1s;
}
&:nth-child(12n) {
transform: rotate(330deg);
animation-delay: 0s;
}
}
}
#loading-roller {
display: inline-block;
position: relative;
width: $width;
height: $height;
div {
animation: roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
transform-origin: 80px 80px;
&::after {
content: '';
display: block;
position: absolute;
width: 14px;
height: 14px;
border-radius: 50%;
background: #fff;
margin: -4px 0 0 -4px;
}
&:nth-child(1n) {
animation-delay: -0.036s;
}
&:nth-child(1n):after {
top: 125px;
left: 125px;
}
&:nth-child(2n) {
animation-delay: -0.072s;
}
&:nth-child(2n):after {
top: 135px;
left: 111px;
}
&:nth-child(3n) {
animation-delay: -0.108s;
}
&:nth-child(3n):after {
top: 141px;
left: 95px;
}
&:nth-child(4n) {
animation-delay: -0.144s;
}
&:nth-child(4n):after {
top: 143px;
left: 79px;
}
&:nth-child(5n) {
animation-delay: -0.18s;
}
&:nth-child(5n):after {
top: 141px;
left: 63px;
}
&:nth-child(6n) {
animation-delay: -0.216s;
}
&:nth-child(6n):after {
top: 135px;
left: 47px;
}
&:nth-child(7n) {
animation-delay: -0.252s;
}
&:nth-child(7n):after {
top: 125px;
left: 33px;
}
&:nth-child(8n) {
animation-delay: -0.288s;
}
&:nth-child(8n):after {
top: 111px;
left: 23px;
}
}
}
@keyframes ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes spinner {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes roller {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>

View File

@ -0,0 +1,11 @@
---
interface Props {
mobile?: string;
}
export const defaultNumber = '+49 1522 4786034';
const { mobile = defaultNumber } = Astro.props;
---
<a href={'tel:' + mobile.replace(' ', '')}>{mobile}</a>

View File

@ -0,0 +1,69 @@
---
import Address from '@components/Address.astro';
import Email, { defaultEmail } from '@components/Email.astro';
import Mobile, { defaultNumber } from '@components/Mobile.astro';
import { getAsArray, getEntries, type MaybeArray } from '@shared/helpers';
import type { HTMLAttributes } from 'astro/types';
interface Props extends HTMLAttributes<'p'> {
content: MaybeArray<string, true>;
}
const replacer = {
'\n': 'br',
'#address': Address,
[defaultEmail]: Email,
[defaultNumber]: Mobile,
} as const;
const mdLinkRegex = /\[([^\]]+)\]\(([^)]+)\)/gm;
const sort = <TVal extends (readonly [number, ...any])[]>(arr: TVal): TVal => arr.toSorted((a, b) => a[0] - b[0]) as TVal;
const { content, ...rest } = Astro.props;
---
<>
{
getAsArray(content).map(val => (
<p {...rest}>
{(() => {
const replace = (toReplace: string): any => {
const startIndecies = getEntries(replacer).map(([key, v]) => [toReplace.indexOf(key), key, v] as const);
const mdLinks = [...toReplace.matchAll(mdLinkRegex)];
if (!mdLinks.length && startIndecies.every(([i]) => i < 0)) return toReplace;
const sorted = sort(startIndecies);
const smallest = sorted.find(([index]) => index > -1);
if (smallest?.[0] !== undefined && smallest[0] < (mdLinks[0]?.index ?? Number.MAX_SAFE_INTEGER)) {
const Element = smallest[2];
return (
<>
<Fragment set:html={toReplace.substring(0, smallest[0])} />
<Element />
<Fragment set:html={replace(toReplace.substring(smallest[0] + smallest[1].length))} />
</>
);
} else if (mdLinks[0]) {
return (
<>
<Fragment set:html={toReplace.substring(0, mdLinks[0].index)} />
<a href={mdLinks[0][2]}>
<strong set:html={mdLinks[0][1]} />
</a>
<Fragment set:html={replace(toReplace.substring(mdLinks[0].index! + mdLinks[0][0]!.length))} />
</>
);
} else {
throw new Error('No Replacer and no MDLink found!');
}
};
return <Fragment set:html={replace(val)} />;
})()}
</p>
))
}
</>

View File

@ -0,0 +1,94 @@
---
import { getLangFromUrl, useTranslations } from '@i18n/utils';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
---
<div id="switcher-wrapper" class="bg-primary-600 flex h-8 s:h-6" transition:persist>
<input id="theme-switcher" type="checkbox" class="focusable" hidden />
<label id="theme-switcher-label" for="theme-switcher" class="relative" aria-label={translate('ui.ariaLabel.themeChange')}>
<svg fill="currentColor" class="absolute" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<path id="sun-and-moon"></path>
</svg>
</label>
</div>
<script>
{
const THEME_KEY = 'THEME';
const DARK = 'dark';
const LIGHT = 'light';
const setTheme = (isDark: boolean): void => {
document.querySelector<HTMLInputElement>('#theme-switcher')?.toggleAttribute('checked', !isDark);
localStorage.setItem(THEME_KEY, isDark ? DARK : LIGHT);
};
const localTheme = localStorage.getItem(THEME_KEY);
if (localTheme) {
setTheme(localTheme !== LIGHT);
} else {
setTheme(!window.matchMedia(`(prefers-color-scheme: ${LIGHT})`).matches);
}
document.querySelector<HTMLInputElement>('#theme-switcher')!.onchange = ev => setTheme(!(ev.target as HTMLInputElement).checked);
}
</script>
<style lang="scss">
@use '@styles/variables' as vars;
#switcher-wrapper {
aspect-ratio: 2/1;
outline: 2px solid black;
border-radius: 1rem;
&:hover,
&:focus-visible,
&:focus-within {
outline: 2px solid var(--bg-highlight-600);
filter: opacity(0.75);
}
#theme-switcher-label {
width: 100%;
height: 100%;
padding: 0.25rem;
}
svg {
height: 90%;
transition: right 250ms ease-in-out;
right: 5%;
top: 50%;
transform: translateY(-50%);
#sun-and-moon {
rotate: 360deg;
transition: rotate 500ms;
transform-origin: center;
d: path(
'm74 1-4 8-8 4 8 4 4 8 4-8 8-4-8-4zm-25 30c-27-3e-4 -49 21-49 48-3e-4 26 22 48 49 48 17-0.05 30-7 38-19 1-1 2-3-2-2-6 1-14-0.3-18-1-22-4-31-15-31-36 0.03-18 14-31 26-35 1-0.3 0.7-1-0.8-1-5-0.9-10-1-13-1zm58 3-7 13-13 7 13 7 7 13 7-13 13-7-13-7z'
);
}
}
// light
#theme-switcher:checked + label svg {
right: 45%;
#sun-and-moon {
rotate: 180deg;
color: rgb(255, 186, 38);
d: path(
'm61 4c-4 8-12 23-12 23s-17-5-25-8c-4-1-6 0.2-5 5 3 8 8 25 8 25s-15 8-23 12c-4 2-4 5 0 7 8 4 24 12 24 12s-5 16-8 24c-1 4 1 6 5 5 8-2 25-8 25-8s8 15 12 23c2 3 5 3 7 0 4-7 11-22 11-22s17 5 25 8c3 1 6-1 5-5-3-8-8-25-8-25s15-8 23-12c3-2 3-6 0.2-7-8-4-23-12-23-12s6-17 8-25c1-4-1-6-5-5-8 3-25 8-25 8s-8-16-12-23c-3-5-5-4-7 0zm3 36c13 0 24 11 24 24 0 13-11 24-24 24s-24-11-24-24c0-13 11-24 24-24z'
);
}
}
}
</style>

View File

@ -0,0 +1,11 @@
---
import { type HTMLAttributes } from 'astro/types';
interface Props extends HTMLAttributes<'svg'> {
svg: string;
}
const { svg, ...rest } = Astro.props;
---
<svg {...rest}><use href={svg.startsWith('#') ? svg : '#' + svg}></use></svg>

2
src/env.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

View File

@ -0,0 +1,16 @@
import { type Translations } from '@i18n/utils';
export default {
de: {
imprint: 'Impressum',
privacy: 'Datenschutzerklärung',
copyright: 'Urheberrechtshinweis',
disclaimer: 'Haftungsausschluss',
},
en: {
imprint: 'Imprint',
privacy: 'Privacy policy',
copyright: 'Copyright notice',
disclaimer: 'Disclaimer',
},
} as const satisfies Translations;

View File

@ -0,0 +1,13 @@
import { type Translations } from '@i18n/utils';
export default {
de: {
description:
'Ich programmiere für Sie alles was Sie benötigen, egal ob Website, Desktop-Anwendung, API oder was auch immer für Sie wichtig ist.',
ogImageAlt: "Logo von Zokki's Softwareschmiede",
},
en: {
description: "I program everything you need, whether it's a website, desktop application, API or whatever is important to you.",
ogImageAlt: "Logo of Zokki's Softwareschmiede",
},
} as const satisfies Translations;

54
src/i18n/link.ts Normal file
View File

@ -0,0 +1,54 @@
import type { Translations } from '@i18n/utils';
export default {
de: {
home: '/',
fileTransfer: {
text: 'Dateiübertragung',
href: '/dateiübertragung',
},
services: {
text: 'Dienstleistungen',
href: '/dienstleistungen',
},
references: {
text: 'Referenzen',
href: '/referenzen',
},
blog: {
text: 'Blog',
href: '/blog',
},
privacy: '/datenschutz',
disclaimer: '/haftungsausschluss',
imprint: '/impressum',
copyright: '/urheberrechtshinweis',
},
en: {
home: '/en',
fileTransfer: {
text: 'File Transfer',
href: '/file-transfer',
},
services: {
text: 'Services',
href: '/services',
},
references: {
text: 'References',
href: '/references',
},
blog: {
text: 'Blog',
href: '/blog',
},
privacy: '/privacy',
disclaimer: '/disclaimer',
imprint: '/imprint',
copyright: '/copyright',
},
} as const satisfies Translations;

View File

@ -0,0 +1,24 @@
import { type Translations } from '@i18n/utils';
export default {
de: {
title: 'Blog',
comingSoon: {
title: '🚧 Baustelle 🚧',
content: [
'Willkommen auf meiner Blog-Seite! Ich arbeite daran, ansprechende und informative Inhalte für Sie zu erstellen. Es gibt zwar noch keine Blog-Beiträge, aber freuen Sie sich auf spannende Updates. Ich arbeite hart daran, Ihnen wertvolle Einblicke, Tipps und Geschichten zu bieten. In der Zwischenzeit können Sie gerne den Rest meiner Website erkunden und bald wieder vorbeischauen, um die neuesten Blog-Beiträge zu lesen.',
'Vielen Dank für Ihre Geduld und Ihr Verständnis!',
],
},
},
en: {
title: 'Blog',
comingSoon: {
title: '🚧 Under Construction 🚧',
content: [
"Welcome to my Blog page! I'm busy crafting engaging and informative content to share with you. While there are no blog posts available just yet, stay tuned for exciting updates. I'm working hard to bring you valuable insights, tips, and stories. In the meantime, feel free to explore the rest of my site, and check back soon for the latest blog posts.",
'Thank you for your patience and understanding!',
],
},
},
} as const satisfies Translations;

View File

@ -0,0 +1,58 @@
// @ts-expect-error
import { defaultEmail } from '@components/Email.astro';
import { type Translations } from '@i18n/utils';
export default {
de: {
title: 'Urheber&shy;rechts&shy;hinweis',
ownership: {
content:
'Alle Inhalte dieser Website, einschließlich Texte, Bilder, Grafiken, Videos und sonstige Medien, sind urheberrechtlich geschützt und gehören dem Inhaber dieser Website, sofern nicht anders angegeben.',
},
permissions: {
title: 'Nutzungs&shy;erlaubnis',
content:
'Sofern nicht ausdrücklich anders angegeben, ist die Nutzung, Vervielfältigung, Verbreitung oder Veröffentlichung der Inhalte dieser Website ohne vorherige schriftliche Zustimmung des Inhabers nur unter Berücksichtigung der [AGLPv3 Lizenz](https://www.gnu.org/licenses/agpl-3.0.en.html) erlaubt.',
},
liability: {
title: 'Haftung für Inhalte',
content:
'Der Inhaber dieser Website übernimmt keine Haftung oder Gewährleistung für die Richtigkeit, Vollständigkeit oder Aktualität der bereitgestellten Inhalte. Jegliche Nutzung der Inhalte erfolgt auf eigene Gefahr.',
},
externalLinks: {
title: 'Externe Links',
content:
'Diese Website kann Links zu externen Websites enthalten, für deren Inhalte der Inhaber keine Verantwortung übernimmt. Für den Inhalt der verlinkten Seiten sind ausschließlich deren Betreiber verantwortlich.',
},
contact: {
title: 'Kontakt',
content: `Bei Fragen oder Anfragen bezüglich des Urheberrechtshinweises schicken Sie mir bitte eine Nachricht an ${defaultEmail} mit dem Betreff "Urheberrechtshinweis".`,
},
},
en: {
title: 'Copyright Notice',
ownership: {
content:
'All content on this website, including texts, images, graphics, videos, and other media, is protected by copyright and belongs to the owner of this website, unless otherwise indicated.',
},
permissions: {
title: 'Permission to Use',
content:
'Unless expressly stated otherwise, the use, reproduction, distribution, or publication of the content on this website without prior written consent of the owner is only permitted in accordance with the [AGPLv3 License](https://www.gnu.org/licenses/agpl-3.0.en.html).',
},
liability: {
title: 'Liability for Content',
content:
'The owner of this website assumes no liability or warranty for the accuracy, completeness, or timeliness of the provided content. Any use of the content is at your own risk.',
},
externalLinks: {
title: 'External Links',
content:
'This website may contain links to external websites, for whose content the owner assumes no responsibility. The operators of the linked pages are solely responsible for their content.',
},
contact: {
title: 'Contact',
content: `For questions or inquiries regarding the copyright notice, please send me a message to ${defaultEmail} with the subject "Copyright Notice".`,
},
},
} as const satisfies Translations;

View File

@ -0,0 +1,60 @@
// @ts-expect-error
import { defaultEmail } from '@components/Email.astro';
import { type Translations } from '@i18n/utils';
export default {
de: {
title: 'Haftungs&shy;ausschluss',
general: {
title: 'Allgemeiner Hinweis',
content:
'Die Informationen auf dieser Website dienen allgemeinen Informationszwecken und stellen keine rechtliche, finanzielle oder professionelle Beratung dar. Der Inhaber dieser Website übernimmt keine Gewähr für die Richtigkeit, Vollständigkeit oder Aktualität der bereitgestellten Informationen.',
},
liabilityForContent: {
title: 'Haftung für Inhalte',
content:
'Der Inhaber dieser Website übernimmt keine Haftung für Schäden oder Verluste, die durch die Nutzung oder Nichtnutzung der Informationen auf dieser Website entstehen. Die Nutzung der Inhalte erfolgt auf eigenes Risiko.',
},
liabilityForLinks: {
title: 'Haftung für Links',
content:
'Diese Website kann Links zu externen Websites enthalten, für deren Inhalte der Inhaber keine Verantwortung übernimmt. Für den Inhalt der verlinkten Seiten sind ausschließlich deren Betreiber verantwortlich.',
},
changes: {
title: 'Änderungen',
content:
'Der Inhaber dieser Website behält sich das Recht vor, den Inhalt dieser Website jederzeit zu ändern, zu erweitern oder zu löschen. Es besteht keine Verpflichtung, die Informationen auf dieser Website aktuell zu halten.',
},
contact: {
title: 'Kontakt',
content: `Bei Fragen oder Anfragen bezüglich des Haftungsausschlusses schicken Sie mir bitte eine Nachricht an ${defaultEmail} mit dem Betreff "Haftungsausschluss".`,
},
},
en: {
title: 'Disclaimer',
general: {
title: 'General Notice',
content:
'The information on this website is for general informational purposes only and does not constitute legal, financial, or professional advice. The owner of this website makes no guarantee for the accuracy, completeness, or timeliness of the provided information.',
},
liabilityForContent: {
title: 'Liability for Content',
content:
'The owner of this website assumes no liability for damages or losses arising from the use or non-use of the information on this website. The use of the content is at your own risk.',
},
liabilityForLinks: {
title: 'Liability for Links',
content:
'This website may contain links to external websites, for whose content the owner assumes no responsibility. The operators of the linked pages are solely responsible for their content.',
},
changes: {
title: 'Changes',
content:
'The owner of this website reserves the right to change, expand, or delete the content of this website at any time. There is no obligation to keep the information on this website up to date.',
},
contact: {
title: 'Contact',
content: `For questions or inquiries regarding the disclaimer, please send me a message to ${defaultEmail} with the subject "Disclaimer."`,
},
},
} as const satisfies Translations;

View File

@ -0,0 +1,89 @@
import { type Translations } from '@i18n/utils';
export default {
de: {
title: 'Datei&shy;übertragung - Hoch- und Herunter&shy;laden von Dateien',
password: 'Passwort',
noscript: {
title: 'Kein Javascript',
message:
'Es sieht so aus, als ob JavaScript in Ihrem Browser nicht aktiviert ist. Trotzdem sollten die meisten Funktionen funktionieren, wenn auch nicht zu 100 Prozent.',
uploadMessage:
'Die ID ist der Teil nach dem Doppelpunkt ohne die Anführungsstriche und ist nach dem Hochladen der Datei hier zu sehen.',
infosMessage:
'Da kein Javascript aktiviert ist, sehen sie hier die unbearbeiteten Infos der Datei. Zudem können sie die Datei auch nicht löschen.',
},
upload: {
title: 'Hochladen',
select: 'Auswählen oder Drag and Drop',
name: 'Name',
size: 'Größe',
action: 'Aktion',
message: [
'Nach dem Hochladen müssen sie die URL kopieren. Dafür muss nach dem Hochladen auf \'<svg style="width: 1em; height: 1em;"><use href="#copy-icon"></use></svg>\' geklickt werden.',
'Kleine Dateien (bis 1Gib) werden nach 24Stunden und große Dateien (1Gib bis 16Gib) werden nach 7Tagen automatisch gelöscht.',
],
},
download: {
title: 'Herunterladen',
id: 'ID/Url',
message:
'Alternativ können sie auch die URL bzw. {{URL}}{ID} ({ID} durch die Id der Datei ersetzten) im Browser als URL direkt benutzen.',
},
infos: {
title: 'Informationen',
id: 'ID/Url',
message:
'Alternativ können sie auch die URL bzw. {{URL}}{ID} ({ID} durch die Id der Datei ersetzten) im Browser als URL direkt benutzen.',
dialog: {
title: 'Dateiinfo',
name: 'Name',
age: 'Alter',
type: 'Typ',
size: 'Größe',
delete: 'Löschen',
},
},
},
en: {
title: 'File Transfer - Upload and Download of Files',
password: 'Password',
noscript: {
title: 'No Javascript',
message:
'It seems that JavaScript is not enabled in your browser. However, most functions should still work, although not 100 percent.',
uploadMessage: 'The ID is the part after the colon without the quotes and can be seen here after uploading the file.',
infosMessage:
'Since JavaScript is not enabled, you see the raw information of the file here. Additionally, you cannot delete the file.',
},
upload: {
title: 'Upload',
select: 'Select or Drag and Drop',
name: 'Name',
size: 'Size',
action: 'Action',
message: [
'After the upload you need to copy the URL. To do this, simply click on \'<svg style="width: 1em; height: 1em;"><use href="#copy-icon"></use></svg>\' after uploading.',
'Small files (up to 1Gib) are automatically deleted after 24 hours and large files (1Gib to 16Gib) after 7 days.',
],
},
download: {
title: 'Download',
id: 'ID/Url',
message: "Alternatively, you can use the URL or {{URL}} (replace {ID} with the file's ID) directly in the browser as a URL.",
},
infos: {
title: 'Information',
id: 'ID/Url',
message: "Alternatively, you can use the URL or {{URL}} (replace {ID} with the file's ID) directly in the browser as a URL.",
dialog: {
title: 'File Info',
name: 'Name',
age: 'Age',
type: 'Type',
size: 'Size',
delete: 'Delete',
},
},
},
} as const satisfies Translations;

24
src/i18n/pages/imprint.ts Normal file
View File

@ -0,0 +1,24 @@
import { type Translations } from '@i18n/utils';
export default {
de: {
title: 'Impressum',
tmg: {
title: 'Angaben gemäß § 5 TMG:',
},
uid: {
title: 'Umsatz&shy;steuer-ID',
content: 'Umsatz&shy;steuer-Identifikations&shy;nummer gemäß § 27a UStG: DE354633149',
},
},
en: {
title: 'Imprint',
tmg: {
title: 'Information according to § 5 TMG:',
},
uid: {
title: 'VAT ID',
content: 'VAT identification number according to § 27a UStG: DE354633149',
},
},
} as const satisfies Translations;

188
src/i18n/pages/index.ts Normal file
View File

@ -0,0 +1,188 @@
import { type Translations } from '@i18n/utils';
import filetransferImage from '@public/images/filetransfer.webp';
import foodMoodLogo from '@public/images/foodmood-logo.svg';
import hololensImage from '@public/images/hololens-1.webp';
import tlzLogo from '@public/images/tlz-nrw-logo.svg';
export default {
de: {
title: 'Innovative Software&shyentwicklung',
subtitle: 'Hier sind sie genau richtig!',
services: {
title: 'Dienst&shyleistungen',
values: [
{
title: 'Software&shyentwicklung',
content:
'Als Softwareentwickler biete ich maßgeschneiderte Lösungen für jegliche Software. Ich arbeite mit modernen Technologien und lege großen Wert auf eine enge Zusammenarbeit, um robuste, skalierbare und sichere Software zu entwickeln. Mein Ziel ist es, die besten Lösungen für Ihre Anforderungen zu schaffen.',
},
{
title: 'Internet&shy;seiten',
content:
'Ich gestalte und entwickle maßgeschneiderte Internetseiten, die Ihre Marke optimal präsentieren. Mit modernen Technologien und responsivem Design sorge ich für eine ansprechende Benutzererfahrung. Von der Konzeption bis zur Umsetzung berate ich Sie und optimiere Ihre Website für Suchmaschinen.',
},
{
title: 'PC/Server Setup',
content:
'Ich biete umfassende Unterstützung beim PC- und Server-Setup. Ich kümmere mich um die Installation, Konfiguration und Optimierung Ihrer Hardware und Software, um sicherzustellen, dass Ihre Systeme reibungslos funktionieren und Ihren Anforderungen gerecht werden.',
},
],
},
references: {
title: 'Referenzen',
values: [
{
title: 'Ereignis&shyerfassung',
content:
'Meine Software ermöglicht die effiziente Erfassung von Ereignissen in Tunnelleitzentralen und erstellt BASt-Tabellen gemäß den Standards der Bundesanstalt für Straßenwesen. Sie zeichnet sich durch Benutzerfreundlichkeit, Zuverlässigkeit und Sicherheit aus, ermöglicht die Erfassung von Störungen, Vorfällen und Wartungsarbeiten. Auch die Erstellung von Statistiken und PDFs für eine umfassende Datenanalyse ist möglich.',
image: {
src: tlzLogo,
alt: 'Logo der TLZ-NRW',
},
},
{
title: 'Datei&shy;übertragung',
content:
'Dateiübertragung ist eine Website und API für einfaches und sicheres Hoch- und Herunterladen von Dateien. Diese wurde effizient und sicher in Rust entwickelt. Nutzer können Dateien hochladen, Links generieren und mit anderen teilen. Die benutzerfreundliche Website erlaubt unkomplizierten Dateitransfer ohne technisches Wissen. Dateien werden verschlüsselt und nach einer bestimmten Zeitperiode gelöscht.',
picture: {
src: filetransferImage,
alt: 'Hoch- und Herrunterladen von Dateien in die Cloud',
},
},
{
title: 'FoodMood',
content:
'FoodMood ist eine API und App, die es Nutzern ermöglicht, Nahrung präzise zu kategorisieren, individuell zu bewerten und effektiv zu verwalten. Mit Funktionen wie der Erstellung von Einkaufslisten, dem Speichern von Favoriten und Rezepten bietet FoodMood eine maßgeschneiderte Lösung für persönliche Ernährungsgewohnheiten. Genießen Sie stressfreies Einkaufen und greifen Sie auf eine umfassende Datenbank zu, um Ihre kulinarische Erfahrung zu optimieren.',
image: {
src: foodMoodLogo,
alt: 'Logo von FoodMood',
},
},
{
title: 'RepAiReality',
content:
'RepAiReality ist ein Forschungsprojekt der BTU Cottbus-Senftenberg, welches Augmented Reality für die Reparatur und Instandhaltung von Industrieanlagen nutzt. Mithilfe von AR-Brillen und spezieller Software erhalten Techniker Echtzeitinformationen und Anleitungen zur effizienten Durchführung von Reparaturen. Das Projekt zielt darauf ab, Ausfallzeiten zu reduzieren, Fehler zu minimieren und die Qualität der Arbeiten zu verbessern. Eine innovative Verbindung von Technologie, Forschung und Praxis für effiziente Industrieprozesse.',
picture: {
src: hololensImage,
alt: 'Person arbeitet mir der Hololens',
},
},
],
},
'coming-soon': {
title: 'Demnächst',
values: [
{
title: 'HiraKata Scan',
content:
'Eine Anwendung zur mühelosen Erkennung handgeschriebener Hiragana und Katakana. Das soll das interaktive Lernen von japanischen Schriftzeichen vereinfachen und Übungen zum verinnerlichen bereitstellen.',
},
{
title: 'iONA/Bosswerk Webapp',
content:
'SmartHome-Integration für optimierten Stromverbrauch. Echtzeit-Überwachung und effektive Nutzung von Solarstrom. Statistiken und Automatisierung zur Kostenersparnis und nachhaltigen Energiepraxis. Intelligente Einbindung in SmartHome-Systeme für effizientes Energiemanagement.',
},
{
title: 'FoodMood v2',
content:
'Eine neue App und verbesserte API für ein optimiertes kulinarisches Erlebnis. Kategorisierung, Bewertung, Einkaufslisten und Rezeptverwaltung. Zuverlässige Kommunikation und sichere Datenverarbeitung. Statistiken und personalisierte Empfehlungen zur Verbesserung der Essgewohnheiten.',
},
{
title: 'Blog',
content:
'Wertvolle Einblicke in die Softwarewelt, Probleme und praktische Lösungen. Entwicklungsressourcen, Tipps, bewährte Praktiken und Optimierung von Softwareprojekten.',
},
],
},
},
en: {
title: 'Innovative Software development',
subtitle: 'This is the right place for you!',
services: {
title: 'Services',
values: [
{
title: 'Software Development',
content:
'As a software developer, I offer tailored solutions for any software needs. I work with modern technologies and emphasize close collaboration to develop robust, scalable, and secure software. My goal is to create the best solutions for your requirements.',
},
{
title: 'Websites',
content:
'I design and develop customized websites that effectively showcase your brand. Using modern technologies and responsive design, I ensure a pleasing user experience. From conception to implementation, I provide guidance and optimize your website for search engines.',
},
{
title: 'PC/Server Setup',
content:
'I provide comprehensive support for PC and server setup, handling the installation, configuration, and optimization of your hardware and software. This ensures smooth system operation meeting your requirements.',
},
],
},
references: {
title: 'References',
values: [
{
title: 'Ereigniserfassung',
content:
'My software efficiently captures events in tunnel control centers and generates BASt tables according to the standards of the Federal Highway Research Institute. User-friendly, reliable, and secure. Capture disturbances, incidents, and maintenance work. Generate statistics and PDFs for comprehensive data analysis.',
image: {
src: tlzLogo,
alt: 'TLZ-NRW Logo',
},
},
{
title: 'FileTransfer',
content:
'FileTransfer is a website and API for easy and secure file upload and download. Efficient and secure, developed in Rust. Users can upload files, generate links, and share with others. The user-friendly website allows straightforward file transfer without technical knowledge. Files are encrypted and deleted after a specific time period.',
picture: {
src: filetransferImage,
alt: 'Upload and Download of Files to the Cloud',
},
},
{
title: 'FoodMood',
content:
'FoodMood is an API and app that empowers users to categorize, assess, and efficiently manage their nutrition. With features such as creating shopping lists, saving favorites, and recipes, FoodMood offers a tailored solution for individual dietary habits. Enjoy hassle-free shopping and access a comprehensive database to enhance your culinary experience.',
image: {
src: foodMoodLogo,
alt: 'FoodMood Logo',
},
},
{
title: 'RepAiReality',
content:
'RepAiReality is a research project at BTU Cottbus-Senftenberg that utilizes augmented reality for the repair and maintenance of industrial plants. Technicians receive real-time information and instructions via AR glasses and special software for efficient repairs. The project aims to reduce downtime, minimize errors, and improve the quality of work—an innovative blend of technology, research, and practicality for efficient industrial processes.',
picture: {
src: hololensImage,
alt: 'Person working with HoloLens',
},
},
],
},
'coming-soon': {
title: 'Upcoming',
values: [
{
title: 'HiraKata Scan',
content:
'An application for effortless recognition of handwritten Hiragana and Katakana. This aims to simplify interactive learning of Japanese characters and provide exercises for memorization.',
},
{
title: 'iONA/Bosswerk Webapp',
content:
'SmartHome integration for optimized power consumption. Real-time monitoring and effective use of solar power. Statistics and automation for cost savings and sustainable energy practices. Intelligent integration into SmartHome systems for efficient energy management.',
},
{
title: 'FoodMood v2',
content:
'A new app and improved API for an optimized culinary experience. Categorization, rating, shopping lists, and recipe management. Reliable communication and secure data processing. Statistics and personalized recommendations to enhance eating habits.',
},
{
title: 'Blog',
content:
'Valuable insights into the software world, issues, and practical solutions. Development resources, tips, best practices, and optimization of software projects.',
},
],
},
},
} as const satisfies Translations;

80
src/i18n/pages/privacy.ts Normal file
View File

@ -0,0 +1,80 @@
// @ts-expect-error
import { defaultEmail } from '@components/Email.astro';
import { type Translations } from '@i18n/utils';
export default {
de: {
title: 'Datenschutz&shy;erklärung',
responsibleTitle: 'Verantwortlich im Sinne des Datenschutz&shy;gesetzes',
privacy: {
title: 'Datenschutz',
content: [
'Als Webseitenbetreiber nehme ich den Schutz aller persönlichen Daten sehr ernst. Alle personenbezogenen Informationen werden vertraulich und gemäß den gesetzlichen Vorschriften behandelt, wie in dieser Datenschutzerklärung erläutert.',
'Meine Webseite kann selbstverständlich genutzt werden, ohne dass Sie persönliche Daten angeben. Wenn jedoch zu irgendeinem Zeitpunkt persönliche Daten wie z.B. Name, Adresse oder E-Mail abgefragt werden, wird dies auf freiwilliger Basis geschehen. Niemals werden von mir erhobene Daten ohne Ihre spezielle Genehmigung an Dritte weitergegeben.',
],
},
correction: {
title: 'Auskunft, Löschung',
content:
'Zu jedem Zeitpunkt können Sie sich über die personenbezogenen Daten, deren Herkunft und Empfänger und den Nutzen der Datenverarbeitung informieren und unentgeltlich eine Korrektur oder Löschung dieser Daten verlangen. Bitte nutzen Sie dafür die im [Impressum](/impressum) angegebenen Kontaktwege. Für weitere Fragen zum Thema stehe ich Ihnen ebenfalls jederzeit zur Verfügung.',
},
logs: {
title: 'Server-Log-Dateien',
content: [
'Die Website wird privat gehostet und speichert automatisch Server-Log Dateien, die von Ihrem Browser an mich übermittelt werden. Diese Daten enthalten: Browsertyp / Browserversion, Betriebssystem des Rechners, Referrer URL, Hostname des zugreifenden Rechners und Uhrzeit der Serveranfrage.',
'Diese Daten sind nicht personenbezogen. Es erfolgt keine Zusammenführung dieser Daten mit anderen Datenquellen. Wenn mir konkrete Anhaltspunkte für eine rechtswidrige Nutzung bekannt werden behalte ich mir das Recht vor, diese Daten nachträglich zu überprüfen.',
'Zudem werden alle Server-Logs spätestens zu jedem neustart vom Server gelöscht.',
],
},
cookies: {
title: 'Cookies',
content: 'Diese Website verwendet keine Cookies.',
},
changes: {
title: 'Änderungen',
content:
'Meine Datenschutzerklärung können in unregelmäßigen Abständen angepasst werden, damit sie den aktuellen rechtlichen Anforderungen entsprechen oder um Änderungen meiner Dienstleistungen umzusetzen, z. B. bei der Einfügung neuer Angebote. Für Ihren nächsten Besuch gilt dann automatisch die neue Datenschutzerklärung.',
},
contact: {
title: 'Kontakt zum Datenschutz&shy;mitarbeiter',
content: `Für Fragen zum Datenschutz schicken Sie mir bitte eine Nachricht an ${defaultEmail} mit dem Betreff "Datenschutz".`,
},
},
en: {
title: 'Privacy Policy',
responsibleTitle: 'Responsible within the meaning of the Data Protection Act',
privacy: {
title: 'Data Protection',
content: [
'As a website operator, I take the protection of all personal data very seriously. All personal information is treated confidentially and in accordance with legal regulations, as explained in this privacy policy.',
'My website can be used without providing personal data. However, if personal data such as name, address, or email is requested at any time, this will be on a voluntary basis. Data collected by me will never be disclosed to third parties without your specific permission.',
],
},
correction: {
title: 'Information, Deletion',
content:
'At any time, you can inquire about the personal data, its origin and recipients, and the purpose of data processing. You can also request a correction or deletion of this data free of charge. Please use the contact methods provided in the [imprint](/imprint). I am also available for further questions on this topic at any time.',
},
logs: {
title: 'Server Log Files',
content: [
'The website is privately hosted and automatically stores server log files transmitted by your browser. These data include: browser type/version, operating system of the computer, referrer URL, hostname of the accessing computer, and time of the server request.',
'This data is not personally identifiable. There is no merging of this data with other data sources. If specific indications of unlawful use become known to me, I reserve the right to subsequently check this data.',
'All server logs are also deleted at the latest with every server restart.',
],
},
cookies: {
title: 'Cookies',
content: 'This website does not use cookies.',
},
changes: {
title: 'Changes',
content:
'My privacy policy may be adjusted at irregular intervals to comply with current legal requirements or to implement changes in my services, such as the introduction of new offerings. The new privacy policy automatically applies to your next visit.',
},
contact: {
title: 'Contact the Data Protection Officer',
content: `For questions regarding data protection, please send a message to ${defaultEmail} with the subject "Data Protection".`,
},
},
} as const satisfies Translations;

View File

@ -0,0 +1,110 @@
import { type Translations } from '@i18n/utils';
import filetransferImage from '@public/images/filetransfer.webp';
import foodMoodLogo from '@public/images/foodmood-logo.svg';
import hololensImage from '@public/images/hololens-1.webp';
import tlzLogo from '@public/images/tlz-nrw-logo.svg';
export default {
de: {
title: 'Referenzen',
ereigniserfassung: {
id: 'ereigniserfassung',
image: {
src: tlzLogo,
alt: 'Logo der TLZ-NRW',
},
title: 'Ereignis&shy;erfassung',
content:
'Meine Software ermöglicht die effiziente Erfassung von Ereignissen in Tunnelleitzentralen und erstellt BASt-Tabellen gemäß den Standards der Bundesanstalt für Straßenwesen. Sie zeichnet sich durch Benutzerfreundlichkeit, Zuverlässigkeit und Sicherheit aus, und ermöglicht die Erfassung von Störungen, Vorfällen und Wartungsarbeiten. Darüber hinaus bietet sie die Möglichkeit zur Erstellung von umfassenden Statistiken und PDFs für eine detaillierte Datenanalyse.\nBeachten Sie, dass der Sourcecode ausschließlich für Käufer dieser Software öffentlich zugänglich ist und daher hier nicht verlinkt wird.',
},
fileTransfer: {
id: 'dateiübertragung',
picture: {
src: filetransferImage,
alt: 'Hoch- und Herrunterladen von Dateien in die Cloud',
},
title: 'Datei&shy;übertragung',
link: '/dateiübertragung',
content:
'FileTransfer ist eine Website und API, die ein unkompliziertes und sicheres Hoch- und Herunterladen von Dateien ermöglicht. Die Plattform wurde effizient und sicher in Rust entwickelt. Nutzer haben die Möglichkeit, Dateien hochzuladen, Links zu generieren und sie unkompliziert mit anderen zu teilen. Die benutzerfreundliche Website ermöglicht einen einfachen Dateitransfer, auch ohne technisches Wissen. Alle hochgeladenen Dateien werden verschlüsselt und nach einer festgelegten Zeitperiode automatisch gelöscht.',
},
repAiReality: {
id: 'repAiReality',
picture: {
src: hololensImage,
alt: 'Person arbeitet mir der Hololens',
},
title: 'RepAiReality',
link: 'https://www.b-tu.de/fg-unternehmensfuehrung/forschung/projekte/wir-wi-r-repaireality',
content:
'RepAiReality ist ein Forschungsprojekt an der BTU Cottbus-Senftenberg, das Augmented Reality (AR) für die Reparatur und Instandhaltung von Industrieanlagen einsetzt. Durch die Nutzung von AR-Brillen und spezieller Software erhalten Techniker Echtzeitinformationen und Anleitungen, die eine effiziente Durchführung von Reparaturen ermöglichen. Das Ziel des Projekts ist die Reduzierung von Ausfallzeiten, die Minimierung von Fehlern und die Verbesserung der Arbeitsqualität. RepAiReality vereint innovative Technologie, Forschung und Praxis, um Industrieprozesse effizienter zu gestalten.\nAus rechtlichen Gründen ist es bedauerlicherweise nicht möglich, den Code bereitzustellen.',
},
foodMood: {
id: 'foodMood',
image: {
src: foodMoodLogo,
alt: 'Logo von FoodMood',
},
title: 'FoodMood',
content:
'FoodMood ist eine API und App, die Nutzern die Möglichkeit bietet, ihre Mahlzeiten zu kategorisieren, zu bewerten und zu organisieren. Sie können Einkaufslisten erstellen, ihre Lieblingsgerichte und Rezepte speichern. Die Plattform ermöglicht personalisierte Ernährungsgewohnheiten, stressfreie Einkaufsplanung und greift auf eine umfangreiche Datenbank zu.',
},
javaGames: {
id: 'java-spiele',
title: 'Einfache Spiele mit Java',
content:
'Es handelt sich dabei um eine Sammlung von Java-implementierten Spielen, darunter Minesweeper, Snake und Pong. Tauchen Sie ein in die Welt der Java-Programmierung und erleben Sie die Umsetzung dieser klassischen Spiele. Lernen Sie die Grundlagen der Spieleentwicklung in Java kennen und genießen Sie den Spielspaß mit diesen liebevoll gestalteten Projekten. Der Code steht zum Erkunden und Experimentieren zur Verfügung, um Ihr Verständnis für Java-Programmierung zu vertiefen.',
},
},
en: {
title: 'References',
ereigniserfassung: {
id: 'ereigniserfassung',
image: {
src: tlzLogo,
alt: 'TLZ-NRW Logo',
},
title: 'Ereignis&shy;erfassung',
content:
'My software enables efficient event capture in tunnel control centers and generates BASt tables according to the standards of the Federal Highway Research Institute. It is characterized by user-friendliness, reliability, and security, allowing the recording of disruptions, incidents, and maintenance work. Additionally, it provides the option to create comprehensive statistics and PDFs for detailed data analysis.\nPlease note that the source code is exclusively accessible to buyers of this software and is not linked here.',
},
fileTransfer: {
id: 'file-transfer',
picture: {
src: filetransferImage,
alt: 'Upload and Download of Files to the Cloud',
},
title: 'File Transfer',
link: '/file-transfer',
content:
'FileTransfer is a website and API that allows easy and secure uploading and downloading of files. The platform was developed efficiently and securely in Rust. Users can upload files, generate links, and easily share them with others. The user-friendly website allows straightforward file transfer, even without technical knowledge. All uploaded files are encrypted and automatically deleted after a specified time period.',
},
repAiReality: {
id: 'repAiReality',
picture: {
src: hololensImage,
alt: 'Person working with HoloLens',
},
title: 'RepAiReality',
link: 'https://www.b-tu.de/fg-unternehmensfuehrung/forschung/projekte/wir-wi-r-repaireality',
content:
'RepAiReality is a research project at BTU Cottbus-Senftenberg that utilizes Augmented Reality (AR) for the repair and maintenance of industrial plants. Technicians receive real-time information and instructions through AR glasses and specialized software, enabling efficient execution of repairs. The project aims to reduce downtime, minimize errors, and improve work quality. RepAiReality combines innovative technology, research, and practical application to make industrial processes more efficient.\nUnfortunately, due to legal reasons, it is not possible to provide the code.',
},
foodMood: {
id: 'foodMood',
image: {
src: foodMoodLogo,
alt: 'FoodMood Logo',
},
title: 'FoodMood',
content:
'FoodMood is an API and app that allows users to categorize, rate, and organize their meals. Users can create shopping lists, save their favorite dishes and recipes. The platform enables personalized eating habits, stress-free meal planning, and access to an extensive database.',
},
javaGames: {
id: 'java-games',
title: 'Simple Games with Java',
content:
'This is a collection of games implemented in Java, including Minesweeper, Snake, and Pong. Dive into the world of Java programming and experience the implementation of these classic games. Learn the basics of game development in Java and enjoy gaming with these lovingly crafted projects. The code is available for exploration and experimentation to deepen your understanding of Java programming.',
},
},
} as const satisfies Translations;

View File

@ -0,0 +1,127 @@
import { type Translations } from '@i18n/utils';
import filetransferImage from '@public/images/filetransfer.webp';
import hololensImage from '@public/images/hololens-2.webp';
import presentingImage from '@public/images/presenting.jpg';
import serverImage from '@public/images/server.webp';
import tlzLogo from '@public/images/tlz-nrw-logo.svg';
export default {
de: {
title: 'Dienst&shyleistungen',
picture: {
src: presentingImage,
alt: '2 Personen die sitzend auf ein Laptop schauen',
},
subtitle: [
'In einer Welt, in der jedes Restaurant, jedes Startup, jeder Unternehmer und zahlreiche Privatpersonen eine eigene Website, personalisierte Programme oder andere Software benötigen, stehe ich als persönlicher Partner für maßgeschneiderte Softwarelösungen bereit, um die Herausforderungen der digitalen Transformation gemeinsam mit Ihnen zu meistern.',
'In einer Zeit, in der Software nicht nur wünschenswert, sondern oft unverzichtbar ist, erfordert die Umsetzung dieser Ideen Zeit, Fachwissen und Ressourcen, die nicht jeder zur Verfügung hat. Ob sie ein Restaurant besitzen, das eine ansprechende Website für Online-Reservierungen benötigt, ein Startup, das eine maßgeschneiderte API für nahtlose Integrationen plant, oder ein Unternehmer, der einen unterstützenden Bot für effizientere Kommunikation einsetzen möchte. Genau da stelle ich meine Fachkompetenz ihnen zur Verfügung.',
],
softwareDevelopment: {
title: 'Software&shyentwicklung',
content:
'Als leidenschaftlicher Softwareentwickler stehe ich Ihnen zur Seite, um individuelle Softwarelösungen zu schaffen, die perfekt auf Ihre Bedürfnisse zugeschnitten sind. Mit einem fundierten Verständnis für moderne Technologien und einem klaren Fokus auf eine enge Zusammenarbeit, strebe ich danach, robuste, skalierbare und sichere Software zu entwickeln.',
carousel: [
{
image: {
src: tlzLogo,
alt: 'Logo der TLZ-NRW',
},
title: 'Ereignis&shy;erfassung',
link: '/referenzen#ereigniserfassung',
content: 'Eine Desktopanwendung für Tunnelleitzentralen, um Daten für die BASt ausfzubereiten.',
},
{
picture: {
src: filetransferImage,
alt: 'Hoch- und Herrunterladen von Dateien in die Cloud',
},
title: 'Datei&shy;übertragung',
link: '/referenzen#dateiübertragung',
content: 'Dateien hochladen, um diese später wieder sicher woanders herunterzuladen.',
},
{
picture: {
src: hololensImage,
alt: 'Person arbeitet mir der Hololens',
},
title: 'RepAiReality',
link: '/referenzen#repAiReality',
content: 'Forschungsprojekt der BTU Cottbus-Senftenberg, um mit einer AR-Brille Techniker zu unterstützen.',
},
],
},
websites: {
title: 'Internet&shy;seiten',
content:
'Die heutige digitale Landschaft erfordert mehr als nur eine Online-Präsenz. Ihre Website ist oft der erste Berührungspunkt mit potenziellen Kunden, und der erste Eindruck zählt. Als erfahrener Webentwickler bin ich Ihr verlässlicher Partner für die Gestaltung und Entwicklung individueller Websites, die nicht nur Ihre Marke optimal präsentieren, sondern auch modernste Technologien und responsives Design nutzen, um eine beeindruckende Benutzererfahrung zu gewährleisten.',
},
serverSetup: {
title: 'PC/Server Setup',
content:
'In einer Zeit, in der eine leistungsstarke IT-Infrastruktur entscheidend für den Geschäftserfolg ist, übernehme ich die Verantwortung dafür, dass Ihre PCs und Server optimal funktionieren. Ich stehe stehts bereit, um die Installation, Konfiguration und Optimierung von Hardware und Software zu übernehmen, damit Ihre reibungslos laufen und Ihren spezifischen Anforderungen entsprechen.',
picture: {
src: serverImage,
alt: 'Serverrack',
},
},
},
en: {
title: 'Services',
picture: {
src: presentingImage,
alt: '2 people sitting and looking at a laptop',
},
subtitle: [
'In a world where every restaurant, startup, entrepreneur, and numerous individuals require their own website, personalized programs, or other software solutions, I serve as a personal partner for tailor-made software solutions to tackle the challenges of digital transformation together with you.',
"In a time when software is not only desirable but often essential, the implementation of these ideas requires time, expertise, and resources not available to everyone. Whether you own a restaurant in need of an appealing website for online reservations, a startup planning a custom API for seamless integrations, or an entrepreneur looking to deploy a supportive bot for more efficient communication, that's exactly where I put my expertise at your disposal.",
],
softwareDevelopment: {
title: 'Software Development',
content:
'As a passionate software developer, I stand by your side to create custom software solutions perfectly tailored to your needs. With a solid understanding of modern technologies and a clear focus on close collaboration, I strive to develop robust, scalable, and secure software.',
carousel: [
{
image: {
src: tlzLogo,
alt: 'TLZ-NRW Logo',
},
title: 'Ereignis&shy;erfassung',
link: '/en/references#ereigniserfassung',
content: 'A desktop application for tunnel control centers to prepare data for the Federal Highway Research Institute.',
},
{
picture: {
src: filetransferImage,
alt: 'Upload and Download of Files to the Cloud',
},
title: 'File Transfer',
link: '/en/references#file-transfer',
content: 'Upload files to securely download them elsewhere later.',
},
{
picture: {
src: hololensImage,
alt: 'Person working with HoloLens',
},
title: 'RepAiReality',
link: '/en/references#repAiReality',
content: 'BTU Cottbus-Senftenberg research project using AR glasses to assist technicians.',
},
],
},
websites: {
title: 'Websites',
content:
"Today's digital landscape demands more than just an online presence. Your website is often the first point of contact with potential customers, and the first impression matters. As an experienced web developer, I am your reliable partner for designing and developing individual websites that not only showcase your brand optimally but also leverage cutting-edge technologies and responsive design to ensure an impressive user experience.",
},
serverSetup: {
title: 'PC/Server Setup',
content:
'In an era where a powerful IT infrastructure is crucial for business success, I take on the responsibility to ensure that your PCs and servers operate optimally. I am always ready to handle the installation, configuration, and optimization of hardware and software to ensure your systems run smoothly and meet your specific requirements.',
picture: {
src: serverImage,
alt: 'Server Rack',
},
},
},
} as const satisfies Translations;

46
src/i18n/ui.ts Normal file
View File

@ -0,0 +1,46 @@
import { type Translations } from '@i18n/utils';
export default {
de: {
country: 'Deutschland',
owner: 'Inhaber',
contact: 'Kontakt',
name: 'Name',
telefon: 'Telefon',
email: 'E-Mail',
copyright: '© Zokki · Alle Rechte vorbehalten.',
siteName: "Zokki's Softwareschmiede",
error: 'Fehler',
cookieBanner: 'Diese Seite verwendet keine Cookies!',
ariaLabel: {
themeChange: 'Theme wechsel',
},
},
en: {
country: 'Germany',
owner: 'Owner',
contact: 'Contact',
name: 'Name',
telefon: 'Phone',
email: 'E-Mail',
copyright: '© Zokki - All rights reserved.',
siteName: "Zokki's Softwareschmiede",
error: 'Error',
cookieBanner: "This site doesn't use cookies!",
ariaLabel: {
themeChange: 'Theme change',
},
},
} as const satisfies Translations;

153
src/i18n/utils.ts Normal file
View File

@ -0,0 +1,153 @@
import type config from '@/astro.config.ts';
import footerTranslations from '@i18n/components/footer';
import headTranslations from '@i18n/components/head';
import linkTranslations from '@i18n/link';
import blogIndexPageTranslations from '@i18n/pages/blog/index';
import copyrightPageTranslations from '@i18n/pages/copyright';
import disclaimerPageTranslations from '@i18n/pages/disclaimer';
import fileTransferPageTranslations from '@i18n/pages/fileTransfer';
import imprintPageTranslations from '@i18n/pages/imprint';
import indexPageTranslations from '@i18n/pages/index';
import privacyPageTranslations from '@i18n/pages/privacy';
import referencesIndexPageTranslations from '@i18n/pages/references/index';
import servicesIndexPageTranslations from '@i18n/pages/services/index';
import uiTranslations from '@i18n/ui';
import { getKeys } from '@shared/helpers';
import { type GetStaticPaths } from 'astro';
import { getRelativeLocaleUrl } from 'astro:i18n';
import path from 'path';
export type Language = (typeof config.i18n.locales)[number];
export type Translations = Record<Language, Record<string, any>>;
export const translations = {
head: headTranslations,
footer: footerTranslations,
link: linkTranslations,
ui: uiTranslations,
page: {
copyright: copyrightPageTranslations,
disclaimer: disclaimerPageTranslations,
fileTransfer: fileTransferPageTranslations,
imprint: imprintPageTranslations,
index: indexPageTranslations,
privacy: privacyPageTranslations,
blog: {
index: blogIndexPageTranslations,
},
references: {
index: referencesIndexPageTranslations,
},
services: {
index: servicesIndexPageTranslations,
},
},
} as const;
export const languages = {
de: 'Deutsch',
en: 'English',
} as const satisfies Record<Language, string>;
export const defaultLang = 'de' satisfies typeof config.i18n.defaultLocale;
export const getStaticPathsForFile = (dir: string): GetStaticPaths => {
const match = dir.match(/\/src\/pages\/(.+)?\[\.\.\.(\w+)\]\.astro/);
if (!match) {
throw new Error('No fileName found! - ' + dir);
}
const fileName = match.at(-1) as keyof (typeof linkTranslations)[Language] | 'index';
const relativePath = path.dirname(dir).replace(path.resolve() + '/src/pages', '');
const dirIndent = import.meta.env.MODE === 'production' ? Math.max(0, relativePath.split('/').length - 1) : 0;
type LinkTranslationKeys = keyof (typeof linkTranslations)[keyof typeof linkTranslations];
const getLinkTranslation = (lang: Language): string => {
const langTranslation = linkTranslations[lang];
const linkTranslation = langTranslation[fileName as LinkTranslationKeys];
if (!relativePath) {
return typeof linkTranslation === 'string' ? linkTranslation : linkTranslation?.href || '/' + fileName;
}
let translationCopy = langTranslation as any;
const retVal = match[0]
.replace('/src/pages/', '')
.split('/')
.filter(Boolean)
.map(sub => {
sub = sub.replace('[...', '').replace(']', '').replace('.astro', '');
if (sub === 'index') return;
translationCopy = translationCopy[sub];
return typeof translationCopy === 'string' ? translationCopy : translationCopy.href;
});
return retVal.join('/').replaceAll('//', '/');
};
return () => [
{ params: { [fileName]: '../'.repeat(dirIndent).slice(0, -1) + getLinkTranslation(defaultLang) } },
...getKeys(languages)
.filter(lang => lang !== defaultLang)
.map(lang => ({
params: { [fileName]: '../'.repeat(dirIndent) + lang + getLinkTranslation(lang) },
})),
];
};
export const getLangFromUrl = (url: URL): Language => {
const [, lang] = url.pathname.split('/');
if ((lang ?? '') in languages) return lang as Language;
return defaultLang;
};
export type FlattenKeys<T> = T extends object
? {
[K in keyof T & string]: K extends Language ? FlattenKeys<T[K]> : FlattenKeys<T[K]> extends '' ? K : K | `${K}.${FlattenKeys<T[K]>}`;
}[keyof T & string]
: '';
type ExtractParams<T> = T extends `${string}{{${infer Param}}}${infer Suffix}` ? Param | ExtractParams<Suffix> : never;
type NestedValue<T, K extends string> = Language extends keyof T
? NestedValue<T[Language], K>
: K extends `${infer First}.${infer Rest}`
? First extends keyof T
? NestedValue<T[First], Rest>
: never
: K extends keyof T
? Language extends keyof T[K]
? T[K][Language]
: T[K]
: never;
export type TranslationKey = FlattenKeys<typeof translations>;
export const useTranslations =
(lang: Language) =>
<TKey extends TranslationKey>(
keyStruct: TKey,
params?: { [Key in ExtractParams<NestedValue<typeof translations, TKey>>]: string },
): NestedValue<typeof translations, TKey> => {
const keys = keyStruct.split('.');
let retVal = translations as any;
while (!(lang in retVal)) {
retVal = retVal[keys.splice(0, 1)[0]!];
}
retVal = retVal[lang];
keys.forEach(key => (retVal = retVal[key]));
if (typeof retVal === 'string') {
const paramsMatchs = [...retVal.matchAll(/{{(.+)}}/g)];
paramsMatchs.forEach(match => {
const newVal = params?.[match[1] as keyof typeof params];
if (!newVal) {
throw new Error(`No parameter for '${match[1]}' found!`);
}
retVal = (retVal as string).replaceAll(match[0], newVal);
});
}
return retVal;
};
export const getHrefFromLink =
(lang: Language) =>
(link: keyof (typeof translations)['link'][Language]): string =>
getRelativeLocaleUrl(lang, useTranslations(lang)(('link.' + link) as any));

83
src/layouts/Layout.astro Normal file
View File

@ -0,0 +1,83 @@
---
import { indexSuffixRegEx } from '@/astro.config';
import { author } from '@/package.json';
import CookieBanner from '@components/CookieBanner.astro';
import Footer from '@components/Footer.astro';
import Header from '@components/Header.astro';
import { getLangFromUrl, useTranslations } from '@i18n/utils';
import { type HTMLAttributes } from 'astro/types';
import { ViewTransitions } from 'astro:transitions';
import '@styles/_classes.scss';
import '@styles/_colors.scss';
import '@styles/_emojiFont.scss';
import '@styles/_grids.scss';
import '@styles/_typography.scss';
import '@styles/global.scss';
interface Props extends HTMLAttributes<'main'> {}
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
const baseValues = {
title: 'Softwareschmiede',
description: translate('head.description'),
url: Astro.site,
keywords:
'Astro, HTML, CSS, JavaScript, Typescript, Softwareschmiede, Zokki, Internetseite, Software, Website, Programmieren, programming, Hilfe, help, Java, C#, Rust, Backend, Frontend',
siteName: "Zokki's Softwareschmiede",
faviconPath: '/favicon.svg',
ogImagePath: '/favicon.svg',
ogImageAlt: translate('head.ogImageAlt'),
};
---
<!doctype html>
<html {lang} class="bg-primary">
<head>
<meta charset="utf-8" />
<link rel="canonical" href={Astro.url.href.replace(indexSuffixRegEx, '')} />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no," />
<meta name="color-scheme" content="dark light" />
{import.meta.env.PROD && <meta http-equiv="content-security-policy" content="default-src https: 'unsafe-inline'" />}
<link rel="sitemap" href="/sitemap-index.xml" />
<link rel="icon" type="image/svg+xml" href={baseValues.faviconPath} />
<meta name="description" content={baseValues.description} />
<meta name="keywords" content={baseValues.keywords} />
<meta name="author" content={author} />
<meta property="og:title" content={baseValues.title} />
<meta property="og:description" content={baseValues.description} />
<meta property="og:image" content={baseValues.ogImagePath} />
<meta property="og:image:alt" content={baseValues.ogImageAlt} />
<meta property="og:type" content="Website" />
<meta property="og:url" content={baseValues.url} />
<meta property="og:site_name" content={baseValues.siteName} />
<meta name="twitter:card" content="summary" />
<meta name="twitter:creator" content="zokkis_software" />
<meta name="twitter:site" content="zokkis_software" />
<title>{baseValues.title}</title>
<ViewTransitions />
</head>
<body>
<slot name="befor-header" />
<Header />
<slot name="after-header" />
<main {...Astro.props}>
<slot />
</main>
<slot name="befor-footer" />
<Footer class="mt-auto" />
<slot name="after-footer" />
<CookieBanner />
</body>
</html>

View File

@ -0,0 +1,26 @@
---
import ReplacerParagraph from '@components/ReplacerParagraph.astro';
import { getLangFromUrl, getStaticPathsForFile, useTranslations } from '@i18n/utils';
import Layout from '@layouts/Layout.astro';
import { getValues, removeStrings } from '@shared/helpers';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
export const getStaticPaths = getStaticPathsForFile(__dirname);
---
<Layout class:list={['content-grid']} style={{ '--content-width': '80ch' }}>
<h1 set:html={translate('page.copyright.title')} />
{
getValues(translate('page.copyright'))
.filter(removeStrings)
.map(content => (
<section>
{'title' in content && <h2 set:html={content.title} />}
<ReplacerParagraph content={content.content} />
</section>
))
}
</Layout>

View File

@ -0,0 +1,26 @@
---
import ReplacerParagraph from '@components/ReplacerParagraph.astro';
import { getLangFromUrl, getStaticPathsForFile, useTranslations } from '@i18n/utils';
import Layout from '@layouts/Layout.astro';
import { getValues, removeStrings } from '@shared/helpers';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
export const getStaticPaths = getStaticPathsForFile(__dirname);
---
<Layout class:list={['content-grid']} style={{ '--content-width': '80ch' }}>
<h1 set:html={translate('page.disclaimer.title')} />
{
getValues(translate('page.disclaimer'))
.filter(removeStrings)
.map(content => (
<section>
<h2 set:html={content.title} />
<ReplacerParagraph content={content.content} />
</section>
))
}
</Layout>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
---
import { author } from '@/package.json';
import Address from '@components/Address.astro';
import Email from '@components/Email.astro';
import Mobile from '@components/Mobile.astro';
import ReplacerParagraph from '@components/ReplacerParagraph.astro';
import { getLangFromUrl, getStaticPathsForFile, useTranslations } from '@i18n/utils';
import Layout from '@layouts/Layout.astro';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
export const getStaticPaths = getStaticPathsForFile(__dirname);
---
<Layout class:list={['content-grid']} style={{ '--content-width': '80ch' }}>
<h1 set:html={translate('page.imprint.title')} />
<section>
<h2 set:html={translate('page.imprint.tmg.title')} />
<Address>
<p>
<strong set:html={translate('ui.siteName')} />
</p>
<p>
{translate('ui.owner')}: {author}
</p>
</Address>
</section>
<section>
<h2 set:html={translate('ui.contact') + ':'} />
<p>
{translate('ui.name')}: {author}
</p>
<p>
{translate('ui.telefon')}: <Mobile />
</p>
<p>
{translate('ui.email')}: <Email />
</p>
</section>
<section>
<h2 set:html={translate('page.imprint.uid').title} />
<ReplacerParagraph content={translate('page.imprint.uid').content} />
</section>
</Layout>

283
src/pages/[...index].astro Normal file
View File

@ -0,0 +1,283 @@
---
import ImageOrPicture from '@components/ImageOrPicture.astro';
import ReplacerParagraph from '@components/ReplacerParagraph.astro';
import { getLangFromUrl, getStaticPathsForFile, useTranslations } from '@i18n/utils';
import Layout from '@layouts/Layout.astro';
import blackSandImage from '@public/images/black-sand.webp';
import bluePolygonsImage from '@public/images/blue-polygons.webp';
import workImage from '@public/images/stock-work.webp';
import { Picture } from 'astro:assets';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
export const getStaticPaths = getStaticPathsForFile(__dirname);
---
<Layout class:list={['content-grid']} style={{ '--main-gap': '2.5rem' }}>
<Picture
id="background-image"
src={blackSandImage}
loading="eager"
alt="Hintergrundbild"
pictureAttributes={{ class: 'absolute' }}
class="w-100"
style={{ minHeight: 'calc(100vh + 3rem)' }}
aria-hidden
/>
<div id="carousel" class="full-content relative">
<Picture src={workImage} alt="Personen arbeiten am Computer" height={350} class="w-100 !m+:max-h-unset !m+:h-150%" />
<div class="text bg-second-600">
<h1 set:html={translate('page.index.title')} />
<ReplacerParagraph class="vfs-400" content={translate('page.index.subtitle')} />
</div>
</div>
<section id="services" class="bg-primary-600">
<h2 set:html={translate('page.index.services.title')} />
{
translate('page.index.services.values').map(val => (
<article class="third">
<h3 set:html={val.title} />
<ReplacerParagraph content={val.content} />
</article>
))
}
</section>
<section id="references" class="bg-primary full-content content-grid" style="display: grid;">
<h2 set:html={translate('page.index.references.title')} />
<div class="wrapper flex flex-wrap">
{
translate('page.index.references.values').map(val => (
<article class="half relative z-0 overflow-hidden">
<h3 set:html={val.title} />
<ImageOrPicture value={val} width={256} height={256} />
<ReplacerParagraph content={val.content} />
</article>
))
}
</div>
</section>
<section id="coming-soon" class="bg-primary-600">
<aside>
<Picture src={bluePolygonsImage} alt="blaue Polygone" pictureAttributes={{ class: 'h-full' }} class="h-full" aria-hidden />
</aside>
<div class="content-grid">
<h2 set:html={translate('page.index.coming-soon.title')} />
{
translate('page.index.coming-soon.values').map(val => (
<article class="full">
<h3 set:html={val.title} />
<ReplacerParagraph content={val.content} />
</article>
))
}
</div>
</section>
</Layout>
<style lang="scss">
@use '@styles/variables' as vars;
@use '@styles/helpers' as helpers;
$border: 3px solid gray;
.full {
flex: 1 1 100%;
}
.half {
flex: 1 1 clamp(20rem, 45vw, 40%);
}
.third {
flex: 1 1 clamp(20rem, 30vw, 30%);
}
article {
flex-direction: column;
row-gap: 0.5rem;
}
:global(main) {
position: relative;
padding-top: 0 !important;
}
#background-image {
position: fixed;
left: 0;
right: 0;
object-fit: cover;
z-index: -1;
filter: grayscale(0.5) brightness(0.65);
}
#carousel {
overflow: hidden;
height: fit-content;
max-height: min(45vh, 25rem);
.text {
position: absolute;
top: 50%;
left: 50%;
translate: -50% -50%;
width: max-content;
max-width: 90%;
padding: 1rem;
text-align: center;
}
img {
max-height: min(45vh, 25rem);
filter: grayscale(0.35) brightness(65%);
border-bottom: $border;
}
}
$column-gap: 1rem;
$border-radius: 2rem;
section,
article {
display: flex;
flex-wrap: wrap;
column-gap: calc($column-gap);
}
section {
padding: vars.$body-padding-top;
padding-top: calc(vars.$body-padding-top / 2);
}
h2 {
margin-bottom: 1rem;
width: 100%;
text-align: center;
}
#services {
border-radius: $border-radius;
}
#references {
border-block: 3px solid gray;
> .wrapper {
padding: 1rem;
row-gap: calc($column-gap * 2);
column-gap: calc($column-gap * 2.5);
> article {
display: unset;
background-color: var(--bg-second-350);
border-radius: 1rem;
padding: 1.5rem;
> h3 {
margin-bottom: 1rem;
}
> :global(:where(picture, img)) {
aspect-ratio: 1;
height: auto;
margin-left: 0.25rem;
margin-bottom: 0.25rem;
float: right;
border-radius: 50%;
overflow: hidden;
shape-outside: circle();
@include helpers.breakpoint-media(large) {
width: 128px;
}
@include helpers.breakpoint-media(727px) {
width: 256px;
}
@include helpers.breakpoint-media(small) {
width: 128px;
}
}
}
}
}
#coming-soon {
display: grid;
column-gap: 3.5vw;
grid-template-columns: 1fr 3fr;
padding: vars.$body-padding-right;
border-radius: calc((($border-radius / 2) + vars.$body-padding-right));
img {
border-radius: calc($border-radius / 2);
}
> div {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin-block: $column-gap;
> :global(article) {
counter-increment: coming-soon;
}
:global(p) {
margin-left: 3.5rem;
}
:global(h3)::before {
content: counter(coming-soon);
font-size: 0.75em;
padding: 0.25rem 0.75rem;
margin-right: 1.25rem;
border-radius: 0.25rem;
background-color: var(--bg-second);
}
}
}
:global(footer) {
border-top: $border;
}
@include helpers.media-light() {
#background-image {
filter: brightness(1.75) contrast(0.75);
}
#carousel img {
filter: unset;
}
}
@include helpers.breakpoint-media(extra-small) {
section#coming-soon {
grid-template-columns: unset;
> aside {
display: none;
}
> div {
margin: 0;
}
:global(p) {
margin-left: 0 !important;
}
}
}
</style>

View File

@ -0,0 +1,40 @@
---
import { author } from '@/package.json';
import Address from '@components/Address.astro';
import ReplacerParagraph from '@components/ReplacerParagraph.astro';
import { getLangFromUrl, getStaticPathsForFile, useTranslations } from '@i18n/utils';
import Layout from '@layouts/Layout.astro';
import { getValues, removeStrings } from '@shared/helpers';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
export const getStaticPaths = getStaticPathsForFile(__dirname);
---
<Layout class:list={['content-grid']} style={{ '--content-width': '80ch' }}>
<h1 set:html={translate('page.privacy.title')} />
<section>
<h2 set:html={translate('page.privacy.responsibleTitle')} />
<Address>
<p>
<strong set:html={translate('ui.siteName')} />
</p>
<p>
{translate('ui.owner')}: {author}
</p>
</Address>
</section>
{
getValues(translate('page.privacy'))
.filter(removeStrings)
.map(content => (
<section>
<h2 set:html={content.title} />
<ReplacerParagraph content={content.content} />
</section>
))
}
</Layout>

View File

@ -0,0 +1,20 @@
---
import ReplacerParagraph from '@components/ReplacerParagraph.astro';
import { getLangFromUrl, getStaticPathsForFile, useTranslations } from '@i18n/utils';
import Layout from '@layouts/Layout.astro';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
export const getStaticPaths = getStaticPathsForFile(__dirname);
---
<Layout class:list={['content-grid']} style={{ '--main-gap': '2.5rem' }}>
<h1 class="text-center" set:html={translate('page.blog.index.title')} />
<article class="flex-center">
<h2 set:html={translate('page.blog.index.comingSoon.title')} />
<ReplacerParagraph content={translate('page.blog.index.comingSoon.content')} />
</article>
</Layout>

View File

@ -0,0 +1,67 @@
---
import ImageOrPicture from '@components/ImageOrPicture.astro';
import ReplacerParagraph from '@components/ReplacerParagraph.astro';
import { getLangFromUrl, getStaticPathsForFile, useTranslations } from '@i18n/utils';
import Layout from '@layouts/Layout.astro';
import { getValues, removeStrings } from '@shared/helpers';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
export const getStaticPaths = getStaticPathsForFile(__dirname);
---
<Layout class:list={['content-grid']} style={{ '--main-gap': '2.5rem' }}>
<h1 class="text-center" set:html={translate('page.references.index.title')} />
{
getValues(translate('page.references.index'))
.filter(removeStrings)
.map(val => {
const LinkOrDiv = 'link' in val ? 'a' : 'div';
return (
<article id={val.id} class="flex-row m:flex-column gap-x-4 m-auto">
<ImageOrPicture value={val} width={256} height={256} />
<LinkOrDiv href={(val as any).link}>
<h2 set:html={val.title} />
<ReplacerParagraph content={val.content} />
</LinkOrDiv>
</article>
);
})
}
</Layout>
<style lang="scss">
article {
> :global(:where(picture, img)) {
aspect-ratio: 1;
margin: auto;
}
> :where(a, div) {
position: relative;
padding-right: 2rem;
text-decoration: none;
&[href]::after {
content: '';
position: absolute;
right: 0;
top: 50%;
transform: translate(0, -50%);
width: 0;
height: 0;
border-top: 1.5rem solid transparent;
border-bottom: 1.5rem solid transparent;
border-left: 1.5rem solid currentColor;
}
> h2 {
text-decoration: underline;
margin-bottom: 1rem;
}
}
}
</style>

View File

@ -0,0 +1,146 @@
---
import Carousel from '@components/Carousel.astro';
import ImageOrPicture from '@components/ImageOrPicture.astro';
import ReplacerParagraph from '@components/ReplacerParagraph.astro';
import { getLangFromUrl, getStaticPathsForFile, useTranslations } from '@i18n/utils';
import Layout from '@layouts/Layout.astro';
import { Picture } from 'astro:assets';
const lang = getLangFromUrl(Astro.url);
const translate = useTranslations(lang);
export const getStaticPaths = getStaticPathsForFile(__dirname);
---
<Layout class:list={['content-grid']} style={{ '--main-gap': '1.5rem' }}>
<h1 class="text-center" set:html={translate('page.services.index.title')} />
<section id="intro" class="relative mx-6 l:mx-0 full-content content-grid">
<aside>
<Picture
src={translate('page.services.index.picture.src')}
alt={translate('page.services.index.picture.alt')}
pictureAttributes={{ class: 'full-content' }}
width={754}
/>
</aside>
<div class="bg-primary-700 relative flex flex-column l:mx-auto gap-y-4 py-4 l:px-4 w-fit">
<ReplacerParagraph content={translate('page.services.index.subtitle')} />
</div>
</section>
<section class="flex-row-reverse gap-x-4 l:flex-column">
<div class:list={['basis-50', 'my-auto', 'l:max-w-fit', 'l:mx-auto']}>
<h2 set:html={translate('page.services.index.softwareDevelopment.title')} />
<ReplacerParagraph content={translate('page.services.index.softwareDevelopment.content')} />
</div>
<aside class="basis-50 my-auto">
<Carousel class:list={['mx-auto', 'l:max-w-70%', 'm:max-w-85%']}>
{
translate('page.services.index.softwareDevelopment.carousel').map(item => (
<a href={item.link} class="carousel-item relative overflow-y-hidden text-center text-decoration-none">
<ImageOrPicture value={item} width={264} height={264} />
<h3 class="vfs-250 bg-second-750 mt-85% mb-4 p-2" set:html={item.title} />
<ReplacerParagraph content={item.content} class:list={['vfs-200', 'bg-second-650', 'h-0', 'p-1']} />
</a>
))
}
</Carousel>
</aside>
</section>
<section class:list={['max-w-fit', 'mx-auto']}>
<h2 set:html={translate('page.services.index.websites.title')} />
<ReplacerParagraph content={translate('page.services.index.websites.content')} />
</section>
<section class="flex flex-row flex-center s:flex-column">
<div class:list={['max-w-fit', 'mx-auto']}>
<h2 set:html={translate('page.services.index.serverSetup.title')} />
<ReplacerParagraph content={translate('page.services.index.serverSetup.content')} />
</div>
<Picture
src={translate('page.services.index.serverSetup.picture.src')}
alt={translate('page.services.index.serverSetup.picture.alt')}
width={256}
height={256}
/>
</section>
</Layout>
<style lang="scss">
@use '@styles/helpers' as helpers;
#intro {
:global(picture) {
position: absolute;
max-width: 80ch;
max-height: 100vw;
height: 100%;
top: 0;
left: 50%;
z-index: -1;
}
img {
border-radius: 1rem;
width: 100%;
}
> div {
border-radius: 0.75rem;
}
}
@mixin carousel-item-hover() {
h3 {
margin-top: 0;
}
p {
height: unset;
}
}
.carousel-item {
filter: none;
&:hover {
@include carousel-item-hover();
}
> :global(picture),
> :global(img) {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
}
h3 {
transition: margin-top 500ms;
}
}
@media (hover: none) {
.carousel-item {
@include carousel-item-hover();
}
}
@include helpers.breakpoint-media(large) {
#intro {
:global(picture) {
position: unset;
min-width: 100%;
}
> div {
margin-top: -25%;
}
}
}
@include helpers.breakpoint-media(medium) {
#intro > div {
margin-top: min(-30%, -25vw);
}
}
</style>

16
src/shared/helpers.ts Normal file
View File

@ -0,0 +1,16 @@
type RecordKey = string | number | symbol;
type AnyArray = Array<any> | ReadonlyArray<any>;
export type MaybeArray<T, TReadonly extends boolean = false> =
T extends Array<infer Arr> ? T | Arr : T | (TReadonly extends true ? ReadonlyArray<T> : Array<T>);
export type Prettify<T> = { [K in keyof T]: T[K] } & unknown;
export const getKeys = <TObj extends Record<RecordKey, any>>(obj: TObj): (keyof TObj)[] => Object.keys(obj) as (keyof TObj)[];
export const getValues = <TObj extends Record<RecordKey, any>>(obj: TObj): TObj[keyof TObj][] => Object.values(obj);
export const getEntries = <TObj extends Record<RecordKey, any>>(obj: TObj): [keyof TObj, TObj[keyof TObj]][] =>
Object.entries(obj) as [keyof TObj, TObj[keyof TObj]][];
export const getAsArray = <TVal>(val: TVal): TVal extends AnyArray ? TVal : Array<TVal> =>
(Array.isArray(val) ? val : !val ? [] : [val]) as any;
export const removeStrings = <TVal>(val: TVal): val is Exclude<typeof val, string> => typeof val !== 'string';

253
src/styles/_classes.scss Normal file
View File

@ -0,0 +1,253 @@
@use 'variables' as vars;
@use 'helpers' as helpers;
$sizes: (
'half': 50%,
'full': 100%,
'fit': fit-content,
'min-content': min-content,
'max-content': max-content,
);
@mixin classes($prefix, $suffix) {
$maps: (
'w': width,
'h': height,
'p': padding,
'm': margin,
);
@each $short, $long in $maps {
@each $size, $css in $sizes {
.#{$prefix}#{$short}-#{$size} {
#{$long}: $css #{$suffix};
}
.#{$prefix}#{$short}-unset {
#{$long}: unset #{$suffix};
}
.#{$prefix}min-#{$short}-#{$size} {
min-#{$long}: $css #{$suffix};
}
.#{$prefix}min-#{$short}-unset {
min-#{$long}: unset #{$suffix};
}
.#{$prefix}max-#{$short}-#{$size} {
max-#{$long}: $css #{$suffix};
}
.#{$prefix}max-#{$short}-unset {
max-#{$long}: unset #{$suffix};
}
}
.#{$prefix}#{$short}-100 {
#{$long}: 100sv + #{$short} #{$suffix};
}
.#{$prefix}min-#{$short}-100 {
min-#{$long}: 100sv + #{$short} #{$suffix};
}
.#{$prefix}max-#{$short}-100 {
max-#{$long}: 100sv + #{$short} #{$suffix};
}
.#{$prefix}#{$short}-auto {
#{$long}: auto #{$suffix};
}
.#{$prefix}#{$short}t-auto {
#{$long}-top: auto #{$suffix};
}
.#{$prefix}#{$short}r-auto {
#{$long}-right: auto #{$suffix};
}
.#{$prefix}#{$short}b-auto {
#{$long}-bottom: auto #{$suffix};
}
.#{$prefix}#{$short}l-auto {
#{$long}-left: auto #{$suffix};
}
.#{$prefix}#{$short}x-auto {
#{$long}-inline: auto #{$suffix};
}
.#{$prefix}#{$short}y-auto {
#{$long}-block: auto #{$suffix};
}
@for $i from -20 through 40 {
.#{$prefix}#{$short}-#{$i} {
#{$long}: $i * 0.25rem #{$suffix};
}
.#{$prefix}#{$short}-#{$i * 5}\% {
#{$long}: $i * 5% #{$suffix};
}
.#{$prefix}min-#{$short}-#{$i} {
min-#{$long}: $i * 0.25rem #{$suffix};
}
.#{$prefix}min-#{$short}-#{$i * 5}\% {
min-#{$long}: $i * 5% #{$suffix};
}
.#{$prefix}max-#{$short}-#{$i} {
max-#{$long}: $i * 0.25rem #{$suffix};
}
.#{$prefix}max-#{$short}-#{$i * 5}\% {
max-#{$long}: $i * 5% #{$suffix};
}
.#{$prefix}#{$short}t-#{$i} {
#{$long}-top: $i * 0.25rem #{$suffix};
}
.#{$prefix}#{$short}t-#{$i * 5}\% {
#{$long}-top: $i * 5% #{$suffix};
}
.#{$prefix}#{$short}r-#{$i} {
#{$long}-right: $i * 0.25rem #{$suffix};
}
.#{$prefix}#{$short}r-#{$i * 5}\% {
#{$long}-right: $i * 5% #{$suffix};
}
.#{$prefix}#{$short}b-#{$i} {
#{$long}-bottom: $i * 0.25rem #{$suffix};
}
.#{$prefix}#{$short}b-#{$i * 5}\% {
#{$long}-bottom: $i * 5% #{$suffix};
}
.#{$prefix}#{$short}l-#{$i} {
#{$long}-left: $i * 0.25rem #{$suffix};
}
.#{$prefix}#{$short}l-#{$i * 5}\% {
#{$long}-left: $i * 5% #{$suffix};
}
.#{$prefix}#{$short}x-#{$i} {
#{$long}-inline: $i * 0.25rem #{$suffix};
}
.#{$prefix}#{$short}x-#{$i * 5}\% {
#{$long}-inline: $i * 5% #{$suffix};
}
.#{$prefix}#{$short}y-#{$i} {
#{$long}-block: $i * 0.25rem #{$suffix};
}
.#{$prefix}#{$short}y-#{$i * 5}\% {
#{$long}-block: $i * 5% #{$suffix};
}
.#{$prefix}gap-#{$i} {
gap: $i * 0.25rem #{$suffix};
}
.#{$prefix}gap-x-#{$i} {
column-gap: $i * 0.25rem #{$suffix};
}
.#{$prefix}gap-y-#{$i} {
row-gap: $i * 0.25rem #{$suffix};
}
}
}
.#{$prefix}white-space-pre-wrap {
white-space: pre-wrap #{$suffix};
}
.#{$prefix}relative {
position: relative #{$suffix};
}
.#{$prefix}absolute {
position: absolute #{$suffix};
}
.#{$prefix}grid {
display: grid #{$suffix};
}
.#{$prefix}flex {
display: flex #{$suffix};
}
.#{$prefix}none {
display: none #{$suffix};
}
.#{$prefix}flex-column {
flex-direction: column #{$suffix};
}
.#{$prefix}flex-column-reverse {
flex-direction: column-reverse #{$suffix};
}
.#{$prefix}flex-row {
flex-direction: row #{$suffix};
}
.#{$prefix}flex-row-reverse {
flex-direction: row-reverse #{$suffix};
}
.#{$prefix}flex-wrap {
flex-wrap: wrap #{$suffix};
}
.#{$prefix}flex-center {
justify-content: center #{$suffix};
align-items: center #{$suffix};
}
.#{$prefix}space-around {
justify-content: space-around #{$suffix};
}
.#{$prefix}items-center {
align-items: center #{$suffix};
}
@for $i from 0 through 20 {
.#{$prefix}basis-#{$i * 5} {
flex-basis: $i * 5% #{$suffix};
}
}
.#{$prefix}overflow-hidden {
overflow: hidden #{$suffix};
}
.#{$prefix}overflow-x-hidden {
overflow-x: hidden #{$suffix};
}
.#{$prefix}overflow-y-hidden {
overflow-y: hidden #{$suffix};
}
.#{$prefix}section-max {
max-width: vars.$section-width #{$suffix};
margin-inline: auto #{$suffix};
}
.#{$prefix}text-center {
text-align: center #{$suffix};
}
.#{$prefix}text-unset {
text-align: unset #{$suffix};
}
.#{$prefix}text-decoration-none {
text-decoration: none #{$suffix};
}
@for $i from -1 through 5 {
.#{$prefix}z-#{$i} {
z-index: #{$i} #{$suffix};
}
}
}
@include classes('', '');
@include classes('\\!', '!important');
@each $key, $breakpoint in vars.short-breakpoints() {
@include helpers.breakpoint-media($breakpoint) {
@include classes($key + '\\:', '');
@include classes('\\!' + $key + '\\:', '!important');
}
@include helpers.breakpoint-media($breakpoint, 'greater') {
@include classes($key + '\\+\\:', '');
@include classes('\\!' + $key + '\\+\\:', '!important');
}
}

100
src/styles/_colors.scss Normal file
View File

@ -0,0 +1,100 @@
@use 'helpers' as helpers;
$dark-colors: (
// https://colorhunt.co/palette/1b262c0f4c753282b8bbe1fa
'text': (221, 221, 221),
'invert': (34, 34, 34),
'red': (255, 69, 58),
'black': (26, 26, 26),
'grey': (28, 28, 30),
'highlight': (50, 215, 75),
'primary': (27, 38, 44),
'second': (15, 76, 117),
'third': (50, 130, 184),
'fourth': (187, 225, 250)
);
$light-colors: (
// https://colorhunt.co/palette/f7fbfcd6e6f2b9d7ea769fcd
'text': (17, 17, 17),
'invert': (238, 238, 238),
'red': (255, 59, 48),
'black': (51, 51, 51),
'highlight': (40, 205, 65),
'primary': (247, 251, 251),
'second': (214, 230, 242),
'third': (185, 215, 234),
'fourth': (118, 159, 205)
);
$shades: (
'100': 0.1,
'150': 0.15,
'200': 0.2,
'250': 0.25,
'300': 0.3,
'350': 0.35,
'400': 0.4,
'450': 0.45,
'500': 0.5,
'550': 0.55,
'600': 0.6,
'650': 0.65,
'700': 0.7,
'750': 0.75,
'800': 0.8,
'850': 0.85,
'900': 0.9,
'950': 0.95,
);
:root {
@each $color, $values in $dark-colors {
@each $shade, $opacity in $shades {
--clr-#{$color}-#{$shade}: rgba(#{$values}, #{$opacity});
--bg-#{$color}-#{$shade}: rgba(#{$values}, #{$opacity});
}
--clr-#{$color}: rgb(#{$values});
--bg-#{$color}: rgb(#{$values});
}
}
@include helpers.media-light() {
@each $color, $values in $light-colors {
@each $shade, $opacity in $shades {
--clr-#{$color}-#{$shade}: rgba(#{$values}, #{$opacity});
--bg-#{$color}-#{$shade}: rgba(#{$values}, #{$opacity});
}
--clr-#{$color}: rgb(#{$values});
--bg-#{$color}: rgb(#{$values});
}
}
@each $color, $values in $dark-colors {
@each $shade, $opacity in $shades {
.clr-#{$color}-#{$shade} {
color: var(--clr-#{$color}-#{$shade});
}
.\!clr-#{$color}-#{$shade} {
color: var(--clr-#{$color}-#{$shade}) !important;
}
.bg-#{$color}-#{$shade} {
background-color: var(--bg-#{$color}-#{$shade});
}
.\!bg-#{$color}-#{$shade} {
background-color: var(--bg-#{$color}-#{$shade}) !important;
}
}
.clr-#{$color} {
color: var(--clr-#{$color});
}
.\!clr-#{$color} {
color: var(--clr-#{$color}) !important;
}
.bg-#{$color} {
background-color: var(--bg-#{$color});
}
.\!bg-#{$color} {
background-color: var(--bg-#{$color}) !important;
}
}

168
src/styles/_emojiFont.scss Normal file
View File

@ -0,0 +1,168 @@
/* [0] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-0.woff2) format('woff2');
unicode-range: U+1f1e6-1f1ff;
}
/* [1] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-1.woff2) format('woff2');
unicode-range: U+200d, U+2620, U+26a7, U+fe0f, U+1f308, U+1f38c, U+1f3c1, U+1f3f3-1f3f4, U+1f6a9, U+e0062-e0063, U+e0065, U+e0067, U+e006c,
U+e006e, U+e0073-e0074, U+e0077, U+e007f;
}
/* [2] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-2.woff2) format('woff2');
unicode-range: U+23, U+2a, U+30-39, U+a9, U+ae, U+200d, U+203c, U+2049, U+20e3, U+2122, U+2139, U+2194-2199, U+21a9-21aa, U+23cf,
U+23e9-23ef, U+23f8-23fa, U+24c2, U+25aa-25ab, U+25b6, U+25c0, U+25fb-25fe, U+2611, U+2622-2623, U+2626, U+262a, U+262e-262f, U+2638,
U+2640, U+2642, U+2648-2653, U+2660, U+2663, U+2665-2666, U+2668, U+267b, U+267e-267f, U+2695, U+269b-269c, U+26a0, U+26a7, U+26aa-26ab,
U+26ce, U+26d4, U+2705, U+2714, U+2716, U+271d, U+2721, U+2733-2734, U+2747, U+274c, U+274e, U+2753-2755, U+2757, U+2764, U+2795-2797,
U+27a1, U+27b0, U+27bf, U+2934-2935, U+2b05-2b07, U+2b1b-2b1c, U+2b55, U+3030, U+303d, U+3297, U+3299, U+fe0f, U+1f170-1f171,
U+1f17e-1f17f, U+1f18e, U+1f191-1f19a, U+1f201-1f202, U+1f21a, U+1f22f, U+1f232-1f23a, U+1f250-1f251, U+1f310, U+1f3a6, U+1f3b5-1f3b6,
U+1f3bc, U+1f3e7, U+1f441, U+1f499-1f49c, U+1f49f-1f4a0, U+1f4a2, U+1f4ac-1f4ad, U+1f4b1-1f4b2, U+1f4b9, U+1f4db, U+1f4f2-1f4f6,
U+1f500-1f50a, U+1f515, U+1f518-1f524, U+1f52f-1f53d, U+1f549, U+1f54e, U+1f5a4, U+1f5e8, U+1f5ef, U+1f6ab, U+1f6ad-1f6b1, U+1f6b3,
U+1f6b7-1f6bc, U+1f6be, U+1f6c2-1f6c5, U+1f6d0-1f6d1, U+1f6d7, U+1f6dc, U+1f7e0-1f7eb, U+1f7f0, U+1f90d-1f90e, U+1f9e1, U+1fa75-1fa77,
U+1faaf;
}
/* [3] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-3.woff2) format('woff2');
unicode-range: U+231a-231b, U+2328, U+23f0-23f3, U+2602, U+260e, U+2692, U+2694, U+2696-2697, U+2699, U+26b0-26b1, U+26cf, U+26d1, U+26d3,
U+2702, U+2709, U+270f, U+2712, U+fe0f, U+1f302, U+1f321, U+1f392-1f393, U+1f3a9, U+1f3bd, U+1f3ee, U+1f3f7, U+1f3fa, U+1f451-1f462,
U+1f484, U+1f489-1f48a, U+1f48c-1f48e, U+1f4a1, U+1f4a3, U+1f4b0, U+1f4b3-1f4b8, U+1f4bb-1f4da, U+1f4dc-1f4f1, U+1f4ff, U+1f50b-1f514,
U+1f516-1f517, U+1f526-1f529, U+1f52c-1f52e, U+1f550-1f567, U+1f56f-1f570, U+1f576, U+1f587, U+1f58a-1f58d, U+1f5a5, U+1f5a8,
U+1f5b1-1f5b2, U+1f5c2-1f5c4, U+1f5d1-1f5d3, U+1f5dc-1f5de, U+1f5e1, U+1f5f3, U+1f6aa, U+1f6ac, U+1f6bd, U+1f6bf, U+1f6c1, U+1f6cb,
U+1f6cd-1f6cf, U+1f6d2, U+1f6e0-1f6e1, U+1f6f0, U+1f97b-1f97f, U+1f9af, U+1f9ba, U+1f9e2-1f9e6, U+1f9ea-1f9ec, U+1f9ee-1f9f4,
U+1f9f7-1f9ff, U+1fa71-1fa74, U+1fa79-1fa7b, U+1fa86, U+1fa91-1fa93, U+1fa96, U+1fa99-1faa0, U+1faa2-1faa7, U+1faaa-1faae;
}
/* [4] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-4.woff2) format('woff2');
unicode-range: U+265f, U+26bd-26be, U+26f3, U+26f8, U+fe0f, U+1f004, U+1f0cf, U+1f380-1f384, U+1f386-1f38b, U+1f38d-1f391, U+1f396-1f397,
U+1f399-1f39b, U+1f39e-1f39f, U+1f3a3-1f3a5, U+1f3a7-1f3a9, U+1f3ab-1f3b4, U+1f3b7-1f3bb, U+1f3bd-1f3c0, U+1f3c5-1f3c6, U+1f3c8-1f3c9,
U+1f3cf-1f3d3, U+1f3f8-1f3f9, U+1f47e, U+1f4e2, U+1f4f7-1f4fd, U+1f52b, U+1f579, U+1f58c-1f58d, U+1f5bc, U+1f6f7, U+1f6f9, U+1f6fc,
U+1f93f, U+1f941, U+1f945, U+1f947-1f94f, U+1f9e7-1f9e9, U+1f9f5-1f9f6, U+1fa70-1fa71, U+1fa80-1fa81, U+1fa83-1fa85, U+1fa87-1fa88,
U+1fa94-1fa95, U+1fa97-1fa98, U+1faa1, U+1faa9;
}
/* [5] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-5.woff2) format('woff2');
unicode-range: U+2693, U+26e9-26ea, U+26f1-26f2, U+26f4-26f5, U+26fa, U+26fd, U+2708, U+fe0f, U+1f301, U+1f303, U+1f306-1f307, U+1f309,
U+1f310, U+1f3a0-1f3a2, U+1f3aa, U+1f3cd-1f3ce, U+1f3d5, U+1f3d7-1f3db, U+1f3df-1f3e6, U+1f3e8-1f3ed, U+1f3ef-1f3f0, U+1f488, U+1f492,
U+1f4ba, U+1f54b-1f54d, U+1f5fa-1f5ff, U+1f680-1f6a2, U+1f6a4-1f6a8, U+1f6b2, U+1f6d1, U+1f6d5-1f6d6, U+1f6dd-1f6df, U+1f6e2-1f6e5,
U+1f6e9, U+1f6eb-1f6ec, U+1f6f3-1f6f6, U+1f6f8, U+1f6fa-1f6fb, U+1f9bc-1f9bd, U+1f9ed, U+1f9f3, U+1fa7c;
}
/* [6] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-6.woff2) format('woff2');
unicode-range: U+2615, U+fe0f, U+1f32d-1f330, U+1f336, U+1f33d, U+1f345-1f37f, U+1f382, U+1f52a, U+1f942-1f944, U+1f950-1f96f, U+1f99e,
U+1f9aa, U+1f9c0-1f9cb, U+1fad0-1fadb;
}
/* [7] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-7.woff2) format('woff2');
unicode-range: U+200d, U+2600-2601, U+2603-2604, U+2614, U+2618, U+26a1, U+26c4-26c5, U+26c8, U+26f0, U+2728, U+2744, U+2b1b, U+2b50,
U+fe0f, U+1f300, U+1f304-1f305, U+1f308, U+1f30a-1f30f, U+1f311-1f321, U+1f324-1f32c, U+1f331-1f335, U+1f337-1f33c, U+1f33e-1f344,
U+1f3d4, U+1f3d6, U+1f3dc-1f3de, U+1f3f5, U+1f400-1f43f, U+1f490, U+1f4a7, U+1f4ab, U+1f4ae, U+1f525, U+1f54a, U+1f573, U+1f577-1f578,
U+1f648-1f64a, U+1f940, U+1f980-1f9ae, U+1f9ba, U+1fa90, U+1faa8, U+1fab0-1fabd, U+1fabf, U+1face-1facf, U+1fae7;
}
/* [8] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-8.woff2) format('woff2');
unicode-range: U+200d, U+2640, U+2642, U+2695-2696, U+26f7, U+26f9, U+2708, U+2764, U+fe0f, U+1f33e, U+1f373, U+1f37c, U+1f384-1f385,
U+1f393, U+1f3a4, U+1f3a8, U+1f3c2-1f3c4, U+1f3c7, U+1f3ca-1f3cc, U+1f3eb, U+1f3ed, U+1f3fb-1f3ff, U+1f466-1f478, U+1f47c, U+1f481-1f483,
U+1f486-1f487, U+1f48b, U+1f48f, U+1f491, U+1f4bb-1f4bc, U+1f527, U+1f52c, U+1f574-1f575, U+1f57a, U+1f645-1f647, U+1f64b, U+1f64d-1f64e,
U+1f680, U+1f692, U+1f6a3, U+1f6b4-1f6b6, U+1f6c0, U+1f6cc, U+1f91d, U+1f926, U+1f930-1f931, U+1f934-1f93a, U+1f93c-1f93e, U+1f977,
U+1f9af-1f9b3, U+1f9b8-1f9b9, U+1f9bc-1f9bd, U+1f9cc-1f9cf, U+1f9d1-1f9df, U+1fa82, U+1fac3-1fac5;
}
/* [9] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-9.woff2) format('woff2');
unicode-range: U+200d, U+261d, U+2620, U+2639-263a, U+2665, U+270a-270d, U+2728, U+2763-2764, U+2b50, U+fe0f, U+1f31a-1f31f, U+1f32b,
U+1f383, U+1f389, U+1f3fb-1f3ff, U+1f440-1f450, U+1f463-1f465, U+1f479-1f47b, U+1f47d-1f480, U+1f485, U+1f48b-1f48c, U+1f493-1f49f,
U+1f4a4-1f4a6, U+1f4a8-1f4ab, U+1f4af, U+1f525, U+1f573, U+1f590, U+1f595-1f596, U+1f5a4, U+1f5e3, U+1f600-1f644, U+1f648-1f64a, U+1f64c,
U+1f64f, U+1f90c-1f925, U+1f927-1f92f, U+1f932-1f933, U+1f970-1f976, U+1f978-1f97a, U+1f9a0, U+1f9b4-1f9b7, U+1f9bb, U+1f9be-1f9bf,
U+1f9d0, U+1f9e0-1f9e1, U+1fa75-1fa79, U+1fac0-1fac2, U+1fae0-1fae6, U+1fae8, U+1faf0-1faf8;
}
/* [10] */
@font-face {
font-family: 'Firefox Emoji';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
local('Noto Color Emoji'),
local('Twemoji Mozilla'),
url(/fonts/firefox-emoji-10.woff2) format('woff2');
unicode-range: U+200d, U+2194-2195, U+2640, U+2642, U+26d3, U+27a1, U+fe0f, U+1f344, U+1f34b, U+1f3c3, U+1f3fb-1f3ff, U+1f426,
U+1f468-1f469, U+1f4a5, U+1f525, U+1f642, U+1f6b6, U+1f7e9, U+1f7eb, U+1f9af, U+1f9bc-1f9bd, U+1f9ce, U+1f9d1-1f9d2;
}

35
src/styles/_grids.scss Normal file
View File

@ -0,0 +1,35 @@
@use 'variables' as vars;
.content-grid {
$breakout-max-add-width: 7.5rem;
display: grid;
column-gap: 0 !important;
padding-inline: 0 !important;
grid-template-columns:
[full-content-start]
minmax(calc(vars.$body-padding-left), 1fr)
[breakout-start]
minmax(0, calc(var(--breakout-size, $breakout-max-add-width) / 2))
[content-start]
min(100% - (vars.$body-padding-left + vars.$body-padding-right), var(--content-width, vars.$section-width))
[content-end]
minmax(0, calc(var(--breakout-size, $breakout-max-add-width) / 2))
[breakout-end]
minmax(calc(vars.$body-padding-right), 1fr)
[full-content-end];
> {
*:not(.breakout, .full-content) {
grid-column: content;
}
.breakout {
grid-column: breakout;
}
.full-content {
grid-column: full-content;
}
}
}

33
src/styles/_helpers.scss Normal file
View File

@ -0,0 +1,33 @@
@use 'variables' as vars;
@mixin breakpoint-media($query, $direction: smaller) {
@if map-has-key(vars.$breakpoints, $query) {
$breakpoint: map-get(vars.$breakpoints, $query);
@if $direction != 'smaller' {
@media (width > $breakpoint) {
@content;
}
} @else {
@media (width < $breakpoint) {
@content;
}
}
} @else {
@if $direction != 'smaller' {
@media (width > $query) {
@content;
}
} @else {
@media (width < $query) {
@content;
}
}
}
}
@mixin media-light() {
:root:has(#theme-switcher:checked) {
@content;
}
}

View File

@ -0,0 +1,96 @@
@use 'variables' as vars;
@use 'helpers' as helpers;
$variable-font-sizes: (
100: clamp(0.5rem, 2.5vw, 0.75rem),
150: clamp(0.5rem, 2.5vw, 1rem),
200: clamp(0.75rem, 2.5vw, 1rem),
250: clamp(0.75rem, 2.5vw, 1.25rem),
275: clamp(0.875rem, 2.75vw, 1.25rem),
300: clamp(1rem, 3vw, 1.5rem),
350: clamp(1rem, 3vw, 2rem),
400: clamp(1.25rem, 3.5vw, 2rem),
450: clamp(1.25rem, 3.5vw, 2.5rem),
500: clamp(1.5rem, 3.5vw, 2rem),
550: clamp(1.5rem, 3.5vw, 2.5rem),
600: clamp(2rem, 4vw, 3rem),
650: clamp(2rem, 4vw, 4rem),
700: clamp(2.5rem, 4.5vw, 4rem),
750: clamp(2.5rem, 4.5vw, 5rem),
800: clamp(3rem, 5vw, 5rem),
850: clamp(3rem, 5vw, 6rem),
900: clamp(3.5rem, 5.5vw, 6rem),
950: clamp(3.5rem, 5.5vw, 7rem),
);
$font-sizes: (
100: 0.25rem,
150: 0.5rem,
200: 0.75rem,
250: 1rem,
300: 1.25rem,
350: 1.5rem,
400: 1.75rem,
450: 2rem,
500: 2.25rem,
550: 2.5rem,
600: 2.75rem,
650: 3rem,
700: 3.25rem,
750: 3.5rem,
800: 3.75rem,
850: 4rem,
900: 4.25rem,
);
$font-weights: 100, 200, 300, 400, 500, 600, 700, 800, 900;
:root {
font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Firefox Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
@each $size, $font-size in $variable-font-sizes {
--vfs-#{$size}: #{$font-size};
}
@each $size, $font-size in $font-sizes {
--fs-#{$size}: #{$font-size};
}
@each $size in $font-weights {
--fw-#{$size}: #{$size};
}
}
@mixin typography($prefix, $suffix) {
@each $size, $_ in $variable-font-sizes {
.#{$prefix}vfs-#{$size} {
font-size: var(--vfs-#{$size}) #{$suffix};
}
}
@each $size, $_ in $font-sizes {
.#{$prefix}fs-#{$size} {
font-size: var(--fs-#{$size}) #{$suffix};
}
}
@each $size in $font-weights {
.#{$prefix}fw-#{$size} {
font-weight: var(--fw-#{$size}) #{$suffix};
}
}
}
@include typography('', '');
@include typography('\\!', '!important');
@each $key, $breakpoint in vars.short-breakpoints() {
@include helpers.breakpoint-media($breakpoint) {
@include typography($key + '\\:', '');
@include typography('\\!' + $key + '\\:', '!important');
}
@include helpers.breakpoint-media($breakpoint, 'greater') {
@include typography($key + '\\+\\:', '');
@include typography('\\!' + $key + '\\+\\:', '!important');
}
}

View File

@ -0,0 +1,35 @@
@use 'sass:string';
@use 'sass:list';
$body-padding-top: 2.5rem;
$body-padding-right: 1.5rem;
$body-padding-bottom: 2.5rem;
$body-padding-left: 1.5rem;
$body-padding-block: $body-padding-top $body-padding-bottom;
$body-padding-inline: $body-padding-right $body-padding-left;
$body-padding: $body-padding-top $body-padding-right $body-padding-bottom $body-padding-left;
$section-width: 75rem;
$breakpoints: (
extra-extra-large: 1400px,
extra-large: 1200px,
large: 992px,
medium: 768px,
small: 576px,
extra-small: 420px,
extra-extra-small: 340px,
);
@function short-breakpoints() {
$list: ();
@each $key, $val in $breakpoints {
$subString: '';
@each $sub in string.split($key, '-') {
$subString: $subString + string.slice($sub, 1, 1);
}
$list: list.append($list, ($subString, $key));
}
@return $list;
}

191
src/styles/global.scss Normal file
View File

@ -0,0 +1,191 @@
@use 'variables' as vars;
// @HACK: filenames in astro are a mess, so I write this to identify this stylesheet
.global-style-file {
only-for: a-hack;
}
:root {
scroll-padding-top: 4.5rem;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
font-style: normal;
line-height: 1.6;
min-width: 0;
}
*:where(:not(svg):not(g):not(path)),
*:where(:not(svg):not(g):not(path))::before,
*:where(:not(svg):not(g):not(path))::after {
color: var(--clr-text);
}
*:focus-visible {
outline: 2px solid var(--clr-highlight-600);
border: none;
border-radius: 0.25rem;
}
/* width */
::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
/* Track */
::-webkit-scrollbar-track {
background: var(--bg-second);
border-radius: 0.5rem;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: var(--bg-third);
border-radius: 0.5rem;
}
body {
padding: 0;
min-height: 100vh;
min-height: 100svh;
display: flex;
flex-direction: column;
overflow-x: clip;
}
main {
padding-top: vars.$body-padding-top;
padding-bottom: vars.$body-padding-bottom;
row-gap: var(--main-gap);
}
@media (prefers-reduced-motion: reduce) {
* {
transition-property: none !important;
transition-duration: none !important;
transition-timing-function: none !important;
transition-delay: none !important;
animation: none !important;
}
}
h1,
h2,
h3,
h4,
h5,
h6 {
text-wrap: balance;
letter-spacing: -1px;
line-height: 1.3;
}
h1 {
font-size: var(--vfs-800);
}
h2 {
font-size: var(--vfs-700);
}
h3 {
font-size: var(--vfs-500);
}
button,
label[for],
a[href]:not([href='']) {
cursor: pointer;
}
a[href]:not([href='']):hover,
a[href]:not([href='']):focus-visible {
filter: opacity(0.75);
}
button {
font-size: 1rem;
border-radius: 0.5rem;
border: none;
padding: 1rem;
}
p {
text-wrap: balance;
text-wrap: pretty;
word-break: break-word;
hyphens: auto;
max-width: 80ch;
}
img,
picture {
display: block;
max-width: 100%;
max-height: 100%;
font-style: italic;
background-repeat: no-repeat;
background-size: cover;
}
picture {
max-width: fit-content;
max-height: fit-content;
}
use {
all: inherit;
}
input {
font-size: 2rem;
line-height: 1;
}
[hidden]:not(.focusable) {
display: none !important;
}
[hidden].focusable {
display: block !important;
position: absolute;
left: -9999px;
width: 1px;
height: 1px;
overflow: hidden;
opacity: 0;
}
section,
article {
padding-top: calc(vars.$body-padding-top / 2);
padding-bottom: calc(vars.$body-padding-bottom / 2);
text-wrap: balance;
overflow-wrap: break-word;
font-size: var(--vfs-275);
}
h1 ~ :where(section, article) {
display: flex;
flex-direction: column;
row-gap: 0.75rem;
}

23
tsconfig.json Normal file
View File

@ -0,0 +1,23 @@
{
"extends": "astro/tsconfigs/strictest",
"compilerOptions": {
"baseUrl": ".",
"verbatimModuleSyntax": true,
"paths": {
"@/*": ["*"],
"@public/*": ["public/*"],
"@src/*": ["src/*"],
"@components/*": ["src/components/*"],
"@i18n/*": ["src/i18n/*"],
"@layouts/*": ["src/layouts/*"],
"@pages/*": ["src/pages/*"],
"@shared/*": ["src/shared/*"],
"@styles/*": ["src/styles/*"],
},
"plugins": [
{
"name": "@astrojs/ts-plugin",
},
],
},
}