This commit is contained in:
nomadics9 2024-12-11 17:25:57 +03:00
commit 380fbfb041
144 changed files with 5531 additions and 0 deletions

13
.eslintignore Normal file
View file

@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

20
.eslintrc.cjs Normal file
View file

@ -0,0 +1,20 @@
module.exports = {
root: true,
extends: ['eslint:recommended', 'prettier'],
plugins: ['svelte3'],
overrides: [
{
files: ['*.svelte'],
processor: 'svelte3/svelte3'
}
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
}
};

15
.gitignore vendored Normal file
View file

@ -0,0 +1,15 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.histoire
.jampack
.bun.lockb
/static/CV.pdf
old-posts

1
.npmrc Normal file
View file

@ -0,0 +1 @@
engine-strict=true

13
.prettierignore Normal file
View file

@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

9
.prettierrc Normal file
View file

@ -0,0 +1,9 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}

11
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,11 @@
{
"cssVariables.lookupFiles": ["**/*.css", "**/*.scss", "**/*.sass", "**/*.less"],
"editor.formatOnSave": true,
"prettier.singleQuote": true,
"frontMatter.preview.host": "http://localhost:5173/",
"frontMatter.framework.startCommand": "npm run dev",
"frontMatter.content.autoUpdateDate": false,
"frontMatter.content.fmHighlight": true,
"frontMatter.content.publicFolder": "static",
"files.autoSave": "afterDelay"
}

675
LICENSE Normal file
View file

@ -0,0 +1,675 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is 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. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
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.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
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 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. Use with the GNU Affero General Public License.
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 Affero 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 special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 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 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 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 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
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 GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

1
README.md Normal file
View file

@ -0,0 +1 @@
https://alaskar.dev

BIN
bun.lockb Executable file

Binary file not shown.

73
frontmatter.json Normal file
View file

@ -0,0 +1,73 @@
{
"$schema": "https://frontmatter.codes/frontmatter.schema.json",
"frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"previewPath": null,
"defaultFileName": "+page",
"pageBundle": true,
"fields": [
{
"title": "Title",
"name": "title",
"type": "string"
},
{
"title": "Slug",
"name": "slug",
"type": "string",
"default": "{{slug}}"
},
{
"title": "Cover Image",
"name": "coverImage",
"type": "image",
"isPreviewImage": true
},
{
"title": "Excerpt",
"name": "excerpt",
"type": "string"
},
{
"title": "Publishing date",
"name": "date",
"type": "datetime",
"default": "{{now}}",
"isPublishDate": true
},
{
"title": "Last modified date",
"name": "updated",
"type": "datetime",
"isModifiedDate": true
},
{
"title": "Is hidden",
"name": "hidden",
"type": "draft",
"default": false
},
{
"title": "Tags",
"name": "tags",
"type": "tags"
},
{
"title": "Keywords",
"name": "keywords",
"type": "list"
}
]
}
],
"frontMatter.framework.id": "other",
"frontMatter.content.publicFolder": "",
"frontMatter.content.pageFolders": [
{
"title": "posts",
"path": "[[workspace]]/src/routes/(blog-article)",
"filePrefix": null
}
]
}

18
histoire.config.js Normal file
View file

@ -0,0 +1,18 @@
import { defaultColors, defineConfig } from 'histoire';
import { HstSvelte } from '@histoire/plugin-svelte';
export default defineConfig({
plugins: [HstSvelte()],
theme: {
title: 'Histoire',
logo: {
square: './static/favicons/favicon.png',
light: './static/favicons/favicon.png',
dark: './static/favicons/favicon.png'
},
favicon: './static/favicons/favicon.ico',
colors: {
primary: defaultColors.purple
}
}
});

17
jsconfig.json Normal file
View file

@ -0,0 +1,17 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}

54
package.json Normal file
View file

@ -0,0 +1,54 @@
{
"name": "sager-alaskar-portofolio",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vite dev --host",
"build": "vite build",
"push": "rsync -avz --progress --delete build/ root@nmd.mov:/var/www/portofolio",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"story:dev": "histoire dev",
"story:build": "histoire build",
"story:preview": "histoire preview",
"optimize-images": "image-transmutation --run --sourceFolder './build/images' --targetFolder './build/images' --inputFormats 'jpg' --inputFormats 'jpeg' --inputFormats 'png' --outputFormats 'png' --outputFormats 'webp' --outputFormats 'avif'",
"postbuild": "bun run optimize-images && svelte-sitemap --domain https://alaskar.dev/",
"vercel-sitemap": "svelte-sitemap --out-dir .vercel/output/static --domain https://sveltekit-static-blog-template.vercel.app/",
"vercel-optimize-images": "image-transmutation --run --sourceFolder '.vercel/output/static/images' --targetFolder '.vercel/output/static/images' --inputFormats 'jpg' --inputFormats 'jpeg' --inputFormats 'png' --outputFormats 'png' --outputFormats 'webp' --outputFormats 'avif'",
"vercel-build": "npm run build && npm run vercel-sitemap && npm run vercel-optimize-images"
},
"devDependencies": {
"@histoire/plugin-svelte": "^0.16.1",
"@sveltejs/adapter-static": "^2.0.1",
"@sveltejs/kit": "^1.0.0",
"dateformat": "^5.0.3",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^4.0.0",
"histoire": "^0.16.1",
"image-transmutation": "^1.0.1",
"mdsvex": "^0.10.6",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"reading-time": "^1.5.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-external-links": "^2.0.1",
"rehype-slug": "^5.1.0",
"sass": "^1.57.1",
"striptags": "^3.2.0",
"svelte": "^3.54.0",
"svelte-check": "^2.9.2",
"svelte-sitemap": "^2.5.4",
"typescript": "^4.9.3",
"vite": "^4.1.1"
},
"type": "module",
"dependencies": {
"@fontsource/inter": "^4.5.15",
"@fontsource/merriweather": "^4.5.14",
"@fontsource/ubuntu-mono": "^4.5.11"
}
}

19
src/app.d.ts vendored Normal file
View file

@ -0,0 +1,19 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
// and what to do when importing types
declare namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
declare module "*&imagetools" {
/**
* actual types
* - code https://github.com/JonasKruckenberg/imagetools/blob/main/packages/core/src/output-formats.ts
* - docs https://github.com/JonasKruckenberg/imagetools/blob/main/docs/guide/getting-started.md#metadata
*/
const out;
export default out;
}

74
src/app.html Normal file
View file

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- Favicon -->
<link
rel="apple-touch-icon"
sizes="180x180"
href="%sveltekit.assets%/favicons/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="%sveltekit.assets%/favicons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="%sveltekit.assets%/favicons/favicon-16x16.png"
/>
<link rel="manifest" href="%sveltekit.assets%/favicons/site.webmanifest" />
<link
rel="mask-icon"
href="%sveltekit.assets%/favicons/safari-pinned-tab.svg"
color="#0ca4a5"
/>
<link rel="shortcut icon" href="%sveltekit.assets%/favicons/favicon.ico" />
<link rel="icon" href="%sveltekit.assets%/favicons/favicon.ico" />
<!-- Tell browser this site is responsive -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Tell browser this site supports light and dark mode -->
<meta name="color-scheme" content="light dark" />
<!-- Color for browser url bar in mobile/Safari -->
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#b28cf2" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#4612A1" />
<!-- Disable Google FLOC -->
<meta http-equiv="Permissions-Policy" content="interest-cohort=()" />
<script>
// Calling this here so that it loads as quickly as possible
// Avoiding a flash of light mode in case dark mode is used
const theme = localStorage.getItem('theme-preference') || 'auto';
document.firstElementChild?.setAttribute('data-theme', theme);
</script>
%sveltekit.head%
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//az.askar.tv/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body data-sveltekit-preload-data="hover">
<div id="svelte-root">%sveltekit.body%</div>
</body>
</html>

View file

