Initial commit
This commit is contained in:
8 files changed
+1306
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
elm-stuff
|
||||||
|
assets/js/main.js
|
||||||
@@ -0,0 +1,661 @@
|
|||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU Affero General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works, specifically designed to ensure
|
||||||
|
cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
our General Public Licenses are intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
Developers that use our General Public Licenses protect your rights
|
||||||
|
with two steps: (1) assert copyright on the software, and (2) offer
|
||||||
|
you this License which gives you legal permission to copy, distribute
|
||||||
|
and/or modify the software.
|
||||||
|
|
||||||
|
A secondary benefit of defending all users' freedom is that
|
||||||
|
improvements made in alternate versions of the program, if they
|
||||||
|
receive widespread use, become available for other developers to
|
||||||
|
incorporate. Many developers of free software are heartened and
|
||||||
|
encouraged by the resulting cooperation. However, in the case of
|
||||||
|
software used on network servers, this result may fail to come about.
|
||||||
|
The GNU General Public License permits making a modified version and
|
||||||
|
letting the public access it on a server without ever releasing its
|
||||||
|
source code to the public.
|
||||||
|
|
||||||
|
The GNU Affero General Public License is designed specifically to
|
||||||
|
ensure that, in such cases, the modified source code becomes available
|
||||||
|
to the community. It requires the operator of a network server to
|
||||||
|
provide the source code of the modified version running there to the
|
||||||
|
users of that server. Therefore, public use of a modified version, on
|
||||||
|
a publicly accessible server, gives the public access to the source
|
||||||
|
code of the modified version.
|
||||||
|
|
||||||
|
An older license, called the Affero General Public License and
|
||||||
|
published by Affero, was designed to accomplish similar goals. This is
|
||||||
|
a different license, not a version of the Affero GPL, but Affero has
|
||||||
|
released a new version of the Affero GPL which permits relicensing under
|
||||||
|
this license.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the
|
||||||
|
Program, your modified version must prominently offer all users
|
||||||
|
interacting with it remotely through a computer network (if your version
|
||||||
|
supports such interaction) an opportunity to receive the Corresponding
|
||||||
|
Source of your version by providing access to the Corresponding Source
|
||||||
|
from a network server at no charge, through some standard or customary
|
||||||
|
means of facilitating copying of software. This Corresponding Source
|
||||||
|
shall include the Corresponding Source for any work covered by version 3
|
||||||
|
of the GNU General Public License that is incorporated pursuant to the
|
||||||
|
following paragraph.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the work with which it is combined will remain governed by version
|
||||||
|
3 of the GNU General Public License.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU Affero General Public License from time to time. Such new versions
|
||||||
|
will be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU Affero General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU Affero General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU Affero General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published
|
||||||
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
/*! UIkit 3.11.1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */html{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:16px;font-weight:400;line-height:1.5;-webkit-text-size-adjust:100%;background:#fff;color:#666}body{margin:0}.uk-link,a{color:#1e87f0;text-decoration:none;cursor:pointer}.uk-link-toggle:hover .uk-link,.uk-link:hover,a:hover{color:#0f6ecd;text-decoration:underline}abbr[title]{text-decoration:underline dotted;-webkit-text-decoration-style:dotted}b,strong{font-weight:bolder}:not(pre)>code,:not(pre)>kbd,:not(pre)>samp{font-family:Consolas,monaco,monospace;font-size:.875rem;color:#f0506e;white-space:nowrap;padding:2px 6px;background:#f8f8f8}em{color:#f0506e}ins{background:#ffd;color:#666;text-decoration:none}mark{background:#ffd;color:#666}q{font-style:italic}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}audio,canvas,iframe,img,svg,video{vertical-align:middle}canvas,img,video{max-width:100%;height:auto;box-sizing:border-box}@supports (display:block){svg{max-width:100%;height:auto;box-sizing:border-box}}svg:not(:root){overflow:hidden}img:not([src]){min-width:1px;visibility:hidden}iframe{border:0}address,dl,fieldset,figure,ol,p,pre,ul{margin:0 0 20px 0}*+address,*+dl,*+fieldset,*+figure,*+ol,*+p,*+pre,*+ul{margin-top:20px}.uk-h1,.uk-h2,.uk-h3,.uk-h4,.uk-h5,.uk-h6,.uk-heading-2xlarge,.uk-heading-large,.uk-heading-medium,.uk-heading-small,.uk-heading-xlarge,h1,h2,h3,h4,h5,h6{margin:0 0 20px 0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-weight:400;color:#333;text-transform:none}*+.uk-h1,*+.uk-h2,*+.uk-h3,*+.uk-h4,*+.uk-h5,*+.uk-h6,*+.uk-heading-2xlarge,*+.uk-heading-large,*+.uk-heading-medium,*+.uk-heading-small,*+.uk-heading-xlarge,*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:40px}.uk-h1,h1{font-size:2.23125rem;line-height:1.2}.uk-h2,h2{font-size:1.7rem;line-height:1.3}.uk-h3,h3{font-size:1.5rem;line-height:1.4}.uk-h4,h4{font-size:1.25rem;line-height:1.4}.uk-h5,h5{font-size:16px;line-height:1.4}.uk-h6,h6{font-size:.875rem;line-height:1.4}@media (min-width:960px){.uk-h1,h1{font-size:2.625rem}.uk-h2,h2{font-size:2rem}}ol,ul{padding-left:30px}ol>li>ol,ol>li>ul,ul>li>ol,ul>li>ul{margin:0}dt{font-weight:700}dd{margin-left:0}.uk-hr,hr{overflow:visible;text-align:inherit;margin:0 0 20px 0;border:0;border-top:1px solid #e5e5e5}*+.uk-hr,*+hr{margin-top:20px}address{font-style:normal}blockquote{margin:0 0 20px 0;font-size:1.25rem;line-height:1.5;font-style:italic;color:#333}*+blockquote{margin-top:20px}blockquote p:last-of-type{margin-bottom:0}blockquote footer{margin-top:10px;font-size:.875rem;line-height:1.5;color:#666}blockquote footer::before{content:"— "}pre{font:0.875rem/1.5 Consolas,monaco,monospace;color:#666;-moz-tab-size:4;tab-size:4;overflow:auto;padding:10px;border:1px solid #e5e5e5;border-radius:3px;background:#fff}pre code{font-family:Consolas,monaco,monospace}:focus{outline:0}:focus:not([tabindex^='-']){outline:2px dotted #333;outline-offset:1px}:focus:not(:focus-visible){outline:0}:focus-visible{outline:2px dotted #333}::selection{background:#39f;color:#fff;text-shadow:none}details,main{display:block}summary{display:list-item}template{display:none}.uk-breakpoint-s::before{content:'640px'}.uk-breakpoint-m::before{content:'960px'}.uk-breakpoint-l::before{content:'1200px'}.uk-breakpoint-xl::before{content:'1600px'}:root{--uk-breakpoint-s:640px;--uk-breakpoint-m:960px;--uk-breakpoint-l:1200px;--uk-breakpoint-xl:1600px}.uk-link-muted a,.uk-link-toggle .uk-link-muted,a.uk-link-muted{color:#999}.uk-link-muted a:hover,.uk-link-toggle:hover .uk-link-muted,a.uk-link-muted:hover{color:#666}.uk-link-text a,.uk-link-toggle .uk-link-text,a.uk-link-text{color:inherit}.uk-link-text a:hover,.uk-link-toggle:hover .uk-link-text,a.uk-link-text:hover{color:#999}.uk-link-heading a,.uk-link-toggle .uk-link-heading,a.uk-link-heading{color:inherit}.uk-link-heading a:hover,.uk-link-toggle:hover .uk-link-heading,a.uk-link-heading:hover{color:#1e87f0;text-decoration:none}.uk-link-reset a,a.uk-link-reset{color:inherit!important;text-decoration:none!important}.uk-link-toggle{color:inherit!important;text-decoration:none!important}.uk-heading-small{font-size:2.6rem;line-height:1.2}.uk-heading-medium{font-size:2.8875rem;line-height:1.1}.uk-heading-large{font-size:3.4rem;line-height:1.1}.uk-heading-xlarge{font-size:4rem;line-height:1}.uk-heading-2xlarge{font-size:6rem;line-height:1}@media (min-width:960px){.uk-heading-small{font-size:3.25rem}.uk-heading-medium{font-size:3.5rem}.uk-heading-large{font-size:4rem}.uk-heading-xlarge{font-size:6rem}.uk-heading-2xlarge{font-size:8rem}}@media (min-width:1200px){.uk-heading-medium{font-size:4rem}.uk-hLine truncated
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Title</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="css/uikit.min.css" />
|
||||||
|
<script src="js/uikit.min.js"></script>
|
||||||
|
<script src="js/uikit-icons.min.js"></script>
|
||||||
|
<script src="js/main.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
var app = Elm.Main.init();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
/*! UIkit 3.11.1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define("uikiticons",i):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitIcons=i())})(this,function(){"use strict";function t(i){t.installed||i.icon.add({"500px":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.624,11.866c-0.141,0.132,0.479,0.658,0.662,0.418c0.051-0.046,0.607-0.61,0.662-0.664c0,0,0.738,0.719,0.814,0.719 c0.1,0,0.207-0.055,0.322-0.17c0.27-0.269,0.135-0.416,0.066-0.495l-0.631-0.616l0.658-0.668c0.146-0.156,0.021-0.314-0.1-0.449 c-0.182-0.18-0.359-0.226-0.471-0.125l-0.656,0.654l-0.654-0.654c-0.033-0.034-0.08-0.045-0.124-0.045 c-0.079,0-0.191,0.068-0.307,0.181c-0.202,0.202-0.247,0.351-0.133,0.462l0.665,0.665L9.624,11.866z"/><path d="M11.066,2.884c-1.061,0-2.185,0.248-3.011,0.604c-0.087,0.034-0.141,0.106-0.15,0.205C7.893,3.784,7.919,3.909,7.982,4.066 c0.05,0.136,0.187,0.474,0.452,0.372c0.844-0.326,1.779-0.507,2.633-0.507c0.963,0,1.9,0.191,2.781,0.564 c0.695,0.292,1.357,0.719,2.078,1.34c0.051,0.044,0.105,0.068,0.164,0.068c0.143,0,0.273-0.137,0.389-0.271 c0.191-0.214,0.324-0.395,0.135-0.575c-0.686-0.654-1.436-1.138-2.363-1.533C13.24,3.097,12.168,2.884,11.066,2.884z"/><path d="M16.43,15.747c-0.092-0.028-0.242,0.05-0.309,0.119l0,0c-0.652,0.652-1.42,1.169-2.268,1.521 c-0.877,0.371-1.814,0.551-2.779,0.551c-0.961,0-1.896-0.189-2.775-0.564c-0.848-0.36-1.612-0.879-2.268-1.53 c-0.682-0.688-1.196-1.455-1.529-2.268c-0.325-0.799-0.471-1.643-0.471-1.643c-0.045-0.24-0.258-0.249-0.567-0.203 c-0.128,0.021-0.519,0.079-0.483,0.36v0.01c0.105,0.644,0.289,1.284,0.545,1.895c0.417,0.969,1.002,1.849,1.756,2.604 c0.757,0.754,1.636,1.34,2.604,1.757C8.901,18.785,9.97,19,11.088,19c1.104,0,2.186-0.215,3.188-0.645 c1.838-0.896,2.604-1.757,2.604-1.757c0.182-0.204,0.227-0.317-0.1-0.643C16.779,15.956,16.525,15.774,16.43,15.747z"/><path d="M5.633,13.287c0.293,0.71,0.723,1.341,1.262,1.882c0.54,0.54,1.172,0.971,1.882,1.264c0.731,0.303,1.509,0.461,2.298,0.461 c0.801,0,1.578-0.158,2.297-0.461c0.711-0.293,1.344-0.724,1.883-1.264c0.543-0.541,0.971-1.172,1.264-1.882 c0.314-0.721,0.463-1.5,0.463-2.298c0-0.79-0.148-1.569-0.463-2.289c-0.293-0.699-0.721-1.329-1.264-1.881 c-0.539-0.541-1.172-0.959-1.867-1.263c-0.721-0.303-1.5-0.461-2.299-0.461c-0.802,0-1.613,0.159-2.322,0.461 c-0.577,0.25-1.544,0.867-2.119,1.454v0.012V2.108h8.16C15.1,2.104,15.1,1.69,15.1,1.552C15.1,1.417,15.1,1,14.809,1H5.915 C5.676,1,5.527,1.192,5.527,1.384v6.84c0,0.214,0.273,0.372,0.529,0.428c0.5,0.105,0.614-0.056,0.737-0.224l0,0 c0.18-0.273,0.776-0.884,0.787-0.894c0.901-0.905,2.117-1.408,3.416-1.408c1.285,0,2.5,0.501,3.412,1.408 c0.914,0.914,1.408,2.122,1.408,3.405c0,1.288-0.508,2.496-1.408,3.405c-0.9,0.896-2.152,1.406-3.438,1.406 c-0.877,0-1.711-0.229-2.433-0.671v-4.158c0-0.553,0.237-1.151,0.643-1.614c0.462-0.519,1.094-0.799,1.782-0.799 c0.664,0,1.293,0.253,1.758,0.715c0.459,0.459,0.709,1.071,0.709,1.723c0,1.385-1.094,2.468-2.488,2.468 c-0.273,0-0.769-0.121-0.781-0.125c-0.281-0.087-0.405,0.306-0.438,0.436c-0.159,0.496,0.079,0.585,0.123,0.607 c0.452,0.137,0.743,0.157,1.129,0.157c1.973,0,3.572-1.6,3.572-3.57c0-1.964-1.6-3.552-3.572-3.552c-0.97,0-1.872,0.36-2.546,1.038 c-0.656,0.631-1.027,1.487-1.027,2.322v3.438v-0.011c-0.372-0.42-0.732-1.041-0.981-1.682c-0.102-0.248-0.315-0.202-0.607-0.113 c-0.135,0.035-0.519,0.157-0.44,0.439C5.372,12.799,5.577,13.164,5.633,13.287z"/></svg>',album:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect x="5" y="2" width="10" height="1"/><rect x="3" y="4" width="14" height="1"/><rect fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"/></svg>',"arrow-down":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polygon points="10.5,16.08 5.63,10.66 6.37,10 10.5,14.58 14.63,10 15.37,10.66"/><line fill="none" stroke="#000" x1="10.5" y1="4" x2="10.5" y2="15"/></svg>',"arrow-left":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" points="10 14 5 9.5 10 5"/><line fill="none" stroke="#000" x1="16" y1="9.5" x2="5" y2="9.52"/></svg>',"arrow-right":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" stroke="#000" points="10 5 15 9.5 10 14"/><line fill="none" stroke="#000" x1="4" y1="9.5" x2="15" y2="9.5"/></svg>',"arrow-up":'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polygon points="10.5,4 15.37,9.4 14.63,10.08 10.5,5.49 6.37,10.08 5.63,9.4"/><line fill="none" stroke="#000" x1="10.5" y1="16" x2="10.5" y2="5"/></svg>',bag:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#000" d="M7.5,7.5V4A2.48,2.48,0,0,1,10,1.5,2.54,2.54,0,0,1,12.5,4V7.5"/><polygon fill="none" stroke="#000" points="16.5 7.5 3.5 7.5 2.5 18.5Line truncated
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
/*! UIkit 3.11.1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(Kt,ge){typeof exports=="object"&&typeof module<"u"?module.exports=ge():typeof define=="function"&&define.amd?define("uikit",ge):(Kt=typeof globalThis<"u"?globalThis:Kt||self,Kt.UIkit=ge())})(this,function(){"use strict";var Kt=Object.prototype,ge=Kt.hasOwnProperty;function At(t,e){return ge.call(t,e)}var ns=/\B([A-Z])/g,zt=pt(function(t){return t.replace(ns,"-$1").toLowerCase()}),rs=/-(\w)/g,Xt=pt(function(t){return t.replace(rs,gn)}),pe=pt(function(t){return t.length?gn(null,t.charAt(0))+t.slice(1):""});function gn(t,e){return e?e.toUpperCase():""}var Ai=String.prototype,ss=Ai.startsWith||function(t){return this.lastIndexOf(t,0)===0};function vt(t,e){return ss.call(t,e)}var os=Ai.endsWith||function(t){return this.substr(-t.length)===t};function gt(t,e){return os.call(t,e)}var Pi=Array.prototype,pn=function(t,e){return!!~this.indexOf(t,e)},as=Ai.includes||pn,us=Pi.includes||pn;function b(t,e){return t&&(H(t)?as:us).call(t,e)}var hs=Pi.findIndex||function(t){for(var e=arguments,i=0;i<this.length;i++)if(t.call(e[1],this[i],i,this))return i;return-1};function Pt(t,e){return hs.call(t,e)}var ht=Array.isArray;function ct(t){return typeof t=="function"}function Tt(t){return t!==null&&typeof t=="object"}var cs=Kt.toString;function Nt(t){return cs.call(t)==="[object Object]"}function me(t){return Tt(t)&&t===t.window}function Jt(t){return Mi(t)===9}function Ni(t){return Mi(t)>=1}function Ot(t){return Mi(t)===1}function Mi(t){return!me(t)&&Tt(t)&&t.nodeType}function we(t){return typeof t=="boolean"}function H(t){return typeof t=="string"}function Zt(t){return typeof t=="number"}function Et(t){return Zt(t)||H(t)&&!isNaN(t-parseFloat(t))}function Qt(t){return!(ht(t)?t.length:Tt(t)?Object.keys(t).length:!1)}function Z(t){return t===void 0}function Di(t){return we(t)?t:t==="true"||t==="1"||t===""?!0:t==="false"||t==="0"?!1:t}function Mt(t){var e=Number(t);return isNaN(e)?!1:e}function x(t){return parseFloat(t)||0}var mn=Array.from||function(t){return Pi.slice.call(t)};function J(t){return T(t)[0]}function T(t){return t&&(Ni(t)?[t]:mn(t).filter(Ni))||[]}function Ft(t){return me(t)?t:(t=J(t),t?(Jt(t)?t:t.ownerDocument).defaultView:window)}function Hi(t){return t?gt(t,"ms")?x(t):x(t)*1e3:0}function qe(t,e){return t===e||Tt(t)&&Tt(e)&&Object.keys(t).length===Object.keys(e).length&&it(t,function(i,n){return i===e[n]})}function Bi(t,e,i){return t.replace(new RegExp(e+"|"+i,"g"),function(n){return n===e?i:e})}var k=Object.assign||function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];t=Object(t);for(var n=0;n<e.length;n++){var r=e[n];if(r!==null)for(var s in r)At(r,s)&&(t[s]=r[s])}return t};function be(t){return t[t.length-1]}function it(t,e){for(var i in t)if(e(t[i],i)===!1)return!1;return!0}function $e(t,e){return t.slice().sort(function(i,n){var r=i[e];r===void 0&&(r=0);var s=n[e];return s===void 0&&(s=0),r>s?1:s>r?-1:0})}function wn(t,e){var i=new Set;return t.filter(function(n){var r=n[e];return i.has(r)?!1:i.add(r)||!0})}function $t(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=1),Math.min(Math.max(Mt(t)||0,e),i)}function N(){}function bn(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return[["bottom","top"],["right","left"]].every(function(i){var n=i[0],r=i[1];return Math.min.apply(Math,t.map(function(s){var o=s[n];return o}))-Math.max.apply(Math,t.map(function(s){var o=s[r];return o}))>0})}function Ve(t,e){return t.x<=e.right&&t.x>=e.left&&t.y<=e.bottom&&t.y>=e.top}var Ut={ratio:function(t,e,i){var n,r=e==="width"?"height":"width";return n={},n[r]=t[e]?Math.round(i*t[r]/t[e]):t[r],n[e]=i,n},contain:function(t,e){var i=this;return t=k({},t),it(t,function(n,r){return t=t[r]>e[r]?i.ratio(t,r,e[r]):t}),t},cover:function(t,e){var i=this;return t=this.contain(t,e),it(t,function(n,r){return t=t[r]<e[r]?i.ratio(t,r,e[r]):t}),t}};function te(t,e,i,n){i===void 0&&(i=0),n===void 0&&(n=!1),e=T(e);var r=e.length;return r?(t=Et(t)?Mt(t):t==="next"?i+1:t==="previous"?i-1:e.indexOf(J(t)),n?$t(t,0,r-1):(t%=r,t<0?t+r:t)):-1}function pt(t){var e=Object.create(null);return function(i){return e[i]||(e[i]=t(i))}}function _(t,e,i){if(Tt(e)){for(var n in e)_(t,n,e[n]);return}if(Z(i))return t=J(t),t&&t.getAttribute(e);T(t).forEach(function(r){ct(i)&&(i=i.call(r,_(r,e))),i===null?zi(r,e):r.setAttribute(e,i)})}function ee(t,e){return T(t).some(function(i){return i.hasAttribute(e)})}function zi(t,e){t=T(t),e.split(" ").forEach(function(i){return t.forEach(function(n){return n.hasAttribute(i)&&n.removeAttribute(i)})})}function ft(t,e){for(var i=0,n=[e,"data-"+e];i<n.length;i++)if(ee(t,n[i]))return _(t,n[i])}var lt=typeof window<"u",xe=lt&&/msie|trident/i.test(window.navigator.userAgent),U=lt&&_(document.documentElement,"dir")==="rtl",ie=lt&&"ontouchstart"in window,ne=lt&&window.PointerEvent,$n=lt&&(ie||window.DocumentTouch&&document instanceof DocumentTouch||navigator.maxTouchPoints),dt=ne?"pointerdown":ie?"touchstart":"moLine truncated
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"type": "application",
|
||||||
|
"source-directories": [
|
||||||
|
"src"
|
||||||
|
],
|
||||||
|
"elm-version": "0.19.1",
|
||||||
|
"dependencies": {
|
||||||
|
"direct": {
|
||||||
|
"NoRedInk/elm-json-decode-pipeline": "1.0.1",
|
||||||
|
"elm/browser": "1.0.2",
|
||||||
|
"elm/core": "1.0.5",
|
||||||
|
"elm/html": "1.0.0",
|
||||||
|
"elm/http": "2.0.0",
|
||||||
|
"elm/json": "1.1.3",
|
||||||
|
"elm/url": "1.0.0",
|
||||||
|
"krisajenkins/remotedata": "6.0.1",
|
||||||
|
"ohanhi/remotedata-http": "4.0.0"
|
||||||
|
},
|
||||||
|
"indirect": {
|
||||||
|
"elm/bytes": "1.0.8",
|
||||||
|
"elm/file": "1.0.5",
|
||||||
|
"elm/time": "1.0.0",
|
||||||
|
"elm/virtual-dom": "1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test-dependencies": {
|
||||||
|
"direct": {},
|
||||||
|
"indirect": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
+593
@@ -0,0 +1,593 @@
|
|||||||
|
module Main exposing (..)
|
||||||
|
|
||||||
|
import Browser
|
||||||
|
import Html exposing (..)
|
||||||
|
import Html.Attributes exposing (..)
|
||||||
|
import Html.Events exposing (..)
|
||||||
|
import Http
|
||||||
|
import Json.Decode as Decode exposing (Decoder, float, int, maybe, string)
|
||||||
|
import Json.Decode.Pipeline as Pipeline
|
||||||
|
import Json.Encode as Encode
|
||||||
|
import RemoteData exposing (RemoteData(..), WebData)
|
||||||
|
import RemoteData.Http exposing (defaultConfig)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- MAIN
|
||||||
|
|
||||||
|
|
||||||
|
main : Program () Model Msg
|
||||||
|
main =
|
||||||
|
Browser.document
|
||||||
|
{ init = init
|
||||||
|
, update = update
|
||||||
|
, subscriptions = subscriptions
|
||||||
|
, view = \model -> { title = "ContextSwitch", body = [ view model ] }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- MODEL
|
||||||
|
|
||||||
|
|
||||||
|
type alias Model =
|
||||||
|
{ tasks : WebData TaskList
|
||||||
|
, tasksAdded : List (WebData Task)
|
||||||
|
, addTaskField : String
|
||||||
|
, selectedTask : Maybe Task
|
||||||
|
, editedTask : Maybe Task
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type alias TaskList =
|
||||||
|
List Task
|
||||||
|
|
||||||
|
|
||||||
|
type alias BookmarkContent =
|
||||||
|
{ title : String
|
||||||
|
, content : Maybe String
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type alias Bookmark =
|
||||||
|
{ uri : String
|
||||||
|
, content : Maybe BookmarkContent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type alias ContextswitchData =
|
||||||
|
{ bookmarks : List Bookmark }
|
||||||
|
|
||||||
|
|
||||||
|
type alias Task =
|
||||||
|
{ id : String
|
||||||
|
, description : String
|
||||||
|
, project : Maybe String
|
||||||
|
, urgency : Float
|
||||||
|
, tags : List String
|
||||||
|
, annotations : List String
|
||||||
|
, priority : Maybe String
|
||||||
|
, status : String
|
||||||
|
, due : Maybe String
|
||||||
|
, waitingUntil : Maybe String
|
||||||
|
, contextswitch : Maybe ContextswitchData
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
init : flags -> ( Model, Cmd Msg )
|
||||||
|
init _ =
|
||||||
|
getTasks
|
||||||
|
{ tasks = NotAsked
|
||||||
|
, tasksAdded = []
|
||||||
|
, addTaskField = ""
|
||||||
|
, selectedTask = Nothing
|
||||||
|
, editedTask = Nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- UPDATE
|
||||||
|
|
||||||
|
|
||||||
|
type Msg
|
||||||
|
= HandleTaskListResponse (WebData TaskList)
|
||||||
|
| GetTasks
|
||||||
|
| AddTask
|
||||||
|
| UpdateAddTaskField String
|
||||||
|
| HandleAddTaskResponse (WebData Task)
|
||||||
|
| ToggleDetails Task
|
||||||
|
| EditTask Task
|
||||||
|
| FinishTaskEdition
|
||||||
|
| UpdateEditedTask String
|
||||||
|
|
||||||
|
|
||||||
|
getTasks : Model -> ( Model, Cmd Msg )
|
||||||
|
getTasks model =
|
||||||
|
( { model | tasks = Loading }
|
||||||
|
, RemoteData.Http.getWithConfig jsonConfig "http://localhost:8000/tasks?filter=test" HandleTaskListResponse taskListDecoder
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
jsonConfig : RemoteData.Http.Config
|
||||||
|
jsonConfig =
|
||||||
|
{ defaultConfig | headers = [ Http.header "Content-Type" "application/json" ] }
|
||||||
|
|
||||||
|
|
||||||
|
addTask : String -> Cmd Msg
|
||||||
|
addTask taskDefinition =
|
||||||
|
RemoteData.Http.postWithConfig defaultConfig "http://localhost:8000/tasks" HandleAddTaskResponse taskDecoder (encodeTaskDefinition taskDefinition)
|
||||||
|
|
||||||
|
|
||||||
|
taskListDecoder : Decoder TaskList
|
||||||
|
taskListDecoder =
|
||||||
|
Decode.list taskDecoder
|
||||||
|
|
||||||
|
|
||||||
|
taskDecoder : Decoder Task
|
||||||
|
taskDecoder =
|
||||||
|
Decode.succeed Task
|
||||||
|
|> Pipeline.required "id" string
|
||||||
|
|> Pipeline.required "description" string
|
||||||
|
|> Pipeline.optional "project" (maybe string) Nothing
|
||||||
|
|> Pipeline.required "urgency" float
|
||||||
|
|> Pipeline.optional "tags" (Decode.list string) []
|
||||||
|
|> Pipeline.optional "annotations" (Decode.list string) []
|
||||||
|
|> Pipeline.optional "priority" (maybe string) Nothing
|
||||||
|
|> Pipeline.required "status" string
|
||||||
|
|> Pipeline.optional "due" (maybe string) Nothing
|
||||||
|
|> Pipeline.optional "waitingUntil" (maybe string) Nothing
|
||||||
|
|> Pipeline.optional "contextswitch" (maybe contextswitchDataDecoder) Nothing
|
||||||
|
|
||||||
|
|
||||||
|
contextswitchDataDecoder : Decoder ContextswitchData
|
||||||
|
contextswitchDataDecoder =
|
||||||
|
Decode.succeed ContextswitchData
|
||||||
|
|> Pipeline.required "bookmarks" (Decode.list bookmarkDecoder)
|
||||||
|
|
||||||
|
|
||||||
|
bookmarkDecoder : Decoder Bookmark
|
||||||
|
bookmarkDecoder =
|
||||||
|
Decode.succeed Bookmark
|
||||||
|
|> Pipeline.required "uri" string
|
||||||
|
|> Pipeline.optional "content" (maybe bookmarkContentDecoder) Nothing
|
||||||
|
|
||||||
|
|
||||||
|
bookmarkContentDecoder : Decoder BookmarkContent
|
||||||
|
bookmarkContentDecoder =
|
||||||
|
Decode.succeed BookmarkContent
|
||||||
|
|> Pipeline.required "title" string
|
||||||
|
|> Pipeline.optional "content" (maybe string) Nothing
|
||||||
|
|
||||||
|
|
||||||
|
encodeTaskDefinition : String -> Encode.Value
|
||||||
|
encodeTaskDefinition taskDefinition =
|
||||||
|
Encode.object
|
||||||
|
[ ( "definition", Encode.string taskDefinition ) ]
|
||||||
|
|
||||||
|
|
||||||
|
update : Msg -> Model -> ( Model, Cmd Msg )
|
||||||
|
update msg model =
|
||||||
|
case msg of
|
||||||
|
HandleTaskListResponse taskList ->
|
||||||
|
let
|
||||||
|
selectedTask =
|
||||||
|
case taskList of
|
||||||
|
Success tasks ->
|
||||||
|
List.head tasks
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
Nothing
|
||||||
|
in
|
||||||
|
( { model
|
||||||
|
| tasks = taskList
|
||||||
|
, tasksAdded = []
|
||||||
|
, selectedTask = selectedTask
|
||||||
|
}
|
||||||
|
, Cmd.none
|
||||||
|
)
|
||||||
|
|
||||||
|
GetTasks ->
|
||||||
|
getTasks model
|
||||||
|
|
||||||
|
AddTask ->
|
||||||
|
( { model | addTaskField = "" }, addTask model.addTaskField )
|
||||||
|
|
||||||
|
UpdateAddTaskField value ->
|
||||||
|
( { model | addTaskField = value }, Cmd.none )
|
||||||
|
|
||||||
|
HandleAddTaskResponse task ->
|
||||||
|
( { model | tasksAdded = model.tasksAdded ++ [ task ] }, Cmd.none )
|
||||||
|
|
||||||
|
ToggleDetails task ->
|
||||||
|
case model.selectedTask of
|
||||||
|
Just selectedTask ->
|
||||||
|
( { model
|
||||||
|
| selectedTask =
|
||||||
|
if task == selectedTask then
|
||||||
|
Nothing
|
||||||
|
|
||||||
|
else
|
||||||
|
Just task
|
||||||
|
}
|
||||||
|
, Cmd.none
|
||||||
|
)
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
( { model | selectedTask = Just task }, Cmd.none )
|
||||||
|
|
||||||
|
EditTask task ->
|
||||||
|
case model.editedTask of
|
||||||
|
Just editedTask ->
|
||||||
|
( { model
|
||||||
|
| editedTask =
|
||||||
|
if task == editedTask then
|
||||||
|
Nothing
|
||||||
|
|
||||||
|
else
|
||||||
|
Just task
|
||||||
|
}
|
||||||
|
, Cmd.none
|
||||||
|
)
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
( { model
|
||||||
|
| editedTask = Just task
|
||||||
|
, selectedTask = Just task
|
||||||
|
}
|
||||||
|
, Cmd.none
|
||||||
|
)
|
||||||
|
|
||||||
|
FinishTaskEdition ->
|
||||||
|
( { model | editedTask = Nothing }, Cmd.none )
|
||||||
|
|
||||||
|
UpdateEditedTask value ->
|
||||||
|
case model.editedTask of
|
||||||
|
Just editedTask ->
|
||||||
|
case model.tasks of
|
||||||
|
Success tasks ->
|
||||||
|
let
|
||||||
|
newTask =
|
||||||
|
{ editedTask | description = value }
|
||||||
|
|
||||||
|
newTasks =
|
||||||
|
List.map
|
||||||
|
(\t ->
|
||||||
|
if t.id == newTask.id then
|
||||||
|
newTask
|
||||||
|
|
||||||
|
else
|
||||||
|
t
|
||||||
|
)
|
||||||
|
tasks
|
||||||
|
in
|
||||||
|
( { model
|
||||||
|
| editedTask = Just newTask
|
||||||
|
, selectedTask = Just newTask
|
||||||
|
, tasks = Success newTasks
|
||||||
|
}
|
||||||
|
, Cmd.none
|
||||||
|
)
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
( model, Cmd.none )
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
( model, Cmd.none )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- SUBSCRIPTIONS
|
||||||
|
|
||||||
|
|
||||||
|
subscriptions : Model -> Sub Msg
|
||||||
|
subscriptions _ =
|
||||||
|
Sub.none
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- VIEW
|
||||||
|
|
||||||
|
|
||||||
|
view : Model -> Html Msg
|
||||||
|
view model =
|
||||||
|
div [ class "uk-section uk-section-default" ]
|
||||||
|
[ div [ class "uk-container uk-container-small" ]
|
||||||
|
[ div [ attribute "uk-filter" "target: .status-filter" ]
|
||||||
|
[ div []
|
||||||
|
[ ul [ class "uk-subnav uk-subnav-pill uk-width-expand" ]
|
||||||
|
[ li [ attribute "uk-filter-control" "" ]
|
||||||
|
[ a [ href "#" ] [ text "all" ] ]
|
||||||
|
, li [ class "uk-active", attribute "uk-filter-control" ".task-status-pending" ]
|
||||||
|
[ a [ href "#" ] [ text "pending" ] ]
|
||||||
|
, li [ attribute "uk-filter-control" ".task-status-completed" ]
|
||||||
|
[ a [ href "#" ] [ text "completed" ] ]
|
||||||
|
, li [ class "uk-width-expand" ] []
|
||||||
|
, li []
|
||||||
|
[ a [ href "#add-task-modal", class "uk-margin-remove", attribute "uk-icon" "icon: plus", attribute "uk-toggle" "" ] []
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, div [ id "add-task-modal", class "uk-flex-top", attribute "uk-modal" "" ]
|
||||||
|
[ div [ class "uk-modal-dialog uk-margin-auto-vertical" ]
|
||||||
|
[ input
|
||||||
|
[ name "add-task"
|
||||||
|
, class "uk-input"
|
||||||
|
, autofocus True
|
||||||
|
, placeholder "+work finish report"
|
||||||
|
, onEnter AddTask
|
||||||
|
, onInput UpdateAddTaskField
|
||||||
|
, value model.addTaskField
|
||||||
|
]
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, div [ class "status-filter uk-margin uk-grid-small uk-grid-match", attribute "uk-grid" "" ]
|
||||||
|
(viewRemoteTaskList model.selectedTask model.editedTask model.tasks
|
||||||
|
++ viewTasksAdded model.selectedTask model.editedTask model.tasksAdded
|
||||||
|
)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- View tasks list
|
||||||
|
|
||||||
|
|
||||||
|
viewRemoteTaskList : Maybe Task -> Maybe Task -> WebData TaskList -> List (Html Msg)
|
||||||
|
viewRemoteTaskList selectedTask editedTask taskList =
|
||||||
|
case taskList of
|
||||||
|
Loading ->
|
||||||
|
[ div [ attribute "uk-spinner" "" ] [] ]
|
||||||
|
|
||||||
|
Success tasks ->
|
||||||
|
List.map (viewTask selectedTask editedTask) tasks
|
||||||
|
|
||||||
|
Failure error ->
|
||||||
|
[ text ("task loading failed with error: " ++ getErrorMsg error) ]
|
||||||
|
|
||||||
|
NotAsked ->
|
||||||
|
[]
|
||||||
|
|
||||||
|
|
||||||
|
viewTasksAdded : Maybe Task -> Maybe Task -> List (WebData Task) -> List (Html Msg)
|
||||||
|
viewTasksAdded selectedTask editedTask tasksAdded =
|
||||||
|
List.map (viewRemoteTask selectedTask editedTask) tasksAdded
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- View single task
|
||||||
|
|
||||||
|
|
||||||
|
viewRemoteTask : Maybe Task -> Maybe Task -> WebData Task -> Html Msg
|
||||||
|
viewRemoteTask selectedTask editedTask taskModel =
|
||||||
|
case taskModel of
|
||||||
|
Loading ->
|
||||||
|
div [ attribute "uk-spinner" "" ] []
|
||||||
|
|
||||||
|
Success task ->
|
||||||
|
viewTask selectedTask editedTask task
|
||||||
|
|
||||||
|
Failure error ->
|
||||||
|
text ("Oh no, new task loading failed with error: " ++ getErrorMsg error)
|
||||||
|
|
||||||
|
NotAsked ->
|
||||||
|
div [] []
|
||||||
|
|
||||||
|
|
||||||
|
viewTask : Maybe Task -> Maybe Task -> Task -> Html Msg
|
||||||
|
viewTask maybeSelectedTask maybeEditedTask task =
|
||||||
|
let
|
||||||
|
textClass =
|
||||||
|
if task.status == "completed" then
|
||||||
|
"uk-text-success"
|
||||||
|
|
||||||
|
else
|
||||||
|
"uk-text-emphasis"
|
||||||
|
|
||||||
|
arrow =
|
||||||
|
case maybeSelectedTask of
|
||||||
|
Just selectedTask ->
|
||||||
|
if selectedTask == task then
|
||||||
|
"triangle-down"
|
||||||
|
|
||||||
|
else
|
||||||
|
"triangle-right"
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
"triangle-left"
|
||||||
|
in
|
||||||
|
div [ class ("uk-width-1-1 task-status-" ++ task.status) ]
|
||||||
|
[ div [ class "uk-card uk-card-default uk-card-hover uk-card-small" ]
|
||||||
|
[ div
|
||||||
|
[ class "uk-card-body uk-padding-remove-vertical uk-margin-small-top uk-margin-small-bottom"
|
||||||
|
]
|
||||||
|
[ div [ class "uk-grid-small uk-flex-middle", attribute "uk-grid" "" ]
|
||||||
|
[ span [ class textClass, attribute "uk-icon" "icon: check" ] []
|
||||||
|
, viewTaskDescription maybeEditedTask task
|
||||||
|
, ul [ class "uk-iconnav" ]
|
||||||
|
[ li []
|
||||||
|
[ a [ href "#", attribute "uk-icon" "icon: file-edit", onClick (EditTask task) ] []
|
||||||
|
]
|
||||||
|
, li []
|
||||||
|
[ a [ href "#", onClick (ToggleDetails task) ]
|
||||||
|
[ span [ attribute "uk-icon" "icon: bookmark" ] []
|
||||||
|
, viewBookmarkCount task.contextswitch
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, span [ attribute "uk-icon" ("icon: " ++ arrow), onClick (ToggleDetails task) ] []
|
||||||
|
]
|
||||||
|
, viewTaskDetailsIfSelected maybeSelectedTask task
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
viewTaskDescription : Maybe Task -> Task -> Html Msg
|
||||||
|
viewTaskDescription maybeEditedTask task =
|
||||||
|
let
|
||||||
|
description =
|
||||||
|
div [ class "uk-width-expand", onClick (ToggleDetails task) ]
|
||||||
|
[ h3 [ class "uk-card-title" ]
|
||||||
|
[ span [ class " uk-text-lighter" ]
|
||||||
|
[ text task.description ]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
in
|
||||||
|
case maybeEditedTask of
|
||||||
|
Just editedTask ->
|
||||||
|
if editedTask == task then
|
||||||
|
div [ class "uk-width-expand" ]
|
||||||
|
[ div [ class "uk-inline" ]
|
||||||
|
[ span [ class "uk-form-icon uk-form-icon-flip", attribute "uk-icon" "icon: check" ] []
|
||||||
|
, input
|
||||||
|
[ name "edit-task"
|
||||||
|
, class "uk-input"
|
||||||
|
, autofocus True
|
||||||
|
, onEnter FinishTaskEdition
|
||||||
|
, onInput UpdateEditedTask
|
||||||
|
, value task.description
|
||||||
|
]
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
else
|
||||||
|
description
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
description
|
||||||
|
|
||||||
|
|
||||||
|
viewTaskDetailsIfSelected : Maybe Task -> Task -> Html Msg
|
||||||
|
viewTaskDetailsIfSelected maybeSelectedTask task =
|
||||||
|
case maybeSelectedTask of
|
||||||
|
Just selectedTask ->
|
||||||
|
if selectedTask == task then
|
||||||
|
viewTaskDetails task
|
||||||
|
|
||||||
|
else
|
||||||
|
div [] []
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
div [] []
|
||||||
|
|
||||||
|
|
||||||
|
viewTaskDetails : Task -> Html Msg
|
||||||
|
viewTaskDetails task =
|
||||||
|
div [ class "uk-margin uk-margin-small" ]
|
||||||
|
[ hr [ class "uk-margin-small" ] []
|
||||||
|
, case task.contextswitch of
|
||||||
|
Just contextswitch ->
|
||||||
|
viewContextswitchData contextswitch
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
div [] []
|
||||||
|
, viewTaskData task
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
viewContextswitchData : ContextswitchData -> Html Msg
|
||||||
|
viewContextswitchData contextswitch =
|
||||||
|
div [ class "uk-grid-small uk-grid-match", attribute "uk-grid" "" ]
|
||||||
|
(List.map viewBookmark contextswitch.bookmarks
|
||||||
|
++ [ span [ class "uk-margin-remove", attribute "uk-icon" "icon: plus" ] [] ]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
viewBookmark : Bookmark -> Html Msg
|
||||||
|
viewBookmark bookmark =
|
||||||
|
div [ class "uk-width-1-1 uk-text-small uk-margin-remove" ]
|
||||||
|
[ div [ class "uk-grid-small uk-flex-middle", attribute "uk-grid" "" ]
|
||||||
|
[ span [ attribute "uk-icon" "icon: bookmark" ] []
|
||||||
|
, a [ href bookmark.uri ]
|
||||||
|
[ text bookmark.uri ]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
viewBookmarkCount : Maybe ContextswitchData -> Html Msg
|
||||||
|
viewBookmarkCount maybeContextswitch =
|
||||||
|
let
|
||||||
|
countString =
|
||||||
|
case maybeContextswitch of
|
||||||
|
Just contextswitch ->
|
||||||
|
" (" ++ String.fromInt (List.length contextswitch.bookmarks) ++ ")"
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
" (0)"
|
||||||
|
in
|
||||||
|
span []
|
||||||
|
[ text countString ]
|
||||||
|
|
||||||
|
|
||||||
|
viewTaskData : Task -> Html Msg
|
||||||
|
viewTaskData task =
|
||||||
|
div [ class "uk-grid-small uk-child-width-expand", attribute "uk-grid" "" ]
|
||||||
|
[ maybeViewText "priority: " task.priority
|
||||||
|
, maybeViewText "project: " task.project
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
viewTaskTag : String -> Html Msg
|
||||||
|
viewTaskTag tag =
|
||||||
|
span [ class "uk-label" ] [ text tag ]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- View utils
|
||||||
|
|
||||||
|
|
||||||
|
maybeViewText : String -> Maybe String -> Html Msg
|
||||||
|
maybeViewText prefix maybeText =
|
||||||
|
div []
|
||||||
|
[ span [ class "uk-text-meta" ]
|
||||||
|
[ text (prefix ++ Maybe.withDefault "-" maybeText) ]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
onEnter : Msg -> Attribute Msg
|
||||||
|
onEnter msg =
|
||||||
|
let
|
||||||
|
isEnter code =
|
||||||
|
if code == 13 then
|
||||||
|
Decode.succeed msg
|
||||||
|
|
||||||
|
else
|
||||||
|
Decode.fail "noop"
|
||||||
|
in
|
||||||
|
on "keydown" (Decode.andThen isEnter keyCode)
|
||||||
|
|
||||||
|
|
||||||
|
getErrorMsg : Http.Error -> String
|
||||||
|
getErrorMsg error =
|
||||||
|
case error of
|
||||||
|
Http.BadUrl url ->
|
||||||
|
"The url requested (" ++ url ++ ") was not valid"
|
||||||
|
|
||||||
|
Http.Timeout ->
|
||||||
|
"The requested timed out"
|
||||||
|
|
||||||
|
Http.NetworkError ->
|
||||||
|
"Cannot connect to remote API"
|
||||||
|
|
||||||
|
Http.BadStatus status ->
|
||||||
|
case status of
|
||||||
|
400 ->
|
||||||
|
"The request was malformed and the server couldn't process it"
|
||||||
|
|
||||||
|
403 ->
|
||||||
|
"You are not authorized to access this resource"
|
||||||
|
|
||||||
|
404 ->
|
||||||
|
"The requested resource could not be found"
|
||||||
|
|
||||||
|
500 ->
|
||||||
|
"Something went wrong on the server"
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
"The request failed with status: " ++ String.fromInt status
|
||||||
|
|
||||||
|
Http.BadBody errorStr ->
|
||||||
|
"Parsing the response body failed: " ++ errorStr
|
||||||
Reference in new issue
Block a user