@ -1,6 +0,0 @@ | |||||
--- | |||||
title: "{{ replace .Name "-" " " | title }}" | |||||
date: {{ .Date }} | |||||
draft: true | |||||
--- | |||||
@ -0,0 +1,11 @@ | |||||
+++ | |||||
title = "{{ replace .TranslationBaseName "-" " " | title }}" | |||||
date = "{{ .Date }}" | |||||
author = "" | |||||
authorTwitter = "" #do not include @ | |||||
cover = "" | |||||
tags = ["", ""] | |||||
keywords = ["", ""] | |||||
description = "" | |||||
showFullContent = false | |||||
+++ |
@ -1,5 +1,55 @@ | |||||
baseURL = "http://fr1nge.xyz/" | baseURL = "http://fr1nge.xyz/" | ||||
languageCode = "en-us" | languageCode = "en-us" | ||||
theme = "after-dark" | theme = "after-dark" | ||||
title = "Fr1nge's Personal Site" | |||||
title = "Fr1nge's Blog on Linux & Software Development" | |||||
[params] | |||||
contentTypeName = "posts" | |||||
themeColor = "blue" | |||||
showMenuItems = 2 | |||||
showLanguageSelector = false | |||||
fullWidthTheme = false | |||||
centerTheme = true | |||||
# favicon = "favicon.ico" | |||||
showLastUpdated = true | |||||
enableGitInfo = true | |||||
[params.twitter] | |||||
creator = "theFr1nge" | |||||
site = "yigitcolakoglu.com" | |||||
[languages] | |||||
[languages.en] | |||||
languageName = "English" | |||||
title = "Fr1nge's Personal Blog" | |||||
subtitle = "Yigit Colakoglu aka. Fr1nge's Personal Blog" | |||||
owner = "Yigit Colakoglu" | |||||
keywords = "Tech, Linux, Programming, Security" | |||||
copyright = "Yigit Colakoglu" | |||||
menuMore = "Show more" | |||||
readMore = "Read more" | |||||
readOtherPosts = "Read other posts" | |||||
newerPosts = "Newer posts" | |||||
olderPosts = "Older posts" | |||||
missingContentMessage = "Page not found..." | |||||
missingBackButtonLabel = "Back to home page" | |||||
[languages.en.params.logo] | |||||
logoText = "fr1nge.xyz" | |||||
logoHomeLink = "/" | |||||
[languages.en.menu] | |||||
[[languages.en.menu.main]] | |||||
identifier = "about" | |||||
name = "About" | |||||
url = "/about" | |||||
[[languages.en.menu.main]] | |||||
identifier = "showcase" | |||||
name = "Showcase" | |||||
url = "/showcase" |
@ -0,0 +1,14 @@ | |||||
--- | |||||
title: "Test" | |||||
date: 2021-04-13T22:36:35+03:00 | |||||
draft: false | |||||
author = "Yigit Colakoglu" | |||||
authorTwitter = "theFr1nge" | |||||
cover = "" | |||||
tags = ["", ""] | |||||
keywords = ["", ""] | |||||
description = "" | |||||
showFullContent = false | |||||
--- | |||||
Hello, this is a test |
@ -0,0 +1,6 @@ | |||||
--- | |||||
title: "Test2" | |||||
date: 2021-04-13T22:45:34+03:00 | |||||
draft: false | |||||
--- | |||||
@ -0,0 +1,2 @@ | |||||
.DS_Store | |||||
node_modules |
@ -1,661 +1,13 @@ | |||||
GNU AFFERO GENERAL PUBLIC LICENSE | |||||
Version 3, 19 November 2007 | |||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> | |||||
Everyone is permitted to copy and distribute verbatim copies | |||||
of this license document, but changing it is not allowed. | |||||
Preamble | |||||
The GNU Affero General Public License is a free, copyleft license for | |||||
software and other kinds of works, specifically designed to ensure | |||||
cooperation with the community in the case of network server software. | |||||
The licenses for most software and other practical works are designed | |||||
to take away your freedom to share and change the works. By contrast, | |||||
our General Public Licenses are intended to guarantee your freedom to | |||||
share and change all versions of a program--to make sure it remains free | |||||
software for all its users. | |||||
When we speak of free software, we are referring to freedom, not | |||||
price. Our General Public Licenses are designed to make sure that you | |||||
have the freedom to distribute copies of free software (and charge for | |||||
them if you wish), that you receive source code or can get it if you | |||||
want it, that you can change the software or use pieces of it in new | |||||
free programs, and that you know you can do these things. | |||||
Developers that use our General Public Licenses protect your rights | |||||
with two steps: (1) assert copyright on the software, and (2) offer | |||||
you this License which gives you legal permission to copy, distribute | |||||
and/or modify the software. | |||||
A secondary benefit of defending all users' freedom is that | |||||
improvements made in alternate versions of the program, if they | |||||
receive widespread use, become available for other developers to | |||||
incorporate. Many developers of free software are heartened and | |||||
encouraged by the resulting cooperation. However, in the case of | |||||
software used on network servers, this result may fail to come about. | |||||
The GNU General Public License permits making a modified version and | |||||
letting the public access it on a server without ever releasing its | |||||
source code to the public. | |||||
The GNU Affero General Public License is designed specifically to | |||||
ensure that, in such cases, the modified source code becomes available | |||||
to the community. It requires the operator of a network server to | |||||
provide the source code of the modified version running there to the | |||||
users of that server. Therefore, public use of a modified version, on | |||||
a publicly accessible server, gives the public access to the source | |||||
code of the modified version. | |||||
An older license, called the Affero General Public License and | |||||
published by Affero, was designed to accomplish similar goals. This is | |||||
a different license, not a version of the Affero GPL, but Affero has | |||||
released a new version of the Affero GPL which permits relicensing under | |||||
this license. | |||||
The precise terms and conditions for copying, distribution and | |||||
modification follow. | |||||
TERMS AND CONDITIONS | |||||
0. Definitions. | |||||
"This License" refers to version 3 of the GNU Affero General Public License. | |||||
"Copyright" also means copyright-like laws that apply to other kinds of | |||||
works, such as semiconductor masks. | |||||
"The Program" refers to any copyrightable work licensed under this | |||||
License. Each licensee is addressed as "you". "Licensees" and | |||||
"recipients" may be individuals or organizations. | |||||
To "modify" a work means to copy from or adapt all or part of the work | |||||
in a fashion requiring copyright permission, other than the making of an | |||||
exact copy. The resulting work is called a "modified version" of the | |||||
earlier work or a work "based on" the earlier work. | |||||
A "covered work" means either the unmodified Program or a work based | |||||
on the Program. | |||||
To "propagate" a work means to do anything with it that, without | |||||
permission, would make you directly or secondarily liable for | |||||
infringement under applicable copyright law, except executing it on a | |||||
computer or modifying a private copy. Propagation includes copying, | |||||
distribution (with or without modification), making available to the | |||||
public, and in some countries other activities as well. | |||||
To "convey" a work means any kind of propagation that enables other | |||||
parties to make or receive copies. Mere interaction with a user through | |||||
a computer network, with no transfer of a copy, is not conveying. | |||||
An interactive user interface displays "Appropriate Legal Notices" | |||||
to the extent that it includes a convenient and prominently visible | |||||
feature that (1) displays an appropriate copyright notice, and (2) | |||||
tells the user that there is no warranty for the work (except to the | |||||
extent that warranties are provided), that licensees may convey the | |||||
work under this License, and how to view a copy of this License. If | |||||
the interface presents a list of user commands or options, such as a | |||||
menu, a prominent item in the list meets this criterion. | |||||
1. Source Code. | |||||
The "source code" for a work means the preferred form of the work | |||||
for making modifications to it. "Object code" means any non-source | |||||
form of a work. | |||||
A "Standard Interface" means an interface that either is an official | |||||
standard defined by a recognized standards body, or, in the case of | |||||
interfaces specified for a particular programming language, one that | |||||
is widely used among developers working in that language. | |||||
The "System Libraries" of an executable work include anything, other | |||||
than the work as a whole, that (a) is included in the normal form of | |||||
packaging a Major Component, but which is not part of that Major | |||||
Component, and (b) serves only to enable use of the work with that | |||||
Major Component, or to implement a Standard Interface for which an | |||||
implementation is available to the public in source code form. A | |||||
"Major Component", in this context, means a major essential component | |||||
(kernel, window system, and so on) of the specific operating system | |||||
(if any) on which the executable work runs, or a compiler used to | |||||
produce the work, or an object code interpreter used to run it. | |||||
The "Corresponding Source" for a work in object code form means all | |||||
the source code needed to generate, install, and (for an executable | |||||
work) run the object code and to modify the work, including scripts to | |||||
control those activities. However, it does not include the work's | |||||
System Libraries, or general-purpose tools or generally available free | |||||
programs which are used unmodified in performing those activities but | |||||
which are not part of the work. For example, Corresponding Source | |||||
includes interface definition files associated with source files for | |||||
the work, and the source code for shared libraries and dynamically | |||||
linked subprograms that the work is specifically designed to require, | |||||
such as by intimate data communication or control flow between those | |||||
subprograms and other parts of the work. | |||||
The Corresponding Source need not include anything that users | |||||
can regenerate automatically from other parts of the Corresponding | |||||
Source. | |||||
The Corresponding Source for a work in source code form is that | |||||
same work. | |||||
2. Basic Permissions. | |||||
All rights granted under this License are granted for the term of | |||||
copyright on the Program, and are irrevocable provided the stated | |||||
conditions are met. This License explicitly affirms your unlimited | |||||
permission to run the unmodified Program. The output from running a | |||||
covered work is covered by this License only if the output, given its | |||||
content, constitutes a covered work. This License acknowledges your | |||||
rights of fair use or other equivalent, as provided by copyright law. | |||||
You may make, run and propagate covered works that you do not | |||||
convey, without conditions so long as your license otherwise remains | |||||
in force. You may convey covered works to others for the sole purpose | |||||
of having them make modifications exclusively for you, or provide you | |||||
with facilities for running those works, provided that you comply with | |||||
the terms of this License in conveying all material for which you do | |||||
not control copyright. Those thus making or running the covered works | |||||
for you must do so exclusively on your behalf, under your direction | |||||
and control, on terms that prohibit them from making any copies of | |||||
your copyrighted material outside their relationship with you. | |||||
Conveying under any other circumstances is permitted solely under | |||||
the conditions stated below. Sublicensing is not allowed; section 10 | |||||
makes it unnecessary. | |||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law. | |||||
No covered work shall be deemed part of an effective technological | |||||
measure under any applicable law fulfilling obligations under article | |||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or | |||||
similar laws prohibiting or restricting circumvention of such | |||||
measures. | |||||
When you convey a covered work, you waive any legal power to forbid | |||||
circumvention of technological measures to the extent such circumvention | |||||
is effected by exercising rights under this License with respect to | |||||
the covered work, and you disclaim any intention to limit operation or | |||||
modification of the work as a means of enforcing, against the work's | |||||
users, your or third parties' legal rights to forbid circumvention of | |||||
technological measures. | |||||
4. Conveying Verbatim Copies. | |||||
You may convey verbatim copies of the Program's source code as you | |||||
receive it, in any medium, provided that you conspicuously and | |||||
appropriately publish on each copy an appropriate copyright notice; | |||||
keep intact all notices stating that this License and any | |||||
non-permissive terms added in accord with section 7 apply to the code; | |||||
keep intact all notices of the absence of any warranty; and give all | |||||
recipients a copy of this License along with the Program. | |||||
You may charge any price or no price for each copy that you convey, | |||||
and you may offer support or warranty protection for a fee. | |||||
5. Conveying Modified Source Versions. | |||||
You may convey a work based on the Program, or the modifications to | |||||
produce it from the Program, in the form of source code under the | |||||
terms of section 4, provided that you also meet all of these conditions: | |||||
a) The work must carry prominent notices stating that you modified | |||||
it, and giving a relevant date. | |||||
b) The work must carry prominent notices stating that it is | |||||
released under this License and any conditions added under section | |||||
7. This requirement modifies the requirement in section 4 to | |||||
"keep intact all notices". | |||||
c) You must license the entire work, as a whole, under this | |||||
License to anyone who comes into possession of a copy. This | |||||
License will therefore apply, along with any applicable section 7 | |||||
additional terms, to the whole of the work, and all its parts, | |||||
regardless of how they are packaged. This License gives no | |||||
permission to license the work in any other way, but it does not | |||||
invalidate such permission if you have separately received it. | |||||
d) If the work has interactive user interfaces, each must display | |||||
Appropriate Legal Notices; however, if the Program has interactive | |||||
interfaces that do not display Appropriate Legal Notices, your | |||||
work need not make them do so. | |||||
A compilation of a covered work with other separate and independent | |||||
works, which are not by their nature extensions of the covered work, | |||||
and which are not combined with it such as to form a larger program, | |||||
in or on a volume of a storage or distribution medium, is called an | |||||
"aggregate" if the compilation and its resulting copyright are not | |||||
used to limit the access or legal rights of the compilation's users | |||||
beyond what the individual works permit. Inclusion of a covered work | |||||
in an aggregate does not cause this License to apply to the other | |||||
parts of the aggregate. | |||||
6. Conveying Non-Source Forms. | |||||
You may convey a covered work in object code form under the terms | |||||
of sections 4 and 5, provided that you also convey the | |||||
machine-readable Corresponding Source under the terms of this License, | |||||
in one of these ways: | |||||
a) Convey the object code in, or embodied in, a physical product | |||||
(including a physical distribution medium), accompanied by the | |||||
Corresponding Source fixed on a durable physical medium | |||||
customarily used for software interchange. | |||||
b) Convey the object code in, or embodied in, a physical product | |||||
(including a physical distribution medium), accompanied by a | |||||
written offer, valid for at least three years and valid for as | |||||
long as you offer spare parts or customer support for that product | |||||
model, to give anyone who possesses the object code either (1) a | |||||
copy of the Corresponding Source for all the software in the | |||||
product that is covered by this License, on a durable physical | |||||
medium customarily used for software interchange, for a price no | |||||
more than your reasonable cost of physically performing this | |||||
conveying of source, or (2) access to copy the | |||||
Corresponding Source from a network server at no charge. | |||||
c) Convey individual copies of the object code with a copy of the | |||||
written offer to provide the Corresponding Source. This | |||||
alternative is allowed only occasionally and noncommercially, and | |||||
only if you received the object code with such an offer, in accord | |||||
with subsection 6b. | |||||
d) Convey the object code by offering access from a designated | |||||
place (gratis or for a charge), and offer equivalent access to the | |||||
Corresponding Source in the same way through the same place at no | |||||
further charge. You need not require recipients to copy the | |||||
Corresponding Source along with the object code. If the place to | |||||
copy the object code is a network server, the Corresponding Source | |||||
may be on a different server (operated by you or a third party) | |||||
that supports equivalent copying facilities, provided you maintain | |||||
clear directions next to the object code saying where to find the | |||||
Corresponding Source. Regardless of what server hosts the | |||||
Corresponding Source, you remain obligated to ensure that it is | |||||
available for as long as needed to satisfy these requirements. | |||||
e) Convey the object code using peer-to-peer transmission, provided | |||||
you inform other peers where the object code and Corresponding | |||||
Source of the work are being offered to the general public at no | |||||
charge under subsection 6d. | |||||
A separable portion of the object code, whose source code is excluded | |||||
from the Corresponding Source as a System Library, need not be | |||||
included in conveying the object code work. | |||||
A "User Product" is either (1) a "consumer product", which means any | |||||
tangible personal property which is normally used for personal, family, | |||||
or household purposes, or (2) anything designed or sold for incorporation | |||||
into a dwelling. In determining whether a product is a consumer product, | |||||
doubtful cases shall be resolved in favor of coverage. For a particular | |||||
product received by a particular user, "normally used" refers to a | |||||
typical or common use of that class of product, regardless of the status | |||||
of the particular user or of the way in which the particular user | |||||
actually uses, or expects or is expected to use, the product. A product | |||||
is a consumer product regardless of whether the product has substantial | |||||
commercial, industrial or non-consumer uses, unless such uses represent | |||||
the only significant mode of use of the product. | |||||
"Installation Information" for a User Product means any methods, | |||||
procedures, authorization keys, or other information required to install | |||||
and execute modified versions of a covered work in that User Product from | |||||
a modified version of its Corresponding Source. The information must | |||||
suffice to ensure that the continued functioning of the modified object | |||||
code is in no case prevented or interfered with solely because | |||||
modification has been made. | |||||
If you convey an object code work under this section in, or with, or | |||||
specifically for use in, a User Product, and the conveying occurs as | |||||
part of a transaction in which the right of possession and use of the | |||||
User Product is transferred to the recipient in perpetuity or for a | |||||
fixed term (regardless of how the transaction is characterized), the | |||||
Corresponding Source conveyed under this section must be accompanied | |||||
by the Installation Information. But this requirement does not apply | |||||
if neither you nor any third party retains the ability to install | |||||
modified object code on the User Product (for example, the work has | |||||
been installed in ROM). | |||||
The requirement to provide Installation Information does not include a | |||||
requirement to continue to provide support service, warranty, or updates | |||||
for a work that has been modified or installed by the recipient, or for | |||||
the User Product in which it has been modified or installed. Access to a | |||||
network may be denied when the modification itself materially and | |||||
adversely affects the operation of the network or violates the rules and | |||||
protocols for communication across the network. | |||||
Corresponding Source conveyed, and Installation Information provided, | |||||
in accord with this section must be in a format that is publicly | |||||
documented (and with an implementation available to the public in | |||||
source code form), and must require no special password or key for | |||||
unpacking, reading or copying. | |||||
7. Additional Terms. | |||||
"Additional permissions" are terms that supplement the terms of this | |||||
License by making exceptions from one or more of its conditions. | |||||
Additional permissions that are applicable to the entire Program shall | |||||
be treated as though they were included in this License, to the extent | |||||
that they are valid under applicable law. If additional permissions | |||||
apply only to part of the Program, that part may be used separately | |||||
under those permissions, but the entire Program remains governed by | |||||
this License without regard to the additional permissions. | |||||
When you convey a copy of a covered work, you may at your option | |||||
remove any additional permissions from that copy, or from any part of | |||||
it. (Additional permissions may be written to require their own | |||||
removal in certain cases when you modify the work.) You may place | |||||
additional permissions on material, added by you to a covered work, | |||||
for which you have or can give appropriate copyright permission. | |||||
Notwithstanding any other provision of this License, for material you | |||||
add to a covered work, you may (if authorized by the copyright holders of | |||||
that material) supplement the terms of this License with terms: | |||||
a) Disclaiming warranty or limiting liability differently from the | |||||
terms of sections 15 and 16 of this License; or | |||||
b) Requiring preservation of specified reasonable legal notices or | |||||
author attributions in that material or in the Appropriate Legal | |||||
Notices displayed by works containing it; or | |||||
c) Prohibiting misrepresentation of the origin of that material, or | |||||
requiring that modified versions of such material be marked in | |||||
reasonable ways as different from the original version; or | |||||
d) Limiting the use for publicity purposes of names of licensors or | |||||
authors of the material; or | |||||
e) Declining to grant rights under trademark law for use of some | |||||
trade names, trademarks, or service marks; or | |||||
f) Requiring indemnification of licensors and authors of that | |||||
material by anyone who conveys the material (or modified versions of | |||||
it) with contractual assumptions of liability to the recipient, for | |||||
any liability that these contractual assumptions directly impose on | |||||
those licensors and authors. | |||||
All other non-permissive additional terms are considered "further | |||||
restrictions" within the meaning of section 10. If the Program as you | |||||
received it, or any part of it, contains a notice stating that it is | |||||
governed by this License along with a term that is a further | |||||
restriction, you may remove that term. If a license document contains | |||||
a further restriction but permits relicensing or conveying under this | |||||
License, you may add to a covered work material governed by the terms | |||||
of that license document, provided that the further restriction does | |||||
not survive such relicensing or conveying. | |||||
If you add terms to a covered work in accord with this section, you | |||||
must place, in the relevant source files, a statement of the | |||||
additional terms that apply to those files, or a notice indicating | |||||
where to find the applicable terms. | |||||
Additional terms, permissive or non-permissive, may be stated in the | |||||
form of a separately written license, or stated as exceptions; | |||||
the above requirements apply either way. | |||||
8. Termination. | |||||
You may not propagate or modify a covered work except as expressly | |||||
provided under this License. Any attempt otherwise to propagate or | |||||
modify it is void, and will automatically terminate your rights under | |||||
this License (including any patent licenses granted under the third | |||||
paragraph of section 11). | |||||
However, if you cease all violation of this License, then your | |||||
license from a particular copyright holder is reinstated (a) | |||||
provisionally, unless and until the copyright holder explicitly and | |||||
finally terminates your license, and (b) permanently, if the copyright | |||||
holder fails to notify you of the violation by some reasonable means | |||||
prior to 60 days after the cessation. | |||||
Moreover, your license from a particular copyright holder is | |||||
reinstated permanently if the copyright holder notifies you of the | |||||
violation by some reasonable means, this is the first time you have | |||||
received notice of violation of this License (for any work) from that | |||||
copyright holder, and you cure the violation prior to 30 days after | |||||
your receipt of the notice. | |||||
Termination of your rights under this section does not terminate the | |||||
licenses of parties who have received copies or rights from you under | |||||
this License. If your rights have been terminated and not permanently | |||||
reinstated, you do not qualify to receive new licenses for the same | |||||
material under section 10. | |||||
9. Acceptance Not Required for Having Copies. | |||||
You are not required to accept this License in order to receive or | |||||
run a copy of the Program. Ancillary propagation of a covered work | |||||
occurring solely as a consequence of using peer-to-peer transmission | |||||
to receive a copy likewise does not require acceptance. However, | |||||
nothing other than this License grants you permission to propagate or | |||||
modify any covered work. These actions infringe copyright if you do | |||||
not accept this License. Therefore, by modifying or propagating a | |||||
covered work, you indicate your acceptance of this License to do so. | |||||
10. Automatic Licensing of Downstream Recipients. | |||||
Each time you convey a covered work, the recipient automatically | |||||
receives a license from the original licensors, to run, modify and | |||||
propagate that work, subject to this License. You are not responsible | |||||
for enforcing compliance by third parties with this License. | |||||
An "entity transaction" is a transaction transferring control of an | |||||
organization, or substantially all assets of one, or subdividing an | |||||
organization, or merging organizations. If propagation of a covered | |||||
work results from an entity transaction, each party to that | |||||
transaction who receives a copy of the work also receives whatever | |||||
licenses to the work the party's predecessor in interest had or could | |||||
give under the previous paragraph, plus a right to possession of the | |||||
Corresponding Source of the work from the predecessor in interest, if | |||||
the predecessor has it or can get it with reasonable efforts. | |||||
You may not impose any further restrictions on the exercise of the | |||||
rights granted or affirmed under this License. For example, you may | |||||
not impose a license fee, royalty, or other charge for exercise of | |||||
rights granted under this License, and you may not initiate litigation | |||||
(including a cross-claim or counterclaim in a lawsuit) alleging that | |||||
any patent claim is infringed by making, using, selling, offering for | |||||
sale, or importing the Program or any portion of it. | |||||
11. Patents. | |||||
A "contributor" is a copyright holder who authorizes use under this | |||||
License of the Program or a work on which the Program is based. The | |||||
work thus licensed is called the contributor's "contributor version". | |||||
A contributor's "essential patent claims" are all patent claims | |||||
owned or controlled by the contributor, whether already acquired or | |||||
hereafter acquired, that would be infringed by some manner, permitted | |||||
by this License, of making, using, or selling its contributor version, | |||||
but do not include claims that would be infringed only as a | |||||
consequence of further modification of the contributor version. For | |||||
purposes of this definition, "control" includes the right to grant | |||||
patent sublicenses in a manner consistent with the requirements of | |||||
this License. | |||||
Each contributor grants you a non-exclusive, worldwide, royalty-free | |||||
patent license under the contributor's essential patent claims, to | |||||
make, use, sell, offer for sale, import and otherwise run, modify and | |||||
propagate the contents of its contributor version. | |||||
In the following three paragraphs, a "patent license" is any express | |||||
agreement or commitment, however denominated, not to enforce a patent | |||||
(such as an express permission to practice a patent or covenant not to | |||||
sue for patent infringement). To "grant" such a patent license to a | |||||
party means to make such an agreement or commitment not to enforce a | |||||
patent against the party. | |||||
If you convey a covered work, knowingly relying on a patent license, | |||||
and the Corresponding Source of the work is not available for anyone | |||||
to copy, free of charge and under the terms of this License, through a | |||||
publicly available network server or other readily accessible means, | |||||
then you must either (1) cause the Corresponding Source to be so | |||||
available, or (2) arrange to deprive yourself of the benefit of the | |||||
patent license for this particular work, or (3) arrange, in a manner | |||||
consistent with the requirements of this License, to extend the patent | |||||
license to downstream recipients. "Knowingly relying" means you have | |||||
actual knowledge that, but for the patent license, your conveying the | |||||
covered work in a country, or your recipient's use of the covered work | |||||
in a country, would infringe one or more identifiable patents in that | |||||
country that you have reason to believe are valid. | |||||
If, pursuant to or in connection with a single transaction or | |||||
arrangement, you convey, or propagate by procuring conveyance of, a | |||||
covered work, and grant a patent license to some of the parties | |||||
receiving the covered work authorizing them to use, propagate, modify | |||||
or convey a specific copy of the covered work, then the patent license | |||||
you grant is automatically extended to all recipients of the covered | |||||
work and works based on it. | |||||
A patent license is "discriminatory" if it does not include within | |||||
the scope of its coverage, prohibits the exercise of, or is | |||||
conditioned on the non-exercise of one or more of the rights that are | |||||
specifically granted under this License. You may not convey a covered | |||||
work if you are a party to an arrangement with a third party that is | |||||
in the business of distributing software, under which you make payment | |||||
to the third party based on the extent of your activity of conveying | |||||
the work, and under which the third party grants, to any of the | |||||
parties who would receive the covered work from you, a discriminatory | |||||
patent license (a) in connection with copies of the covered work | |||||
conveyed by you (or copies made from those copies), or (b) primarily | |||||
for and in connection with specific products or compilations that | |||||
contain the covered work, unless you entered into that arrangement, | |||||
or that patent license was granted, prior to 28 March 2007. | |||||
Nothing in this License shall be construed as excluding or limiting | |||||
any implied license or other defenses to infringement that may | |||||
otherwise be available to you under applicable patent law. | |||||
12. No Surrender of Others' Freedom. | |||||
If conditions are imposed on you (whether by court order, agreement or | |||||
otherwise) that contradict the conditions of this License, they do not | |||||
excuse you from the conditions of this License. If you cannot convey a | |||||
covered work so as to satisfy simultaneously your obligations under this | |||||
License and any other pertinent obligations, then as a consequence you may | |||||
not convey it at all. For example, if you agree to terms that obligate you | |||||
to collect a royalty for further conveying from those to whom you convey | |||||
the Program, the only way you could satisfy both those terms and this | |||||
License would be to refrain entirely from conveying the Program. | |||||
13. Remote Network Interaction; Use with the GNU General Public License. | |||||
Notwithstanding any other provision of this License, if you modify the | |||||
Program, your modified version must prominently offer all users | |||||
interacting with it remotely through a computer network (if your version | |||||
supports such interaction) an opportunity to receive the Corresponding | |||||
Source of your version by providing access to the Corresponding Source | |||||
from a network server at no charge, through some standard or customary | |||||
means of facilitating copying of software. This Corresponding Source | |||||
shall include the Corresponding Source for any work covered by version 3 | |||||
of the GNU General Public License that is incorporated pursuant to the | |||||
following paragraph. | |||||
Notwithstanding any other provision of this License, you have | |||||
permission to link or combine any covered work with a work licensed | |||||
under version 3 of the GNU General Public License into a single | |||||
combined work, and to convey the resulting work. The terms of this | |||||
License will continue to apply to the part which is the covered work, | |||||
but the work with which it is combined will remain governed by version | |||||
3 of the GNU General Public License. | |||||
14. Revised Versions of this License. | |||||
The Free Software Foundation may publish revised and/or new versions of | |||||
the GNU Affero General Public License from time to time. Such new versions | |||||
will be similar in spirit to the present version, but may differ in detail to | |||||
address new problems or concerns. | |||||
Each version is given a distinguishing version number. If the | |||||
Program specifies that a certain numbered version of the GNU Affero General | |||||
Public License "or any later version" applies to it, you have the | |||||
option of following the terms and conditions either of that numbered | |||||
version or of any later version published by the Free Software | |||||
Foundation. If the Program does not specify a version number of the | |||||
GNU Affero General Public License, you may choose any version ever published | |||||
by the Free Software Foundation. | |||||
If the Program specifies that a proxy can decide which future | |||||
versions of the GNU Affero General Public License can be used, that proxy's | |||||
public statement of acceptance of a version permanently authorizes you | |||||
to choose that version for the Program. | |||||
Later license versions may give you additional or different | |||||
permissions. However, no additional obligations are imposed on any | |||||
author or copyright holder as a result of your choosing to follow a | |||||
later version. | |||||
15. Disclaimer of Warranty. | |||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | |||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | |||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY | |||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, | |||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM | |||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF | |||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | |||||
16. Limitation of Liability. | |||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS | |||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY | |||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE | |||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF | |||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD | |||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), | |||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | |||||
SUCH DAMAGES. | |||||
17. Interpretation of Sections 15 and 16. | |||||
If the disclaimer of warranty and limitation of liability provided | |||||
above cannot be given local legal effect according to their terms, | |||||
reviewing courts shall apply local law that most closely approximates | |||||
an absolute waiver of all civil liability in connection with the | |||||
Program, unless a warranty or assumption of liability accompanies a | |||||
copy of the Program in return for a fee. | |||||
END OF TERMS AND CONDITIONS | |||||
How to Apply These Terms to Your New Programs | |||||
If you develop a new program, and you want it to be of the greatest | |||||
possible use to the public, the best way to achieve this is to make it | |||||
free software which everyone can redistribute and change under these terms. | |||||
To do so, attach the following notices to the program. It is safest | |||||
to attach them to the start of each source file to most effectively | |||||
state the exclusion of warranty; and each file should have at least | |||||
the "copyright" line and a pointer to where the full notice is found. | |||||
<one line to give the program's name and a brief idea of what it does.> | |||||
Copyright (C) <year> <name of author> | |||||
This program is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as published by | |||||
the Free Software Foundation, either version 3 of the License, or | |||||
(at your option) any later version. | |||||
This program is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
Also add information on how to contact you by electronic and paper mail. | |||||
If your software can interact with users remotely through a computer | |||||
network, you should also make sure that it provides a way for users to | |||||
get its source. For example, if your program is a web application, its | |||||
interface could display a "Source" link that leads users to an archive | |||||
of the code. There are many ways you could offer source, and different | |||||
solutions will be better for different programs; see section 13 for the | |||||
specific requirements. | |||||
You should also get your employer (if you work as a programmer) or school, | |||||
if any, to sign a "copyright disclaimer" for the program, if necessary. | |||||
For more information on this, and how to apply and follow the GNU AGPL, see | |||||
<https://www.gnu.org/licenses/>. | |||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |||||
Version 2, December 2004 | |||||
Copyright 2016-2018 Josh Habdas <jhabdas@protonmail.com> (https://habd.as) | |||||
Everyone is permitted to copy and distribute verbatim or modified | |||||
copies of this license document, and changing it is allowed as long | |||||
as the name is changed. | |||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |||||
0. You just DO WHAT THE FUCK YOU WANT TO. |
@ -1,56 +0,0 @@ | |||||
# | |||||
# Copyright (C) 2019, 2020 Josh Habdas <jhabdas@protonmail.com> | |||||
# | |||||
# This file is part of After Dark. | |||||
# | |||||
# After Dark is free software: you can redistribute it and/or modify | |||||
# it under the terms of the GNU Affero General Public License as published | |||||
# by the Free Software Foundation, either version 3 of the License, or | |||||
# (at your option) any later version. | |||||
# | |||||
# After Dark is distributed in the hope that it will be useful, | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
# GNU Affero General Public License for more details. | |||||
# | |||||
# You should have received a copy of the GNU Affero General Public License | |||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
# | |||||
# DOCKER-VERSION 19.03.8-ce, build afacb8b7f0 | |||||
# Specify build image | |||||
ARG GO_VERSION=1.14.3 | |||||
ARG BUILD_TARGET=alpine3.11 | |||||
# Pull builder base image | |||||
FROM golang:${GO_VERSION}-${BUILD_TARGET} AS hugobuilder | |||||
# Set hugo environment variables | |||||
ENV HUGO_VERSION=0.71.0 \ | |||||
CGO_ENABLED=1 \ | |||||
GOOS=linux \ | |||||
GO111MODULE=on \ | |||||
BUILD_TAGS="extended" | |||||
# Build hugo from source using specified version | |||||
RUN \ | |||||
apk add --update --no-cache git gcc g++ && \ | |||||
git clone https://github.com/gohugoio/hugo.git $GOPATH/src/github.com/gohugoio/hugo && \ | |||||
cd ${GOPATH:-$HOME/go}/src/github.com/gohugoio/hugo && \ | |||||
git checkout v$HUGO_VERSION && \ | |||||
go install -ldflags '-s -w -extldflags "-static"' -tags ${BUILD_TAGS} | |||||
# Install After Dark via script | |||||
FROM node:alpine as sitebuilder | |||||
COPY --from=hugobuilder /go/bin/hugo /usr/local/bin/hugo | |||||
WORKDIR /tmp | |||||
RUN wget -qO - https://go.habd.as/after-dark | sh | |||||
# Move compiled sources into micro container | |||||
FROM busybox | |||||
EXPOSE 80 | |||||
COPY --from=hugobuilder /go/bin/hugo /usr/local/bin/hugo | |||||
COPY --from=sitebuilder /tmp/flying-toasters/ /opt/after-dark/ | |||||
ENTRYPOINT ["/usr/local/bin/hugo"] | |||||
CMD ["serve","--buildDrafts","--bind","0.0.0.0","--port","80","--source","/opt/after-dark","--destination","/var/www"] |
@ -1,106 +1,755 @@ | |||||
<h1 align="center">After Dark</h1> | |||||
<p align="center"> | |||||
<strong>A retro dark theme for <a target="intro" href="https://gohugo.io/">Hugo</a>.</strong> | |||||
</p> | |||||
<p align="center"> | |||||
<img src="images/minimal-mac.png" title="After Dark running on a MacBook and iPhone" alt="After Dark theme screenshots"> | |||||
</p> | |||||
<p align="center"> | |||||
<a href="https://www.npmjs.com/package/after-dark"><img src="https://img.shields.io/npm/dm/after-dark.svg?style=flat-square" alt="NPM downloads per month"></a> | |||||
<a href="https://www.npmjs.com/package/after-dark"><img src="https://img.shields.io/npm/v/after-dark.svg?style=flat-square" alt="Latest NPM version"></a> | |||||
<a href="https://github.com/comfusion/after-dark/blob/master/COPYING"><img src="https://img.shields.io/github/license/comfusion/after-dark.svg?style=flat-square" alt="Project license"></a> | |||||
</p> | |||||
## Features | |||||
<details> | |||||
<summary style="margin-bottom:1em"> | |||||
View the full list of features | |||||
</summary> | |||||
<table> | |||||
<thead> | |||||
<tr> | |||||
<th>Feature</th> | |||||
<th>Summary</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<tr> | |||||
<td>Deceptive Simplicity</td> | |||||
<td>After Dark is a <a target="feature" href="http://themes.gohugo.io/">Hugo theme</a>, making it a suitable starting point for <b>novice and advanced developers</b> alike. It advances using the "Code for today, not for tomorrow" philosophy of <abbr title="eXtreme Programming">XP</abbr> and includes only what's necessary to create and run your site – nothing more.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Semantic Versioning</td> | |||||
<td>Predictable changes enable theme users stay up-to-date with what's happening. After Dark uses <a target="feature" href="http://semver.org/">Semantic Versioning</a> and maintains a <a target="feature" href="https://github.com/comfusion/after-dark/blob/master/CHANGELOG.md">CHANGELOG</a> for easy consumption.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Inclusive Design</td> | |||||
<td>Optimized for mobile, tablet, desktop and <kbd>terminal</kbd> browsers.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Performance Optimized</td> | |||||
<td>Page content, favicon and styles <b>load in a single request</b> on all pages. Resources loaded asynchronously whenver possible. Responsive images with LQIP out of the box. Users should see a <b>~1 second page loads over 2G</b> when hosted using a <abbr title="Content Delivery Network">CDN</abbr>.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Designed to Scale</td> | |||||
<td>After Dark is capable of generating <b>~1000 pages per second</b> thanks to <a target="feature" href="https://gohugo.io/">Hugo</a> and is likely to become faster over time.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#lazy-loading">Lazy Loading</a></td> | |||||
<td>Lazily load your images, iFrames and script embeds. After Dark uses the <a title="feature" href="https://github.com/aFarkas/lazysizes">lazysizes</a> library, a zero-configuration JavaScript library with support for <abbr title="Low Quality Image Placeholders">LQIP</abbr> and responsive images.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#bpg-image-support">BPG Image Support</a></td> | |||||
<td>After Dark supports the <a href="https://bellard.org/bpg/">BPG Image format</a>. Native browser support for BPG is dismal. As a result, a polyfill has been provided to render BPG images.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#social-engagement">Social Engagement</a></td> | |||||
<td>After Dark provides automatic and configurable <a target="feature" href="http://ogp.me/">Open Graph</a> support, Twitter Cards and Telegram Instant View making social shares pop like 37 pieces of flair.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#search-optimization">Search Optimization</a></td> | |||||
<td>Using <a target="feature" href="https://moz.com/learn/seo/schema-structured-data">Schema Structured Data</a> and meta tags, After Dark gives crawlers rich data about the site structure and content. No configuration required.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#post-images">Post Images</a></td> | |||||
<td>Increase the visual appeal of your posts by providing a captivating image above your content. After Dark enables configuration-driven post images which are lazy-loaded, responsive and automatically cropped for a consistent look-and-feel across your site.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#fuzzy-search">Fuzzy Search</a></td> | |||||
<td>After Dark ships with an in-browser search app built with <a target="features" href="https://vuejs.org/">Vue</a>, <a target="features" href="http://fusejs.io/">Fuse</a> and <a target="features" href="https://markjs.io">Mark</a>. Use it to quickly find content anywhere your site.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#personalization">Personalization</a></td> | |||||
<td>Adjust CSS using purpose-built <a href="#custom-styles">customization file</a>. Choose one of several <a href="#theme-variants">theme variants</a>. Swap in <a href="#favicon">your own favicon</a>. Leverage <a target="features" href="https://gohugo.io/templates/blocks">block templates</a> to quickly extend new custom layouts. And use <a target="features" href="https://hackcss.egoist.moe/dark.html">hack.css</a> flexbox grids and CSS components to add style your site.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#section-menu">Section Menu</a></td> | |||||
<td>Add and customize your site's global navigation. After Dark uses Hugo's <a target="feature" href="https://gohugo.io/extras/menus#section-menu-for-the-lazy-blogger">Section Menu for "the Lazy Blogger"</a>, making navigation easy to create and predictable to use. Don't want navigation? Simply disable it from your site configuration.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#content-reuse">Content Reuse</a></td> | |||||
<td>Sometimes plan markdown isn't enough to build engaging page content. For this reason After Dark provides a number of reusable code snippets and shortcodes for adding things blockquotes, figure elements, coubs, videos, <a target="feature" href="https://hackcss.egoist.moe/">hackcss components</a> and more to your pages and posts. Use them to create completely custom layouts or simply spice up an old page.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#related-content">Related Content</a></td> | |||||
<td>Promote more of your content to your site visitors. By offering your readers more content that's relevant to them you can <b>increase your site's page views</b>, the time spent on your site and reader loyalty.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#table-of-contents">Table Of Contents</a></td> | |||||
<td>Help users locate and share information on your site. By providing a <abbr title="Table Of Contents">TOC</abbr>, users will spend less time scrolling to locate information in larger documents and are more likely to <i>deep link</i> to specific information on a page.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Analytics</td> | |||||
<td>Understand and action on user behavior by enabling Google Analytics. After Dark uses the <a target="feature" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/">async tracking snippet</a> to boost performance and allow script preloading.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>User Generated Content</td> | |||||
<td>Improve search rankings and provide interactivity to users with <abbr title="User Generated Content">UGC</abbr>. Enable <a target="feature" href="https://disqus.com/">Disqus</a> commenting to get started.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Reading Time</td> | |||||
<td>Set user expectations up-front. After Dark provides <b>estimated reading time</b> for each post near the top of the page. This feature is automatic and assumes a reading speed of 200-250 words per minute.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#modification-dating">Modification Dating</a></td> | |||||
<td>Surface recently updated content to users and crawlers, allowing them to understand when a post or page was was last modified. Recently updated posts will be flagged as modified and visually lifted upwards in chronological listings.</td> | |||||
</tr> | |||||
<tr> | |||||
<td><a href="#syntax-highlighting">Custom Syntax Highlighting</a></td> | |||||
<td>Share code snippets with style. After Dark provides <b>custom syntax highlighting</b> with support for both Pygments and Chroma.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Taxonomy Pages</td> | |||||
<td>Help users discover taxonomic content. After Dark automatically generates <b>taxonomy and taxonomy terms pages</b> and links to them in post bylines.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Post Bylines</td> | |||||
<td>Rich post bylines include optional author name, word count, links to taxonomy pages and metadata for search engines.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Pagination</td> | |||||
<td>Pagination can be hard. After Dark makes it easy with simple list pagination with page indication.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Animated Error Page</td> | |||||
<td>Decrease bounce rate when URL errors occur. After Dark provides an <a target="feature" href="https://hackcabin.com/post/after-dark-error-page-redesign/">engaging 404 page</a> with animated background.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>Accessibility</td> | |||||
<td>After Dark uses semantic HTML5 markup to provide a better experience for aural readers and facilitates <b>navigation via keyboard</b> only.</td> | |||||
</tr> | |||||
</tbody> | |||||
</table> | |||||
</details> | |||||
## Demo & Tutorial | |||||
Head to [Hack Cabin](https://hackcabin.com) for a **production example** of which the [site architecture](https://hackcabin.com/post/initial-commit/) can be recreated using a [step-by-step guide](https://go.habd.as/zero-to-http-2). And while you're looking at example sites, check out [a few others](https://github.com/comfusion/after-dark/wiki) for even more inspiration. | |||||
## Getting Started | |||||
First [Install Hugo](https://gohugo.io/#action) and git on your machine. | |||||
(Of course, GO should already be installed on the machine.) | |||||
(For Debian, I have used snap to install Hugo instead. Will have to add the /snap/bin path to $PATH in order to run Hugo commands smoothly for the rest of this section.) | |||||
Create a new hugo site. | |||||
```shell | |||||
hugo new site flying-toasters | |||||
``` | |||||
Clone After Dark theme from github into the themes folder. | |||||
```shell | |||||
cd themes; | |||||
git clone https://github.com/comfusion/after-dark | |||||
``` | |||||
Copy custom archetypes from the theme resources to the site. | |||||
```shell | |||||
cp themes/after-dark/archetypes/* archetypes | |||||
``` | |||||
Create settings in the site's `config.toml`: | |||||
```toml | |||||
baseurl = "http://example.com" # Controls base URL | |||||
languageCode = "en-US" # Controls html lang attribute | |||||
title = "Site Title" # Homepage title and page title suffix | |||||
paginate = 5 # Number of posts to show before paginating | |||||
# theme = "after-dark" # Uncomment to use as default theme | |||||
enableRobotsTXT = true # Suggested, enable robots.txt file | |||||
googleAnalytics = "" # Optional, add tracking Id for analytics | |||||
disqusShortname = "" # Optional, add Disqus shortname for comments | |||||
SectionPagesMenu = "main" # Enable menu system for lazy bloggers | |||||
footnoteReturnLinkContents = "↩" # Provides a nicer footnote return link | |||||
[params] | |||||
description = "" # Suggested, controls default description meta | |||||
author = "" # Optional, controls author name display on posts | |||||
hide_author = false # Optional, set true to hide author name on posts | |||||
show_menu = false # Optional, set true to enable section menu | |||||
powered_by = true # Optional, set false to disable credits | |||||
images = [] # Suggested, controls default OpenGraph images | |||||
theme_variant = "" # Optional, for use to overriding default theme | |||||
``` | |||||
Create a new post draft to test the site content creation. | |||||
```shell | |||||
hugo new post/helloworld.md | |||||
``` | |||||
Use any editor to modify the markdown post file. It should be pre-populated with details based on the archetypes. | |||||
Finally, run the local hugo server and publish drafts to preview the site. | |||||
```shell | |||||
hugo server -D | |||||
``` | |||||
## Customizing | |||||
### Section Menu | |||||
After Dark uses Hugo's [Section Menu for Lazy Bloggers](https://gohugo.io/extras/menus/#section-menu-for-the-lazy-blogger) to produce global site navigation if enabled. | |||||
To customize the menu, update the settings in `config.toml` like: | |||||
```toml | |||||
[[menu.main]] | |||||
name = "Home" | |||||
weight = 1 | |||||
identifier = "home" | |||||
url = "/" | |||||
[[menu.main]] | |||||
name = "Posts" | |||||
weight = 2 | |||||
identifier = "post" | |||||
url = "/post/" | |||||
``` | |||||
Or update the menu using front matter from your pages: | |||||
```toml | |||||
menu = "main" | |||||
weight = 3 | |||||
``` | |||||
### Lazy Loading | |||||
Lazy loading prioritizes when and how images and more are downloaded, improving perceived performance and reducing page load times. Lazy loading will start working automatically. No configuration is necessary. | |||||
To activate lazy loading with [lazysizes], add `lazyload` to the `class` attribute of your images/iframes in conjunction with a `data-src` and/or `data-srcset` attribute: | |||||
```html | |||||
<!-- non-responsive --> | |||||
<img data-src="image.jpg" class="lazyload"> | |||||
``` | |||||
```html | |||||
<!-- responsive with automatic sizes calculation --> | |||||
<img | <img | ||||
alt="After Dark" | |||||
src="https://git.habd.as/comfusion/after-dark/raw/branch/master/static/images/logo-dark.png" | |||||
width="358"> | |||||
data-sizes="auto" | |||||
data-src="image2.jpg" | |||||
data-srcset="image1.jpg 300w, image2.jpg 600w, image3.jpg 900w" | |||||
class="lazyload"> | |||||
``` | |||||
```html | |||||
<!-- iframe example --> | |||||
<iframe frameborder="0" | |||||
class="lazyload" | |||||
allowfullscreen | |||||
data-src="//www.youtube.com/embed/ZfV-aYdU4uE"> | |||||
</iframe> | |||||
``` | |||||
After Dark includes a _Shortcode_ taking advantage of this feature, enabling you to easily create [lazy-loaded `figure` elements](#content-reuse) within your markdown content. | |||||
Additional information and examples, including how to set-up and use LQIP (Low-Quality Image Placeholders), are available on the [lazysizes] repository on GitHub. | |||||
**Hugo Dark Theme Site Generator** | |||||
<br>[Docs](https://after-dark.habd.as) • [Releases](https://git.habd.as/comfusion/after-dark/releases) • [Community](https://t.me/afterdarkhugo) | |||||
### BPG Image Support | |||||
## After Dark | |||||
The BPG image format provides [high-fidelity images](http://xooyoozoo.github.io/yolo-octo-bugfixes/#vintage-car&jpg=s&bpg=s) which look more like PNGs but loads as fast as a JPG. From a compression standpoint, BPG really shines when handling animations. With support for alpha transparency and given its compression, BPG [literally steamrolls](https://bellard.org/bpg/animation.html) the GIF format of yesteryear. | |||||
[![Latest NPM version](https://img.shields.io/npm/v/after-dark.svg?style=flat-square)](https://www.npmjs.com/package/after-dark) | |||||
[![Monthly downloads](https://img.shields.io/npm/dm/after-dark.svg?style=flat-square)](https://www.npmjs.com/package/after-dark) | |||||
[![Minimum Hugo version](https://img.shields.io/badge/hugo->%3D%200.51-FF4088.svg?style=flat-square)](https://gohugo.io) | |||||
[![IRC chat](https://img.shields.io/badge/irc-%23after--dark-32AFED.svg?style=flat-square&longCache=true)](https://after-dark.habd.as/#chat) | |||||
[![AGPL licensed](https://img.shields.io/npm/l/after-dark.svg?style=flat-square&longCache=true)](https://git.habd.as/comfusion/after-dark/src/branch/master/COPYING) | |||||
**Why haven't I heard of BPG?** You have now, and you'll learn about all kinds of cool stuff like this by keeping your eye on [Perf.Rocks](http://perf.rocks/). Please help push BPG forward by encouraging browser makers to improve [current support levels](http://caniuse.com/#search=bpg). | |||||
One command is all you need to start a new website: | |||||
Use BPG just like any other image with the `img` element with a `.bpg` image file extension on any [encoded image](https://webencoder.libbpg.org/). After Dark will asynchronously download a BPG polyfill and render the image in a `canvas` element. | |||||
```sh | |||||
wget -qO - https://go.habd.as/after-dark | sh | |||||
BPG image support is enabled by default in After Dark. To disable support for BPG images add the following to your site configuration: | |||||
```toml | |||||
[params.seo] | |||||
disable_bpg = true # Disable BPG image support | |||||
``` | ``` | ||||
**After Dark** is an extensible, robust templating system for [Hugo](https://gohugo.io) written from the ground up for speed, privacy and security. | |||||
### Related Content | |||||
## Features | |||||
Promote more of your content to your site visitors. By offering your readers more content that's relevant to them you can increase your site's page views, the time spent on your site and reader loyalty. | |||||
Related content surfaces content across sections by matching taxonomy tags. If After Dark finds related content, it will automatically output a list of links to that content in reverse chronological order below the byline of your post content. | |||||
Click a link below to learn more: | |||||
By default After Dark will display up to 7 items by title along with their reading times. You can limit the number of items displayed by setting the following optional parameter in the `[params]` section of your `config.toml` file: | |||||
- **[Developer Focused](https://after-dark.habd.as/#feature-workflow)**: Cross-platform, 1 dependency, single-codebase. | |||||
- **[Incredibly Fast](https://after-dark.habd.as/#feature-speed)**: ~0.615s builds and decisecond page loads. | |||||
- **[Privacy Aware](https://after-dark.habd.as/#feature-privacy)**: No cookies, no external requests, ephemeral hosting. | |||||
- **[Securely Designed](https://after-dark.habd.as/#feature-security)**: Source-level integrity, content security and more. | |||||
- **[Advanced Graphics](https://after-dark.habd.as/#feature-graphics)**: Silky-smooth post and homepage images. | |||||
- **[Easily Customized](https://after-dark.habd.as/#feature-customize)**: Easily modify website look-and-feel. | |||||
- **[Fuzzy Search](https://after-dark.habd.as/#feature-search)**: Offline, automatic and no third-parties. | |||||
- **[Rewards System](https://after-dark.habd.as/#feature-rewards)**: Earn rewards for keeping your software up-to-date. | |||||
- **[Batteries Included](https://after-dark.habd.as/#feature-extras)**: Integrate with Gitea, k8s, Traefik and Fathom. | |||||
- **[Extended Builds](https://after-dark.habd.as/#feature-builds)**: Create high-performance Hugo builds with integrated Sass support. | |||||
```toml | |||||
related_content_limit = 5 | |||||
``` | |||||
## Screenshot | |||||
Learn more about [Related Content in Hugo](https://gohugo.io/content-management/related/), including configuration options you may wish to add to your site. | |||||
[![Demo](https://after-dark.habd.as/images/screenshots/after-dark-v6.15.0-homepage-fs8.png)](https://after-dark.habd.as) | |||||
### Table Of Contents | |||||
## Demo | |||||
Help users locate and share information on your site. By providing a <abbr title="Table Of Contents">TOC</abbr>, users will spend less time scrolling to locate information in larger documents and are more likely to deep to specific information on a page. | |||||
Visit the [official docs](https://after-dark.habd.as) for demo and documentation. For an example site see [habd.as](https://habd.as). Additional examples listed in the source repository Wiki. | |||||
To automatically generate a TOC for a post based on the [page outline](https://gsnedders.html5.org/outliner/), add the following to your post front matter: | |||||
## Getting Started | |||||
```toml | |||||
toc = true | |||||
``` | |||||
[Install Hugo](https://gohugo.io/getting-started/installing) `0.51` or greater on your machine before getting started unless starting with [After Dark K3s](https://after-dark.habd.as/extra/after-dark-k3s) or creating an [Extended Build](https://after-dark.habd.as/#feature-builds). | |||||
To hide the TOC set `toc = false`, or simply remove the setting from the post front matter. | |||||
### Installation | |||||
After Dark uses the HTML5 [`details`](http://devdocs.io/html/element/details) and [`summary`](http://devdocs.io/html/element/summary) elements to provide a TOC which does not require use of CSS or JavaScript to function. | |||||
For fastest installation use the provided [Quick Install](https://after-dark.habd.as/feature/quick-install/) script. Quick Install is ideal for first-time users and does not require use of git. Use it to automatically set-up, configure and run a sample After Dark website you may re-purpose as your own. | |||||
When a page is first loaded, the TOC will be collapsed so it does not clutter up the page. Once expanded, selecting an item in the TOC will smooth scroll to that section within the document, highlight the section header and updating the browser's location bar for deep linking and back-button support. | |||||
By convention After Dark may be used with an existing Hugo site by git cloning to or adding as a submodule of the `themes` directory: | |||||
### Social Engagement | |||||
```sh | |||||
flying-toasters | |||||
├── static | |||||
└── themes | |||||
└── after-dark # the clone or submodule | |||||
Increase user engagement when sharing links on social media. | |||||
#### Open Graph | |||||
After Dark leverages Open Graph tags using the *undocumented* [internal template](https://github.com/spf13/hugo/blob/142558719324aa1628541d556ef1fa2d123f1e68/tpl/tplimpl/template_embedded.go#L159-L201) to achieve rich sharing cards for Facebook and other social networks, as shown here: | |||||
![Open Graph sharing card screenshot](images/docs/feat-social-awareness.png "Example Open Graph sharing card produced by After Dark") | |||||
To create a social sharing card like the one shown above, specify `author` in `config.toml` and, optionally, override it from your front matter as shown here: | |||||
```toml | |||||
title = "Become a Digital Nomad in Bali: The Lost Guide" | |||||
description = "Everything you need to know to become a Digital Nomad in Bali." | |||||
author = "Bali Bebas!" | |||||
date = "2017-02-02T11:57:24+08:00" | |||||
publishdate = "2017-01-28T02:31:22+08:00" | |||||
images = [ | |||||
"https://source.unsplash.com/-09QE4q0ezw/2000x1322" | |||||
] | |||||
``` | |||||
**Why use array notation for one image?** [The Open Graph protocol](http://ogp.me) supports [arrays](http://ogp.me/#array) and users may wish to extend Hugo internal templates to do so. | |||||
To configure site-wide Open Graph images to use as fallbacks for posts not specifying their own open graph images, add an array of URLs to the `[params]` section in `config.toml`: | |||||
```toml | |||||
images = [ | |||||
"https://source.unsplash.com/-09QE4q0ezw/2000x1322" # Default Open Graph image for site | |||||
] | |||||
``` | ``` | ||||
See [Install a Single Theme](https://gohugo.io/themes/installing-and-using-themes/#install-a-single-theme) on the Hugo docs site for further instructions. | |||||
Or, if using [Page Bundle](https://gohugo.io/content-management/page-bundles/), specify the relative path to an image resource for the page: | |||||
```toml | |||||
images = [ | |||||
"/post/post-title/images/lana-abie-581813-unsplash.jpg" | |||||
] | |||||
``` | |||||
See [Unsplash Source](https://source.unsplash.com/) for image configuration options. | |||||
**Note:** While it would be possible, After Dark does not currently support relative links to images. If you would like to see this feature, please [open a new issue](https://github.com/comfusion/after-dark/issues/new). | |||||
#### Twitter Cards | |||||
After Dark releases are tagged in git and [packaged on NPM](https://www.npmjs.com/package/after-dark). Use the NPM package to integrate After Dark into existing workflows. | |||||
Optimize tweets with Twitter Cards. After Dark leverages the Hugo [internal template](https://gohugo.io/templates/internal/#the-internal-templates) for Twitter to provide large preview images in addition to associating shares with the site creator. | |||||
### Usage | |||||
See the Hugo [Internal Templates documentation](https://gohugo.io/templates/internal/#the-internal-templates) for more information. | |||||
Review the [Online Help](https://after-dark.habd.as/feature/online-help/) to learn how to set-up and customize After Dark. Docs included with installation and may be served locally. | |||||
#### Telegram Instant View | |||||
### Upgrading | |||||
Improve the experience for Telegram users by providing an [Instant View](https://instantview.telegram.org/) (IV). After Dark makes easy. | |||||
Run the [Upgrade Script](https://after-dark.habd.as/feature/upgrade-script/) to check for updates and upgrade automatically: | |||||
![Open Graph sharing card screenshot](images/docs/feat-instant-view.png "Example Telegram Instant View for After Dark") | |||||
To create an IV for your site simply [create your own](https://instantview.telegram.org/my/) Instant View template modeling from the example template below. | |||||
```sh | |||||
./themes/after-dark/bin/upgrade | |||||
``` | ``` | ||||
# enable for items in the post section | |||||
?path: /post/.+ | |||||
# define required elements | |||||
title: //*[@itemprop="headline"] | |||||
body: //*[@itemprop="articleBody"] | |||||
# if cover exists, define images | |||||
?exists: //head/meta[@property="og:image"]/@content | |||||
cover: //head/meta[@property="og:image"]/@content | |||||
image_url: $cover/self::img/@src | |||||
# author and post date extracted automatically | |||||
``` | |||||
Additionally, if your site has a telegram channel, you can specify it by setting the following in your site config: | |||||
```toml | |||||
[params.seo] | |||||
telegram_channel = "channelname" # omit the `@` | |||||
``` | |||||
Specifying a channel name allows Telegram users to join your channel with a single click from within an Instant View. | |||||
See the [Telegram IV docs](https://instantview.telegram.org/docs) for additional information. | |||||
### Search Optimization | |||||
After Dark is built with SEO in mind. Schema Structured Data and other meta are applied to give robots what they want, automatically, without any configuration necessary. | |||||
The default set-up helps ensure your After Dark site will rank well in <abbr title="Search Engine Results Pages">SERP</abbr>s and prevent search crawlers from indexing undesirable content. Fine-tune your search settings using the following available options. | |||||
#### Webmaster Verification | |||||
Verify your site with several webmaster tools including Google, Bing, Alexa and Yandex. To allow verification of your site with any or all of these providers simply add the following to your `config.toml` and fill in their respective values: | |||||
```toml | |||||
[params.seo.webmaster_verifications] | |||||
google = "" # Optional, Google verification code | |||||
bing = "" # Optional, Bing verification code | |||||
alexa = "" # Optional, Alexa verification code | |||||
yandex = "" # Optional, Yandex verification code | |||||
``` | |||||
**Note:** Claiming your site with Alexa was [retired in May 2016](https://support.alexa.com/hc/en-us/articles/219135887-Claiming-has-been-retired-May-2016). However, Alexa verification has been added as a convenience for existing sites migrating to After Dark. | |||||
#### Meta Descriptions | |||||
Well-crafted page titles help catch the human eye on search results pages and meta descriptions provide a summary of the content and why its relevant for the reader, driving click-throughs. | |||||
To add a custom meta description to your pages and posts add `description` to the front matter: | |||||
```toml | |||||
description = "Everything you need to know to become a Digital Nomad in Bali." | |||||
``` | |||||
In addition to appearing in search engines, meta descriptions also appear on individual pages and in content summaries in After Dark, adding transparency to how your page will appear in search. | |||||
If no custom description is provided, After Dark will fallback to the description provided in `config.toml`. Learn more on [how to craft your meta descriptions](https://moz.com/learn/seo/meta-description). | |||||
#### Modification Dating | |||||
Help user agents know when posts were last modified. To do so add `publishdate` to your page front matter and update `date` anytime you make an update to a post. | |||||
Updates will be made visible to readers by surfacing content higher in your page and post listings and by using visible callouts on content summaries. For robots, making this change will automatically update Schema Structured Data and Web feeds, as well as the `lastmod` setting in your `sitemap.xml` file. | |||||
You can be specific and use a datetime (with timezone offset) like: | |||||
``` | |||||
date = "2017-02-02T01:20:56-06:00" | |||||
publishdate = "2016-11-21T10:32:33+08:00" | |||||
``` | |||||
Or less specific and use just the dates: | |||||
``` | |||||
date = "2017-02-02" | |||||
publishdate = "2016-11-21" | |||||
``` | |||||
In addition to `date` and `publishdate`, it's also possible to set an expiry date. Expired posts will automatically disappear when the site is built, but the content will be retained. To future- or back-date content for expiration, set the `expirydate` field in the front matter. | |||||
#### Index Blocking | |||||
Just because a page appears in your `sitemap.xml` does not mean you want it to appear in a SERP. Examples of pages which will appear in your `sitemap.xml` that you typically do not want indexed by crawlers include error pages, search pages, legal pages, and pages that simply list summaries of other pages. | |||||
Though it's possible to block search indexing from a `robots.txt` file, After Dark makes it possible to block page indexing using Hugo configuration as well. By default the following page types will be blocked: | |||||
- Section Pages (e.g. Post listings) | |||||
- Taxonomy Pages (e.g. Category and Tag listings) | |||||
- Taxonomy Terms Pages (e.g. Pages listing taxonomies) | |||||
To customize default blocking configure the `noindex_kinds` setting in the `[params]` section of your `config.toml`. | |||||
For example, if you want to enable crawling for sections appearing in [Section Menu](#adding-a-section-menu), add the following to your configuration file: | |||||
``` | |||||
[params] | |||||
noindex_kinds = [ | |||||
"taxonomy", | |||||
"taxonomyTerm" | |||||
] | |||||
``` | |||||
To block individual pages from being indexed add `noindex` to your page's front matter and set the value to `true`, like: | |||||
```toml | |||||
noindex = true | |||||
``` | |||||
And, finally, if you're using Hugo `v0.18` or newer, you can also add an `_index.md` file with the `noindex` front matter to control indexing for specific section list layouts: | |||||
```shell | |||||
├── content | |||||
│ ├── modules | |||||
│ │ ├── starry-night.md | |||||
│ │ └── flying-toilets.md | |||||
│ └── news | |||||
│ ├── _index.md | |||||
│ └── return-flying-toasters.md | |||||
``` | |||||
To learn more about how crawlers use this feature read [block search indexing with meta tags](https://support.google.com/webmasters/answer/93710). | |||||
#### Referrer Policy | |||||
Resource requests such as images and scripts typically send an HTTP header containing the location where the request originated. Most of the time this is okay. But sometimes it's not. Sometimes the referrer header is used to censor information or even perform [spear phishing](https://en.wikipedia.org/wiki/Phishing#Spear_phishing) attacks. Perhaps more importantly, transmission of the referrer header can present a privacy concern when transmitted to external sites. But not in After Dark. | |||||
After Dark leverages [Referrer Policy](https://w3c.github.io/webappsec-referrer-policy/) to increase security and privacy beyond browser defaults by preventing spec-compliant browsers from passing referrer data when making cross-origin requests. | |||||
If you wish to relax the security policy for whatever reason you may do so by: | |||||
- Setting the [`referrerpolicy`](https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-delivery-referrer-attribute) by HTML attribute; | |||||
- Override the policy using a [nested browsing context](https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-delivery-nested); or, | |||||
- Override the page-level default specified by After Dark. | |||||
To override the page-level default of [`same-origin`](https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin) add/adjust the following config when building your site: | |||||
``` | |||||
[params.seo] | |||||
referrer = "same-origin" | |||||
``` | |||||
For a list of possible values and their meanings please see W3C's [Referrer Policy](https://w3c.github.io/webappsec-referrer-policy/). | |||||
#### Link Types | |||||
For related content split across multiple pages in a sequence After Dark supports use of `prev` and `next` settings in your front matter. Use them to provide semantic relationships between pages in a segmented article or series or [LiveBlogPosting](https://schema.org/LiveBlogPosting). | |||||
```toml | |||||
prev = "/series/learn-to-code/part-one/" | |||||
next = "/series/learn-to-code/part-three/" | |||||
``` | |||||
Link Types are commonly shown at the top of the page in terminal browsers as auxiliary means of navigation and may help crawlers better understand relationships within your content. | |||||
Learn more about [link types](http://devdocs.io/html/link_types) and how to [customize Hugo taxonomies](https://gohugo.io/taxonomies/overview/). | |||||
#### Meta Keywords | |||||
Meta keywords offer semantic detail to crawlers regarding the subject matter of your content. Keywords meta are generated automatically for pages given the tags used for that page, and for other pages using the site categories taxonomy. Keywords and key phrases may be customized by setting a `keywords` array in your front matter: | |||||
```toml | |||||
keywords = [ | |||||
"web development", | |||||
"digital marketing", | |||||
"social media", | |||||
"link building" | |||||
] | |||||
``` | |||||
While not considered relevant to some crawlers, keywords can be a useful way to document target search terms for use in <abbr title="Pay-Per-Click">PPC</abbr> online advertising and provide semantic value to your pages. | |||||
### Post Images | |||||
Bring your words to life with post images. Post images appear above post content and leverage Hugo's inbuilt [Image Processing](https://gohugo.io/content-management/image-processing/) to enable automatic cropping and image positioning. | |||||
Because post images are often one of the first things users see when visiting your site After Dark takes some extra steps to load them in a performant manner. Techniques used to speed up image loading include [Low-Quality Image Placeholders](https://www.afasterweb.com/2016/08/31/low-quality-blur-in/), [Lazy Loading](#lazy-loading) and responsive images using the `srcset` and `sizes` attributes. | |||||
Using post images requires some opinion with regard to the structure of your content. To create a post with a post image you must: | |||||
1. Create a [Page Bundle](https://gohugo.io/content-management/page-bundles/) grouping your desired image together with your post content. | |||||
2. Specify the [Resources Metadata](https://gohugo.io/content-management/page-resources/#resources-metadata-toml-example) in the post front matter and set the `name` property to `"header"`. | |||||
An example page bundle might look like: | |||||
``` | |||||
└── post | |||||
└── secure-your-digital-life | |||||
├── images | |||||
│ └── florian-klauer-119557-unsplash.jpg | |||||
└── index.md | |||||
``` | |||||
With the following front matter specified in `index.md`: | |||||
``` | |||||
[[resources]] | |||||
src = "images/florian-klauer-119557-unsplash.jpg" | |||||
name = "header" | |||||
``` | |||||
That's it! After Dark does the rest. | |||||
### Fuzzy Search | |||||
Find content site-wide in the blink of an eye. JavaScript fuzzy search is at your fingertips. To use it simply create a section called `search` using the After Dark search layout like so: | |||||
``` | |||||
└── content | |||||
└── search | |||||
└── _index.md | |||||
``` | |||||
With `_index.md` like: | |||||
``` | |||||
+++ | |||||
title = "Search" | |||||
layout = "search" | |||||
noindex = true | |||||
+++ | |||||
``` | |||||
Then tell Hugo to output an `index.json` file along with your site when building by adding the following to the config: | |||||
``` | |||||
[outputs] | |||||
home = ["HTML", "RSS", "JSON"] | |||||
section = ["HTML", "RSS", "JSON"] | |||||
``` | |||||
**Note:** If you don't see `index.json` in your `public` folder after building try running a `hugo --gc` to cajole the generator into creating the JSON file. | |||||
After that navigate to the `/search/` path on your site and let the fun begin. | |||||
**Tip:** Consider enabling the After Dark [section menu](#section-menu) to expose the search section to users. | |||||
While deep link searches are supported, please note Fuzzy Search will only return results for [Regular Pages](https://gohugo.io/variables/site/#site-variables-list) and intentionally omits any page tagged for [index blocking](#index-blocking). In other words it's easy to find stuff. But only if you want it to be found. | |||||
### Markdown Output | |||||
Gain more control over markdown conversion to HTML. By modifying the markdown processor settings you can take advantage of [Blackfriday](https://github.com/russross/blackfriday) features not enabled by default. | |||||
To customize conversion output add a `[blackfriday]` section to your site's `config.toml` file like so: | |||||
```toml | |||||
[blackfriday] | |||||
hrefTargetBlank = true | |||||
fractions = false | |||||
``` | |||||
Overrides to theme markdown processing defaults are available from page front matter as well, giving you control on a page-by-page basis. | |||||
See the Hugo docs for additional [configuration options](http://gohugo.io/overview/configuration/#configure-blackfriday-rendering). | |||||
### Content Reuse | |||||
Keep your content <abbr title="Don't Repeat Yourself">DRY</abbr> and improve thematic consistency across your site. After Dark provides a number [Shortcodes](https://gohugo.io/extras/shortcodes) and composable components to help you keep your content and layouts easy to maintain. | |||||
Take for example After Dark's `blockquote` shortcode: | |||||
```html | |||||
<blockquote {{ with .Get "class" }}class="{{ . }}"{{ end }} {{ with .Get "citelink" }}cite="{{ . }}"{{ end }}> | |||||
{{ .Inner }} | |||||
{{ with .Get "citelink" }} | |||||
<cite><a target="_blank" href="{{ . }}">{{ $.Get "cite" }}</a></cite> | |||||
{{ else }} | |||||
<cite>{{ .Get "cite" }}</cite> | |||||
{{ end }} | |||||
</blockquote> | |||||
``` | |||||
Use it in your page or post markdown files like: | |||||
```html | |||||
{{< blockquote cite="Bitly" citelink="https://bitly.is/2mkxskj" >}} | |||||
<p>When you create your own Branded Short Domain, you can expect to see up to a 34% increase in CTR when compared to standard bit.ly links.</p> | |||||
{{< /blockquote >}} | |||||
``` | |||||
Additional theme-provided shortcodes at your disposal: | |||||
- `privacytube` – It's YouTube. But without cookies and UI cruft. | |||||
- `coub` - GIFs with sound. Think of it like YouTube for video loops. | |||||
- `figure` - Similar to the Hugo built-in, but with [Lazy Loading](#lazy-loading), an adjusted caption title and smaller caption text. | |||||
Also included are a number of shortcodes for [hackcss components](https://hackcss.egoist.moe/). These shortcodes function across After Dark [theme variants](#theme-variants) and were created as partials, enabling reuse in both your content as well as your [personalized layouts](#personalization): | |||||
- `hackcss-alert` - Provides themed alert boxes. See `hackcss-alert.html` for usage notes. | |||||
- `hackcss-button` - Provides themed buttons. See `hackcss-button.html` for usage notes. | |||||
- `hackcss-buttongroup` - Allows buttons to be grouped together. See `hackcss-buttongroup.html` for usage notes. | |||||
- `hackcss-card` - Provides themed card element. See `hackcss-card.html` for usage notes. | |||||
- `hackcss-progress` - Provides themed progress meter. See `hackcss-progress.html` for usage notes. | |||||
- `hackcss-throbber` - Provides themed loading indicator. See `hackcss-throbber.html` for usage notes. | |||||
To create your own custom shortcodes add a `layouts/shortcodes` directory to your site, place your shortcodes within and start using them in your markdown content. To create or override provided components add a `layouts/partials/components` directory to your site and reference the theme-provided files as you hack away. | |||||
Reference the Hugo docs for [shortcode usage instructions](https://gohugo.io/content-management/shortcodes/#using-a-shortcode) and see the inline documentation within each shortcode for example usage instructions. | |||||
### Syntax Highlighting | |||||
Provide a richer experience when sharing code snippets on your site. After Dark provides support for code highlighting using the lovely [One Dark](https://github.com/atom/one-dark-syntax) and [One Light](https://github.com/atom/one-light-syntax) syntax themes for Pygments and Chroma. | |||||
![Syntax Highlighting screenshot](images/docs/feat-syntax-highlighting.png "Syntax Highlighting using Atom One Pygments and Chroma") | |||||
To set-up syntax highlighting for your After Dark site: | |||||
- Follow Hugo's [Syntax Highlighting](https://gohugo.io/content-management/syntax-highlighting/) instructions. | |||||
- Open the `themes/after-dark` folder and run `npm i` (assumes NPM installed). | |||||
- Then open `./node_modules/atom-one-pygments` and `npm i`. | |||||
- Once dependencies are installed, issue `npm run build` within the module to generate the stylesheets to the module's `./dist` directory. | |||||
Then choose either `./dist/light.css` or `dark.css` depending on your [Theme Variant](#theme-variants) and copy the contents of the file into your [Custom Styles](#custom-styles) file. | |||||
Once configured, syntax highlighting can be achieved using the Hugo built-in [`highlight` shortcode](https://gohugo.io/extras/shortcodes#highlight). Reference Hugo's [Syntax Highlighting docs](https://gohugo.io/content-management/syntax-highlighting/) for usage instructions. | |||||
**Not completely satisfied?** [Atom One Pygments](https://github.com/comfusion/atom-one-pygments) is built as a theme roller, making it possible to modify the look-and-feel of the resulting syntax highlighting. Make it your own. See the [README](https://github.com/comfusion/atom-one-pygments/blob/master/README.md) for more details. | |||||
### Personalization | |||||
After Dark uses [hack.css](https://hackcss.egoist.moe/dark.html) to automatically style your markup, giving you instant access to flexbox grids, light and dark theme variants, and other pre-built components. Use them while creating new [sections](#section-menu) leveraging [block templates](https://gohugo.io/templates/blocks). Additional personalization options listed below. | |||||
#### Custom Styles | |||||
Customize theme styles without forking using Hugo's inbuilt [Partial Templates](https://gohugo.io/templates/partials/). To get started: | |||||
1. Create a `critical-custom.css` in your site's `layouts/partials/head` directory. If the directory does not exist yet, simply create it. | |||||
2. Add your custom styles inside the file. | |||||
Example customization file: | |||||
```css | |||||
/* override theme defaults */ | |||||
.muted { | |||||
color: rgba(255, 255, 255, 0.5); | |||||
} | |||||
/* custom styles */ | |||||
figure { | |||||
margin-left: auto; | |||||
margin-right: auto; | |||||
text-align: center; | |||||
} | |||||
figure img { | |||||
max-width: 80%; | |||||
} | |||||
figure a { | |||||
border-bottom: none !important; | |||||
} | |||||
figure a:hover { | |||||
background-color: inherit !important; | |||||
} | |||||
``` | |||||
Styles are inlined into the `head` of each page. If you would prefer to use external stylesheets override the `partials/global-styles.html` template, modeling from the theme's version of the file, and make any adjustments you see fit. | |||||
#### Theme Variants | |||||
Upgrading replaces the file contents of the theme as a whole for security reasons. If you wish to modify the source please create a fork. | |||||
[`hack.css`](https://hackcss.egoist.moe/) provides a few variants you may wish to use instead of the After Dark defaults. To download them do an `npm install` from `/themes/after-dark/` (assumes NodeJS installed). | |||||
### Verifying | |||||
Once downloaded, open `./node_modules/hack/dist`, copy the styles you wish to use into a `critical-vendor.css` [template override](https://gohugo.io/themes/customizing/#override-template-files) and apply the variant by setting `theme_variant` in your site config to one of: | |||||
If installed or upgraded via script you may use the [Release Validator](https://after-dark.habd.as/validate/) to verify you're running a PGP-signed and SHA-verified release. Integrity is checked at the source level and may be performed offline. See [Release Hashes](https://after-dark.habd.as/feature/release-hashes/) for more info. | |||||
"standard" | |||||
"hack dark-grey" | |||||
"hack solarized-dark" | |||||
## Credits | |||||
Once variant applied, open your browser's dev tools and test the changes by previewing your site on mobile, tablet and desktop at different display resolutions and orientations—overriding and making any desired changes to your [overridden](https://gohugo.io/themes/customizing/#override-template-files) `critical-theme.css`, 404 page, `theme-color.html` and [Custom Styles](#custom-styles). | |||||
Special thanks to エゴイスト for [hackcss](https://git.habd.as/jhabdas/hack), Dan Klammer for the [bytesize icons](https://git.habd.as/comfusion/bytesize-icons) and Vincent Prouillet for the [Zola port](https://www.getzola.org/themes/after-dark/). | |||||
#### Favicon | |||||
## Rights | |||||
After Dark ships with a lightweight SVG favicon embedded into every page. To customize or replace it create a file named `favicon.html` under `layouts/partials/head` within your site and place an [`icon` link](http://devdocs.io/html/link_types#icon) within it. | |||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
**Why SVG?** Though they don't have perfect [browser support](http://caniuse.com/#feat=link-icon-svg) yet, SVG favicons are smaller in size and more flexible. SVG favicons can be styled with CSS or even animated with JavaScript. | |||||
After Dark is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as published | |||||
by the Free Software Foundation, either version 3 of the License, or | |||||
(at your option) any later version. | |||||
## License | |||||
After Dark is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
Copyright 2016-2018 Josh Habdas <jhabas@protonmail.com> (https://habd.as) | |||||
<br>This work is free. You can redistribute it and/or modify it under the | |||||
<br>terms of the Do What The Fuck You Want To Public License, Version 2, | |||||
<br>as published by Sam Hocevar. See the COPYING file for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
[lazysizes]: https://github.com/aFarkas/lazysizes |
@ -1,29 +1,6 @@ | |||||
{{/* | |||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
This file is part of After Dark. | |||||
After Dark is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as published by | |||||
the Free Software Foundation, either version 3 of the License, or | |||||
(at your option) any later version. | |||||
After Dark is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ -}} | |||||
+++ | +++ | ||||
title = "{{ replace .TranslationBaseName "-" " " | title }}" | title = "{{ replace .TranslationBaseName "-" " " | title }}" | ||||
date = {{ .Date }} | date = {{ .Date }} | ||||
description = "This text is displayed in search result listings." | |||||
description = "" | |||||
draft = true | draft = true | ||||
[[copyright]] | |||||
owner = "{{ .Site.Params.author | default .Site.Title }}" | |||||
date = "{{ now.Format "2006" }}" | |||||
license = "cc-by-nd-4.0" | |||||
+++ | +++ |
@ -1,109 +1,27 @@ | |||||
{{/* | |||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
This file is part of After Dark. | |||||
After Dark is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as published by | |||||
the Free Software Foundation, either version 3 of the License, or | |||||
(at your option) any later version. | |||||
After Dark is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ -}} | |||||
+++ | +++ | ||||
title = "{{ replace .TranslationBaseName "-" " " | title }}" | title = "{{ replace .TranslationBaseName "-" " " | title }}" | ||||
date = {{ .Date }} | date = {{ .Date }} | ||||
description = "This text was generated using the After Dark post archetype." | |||||
description = "Thank you for choosing After Dark." | |||||
draft = true | draft = true | ||||
toc = false | toc = false | ||||
categories = ["hacking"] | |||||
tags = ["after", "dark"] | |||||
categories = ["technology"] | |||||
tags = ["hello", "world"] | |||||
images = [ | images = [ | ||||
"https://source.unsplash.com/collection/983219/1600x900" | |||||
] # overrides site-wide open graph image | |||||
[[copyright]] | |||||
owner = "{{ .Site.Params.author | default .Site.Title }}" | |||||
date = "{{ now.Format "2006" }}" | |||||
license = "cc-by-nc-sa-4.0" | |||||
"https://source.unsplash.com/category/technology/1600x900" | |||||
] # overrides the site-wide open graph image | |||||
+++ | +++ | ||||
Before continuing please create a post archetype. Archetypes are located within markdown files in the `archetypes` directory of your site: | |||||
``` | |||||
flying-toasters | |||||
├── archetypes | |||||
│ ├── default.md | |||||
│ └── post.md | |||||
├── content | |||||
``` | |||||
If `post.md` does not exist yet, copy it from the After Dark default: | |||||
```sh | |||||
$ cd flying-toasters | |||||
$ cp themes/after-dark/archetypes/post.md archetypes/ | |||||
``` | |||||
Make some changes to `post.md` then use `hugo new` to draft a new post: | |||||
Before you continue, please take a moment to configure your archetypes. | |||||
```sh | |||||
$ vi archetypes/post.md # or vim, emacs, nano ... | |||||
$ hugo new post/totally-twisted.md | |||||
``` | |||||
If `hugo server` is running with the `--navigateToChanged` flag your new post will appear automatically in JavaScript-enabled browsers. If you see an empty page you probably need to restart `hugo server` with the `--buildDrafts` flag. | |||||
Use archetypes to maintain consistency when creating content for [Custom Layouts](http://localhost:1414/feature/custom-layouts). Like custom layouts {{< external href="https://gohugo.io/content-management/archetypes/" text="Hugo Archetypes" />}} may contain templating logic. | |||||
Archetypes are located in the `archetypes` directory in the source of your site. To learn more about archetypes, visit [Archetypes](https://gohugo.io/content-management/archetypes/) on the Hugo website. And when you're ready, check out the [Customizing](https://comfusion.github.io/after-dark/#customizing) section of the After Dark documentation for additional options. | |||||
<!--more--> | <!--more--> | ||||
This information appears below the [Summary Split](https://gohugo.io/content-management/summaries/). | |||||
--- | |||||
{{< hackcss-alert type="info" >}} | |||||
<strong>Tip:</strong> This message appears below a {{< external href="https://gohugo.io/content-management/summaries/#manual-summary-splitting" text="Manual Summary Split" />}}. | |||||
{{< /hackcss-alert >}} | |||||
The above tip uses a shortcode called [Alert](http://localhost:1414/shortcode/alert/). In addition to a number of [Shortcodes](http://localhost:1414/shortcode/) After Dark provides a number of other [Features](http://localhost:1414/feature/). | |||||
The [Module System](http://localhost:1414/feature/module-system/), for example, provides a module to display image animations with alpha transparency and something not possible using a GIF: | |||||
![BPG animation example](/bpg/cinemagraph-6.bpg) | |||||
If you do not see the above animation, you may install the [Fractal Forest](http://localhost:1414/module/fractal-forest/) module yourself or reinstall After Dark using [Quick Install](http://localhost:1414/feature/quick-install/) for instant setup. | |||||
Review the [Online Help](http://localhost:1414/) to learn about other useful features such as the [Section Menus](http://localhost:1414/feature/section-menu) navigational aid, responsive [Post Images](http://localhost:1414/feature/post-images/"), offline [Fuzzy Search](http://localhost:1414/feature/fuzzy-search/) and more. | |||||
If online help isn't running, go ahead and start it using the corresponding command from the following cheat sheet within your site directory: | |||||
After Dark supports the `bpg` image format without any additional configuration necessary. Here's an example BPG image animation: | |||||
```sh | |||||
# After Dark scripts | |||||
./themes/after-dark/bin/upgrade # check for updates and upgrade | |||||
./themes/after-dark/bin/help # start online help docs | |||||
./themes/after-dark/bin/install # run the quick installer | |||||
<img src="/bpg/cinemagraph-6.bpg" alt="BPG file format example"> | |||||
# Hugo commands | |||||
hugo # build site with default settings | |||||
hugo --minify # build with minified sources (hugo 0.47 and above) | |||||
hugo --config config.prod.toml # build with custom config | |||||
hugo --templateMetrics # generate template metrics | |||||
hugo new about.md # generate page content | |||||
hugo new post/coming-soon.md # generate new post content | |||||
hugo serve # serve locally with default settings | |||||
hugo serve --buildDrafts --navigateToChanged # serve with drafts for editing | |||||
hugo serve --buildExpired # serve locally showing expired content | |||||
hugo serve --disableLiveReload # serve locally w/live reload disabled | |||||
hugo list drafts # list draft content | |||||
hugo list expired # list expired content | |||||
hugo list future # list future content | |||||
hugo [serve] --debug # build or serve hugo with debug info | |||||
hugo [command] --help | |||||
``` | |||||
BPG compresses the above animation to `48KB`, about **97% smaller** than what would be possible with GIF. In addition to animation BPG handles still images as well. Head to the [side-by-side comparisons](http://xooyoozoo.github.io/yolo-octo-bugfixes/#vallee-de-colca&jpg=s&bpg=s) to see BPG stacked up against JPEG. Create your own BPG images using the [BPG web encoder](https://webencoder.libbpg.org/) for use on your After Dark site. | |||||
Thank you for choosing After Dark. | |||||
See the <a href="https://github.com/comfusion/after-dark/blob/master/README.md" target="_blank" rel="noopener nofollow">After Dark `README`</a> for more info. |
@ -1,35 +0,0 @@ | |||||
{{/* | |||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
This file is part of After Dark. | |||||
After Dark is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as published by | |||||
the Free Software Foundation, either version 3 of the License, or | |||||
(at your option) any later version. | |||||
After Dark is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ -}} | |||||
+++ | |||||
title = "Search" # title of the page | |||||
layout = "search" # sets the layout to use | |||||
noindex = true # tell robots not to index | |||||
[form] | |||||
helpblock = "Press <kbd>/</kbd> or <kbd>s</kbd> to modify your search." | |||||
hotkeys = ["/", "s"] | |||||
[form.input] | |||||
placeholder = "uzzy searvh" | |||||
disabled = false | |||||
[security.csp.directives] | |||||
scriptSrc = [ | |||||
"'sha512-6G7cmlXR4eLBphfUmmEWLEnLWSEtZPdKP2xv7bXZ8D3LReZazwxcwb4tTx2HeCeoAChG5ZCE+UqHmbe3K4xoJg=='", | |||||
"'unsafe-eval'" | |||||
] | |||||
+++ |
@ -1,46 +0,0 @@ | |||||
{{/* | |||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
This file is part of After Dark. | |||||
After Dark is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as published by | |||||
the Free Software Foundation, either version 3 of the License, or | |||||
(at your option) any later version. | |||||
After Dark is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ -}} | |||||
ul.thumbnail.grid { | |||||
margin: 10px -10px; | |||||
} | |||||
ul.thumbnail.grid li { | |||||
padding: 10px; | |||||
margin-bottom: 10px; | |||||
} | |||||
ul.thumbnail.grid li h2 { | |||||
margin-bottom: 1rem; | |||||
} | |||||
ul.thumbnail.grid li a:hover figure { | |||||
filter: brightness(1.1); | |||||
} | |||||
ul.thumbnail.grid li a figure > img { | |||||
border-radius: 2px; | |||||
} | |||||
.hack ul.thumbnail.grid li h2::before { | |||||
content: initial; | |||||
} | |||||
.hack ul.thumbnail.grid li::after { | |||||
content: initial; | |||||
} | |||||
.standard ul.thumbnail.grid { | |||||
padding-left: 0px; | |||||
list-style-type: none; | |||||
display: flex; | |||||
} |
@ -1,35 +0,0 @@ | |||||
{{/* | |||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
This file is part of After Dark. | |||||
After Dark is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as published by | |||||
the Free Software Foundation, either version 3 of the License, or | |||||
(at your option) any later version. | |||||
After Dark is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ -}} | |||||
.hack header figure[itemtype*="ImageObject"] { | |||||
position: relative; | |||||
} | |||||
.hack header figure[itemtype*="ImageObject"] figcaption { | |||||
position: absolute; | |||||
bottom: 0; | |||||
right: 0; | |||||
text-align: right; | |||||
padding: 15px; | |||||
font-style: oblique; | |||||
font-size: smaller; | |||||
mix-blend-mode: soft-light; | |||||
} | |||||
.hack header figure[itemtype*="ImageObject"] [itemprop="headline"] { | |||||
font-weight: bold; | |||||
} |
@ -1,25 +0,0 @@ | |||||
{{/* | |||||
Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
This file is part of After Dark. | |||||
After Dark is free software: you can redistribute it and/or modify | |||||
it under the terms of the GNU Affero General Public License as published by | |||||
the Free Software Foundation, either version 3 of the License, or | |||||
(at your option) any later version. | |||||
After Dark is distributed in the hope that it will be useful, | |||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
GNU Affero General Public License for more details. | |||||
You should have received a copy of the GNU Affero General Public License | |||||
along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ -}} | |||||
[v-cloak] .js-cloaked { | |||||
display: none; | |||||
} | |||||
[v-cloak] .js-initializing::after { | |||||
content: "Initializing search. Please wait..." | |||||
} |
@ -1,39 +0,0 @@ | |||||
/*! | |||||
* Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
* | |||||
* This file is part of After Dark. | |||||
* | |||||
* After Dark is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU Affero General Public License as published | |||||
* by the Free Software Foundation, either version 3 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* After Dark is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU Affero General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU Affero General Public License | |||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ | |||||
a[rel*="external"]::after { | |||||
content: " " url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20class='i-external'%20viewBox='0%200%2032%2032'%20width='14'%20height='14'%20fill='none'%20stroke='%23ff9800'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='9.38%'%3E%3Cpath%20d='M14%209%20L3%209%203%2029%2023%2029%2023%2018%20M18%204%20L28%204%2028%2014%20M28%204%20L14%2018'/%3E%3C/svg%3E"); | |||||
} | |||||
nav a.active { | |||||
background-color: inherit; | |||||
color: #fff; | |||||
} | |||||
a[itemprop="url"] { | |||||
color: #ff9800; | |||||
} | |||||
a[itemprop="url"]:hover { | |||||
color: #fff; | |||||
} | |||||
.muted, .help-block { | |||||
opacity: 0.70; | |||||
} | |||||
.hack .muted, | |||||
.hack .help-block { | |||||
color: #e0e0e0; | |||||
} |
@ -1,183 +0,0 @@ | |||||
/*! | |||||
* Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
* | |||||
* This file is part of After Dark. | |||||
* | |||||
* After Dark is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU Affero General Public License as published | |||||
* by the Free Software Foundation, either version 3 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* After Dark is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU Affero General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU Affero General Public License | |||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ | |||||
:root { | |||||
--screen-size-small: 30em; /* breakpoint reference only */ | |||||
} | |||||
@keyframes intro { | |||||
0% { opacity: 0 } 100% { opacity: 1 } | |||||
} | |||||
.blur-up.lazyloading { | |||||
filter: blur(5px); | |||||
opacity: 1; | |||||
transition: opacity 1s, filter 1.5s; | |||||
} | |||||
.blur-up.lazyload { | |||||
opacity: 0; | |||||
filter: blur(10px); | |||||
} | |||||
.blur-up.lazyloaded { | |||||
filter: blur(0); | |||||
transition: filter 1s; | |||||
} | |||||
.hack .readmore { | |||||
margin-bottom: 2.2em; | |||||
} | |||||
.responsive-iframe, | |||||
.ratio-container { | |||||
position: relative; | |||||
padding-bottom: 56.25%; /* 16:9 = 56.25% = calc(9 / 16 * 100%) */ | |||||
padding-top: 25px; | |||||
height: 0; | |||||
} | |||||
.responsive-iframe iframe, | |||||
.ratio-container > *:not([itemprop="caption"]) { | |||||
position: absolute; | |||||
top: 0; | |||||
left: 0; | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
iframe { | |||||
border: 0; | |||||
} | |||||
main, footer { | |||||
animation: intro 0.3s both; | |||||
animation-delay: 0.15s; | |||||
} | |||||
header:first-of-type + details { | |||||
margin: 20px 0; | |||||
} | |||||
footer time[datetime$="M"]:before { | |||||
content: "\2013\0020"; | |||||
} | |||||
body > footer p.muted { | |||||
margin-bottom: 0; | |||||
} | |||||
@media only screen and (max-width: 768px) { | |||||
footer time[datetime$="M"] { | |||||
display: none; | |||||
} | |||||
} | |||||
blockquote cite { | |||||
display: block; | |||||
} | |||||
blockquote cite::before { | |||||
content: "\2014\00A0"; | |||||
} | |||||
:target { | |||||
filter: brightness(1.2); | |||||
} | |||||
:disabled { | |||||
cursor: not-allowed; | |||||
} | |||||
/* hack.css overrides and enhancements */ | |||||
.hack li ul { | |||||
margin: 0; | |||||
} | |||||
.hack ol li { | |||||
padding-left: 27px; | |||||
} | |||||
.main { | |||||
padding: 20px 10px; | |||||
} | |||||
input.form-control { | |||||
border-radius: 0; | |||||
background-color: transparent; | |||||
-webkit-appearance: none; | |||||
-moz-appearance: none; | |||||
-ms-appearance: none; | |||||
} | |||||
input.form-control, | |||||
textarea.form-control, | |||||
select.form-control, | |||||
.help-block { | |||||
font-size: initial; | |||||
} | |||||
@media only screen and (max-width: 768px) { | |||||
.help-block { | |||||
font-size: unset; | |||||
} | |||||
} | |||||
html { | |||||
font-size: 13px; | |||||
} | |||||
.hack .form input, | |||||
.hack .form textarea, | |||||
.hack .form button, | |||||
.hack .form label { | |||||
font-size: 1rem; | |||||
} | |||||
.hack .alert .highlight:first-of-type .chroma, | |||||
.hack .card .highlight:first-of-type .chroma, | |||||
.hack .alert pre:first-of-type, | |||||
.hack .alert p:first-of-type, | |||||
.hack .card pre:first-of-type, | |||||
.hack .card p:first-of-type { | |||||
margin-top: unset; | |||||
} | |||||
.hack .alert .highlight:last-of-type .chroma, | |||||
.hack .card .highlight:last-of-type .chroma, | |||||
.hack .alert pre:last-of-type, | |||||
.hack .alert p:last-of-type, | |||||
.hack .card pre:last-of-type, | |||||
.hack .card p:last-of-type { | |||||
margin-bottom: unset; | |||||
} | |||||
.hack blockquote, | |||||
.hack blockquote:after { | |||||
line-height: 1.5; | |||||
} | |||||
.hack figure, | |||||
.standard figure { | |||||
margin: unset; | |||||
} | |||||
.hack figure a { | |||||
border-bottom: none; | |||||
} | |||||
.hack figure a:hover { | |||||
background-color: inherit; | |||||
} | |||||
article header img { | |||||
width: 100%; | |||||
border-radius: 3px; | |||||
} | |||||
table td, table th { | |||||
line-height: inherit; | |||||
} | |||||
table a { | |||||
border-bottom: unset; | |||||
} | |||||
img { | |||||
max-width: 100%; | |||||
} | |||||
@media only screen and (min-width: 768px) { | |||||
html { | |||||
font-size: 16px; | |||||
} | |||||
.container { | |||||
max-width: 50rem; | |||||
} | |||||
} | |||||
@media only screen and (min-width: 768px), (-ms-high-contrast: active), (-ms-high-contrast: none) { | |||||
/* @see http://browserhacks.com/#hack-28f493d247a12ab654f6c3637f6978d5 */ | |||||
html { | |||||
margin-left: calc(100vw - 100%); /* @see https://aykevl.nl/2014/09/fix-jumping-scrollbar */ | |||||
} | |||||
} |
@ -1,21 +0,0 @@ | |||||
The MIT License (MIT) | |||||
Copyright (c) 2016 EGOIST 0x142857@gmail.com | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||||
of this software and associated documentation files (the "Software"), to deal | |||||
in the Software without restriction, including without limitation the rights | |||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||||
copies of the Software, and to permit persons to whom the Software is | |||||
furnished to do so, subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in | |||||
all copies or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||||
THE SOFTWARE. |
@ -1 +0,0 @@ | |||||
.dark-grey{background-color:#181818;color:#ccc}.dark-grey pre{background-color:#181818;padding:0;border:none}.dark-grey pre code{color:#00bcd4}.dark-grey h1 a,.dark-grey h2 a,.dark-grey h3 a,.dark-grey h4 a,.dark-grey h5 a{color:#ccc}.dark-grey code,.dark-grey strong{color:#fff}.dark-grey code{font-weight:100}.dark-grey table{color:#ccc}.dark-grey table td,.dark-grey table th{border-color:#444}.dark-grey table tbody td:first-child{color:#fff}.dark-grey .form-group label{color:#ccc;border-color:rgba(95,95,95,.78)}.dark-grey .form-group.form-textarea label:after{background-color:#181818}.dark-grey .form-control{color:#ccc;border-color:rgba(95,95,95,.78)}.dark-grey .form-control:focus{border-color:#ccc;color:#ccc}.dark-grey textarea.form-control{color:#ccc}.dark-grey .card{border-color:rgba(95,95,95,.78)}.dark-grey .card .card-header{background-color:transparent;color:#ccc;border-bottom:1px solid rgba(95,95,95,.78)}.dark-grey .btn.btn-ghost.btn-default{border-color:#ababab;color:#ababab}.dark-grey .btn.btn-ghost.btn-default:focus,.dark-grey .btn.btn-ghost.btn-default:hover{border-color:#9c9c9c;color:#9c9c9c;z-index:1}.dark-grey .btn.btn-ghost.btn-default:focus,.dark-grey .btn.btn-ghost.btn-default:hover{border-color:#e0e0e0;color:#e0e0e0}.dark-grey .btn.btn-ghost.btn-primary:focus,.dark-grey .btn.btn-ghost.btn-primary:hover{border-color:#64b5f6;color:#64b5f6}.dark-grey .btn.btn-ghost.btn-success:focus,.dark-grey .btn.btn-ghost.btn-success:hover{border-color:#81c784;color:#81c784}.dark-grey .btn.btn-ghost.btn-info:focus,.dark-grey .btn.btn-ghost.btn-info:hover{border-color:#4dd0e1;color:#4dd0e1}.dark-grey .btn.btn-ghost.btn-error:focus,.dark-grey .btn.btn-ghost.btn-error:hover{border-color:#e57373;color:#e57373}.dark-grey .btn.btn-ghost.btn-warning:focus,.dark-grey .btn.btn-ghost.btn-warning:hover{border-color:#ffb74d;color:#ffb74d}.dark-grey .avatarholder,.dark-grey .placeholder{background-color:transparent;border-color:#333}.dark-grey .menu .menu-item{color:#ccc;border-color:rgba(95,95,95,.78)}.dark-grey .menu .menu-item.active,.dark-grey .menu .menu-item:hover{color:#fff;border-color:#ccc} |
@ -1 +0,0 @@ | |||||
.dark{color:#ccc}.dark,.dark pre{background-color:#000}.dark pre{padding:0;border:none}.dark pre code{color:#00bcd4}.dark h1 a,.dark h2 a,.dark h3 a,.dark h4 a,.dark h5 a{color:#ccc}.dark code,.dark strong{color:#fff}.dark code{font-weight:100}.dark table{color:#ccc}.dark table td,.dark table th{border-color:#444}.dark table tbody td:first-child{color:#fff}.dark .form-group label{color:#ccc;border-color:rgba(95,95,95,.78)}.dark .form-group.form-textarea label:after{background-color:#000}.dark .form-control{color:#ccc;border-color:rgba(95,95,95,.78)}.dark .form-control:focus{border-color:#ccc;color:#ccc}.dark textarea.form-control{color:#ccc}.dark .card{border-color:rgba(95,95,95,.78)}.dark .card .card-header{background-color:transparent;color:#ccc;border-bottom:1px solid rgba(95,95,95,.78)}.dark .btn.btn-ghost.btn-default{border-color:#ababab;color:#ababab}.dark .btn.btn-ghost.btn-default:focus,.dark .btn.btn-ghost.btn-default:hover{border-color:#9c9c9c;color:#9c9c9c;z-index:1}.dark .btn.btn-ghost.btn-default:focus,.dark .btn.btn-ghost.btn-default:hover{border-color:#e0e0e0;color:#e0e0e0}.dark .btn.btn-ghost.btn-primary:focus,.dark .btn.btn-ghost.btn-primary:hover{border-color:#64b5f6;color:#64b5f6}.dark .btn.btn-ghost.btn-success:focus,.dark .btn.btn-ghost.btn-success:hover{border-color:#81c784;color:#81c784}.dark .btn.btn-ghost.btn-info:focus,.dark .btn.btn-ghost.btn-info:hover{border-color:#4dd0e1;color:#4dd0e1}.dark .btn.btn-ghost.btn-error:focus,.dark .btn.btn-ghost.btn-error:hover{border-color:#e57373;color:#e57373}.dark .btn.btn-ghost.btn-warning:focus,.dark .btn.btn-ghost.btn-warning:hover{border-color:#ffb74d;color:#ffb74d}.dark .avatarholder,.dark .placeholder{background-color:transparent;border-color:#333}.dark .menu .menu-item{color:#ccc;border-color:rgba(95,95,95,.78)}.dark .menu .menu-item.active,.dark .menu .menu-item:hover{color:#fff;border-color:#ccc} |
@ -1 +0,0 @@ | |||||
.solarized-dark{background-color:#073642;color:#78909c}.solarized-dark h1,.solarized-dark h2,.solarized-dark h3,.solarized-dark h4,.solarized-dark h5,.solarized-dark h6{color:#1e88e5}.solarized-dark h1 a,.solarized-dark h2 a,.solarized-dark h3 a,.solarized-dark h4 a,.solarized-dark h5 a,.solarized-dark h6 a{color:#1e88e5;border-bottom-color:#1e88e5}.solarized-dark h1 a:hover,.solarized-dark h2 a:hover,.solarized-dark h3 a:hover,.solarized-dark h4 a:hover,.solarized-dark h5 a:hover,.solarized-dark h6 a:hover{background-color:#1e88e5;color:#fff}.solarized-dark pre{background-color:#073642;padding:0;border:none}.solarized-dark pre code{color:#009688}.solarized-dark h1 a,.solarized-dark h2 a,.solarized-dark h3 a,.solarized-dark h4 a,.solarized-dark h5 a{color:#78909c}.solarized-dark code,.solarized-dark strong{color:#90a4ae}.solarized-dark code{font-weight:100}.solarized-dark .progress-bar-filled{background-color:#558b2f}.solarized-dark .progress-bar-filled:after,.solarized-dark .progress-bar-filled:before{color:#90a4ae}.solarized-dark table{color:#78909c}.solarized-dark table td,.solarized-dark table th{border-color:#b0bec5}.solarized-dark table tbody td:first-child{color:#b0bec5}.solarized-dark .form-group label{color:#78909c;border-color:#90a4ae}.solarized-dark .form-group.form-textarea label:after{background-color:#073642}.solarized-dark .form-control{color:#78909c;border-color:#90a4ae}.solarized-dark .form-control:focus{border-color:#cfd8dc;color:#cfd8dc}.solarized-dark textarea.form-control{color:#78909c}.solarized-dark .card{border-color:#90a4ae}.solarized-dark .card .card-header{background-color:transparent;color:#78909c;border-bottom:1px solid #90a4ae}.solarized-dark .btn.btn-ghost.btn-default{border-color:#607d8b;color:#607d8b}.solarized-dark .btn.btn-ghost.btn-default:focus,.solarized-dark .btn.btn-ghost.btn-default:hover{border-color:#90a4ae;color:#90a4ae;z-index:1}.solarized-dark .btn.btn-ghost.btn-default:focus,.solarized-dark .btn.btn-ghost.btn-default:hover{border-color:#e0e0e0;color:#e0e0e0}.solarized-dark .btn.btn-ghost.btn-primary:focus,.solarized-dark .btn.btn-ghost.btn-primary:hover{border-color:#64b5f6;color:#64b5f6}.solarized-dark .btn.btn-ghost.btn-success:focus,.solarized-dark .btn.btn-ghost.btn-success:hover{border-color:#81c784;color:#81c784}.solarized-dark .btn.btn-ghost.btn-info:focus,.solarized-dark .btn.btn-ghost.btn-info:hover{border-color:#4dd0e1;color:#4dd0e1}.solarized-dark .btn.btn-ghost.btn-error:focus,.solarized-dark .btn.btn-ghost.btn-error:hover{border-color:#e57373;color:#e57373}.solarized-dark .btn.btn-ghost.btn-warning:focus,.solarized-dark .btn.btn-ghost.btn-warning:hover{border-color:#ffb74d;color:#ffb74d}.solarized-dark .avatarholder,.solarized-dark .placeholder{background-color:transparent;border-color:#90a4ae}.solarized-dark .menu .menu-item{color:#78909c;border-color:#90a4ae}.solarized-dark .menu .menu-item.active,.solarized-dark .menu .menu-item:hover{color:#fff;border-color:#78909c} |
@ -1 +0,0 @@ | |||||
html{font-size:14px}.standard{font-family:-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica,helvetica neue,Ubuntu,segoe ui,arial,sans-serif}.standard h1{font-size:2em;font-weight:700;margin:.67em 0}.standard h2{font-size:1.5em;font-weight:700;margin:.83em 0}.standard h3{font-size:1.17em;font-weight:700}.standard h3,.standard p{margin:1.75rem 0}.standard ol,.standard ul{display:block;list-style-type:disc;padding-left:20px;margin:1.75rem 0}.standard ol ul,.standard ul ul{margin:.75rem 0;list-style-type:square}.standard ol{list-style-type:decimal}.standard li{display:list-item;padding-left:0}.standard blockquote{margin:1.75rem 0;padding-left:10px;border-left:5px solid #f0f0f0}.standard pre{margin:1.75rem 0;white-space:pre}.standard hr{border:0;height:1px;display:block;background-color:#e2e2e2;margin:1.75rem 0} |
@ -1,20 +0,0 @@ | |||||
/*! | |||||
* Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
* | |||||
* This file is part of After Dark. | |||||
* | |||||
* After Dark is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU Affero General Public License as published | |||||
* by the Free Software Foundation, either version 3 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* After Dark is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU Affero General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU Affero General Public License | |||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ | |||||
fetchInject(["{{ "/js/lazysizes.min.js" | relURL }}"]); |
@ -1,145 +0,0 @@ | |||||
/*! | |||||
* Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
* | |||||
* This file is part of After Dark. | |||||
* | |||||
* After Dark is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU Affero General Public License as published | |||||
* by the Free Software Foundation, either version 3 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* After Dark is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU Affero General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU Affero General Public License | |||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ | |||||
fetchInject([ | |||||
"{{ "/js/vue.min.js" | relURL }}", | |||||
"{{ "/js/lodash.custom.min.js" | relURL }}", | |||||
"{{ "/js/fuse.min.js" | relURL }}", | |||||
"{{ "/js/mark.min.js" | relURL }}" | |||||
]).then(() => { | |||||
(function (window, document, undefined) { | |||||
'use strict'; | |||||
const getQueryByParam = param => decodeURIComponent( | |||||
(location.search.split(param + '=')[1] || '').split('&')[0] | |||||
).replace(/\+/g, ' '); | |||||
const queryParam = 's'; | |||||
const hotkeys = {{ (.Params.form.hotkeys | default (slice "/" "s")) | jsonify }}; | |||||
const selectors = { | |||||
appContainer: '#search-app', | |||||
resultContainer: '#search-results', | |||||
searchInput: '#query' | |||||
}; | |||||
const fuseOpts = { | |||||
shouldSort: true, | |||||
tokenize: true, | |||||
matchAllTokens: true, | |||||
includeScore: true, | |||||
includeMatches: true, | |||||
keys: [ | |||||
{ name: "title", weight: 0.8 }, | |||||
{ name: "contents", weight: 0.5 }, | |||||
{ name: "tags", weight: 0.3 }, | |||||
{ name: "categories", weight: 0.3 } | |||||
] | |||||
}; | |||||
const getSearchInput = () => document.querySelector(selectors.searchInput); | |||||
const focusSearchInput = () => getSearchInput().focus(); | |||||
const searchQuery = getSearchInput().value = getQueryByParam(queryParam); | |||||
const fuse = new Fuse([], fuseOpts); | |||||
window.fetch('/index.json').then(response => { | |||||
response.text().then(searchData => { | |||||
fuse.setCollection(JSON.parse(searchData)); | |||||
searchQuery && search(searchQuery); | |||||
}); | |||||
}); | |||||
const getUrl = (query) => { | |||||
const encodedQuery = encodeURIComponent(query); | |||||
const url = "{{ .RelPermalink }}"; | |||||
return (encodedQuery) | |||||
? `${url}?${queryParam}=${encodedQuery}` | |||||
: url; | |||||
}; | |||||
let mark = new Mark( | |||||
document.querySelector( | |||||
selectors.resultContainer | |||||
) | |||||
); | |||||
const app = new Vue({ | |||||
delimiters: ['{', '}'], | |||||
el: selectors.appContainer, | |||||
data: { | |||||
fuse: null, | |||||
results: [], | |||||
query: getQueryByParam(queryParam), | |||||
resultsForSearch: getQueryByParam(queryParam) | |||||
}, | |||||
mounted () { | |||||
this.fuse = fuse; | |||||
window.onpopstate = (evt) => { | |||||
this.query = evt.state.query; | |||||
}; | |||||
const searchInput = getSearchInput(); | |||||
document.onkeydown = function (evt) { | |||||
if (evt.target === searchInput) return; | |||||
if (hotkeys.includes(evt.key)) { | |||||
evt.preventDefault(); | |||||
focusSearchInput(); | |||||
getSearchInput().select(); | |||||
}; | |||||
} | |||||
focusSearchInput(); | |||||
}, | |||||
watch: { | |||||
query () { | |||||
this.executeSearch(); | |||||
window.history.replaceState( | |||||
{query: this.query}, | |||||
null, | |||||
getUrl(this.query) | |||||
); | |||||
} | |||||
}, | |||||
beforeUpdate: function () { | |||||
mark.unmark(); | |||||
}, | |||||
updated: function () { | |||||
this.$nextTick(function () { | |||||
mark = new Mark( | |||||
document.querySelector( | |||||
selectors.resultContainer | |||||
) | |||||
) | |||||
mark.mark(this.query.trim()); | |||||
}) | |||||
}, | |||||
methods: { | |||||
executeSearch: _.debounce(function () { | |||||
const trimmedQuery = this.query.trim(); | |||||
this.resultsForSearch = trimmedQuery; | |||||
this.results = (trimmedQuery) | |||||
? this.fuse.search(trimmedQuery) | |||||
: []; | |||||
}, 250) | |||||
} | |||||
}); | |||||
const search = query => { | |||||
app.results = fuse.search(query); | |||||
}; | |||||
})(window, document); | |||||
}); |
@ -1,2 +0,0 @@ | |||||
/*! Fetch Inject v2.0.4 | Copyright (C) Josh Habdas <jhabdas@protonmail.com> (https://habd.as) | @license Zlib */ | |||||
var fetchInject=function(){"use strict";const e=function(e,t,r,n,o,c,i){c=t.createElement(r),i=t.getElementsByTagName(r)[0],c.appendChild(t.createTextNode(n.text)),c.onload=o(n),i?i.parentNode.insertBefore(c,i):t.head.appendChild(c)};return function(t,r){if(!arguments.length)return Promise.reject(new ReferenceError("Failed to execute 'fetchInject': 1 argument required but only 0 present."));if(arguments[0]&&arguments[0].constructor!==Array)return Promise.reject(new TypeError("Failed to execute 'fetchInject': argument 1 must be of type 'Array'."));if(arguments[1]&&arguments[1].constructor!==Promise)return Promise.reject(new TypeError("Failed to execute 'fetchInject': argument 2 must be of type 'Promise'."));const n=[],o=r?[].concat(r):[],c=[];return t.forEach(e=>o.push(window.fetch(e).then(e=>[e.clone().text(),e.blob()]).then(e=>Promise.all(e).then(e=>{n.push({text:e[0],blob:e[1]})})))),Promise.all(o).then(()=>(n.forEach(t=>{c.push({then:r=>{t.blob.type.includes("text/css")?e(window,document,"style",t,r):e(window,document,"script",t,r)}})}),Promise.all(c)))}}(); |
@ -1,29 +0,0 @@ | |||||
#!/bin/sh | |||||
# | |||||
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
# | |||||
# This file is part of After Dark. | |||||
# | |||||
# After Dark is free software: you can redistribute it and/or modify | |||||
# it under the terms of the GNU Affero General Public License as published | |||||
# by the Free Software Foundation, either version 3 of the License, or | |||||
# (at your option) any later version. | |||||
# | |||||
# After Dark is distributed in the hope that it will be useful, | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
# GNU Affero General Public License for more details. | |||||
# | |||||
# You should have received a copy of the GNU Affero General Public License | |||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
# | |||||
THEME_PATH=themes/after-dark | |||||
echo "Starting help server ..." | |||||
kill $(ps aux | awk '/[h]ugo.*1414/ {print $2}') 2>/dev/null | |||||
cd "$THEME_PATH"/docs && hugo serve --disableLiveReload --port 1414 1>/dev/null & | |||||
echo "Help server started at http://localhost:1414/" | |||||
echo "To stop it run \"kill \$(ps aux | awk '/[h]ugo.*1414/ {print \$2}')\"." | |||||
echo "To start it again run \"./themes/after-dark/bin/help\"." |
@ -1,170 +0,0 @@ | |||||
#!/bin/sh -e | |||||
# | |||||
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
# | |||||
# This file is part of After Dark. | |||||
# | |||||
# After Dark is free software: you can redistribute it and/or modify | |||||
# it under the terms of the GNU Affero General Public License as published | |||||
# by the Free Software Foundation, either version 3 of the License, or | |||||
# (at your option) any later version. | |||||
# | |||||
# After Dark is distributed in the hope that it will be useful, | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
# GNU Affero General Public License for more details. | |||||
# | |||||
# You should have received a copy of the GNU Affero General Public License | |||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
# | |||||
validate_hugo () { | |||||
# Exit with error if hugo is not installed | |||||
if ! hash hugo 2>/dev/null ; then | |||||
echo "Error: After Dark requires Hugo version 0.51 or greater" >&2; exit 1 | |||||
fi | |||||
# Exit with error if not minimum required hugo version | |||||
re="v(0\d*\.([5-9][1-9]|[6-9])|[1-9]).*" | |||||
if ! hugo version | grep -qE "$re" ; then | |||||
echo "Error: After Dark requires Hugo version 0.51 or greater" >&2; exit 1 | |||||
fi | |||||
} | |||||
create_site_dir () { | |||||
SITE_DIR="flying-toasters" | |||||
if [ "$1" != "" ] ; then | |||||
SITE_DIR="$1" | |||||
fi | |||||
SITE_DIR_ABS="$PWD/$SITE_DIR" | |||||
mkdir -p "$SITE_DIR" | |||||
} | |||||
create_site () { | |||||
echo "Creating a new Hugo site ..." | |||||
hugo new site "$SITE_DIR" 1>/dev/null | |||||
cd "$SITE_DIR" || exit 1 | |||||
} | |||||
download_theme () { | |||||
echo "Downloading the latest version of After Dark ..." | |||||
LATEST_META=$(wget -qO - https://registry.npmjs.org/after-dark/latest) | |||||
vers=$(echo "$LATEST_META" | grep -oE "\"version\".*[^,]*," | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '" ') | |||||
mkdir -p themes/after-dark | |||||
wget -qO - https://registry.npmjs.org/after-dark/-/after-dark-"$vers".tgz | tar --strip-components=1 -xz -C themes/after-dark | |||||
echo "Version $vers downloaded to $SITE_DIR/themes/after-dark" | |||||
} | |||||
download_module () { | |||||
[ -z "$1" ] && { echo "Error: Attempt to download undefined module" >&2; exit 1; } | |||||
echo "Downloading $1 module for After Dark ..." | |||||
meta=$(wget -qO - https://registry.npmjs.org/"$1"/latest) | |||||
vers=$(echo "$meta" | grep -oE "\"version\".*[^,]*," | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '" ') | |||||
mkdir -p themes/"$1" | |||||
wget -qO - https://registry.npmjs.org/"$1"/-/"$1"-"$vers".tgz | tar --strip-components=1 -xz -C themes/"$1" | |||||
echo "Version $vers downloaded to $SITE_DIR/themes/$1" | |||||
} | |||||
configure_theme () { | |||||
echo "Configuring basic After Dark theme settings ..." | |||||
tee "config.toml" > /dev/null <<TOML | |||||
baseurl = "https://domain.example" # Controls base URL sitewide | |||||
languageCode = "en-US" # Controls site language | |||||
title = "After Dark" # Homepage title and page title suffix | |||||
paginate = 11 # Number of posts to show before paginating | |||||
copyright = "Copyright © Copyright Owner. Licensed under <a target=\"_blank\" rel=\"external noopener license\" href=\"https://creativecommons.org/licenses/by-nd/4.0/\">CC-BY-ND-4.0</a>." # Optional, remove to suppress copyright notices | |||||
# Controls default theme and theme components | |||||
theme = [ | |||||
"fractal-forest", # OBSD | |||||
"after-dark" # AGPL-3.0-or-later | |||||
] | |||||
disableLiveReload = false # Optional, set true to disable live reload | |||||
enableRobotsTXT = true # Suggested, enable robots.txt file | |||||
sectionPagesMenu = "main" # Enable menu system for lazy bloggers | |||||
[markup.goldmark.renderer] | |||||
unsafe = true # Optional, allows HTML inside your CommonMark content | |||||
[markup.tableOfContents] | |||||
startLevel = 1 # Suggested, draws TOC using all heading levels | |||||
endLevel = 6 # Suggested, draws TOC using all heading levels | |||||
[markup.highlight] | |||||
noClasses = false # Suggested, used for custom syntax highlighting | |||||
[params] | |||||
description = "" # Suggested, controls default description meta | |||||
author = "" # Optional, controls author name display on posts | |||||
hide_author = false # Optional, set true to hide author name on posts | |||||
disable_csp = false # Optional, set true to disable content security policy | |||||
images = [ | |||||
"https://source.unsplash.com/collection/983219/2000x1322" | |||||
] # Suggested, controls default Open Graph images | |||||
[params.layout.menu.main] | |||||
hidden = true # Optional, set false or remove to show section menu | |||||
[params.layout.footer] | |||||
hidden = false # Optional, set true to hide footer | |||||
[params.modules.fractal_forest] | |||||
enabled = true # Optional, set false to disable module | |||||
decoders = ["bpgdec8a"] # Optional, 8-bit javascript decoder with animation | |||||
TOML | |||||
} | |||||
update_archetypes () { | |||||
echo "Updating the default content archetype ..." | |||||
rm -f archetypes/default.md | |||||
cp themes/after-dark/archetypes/default.md archetypes | |||||
} | |||||
create_welcome_post () { | |||||
echo "Creating welcome post ..." | |||||
hugo new post/welcome.md 1>/dev/null | |||||
} | |||||
serve_site () { | |||||
echo "Starting site server ..." | |||||
hugo serve --buildDrafts --navigateToChanged --port 1313 1>/dev/null & | |||||
} | |||||
generate_help_docs () { | |||||
echo "Generating help documentation ..." | |||||
THEME_PATH=themes/after-dark | |||||
meta_path="$THEME_PATH"/data/npm | |||||
mkdir -p "$meta_path" && echo "$LATEST_META" | tr '\r\n' ' ' > "$meta_path"/latest.json | |||||
cd "$THEME_PATH"/docs && mkdir themes && ln -s ../.. "$THEME_PATH" | |||||
hugo new validate.md --kind validate 1>/dev/null | |||||
} | |||||
serve_help () { | |||||
echo "Starting help server ..." | |||||
hugo serve --disableLiveReload --port 1414 1>/dev/null & | |||||
} | |||||
echo "Welcome to the After Dark quick installer. Press CTRL-C at any time to abort." | |||||
validate_hugo | |||||
create_site_dir "$1" | |||||
create_site | |||||
download_theme | |||||
update_archetypes | |||||
download_module "fractal-forest" | |||||
configure_theme | |||||
create_welcome_post | |||||
serve_site | |||||
generate_help_docs | |||||
serve_help | |||||
YELLOW='\033[0;33m' | |||||
NC='\033[0m' | |||||
printf "${YELLOW}Installation successful!${NC}\n" | |||||
echo "Site created in $SITE_DIR_ABS" | |||||
echo "Site server started at http://localhost:1313/" | |||||
echo "To stop it run \"kill \$(ps aux | awk '/[h]ugo.*1313/ {print \$2}')\"." | |||||
echo "Help server started at http://localhost:1414/" | |||||
echo "To stop and restart it run \"./themes/after-dark/bin/help\"." | |||||
echo "Thank you for choosing After Dark." |
@ -0,0 +1,91 @@ | |||||
#!/usr/bin/env bash | |||||
# | |||||
# The suspicious-looking install script for After Dark. | |||||
# https://themes.gohugo.io/after-dark/ | |||||
# | |||||
# Copyright (c) 2016-2017 Josh Habdas <jhabas@pm.me> (https://habd.as) | |||||
# Licensed under WTFPL. You just DO WHAT THE FUCK YOU WANT TO. | |||||
# | |||||
# Exit early on failure | |||||
set -e | |||||
# Make some environment variables | |||||
SITE_SOURCE_PATH=$(pwd) | |||||
HUGO_CONFIG_PATH="./config.toml" | |||||
# Create new After Dark site | |||||
if [ -z "$1" ]; then | |||||
SITE_SOURCE_PATH="${SITE_SOURCE_PATH}/flying-toasters" | |||||
hugo new site flying-toasters && cd $_ | |||||
else | |||||
SITE_SOURCE_PATH="${SITE_SOURCE_PATH}/$1" | |||||
hugo new site $1 && cd $_ | |||||
fi | |||||
echo "Installing After Dark ..." | |||||
# Clone repo | |||||
(cd themes; git clone -q --depth 1 https://github.com/comfusion/after-dark || { echo "cloning failed :/"; exit 1; }) | |||||
# Copy archetypes | |||||
cp themes/after-dark/archetypes/* ./archetypes | |||||
# Ignore generated files from source control | |||||
touch .gitignore | |||||
echo "public | |||||
resources" >> .gitignore | |||||
# Add pretty config file with inline documentation | |||||
tee $HUGO_CONFIG_PATH > /dev/null <<TOML | |||||
baseurl = "https://c74ce35e.ngrok.io/" # Controls base URL | |||||
languageCode = "en-US" # Controls site language | |||||
title = "After Dark" # Homepage title and page title suffix | |||||
paginate = 11 # Number of posts to show before paginating | |||||
theme = "after-dark" # Set default theme | |||||
enableRobotsTXT = true # Suggested, enable robots.txt file | |||||
googleAnalytics = "" # Optional, add tracking Id for analytics | |||||
disqusShortname = "" # Optional, add Disqus shortname for comments | |||||
SectionPagesMenu = "main" # Enable menu system for lazy bloggers | |||||
footnoteReturnLinkContents = "↩" # Provides a nicer footnote return link | |||||
[params] | |||||
description = "" # Suggested, controls default description meta | |||||
author = "" # Optional, controls author name display on posts | |||||
hide_author = false # Optional, set true to hide author name on posts | |||||
show_menu = false # Optional, set true to enable section menu | |||||
powered_by = true # Optional, set false to disable credits | |||||
images = [ | |||||
"https://source.unsplash.com/category/technology/2000x1322" | |||||
] # Suggested, controls default Open Graph images | |||||
theme_variant = "" # Optional, for use to overriding default theme | |||||
TOML | |||||
echo "Creating an example post to get you started ..." | |||||
# Create the first post with next steps for user | |||||
hugo new post/starry-night.md | |||||
echo "Serving your After Dark site ..." | |||||
# Serve site backgrounded over Docker-friendly loopback | |||||
hugo serve --buildDrafts --port 1337 --bind "0.0.0.0" & | |||||
# Wait a second for Hugo server to fire up | |||||
sleep 1 | |||||
# Pop the site in terminal browser, if installed | |||||
if [[ "elinks" != "" ]]; then | |||||
elinks http://0.0.0.0:1337/ | |||||
fi | |||||
echo "Installation complete!" | |||||
echo "Your new After Dark site is created in $SITE_SOURCE_PATH." | |||||
echo "Site is currently running at http://0.0.0.0:1337/" | |||||
echo "To stop it run \"kill \$(lsof -nt -i4TCP:1337)\"." | |||||
echo "Thank you for choosing After Dark." | |||||
exit 0 |
@ -1,66 +0,0 @@ | |||||
#!/bin/sh | |||||
# | |||||
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
# | |||||
# This file is part of After Dark. | |||||
# | |||||
# After Dark is free software: you can redistribute it and/or modify | |||||
# it under the terms of the GNU Affero General Public License as published | |||||
# by the Free Software Foundation, either version 3 of the License, or | |||||
# (at your option) any later version. | |||||
# | |||||
# After Dark is distributed in the hope that it will be useful, | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
# GNU Affero General Public License for more details. | |||||
# | |||||
# You should have received a copy of the GNU Affero General Public License | |||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
# | |||||
stop_help_server () { | |||||
echo "Stopping help server if running ..." | |||||
kill "$(ps aux | awk '/[h]ugo.*1414/ {print $2}')" 2>/dev/null || true | |||||
} | |||||
generate_help_docs () { | |||||
stop_help_server | |||||
echo "Generating help documentation ..." | |||||
THEME_PATH=themes/after-dark | |||||
meta_path="$THEME_PATH"/data/npm | |||||
mkdir -p "$meta_path" && echo "$LATEST_META" | tr '\r\n' ' ' > "$meta_path"/latest.json | |||||
cd "$THEME_PATH"/docs && mkdir themes && ln -s ../.. "$THEME_PATH" | |||||
hugo new validate.md --kind validate 1>/dev/null | |||||
} | |||||
update_module () { | |||||
meta_file=themes/"$1"/data/npm/latest.json | |||||
if [ -f "$meta_file" ] ; then | |||||
current_vers=$(sed -n 's/.*"version":"\([^"]*\).*/\1/p' < "$meta_file") | |||||
else | |||||
echo "Cannot detect version. Upgrade $1 anyway (y/n)? \c" | |||||
read -r answer | |||||
[ "$answer" = "${answer#[Yy]}" ] && exit 1 | |||||
fi | |||||
LATEST_META=$(wget -qO - https://registry.npmjs.org/"$1"/latest) | |||||
latest_vers=$(echo "$LATEST_META" | grep -oE "\"version\".*[^,]*," | cut -d ',' -f1 | cut -d ':' -f2 | tr -d '" ') | |||||
if [ "$current_vers" ] ; then | |||||
if [ "$current_vers" = "$latest_vers" ] ; then | |||||
echo "Did not upgrade $1. Already using latest version." >&1; exit 0 | |||||
else | |||||
echo "Upgrading $1 from $current_vers to $latest_vers ..." | |||||
fi | |||||
else | |||||
echo "Upgrading $1 from unknown version to $latest_vers ..." | |||||
fi | |||||
rm -rf themes/"$1"/* # maintains dotfiles, e.g. git and env | |||||
wget -qO - https://registry.npmjs.org/"$1"/-/"$1"-"$latest_vers".tgz | tar --strip-components=1 -xz -C themes/"$1" | |||||
echo "Version $latest_vers downloaded to themes/$1" | |||||
[ "$1" = "after-dark" ] && generate_help_docs | |||||
echo "Upgrade complete! Please see CHANGELOG.md for changes." | |||||
} | |||||
set -e | |||||
update_module "after-dark" |
@ -1,3 +0,0 @@ | |||||
title = "GNU Affero General Public License v3.0 (or later version)" | |||||
shorthand = "GNU AGPLv3+" | |||||
link = "https://www.gnu.org/licenses/agpl.html" |
@ -1,3 +0,0 @@ | |||||
title = "Creative Commons Attribution NonCommercial ShareAlike 4.0 International" | |||||
shorthand = "CC BY-NC-SA 4.0" | |||||
link = "https://creativecommons.org/licenses/by-nc-sa/4.0/" |
@ -1,3 +0,0 @@ | |||||
title = "Creative Commons Attribution NoDerivatives 4.0 International" | |||||
shorthand = "CC BY-ND 4.0" | |||||
link = "https://creativecommons.org/licenses/by-nd/4.0/" |
@ -1,3 +0,0 @@ | |||||
title = "Creative Commons Attribution Share Alike 4.0 International" | |||||
shorthand = "CC BY-SA 4.0" | |||||
link = "https://creativecommons.org/licenses/by-sa/4.0/" |
@ -1 +0,0 @@ | |||||
article_types = ["Article", "AdvertiserContentArticle", "NewsArticle", "AnalysisNewsArticle", "AskPublicNewsArticle", "BackgroundNewsArticle", "OpinionNewsArticle", "ReportageNewsArticle", "ReviewNewsArticle", "Report", "SatiricalArticle", "ScholarlyArticle", "MedicalScholarlyArticle", "SocialMediaPosting", "BlogPosting", "LiveBlogPosting", "DiscussionForumPosting", "TechArticle", "APIReference"] |
@ -1,71 +0,0 @@ | |||||
# | |||||
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
# | |||||
# This file is part of After Dark. | |||||
# | |||||
# After Dark is free software: you can redistribute it and/or modify | |||||
# it under the terms of the GNU Affero General Public License as published | |||||
# by the Free Software Foundation, either version 3 of the License, or | |||||
# (at your option) any later version. | |||||
# | |||||
# After Dark is distributed in the hope that it will be useful, | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
# GNU Affero General Public License for more details. | |||||
# | |||||
# You should have received a copy of the GNU Affero General Public License | |||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
# | |||||
# DOCKER-VERSION 19.03.1-ce, build 74b1e89e8a | |||||
# COMPOSE-VERSION 1.24.1 | |||||
# HOW TO USE THIS FILE | |||||
# | |||||
# 1. Install Docker and Docker Compose on a host machine | |||||
# 2. Copy `Dockerfile` and `docker-compose.yml` to directory of choice | |||||
# 3. Run `docker build .` to build after-dark image | |||||
# 4. Run `mkdir -p site/content` to contain your config and site content | |||||
# 5. Create a temporary container to copy site config and welcome post from container to host | |||||
# ``` | |||||
# docker create -it --name temp $(docker images -q | head -n 1) sh && \ | |||||
# docker cp temp:/opt/after-dark/config.toml ./site && \ | |||||
# docker cp temp:/opt/after-dark/content/post/ ./site/content/ && \ | |||||
# docker rm -fv temp | |||||
# ``` | |||||
# 6. Add a rule to your hosts file like: `127.0.0.1 after-dark.local` to match traefik label | |||||
# 7. Bring the stack up with `docker-compose up -d` then check state with `docker-compose ps` | |||||
# 8. If both traefik and web services are up navigate to http://after-dark.local in a browser | |||||
# 9. Make a change to the site config for content and watch the page reload with the updates | |||||
version: "3.7" | |||||
services: | |||||
traefik: | |||||
image: traefik:v2.0.0 | |||||
command: | |||||
# - "--log.level=DEBUG" | |||||
# - "--api.insecure=true" | |||||
- "--global.checkNewVersion=false" | |||||
- "--global.sendAnonymousUsage=false" | |||||
- "--providers.docker=true" | |||||
- "--providers.docker.exposedbydefault=false" | |||||
- "--entrypoints.web.address=:80" | |||||
ports: | |||||
- "80:80" | |||||
# - "8080:8080" # Traefik Web UI (enabled by --api.insecure) | |||||
volumes: | |||||
- /var/run/docker.sock:/var/run/docker.sock:ro # So that Traefik can listen to the Docker events | |||||
# - ./traefik.toml:/etc/traefik/traefik.toml # Start using config | |||||
web: | |||||
build: . | |||||
expose: | |||||
- "80" | |||||
volumes: | |||||
- ./site/content:/opt/after-dark/content/:ro | |||||
- ./site/config.toml:/opt/after-dark/config.toml:ro | |||||
labels: | |||||
- traefik.enable=true | |||||
- traefik.http.routers.after-dark.entrypoints=web | |||||
- traefik.http.routers.after-dark.rule=Host(`after-dark.local`) |
@ -1,48 +0,0 @@ | |||||
# | |||||
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
# | |||||
# This file is part of After Dark. | |||||
# | |||||
# After Dark is free software: you can redistribute it and/or modify | |||||
# it under the terms of the GNU Affero General Public License as published | |||||
# by the Free Software Foundation, either version 3 of the License, or | |||||
# (at your option) any later version. | |||||
# | |||||
# After Dark is distributed in the hope that it will be useful, | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
# GNU Affero General Public License for more details. | |||||
# | |||||
# You should have received a copy of the GNU Affero General Public License | |||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
# | |||||
# DOCKER-VERSION 19.03.1-ce, build 74b1e89e8a | |||||
# Specify build image | |||||
ARG GO_VERSION=1.11.4 | |||||
ARG BUILD_TARGET=alpine3.8 | |||||
# Pull builder base image | |||||
FROM golang:${GO_VERSION}-${BUILD_TARGET} AS htmltestbuilder | |||||
# Set build variables | |||||
ARG HTMLTEST_VERSION=0.10.3 | |||||
ENV CGO_ENABLED=0 \ | |||||
GOOS=linux \ | |||||
GO111MODULE=on | |||||
# Build from source using specified version | |||||
RUN \ | |||||
apk add --update --no-cache ca-certificates git musl-dev && \ | |||||
git clone https://github.com/wjdp/htmltest.git $GOPATH/src/github.com/wjdp/htmltest && \ | |||||
cd ${GOPATH:-$HOME/go}/src/github.com/wjdp/htmltest && \ | |||||
git checkout v$HTMLTEST_VERSION && \ | |||||
go mod download && \ | |||||
go install -installsuffix 'static' -ldflags "-X main.date=`date -u +%Y-%m-%dT%H:%M:%SZ` -X main.version=`git describe --tags`" | |||||
# Move compiled binary into own container | |||||
FROM scratch | |||||
COPY --from=htmltestbuilder /go/bin/htmltest /htmltest | |||||
ENTRYPOINT ["/htmltest"] | |||||
CMD ["-h"] |
@ -1,48 +0,0 @@ | |||||
# | |||||
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
# | |||||
# This file is part of After Dark. | |||||
# | |||||
# After Dark is free software: you can redistribute it and/or modify | |||||
# it under the terms of the GNU Affero General Public License as published | |||||
# by the Free Software Foundation, either version 3 of the License, or | |||||
# (at your option) any later version. | |||||
# | |||||
# After Dark is distributed in the hope that it will be useful, | |||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
# GNU Affero General Public License for more details. | |||||
# | |||||
# You should have received a copy of the GNU Affero General Public License | |||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
# | |||||
# DOCKER-VERSION 19.03.5, build 633a0ea | |||||
# Specify build image | |||||
ARG GO_VERSION=1.13.4 | |||||
ARG BUILD_TARGET=alpine3.10 | |||||
# Pull builder base image | |||||
FROM golang:${GO_VERSION}-${BUILD_TARGET} AS hugobuilder | |||||
# Set environment variables | |||||
ENV HUGO_VERSION=0.61.0 \ | |||||
CGO_ENABLED=1 \ | |||||
GOOS=linux \ | |||||
GO111MODULE=on \ | |||||
BUILD_TAGS="extended" | |||||
# Build from source using specified version | |||||
RUN \ | |||||
apk add --update --no-cache git gcc g++ && \ | |||||
git clone https://github.com/gohugoio/hugo.git $GOPATH/src/github.com/gohugoio/hugo && \ | |||||
cd ${GOPATH:-$HOME/go}/src/github.com/gohugoio/hugo && \ | |||||
git checkout v$HUGO_VERSION && \ | |||||
go install -ldflags '-s -w -extldflags "-static"' -tags ${BUILD_TAGS} | |||||
# Move compiled binary into own container | |||||
FROM scratch | |||||
COPY --from=hugobuilder /go/bin/hugo /hugo | |||||
ENTRYPOINT ["/hugo"] | |||||
CMD ["--help"] |
@ -1,11 +0,0 @@ | |||||
+++ | |||||
title = "{{ replace .TranslationBaseName "-" " " | title }}" | |||||
description = "This text is displayed in search result listings." | |||||
categories = ["features"] | |||||
tags = ["after", "dark"] | |||||
features = [""] | |||||
[[copyright]] | |||||
owner = "Josh Habdas" | |||||
date = "2019" | |||||
license = "agpl-3.0-or-later" | |||||
+++ |
@ -1,12 +0,0 @@ | |||||
+++ | |||||
title = "{{ replace .TranslationBaseName "-" " " | title }}" | |||||
slug = "{{ .TranslationBaseName }}" | |||||
description = "This text is displayed in search result listings." | |||||
categories = ["addon"] | |||||
tags = ["module"] | |||||
features = [""] | |||||
[[copyright]] | |||||
owner = "Josh Habdas" | |||||
date = "2019" | |||||
license = "agpl-3.0-or-later" | |||||
+++ |
@ -1,13 +0,0 @@ | |||||
+++ | |||||
title = "{{ replace .TranslationBaseName "-" " " | title }}" | |||||
description = "This text is displayed in search result listings." | |||||
categories = ["experience"] | |||||
tags = ["after", "dark"] | |||||
html_attributes = [] | |||||
custom_attributes = [] | |||||
snippets_used = [] | |||||
[[copyright]] | |||||
owner = "Josh Habdas" | |||||
date = "2019" | |||||
license = "agpl-3.0-or-later" | |||||
+++ |
@ -1,82 +0,0 @@ | |||||
+++ | |||||
title = "Validate Release" | |||||
description = "Complete the included form to validate the release." | |||||
noindex = true | |||||
[[copyright]] | |||||
owner = "Josh Habdas" | |||||
date = "2019" | |||||
license = "agpl-3.0-or-later" | |||||
+++ | |||||
{{< hackcss-form name="validate" action="/validate/" >}} | |||||
{{< hackcss-formgroup name="integrity" >}} | |||||
{{< hackcss-label for="digest" >}} | |||||
<abbr title="Secure Hash Algorithm">SHA-512</abbr> Digest: | |||||
{{< /hackcss-label >}} | |||||
{{< hackcss-textinput | |||||
required="true" | |||||
autocomplete="off" | |||||
spellcheck="false" | |||||
type="text" id="digest" name="digest" | |||||
pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" | |||||
placeholder="whUlqT0w6vfvTzd12LpU5kst/Cz3yt9j3ncIHcB4CDQFFiMVPlfX/I+vKl3Y98faqBLlgh6M4pyhiYzZNIPUPA==" | |||||
>}} | |||||
{{< hackcss-helpblock >}} | |||||
Submit with {{ .Site.Data.npm.latest.version }} <a href="/feature/release-hashes">Release Hash</a> to validate. | |||||
<noscript>JavaScript required for proper validation.</noscript> | |||||
{{< /hackcss-helpblock >}} | |||||
{{< /hackcss-formgroup >}} | |||||
{{< /hackcss-form >}} | |||||
<small>Valid installations use the [Quick Install](/feature/quick-install) or [Upgrade Script](/feature/upgrade-script) and may be checked offline. See [Release Hashes](/feature/release-hashes) for a more thorough approach to validation.</small> | |||||
<script> | |||||
(function (window, document, undefined) { | |||||
"use strict"; | |||||
const digest = '{{ strings.TrimPrefix "sha512-" .Site.Data.npm.latest.dist.integrity }}'; | |||||
const confirm = form => { | |||||
form.digest.readOnly = true; | |||||
form.digest.value = digest; | |||||
form.integrity.classList.add('form-success'); | |||||
const message = "Hash verified. Valid installation detected." | |||||
form.querySelector('.help-block').innerHTML = message; | |||||
}; | |||||
const validate = (search, form) => { | |||||
search.includes(encodeURIComponent(digest)) ? confirm(form) : challenge(form); | |||||
}; | |||||
const challenge = form => { | |||||
form.digest.value = digest; | |||||
const check = () => { | |||||
const classes = form.integrity.classList; | |||||
if (form.checkValidity()) { | |||||
classes.add('form-success'); | |||||
classes.remove('form-warning'); | |||||
} else { | |||||
classes.add('form-warning'); | |||||
classes.remove('form-success'); | |||||
} | |||||
}; | |||||
form.oninput = check; | |||||
document.location.search && (() => { | |||||
form.integrity.classList.add('form-error'); | |||||
document.title = "Invalid Hash | {{ .Site.Title }}"; | |||||
const help = form.querySelector('.help-block'); | |||||
help.innerHTML = help.innerText = "Unexpected hash. Please try again."; | |||||
const alert = document.createElement('div'); | |||||
alert.classList.add('alert'); | |||||
alert.classList.add('alert-warning'); | |||||
alert.innerHTML = '<strong>WARNING:</strong> Your installation is invalid or has been tampered with. Please run the <a href="/feature/upgrade-script">Upgrade Script</a> to download the latest version.'; | |||||
document.querySelector('main').appendChild(alert); | |||||
})(); | |||||
}; | |||||
const initialize = () => { | |||||
const form = document.forms.validate; | |||||
(document.location.search.replace('?digest=','').length) | |||||
? validate(location.search, form) | |||||
: challenge(form); | |||||
}; | |||||
document.onreadystatechange = () => { | |||||
document.readyState === 'interactive' && initialize(); | |||||
}; | |||||
})(window, document); | |||||
</script> |
@ -1,187 +0,0 @@ | |||||
:root { | |||||
--vertical-rhythm: 5rem; | |||||
--logo-animation-filter-start: drop-shadow(0 -25px 45px #ff2e88) brightness(1) drop-shadow(0 -55px 35px #ff2e88) brightness(1) drop-shadow(0 -35px 155px #ff9800) brightness(4); | |||||
--logo-animation-filter-end: drop-shadow(0 -20px 45px #ff2e88) brightness(.1) drop-shadow(0 0 5px #ff2e88) brightness(.7) drop-shadow(0 -20px 135px #ff2e88) brightness(2); | |||||
} | |||||
main, footer, header, caption { | |||||
text-align: center; | |||||
} | |||||
nav[itemtype*="SiteNavigationElement"] { | |||||
opacity: 0; | |||||
transition: opacity 300ms ease; | |||||
} | |||||
nav[itemtype*="SiteNavigationElement"]:focus-within { | |||||
opacity: 1; | |||||
transition: opacity 300ms ease; | |||||
} | |||||
@media screen and (max-width: 768px) { | |||||
nav[itemtype*="SiteNavigationElement"] { | |||||
display: none; | |||||
} | |||||
.hack header h1 { | |||||
margin-top: 2rem !important; | |||||
} | |||||
.grid { | |||||
flex-direction: row; | |||||
} | |||||
.cell { | |||||
flex: 1; | |||||
} | |||||
} | |||||
.shaded { | |||||
filter: var(--logo-animation-filter-start); | |||||
opacity: 0; | |||||
} | |||||
.animated { | |||||
/* FIXME: Animation disabled due to browser conflict with Web Miner */ | |||||
animation: reveal 2s both; | |||||
opacity: 1; /* remove with fix */ | |||||
filter: var(--logo-animation-filter-end); /* remove with fix */ | |||||
} | |||||
@keyframes reveal { | |||||
from { | |||||
filter: var(--logo-animation-filter-start); | |||||
} | |||||
to { | |||||
filter: var(--logo-animation-filter-end); | |||||
opacity: 1; | |||||
} | |||||
} | |||||
.hack .grid { | |||||
justify-content: center; | |||||
} | |||||
.hack header h1:after { | |||||
content: none; | |||||
} | |||||
.hack header h1 { | |||||
font-family: Futura,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; | |||||
padding: 0; | |||||
margin: 1rem; | |||||
font-size: 3em; | |||||
display: inline-block; | |||||
background-color: #2a3439; | |||||
color: transparent; | |||||
text-shadow: 0 2px 3px rgba(255, 255, 255, 0.1); | |||||
-webkit-background-clip: text; | |||||
-moz-background-clip: text; | |||||
background-clip: text; | |||||
filter: brightness(3); | |||||
} | |||||
.hack header h1 sup { | |||||
font-size: 1rem; | |||||
} | |||||
.hack header h1 sup:before { | |||||
content: " "; | |||||
} | |||||
.hack header h2:before, | |||||
.hack section h2:before { | |||||
content: unset; | |||||
} | |||||
.hack header h2, | |||||
.hack section h2 { | |||||
margin-top: .8rem; | |||||
font-size: 1.2em; | |||||
} | |||||
.hack header h2 { | |||||
margin-top: -1rem; | |||||
} | |||||
.hack .install.cta { | |||||
margin-top: -1rem; | |||||
margin-bottom: 2rem; | |||||
} | |||||
.hack .install.cta form[action*="quick-install"] { | |||||
width: unset; | |||||
} | |||||
.hack .install.cta form[action*="quick-install"] button { | |||||
border-radius: 4px; | |||||
color: #ccc; | |||||
background-color: #ff2e8860; | |||||
transition: all 0.25s ease; | |||||
} | |||||
.hack .install.cta form[action*="quick-install"] button:hover, | |||||
.hack .install.cta form[action*="quick-install"] button:focus { | |||||
background-color: #ff2e8880; | |||||
color: #fff; | |||||
} | |||||
.hack .install.cta form[action*="quick-install"] button svg { | |||||
stroke: #ff9800; | |||||
} | |||||
.hack section:not(.capabilities) { | |||||
margin: var(--vertical-rhythm) 0; | |||||
} | |||||
.hack section.logo a { | |||||
border-bottom: none; | |||||
background-color: inherit; | |||||
} | |||||
.hack section.hero { | |||||
margin-top: -3rem; | |||||
margin-bottom: 0; | |||||
} | |||||
.hack section.hero img { | |||||
pointer-events: none; | |||||
} | |||||
.hack section.feature ul li { | |||||
display: inline; | |||||
padding-left: unset; | |||||
} | |||||
.hack section.feature ul > li::after { | |||||
position: unset; | |||||
content: ""; | |||||
} | |||||
.hack section.feature ul > li:not(:last-of-type)::after { | |||||
content: " | "; | |||||
} | |||||
.hack section.hero figure { | |||||
margin: 0; | |||||
line-height: 0; | |||||
min-height: 266px; | |||||
} | |||||
@media screen and (min-width: 768px) { | |||||
.hack section.hero figure img { | |||||
margin: -3em 0 -2em; | |||||
} | |||||
} | |||||
.hack section.tagline p { | |||||
margin: 0; | |||||
font-size: 1.1rem; | |||||
line-height: 1.6; | |||||
} | |||||
.hack section.capabilities table a { | |||||
display: block; | |||||
} | |||||
.hack footer section.cta { | |||||
margin-top: 6rem; | |||||
} | |||||
.hack footer section.cta a { | |||||
border-bottom: none; | |||||
background-color: inherit; | |||||
color: #ff9800; | |||||
display: inline-block; | |||||
} | |||||
.hack footer section.cta a:hover { | |||||
color: #fff; | |||||
} | |||||
.hack footer section.cta a small { | |||||
display: block; | |||||
} | |||||
.hack.dark table tbody td:first-child { | |||||
color: inherit; | |||||
font-weight: initial; | |||||
} | |||||
.hack.dark table tr th { | |||||
background-color: #1976d220; | |||||
} | |||||
.hack.dark table tr td a { | |||||
border: 1px solid #2196f340; | |||||
padding: 0.25rem; | |||||
} | |||||
.hack.dark table tr td a:hover { | |||||
transition: all 300ms ease; | |||||
background-color: #ff2e8860; | |||||
border-color: #2196f360; | |||||
} | |||||
.hack.dark table tr td a:not(:hover) { | |||||
transition: all 300ms ease; | |||||
background-color: #ff2e8825; | |||||
} |
@ -1,55 +0,0 @@ | |||||
/*! | |||||
* Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
* | |||||
* This file is part of After Dark. | |||||
* | |||||
* After Dark is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU Affero General Public License as published | |||||
* by the Free Software Foundation, either version 3 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* After Dark is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU Affero General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU Affero General Public License | |||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ | |||||
a[rel*="external"]::after { | |||||
content: " " url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20class='i-external'%20viewBox='0%200%2032%2032'%20width='14'%20height='14'%20fill='none'%20stroke='%23ff9800'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='9.38%'%3E%3Cpath%20d='M14%209%20L3%209%203%2029%2023%2029%2023%2018%20M18%204%20L28%204%2028%2014%20M28%204%20L14%2018'/%3E%3C/svg%3E"); | |||||
} | |||||
nav a.active { | |||||
background-color: inherit; | |||||
color: #fff; | |||||
} | |||||
a[itemprop="url"] { | |||||
color: #ff9800; | |||||
} | |||||
a[itemprop="url"]:hover { | |||||
color: #fff; | |||||
} | |||||
.muted, .help-block { | |||||
opacity: 0.70; | |||||
} | |||||
.hack .muted, | |||||
.hack .help-block { | |||||
color: #e0e0e0; | |||||
} | |||||
.hack > header { | |||||
display: grid; | |||||
grid-template-columns: 1fr minmax(min-content, auto); | |||||
column-gap: 20px; | |||||
grid-template-areas: "nav nav"; | |||||
} | |||||
.hack.dark table tr:nth-child(odd) td { | |||||
background-color: #1976d220; | |||||
} | |||||
.hack.dark table tr td a { | |||||
display: block; | |||||
} | |||||
caption { | |||||
margin-bottom: 20px; | |||||
text-align: left; | |||||
} |
@ -1,57 +0,0 @@ | |||||
/*! | |||||
* Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
* | |||||
* This file is part of After Dark. | |||||
* | |||||
* After Dark is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU Affero General Public License as published | |||||
* by the Free Software Foundation, either version 3 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* After Dark is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU Affero General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU Affero General Public License | |||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ | |||||
(function (window, document, undefined) { | |||||
'use strict'; | |||||
const form = document.forms.generator; | |||||
form.reset(); | |||||
const isOnlineHelp = document.URL.includes('localhost:1414'); | |||||
if (!isOnlineHelp) return; | |||||
form.querySelector('.js-useonlinehelp').style.display = 'none'; | |||||
if (window.navigator.onLine) { | |||||
form.querySelector('.js-disconnect').style.display = 'block'; | |||||
} | |||||
const activate = () => { | |||||
form.querySelector('.js-disconnect').style.display = 'block'; | |||||
form.generate.disabled = true; | |||||
form.address.disabled = true; | |||||
form.address.value = ''; | |||||
form.generate.classList.add('muted'); | |||||
}; | |||||
const deactivate = () => { | |||||
form.querySelector('.js-disconnect').style.display = 'none'; | |||||
form.generate.disabled = false; | |||||
form.address.disabled = false; | |||||
form.generate.classList.remove('muted'); | |||||
}; | |||||
window.addEventListener('online', activate); | |||||
window.addEventListener('offline', deactivate); | |||||
if (!window.navigator.onLine) deactivate(); | |||||
form.addEventListener('submit', evt => { | |||||
evt.preventDefault(); | |||||
const isLocal = document.location.host.includes('localhost'); | |||||
const hasSameOrigin = form.action.includes(document.location.origin); | |||||
if (isLocal && hasSameOrigin) { | |||||
evt.target.submit(); | |||||
} else { | |||||
form.querySelector('.js-usesameorigin').style.display = 'block'; | |||||
deactivate(); | |||||
} | |||||
}) | |||||
})(window, document); |
@ -1,51 +0,0 @@ | |||||
/*! | |||||
* Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com> | |||||
* | |||||
* This file is part of After Dark. | |||||
* | |||||
* After Dark is free software: you can redistribute it and/or modify | |||||
* it under the terms of the GNU Affero General Public License as published | |||||
* by the Free Software Foundation, either version 3 of the License, or | |||||
* (at your option) any later version. | |||||
* | |||||
* After Dark is distributed in the hope that it will be useful, | |||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
* GNU Affero General Public License for more details. | |||||
* | |||||
* You should have received a copy of the GNU Affero General Public License | |||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | |||||
*/ | |||||
(function (window, document, undefined) { | |||||
'use strict'; | |||||
const isOnlineHelp = document.URL.includes('localhost:1414'); | |||||
if (!isOnlineHelp) return; | |||||
if (!document.location.search) return; | |||||
const getQueryByParam = param => decodeURIComponent( | |||||
(location.search.split(param + '=')[1] || '').split('&')[0] | |||||
).replace(/\+/g, ' '); | |||||
const set = (from, to) => { | |||||
document.body.innerHTML = document.body.innerHTML.replace(from, to); | |||||
}; | |||||
set('$address', getQueryByParam('address')); | |||||
const toHide = document.querySelectorAll('.js-tohide'); | |||||
const toShow = document.querySelectorAll('.js-toshow'); | |||||
toHide.forEach(el => el.style.display = 'none'); | |||||
toShow.forEach(el => el.style.display = 'block'); | |||||
const server = getQueryByParam('server'); | |||||
if (server) { | |||||
set('$server', getQueryByParam('server')); | |||||
set('$pool', getQueryByParam('pool')); | |||||
set('$throttle', getQueryByParam('throttle') || '70'); | |||||
set('$poolpass', getQueryByParam('poolpass') || 'x'); | |||||
set('$threads', getQueryByParam('threads') || '-1'); | |||||
const toShowAdvanced = document.querySelectorAll('.js-showadvanced'); | |||||
const toHideAdvanced = document.querySelectorAll('.js-hideadvanced'); | |||||
toShowAdvanced.forEach(el => el.style.display = 'block'); | |||||
toHideAdvanced.forEach(el => el.style.display = 'none'); | |||||
} | |||||
window.history.replaceState( | |||||
{}, null, `${window.location.origin}${window.location.pathname}` | |||||
); | |||||
})(window, document); |
@ -1,21 +0,0 @@ | |||||
The MIT License (MIT) | |||||
Copyright (c) 2016 Dan Klammer | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy | |||||
of this software and associated documentation files (the "Software"), to deal | |||||
in the Software without restriction, including without limitation the rights | |||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||||
copies of the Software, and to permit persons to whom the Software is | |||||
furnished to do so, subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all | |||||
copies or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||||
SOFTWARE. |
@ -1,3 +0,0 @@ | |||||
<svg id="i-activity" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M4 16 L11 16 14 29 18 3 21 16 28 16" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-alert" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M16 3 L30 29 2 29 Z M16 11 L16 19 M16 23 L16 25" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-archive" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M4 10 L4 28 28 28 28 10 M2 4 L2 10 30 10 30 4 Z M12 15 L20 15" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-arrow-bottom" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M6 22 L16 30 26 22 M16 30 L16 2" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-arrow-left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M10 6 L2 16 10 26 M2 16 L30 16" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-arrow-right" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M22 6 L30 16 22 26 M30 16 L2 16" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-arrow-top" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M6 10 L16 2 26 10 M16 2 L16 30" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-backwards" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M16 2 L2 16 16 30 16 16 30 30 30 2 16 16 Z" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-bag" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M5 9 L5 29 27 29 27 9 Z M10 9 C10 9 10 3 16 3 22 3 22 9 22 9" /> | |||||
</svg> |
@ -1,4 +0,0 @@ | |||||
<svg id="i-ban" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<circle cx="16" cy="16" r="14" /> | |||||
<path d="M6 6 L26 26" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-bell" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M8 17 C8 12 9 6 16 6 23 6 24 12 24 17 24 22 27 25 27 25 L5 25 C5 25 8 22 8 17 Z M20 25 C20 25 20 29 16 29 12 29 12 25 12 25 M16 3 L16 6" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-book" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M16 7 C16 7 9 1 2 6 L2 28 C9 23 16 28 16 28 16 28 23 23 30 28 L30 6 C23 1 16 7 16 7 Z M16 7 L16 28" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-bookmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M6 2 L26 2 26 30 16 20 6 30 Z" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-calendar" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M2 6 L2 30 30 30 30 6 Z M2 15 L30 15 M7 3 L7 9 M13 3 L13 9 M19 3 L19 9 M25 3 L25 9" /> | |||||
</svg> |
@ -1,4 +0,0 @@ | |||||
<svg id="i-camera" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M2 8 L 9 8 12 4 20 4 23 8 30 8 30 26 2 26 Z" /> | |||||
<circle cx="16" cy="16" r="5" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-caret-bottom" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M30 10 L16 26 2 10 Z" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-caret-left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M22 30 L6 16 22 2 Z" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-caret-right" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M10 30 L26 16 10 2 Z" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-caret-top" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M30 22 L16 6 2 22 Z" /> | |||||
</svg> |
@ -1,5 +0,0 @@ | |||||
<svg id="i-cart" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M6 6 L30 6 27 19 9 19 M27 23 L10 23 5 2 2 2" /> | |||||
<circle cx="25" cy="27" r="2" /> | |||||
<circle cx="12" cy="27" r="2" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M2 20 L12 28 30 4" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-chevron-bottom" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M30 12 L16 24 2 12" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-chevron-left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M20 30 L8 16 20 2" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-chevron-right" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M12 30 L24 16 12 2" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-chevron-top" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M30 20 L16 8 2 20" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-clipboard" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M12 2 L12 6 20 6 20 2 12 2 Z M11 4 L6 4 6 30 26 30 26 4 21 4" /> | |||||
</svg> |
@ -1,4 +0,0 @@ | |||||
<svg id="i-clock" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<circle cx="16" cy="16" r="14" /> | |||||
<path d="M16 8 L16 16 20 20" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M2 30 L30 2 M30 30 L2 2" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-code" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M10 9 L3 17 10 25 M22 9 L29 17 22 25 M18 7 L14 27" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-compose" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M27 15 L27 30 2 30 2 5 17 5 M30 6 L26 2 9 19 7 25 13 23 Z M22 6 L26 10 Z M9 19 L13 23 Z" /> | |||||
</svg> |
@ -1,4 +0,0 @@ | |||||
<svg id="i-creditcard" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M2 7 L2 25 30 25 30 7 Z M5 18 L9 18 M5 21 L11 21" /> | |||||
<path d="M2 11 L2 13 30 13 30 11 Z" fill="currentColor" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-desktop" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M10 29 C10 29 10 24 16 24 22 24 22 29 22 29 L10 29 Z M2 6 L2 23 30 23 30 6 2 6 Z" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-download" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M9 22 C0 23 1 12 9 13 6 2 23 2 22 10 32 7 32 23 23 22 M11 26 L16 30 21 26 M16 16 L16 30" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-edit" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M30 7 L25 2 5 22 3 29 10 27 Z M21 6 L26 11 Z M5 22 L10 27 Z" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-eject" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M30 18 L16 5 2 18Z M2 25 L30 25" /> | |||||
</svg> |
@ -1,5 +0,0 @@ | |||||
<svg id="i-ellipsis-horizontal" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<circle cx="7" cy="16" r="2" /> | |||||
<circle cx="16" cy="16" r="2" /> | |||||
<circle cx="25" cy="16" r="2" /> | |||||
</svg> |
@ -1,5 +0,0 @@ | |||||
<svg id="i-ellipsis-vertical" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<circle cx="16" cy="7" r="2" /> | |||||
<circle cx="16" cy="16" r="2" /> | |||||
<circle cx="16" cy="25" r="2" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-end" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M24 2 L24 16 10 2 10 30 24 16 24 30" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-export" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M28 22 L28 30 4 30 4 22 M16 4 L16 24 M8 12 L16 4 24 12" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-external" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M14 9 L3 9 3 29 23 29 23 18 M18 4 L28 4 28 14 M28 4 L14 18" /> | |||||
</svg> |
@ -1,5 +0,0 @@ | |||||
<svg id="i-eye" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<circle cx="17" cy="15" r="1" /> | |||||
<circle cx="16" cy="16" r="6" /> | |||||
<path d="M2 16 C2 16 7 6 16 6 25 6 30 16 30 16 30 16 25 26 16 26 7 26 2 16 2 16 Z" /> | |||||
</svg> |
@ -1,4 +0,0 @@ | |||||
<svg id="i-feed" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<circle cx="6" cy="26" r="2" fill="currentColor" /> | |||||
<path d="M4 15 C11 15 17 21 17 28 M4 6 C17 6 26 15 26 28" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-file" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M6 2 L6 30 26 30 26 10 18 2 Z M18 2 L18 10 26 10" /> | |||||
</svg> |
@ -1,4 +0,0 @@ | |||||
<svg id="i-filter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M2 5 C2 5 6 3 16 3 26 3 30 5 30 5 L19 18 19 27 13 30 13 18 2 5Z" /> | |||||
</svg> | |||||
@ -1,3 +0,0 @@ | |||||
<svg id="i-flag" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M6 2 L6 30 M6 6 L26 6 20 12 26 18 6 18" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-folder-open" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M4 28 L28 28 30 12 14 12 10 8 2 8 Z M28 12 L28 4 4 4 4 8" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-folder" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M2 26 L30 26 30 7 14 7 10 4 2 4 Z M30 12 L2 12" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-forwards" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M16 2 L30 16 16 30 16 16 2 30 2 2 16 16 Z" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-fullscreen-exit" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M4 12 L12 12 12 4 M20 4 L20 12 28 12 M4 20 L12 20 12 28 M28 20 L20 20 20 28" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-fullscreen" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M4 12 L4 4 12 4 M20 4 L28 4 28 12 M4 20 L4 28 12 28 M28 20 L28 28 20 28" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-gift" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> | |||||
<path d="M4 14 L4 30 28 30 28 14 M2 9 L2 14 30 14 30 9 Z M16 9 C 16 9 14 0 8 3 2 6 16 9 16 9 16 9 18 0 24 3 30 6 16 9 16 9 M16 9 L16 30" /> | |||||
</svg> |
@ -1,3 +0,0 @@ | |||||
<svg id="i-github" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="32" height="32"> | |||||
<path stroke-width="0" fill="currentColor" d="M32 0 C14 0 0 14 0 32 0 53 19 62 22 62 24 62 24 61 24 60 L24 55 C17 57 14 53 13 50 13 50 13 49 11 47 10 46 6 44 10 44 13 44 15 48 15 48 18 52 22 51 24 50 24 48 26 46 26 46 18 45 12 42 12 31 12 27 13 24 15 22 15 22 13 18 15 13 15 13 20 13 24 17 27 15 37 15 40 17 44 13 49 13 49 13 51 20 49 22 49 22 51 24 52 27 52 31 52 42 45 45 38 46 39 47 40 49 40 52 L40 60 C40 61 40 62 42 62 45 62 64 53 64 32 64 14 50 0 32 0 Z" /> | |||||
</svg> |