@ -0,0 +1,51 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { ComponentProps } from 'svelte';
import type { Hst } from '@histoire/plugin-svelte';
import Button from './Button.svelte';
import type { NoUndefinedField } from '$lib/utils/types';
import Icon from '$lib/icons/chat.svelte';
export let Hst: Hst;
let props: NoUndefinedField<ComponentProps<Button>> = {
color: 'primary',
style: 'solid',
size: 'medium',
href: '',
target: '_blank',
rel: 'noopener noreferrer'
};
let text = 'This is a Button';
</script>
<Hst.Story title="Atoms/Button" layout={{ type: 'grid', width: 400 }}>
<svelte:fragment slot="controls">
<Hst.Text bind:value={text} title="Text" />
<Hst.Select bind:value={props.color} title="color" options={['primary', 'secondary']} />
<Hst.Select
bind:value={props.style}
title="Style"
options={['solid', 'understated', 'clear']}
/>
<Hst.Select bind:value={props.size} title="Size" options={['small', 'medium', 'large']} />
<Hst.Text bind:value={props.href} title="Href" />
<Hst.Select bind:value={props.target} title="Target" options={['_self', '_blank']} />
<Hst.Text bind:value={props.rel} title="Rel" />
</svelte:fragment>
<div style="padding: 12px;">
<Hst.Variant title="No Icon">
<Button {...props}>
{text}
</Button>
</Hst.Variant>
<Hst.Variant title="With Icon">
<Button {...props}>
<Icon slot="icon" />
{text}
</Button>
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,132 @@
<script lang="ts">
import { HttpRegex } from '$lib/utils/regex';
export let color: 'primary' | 'secondary' = 'primary';
export let style: 'solid' | 'understated' | 'clear' = 'solid';
export let size: 'small' | 'medium' | 'large' = 'medium';
export let href: string | undefined = undefined;
export let additionalClass: string | undefined = undefined;
const isExternalLink = !!href && HttpRegex.test(href);
export let target: '_self' | '_blank' = isExternalLink ? '_blank' : '_self';
export let rel = isExternalLink ? 'noopener noreferrer' : undefined;
$: tag = href ? 'a' : 'button';
$: linkProps = {
href,
target,
rel
};
</script>
<svelte:element
this={tag}
{...linkProps}
class={['button', `style--${style}`, `size--${size}`, `color--${color}`, additionalClass].join(
' '
)}
data-sveltekit-preload-data
on:click
{...$$restProps}
>
{#if $$slots['icon']}
<div class="icon">
<slot name="icon" />
</div>
{/if}
<slot />
</svelte:element>
<style lang="scss">
.button {
--main-color: red;
--light-color: blue;
--contrast-color: green;
-webkit-appearance: none;
appearance: none;
cursor: pointer;
text-decoration: none;
transition: all 0.2s ease-in-out;
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
border: none;
border-radius: 20px;
font-weight: 700;
.icon {
width: 24px;
height: 24px;
}
&.color {
&--primary {
--main-color: var(--color--primary-rgb);
--light-color: var(--color--primary-tint-rgb);
--contrast-color: var(--color--primary-contrast);
}
&--secondary {
--main-color: var(--color--secondary-rgb);
--light-color: var(--color--secondary-tint-rgb);
--contrast-color: var(--color--secondary-contrast);
}
}
&.style {
&--solid {
background-color: rgb(var(--main-color));
color: var(--contrast-color);
&:hover {
box-shadow: 0px 0px 1px 7px rgba(var(--main-color), 0.3);
}
}
&--understated {
background-color: rgb(var(--light-color));
color: rgb(var(--main-color));
&:hover {
box-shadow: 0px 0px 1px 7px rgba(var(--main-color), 0.3);
}
}
&--clear {
background-color: transparent;
color: rgb(var(--main-color));
&:hover {
background-color: rgb(var(--light-color));
}
}
}
&.size {
&--small {
padding: 5px 10px;
font-size: 0.75rem;
.icon {
width: 20px;
height: 20px;
}
}
&--medium {
padding: 10px 20px;
font-size: 1rem;
}
&--large {
padding: 15px 30px;
font-size: 1.15rem;
.icon {
width: 28px;
height: 28px;
}
}
}
}
</style>

View file

@ -0,0 +1,36 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import Card from './Card.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Atoms/Card" layout={{ type: 'grid', width: 400 }}>
<div style="padding: 10px;">
<Hst.Variant title="Default">
<Card>
<div slot="content">Card Content</div>
<div slot="footer">Footer</div>
</Card>
</Hst.Variant>
<Hst.Variant title="With Image">
<Card>
<img slot="image" src="https://placedog.net/500" alt="A cute dog" />
<div slot="content">
Cards with images will automatically adapt between showing the image on top or bottom
depending on how wide it is.
</div>
</Card>
</Hst.Variant>
<Hst.Variant title="With Link">
<Card href="#">
<img slot="image" src="https://placedog.net/500" alt="A cute dog" />
<div slot="content">Card Content</div>
<div slot="footer">Footer</div>
</Card>
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,99 @@
<script lang="ts">
import { HttpRegex } from '$lib/utils/regex';
export let additionalClass: string | undefined = undefined;
export let href: string | undefined = undefined;
const isExternalLink = !!href && HttpRegex.test(href);
export let target: '_self' | '_blank' = isExternalLink ? '_blank' : '_self';
export let rel = isExternalLink ? 'noopener noreferrer' : undefined;
$: tag = href ? 'a' : 'article';
$: linkProps = {
href,
target,
rel
};
</script>
<svelte:element
this={tag}
class="card {additionalClass}"
{...linkProps}
data-sveltekit-preload-data
{...$$restProps}
>
{#if $$slots.image}
<div class="image">
<slot name="image" />
</div>
{/if}
<div class="body">
<div class="content">
<slot name="content" />
</div>
{#if $$slots.footer}
<div class="footer">
<slot name="footer" />
</div>
{/if}
</div>
</svelte:element>
<style lang="scss">
.card {
background: var(--color--card-background);
box-shadow: var(--card-shadow);
color: var(--color--text);
border-radius: 10px;
transition: all 0.4s ease;
position: relative;
overflow: hidden;
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
text-decoration: none;
&[href],
&[onclick] {
cursor: pointer;
&:hover {
box-shadow: var(--card-shadow-hover);
transform: scale(1.01);
}
}
}
.body {
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 10px;
padding: 20px 20px;
flex: 1 0 50%;
.content {
display: flex;
flex-direction: column;
flex: 1;
}
}
.image {
position: relative;
flex: 1 0 max(50%, 330px);
// height: min(100%, 300px);
min-height: 280px;
max-height: 350px;
}
:global(.card [slot='image']) {
width: 100%;
height: 100%;
object-fit: cover;
position: absolute;
}
</style>

View file

@ -0,0 +1,48 @@
<script lang="ts">
import { dev } from '$app/environment';
export let src: string;
export let alt: string;
export let fullBleed: boolean | undefined = undefined;
export let formats: string[] = ['avif', 'webp', 'png'];
export let widths: string[] | undefined = undefined;
$: fileName = src.split('.')[0];
function buildSrcset() {
if (dev) return;
let srcset = '';
if (widths) {
for (let i = 0; i < widths.length; i++) {
srcset += `${fileName}-${widths[i]}.${formats[0]} ${widths[i]}w`;
if (i < widths.length - 1) {
srcset += ', ';
}
}
} else {
for (let i = 0; i < formats.length; i++) {
srcset += `${fileName}.${formats[i]}`;
if (i < formats.length - 1) {
srcset += ', ';
}
}
}
return srcset;
}
</script>
<img srcset={buildSrcset()} {src} {alt} loading="lazy" decoding="async" class:full-bleed={fullBleed} />
<style lang="scss">
img {
width: 100%;
height: 100%;
object-fit: contain;
}
</style>

View file

@ -0,0 +1,17 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import Logo from '$lib/components/atoms/Logo.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Atoms/Logo" layout={{ type: 'grid', width: 400 }}>
<Hst.Variant title="Animated">
<Logo animated={true} />
</Hst.Variant>
<Hst.Variant title="Static">
<Logo animated={false} />
</Hst.Variant>
</Hst.Story>

View file

@ -0,0 +1,81 @@
<script>
export let animated = true;
</script>
<div class="logo" class:animated>
<svg
id="logo-text"
width="723.84009"
height="116.720268"
viewBox="0 0 723.84009 116.720269"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<text xml:space="preserve" id="text" transform="translate(-278.77228,-206.83728)"
><tspan x="275.57227" y="292.17088" id="tspan1319"
><tspan style="font-size:106.667px;font-family:monospace;" id="tspan1317">Alaskar.dev</tspan
></tspan
></text
>
</svg>
</div>
<style lang="scss">
@import '$lib/scss/breakpoints.scss';
.logo {
width: auto;
height: 100%;
display: flex;
gap: 16px;
align-items: center;
@include for-phone-only {
gap: 8px;
}
#logo-text {
width: auto;
height: 100%;
max-height: 28px;
#text {
transition: all 0.2s ease-in-out;
fill: var(--color--text);
}
}
&:hover {
#logo-text {
filter: drop-shadow(0px 0px 3px var(--color--primary));
}
}
}
@media screen and (prefers-reduced-motion: no-preference) {
.animated {
#icon {
> path {
--text-color: var(--color--text-shade);
stroke-width: 2;
animation: svg-text-stroke 3s;
}
#darker {
> path {
--text-color: var(--color--text);
stroke-width: 2;
animation: svg-text-stroke 3s;
}
}
}
#text {
animation: svg-text-stroke 3s;
stroke-width: 2;
--text-color: var(--color--text);
}
}
}
</style>

View file

@ -0,0 +1,22 @@
<script lang="ts">
import RssIcon from '$lib/icons/rss.svelte';
</script>
<a href="/rss.xml" target="_blank" rel="noopener noreferrer" title="Subscribe to my RSS Feed">
<RssIcon />
</a>
<style lang="scss">
a {
transition: all 0.2s ease-in-out;
width: 24px;
color: var(--color--text);
fill: var(--color--text);
&:hover {
color: var(--color--primary);
fill: var(--color--primary);
filter: drop-shadow(0px 0px 3px var(--color--primary));
}
}
</style>

View file

@ -0,0 +1,55 @@
<script lang="ts">
export let color: string;
export let size: string;
export let style: any;
</script>
<div class="wrapper" style="top: {style.top}; left: {style.left};">
<svg
width={size}
height={size}
viewBox="0 0 160 160"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M80 0C80 0 84.2846 41.2925 101.496 58.504C118.707 75.7154 160 80 160 80C160 80 118.707 84.2846 101.496 101.496C84.2846 118.707 80 160 80 160C80 160 75.7154 118.707 58.504 101.496C41.2925 84.2846 0 80 0 80C0 80 41.2925 75.7154 58.504 58.504C75.7154 41.2925 80 0 80 0Z"
fill={color}
/>
</svg>
</div>
<style lang="scss">
.wrapper {
position: absolute;
pointer-events: none;
display: flex;
z-index: 2;
animation: grow-and-shrink 900ms ease-in-out forwards;
svg {
animation: spin 900ms linear forwards;
}
}
@keyframes grow-and-shrink {
0% {
transform: scale(0);
}
50% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(180deg);
}
}
</style>

View file

@ -0,0 +1,32 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { ComponentProps } from 'svelte';
import type { Hst } from '@histoire/plugin-svelte';
import Sparkles from './Sparkles.svelte';
import type { NoUndefinedField } from '$lib/utils/types';
import Button from '$lib/components/atoms/Button.svelte';
export let Hst: Hst;
let props: NoUndefinedField<ComponentProps<Sparkles>> = {
color: 'default'
};
</script>
<Hst.Story title="Atoms/Sparkles">
<svelte:fragment slot="controls">
<Hst.Select
bind:value={props.color}
title="color"
options={['default', 'primary', 'secondary']}
/>
</svelte:fragment>
<div style="padding: 12px;">
<Hst.Variant title="Default">
<Sparkles {...props}>
<Button>Sparkles can be added anywhere</Button>
</Sparkles>
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,71 @@
<script lang="ts">
import Sparkle from '$lib/components/atoms/SingleSparkle.svelte';
import type { SparkleType } from '$lib/utils/types';
import { onDestroy, onMount } from 'svelte';
const random = (min: number, max: number) => Math.floor(Math.random() * (max - min)) + min;
export let color: 'default' | 'primary' | 'secondary' = 'default';
const generateSparkle = (): SparkleType => {
return {
id: String(random(10000, 99999)),
createdAt: Date.now(),
color:
color === 'primary'
? 'var(--color--primary)'
: color === 'secondary'
? 'var(--color--secondary)'
: 'var(--color--yellow',
size: random(10, 20),
style: {
// Pick a random spot in the available space
top: random(-10, 80) + '%',
left: random(0, 100) + '%'
}
};
};
let sparkles: SparkleType[] = [];
let sparklesInterval: NodeJS.Timer;
onMount(() => {
sparklesInterval = setInterval(() => {
const now = Date.now();
// Create a new sparkle
const sparkle = generateSparkle();
// Clean up any "expired" sparkles
const nextSparkles = sparkles.filter((sparkle) => {
const delta = now - sparkle.createdAt;
return delta < 1500;
});
// Include our new sparkle
nextSparkles.push(sparkle);
sparkles = nextSparkles;
}, 400);
});
onDestroy(() => {
clearInterval(sparklesInterval);
});
</script>
<div class="sparkle-wrapper">
{#each sparkles as sparkle (sparkle.id)}
<Sparkle color={sparkle.color} size={sparkle.size} style={sparkle.style} />
{/each}
<span class="slot-wrapper">
<slot />
</span>
</div>
<style lang="scss">
.sparkle-wrapper {
position: relative;
display: inline-block;
.slot-wrapper {
position: relative;
z-index: 1;
}
}
</style>

View file

@ -0,0 +1,17 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import Tag from './Tag.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Atoms/Tag" layout={{ type: 'grid', width: 200 }}>
<Hst.Variant title="Primary">
<Tag>This is a Tag</Tag>
</Hst.Variant>
<Hst.Variant title="Secondary">
<Tag color="secondary">This is a Tag</Tag>
</Hst.Variant>
</Hst.Story>

View file

@ -0,0 +1,31 @@
<script lang="ts">
export let color: 'primary' | 'secondary' = 'primary';
</script>
<div class="tag {color}">
<slot />
</div>
<style lang="scss">
.tag {
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
padding: 5px 15px;
border-radius: 10px;
font-weight: 500;
font-size: 0.85rem;
width: fit-content;
white-space: nowrap;
&.primary {
background-color: var(--color--primary-tint);
color: #5d5f65;
}
&.secondary {
background-color: var(--color--secondary-tint);
color: var(--color--secondary);
}
}
</style>

View file

@ -0,0 +1,32 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import BlogPostCard from './BlogPostCard.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Molecules/Blog Post Card" layout={{ type: 'grid', width: 400 }}>
<div style="padding: 12px;">
<Hst.Variant title="Default">
<BlogPostCard
slug="blog-post"
title="Blog Post"
coverImage="https://placedog.net/500"
excerpt="This is a blog post"
tags={['Tag 1', 'Tag 2']}
readingTime="5 min read"
/>
</Hst.Variant>
<Hst.Variant title="No Image">
<BlogPostCard
slug="blog-post"
title="Blog Post"
excerpt="This is a blog post"
tags={['Tag 1', 'Tag 2']}
readingTime="5 min read"
/>
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,97 @@
<script lang="ts">
import Card from '$lib/components/atoms/Card.svelte';
import Tag from '$lib/components/atoms/Tag.svelte';
import Image from '../atoms/Image.svelte';
export let title: string;
export let coverImage: string | undefined = undefined;
export let excerpt: string;
export let slug: string;
export let tags: string[] | undefined;
export let readingTime: string | undefined = undefined;
export let showImage = true;
</script>
<Card
href="/{slug}"
target="_self"
additionalClass="blog-post-card {!showImage || !coverImage ? 'no-image' : ''}"
>
<div class="image" slot="image">
{#if coverImage}
<Image src={coverImage} alt="Cover image of this blog post" />
{/if}
</div>
<div class="content" slot="content">
<p class="title">
{title}
</p>
{#if readingTime}
<div class="note">{readingTime}</div>
{/if}
{#if excerpt}
<p class="text">
{excerpt}
</p>
{/if}
</div>
<div class="footer" slot="footer">
{#if tags?.length}
<div class="tags">
{#each tags.slice(0, 2) as tag}
<Tag>{tag}</Tag>
{/each}
</div>
{/if}
</div>
</Card>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
gap: 0px;
align-items: flex-start;
}
.title {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-size: 1.2rem;
font-family: var(--font--title);
font-weight: 700;
}
.tags {
display: flex;
align-items: center;
gap: 5px;
flex-wrap: wrap;
}
.note {
font-size: 0.8rem;
color: rgba(var(--color--text-rgb), 0.8);
}
.text {
margin-top: 5px;
font-size: 0.9rem;
text-align: justify;
}
.footer {
margin-top: 20px;
}
:global(.blog-post-card .image img) {
object-fit: cover;
}
:global(.blog-post-card.no-image > .image) {
display: none;
}
</style>

View file

@ -0,0 +1,33 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { ComponentProps } from 'svelte';
import type { Hst } from '@histoire/plugin-svelte';
import Callout from './Callout.svelte';
import type { NoUndefinedField } from '$lib/utils/types';
export let Hst: Hst;
let props: NoUndefinedField<ComponentProps<Callout>> = {
type: 'info'
};
</script>
<Hst.Story title="Molecules/Callout">
<svelte:fragment slot="controls">
<Hst.Select
bind:value={props.type}
title="color"
options={['info', 'warning', 'error', 'success']}
/>
</svelte:fragment>
<div style="padding: 12px;">
<Hst.Variant title="Default">
<Callout {...props}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sapien mi, euismod eu
ipsum eget, faucibus maximus erat. Integer nisl tellus, interdum sit amet nunc vel,
ullamcorper suscipit odio.
</Callout>
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,71 @@
<script lang="ts">
import Alert from '$lib/icons/alert.svelte';
import Check from '$lib/icons/check.svelte';
import Info from '$lib/icons/info.svelte';
export let type: string | undefined = undefined;
</script>
<div class="callout-block {type ?? ''}">
{#if type}
<div class="icon-wrapper">
{#if type == 'info'}
<Info />
{:else if type == 'warning' || type == 'error'}
<Alert />
{:else if type == 'success'}
<Check />
{/if}
</div>
{/if}
<slot />
</div>
<style lang="scss">
.callout-block {
--bg-color: var(--color--page-background);
--accent-color: transparent;
--text-color: var(--color--text);
margin: 40px 0 30px;
padding: 25px 25px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
background: var(--bg-color);
color: var(--text-color);
border-left: 4px solid var(--accent-color);
position: relative;
.icon-wrapper {
position: absolute;
width: 50px;
height: 50px;
top: 0;
left: 0;
transform: translate(calc(-50% - 1.5px), -50%);
background: var(--color--post-page-background);
padding: 8px;
border-radius: 50%;
fill: var(--accent-color);
color: var(--accent-color);
}
&.info {
--bg-color: var(--color--callout-background--info);
--accent-color: var(--color--callout-accent--info);
}
&.warning {
--bg-color: var(--color--callout-background--warning);
--accent-color: var(--color--callout-accent--warning);
}
&.error {
--bg-color: var(--color--callout-background--error);
--accent-color: var(--color--callout-accent--error);
}
&.success {
--bg-color: var(--color--callout-background--success);
--accent-color: var(--color--callout-accent--success);
}
}
</style>

View file

@ -0,0 +1,55 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { ComponentProps } from 'svelte';
import type { Hst } from '@histoire/plugin-svelte';
import CodeBlock from './CodeBlock.svelte';
import type { NoUndefinedField } from '$lib/utils/types';
export let Hst: Hst;
let props: NoUndefinedField<ComponentProps<CodeBlock>> = {
filename: '+page.svelte',
lang: 'svelte'
};
</script>
<Hst.Story title="Molecules/Code Block">
<svelte:fragment slot="controls">
<Hst.Text bind:value={props.filename} title="File Name" />
<Hst.Text bind:value={props.lang} title="Language" />
</svelte:fragment>
<div style="padding: 12px;">
<Hst.Variant title="Default">
<CodeBlock {...props}>
<pre class="language-svelte"><code class="language-svelte"
><span class="token tag"
><span class="token tag"><span class="token punctuation">&lt;</span>Header</span
> <span class="token punctuation">/&gt;</span></span
>
<span class="token tag"
><span class="token tag"><span class="token punctuation">&lt;</span>main</span><span
class="token punctuation">&gt;</span
></span
>
<span class="token tag"
><span class="token tag"><span class="token punctuation">&lt;</span>slot</span> <span
class="token punctuation">/&gt;</span
></span
>
<span class="token tag"
><span class="token tag"><span class="token punctuation">&lt;/</span>main</span><span
class="token punctuation">&gt;</span
></span
>
<span class="token tag"
><span class="token tag"><span class="token punctuation">&lt;</span>Footer</span
> <span class="token punctuation">/&gt;</span></span
></code
></pre>
</CodeBlock>
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,120 @@
<script lang="ts">
export let filename: string;
export let lang: string;
export let fullBleed: boolean | undefined = undefined;
let codeContent: HTMLElement;
let isCopied = false;
// Copy the code inside the slot
async function copyCode() {
if (codeContent) {
const codeText = codeContent.textContent?.trim() || '';
try {
await navigator.clipboard.writeText(codeText);
isCopied = true;
// Reset copy state after 2 seconds
setTimeout(() => (isCopied = false), 2000);
} catch (error) {
alert('Failed to copy code.');
}
}
}
</script>
<div class="code-block" class:full-bleed={fullBleed}>
{#if filename}
<div class="filename">{filename}</div>
{/if}
{#if lang}
<div class="lang">{lang}</div>
{/if}
<!-- Copy button -->
<button class="copy-button" on:click={copyCode}>
{#if isCopied}
Copied!
{:else}
📋
{/if}
</button>
<!-- Slot containing the code -->
<div bind:this={codeContent} class="code-container">
<slot />
</div>
</div>
<style lang="scss">
.code-block {
display: block;
position: relative;
background-color: var(--color--code-background);
color: var(--color--code-text);
font-family: var(--font--mono);
font-size: 1rem;
line-height: 1.33em;
border-radius: 8px;
box-shadow: var(--card-shadow);
padding: 30px 15px;
margin: 30px 0;
:global(pre) {
overflow-x: auto;
scrollbar-color: var(--color--primary) var(--color--primary-tint);
scrollbar-width: thin;
padding-bottom: 5px;
&::-webkit-scrollbar {
height: 8px;
}
&::-webkit-scrollbar-thumb {
background: var(--color--primary);
&:hover {
background: var(--color--primary-shade);
}
}
}
.lang {
position: absolute;
right: 0;
top: -15px;
background: inherit;
border-radius: 8px;
padding: 5px 10px;
z-index: 2;
font-size: 0.85em;
}
.filename {
background: inherit;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
margin-bottom: -2px;
padding: 5px 10px;
position: absolute;
left: 0px;
top: -15px;
z-index: 1;
}
.copy-button {
position: absolute;
right: 40px;
top: -15px;
background: var(--color--code-background);
color: white;
border: none;
border-radius: 10px;
padding: 5px 8px;
font-size: 0.8rem;
cursor: pointer;
transition: background 0.2s ease;
&:hover {
background: var(--color--primary-shade);
}
}
}
</style>

View file

@ -0,0 +1,20 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import FeatureCard from './FeatureCard.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Molecules/Feature Card">
<div style="padding: 12px;">
<Hst.Variant title="Default">
<FeatureCard
name="Feature Name"
description="Doggo ipsum very taste wow doge noodle horse wow very biscit, woofer. Puggorino you are doin me a concern long doggo woofer borkdrive length boy, shoob long water shoob ur givin me a spook."
image="https://placedog.net/500"
tags={[{ label: 'Wow!' }, { label: 'Very cool!', color: 'secondary' }]}
/>
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,67 @@
<script lang="ts">
import Card from '$lib/components/atoms/Card.svelte';
import Tag from '$lib/components/atoms/Tag.svelte';
import type { TagType } from '$lib/utils/types';
import Image from '../atoms/Image.svelte';
export let name: string;
export let description: string;
export let image: string;
export let tags: TagType[] | undefined;
</script>
<Card additionalClass="feature-card">
<div class="image" slot="image">
<Image src={image} alt="Picture describing the {name} feature" />
</div>
<div class="content" slot="content">
<div class="title">
<span>{name}</span>
</div>
<p>{description}</p>
</div>
<div class="footer" slot="footer">
{#if tags && tags.length > 0}
<div class="tags">
{#each tags as tag}
<Tag color={tag.color}>{tag.label}</Tag>
{/each}
</div>
{/if}
</div>
</Card>
<style lang="scss">
.content {
display: flex;
flex-direction: column;
gap: 10px;
align-items: flex-start;
}
.title {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-size: 1.2rem;
font-family: var(--font--title);
font-weight: 700;
}
.tags {
display: flex;
align-items: center;
gap: 5px;
flex-wrap: wrap;
}
.footer {
margin-top: 20px;
}
:global(.feature-card .image img) {
object-fit: cover;
}
</style>

View file

@ -0,0 +1,33 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { ComponentProps } from 'svelte';
import type { Hst } from '@histoire/plugin-svelte';
import MarkerHighlight from './MarkerHighlight.svelte';
import type { NoUndefinedField } from '$lib/utils/types';
export let Hst: Hst;
let props: NoUndefinedField<ComponentProps<MarkerHighlight>> = {
color: 'primary'
};
</script>
<Hst.Story title="Molecules/Marker Highlight">
<svelte:fragment slot="controls">
<Hst.Select bind:value={props.color} title="color" options={['primary', 'secondary']} />
</svelte:fragment>
<div style="padding: 12px;">
<Hst.Variant title="Default">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sapien mi, euismod eu ipsum
eget, faucibus maximus erat. Integer nisl tellus, interdum sit amet nunc vel, ullamcorper
suscipit odio. <MarkerHighlight {...props}
>Praesent vitae nisl eros. Proin vel bibendum ante. Quisque nec fringilla libero. Duis
accumsan urna at arcu vestibulum placerat. Curabitur tincidunt neque mauris, vel posuere ex
malesuada quis.</MarkerHighlight
> Ut nec odio placerat, aliquam elit vitae, volutpat eros. Duis vel sem purus. Donec gravida a
lectus vel sagittis. Morbi vel porttitor erat. Vestibulum ante ipsum primis in faucibus orci luctus
et ultrices posuere cubilia curae;
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,34 @@
<script lang="ts">
export let color: 'primary' | 'secondary' = 'primary';
</script>
<mark class={color}>
<slot />
</mark>
<style lang="scss">
mark {
--mark-color: transparent;
margin-inline: calc(0.3em * -1);
padding-inline: 0.3em;
background-color: transparent;
background-image: linear-gradient(to bottom right, transparent 50%, var(--mark-color) 50%),
linear-gradient(var(--mark-color), var(--mark-color)),
linear-gradient(to top left, transparent 50%, var(--mark-color) 50%);
background-size: 0.25em 1em, calc(100% - 0.25em * 2 + 1px) 1em, 0.25em 1em;
background-position: left center, center, right center;
background-repeat: no-repeat;
color: inherit;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
&.primary {
--mark-color: var(--color--primary-shade);
}
&.secondary {
--mark-color: var(--color--secondary-shade);
}
}
</style>

View file

@ -0,0 +1,11 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import Socials from './Socials.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Molecules/Socials" layout={{ type: 'single', iframe: true }}>
<Socials />
</Hst.Story>

View file

@ -0,0 +1,57 @@
<script>
import TelegramIcon from '$lib/icons/socials/telegram.svelte';
import GitHubIcon from '$lib/icons/socials/github.svelte';
import LinkedInIcon from '$lib/icons/socials/linkedin.svelte';
import EmailIcon from '$lib/icons/socials/email.svelte';
import RssIcon from '$lib/icons/rss.svelte';
import MastodonIcon from '$lib/icons/socials/mastodon.svelte';
</script>
<div class="socials">
<a
href="https://github.com/nomadics9"
target="_blank"
rel="noopener noreferrer"
title="See my GitHub profile"
>
<GitHubIcon />
</a>
<a
href="https://www.linkedin.com/in/sager-alaskar-b8b6bb33b/"
target="_blank"
rel="noopener noreferrer"
title="Connect on LinkedIn"
>
<LinkedInIcon />
</a>
<a
href="mailto:sager@alaskar.dev"
target="_blank"
rel="noopener noreferrer"
title="Send an email"
>
<EmailIcon />
</a>
</div>
<style lang="scss">
@import '../../scss/breakpoints.scss';
.socials {
display: flex;
align-items: center;
gap: 20px;
a {
transition: all 0.2s ease-in-out;
width: 24px;
color: var(--color--text);
fill: var(--color--text);
&:hover {
color: var(--color--primary);
fill: var(--color--primary);
filter: drop-shadow(0px 0px 3px var(--color--primary));
}
}
}
</style>

View file

@ -0,0 +1,40 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { ComponentProps } from 'svelte';
import type { Hst } from '@histoire/plugin-svelte';
import SparklingHighlight from './SparklingHighlight.svelte';
import type { NoUndefinedField } from '$lib/utils/types';
export let Hst: Hst;
let props: NoUndefinedField<ComponentProps<SparklingHighlight>> = {
color: 'default',
sparkleColor: 'default'
};
let text = 'Sparkling Text';
</script>
<Hst.Story title="Molecules/Sparkling Highlight">
<svelte:fragment slot="controls">
<Hst.Text bind:value={text} title="Text" />
<Hst.Select
bind:value={props.color}
title="color"
options={['default', 'primary', 'secondary']}
/>
<Hst.Select
bind:value={props.sparkleColor}
title="sparkle color"
options={['default', 'primary', 'secondary']}
/>
</svelte:fragment>
<div style="padding: 12px;">
<Hst.Variant title="Default">
<SparklingHighlight {...props}>
{text}
</SparklingHighlight>
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,19 @@
<script lang="ts">
import Sparkles from '$lib/components/atoms/Sparkles.svelte';
export let color: 'default' | 'primary' | 'secondary' = 'default';
export let sparkleColor: 'default' | 'primary' | 'secondary' = 'default';
</script>
<Sparkles color={sparkleColor}><strong class={color}><slot /></strong></Sparkles>
<style lang="scss">
strong {
&.primary {
color: var(--color--primary);
}
&.secondary {
color: var(--color--secondary);
}
}
</style>

View file

@ -0,0 +1,168 @@
<script lang="ts">
import { theme } from '$lib/stores/theme';
function toggleTheme() {
if ($theme === 'auto') {
theme.set('light');
} else if ($theme === 'light') {
theme.set('dark');
} else {
theme.set('auto');
}
}
</script>
<noscript>
<!-- Hide the theme toggle if JavaScript is disabled -->
<style>
.theme-toggle {
display: none !important;
}
</style>
</noscript>
<button
class="theme-toggle"
title="Toggle between light and dark theme"
data-theme={$theme}
on:click={toggleTheme}
>
<svg aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask id="moon">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="40" cy="8" r="11" fill="black" />
</mask>
<circle id="sun" cx="12" cy="12" r="11" mask="url(#moon)" />
<g id="sun-beams">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
<span class="label">Auto</span>
</button>
<style lang="scss">
.theme-toggle {
height: 24px;
padding: 0;
appearance: none;
border: none;
background: none;
cursor: pointer;
display: flex;
align-items: center;
gap: 5px;
&:hover {
.label {
color: var(--color--primary);
}
#moon,
#sun {
fill: var(--color--primary);
> * {
filter: drop-shadow(0px 0px 3px var(--color--primary));
}
}
#sun-beams {
stroke: var(--color--primary);
line {
filter: drop-shadow(0px 0px 3px var(--color--primary));
}
}
}
}
.label {
transition: all 0.5s var(--ease-4);
text-transform: uppercase;
font-size: 0.6rem;
opacity: 0;
transform-origin: left;
transform: scaleX(0);
max-width: 0;
color: var(--color--text);
}
#moon,
#sun {
fill: var(--color--text);
stroke: none;
}
#sun {
transition: all 0.5s var(--ease-4);
transform-origin: center center;
}
#sun-beams {
--_opacity-dur: 0.15s;
stroke: var(--color--text);
stroke-width: 2px;
transform-origin: center center;
transition: all 0.5s var(--ease-elastic-4), opacity var(--_opacity-dur) var(--ease-3);
}
#moon > circle {
transition: all 0.5s var(--ease-out-3);
}
@mixin light-icon {
& #sun {
transform: scale(0.5);
}
& #sun-beams {
transform: rotateZ(0.25turn);
--_opacity-dur: 0.5s;
}
}
@mixin dark-icon {
& #moon > circle {
transform: translateX(-20px);
}
& #sun-beams {
opacity: 0;
}
}
.theme-toggle:not([data-theme]) {
@include light-icon;
}
[data-theme='auto'] {
.label {
opacity: 1;
transform: scaleX(1);
max-width: 30px;
}
@media not all and (prefers-color-scheme: dark) {
@include light-icon;
}
@media (prefers-color-scheme: dark) {
@include dark-icon;
}
}
[data-theme='light'] {
@include light-icon;
}
[data-theme='dark'] {
@include dark-icon;
}
</style>

View file

@ -0,0 +1,33 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { ComponentProps } from 'svelte';
import type { Hst } from '@histoire/plugin-svelte';
import TintHighlight from './TintHighlight.svelte';
import type { NoUndefinedField } from '$lib/utils/types';
export let Hst: Hst;
let props: NoUndefinedField<ComponentProps<TintHighlight>> = {
color: 'primary'
};
</script>
<Hst.Story title="Molecules/Tint Highlight">
<svelte:fragment slot="controls">
<Hst.Select bind:value={props.color} title="color" options={['primary', 'secondary']} />
</svelte:fragment>
<div style="padding: 12px;">
<Hst.Variant title="Default">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sapien mi, euismod eu ipsum
eget, faucibus maximus erat. Integer nisl tellus, interdum sit amet nunc vel, ullamcorper
suscipit odio. <TintHighlight {...props}
>Praesent vitae nisl eros. Proin vel bibendum ante. Quisque nec fringilla libero. Duis
accumsan urna at arcu vestibulum placerat. Curabitur tincidunt neque mauris, vel posuere ex
malesuada quis.</TintHighlight
> Ut nec odio placerat, aliquam elit vitae, volutpat eros. Duis vel sem purus. Donec gravida a
lectus vel sagittis. Morbi vel porttitor erat. Vestibulum ante ipsum primis in faucibus orci luctus
et ultrices posuere cubilia curae;
</Hst.Variant>
</div>
</Hst.Story>

View file

@ -0,0 +1,21 @@
<script lang="ts">
export let color: 'primary' | 'secondary' | string = 'primary';
</script>
<mark style="--mark-color: var(--color--{color}-tint);">
<slot />
</mark>
<style lang="scss">
mark {
--mark-color: transparent;
margin-inline: calc(0.1em * -1);
padding-inline: 0.1em;
background-color: transparent;
background-image: linear-gradient(to bottom, transparent 60%, var(--mark-color) 60%);
color: inherit;
}
</style>

View file

@ -0,0 +1,11 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import About from './About.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Organisms/About" layout={{ type: 'single', iframe: true }}>
<About />
</Hst.Story>

View file

@ -0,0 +1,89 @@
<script>
import SparklingHighlight from '$lib/components/molecules/SparklingHighlight.svelte';
import Socials from '$lib/components/molecules/Socials.svelte';
import Image from '../atoms/Image.svelte';
</script>
<section id="about">
<div class="info">
<h2>
Its about the <br />
<SparklingHighlight color="secondary">Experience</SparklingHighlight>
</h2>
<p>
Dynamic Marine Engineer with over a decade of experience in marine engineering <br /> <br />
Passionate about DevOps and cybersecurity, with hands-on experience managing self-hosted services
and cloud deployments. Winner of a nationwide hackathon, demonstrating technical expertise and
teamwork. Continuously learning and applying best practices in system automation and secure infrastructure
management.
</p>
<div class="socials">
<span>Socials:</span>
<Socials />
</div>
</div>
<div class="image">
<Image src="/images/AvatarMaker400.png" alt="Avatar" />
</div>
</section>
<style lang="scss">
@import '$lib/scss/breakpoints.scss';
#about {
position: relative;
display: grid;
grid-template-columns: 500px 250px;
align-items: center;
justify-content: space-between;
padding-bottom: 50px;
@include for-phone-only {
grid-template-columns: 1fr;
justify-items: center;
gap: 20px;
}
.info {
display: flex;
flex-direction: column;
gap: 10px;
h2 {
@include for-phone-only {
text-align: center;
}
}
p {
@include for-phone-only {
text-align: justify;
}
}
@include for-phone-only {
gap: 20px;
}
}
.socials {
display: flex;
align-items: center;
gap: 15px;
@include for-phone-only {
justify-content: center;
margin-bottom: 10px;
span {
display: none;
}
}
}
.image {
width: 220px;
height: 220px;
border-radius: 30%;
overflow: hidden;
}
}
</style>

View file

@ -0,0 +1,45 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { NoUndefinedField } from '$lib/utils/types';
import type { Hst } from '@histoire/plugin-svelte';
import type { ComponentProps } from 'svelte';
import Button from '$lib/components/atoms/Button.svelte';
import ContentSection from './ContentSection.svelte';
export let Hst: Hst;
let props: NoUndefinedField<ComponentProps<ContentSection>> = {
title: 'Content Section',
description: 'This is a section of content that can be used in a bunch of places',
align: 'top'
};
</script>
<Hst.Story title="Organisms/Content Section" layout={{ type: 'single', iframe: true }}>
<Hst.Variant title="Top Aligned">
<ContentSection {...props}>
<div slot="button">
<Button>Button</Button>
</div>
<pre>Content</pre>
</ContentSection>
</Hst.Variant>
<Hst.Variant title="Left Aligned">
<ContentSection {...props} align="left">
<div slot="button">
<Button>Button</Button>
</div>
<pre>Content</pre>
</ContentSection>
</Hst.Variant>
<Hst.Variant title="Right Aligned">
<ContentSection {...props} align="right">
<div slot="button">
<Button>Button</Button>
</div>
<pre>Content</pre>
</ContentSection>
</Hst.Variant>
</Hst.Story>

View file

@ -0,0 +1,104 @@
<script lang="ts">
export let id: string | undefined = undefined;
export let title: string | undefined = undefined;
export let description: string | undefined = undefined;
export let align: 'left' | 'top' | 'right' = 'top';
</script>
<section {id} class="content-section {align}">
<div class="title-area">
{#if title || description}
<div class="text">
{#if title}
<h2>
{title}
</h2>
{/if}
{#if description}
<p>
{description}
</p>
{/if}
</div>
{/if}
{#if $$slots['button']}
<div class="button">
<slot name="button" />
</div>
{/if}
</div>
<div class="content-area">
<slot />
</div>
</section>
<style lang="scss">
@import '../../scss/breakpoints.scss';
.content-section {
display: flex;
align-items: center;
justify-content: space-between;
gap: 40px;
padding: 50px 0;
.title-area {
flex: 2;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
gap: 15px;
.text {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 5px;
}
}
.content-area {
flex: 5;
display: grid;
place-items: center;
}
@include for-tablet-landscape-up {
&.left {
.title-area {
order: 1;
}
.content-area {
order: 2;
}
}
&.right {
.title-area {
order: 2;
}
.content-area {
order: 1;
}
}
&.top {
flex-direction: column;
.title-area {
order: 1;
max-width: 600px;
}
.content-area {
order: 2;
width: 100%;
}
}
}
@include for-tablet-portrait-down {
flex-direction: column;
}
}
</style>

View file

@ -0,0 +1,73 @@
<script lang="ts">
import type { Feature } from '$lib/utils/types';
import FeatureCard from '$lib/components/molecules/FeatureCard.svelte';
import ContentSection from '$lib/components/organisms/ContentSection.svelte';
export let features: Feature[];
</script>
<ContentSection
id="features"
title="Features"
description="Here are some of the features of this template"
>
<div class="features-container">
<div class="three-group-grid">
{#each features as feature}
<FeatureCard
name={feature.name}
description={feature.description}
image={feature.image}
tags={feature.tags}
/>
{/each}
</div>
</div>
</ContentSection>
<style lang="scss">
@import '$lib/scss/breakpoints.scss';
.features-container {
width: 100%;
display: grid;
grid-template-columns: 1fr;
grid-gap: 20px;
}
.three-group-grid {
width: 100%;
display: grid;
grid-template-columns: 2fr 1fr;
grid-gap: 20px;
@media (max-width: 1085px) {
grid-template-columns: 1fr 1fr;
}
@include for-phone-only {
grid-template-columns: 1fr;
}
// Select every 3 elements, starting from position 2
// And make it take up 2 rows
@media (min-width: 1086px) {
> :global(:nth-child(3n + 2)) {
grid-row: span 2;
}
}
// Select every 3 elements, starting from position 1
// And make it take up 2 columns
> :global(:nth-child(3n + 1)) {
@media (max-width: 1085px) {
grid-column: span 2;
}
@include for-tablet-portrait-down {
grid-template-columns: 1fr;
grid-column: unset;
}
}
}
</style>

View file

@ -0,0 +1,11 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import Footer from './Footer.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Organisms/Footer" layout={{ type: 'single', iframe: true }}>
<Footer />
</Hst.Story>

View file

@ -0,0 +1,62 @@
<script>
import FooterWave from '$lib/icons/footer-wave.svelte';
import Socials from '$lib/components/molecules/Socials.svelte';
import ThemeToggle from '$lib/components/molecules/ThemeToggle.svelte';
import RssLink from '$lib/components/atoms/RssLink.svelte';
</script>
<footer>
<div class="wave">
<FooterWave />
</div>
<div class="content">
<div class="copyright">
© 2024 <a href="/" target="_blank" rel="noopener noreferrer">Sager Alaskar</a>. All rights
reserved.
</div>
<div class="credits" />
<div class="socials">
<Socials />
<RssLink />
<ThemeToggle />
</div>
</div>
</footer>
<style lang="scss">
footer {
height: 340px;
width: 100%;
background: linear-gradient(60deg, var(--color--waves-start) 0%, var(--color--waves-end) 100%);
display: grid;
grid-template-rows: 120px 1fr;
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 15px;
font-weight: 600;
text-align: center;
.credits {
font-weight: 400;
font-size: 90%;
color: var(--color--text-shade);
}
.socials {
display: flex;
align-items: center;
gap: 20px;
}
}
a {
&:hover {
filter: drop-shadow(0px 0px 3px var(--color--primary));
}
}
}
</style>

View file

@ -0,0 +1,17 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import Header from './Header.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Organisms/Header" layout={{ type: 'single', iframe: true }}>
<Hst.Variant title="Transparent Background">
<Header />
</Hst.Variant>
<Hst.Variant title="With Background">
<Header showBackground />
</Hst.Variant>
</Hst.Story>

View file

@ -0,0 +1,80 @@
<script lang="ts">
import Logo from '$lib/components/atoms/Logo.svelte';
import ThemeToggle from '$lib/components/molecules/ThemeToggle.svelte';
import RssLink from '$lib/components/atoms/RssLink.svelte';
export let showBackground = false;
</script>
<header class:has-background={showBackground}>
<nav class="container">
<a class="logo" href="/" aria-label="Site logo">
<Logo />
</a>
<div class="links">
<a href="/blog">Blog</a>
<RssLink />
<ThemeToggle />
</div>
</nav>
</header>
<style lang="scss">
@import '$lib/scss/breakpoints.scss';
header {
position: relative;
padding: 30px 0;
@include for-phone-only {
padding: 20px 0;
}
&.has-background {
background: linear-gradient(
60deg,
var(--color--waves-start) 0%,
var(--color--waves-end) 100%
);
}
.container {
display: flex;
align-items: center;
gap: 30px;
@include for-phone-only {
.links {
a {
display: none;
}
}
}
}
.logo {
height: 44px;
flex: 1;
}
a {
color: var(--color--text);
}
.links {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 30px;
a {
text-decoration: none;
&:hover {
color: var(--color--primary);
filter: drop-shadow(0px 0px 3px var(--color--primary));
}
}
}
}
</style>

View file

@ -0,0 +1,11 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import Hero from './Hero.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Organisms/Hero" layout={{ type: 'single', iframe: true }}>
<Hero />
</Hst.Story>

View file

@ -0,0 +1,76 @@
<script>
import EmailIcon from '$lib/icons/socials/email.svelte';
import Experience from '$lib/icons/experience.svelte';
import Button from '$lib/components/atoms/Button.svelte';
import Sparkles from '../atoms/Sparkles.svelte';
</script>
<section id="hero">
<h1 class="hello">Sager Alaskar</h1>
<p class="intro">
<span class="left">Marine Engineer,</span>
<span class="right">Who is passionate in DevOps.</span>
</p>
<div class="ctas">
<Sparkles>
<Button href="mailto:sager@alaskar.dev">
<EmailIcon slot="icon" />
Mail me
</Button>
</Sparkles>
<Button color="primary" href="/resume">
<Experience slot="icon" />
Resume
</Button>
</div>
</section>
<style lang="scss">
@import '$lib/scss/breakpoints.scss';
#hero {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 15px;
position: relative;
padding: 80px 0;
@include for-phone-only {
padding: 40px 0 50px;
}
.hello {
text-align: center;
}
.intro {
font-weight: 500;
font-size: 1.4rem;
width: min(100%, 440px);
display: flex;
flex-direction: column;
.left {
text-align: left;
}
.right {
text-align: right;
}
@include for-phone-only {
display: none;
}
}
.ctas {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 10px;
width: 100%;
}
}
</style>

View file

@ -0,0 +1,41 @@
<script lang="ts">
import BlogPostCard from '$lib/components/molecules/BlogPostCard.svelte';
import ContentSection from '$lib/components/organisms/ContentSection.svelte';
import type { BlogPost } from '$lib/utils/types';
import Button from '$lib/components/atoms/Button.svelte';
export let posts: BlogPost[];
</script>
<ContentSection id="recent-posts" title="Blog posts" description="Random Posts" align="left">
<div slot="button">
<Button href="/blog">View More</Button>
</div>
<div class="grid">
{#each posts as post}
<BlogPostCard
slug={post.slug}
title={post.title}
excerpt={post.excerpt}
tags={post.tags}
readingTime={post.readingTime}
showImage={false}
/>
{/each}
</div>
</ContentSection>
<style lang="scss">
@import '$lib/scss/breakpoints.scss';
.grid {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
@include for-phone-only {
grid-template-columns: 1fr;
}
}
</style>

View file

@ -0,0 +1,44 @@
<script lang="ts">
import type { BlogPost } from '$lib/utils/types';
import BlogPostCard from '$lib/components/molecules/BlogPostCard.svelte';
import ContentSection from '$lib/components/organisms/ContentSection.svelte';
export let posts: BlogPost[];
</script>
<ContentSection
id="related-posts"
title="Related Posts"
>
<div class="simple-grid">
{#each posts as post}
<BlogPostCard
slug={post.slug}
title={post.title}
excerpt={post.excerpt}
tags={post.tags}
readingTime={post.readingTime}
showImage={false}
/>
{/each}
</div>
</ContentSection>
<style lang="scss">
@import '$lib/scss/breakpoints.scss';
.simple-grid {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 20px;
@media (max-width: 1070px) {
grid-template-columns: 1fr 1fr;
}
@include for-tablet-portrait-down {
grid-template-columns: 1fr;
}
}
</style>

View file

@ -0,0 +1,11 @@
<script lang="ts">
import '$lib/scss/global.scss';
import type { Hst } from '@histoire/plugin-svelte';
import Waves from './Waves.svelte';
export let Hst: Hst;
</script>
<Hst.Story title="Organisms/Waves" layout={{ type: 'single', iframe: true }}>
<Waves />
</Hst.Story>

View file

@ -0,0 +1,93 @@
<div class="waves-container">
<svg
class="waves"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 24 150 28"
preserveAspectRatio="none"
shape-rendering="auto"
>
<defs>
<path
id="gentle-wave"
d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"
/>
</defs>
<g class="parallax">
<use
xlink:href="#gentle-wave"
x="48"
y="0"
fill="rgba(var(--color--page-background-rgb),0.7)"
/>
<use
xlink:href="#gentle-wave"
x="48"
y="3"
fill="rgba(var(--color--page-background-rgb),0.5)"
/>
<use
xlink:href="#gentle-wave"
x="48"
y="5"
fill="rgba(var(--color--page-background-rgb),0.3)"
/>
<use xlink:href="#gentle-wave" x="48" y="7" fill="var(--color--page-background)" />
</g>
</svg>
</div>
<style lang="scss">
@import '$lib/scss/_breakpoints.scss';
.waves-container {
background: linear-gradient(60deg, var(--color--waves-start) 0%, var(--color--waves-end) 100%);
position: absolute;
width: 100%;
height: min(65vh, 500px);
@include for-phone-only {
height: min(75vh, 400px);
}
}
.waves {
position: absolute;
bottom: 0;
width: 100%;
height: 15vh;
/*Fix for safari gap*/
min-height: 100px;
max-height: 150px;
}
/* Animation */
.parallax > use {
@media screen and (prefers-reduced-motion: no-preference) {
animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
}
.parallax > use:nth-child(1) {
animation-delay: -2s;
animation-duration: 7s;
}
.parallax > use:nth-child(2) {
animation-delay: -3s;
animation-duration: 10s;
}
.parallax > use:nth-child(3) {
animation-delay: -4s;
animation-duration: 13s;
}
.parallax > use:nth-child(4) {
animation-delay: -5s;
animation-duration: 20s;
}
@keyframes move-forever {
0% {
transform: translate3d(-90px, 0, 0);
}
100% {
transform: translate3d(85px, 0, 0);
}
}
</style>

View file

@ -0,0 +1,4 @@
import { filterPosts, importPosts } from './utils';
export const allPosts = importPosts(true);
export const filteredPosts = filterPosts(allPosts);

View file

@ -0,0 +1,72 @@
// Disabling eslint because importing Prism is needed
// even if not directly used in this file
// eslint-disable-next-line no-unused-vars
import Prism from 'prismjs';
// Here we assign it to a variable so the import above
// is not removed automatically on build
const ifYouRemoveMeTheBuildFails = Prism;
import 'prism-svelte';
import readingTime from 'reading-time/lib/reading-time';
import striptags from 'striptags';
import type { BlogPost } from "$lib/utils/types";
export const importPosts = (render = false) => {
const blogImports = import.meta.glob('$routes/*/*/*.md', { eager: true });
const innerImports = import.meta.glob('$routes/*/*/*/*.md', { eager: true });
const imports = { ...blogImports, ...innerImports };
const posts: BlogPost[] = [];
for (const path in imports) {
const post = imports[path] as any;
if (post) {
posts.push({
...post.metadata,
html: render && post.default.render ? post.default.render()?.html : undefined,
});
}
}
return posts;
}
export const filterPosts = (posts: BlogPost[]) => {
return posts.filter((post) => !post.hidden)
.sort((a, b) =>
new Date(a.date).getTime() > new Date(b.date).getTime()
? -1
: new Date(a.date).getTime() < new Date(b.date).getTime()
? 1
: 0
)
.map((post) => {
const readingTimeResult = post.html ? readingTime(striptags(post.html) || '') : undefined;
const relatedPosts = getRelatedPosts(posts, post);
return {
...post,
readingTime: readingTimeResult ? readingTimeResult.text : '',
relatedPosts: relatedPosts,
} as BlogPost;
});
}
// #region Unexported Functions
const getRelatedPosts = (posts: BlogPost[], post: BlogPost) => {
// Get the first 3 posts that have the highest number of tags in common
const relatedPosts = posts
.filter((p) => !p.hidden && p.slug !== post.slug)
.sort((a, b) => {
const aTags = a.tags?.filter((t) => post.tags?.includes(t));
const bTags = b.tags?.filter((t) => post.tags?.includes(t));
return aTags?.length > bTags?.length ? -1 : aTags?.length < bTags?.length ? 1 : 0;
})
return relatedPosts.slice(0, 3).map((p) => ({
...p,
readingTime: p.html ? readingTime(striptags(p.html) || '').text : '',
}));
}
// #endregion

43
src/lib/data/features.ts Normal file
View file

@ -0,0 +1,43 @@
import type { Feature } from "$lib/utils/types";
export default [
{
name: 'Markdown Support',
description:
'Blog posts are written in Markdown, a simple and nearly-universal format. This means you can bring over your posts from other platforms, and easily export to another if you want to.',
image: 'images/features/markdown.jpg',
tags: [{ label: 'Powered by MDsveX' }]
},
{
name: 'Themeable',
description:
'You can easily theme the entire website by changing just a few colors in the _themes.scss file.',
image: 'images/features/themeable.jpg',
tags: [{ label: 'Primary Color' }, { label: 'Secondary Color', color: 'secondary' }]
},
{
name: 'Extensible',
description:
'Components are built to be reused, and you can build new pages and layouts without much CSS knowledge. You can see all components in Histoire by running "npm run story:dev"',
image: 'images/features/extensible.jpg',
},
{
name: 'Well Optimized',
description:
'Images are automatically optimized and lazy loaded, to ensure the website loads as fast as possible regardless of connection speed.',
image: 'images/features/optimized.jpg',
tags: [{ label: 'Powered by Image Transmutation' }]
},
{
name: 'Light and Dark Modes',
description:
'This template was built with dark mode in mind. It can swap between themes automatically (based on system settings) or manually. Both themes can be tweaked in the _themes.scss file.',
image: 'images/features/light-dark.jpg',
},
{
name: 'Open Source',
description:
'All code is open source, which means you can copy and modify it to your heart\'s content. All I ask is that you make your code open too so that knowledge can be passed on.',
image: 'images/features/open-source.jpg'
},
] as Feature[];

22
src/lib/data/meta.ts Normal file
View file

@ -0,0 +1,22 @@
// Base values for meta tags
// So they can be added as suffixes on different pages
// Via <svelte:head>
export const siteBaseUrl = 'https://alaskar.dev/';
export const keywords = [
'Sager Alaskar',
'Sager',
'Alaskar',
'Blog',
'Portofolio',
'Resume',
'CV'
];
export const description =
"Sager Alaskar personal space.";
export const title = 'Sager Alaskar';
export const image = `${siteBaseUrl}/images/site-preview.png`;

View file

@ -0,0 +1,22 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
<path
d="M12 17.01L12.01 16.9989"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 550 B

16
src/lib/icons/blog.svelte Normal file
View file

@ -0,0 +1,16 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M3 21L12 21H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
<path
d="M12.2218 5.82839L15.0503 2.99996L20 7.94971L17.1716 10.7781M12.2218 5.82839L6.61522 11.435C6.42769 11.6225 6.32233 11.8769 6.32233 12.1421L6.32233 16.6776L10.8579 16.6776C11.1231 16.6776 11.3774 16.5723 11.565 16.3847L17.1716 10.7781M12.2218 5.82839L17.1716 10.7781"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 589 B

36
src/lib/icons/chat.svelte Normal file
View file

@ -0,0 +1,36 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M17 12.5C17.2761 12.5 17.5 12.2761 17.5 12C17.5 11.7239 17.2761 11.5 17 11.5C16.7239 11.5 16.5 11.7239 16.5 12C16.5 12.2761 16.7239 12.5 17 12.5Z"
fill="currentColor"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z"
fill="currentColor"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M7 12.5C7.27614 12.5 7.5 12.2761 7.5 12C7.5 11.7239 7.27614 11.5 7 11.5C6.72386 11.5 6.5 11.7239 6.5 12C6.5 12.2761 6.72386 12.5 7 12.5Z"
fill="currentColor"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 13.8214 2.48697 15.5291 3.33782 17L2.5 21.5L7 20.6622C8.47087 21.513 10.1786 22 12 22Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,21 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M7 12.5L10 15.5L17 8.5"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 454 B

View file

@ -0,0 +1,15 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 339 B

View file

@ -0,0 +1,16 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M6 20L18 20" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
<path
d="M12 4V16M12 16L15.5 12.5M12 16L8.5 12.5"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 360 B

138
src/lib/icons/error.svelte Normal file
View file

@ -0,0 +1,138 @@
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 1080 1080"
><defs
><style>
.cls-1,
.cls-7 {
fill: #c7dcf9;
}
.cls-14,
.cls-2 {
fill: #fea691;
}
.cls-3 {
isolation: isolate;
}
.cls-4,
.cls-9 {
fill: #e1ecff;
}
.cls-5 {
fill: #f0f4ff;
}
.cls-6 {
clip-path: url(#clip-path);
}
.cls-7 {
opacity: 0.37;
}
.cls-14,
.cls-7,
.cls-9 {
mix-blend-mode: multiply;
}
.cls-8 {
fill: #99adf9;
}
.cls-9 {
opacity: 0.58;
}
.cls-10 {
fill: none;
stroke: #1c3177;
stroke-linecap: round;
stroke-miterlimit: 10;
stroke-width: 9px;
}
.cls-11 {
fill: #1c3177;
}
.cls-12 {
fill: #ff97c9;
}
.cls-13 {
clip-path: url(#clip-path-2);
}
.cls-14 {
opacity: 0.21;
}
</style><clipPath id="clip-path"
><ellipse
class="cls-1"
cx="447.2"
cy="511.48"
rx="107.95"
ry="147.31"
transform="translate(-46.98 45.23) rotate(-5.5)"
/></clipPath
><clipPath id="clip-path-2"
><path
class="cls-2"
d="M542.23,589.77s-181.59-2.75-222.59,7-33.82,36.64-21.52,48.68,12.55,30-16.91,32.29-109.67,8.45-119.92,36.89,31,52.53,115,49.71,183.2-17.23,204.21.23-30.49,20-7.94,42.56,140.93,13.84,180.9-2.3,61-43.05,37.92-70.21S637.48,701,645.31,685.93c6.66-12.82,6.37-31.69-10.27-40.06-27.14,4.7-168.53,31.83-168.53,31.83S461,661.84,477.1,655,524,637.36,542.23,589.77Z"
/></clipPath
></defs
><g class="cls-3"
><g id="Layer_3" data-name="Layer 3"
><path
class="cls-4"
d="M447.49,344.26l364.5,31a33.12,33.12,0,0,1,23.78,13c11,14.48,27.71,42.06,34.84,82.07,5.79,32.52-5.7,92.52-26.73,125.65a33,33,0,0,1-21.74,14.6L466.2,677.73Z"
/><ellipse
class="cls-5"
cx="450.47"
cy="511.16"
rx="126.33"
ry="167.3"
transform="translate(-46.93 45.54) rotate(-5.5)"
/><ellipse
class="cls-1"
cx="447.2"
cy="511.48"
rx="107.95"
ry="147.31"
transform="translate(-46.98 45.23) rotate(-5.5)"
/><g class="cls-6"
><path
class="cls-7"
d="M475.26,354s-66.1,119.73-18.13,235.37c-32.09,54-23.37,113.32-17.23,115.68s215.69-73.48,221.49-69.38S609,320,609,320Z"
/></g
><path
class="cls-8"
d="M562.53,354s55.11,46.7,64.59,152.53c8,88.86-52.27,150.66-52.27,150.66l201.59-38s43.71-57,43.71-129c0-79.43-52.84-118.73-52.84-118.73Z"
/><path
class="cls-9"
d="M552.59,556c-4,15.57-10.36,33.8-10.36,33.8l-78.54,43.08,2.51,44.88,355.94-67.16A33,33,0,0,0,843.88,596c8.67-13.67,15.72-31.91,20.6-50.9Z"
/><path
class="cls-10"
d="M661.39,413.94s30.11-3.84,34.85,19c3.46,16.69-18.93,23.93-18.93,23.93"
/><path
class="cls-10"
d="M685.67,526.45s31.71,8.26,25.64,31.55c-3.77,14.46-29.25,17.28-29.25,17.28"
/><path
class="cls-11"
d="M740.29,456.89c-8.93-.47-13.45,11.15-13.32,23.58s2.56,32,14.35,32.58,14-13.32,13.07-28.08S750,457.4,740.29,456.89Z"
/><path
class="cls-12"
d="M752.11,469.77s-10.45,3.61-10.28,12.57,5.07,16.14,12,17.64A52.89,52.89,0,0,0,752.11,469.77Z"
/><path
class="cls-2"
d="M542.23,589.77s-181.59-2.75-222.59,7-33.82,36.64-21.52,48.68,12.55,30-16.91,32.29-109.67,8.45-119.92,36.89,31,52.53,115,49.71,183.2-17.23,204.21.23-30.49,20-7.94,42.56,140.93,13.84,180.9-2.3,61-43.05,37.92-70.21S637.48,701,645.31,685.93c6.66-12.82,6.37-31.69-10.27-40.06-27.14,4.7-168.53,31.83-168.53,31.83S461,661.84,477.1,655,524,637.36,542.23,589.77Z"
/><g class="cls-13"
><path
class="cls-14"
d="M413.24,590.15S514.46,604.72,477.1,655c72,20.88,138.75-77.68,138.75-77.68L498.67,553.37Z"
/><path
class="cls-14"
d="M531.39,665.3s105.6-12.94,117,12.43c26.24-13.33,20.09-46.12,20.09-46.12L567,641.86Z"
/><path
class="cls-14"
d="M213.2,686.56c-19.79,8.08-30.89,41.22,11.13,49.25s218.31-10.08,246.15,5.12,14.8,33.86,14.8,33.86l-338.5,23.88L139.61,697.2Z"
/></g
><path
class="cls-2"
d="M278.65,862.72c-7.39-12.71,22.89-28.35,54-28.86s55.86,14,53.64,23.91S349.19,872,330.57,872.12,282.92,870.07,278.65,862.72Z"
/></g
></g
></svg
>

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,14 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 7H4C2.89543 7 2 7.89543 2 9V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V9C22 7.89543 21.1046 7 20 7H16M8 7V3.6C8 3.26863 8.26863 3 8.6 3H15.4C15.7314 3 16 3.26863 16 3.6V7M8 7H16"
stroke="currentColor"
stroke-width="1.5"
/>
</svg>

After

Width:  |  Height:  |  Size: 393 B

View file

@ -0,0 +1,21 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 12H19M19 12L16 15M19 12L16 9"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M19 6V5C19 3.89543 18.1046 3 17 3H7C5.89543 3 5 3.89543 5 5V19C5 20.1046 5.89543 21 7 21H17C18.1046 21 19 20.1046 19 19V18"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 473 B

View file

@ -0,0 +1,16 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10 15v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4a2 2 0 012-2h4a2 2 0 012 2zM16 5v4a2 2 0 01-2 2h-4a2 2 0 01-2-2V5a2 2 0 012-2h4a2 2 0 012 2zM22 15v4a2 2 0 01-2 2h-4a2 2 0 01-2-2v-4a2 2 0 012-2h4a2 2 0 012 2zM6 16v-3M12 6V3M18 16v-3"
stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 469 B

View file

@ -0,0 +1,15 @@
<svg
width="100%"
height="120"
viewBox="0 0 1440 120"
fill="none"
style="transform: scale(-1,-1)"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid slice"
class="footer__wave"
>
<path
d="M0 0L48 8.875C96 17.9167 192 35.4167 288 53.3333C384 71.25 480 88.75 576 82.2083C672 75.4167 768 44.5833 864 26.6667C960 8.75 1056 4.58333 1152 11.125C1248 17.9167 1344 35.4167 1392 44.4583L1440 53.3333V120H1392C1344 120 1248 120 1152 120C1056 120 960 120 864 120C768 120 672 120 576 120C480 120 384 120 288 120C192 120 96 120 48 120H0V0Z"
fill="var(--body-background-color)"
/>
</svg>

After

Width:  |  Height:  |  Size: 602 B

22
src/lib/icons/info.svelte Normal file
View file

@ -0,0 +1,22 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
<path
d="M12 7.51L12.01 7.49889"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 551 B

View file

@ -0,0 +1,63 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.33789 17C5.06694 19.989 8.29866 22 12.0001 22C15.7015 22 18.9332 19.989 20.6622 17"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M3.33789 7C5.06694 4.01099 8.29866 2 12.0001 2C15.7015 2 18.9332 4.01099 20.6622 7"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M13 21.9506C13 21.9506 14.4079 20.0966 15.2947 16.9999"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M13 2.04932C13 2.04932 14.4079 3.90328 15.2947 7"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M11 21.9506C11 21.9506 9.59215 20.0966 8.70532 16.9999"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M11 2.04932C11 2.04932 9.59215 3.90328 8.70532 7"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9 10L10.5 15L12 10L13.5 15L15 10"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M1 10L2.5 15L4 10L5.5 15L7 10"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M17 10L18.5 15L20 10L21.5 15L23 10"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

21
src/lib/icons/pin.svelte Normal file
View file

@ -0,0 +1,21 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M20 10C20 14.4183 12 22 12 22C12 22 4 14.4183 4 10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10Z"
stroke="currentColor"
stroke-width="1.5"
/>
<path
d="M12 11C12.5523 11 13 10.5523 13 10C13 9.44772 12.5523 9 12 9C11.4477 9 11 9.44772 11 10C11 10.5523 11.4477 11 12 11Z"
fill="currentColor"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 530 B

27
src/lib/icons/rss.svelte Normal file
View file

@ -0,0 +1,27 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 19C12 14.8 9.2 12 5 12"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M19 19C19 10.6 13.4 5 5 5"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M5 19.01L5.01 18.9989"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 484 B

View file

@ -0,0 +1,20 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M7 9L12 12.5L17 9"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M2 17V7C2 5.89543 2.89543 5 4 5H20C21.1046 5 22 5.89543 22 7V17C22 18.1046 21.1046 19 20 19H4C2.89543 19 2 18.1046 2 17Z"
stroke="currentColor"
stroke-width="1.5"
/>
</svg>

After

Width:  |  Height:  |  Size: 426 B

View file

@ -0,0 +1,21 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M16 22.0268V19.1568C16.0375 18.68 15.9731 18.2006 15.811 17.7506C15.6489 17.3006 15.3929 16.8902 15.06 16.5468C18.2 16.1968 21.5 15.0068 21.5 9.54679C21.4997 8.15062 20.9627 6.80799 20 5.79679C20.4558 4.5753 20.4236 3.22514 19.91 2.02679C19.91 2.02679 18.73 1.67679 16 3.50679C13.708 2.88561 11.292 2.88561 8.99999 3.50679C6.26999 1.67679 5.08999 2.02679 5.08999 2.02679C4.57636 3.22514 4.54413 4.5753 4.99999 5.79679C4.03011 6.81549 3.49251 8.17026 3.49999 9.57679C3.49999 14.9968 6.79998 16.1868 9.93998 16.5768C9.61098 16.9168 9.35725 17.3222 9.19529 17.7667C9.03334 18.2112 8.96679 18.6849 8.99999 19.1568V22.0268"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9 20.0267C6 20.9999 3.5 20.0267 2 17.0267"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 978 B

View file

@ -0,0 +1,28 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M21 8V16C21 18.7614 18.7614 21 16 21H8C5.23858 21 3 18.7614 3 16V8C3 5.23858 5.23858 3 8 3H16C18.7614 3 21 5.23858 21 8Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path d="M7 17V13.5V10" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" />
<path
d="M11 17V13.75M11 10V13.75M11 13.75C11 10 17 10 17 13.75V17"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M7 7.01L7.01 6.99889"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 706 B

View file

@ -0,0 +1,16 @@
<svg
clip-rule="evenodd"
fill-rule="evenodd"
stroke-linejoin="round"
stroke-miterlimit="2"
viewBox="0 0 192 192"
xmlns="http://www.w3.org/2000/svg"
><path
clip-rule="evenodd"
d="m2004.3 228h-.57c-19.87.163-38.97 2.491-50.13 7.601-.5.213-24.58 10.78-24.58 46.99 0 7.394-.14 16.236.09 25.612.4 16.438 2 32.742 7.21 45.957 5.67 14.406 15.47 25.335 32.04 29.72 14.11 3.737 26.23 4.503 35.99 3.967h.01c18.41-1.021 28.71-6.695 28.71-6.695a6.018 6.018 0 0 0 3.16-5.558l-.56-12.178a5.984 5.984 0 0 0 -2.56-4.646 5.995 5.995 0 0 0 -5.24-.804s-11.04 3.471-23.45 3.047c-4.87-.167-9.84-.357-14.18-1.544-3.91-1.069-7.14-3.148-8.76-7.347 5.59.951 13.45 2.021 22.27 2.425 10.49.481 20.33-.592 30.33-1.785 12.37-1.477 23.76-6.688 31.4-13.091 5.8-4.865 9.47-10.509 10.5-15.801v-.001c3.23-16.623 3.05-40.428 3.04-41.319-.01-36.286-24.23-46.801-24.58-46.951-11.14-5.105-30.25-7.436-50.14-7.599zm59.9 93.58.09-.471c3.1-15.948 2.73-38.451 2.73-38.451v-.067c0-27.633-17.49-36.04-17.49-36.04-.01-.008-.03-.016-.05-.024-10.05-4.616-27.33-6.379-45.26-6.527h-.41c-17.93.148-35.2 1.911-45.25 6.527l-.06.024s-17.48 8.407-17.48 36.04c0 7.308-.15 16.047.09 25.314v.004c.36 14.96 1.64 29.826 6.37 41.852 4.27 10.836 11.49 19.221 23.95 22.519 12.65 3.349 23.51 4.066 32.26 3.585 9.61-.533 16.56-2.512 20.36-3.891l-.04-.739c-5.11 1.018-12.33 2.033-20 1.771-16.29-.559-32.69-3.029-35.34-23.016a40.2 40.2 0 0 1 -.35-5.4 6 6 0 0 1 2.3-4.719 5.998 5.998 0 0 1 5.13-1.109s12.59 3.066 28.55 3.798c9.81.45 19.01-.598 28.36-1.713 9.88-1.18 19.01-5.258 25.11-10.372 3.36-2.814 5.83-5.834 6.43-8.895zm-54.2-36.244c.68-2.603 3.99-12.807 14.27-12.807 10.68 0 10.54 12.137 10.54 12.137v34.224c0 3.311 2.69 6 6 6s6-2.689 6-6v-34.406s-.68-23.955-22.54-23.955c-10 0-16.43 5.292-20.4 10.778-4.07-5.273-10.62-10.293-20.78-10.293-6.92 0-11.53 2.138-14.68 4.857-6.67 5.747-6.86 14.826-6.81 16.949l.02.455s-.01-.161-.02-.455v-.052 36.342c0 3.311 2.69 6 6 6s6-2.689 6-6v-36.342c0-.169-.01-.338-.02-.507 0 0-.5-4.577 2.66-7.298 1.45-1.252 3.66-1.949 6.85-1.949 10.65 0 14.18 9.844 14.91 12.386v20.233c0 3.311 2.69 6 6 6s6-2.689 6-6z"
fill-rule="evenodd"
stroke-linejoin="round"
stroke-miterlimit="2"
transform="translate(-1908 -212)"
/></svg
>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1,15 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M21 5L2 12.5L9 13.5M21 5L18.5 20L9 13.5M21 5L9 13.5M9 13.5V19L12.2488 15.7229"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 303 B

15
src/lib/icons/star.svelte Normal file
View file

@ -0,0 +1,15 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8.58737 8.23597L11.1849 3.00376C11.5183 2.33208 12.4817 2.33208 12.8151 3.00376L15.4126 8.23597L21.2215 9.08017C21.9668 9.18848 22.2638 10.0994 21.7243 10.6219L17.5217 14.6918L18.5135 20.4414C18.6409 21.1798 17.8614 21.7428 17.1945 21.3941L12 18.678L6.80547 21.3941C6.1386 21.7428 5.35909 21.1798 5.48645 20.4414L6.47825 14.6918L2.27575 10.6219C1.73617 10.0994 2.03322 9.18848 2.77852 9.08017L8.58737 8.23597Z"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>

After

Width:  |  Height:  |  Size: 636 B

View file

@ -0,0 +1,34 @@
@keyframes svg-text-stroke {
0% {
fill: transparent;
stroke: var(--text-color);
stroke-dashoffset: 25%;
stroke-dasharray: 0 50%;
stroke-width: 2;
}
70% {
fill: transparent;
stroke: var(--text-color);
}
80% {
fill: transparent;
stroke: var(--text-color);
stroke-width: 3;
}
100% {
fill: var(--text-color);
stroke: transparent;
stroke-dashoffset: -25%;
stroke-dasharray: 50% 0;
stroke-width: 0;
}
}
@keyframes spin {
from {
transform: rotate(0turn);
}
to {
transform: rotate(1turn);
}
}

22
src/lib/scss/_base.scss Normal file
View file

@ -0,0 +1,22 @@
// Styles that are used everywhere
.container {
@include padded-container;
}
ul,
ol {
margin: 10px 0 10px 40px;
padding: 0;
li {
margin: 6px 0;
&::marker {
color: var(--color--primary);
}
}
}
ul {
list-style: outside;
}

View file

@ -0,0 +1,43 @@
$breakpoint-iphone-se-max: 320px;
$breakpoint-phone-max: 767px;
$breakpoint-tablet-portrait-min: 768px;
$breakpoint-tablet-portrait-max: 900px;
$breakpoint-tablet-landscape-min: 901px;
$breakpoint-tablet-landscape-max: 1200px;
$breakpoint-desktop-min: 1201px;
@mixin for-iphone-se {
@media (max-width: $breakpoint-iphone-se-max) {
@content;
}
}
@mixin for-phone-only {
@media (max-width: $breakpoint-phone-max) {
@content;
}
}
@mixin for-tablet-portrait-up {
@media (min-width: $breakpoint-tablet-portrait-min) {
@content;
}
}
@mixin for-tablet-portrait-down {
@media (max-width: $breakpoint-tablet-portrait-max) {
@content;
}
}
@mixin for-tablet-landscape-up {
@media (min-width: $breakpoint-tablet-landscape-min) {
@content;
}
}
@mixin for-tablet-landscape-down {
@media (max-width: $breakpoint-tablet-landscape-max) {
@content;
}
}
@mixin for-desktop-up {
@media (min-width: $breakpoint-desktop-min) {
@content;
}
}

View file

@ -0,0 +1,151 @@
// pre[class*="language-"] {
// display: block;
// background-color: var(--code-background-color);
// color: var(--code-text-color);
// font-family: var(--mono-font);
// font-size: 0.85em;
// line-height: 1.33em;
// border-radius: 0.25em;
// box-shadow: var(--card-shadow);
// padding: 30px 15px;
// overflow-x: auto;
// scrollbar-color: var(--primary-color) var(--scrollbar-track-color);
// scrollbar-width: thin;
// &::-webkit-scrollbar {
// height: 5px;
// }
// &::-webkit-scrollbar-thumb {
// background: var(--primary-color);
// }
// }
code[class*='language-'],
pre[class*='language-'] {
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*='language-']::-moz-selection,
pre[class*='language-'] ::-moz-selection,
code[class*='language-']::-moz-selection,
code[class*='language-'] ::-moz-selection {
text-shadow: none;
background: rgba(29, 59, 83, 0.99);
}
pre[class*='language-']::selection,
pre[class*='language-'] ::selection,
code[class*='language-']::selection,
code[class*='language-'] ::selection {
text-shadow: none;
background: rgba(29, 59, 83, 0.99);
}
@media print {
code[class*='language-'],
pre[class*='language-'] {
text-shadow: none;
}
}
.token.comment,
.token.prolog,
.token.cdata {
color: rgb(99, 119, 119);
font-style: italic;
}
.token.punctuation {
color: rgb(199, 146, 234);
}
.namespace {
color: rgb(178, 204, 214);
}
.token.deleted {
color: rgba(239, 83, 80, 0.56);
font-style: italic;
}
.token.symbol,
.token.property {
color: rgb(128, 203, 196);
}
.token.tag,
.token.operator,
.token.keyword {
color: rgb(127, 219, 202);
}
.token.boolean {
color: rgb(255, 88, 116);
}
.token.number {
color: rgb(247, 140, 108);
}
.token.constant,
.token.function,
.token.builtin,
.token.char {
color: rgb(130, 170, 255);
}
.token.selector,
.token.doctype {
color: rgb(199, 146, 234);
font-style: italic;
}
.token.attr-name,
.token.inserted {
color: rgb(173, 219, 103);
font-style: italic;
}
.token.string,
.token.url,
.token.entity,
.language-css .token.string,
.style .token.string {
color: rgb(173, 219, 103);
}
.token.class-name,
.token.atrule,
.token.attr-value {
color: rgb(255, 203, 139);
}
.token.regex,
.token.important,
.token.variable {
color: rgb(214, 222, 235);
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

View file

@ -0,0 +1,6 @@
// Calculate brightness of a given color.
@function brightness($color) {
// @return ((red($color) * 0.299) + (green($color) * 0.587) + (blue($color) * 0.114)) / 255 * 100%;
// @return math.div((red($color) * 0.299) + (green($color) * 0.587) + (blue($color) * 0.114), 255);
@return calc(((red($color) * 0.299) + (green($color) * 0.587) + (blue($color) * 0.114)) / 255);
}

View file

@ -0,0 +1,85 @@
#article-content {
.content {
a:not(.button) {
&:hover {
filter: drop-shadow(0px 0px 3px var(--color--primary));
}
}
p {
margin: 0.75rem 0;
line-height: 1.55em;
}
h2 {
margin: 3rem 0 0.5rem;
}
h3 {
font-size: 1.2rem;
margin: 2rem 0 0.3rem;
}
h4 {
font-size: 1.3rem;
margin: 2rem 0 0.3rem;
}
picture {
display: inline;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 2rem;
margin-bottom: 2rem;
max-width: 100%;
height: auto;
width: auto;
box-shadow: var(--image-shadow);
}
figcaption {
font-size: 0.85rem;
text-align: center;
margin-bottom: 2rem;
color: rgba(var(--color--text-rgb), 0.8);
}
img + figcaption {
margin-top: -1rem;
}
blockquote {
padding: 25px 25px 15px;
border-radius: 20px;
font-size: 1.1rem;
border-left: 4px solid var(--color--primary);
background: var(--color--callout-background);
}
code:not([class^='language-']) {
background: var(--color--code-inline-background);
padding: 5px 10px;
border-radius: 5px;
}
code {
font-family: var(--font--mono);
}
}
.heading-link {
color: var(--color--primary);
text-decoration: none;
margin-right: 10px;
}
img {
border-radius: 6px;
}
}

49
src/lib/scss/_mixins.scss Normal file
View file

@ -0,0 +1,49 @@
@import './_breakpoints.scss';
@import './_functions.scss';
@mixin padded-container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
@include for-iphone-se {
padding-left: 0;
padding-right: 0;
}
@include for-tablet-portrait-up {
padding-right: 20px;
padding-left: 20px;
}
@include for-tablet-landscape-up {
padding-right: 30px;
padding-left: 30px;
}
@include for-desktop-up {
max-width: 1080px;
}
}
// Defines a bunch of CSS variables for a given color
// In HEX, HSL and RGB formats
// Plus a contrast option for text
@mixin define-color($title, $color) {
--color--#{$title}: #{$color};
--color--#{$title}-h: #{hue($color)};
--color--#{$title}-l: #{lightness($color)};
--color--#{$title}-s: #{saturation($color)};
--color--#{$title}-a: #{alpha($color)};
--color--#{$title}-rgb: #{red($color)}, #{green($color)}, #{blue($color)};
--color--#{$title}-contrast: #{if(
brightness($color) > 186,
var(--color--text),
var(--color--text-inverse)
)};
}

47
src/lib/scss/_reset.scss Normal file
View file

@ -0,0 +1,47 @@
/*
Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
}
html,
body {
height: 100%;
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
#root,
#__next {
isolation: isolate;
}

110
src/lib/scss/_themes.scss Normal file
View file

@ -0,0 +1,110 @@
@import '$lib/scss/_mixins.scss';
@mixin base-theme {
// Primary colors
@include define-color('primary', #90CEAA); // Main primary color
@include define-color('primary-shade', #5E8F6E); // Darker shade
@include define-color('primary-tint', #D8F2E4); // Lighter tint
// Secondary colors
@include define-color('secondary', #F4A261); // Warm complementary
@include define-color('secondary-shade', #A3643E); // Darker shade
@include define-color('secondary-tint', #FBD2A4); // Lighter tint
// Accent color
@include define-color('yellow', #FFD166); // Soft yellow for attention-grabbing
// Text colors
@include define-color('text', #1C1E26); // Main text
@include define-color('text-shade', #5D5F65); // Muted text
@include define-color('text-inverse', #FFFFFF); // Inverse text
@include define-color('text-inverse-shade', #9EB4B5); // Subtle inverse
// Background colors
@include define-color('page-background', #F4F8FB); // Main background
@include define-color('post-page-background', #F3FBFC); // Slightly darker for content
@include define-color('card-background', #FFFFFF); // Card background
// Callout component
@include define-color('callout-background', #F4F8FB); // Neutral light background
@include define-color('callout-background--info', #D8EFFF); // Info callout background
@include define-color('callout-accent--info', #5DA7F7); // Info accent
@include define-color('callout-background--warning', #FFF7D9); // Warning background
@include define-color('callout-accent--warning', #E39C3B); // Warning accent
@include define-color('callout-background--error', #FFE8E8); // Error background
@include define-color('callout-accent--error', #F75C5C); // Error accent
@include define-color('callout-background--success', #E9F9EF); // Success background
@include define-color('callout-accent--success', #68C99D); // Success accent
// Code block component
@include define-color('code-background', #F4F8FB); // Light code block background
@include define-color('code-text', #1C1E26); // Dark text for code
@include define-color('code-inline-background', #E3E3E3); // Inline code background
--color--waves-start: rgba(var(--color--primary-rgb), 0.3);
--color--waves-end: rgba(var(--color--primary-rgb), 0.1);
--card-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
--card-shadow-hover: 0px 4px 10px 8px rgb(0 0 0 / 10%);
--image-shadow: 8px 14px 38px rgba(39, 44, 49, 0.06), 1px 3px 8px rgba(39, 44, 49, 0.03);
}
@mixin dark-theme {
// Primary colors (Soft Green Tone)
@include define-color('primary', #90CEAA); // Main primary color
@include define-color('primary-shade', #54876B); // Darker shade for contrast
@include define-color('primary-tint', #BFE4D3); // Lighter tint for highlights
// Secondary colors (Complementary Soft Orange)
@include define-color('secondary', #F4A261); // Warm contrast
@include define-color('secondary-shade', #A3643E); // Darker shade
@include define-color('secondary-tint', #FBD2A4); // Lighter tint
// Accent color (Soft Yellow)
@include define-color('yellow', #FFD166); // Attention-grabbing
// Text Colors
@include define-color('text', #EAEAEA); // Main text (light gray)
@include define-color('text-shade', #B1B1B1); // Muted text
@include define-color('text-inverse', #121212); // Dark background contrast
@include define-color('text-inverse-shade', #5D5F65); // Subtle inverse shade
// Background Colors
@include define-color('page-background', #121212); // Main background
@include define-color('post-page-background', #181A1B); // Darker for content areas
@include define-color('card-background', #24282A); // Cards background
// Callout Backgrounds & Accents
@include define-color('callout-background', #181A1B); // Neutral dark background
@include define-color('callout-background--info', #125A75); // Info callout (cool blue)
@include define-color('callout-accent--info', #70C5E9); // Info accent
@include define-color('callout-background--warning', #7C4F1D); // Warning background
@include define-color('callout-accent--warning', #FFC857); // Warning accent
@include define-color('callout-background--error', #7D2A2E); // Error background
@include define-color('callout-accent--error', #F75C5C); // Error accent
@include define-color('callout-background--success', #1B5F45); // Success background
@include define-color('callout-accent--success', #66D9A8); // Success accent
// Inline Code Background
@include define-color('code-background', #1C1E26); // Dark code block background
@include define-color('code-text', #FFFFFF); // Light text for code
@include define-color('code-inline-background', #2B3131); // Inline code background
//@include define-color('code-inline-background', #2D3735); // Muted dark gray for code
}
:root {
@include base-theme;
&[data-theme='dark'] {
@include dark-theme;
}
&[data-theme='auto'] {
@media (prefers-color-scheme: dark) {
@include dark-theme;
}
}
}

View file

@ -0,0 +1,63 @@
a {
color: var(--color--text);
text-decoration-color: var(--color--primary);
text-underline-offset: 0.1em;
text-decoration-thickness: 2px;
transition: all 0.2s ease-in-out;
&:hover {
text-underline-offset: 0.3em;
}
}
::selection {
background-color: rgba(var(--color--primary-rgb), 0.3);
color: var(--color--text);
text-shadow: none;
}
strong,
b {
font-weight: 600;
}
em,
i {
font-style: italic;
}
// #region Titles
h1 {
font-size: 2.5rem;
font-weight: 700;
@include for-phone-only {
font-size: 2rem;
}
}
h2 {
font-size: 1.8rem;
font-weight: 600;
}
h3 {
font-size: 1.5rem;
font-weight: 600;
}
h4 {
font-size: 1.2rem;
}
h5 {
font-size: 1rem;
}
h1,
h2,
h3,
h4,
h5 {
font-family: var(--font--title);
}
// #endregion

View file

@ -0,0 +1,13 @@
:root {
// Fonts
--font--default: Inter, sans-serif;
--font--title: Merriweather, serif;
--font--mono: Ubuntu Mono, monospace;
// Grabbed from open-props.style
--ease-3: cubic-bezier(0.25, 0, 0.3, 1);
--ease-4: cubic-bezier(0.25, 0, 0.2, 1);
--ease-out-1: cubic-bezier(0, 0, 0.75, 1);
--ease-out-3: cubic-bezier(0, 0, 0.3, 1);
--ease-elastic-4: cubic-bezier(0.5, 1.5, 0.75, 1.25);
}

48
src/lib/scss/global.scss Normal file
View file

@ -0,0 +1,48 @@
@import '$lib/scss/_reset.scss';
@import '$lib/scss/_variables.scss';
@import '$lib/scss/_themes.scss';
@import '$lib/scss/_breakpoints.scss';
@import '$lib/scss/_functions.scss';
@import '$lib/scss/_mixins.scss';
@import '$lib/scss/_base.scss';
@import '$lib/scss/_typography.scss';
@import '$lib/scss/_markdown.scss';
@import '$lib/scss/_code-highlights.scss';
@import '$lib/scss/animations.scss';
@import '@fontsource/inter';
@import '@fontsource/inter/600.css';
@import '@fontsource/inter/700.css';
@import '@fontsource/merriweather';
@import '@fontsource/merriweather/900.css';
@import '@fontsource/ubuntu-mono';
body {
--body-background-color: var(--color--page-background);
background-color: var(--body-background-color);
color: var(--color--text);
fill: var(--color--text);
transition: all 0.4s ease;
font-family: var(--font--default);
line-height: 1.3;
scroll-behavior: smooth;
height: 100%;
min-height: 100vh;
/* safari viewport bug fix */
min-height: -webkit-fill-available;
width: 100%;
overflow-x: hidden;
}
html {
scroll-behavior: smooth;
font-size: 18px;
width: 100%;
}
#svelte-root {
height: 100%;
position: relative;
}

24
src/lib/stores/theme.ts Normal file
View file

@ -0,0 +1,24 @@
import { writable } from 'svelte/store';
import { browser } from '$app/environment';
function createTheme() {
let currentTheme;
if (browser) {
currentTheme = localStorage.getItem('theme-preference') || 'auto';
}
const { subscribe, set } = writable<string>(currentTheme);
return {
subscribe,
set: (value: string) => {
if (browser) {
localStorage.setItem('theme-preference', value);
document.firstElementChild?.setAttribute('data-theme', value);
}
set(value);
}
};
}
export const theme = createTheme();

1
src/lib/utils/regex.ts Normal file
View file

@ -0,0 +1 @@
export const HttpRegex = /^((http|https):\/\/)/;

Some files were not shown because too many files have changed in this diff Show more