first commit
17
AUTHORS
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
MinigalNano is licensed under the AGPL v3 (https://gnu.org/licenses/agpl-3.0.txt)
|
||||||
|
You can check github's contributors list : https://github.com/sebsauvage/MinigalNano/graphs/contributors
|
||||||
|
|
||||||
|
Copyright (c) Thomas Rybak <http://www.minigal.dk/minigal-nano.html> (2014)
|
||||||
|
Copyright (c) Sébastien Sauvage <http://sebsauvage.net/> (2014)
|
||||||
|
Copyright (c) Aldarone <http://aldarone.fr/> (2014)
|
||||||
|
Copyright (c) Sylvhem <http://lepubdelobservateur.fr/> (2014)
|
||||||
|
Copyright (c) Tom Canac <http://tomcanac.com/> (2014, 2015, 2016)
|
||||||
|
Copyright (c) Alda Marteau-Hardi <alda@leetchee.fr> (2014)
|
||||||
|
Copyright (c) bitbybit <crigon+github@crigon.name> (2014)
|
||||||
|
Copyright (c) cyberic99 <cyberic99@users.noreply.github.com> (2014)
|
||||||
|
Copyright (c) iGormilhit <igormilhit@mailoo.org> (2014)
|
||||||
|
Copyright (c) Jan Niggemann <jn@hz6.de> (2014, 2015)
|
||||||
|
Copyright (c) Lucas Cimon <lucas.cimon@gmail.com> (2014)
|
||||||
|
Copyright (c) nodiscc <nodiscc@gmail.com> (2014, 2015)
|
||||||
|
Copyright (c) Orangina Rouge <eric.watson-doqguhmm@yopmail.com> (2014)
|
||||||
|
Copyright (c) Nitrux Project <http://store.nitrux.in/> (2014)
|
36
Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
FROM ubuntu/apache2
|
||||||
|
|
||||||
|
MAINTAINER Knah Tsaeb <knah-tsaeb_nanogal@knah-tsaeb.org>
|
||||||
|
|
||||||
|
LABEL version="0.1.0"
|
||||||
|
LABEL description="Apache 2 / PHP / NanoGal"
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get -y update && apt-get install -y php php-gd php-mbstring wget gnupg git composer && apt-get clean && apt-get autoclean && apt-get autoremove
|
||||||
|
|
||||||
|
RUN rm -r /var/www/ && mkdir /var/www/
|
||||||
|
|
||||||
|
WORKDIR /var/www/
|
||||||
|
RUN git clone https://forge.leslibres.org/Knah-Tsaeb/NanoGal.git --branch main --single-branch --depth 1 .
|
||||||
|
RUN composer install --no-dev && chown -R www-data:www-data /var/www/
|
||||||
|
|
||||||
|
RUN cp .docker/start.sh /usr/bin/start.sh
|
||||||
|
RUN chmod +x /usr/bin/start.sh
|
||||||
|
|
||||||
|
RUN cp .docker/apache2/nanogal.conf /etc/apache2/sites-available/nanogal.conf
|
||||||
|
RUN a2dissite 000-default.conf && a2ensite nanogal.conf && a2enmod rewrite
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
VOLUME nanogal_datas
|
||||||
|
VOLUME nanogal_photos
|
||||||
|
|
||||||
|
WORKDIR /var/www/
|
||||||
|
|
||||||
|
ENTRYPOINT "start.sh"
|
||||||
|
|
||||||
|
# Build image
|
||||||
|
# docker build -t nanogal:0.1.0 .
|
||||||
|
# Run container
|
||||||
|
# docker run -v nanogal_datas:/var/www/datas:ro -v nanogal_photos:/var/www/public/photos:ro -e TZ=UTC -p 8187:80 --name nanogal nanogal:0.1.0
|
||||||
|
# docker run -v /opt/nanogal/datas:/var/www/datas:ro -v /opt/nanogal/photos:/var/www/public/photos:ro -e TZ=UTC -p 8187:80 --name nanogal nanogal:0.1.0
|
662
LICENSE
Normal file
|
@ -0,0 +1,662 @@
|
||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU 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 <http://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
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
177
README.md
Normal file
|
@ -0,0 +1,177 @@
|
||||||
|
# NanoGal
|
||||||
|
|
||||||
|
## Presentation
|
||||||
|
|
||||||
|
NanoGal is fork of [MinigalNano](https://github.com/sebsauvage/MinigalNano) and MinigalNano is based on [Thomas Rybak's](http://www.minigal.dk/minigal-nano.html).
|
||||||
|
|
||||||
|
Why fork ? Because I love understand and adapte application for my usage.
|
||||||
|
|
||||||
|
NanoGal is a very simple image gallery. It adheres to the KISS principle and is very easy to install. NanoGal does not have a web admin interface: You just upload your images in the photo folder on your server (using FTP, SFTP...). It only requires php and GD (no database, no special libraries like PEAR or ImageMagick).
|
||||||
|
|
||||||
|
NanoGal uses a javascript [gLightBox](https://github.com/biati-digital/glightbox), but it degrades gracefully if javascript is disabled.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Very simple media gallery
|
||||||
|
- Use cache for increase speed
|
||||||
|
- Thumb are gen and cache (WEBP)
|
||||||
|
- Can read Exif
|
||||||
|
- Use the organization of your file hierarchy
|
||||||
|
- You can add text for gallery (dir) or/and for file (use Markdown format)
|
||||||
|
- Support for PNG, GIF, JPEG, WEBP, BMP image formats
|
||||||
|
- Support for OGV, MP4, WEBM video
|
||||||
|
- Javascript lightbox, degrades gracefull if JavaScript is disabled
|
||||||
|
- Can be customize with CSS (over charge actual theme) or create your theme
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
For the moment I don't provide any image in any hub.
|
||||||
|
|
||||||
|
#### Build image
|
||||||
|
|
||||||
|
Image use
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget https://forge.leslibres.org/Knah-Tsaeb/NanoGal/src/branch/main/Dockerfile
|
||||||
|
docker buildx build -t nanogal:0.1.0 .
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Start container
|
||||||
|
|
||||||
|
You can use native docker volume.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run -v nanogal_datas:/var/www/datas:ro -v nanogal_photos:/var/www/public/photos:ro -e TZ=UTC -p 8187:80 --name nanogal nanogal:0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Or use absolute path
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run -v /opt/nanogal/datas:/var/www/datas:ro -v /opt/nanogal/photos:/var/www/public/photos:ro -e TZ=UTC -p 8187:80 --name nanogal nanogal:0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Classic way
|
||||||
|
|
||||||
|
- Requires `php` (8 or higher) and two extension `php-gd` and `php-mbstring`.
|
||||||
|
- Place all the files in a directory on your server.
|
||||||
|
- Configure your web server to serve `public/` directory.
|
||||||
|
- Upload your photos to the `photos/` subdirectory.
|
||||||
|
- That's all.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### WARNING
|
||||||
|
|
||||||
|
When you upload your file, some data are share, particularly [Exif data](https://en.wikipedia.org/wiki/Exif). Exif data can expose the GPS coordinates of where the photos/videos were taken. This may not be what you want.
|
||||||
|
|
||||||
|
If you want, you can delete this data. Under GNU/Linux you can install `exiftool`. In the `bin` directory you have bash script (`remove_gps_datas.sh`) for remove this data in all file present in your gallery. USE AT OUR RISK.
|
||||||
|
|
||||||
|
### Adding your photos
|
||||||
|
|
||||||
|
- Simply add your photos to the `photos` directory via FTP or SFTP.
|
||||||
|
- You can create as many subdirectories as you want.
|
||||||
|
|
||||||
|
### Adding a comment to a gallery
|
||||||
|
|
||||||
|
- Create `note.md`.
|
||||||
|
- Write content in Markdown.
|
||||||
|
- Upload in the gallery's folder.
|
||||||
|
|
||||||
|
### Adding a comment to an image
|
||||||
|
|
||||||
|
- Create an md file. Filename must be the image filename plus `.md`. (eg. `myimage.jpg` → `myimage.jpg.md`)
|
||||||
|
- Write content in Markdown.
|
||||||
|
- Upload in the gallery's folder.
|
||||||
|
|
||||||
|
### Using a custom image for folders
|
||||||
|
|
||||||
|
- Create `folder.jpg` inside a folder: This image will be used as default image for folder.
|
||||||
|
|
||||||
|
### Thumbnails
|
||||||
|
You do not have to care about thumbnails: They are automatically created in the `cache/thumbs` directory.
|
||||||
|
If some thumbnails are wrong, you can purge this directory: Thumbnails will be automatically re-created.
|
||||||
|
|
||||||
|
## Options
|
||||||
|
|
||||||
|
- Create `datas/config.php`.
|
||||||
|
- Paste this code.
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
$userConfig = [
|
||||||
|
'templateFile' => 'board', // Template filename (must be placed in 'public/templates' folder)
|
||||||
|
'title' => 'NanoGal', // Text to be displayed in browser titlebar
|
||||||
|
'description' => 'My gallery', // Use in meta tag "description"
|
||||||
|
'author' => 'NanoGal', // Your name
|
||||||
|
'skipObjects' => ['comment.html', '.gitkeep', 'aFolder', 'aFile.ext'], //Those files and folders will not be displayed
|
||||||
|
'imageCaptionPosition' => 'right', // Position of caption in lightbox
|
||||||
|
'sortBy' => 'name', // Sort by name or date
|
||||||
|
'orderBy' => 'desc', // Order by asc or desc
|
||||||
|
'thumbSize' => 250, // Thumbnail height/width (square thumbs)
|
||||||
|
'displayExifInfo' => false, // Display Exif info in caption
|
||||||
|
'disableCache' => false, // Enable or disable cache
|
||||||
|
'showShareLink' => false // Show link for thumb, full, markdown link (thumb + link to full)
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
| Option | Type | Default | Description |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| templateFile | string | board | Template filename (must be placed in 'public/templates' folder) |
|
||||||
|
| title | string | NanoGal | Text to be displayed in browser titlebar |
|
||||||
|
| description | string | My gallery | Use in meta tag "description" |
|
||||||
|
| author | string | NanoGal | Your name |
|
||||||
|
| skipObjects | array | ['comment.html', '.gitkeep', 'aFolder', 'aFile.ext'] | Those files and folders will not be displayed |
|
||||||
|
| imageCaptionPosition | string | right | Position of caption in lightbox `top` or `right` or `bottom` or `left` |
|
||||||
|
| sortBy | string | name | Sort by `name` or `date` |
|
||||||
|
| orderBy | string | desc | Order by `asc` or `desc` |
|
||||||
|
| thumbSize | int | 250 | Thumbnail height/width (square thumbs) |
|
||||||
|
| displayExifInfo | bool | false | Display Exif info in caption |
|
||||||
|
| disableCache | bool | false | Enable or disable cache |
|
||||||
|
| showShareLink | boll | false | Show share link for thumb, full, markdown link (thumb + link to full) |
|
||||||
|
|
||||||
|
#### Notes
|
||||||
|
|
||||||
|
If you change the thumbsize, thumbnails are not re-create. If the difference between older and newer size are small, I think you don't need regen all thumb. But if you prefer, you can delete `cache/thumbs/*` for force re-create thumbnails.
|
||||||
|
|
||||||
|
If you change any parameter, the cache file (html file) are delete and recreate.
|
||||||
|
|
||||||
|
|
||||||
|
## Ideas
|
||||||
|
|
||||||
|
Original Idea by [SebSauvage](https://sebsauvage.net/wiki/doku.php?id=minigal_nano#gerer_votre_gallerie_avec_nextcloud) in french.
|
||||||
|
|
||||||
|
If you have NextCloud installed on your server, you can use it to manage your NanoGal gallery. It's very convenient for uploading images, renaming them, moving them, and organizing them into folders.
|
||||||
|
|
||||||
|
In the NextCloud settings: Settings > Administration > External Storage:
|
||||||
|
|
||||||
|
| Option | Description |
|
||||||
|
| --- | --- |
|
||||||
|
| Folder Name | The name of the folder as it will appear in NextCloud. |
|
||||||
|
| External Storage | Choose Local |
|
||||||
|
| Authentication | None |
|
||||||
|
| Configuration | Enter the path where your images are stored (the path to the NanoGal /photos directory) |
|
||||||
|
|
||||||
|
Don't forget to disable encrypt for this folder.
|
||||||
|
|
||||||
|
More info about external storage in [Nextcloud admin documentation](https://docs.nextcloud.com/server/stable/admin_manual/configuration_files/external_storage_configuration_gui.html).
|
||||||
|
|
||||||
|
The same idea can be use with another sync tool of course.
|
||||||
|
|
||||||
|
------------------------------------------------------------
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
NanoGal is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE v3 (https://gnu.org/licenses/agpl-3.0.txt).
|
||||||
|
|
||||||
|
Icons :
|
||||||
|
- Author: [Vectopus](https://github.com/Vectopus/Atlas-icons-font?ref=svgrepo.com)
|
||||||
|
- License: [MIT License](https://github.com/Vectopus/Atlas-icons-font/blob/main/LICENSE)
|
||||||
|
- Collection: [Atlas Variety Line Icons](https://www.svgrepo.com/collection/atlas-variety-line-icons/)
|
||||||
|
|
||||||
|
Origin
|
||||||
|
|
||||||
|
- [MinigalNano by SebSauvage](https://github.com/sebsauvage/MinigalNano)
|
||||||
|
- [Project contributors](https://github.com/sebsauvage/MinigalNano/blob/master/AUTHORS)
|
||||||
|
- [Original discussion page (english)](http://sebsauvage.net/wiki/doku.php?id=minigal_nano_en)
|
||||||
|
- [Original discussion page (french)](http://sebsauvage.net/wiki/doku.php?id=minigal_nano)
|
173
app/Cache.php
Normal file
|
@ -0,0 +1,173 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Utils\Utils;
|
||||||
|
|
||||||
|
class Cache {
|
||||||
|
|
||||||
|
private $currentDir;
|
||||||
|
private $counter = [];
|
||||||
|
private $fileName = '../cache/cache.json';
|
||||||
|
private $fileCache;
|
||||||
|
private $currentConfig;
|
||||||
|
private $saveConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the object with a directory path and configuration settings, managing cache as needed.
|
||||||
|
*
|
||||||
|
* This constructor checks if the provided directory path is authorized. If it is, the constructor
|
||||||
|
* proceeds to handle caching based on the provided configuration. If caching is disabled, any existing
|
||||||
|
* cache file is deleted. The method also compares the current configuration with a saved version
|
||||||
|
* to detect changes.
|
||||||
|
*
|
||||||
|
* @param string $dir The current directory path to be set.
|
||||||
|
* @param array $config Configuration settings to be used by the object, including cache management options.
|
||||||
|
*
|
||||||
|
* @throws \Exception If an unauthorized access attempt is detected.
|
||||||
|
*/
|
||||||
|
function __construct(string $dir, array $config) {
|
||||||
|
if (!Utils::isPathAuthorized($dir)) {
|
||||||
|
die("ERROR 03: Unauthorized access!");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->currentDir = $dir;
|
||||||
|
|
||||||
|
if (!is_dir('../cache/html')) {
|
||||||
|
mkdir('../cache/html', 0700);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($config['disableCache'] && file_exists($this->fileName)) {
|
||||||
|
unlink($this->fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_exists($this->fileName)) {
|
||||||
|
$cacheFile = json_decode(file_get_contents($this->fileName), true);
|
||||||
|
} else {
|
||||||
|
$cacheFile = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->currentConfig = md5(json_encode($config));
|
||||||
|
if (isset($cacheFile['config'])) {
|
||||||
|
$this->saveConfig = $cacheFile['config'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->fileCache = $cacheFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Counts the number of files and directories in the current directory.
|
||||||
|
*
|
||||||
|
* This method iterates over the contents of the current directory, counting
|
||||||
|
* both files and subdirectories (excluding `.` and `..`). The total count is
|
||||||
|
* stored in an internal array indexed by the directory path and is also returned.
|
||||||
|
* If the directory cannot be opened, an exception is thrown.
|
||||||
|
*
|
||||||
|
* @return array An associative array where the key is the directory path and the value is the count of files and directories.
|
||||||
|
*
|
||||||
|
* @throws \Exception If the directory cannot be opened for reading.
|
||||||
|
*/
|
||||||
|
public function countDirsAndFiles(): array {
|
||||||
|
$counter = 0;
|
||||||
|
if (is_dir($this->currentDir) && $handle = opendir($this->currentDir)) {
|
||||||
|
while (false !== ($file = readdir($handle))) {
|
||||||
|
if ($file === "." || $file === "..") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_file($this->currentDir . '/' . $file) || is_dir($this->currentDir . '/' . $file)) {
|
||||||
|
$counter++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
$this->counter[$this->currentDir] = $counter;
|
||||||
|
return $this->counter;
|
||||||
|
} else {
|
||||||
|
throw new \Exception("ERROR: Could not open directory for reading: " . $this->currentDir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the number of files and directories in the current directory has changed.
|
||||||
|
*
|
||||||
|
* This method compares the current count of files and directories with a cached count.
|
||||||
|
* If the counts differ, it updates the cache with the new count and returns `true`,
|
||||||
|
* indicating that a change has occurred. Otherwise, it returns `false`.
|
||||||
|
*
|
||||||
|
* @return bool `true` if the count of files and directories has changed and the cache is updated; `false` otherwise.
|
||||||
|
*/
|
||||||
|
public function changeFile(): bool {
|
||||||
|
if (isset($this->fileCache[$this->currentDir])) {
|
||||||
|
if ($this->counter[$this->currentDir] !== $this->fileCache[$this->currentDir]) {
|
||||||
|
$this->fileCache = array_merge($this->fileCache, $this->counter);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the current configuration has changed compared to the saved configuration.
|
||||||
|
*
|
||||||
|
* This method compares the current configuration with a previously saved configuration.
|
||||||
|
* If they differ, it updates the cache with the current configuration and returns `true`,
|
||||||
|
* indicating that a change has occurred. Otherwise, it returns `false`.
|
||||||
|
*
|
||||||
|
* @return bool `true` if the configuration has changed and the cache is updated; `false` otherwise.
|
||||||
|
*/
|
||||||
|
public function changeConf(): bool {
|
||||||
|
if ($this->currentConfig !== $this->saveConfig) {
|
||||||
|
$this->fileCache['config'] = $this->currentConfig;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Saves the current file cache to a file in JSON format.
|
||||||
|
*
|
||||||
|
* This method serializes the file cache to a JSON string with pretty printing, unescaped slashes,
|
||||||
|
* and unescaped Unicode characters. It then writes this JSON data to the specified file.
|
||||||
|
* If the JSON encoding fails or if the file write operation fails, an exception is thrown.
|
||||||
|
*
|
||||||
|
* @throws \Exception If JSON encoding fails or if writing to the file fails.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function save(): void {
|
||||||
|
$jsonData = json_encode($this->fileCache, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||||
|
|
||||||
|
if ($jsonData === false) {
|
||||||
|
throw new \Exception("Failed to encode data to JSON: " . json_last_error_msg());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_put_contents($this->fileName, $jsonData) === false) {
|
||||||
|
throw new \Exception("Failed to write data to file: " . $this->fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the HTML cache by deleting all cached files.
|
||||||
|
*
|
||||||
|
* This method retrieves all `.html` files in the cache directory and deletes them.
|
||||||
|
* If the cache directory cannot be read or if any file deletion fails, an exception is thrown.
|
||||||
|
*
|
||||||
|
* @throws \Exception If the cache directory cannot be read or if a file cannot be deleted.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function clearCache(): void {
|
||||||
|
$files = glob("../cache/html/*.html");
|
||||||
|
if ($files === false) {
|
||||||
|
throw new \Exception("Failed to read cache directory.");
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($files as $file) {
|
||||||
|
if (is_file($file)) {
|
||||||
|
if (!unlink($file)) {
|
||||||
|
throw new \Exception("Failed to delete file: " . $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
487
app/FileAndDir.php
Normal file
|
@ -0,0 +1,487 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use League\CommonMark\Environment\Environment;
|
||||||
|
use League\CommonMark\Extension\Autolink\AutolinkExtension;
|
||||||
|
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
|
||||||
|
use League\CommonMark\Extension\TaskList\TaskListExtension;
|
||||||
|
use League\CommonMark\MarkdownConverter;
|
||||||
|
use Utils\Utils;
|
||||||
|
|
||||||
|
class FileAndDir {
|
||||||
|
private $currentDir;
|
||||||
|
private $requestedDir;
|
||||||
|
private $config = [];
|
||||||
|
private $fileExtensions = [
|
||||||
|
'deny' => ['sh', 'html', 'js', 'vbs', 'exe', 'md'],
|
||||||
|
'txt' => ['txt', 'md'],
|
||||||
|
'img' => ['jpeg', 'jpg', 'jpe', 'bmp', 'webp', 'gif', 'png'],
|
||||||
|
'pdf' => ['pdf'],
|
||||||
|
'zip' => ['7z', 'zip', 'gz', 'tar', 'rar', 'r[0-9]{2,}'],
|
||||||
|
'doc' => ['odt', 'doc', 'docx'],
|
||||||
|
'pres' => ['odp', 'ppt', 'pptx'],
|
||||||
|
'spread' => ['ods', 'xls', 'xlsx'],
|
||||||
|
'video' => ['ogv', 'mp4', 'mpg', 'mpeg', 'mov', 'avi', 'wmv', 'flv', 'webm'],
|
||||||
|
'audio' => ['aiff', 'aif', 'wma', 'aac', 'flac', 'mp3', 'ogg', 'm4a'],
|
||||||
|
];
|
||||||
|
private $appUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the object with directory paths and configuration settings.
|
||||||
|
*
|
||||||
|
* This constructor initializes the object with the provided directory paths and configuration.
|
||||||
|
* It verifies that the given paths are authorized using utility methods. If any path is unauthorized,
|
||||||
|
* the script terminates with an error message.
|
||||||
|
*
|
||||||
|
* @param string $dir The current directory path to be set.
|
||||||
|
* @param string $requestedDir The requested directory path to be set, relative to the 'photos' directory.
|
||||||
|
* @param array $config Configuration settings to be used by the object.
|
||||||
|
*
|
||||||
|
* @throws \Exception If an unauthorized access attempt is detected.
|
||||||
|
*/
|
||||||
|
function __construct(string $dir, string $requestedDir, array $config) {
|
||||||
|
if (!Utils::isPathAuthorized($dir)) {
|
||||||
|
die("ERROR 02: Unauthorized access!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Utils::isPathAuthorized('photos' . $requestedDir)) {
|
||||||
|
die("ERROR 03: Unauthorized access!");
|
||||||
|
}
|
||||||
|
$this->currentDir = $dir;
|
||||||
|
$this->requestedDir = $requestedDir;
|
||||||
|
$this->config = $config;
|
||||||
|
if ($config['showShareLink'] === true) {
|
||||||
|
$this->appUrl = $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a breadcrumb navigation based on the requested directory.
|
||||||
|
*
|
||||||
|
* This method creates an HTML breadcrumb navigation trail from the requested directory path.
|
||||||
|
* It links each directory level, except for the last one, which is displayed as plain text.
|
||||||
|
* If the requested directory is empty or set to "photos", it returns an empty string.
|
||||||
|
*
|
||||||
|
* @return string The HTML markup for the breadcrumb navigation, or an empty string if no breadcrumb is needed.
|
||||||
|
*/
|
||||||
|
public function makeBreadcrumb(): string {
|
||||||
|
if ($this->requestedDir !== '' && $this->requestedDir !== 'photos') {
|
||||||
|
$breadcrumb_navigation = '<div id="breadcrumb">';
|
||||||
|
$breadcrumb_navigation .= '<a href="?dir=">Home</a> > ';
|
||||||
|
|
||||||
|
$navitems = explode("/", htmlspecialchars($this->requestedDir));
|
||||||
|
$path = '';
|
||||||
|
|
||||||
|
foreach ($navitems as $index => $item) {
|
||||||
|
if ($index === 0) continue;
|
||||||
|
|
||||||
|
$path .= $item;
|
||||||
|
|
||||||
|
if ($index === count($navitems) - 1) {
|
||||||
|
$breadcrumb_navigation .= htmlspecialchars($item);
|
||||||
|
} else {
|
||||||
|
$breadcrumb_navigation .= '<a href="?dir=/' . htmlspecialchars($path) . '">' . htmlspecialchars($item) . '</a> > ';
|
||||||
|
$path .= '/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$breadcrumb_navigation .= '</div>';
|
||||||
|
return $breadcrumb_navigation;
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the specified file is readable and updates a global message if it is not.
|
||||||
|
*
|
||||||
|
* This function verifies if the given file has read permissions. If the file is not
|
||||||
|
* readable, it sets a global `$messages` variable with a warning message and a link
|
||||||
|
* to a guide on how to change file permissions.
|
||||||
|
*
|
||||||
|
* @param string $file The path to the file or directory to check.
|
||||||
|
*
|
||||||
|
* @global string $messages A global variable used to store the error message if permissions are incorrect.
|
||||||
|
*/
|
||||||
|
function checkpermissions(string $file): void {
|
||||||
|
global $messages;
|
||||||
|
|
||||||
|
if (!is_readable($file)) {
|
||||||
|
$messages = "At least one file or folder has wrong permissions. "
|
||||||
|
. "Learn how to <a href='http://minigal.dk/faq-reader/items/"
|
||||||
|
. "how-do-i-change-file-permissions-chmod.html' target='_blank'>"
|
||||||
|
. "set file permissions</a>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists directories and files within the current directory.
|
||||||
|
*
|
||||||
|
* This method scans the current directory and generates a list of directories and files.
|
||||||
|
* Directories and files are categorized, and thumbnails are created or fetched based on
|
||||||
|
* the file type. The results are sorted and returned in an associative array containing
|
||||||
|
* two keys: 'dir' for directories and 'file' for files. If the directory cannot be opened,
|
||||||
|
* the script terminates with an error message.
|
||||||
|
*
|
||||||
|
* @return array An associative array with two keys:
|
||||||
|
* - 'dir': An array of directories with details like name, thumbnail URL, link, type, date, and size.
|
||||||
|
* - 'file': An array of files with details like name, thumbnail URL, link, type, date, size, data attributes, and image captions.
|
||||||
|
*
|
||||||
|
* @throws RuntimeException If the current directory cannot be opened.
|
||||||
|
*/
|
||||||
|
function listDirs(): array {
|
||||||
|
$listDir = $listFile = [];
|
||||||
|
if (is_dir($this->currentDir) && $handle = opendir($this->currentDir)) {
|
||||||
|
while (false !== ($file = readdir($handle))) {
|
||||||
|
if (in_array($file, $this->config['skipObjects'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (is_dir($this->currentDir . '/' . $file)) {
|
||||||
|
if ($file != "." && $file != "..") {
|
||||||
|
if ($this->defineThumbnailDir($file)) {
|
||||||
|
$thumb = $this->makeFolderThumbUrl($file);
|
||||||
|
} else {
|
||||||
|
$thumb = $this->getfirstImage($file);
|
||||||
|
}
|
||||||
|
$listDir[] = [
|
||||||
|
'name' => $file,
|
||||||
|
'thumb' => $thumb,
|
||||||
|
'link' => '?dir=' . urlencode($this->requestedDir . '/' . $file),
|
||||||
|
'type' => 'folder',
|
||||||
|
'date' => date("Y-m-d", filemtime($this->currentDir . '/' . $file)),
|
||||||
|
'size' => filesize($this->currentDir . '/' . $file),
|
||||||
|
'dataAttr' => null,
|
||||||
|
'imgCaption' => null
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_file($this->currentDir . '/' . $file) && $file != "." && $file != ".." && $file != "folder.jpg") {
|
||||||
|
$extension = $this->getExtension($file);
|
||||||
|
if ($extension === 'deny') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($extension !== 'img') {
|
||||||
|
$thumb = '/assets/images/filetype_' . $extension . '.svg';
|
||||||
|
} else {
|
||||||
|
$thumb = $this->makeImageThumbUrl($file);
|
||||||
|
}
|
||||||
|
|
||||||
|
$caption = $this->computeCaption($file);
|
||||||
|
|
||||||
|
$listFile[] = [
|
||||||
|
'name' => pathinfo($file, PATHINFO_FILENAME),
|
||||||
|
'thumb' => $thumb,
|
||||||
|
'link' => $this->currentDir . '/' . $file,
|
||||||
|
'type' => $extension,
|
||||||
|
'date' => date("Y-m-d", filemtime($this->currentDir . '/' . $file)),
|
||||||
|
'size' => filesize($this->currentDir . '/' . $file),
|
||||||
|
'dataAttr' => $caption['dataAttr'],
|
||||||
|
'imgCaption' => $caption['content']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
|
||||||
|
$order = $this->config['orderBy'] === 'desc' ? 1 : -1;
|
||||||
|
|
||||||
|
usort($listDir, function ($a, $b) use ($order) {
|
||||||
|
return $order * strcmp(strtolower($a[$this->config['sortBy']]), strtolower($b[$this->config['sortBy']]));
|
||||||
|
});
|
||||||
|
|
||||||
|
usort($listFile, function ($a, $b) use ($order) {
|
||||||
|
return $order * strcmp(strtolower($a[$this->config['sortBy']]), strtolower($b[$this->config['sortBy']]));
|
||||||
|
});
|
||||||
|
|
||||||
|
return ['dir' => $listDir, 'file' => $listFile];
|
||||||
|
} else {
|
||||||
|
die("ERROR: Could not open " . htmlspecialchars(stripslashes($this->currentDir)) . " for reading!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines the type of file based on its extension.
|
||||||
|
*
|
||||||
|
* This method checks the file extension against a predefined list of known file types
|
||||||
|
* and returns a category name corresponding to the file type. If the extension does not match
|
||||||
|
* any known types, it returns 'other'.
|
||||||
|
*
|
||||||
|
* @param string $file The name of the file whose extension is to be checked.
|
||||||
|
*
|
||||||
|
* @return string The category name of the file type based on its extension. Possible values
|
||||||
|
* include 'img', 'md', 'pdf', 'zip', 'rar', 'tar', 'gzip', 'doc', 'pres',
|
||||||
|
* 'ods', 'video', 'audio', or 'other' if the extension is not recognized.
|
||||||
|
*/
|
||||||
|
private function getExtension(string $file): string {
|
||||||
|
if (!is_readable($this->currentDir . '/' . $file) || !is_file($this->currentDir . '/' . $file)) {
|
||||||
|
return 'broken';
|
||||||
|
}
|
||||||
|
|
||||||
|
$fileExtension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||||
|
foreach ($this->fileExtensions as $type => $extensions) {
|
||||||
|
foreach ($extensions as $ext) {
|
||||||
|
if (preg_match("/^$ext$/i", $fileExtension)) {
|
||||||
|
return $type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 'other';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a thumbnail image exists in the specified directory.
|
||||||
|
*
|
||||||
|
* This method determines if a `folder.jpg` file exists in the given directory
|
||||||
|
* within the current directory. It returns `true` if the file is found, indicating
|
||||||
|
* that the directory has a defined thumbnail; otherwise, it returns `false`.
|
||||||
|
*
|
||||||
|
* @param string $dir The name of the directory to check for a thumbnail.
|
||||||
|
*
|
||||||
|
* @return bool `true` if the `folder.jpg` file exists in the directory, `false` otherwise.
|
||||||
|
*/
|
||||||
|
private function defineThumbnailDir(string $dir): bool {
|
||||||
|
if (file_exists($this->currentDir . '/' . $dir . '/folder.jpg')) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a URL for the folder thumbnail image.
|
||||||
|
*
|
||||||
|
* This method constructs a URL to request the creation of a thumbnail image for a
|
||||||
|
* specified folder. It uses the `createthumb.php` script with query parameters for
|
||||||
|
* the thumbnail image file and its size.
|
||||||
|
*
|
||||||
|
* @param string $file The name of the folder for which to create a thumbnail.
|
||||||
|
*
|
||||||
|
* @return string The URL to request the creation of the folder thumbnail image.
|
||||||
|
*/
|
||||||
|
private function makeFolderThumbUrl(string $file): string {
|
||||||
|
$imgParams = http_build_query(
|
||||||
|
array(
|
||||||
|
'filename' => "$this->currentDir/$file/folder.jpg"
|
||||||
|
),
|
||||||
|
'',
|
||||||
|
'&'
|
||||||
|
);
|
||||||
|
return 'createthumb.php?' . $imgParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a URL for the image thumbnail.
|
||||||
|
*
|
||||||
|
* This method constructs a URL to request the creation of a thumbnail image for
|
||||||
|
* a given file if its extension is recognized as an image format. If the file's
|
||||||
|
* extension is not a recognized image format, it returns a URL to a default image.
|
||||||
|
*
|
||||||
|
* @param string $file The name of the image file for which to create a thumbnail.
|
||||||
|
*
|
||||||
|
* @return string The URL to request the creation of the image thumbnail or a default image URL if the extension is not recognized.
|
||||||
|
*/
|
||||||
|
private function makeImageThumbUrl(string $file): string {
|
||||||
|
$pathinfo = pathinfo($file);
|
||||||
|
$ext = strtolower($pathinfo['extension']);
|
||||||
|
if (in_array($ext, $this->fileExtensions['img'])) {
|
||||||
|
$imageName = $file;
|
||||||
|
$imgParams = 'createthumb.php?' . http_build_query(
|
||||||
|
array(
|
||||||
|
'filename' => $this->currentDir . '/' . $imageName
|
||||||
|
),
|
||||||
|
'',
|
||||||
|
'&'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$imgParams = 'assets/images/default.svg';
|
||||||
|
}
|
||||||
|
return $imgParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the URL for the first image found in the specified directory.
|
||||||
|
*
|
||||||
|
* This method scans the given directory for image files with recognized extensions.
|
||||||
|
* It returns a URL for the thumbnail of the first image found. If no image is found
|
||||||
|
* or if the directory does not exist, it returns a URL to a default image.
|
||||||
|
*
|
||||||
|
* @param string $dir The name of the directory to scan for images.
|
||||||
|
*
|
||||||
|
* @return string The URL for the thumbnail of the first image found, or a URL to a default image if no image is found or the directory does not exist.
|
||||||
|
*/
|
||||||
|
private function getFirstImage(string $dir): string {
|
||||||
|
$fullPath = $this->currentDir . '/' . $dir;
|
||||||
|
$imageName = 'assets/images/default.svg';
|
||||||
|
|
||||||
|
if (!is_dir($fullPath)) {
|
||||||
|
return $imageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($handle = opendir($fullPath)) {
|
||||||
|
while (false !== ($file = readdir($handle))) {
|
||||||
|
if ($file[0] == '.') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$pathinfo = pathinfo($file);
|
||||||
|
if (empty($pathinfo['extension'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$ext = strtolower($pathinfo['extension']);
|
||||||
|
if (in_array($ext, $this->fileExtensions['img'])) {
|
||||||
|
$imageName = 'createthumb.php?' . http_build_query(
|
||||||
|
array(
|
||||||
|
'filename' => $fullPath . '/' . $file
|
||||||
|
),
|
||||||
|
'',
|
||||||
|
'&'
|
||||||
|
);
|
||||||
|
closedir($handle);
|
||||||
|
return $imageName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
return $imageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves and converts the content of a Markdown note in the current directory.
|
||||||
|
*
|
||||||
|
* This method checks if a `note.md` file exists in the current directory. If the file
|
||||||
|
* is found, its content is read and converted from Markdown to HTML using the
|
||||||
|
* `MarkdownConverter` with specified extensions. If the file does not exist, an
|
||||||
|
* empty string is returned.
|
||||||
|
*
|
||||||
|
* @return string The HTML content of the Markdown file, or an empty string if the file does not exist.
|
||||||
|
*/
|
||||||
|
public function getFolderNote(): string {
|
||||||
|
if (file_exists($this->currentDir . '/note.md')) {
|
||||||
|
$content = file_get_contents($this->currentDir . '/note.md');
|
||||||
|
$config = [];
|
||||||
|
$environment = new Environment($config);
|
||||||
|
$environment->addExtension(new CommonMarkCoreExtension());
|
||||||
|
$environment->addExtension(new TaskListExtension());
|
||||||
|
$environment->addExtension(new AutolinkExtension());
|
||||||
|
$converter = new MarkdownConverter($environment);
|
||||||
|
return $converter->convert($content)->getContent();
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes the caption for an image by combining Markdown content and EXIF data.
|
||||||
|
*
|
||||||
|
* This method checks for the presence of a Markdown file and EXIF data associated with
|
||||||
|
* the given image. It combines both sources of information, converting the Markdown content
|
||||||
|
* to HTML and appending EXIF data if available. The result is a caption that can be displayed
|
||||||
|
* in a Lightbox gallery, with the relevant CSS class and HTML content.
|
||||||
|
*
|
||||||
|
* @param string $img The name of the image for which to compute the caption.
|
||||||
|
*
|
||||||
|
* @return array An associative array containing:
|
||||||
|
* - `dataAttr` (string): A data attribute for the caption's CSS class, used by the Lightbox.
|
||||||
|
* - `content` (string): The HTML content of the caption, including Markdown and EXIF data if available.
|
||||||
|
*/
|
||||||
|
private function computeCaption(string $img): array {
|
||||||
|
$mdContent = $exifData = $shareLink = $listLink = '';
|
||||||
|
|
||||||
|
if (file_exists($this->currentDir . '/' . $img . '.md')) {
|
||||||
|
$mdContent = file_get_contents($this->currentDir . '/' . $img . '.md');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->config['displayExifInfo']) {
|
||||||
|
$exifData = $this->computeExifData($this->currentDir . '/' . $img);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->config['showShareLink'] === true) {
|
||||||
|
$shareLink = '## Share link';
|
||||||
|
$listLink = '
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#" onclick="copiedText(this);return false;">Copy thumbnail link</a> : <input class="urlToCopy" value="' . $this->appUrl . '/createthumb.php?filename=' . (urlencode($this->currentDir . '/' . $img)) . '"></li>
|
||||||
|
<li><a href="#" onclick="copiedText(this);return false;">Copy full link</a> : <input class="urlToCopy" value="' . $this->appUrl . '/' . $this->currentDir . '/' . $img . '"></li>
|
||||||
|
<li><a href="#" onclick="copiedText(this);return false;">Copy markdown link</a> : <input class="urlToCopy" value="[![](' . $this->appUrl . '/createthumb.php?filename=' . (urlencode($this->currentDir . '/' . $img)) . ')](' . $this->appUrl . '/' . $this->currentDir . '/' . $img . ')"></li>
|
||||||
|
</ul>
|
||||||
|
</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($exifData) && empty($mdContent) && empty($shareLink)) {
|
||||||
|
return [
|
||||||
|
'dataAttr' => '',
|
||||||
|
'content' => ''
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = uniqid();
|
||||||
|
$environment = new Environment();
|
||||||
|
$environment->addExtension(new CommonMarkCoreExtension());
|
||||||
|
$environment->addExtension(new TaskListExtension());
|
||||||
|
$environment->addExtension(new AutolinkExtension());
|
||||||
|
$converter = new MarkdownConverter($environment);
|
||||||
|
|
||||||
|
if (!empty($exifData)) {
|
||||||
|
$exifData = "\n" . '## Exif' . "\n" . $exifData;
|
||||||
|
}
|
||||||
|
|
||||||
|
$mdContent = $mdContent . "\n" . $exifData . "\n" . $shareLink;
|
||||||
|
|
||||||
|
$captionData = [
|
||||||
|
'dataAttr' => 'description: .custom-' . $id,
|
||||||
|
'content' => '<div class="glightbox-desc custom-' . $id . '">' . $converter->convert($mdContent)->getContent() . $listLink . '</div>'
|
||||||
|
];
|
||||||
|
|
||||||
|
return $captionData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Computes and formats EXIF data from an image file.
|
||||||
|
*
|
||||||
|
* This method reads EXIF data from the specified image file and formats relevant
|
||||||
|
* pieces of information into a string. It includes details such as the camera model,
|
||||||
|
* orientation, exposure time, and flash status. If any of these details are missing
|
||||||
|
* from the EXIF data, they are simply omitted from the resulting string.
|
||||||
|
*
|
||||||
|
* @param string $file The path to the image file from which to extract EXIF data.
|
||||||
|
*
|
||||||
|
* @return string A formatted string containing the EXIF data of the image, or an empty string if no relevant EXIF data is found.
|
||||||
|
*/
|
||||||
|
private function computeExifData(string $file): string {
|
||||||
|
$returnExif = '';
|
||||||
|
$exifData = @exif_read_data($file, 'EXIF');
|
||||||
|
if ($exifData !== false) {
|
||||||
|
if (isset($exifData['Model'])) {
|
||||||
|
$returnExif .= ' - Model : ' . $exifData['Model'] . "\n";
|
||||||
|
}
|
||||||
|
if (isset($exifData['Orientation'])) {
|
||||||
|
$returnExif .= ' - Orientation : ' . $exifData['Orientation'] . "\n";
|
||||||
|
}
|
||||||
|
if (isset($exifData['ExposureTime'])) {
|
||||||
|
$returnExif .= ' - Exposure Time : ' . $exifData['ExposureTime'] . "\n";
|
||||||
|
}
|
||||||
|
if (isset($exifData['Flash'])) {
|
||||||
|
$returnExif .= ' - Flash : ' . $exifData['Flash'] . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $returnExif;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines the Lightbox class to use based on the resource type.
|
||||||
|
*
|
||||||
|
* This static method checks if the given resource type is either 'video' or 'img'.
|
||||||
|
* If so, it returns the class name 'glightbox', indicating that the resource should
|
||||||
|
* be added to a Lightbox gallery. Otherwise, it returns `null`.
|
||||||
|
*
|
||||||
|
* @param string $ressourceType The type of the resource to check (e.g., 'video' or 'img').
|
||||||
|
*
|
||||||
|
* @return string|null The Lightbox class name if the resource type is valid, otherwise `null`.
|
||||||
|
*/
|
||||||
|
static function addToLightBox(string $ressourceType): string|null {
|
||||||
|
if (in_array($ressourceType, ['video', 'img'])) {
|
||||||
|
return 'glightbox';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
45
app/Utils.php
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Utils;
|
||||||
|
|
||||||
|
class Utils {
|
||||||
|
/**
|
||||||
|
* Prints debugging information in a styled HTML format.
|
||||||
|
*
|
||||||
|
* This method is used for debugging purposes by printing the provided data along with
|
||||||
|
* the file name and line number where the function was called. The output is wrapped
|
||||||
|
* in styled HTML tags to enhance readability. It optionally accepts a name to label the output.
|
||||||
|
*
|
||||||
|
* @param mixed $data The data to be printed. Can be of any type (e.g., array, object, string).
|
||||||
|
* @param string $name (optional) A label for the printed data. Default is an empty string.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
static function n_print(mixed $data, string $name = ''): void {
|
||||||
|
error_reporting(-1);
|
||||||
|
$aBackTrace = debug_backtrace();
|
||||||
|
echo '<h2>', $name, '</h2>';
|
||||||
|
echo '<fieldset style="border: 1px solid orange; padding: 5px;color: #333; background-color: #fff;">';
|
||||||
|
echo '<legend style="border:1px solid orange;padding: 1px;background-color:#eee;color:orange;">', $aBackTrace[0]['file'], ' ligne => ', $aBackTrace[0]['line'], '</legend>';
|
||||||
|
echo '<pre>', htmlentities(print_r($data, 1)), '</pre>';
|
||||||
|
echo '</fieldset><br />';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the provided path is authorized by ensuring it is within the current working directory.
|
||||||
|
*
|
||||||
|
* This method resolves the absolute path of the given directory and compares it with the
|
||||||
|
* current working directory (getcwd()). If the path is not within the current working directory,
|
||||||
|
* it is considered unauthorized.
|
||||||
|
*
|
||||||
|
* @param string $path The directory path to be validated.
|
||||||
|
*
|
||||||
|
* @return bool Returns true if the path is authorized, false otherwise.
|
||||||
|
*/
|
||||||
|
static function isPathAuthorized(string $path): bool {
|
||||||
|
if (!str_contains(realpath($path), getcwd())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
80
bin/remove_gps_datas.sh
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
deleteGPSData() {
|
||||||
|
local directory=$1
|
||||||
|
local overwrite_param=$2
|
||||||
|
|
||||||
|
find "$directory" -type f | while IFS= read -r line; do
|
||||||
|
echo "Processing file '$line'"
|
||||||
|
exiftool -gps:all= "$line" "$overwrite_param"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v exiftool)" ]; then
|
||||||
|
echo 'Error: exiftool is not installed.' >&2
|
||||||
|
echo 'Install exiftool before. See your distro documentation.' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo '-------------------------------'
|
||||||
|
echo 'Success: exiftool is installed.'
|
||||||
|
echo '-------------------------------'
|
||||||
|
echo ''
|
||||||
|
|
||||||
|
# Ask for directory scan, if empty use ../public/photos
|
||||||
|
default_directory="../public/photos"
|
||||||
|
read -p "Please specify a subdirectory within $default_directory or press Enter to use the default: " user_directory
|
||||||
|
echo ''
|
||||||
|
|
||||||
|
if [ -z "$user_directory" ]; then
|
||||||
|
target_directory="$default_directory"
|
||||||
|
else
|
||||||
|
target_directory="$default_directory/$user_directory"
|
||||||
|
|
||||||
|
if [[ ! -d "$target_directory" ]] || [[ "$target_directory" != "$default_directory"* ]]; then
|
||||||
|
echo "Error: The directory you specified is invalid or outside of $default_directory."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
echo ''
|
||||||
|
read -p "Are you sure you want to delete all GPS data from the files in $target_directory?
|
||||||
|
This operation is irreversible.
|
||||||
|
Do you want to continue ? [Y/N] " yesno
|
||||||
|
echo ''
|
||||||
|
case $yesno in
|
||||||
|
[Yy]*)
|
||||||
|
echo "You answered yes"
|
||||||
|
|
||||||
|
# Ask user for overwrite original file
|
||||||
|
echo ''
|
||||||
|
read -p "Do you want to overwrite the original files? This cannot be undone. [Y/N] " overwrite
|
||||||
|
echo ''
|
||||||
|
case $overwrite in
|
||||||
|
[Yy]*)
|
||||||
|
overwrite_param="-overwrite_original"
|
||||||
|
echo "You chose to overwrite the original files."
|
||||||
|
;;
|
||||||
|
[Nn]*)
|
||||||
|
overwrite_param=""
|
||||||
|
echo "You chose not to overwrite the original files."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid choice, defaulting to no overwrite."
|
||||||
|
overwrite_param=""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
deleteGPSData "$target_directory" "$overwrite_param"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
[Nn]*)
|
||||||
|
echo "You answered no, exiting"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Answer either Y/y (Yes) or N/n (No)!"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
32
bower.json
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"name": "glightbox",
|
||||||
|
"description": "JavaScript animation engine",
|
||||||
|
"main": "dist/js/glightbox.js",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/mcstudios/glightbox"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"lightbox",
|
||||||
|
"javascript",
|
||||||
|
"gallery",
|
||||||
|
"popup"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
"MC Studios <manuel@mcstudios.com.mx>"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://glightbox.mcstudios.com.mx",
|
||||||
|
"ignore": [
|
||||||
|
"**/.*",
|
||||||
|
"node_modules",
|
||||||
|
"bower_components",
|
||||||
|
"*.psd",
|
||||||
|
"demo",
|
||||||
|
"test",
|
||||||
|
"tests"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"glightbox": "^3.3.0"
|
||||||
|
}
|
||||||
|
}
|
0
cache/.gitkeep
vendored
Normal file
12
composer.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"stefangabos/zebra_image": "^2.8",
|
||||||
|
"league/commonmark": "^2.5"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"App\\" : "app/",
|
||||||
|
"Utils\\": "app/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
0
datas/.gitkeep
Normal file
1
public/.htaccess
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Options -Indexes
|
1
public/assets/css/glightbox.min.css
vendored
Normal file
18
public/assets/images/cannotopen.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27v.96h-5.73V1.5h.96l4.77 4.77z" />
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M20.59 12l-2.86 1.91L14.86 12l-2.87 1.91L9.14 12l-2.87 1.91L3.41 12V1.5h12.41l4.77 4.77V12zM20.59 15.82l-2.86 1.91-2.87-1.91-2.87 1.91-2.85-1.91-2.87 1.91-2.86-1.91v6.68h17.18v-6.68z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 792 B |
18
public/assets/images/default.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-4.8 -4.8 33.6 33.6" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M20.59 22.5H3.41a1.92 1.92 0 01-1.91-1.91V7.23h17.18v13.36a1.92 1.92 0 001.91 1.91z" />
|
||||||
|
<path class="prefix__cls-1" d="M22.5 3.41v17.18a1.91 1.91 0 01-3.82 0V7.23H5.32V1.5h9.54l1.87 1.91z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 657 B |
20
public/assets/images/filetype_audio.svg
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1" d="M8.18 17.73a1 1 0 111 .95 1 1 0 01-1-.95" />
|
||||||
|
<circle class="prefix__cls-1" cx="14.86" cy="16.77" r=".95" />
|
||||||
|
<path class="prefix__cls-1" d="M15.82 16.77v-5.73l-5.73.96v5.73" />
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27V22.5H3.41v-21h12.41l4.77 4.77z" />
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27v.96h-5.73V1.5h.96l4.77 4.77z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 868 B |
18
public/assets/images/filetype_broken.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27v.96h-5.73V1.5h.96l4.77 4.77z" />
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M20.59 12l-2.86 1.91L14.86 12l-2.87 1.91L9.14 12l-2.87 1.91L3.41 12V1.5h12.41l4.77 4.77V12zM20.59 15.82l-2.86 1.91-2.87-1.91-2.87 1.91-2.85-1.91-2.87 1.91-2.86-1.91v6.68h17.18v-6.68z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 792 B |
18
public/assets/images/filetype_doc.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M6.27 14.86h7.64M6.27 11.05h7.64M6.27 18.68h7.64M16.77 8.18V22.5H3.41V5.32h10.5l2.86 2.86z" />
|
||||||
|
<path class="prefix__cls-1" d="M16.77 18.68h3.82V4.36L17.73 1.5H7.23v3.82" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 699 B |
18
public/assets/images/filetype_other.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27V22.5H3.41v-21h12.41l4.77 4.77z" />
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M20.59 6.27v.96h-5.73V1.5h.96l4.77 4.77zM11.05 18.68h1.9M12 16.77v-1.12a1.92 1.92 0 01.56-1.35l.79-.79a1.88 1.88 0 00.56-1.35V12A1.92 1.92 0 0012 10.09 1.92 1.92 0 0010.09 12" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 786 B |
18
public/assets/images/filetype_pdf.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1" d="M2.45 12.95h13.36v5.73H2.45z" />
|
||||||
|
<path class="prefix__cls-1" d="M4.36 18.68v3.82h17.19V6.27L16.77 1.5H4.36v11.46" />
|
||||||
|
<path class="prefix__cls-1" d="M21.55 6.27v.96h-5.73V1.5h.95l4.78 4.77z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 718 B |
32
public/assets/images/filetype_pres.svg
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__prefix__Layer_1" data-name="Layer 1"
|
||||||
|
version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__prefix__cls-1,
|
||||||
|
.prefix__prefix__cls-2 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
|
||||||
|
.prefix__prefix__cls-2 {
|
||||||
|
stroke-width: 2.4
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<g id="prefix__prefix__SVGRepo_iconCarrier" stroke-width="1">
|
||||||
|
<path class="prefix__prefix__cls-1" id="prefix__prefix__polygon2" d="M3.41 22.5v-21h12.41l4.77 4.77V22.5z" />
|
||||||
|
<path class="prefix__prefix__cls-1" id="prefix__prefix__polygon3" d="M14.86 7.23V1.5h.96l4.77 4.77v.96z" />
|
||||||
|
</g>
|
||||||
|
<g id="prefix__prefix__SVGRepo_iconCarrier-5" transform="translate(6.233 9.414) scale(.46245)" display="inline">
|
||||||
|
<g id="prefix__prefix__presentation_standing" data-name="presentation standing" transform="translate(.47)">
|
||||||
|
<path class="prefix__prefix__cls-2" id="prefix__prefix__line1" d="M.5 1.48h23" />
|
||||||
|
<path class="prefix__prefix__cls-2" id="prefix__prefix__line2" d="M.5 16.81h23" />
|
||||||
|
<path class="prefix__prefix__cls-2" id="prefix__prefix__rect2" d="M2.42 1.48h19.17v15.33H2.42z" />
|
||||||
|
<path class="prefix__prefix__cls-2" id="prefix__prefix__line3" d="M12 16.81v6.71" />
|
||||||
|
<path class="prefix__prefix__cls-2" id="prefix__prefix__polyline3" d="M8.17 23.52v-.96L12 19.69" />
|
||||||
|
<path class="prefix__prefix__cls-2" id="prefix__prefix__polyline4" d="M15.83 23.52v-.96L12 19.69" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
18
public/assets/images/filetype_spread.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M15.82 11.05v6.68M12 12.95v4.78M8.18 14.86v2.87M20.59 6.27V22.5H3.41v-21h12.41l4.77 4.77z" />
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27v.96h-5.73V1.5h.96l4.77 4.77z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 696 B |
18
public/assets/images/filetype_txt.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M6.27 11.05h11.46M6.27 14.86h11.46M6.27 18.68h11.46M20.59 6.27V22.5H3.41v-21h12.41l4.77 4.77z" />
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27v.96h-5.73V1.5h.96l4.77 4.77z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 700 B |
19
public/assets/images/filetype_video.svg
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M7.23 11.05h5.73v6.68H7.23zM12.96 14.86l2.86 2.87h.95v-6.69h-.95l-2.86 2.87v.95z" />
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27V22.5H3.41v-21h12.41l4.77 4.77z" />
|
||||||
|
<path class="prefix__cls-1" d="M20.59 6.27v.96h-5.73V1.5h.96l4.77 4.77z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 776 B |
18
public/assets/images/filetype_zip.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="800" height="800" viewBox="-2.4 -2.4 28.8 28.8" id="prefix__Layer_1" data-name="Layer 1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="prefix__SVGRepo_iconCarrier">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.prefix__cls-1 {
|
||||||
|
fill: none;
|
||||||
|
stroke: #333333;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
stroke-width: 1.2
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<path class="prefix__cls-1" d="M3.41 22.5h17.18V5.32L16.77 1.5H3.41z" />
|
||||||
|
<path class="prefix__cls-1"
|
||||||
|
d="M12 1.5a1.91 1.91 0 011.91 1.91v3.82h-3.82V3.41A1.91 1.91 0 0112 1.5zM12 11.05zM13.91 13zM12 14.86zM13.91 16.77zM13.91 20.59zM12 18.68z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 742 B |
11
public/assets/images/moon.svg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<svg fill="#000000" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve">
|
||||||
|
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
||||||
|
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
|
||||||
|
<g id="SVGRepo_iconCarrier">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path d="M256,0C114.842,0,0,114.84,0,256s114.842,256,256,256s256-114.84,256-256S397.158,0,256,0z M322.225,451.558 c-20.797,7.062-43.071,10.894-66.225,10.894c-113.837,0-206.452-92.614-206.452-206.452S142.163,49.548,256,49.548 c23.154,0,45.429,3.832,66.226,10.894C266.612,107.439,231.226,177.657,231.226,256S266.612,404.561,322.225,451.558z"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 898 B |
22
public/assets/js/app.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
function switchTheme(e) {
|
||||||
|
let actualTheme = document.documentElement.getAttribute('data-theme');
|
||||||
|
if (actualTheme === null || actualTheme === 'light') {
|
||||||
|
document.documentElement.setAttribute('data-theme', 'dark');
|
||||||
|
localStorage.setItem('theme', 'dark');
|
||||||
|
} else {
|
||||||
|
document.documentElement.setAttribute('data-theme', 'light');
|
||||||
|
localStorage.setItem('theme', 'light');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;
|
||||||
|
if (currentTheme) {
|
||||||
|
document.documentElement.setAttribute('data-theme', currentTheme);
|
||||||
|
}
|
||||||
|
|
||||||
|
copiedText = function copyText(e) {
|
||||||
|
navigator.clipboard.writeText(e.nextElementSibling.value);
|
||||||
|
alert("Link copied to clipboard");
|
||||||
|
return false;
|
||||||
|
}
|
1
public/assets/js/glightbox.min.js
vendored
Normal file
66
public/createthumb.php
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Utils\Utils;
|
||||||
|
|
||||||
|
error_reporting(-1);
|
||||||
|
require_once '../vendor/stefangabos/zebra_image/Zebra_Image.php';
|
||||||
|
require_once '../app/Utils.php';
|
||||||
|
|
||||||
|
$config = [
|
||||||
|
'thumbSize' => 250
|
||||||
|
];
|
||||||
|
|
||||||
|
if (file_exists('../datas/config.php')) {
|
||||||
|
include '../datas/config.php';
|
||||||
|
$config = array_merge($config, $userConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
$get_filename = $_GET['filename'];
|
||||||
|
$baseDir = getcwd();
|
||||||
|
|
||||||
|
if (!Utils::isPathAuthorized($get_filename)) {
|
||||||
|
die("ERROR 01: Unauthorized access!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_dir('../cache/thumbs') && is_writable('.')) {
|
||||||
|
mkdir('../cache/thumbs', 0700);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pathInfos = pathinfo($get_filename);
|
||||||
|
$dirname = '../cache/' . str_replace('photos', 'thumbs', $pathInfos['dirname']);
|
||||||
|
$filename = $pathInfos['filename'];
|
||||||
|
$thumbname = '../cache/' . $dirname . '/' . $filename . '.' . $pathInfos['extension'] . '.webp';
|
||||||
|
|
||||||
|
if (file_exists($thumbname)) {
|
||||||
|
$fd = fopen($thumbname, "r");
|
||||||
|
$cacheContent = fread($fd, filesize($thumbname));
|
||||||
|
fclose($fd);
|
||||||
|
header('Content-type: image/webp');
|
||||||
|
echo ($cacheContent);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_readable($get_filename) || !is_file($get_filename)) {
|
||||||
|
header('Content-type: image/svg+xml');
|
||||||
|
$cannotopenImg = file_get_contents('assets/images/cannotopen.svg');
|
||||||
|
echo $cannotopenImg;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!file_exists($dirname)) {
|
||||||
|
if (!mkdir($dirname, 0700, true)) {
|
||||||
|
die('We can\'t create dir, check permission of parent directory.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$image = new Zebra_Image();
|
||||||
|
$image->auto_handle_exif_orientation = true;
|
||||||
|
$image->source_path = $get_filename;
|
||||||
|
$image->target_path = $thumbname;
|
||||||
|
|
||||||
|
if (!$image->resize($config['thumbSize'], $config['thumbSize'], ZEBRA_IMAGE_CROP_CENTER)) {
|
||||||
|
} else {
|
||||||
|
header('Content-type: image/webp');
|
||||||
|
echo file_get_contents($thumbname);
|
||||||
|
exit();
|
||||||
|
}
|
121
public/index.php
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
<?php
|
||||||
|
$time_start = microtime(true);
|
||||||
|
require '../vendor/autoload.php';
|
||||||
|
|
||||||
|
use App\FileAndDir;
|
||||||
|
use App\Cache;
|
||||||
|
use Utils\Utils;
|
||||||
|
|
||||||
|
error_reporting(-1);
|
||||||
|
|
||||||
|
$version = "0.1.0";
|
||||||
|
ini_set("memory_limit", "256M");
|
||||||
|
|
||||||
|
/*
|
||||||
|
Not edit this param directly
|
||||||
|
|
||||||
|
1 - Create /datas/config.php file.
|
||||||
|
2 - Create $userconfig array like :
|
||||||
|
|
||||||
|
$userConfig = [
|
||||||
|
'templateFile' => 'board', // Template filename (must be placed in 'templates' folder)
|
||||||
|
'title' => 'NanoGal', // Text to be displayed in browser titlebar
|
||||||
|
'description' => 'My gallery', // Use in meta tag "description"
|
||||||
|
'author' => 'NanoGal', // Your name
|
||||||
|
'skipObjects' => ['comment.html', '.gitkeep', 'aFolder', 'aFile.ext'], //Those files and folders will not be displayed (affects the page and the RSS feed)
|
||||||
|
'imageCaptionPosition' => 'right', // Position of caption in lightbox
|
||||||
|
'sortBy' => 'name', // Sort by name or date
|
||||||
|
'orderBy' => 'desc', // Order by asc or desc
|
||||||
|
'displayExifInfo' => false, // Display Exif info in caption
|
||||||
|
'thumbSize' => 300, // Thumbnail height/width (square thumbs)
|
||||||
|
'disableCache' => false, // Enable or disable cache
|
||||||
|
];
|
||||||
|
*/
|
||||||
|
$config = [
|
||||||
|
'templateFile' => 'board', // Template filename (must be placed in 'public/templates' folder)
|
||||||
|
'title' => 'NanoGal', // Text to be displayed in browser titlebar
|
||||||
|
'description' => 'My gallery', // Use in meta tag "description"
|
||||||
|
'author' => 'NanoGal', // Your name
|
||||||
|
'skipObjects' => ['comment.html', '.gitkeep', 'aFolder', 'aFile.ext'], //Those files and folders will not be displayed (affects the page and the RSS feed)
|
||||||
|
'imageCaptionPosition' => 'right', // Position of caption in lightbox
|
||||||
|
'sortBy' => 'name', // Sort by name or date
|
||||||
|
'orderBy' => 'desc', // Order by asc or desc
|
||||||
|
'thumbSize' => 250, // Thumbnail height/width (square thumbs)
|
||||||
|
'displayExifInfo' => false, // Display Exif info in caption
|
||||||
|
'disableCache' => false, // Enable or disable cache
|
||||||
|
'showShareLink' => false // Show link for thumb, full, markdown link (thumb + link to full)
|
||||||
|
];
|
||||||
|
|
||||||
|
if (file_exists('../datas/config.php')) {
|
||||||
|
include '../datas/config.php';
|
||||||
|
$config = array_merge($config, $userConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
$messages = '';
|
||||||
|
|
||||||
|
if (!function_exists('exif_read_data') && $config['displayExifInfo'] === true) {
|
||||||
|
$display_exif = 0;
|
||||||
|
$messages = "Error: PHP EXIF is not available. Set $display_exif = 0; in config.php to remove this message";
|
||||||
|
}
|
||||||
|
|
||||||
|
$requestedDir = '';
|
||||||
|
if (!empty($_GET['dir'])) {
|
||||||
|
$requestedDir = $_GET['dir'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$thumbdir = rtrim('photos' . $requestedDir, '/');
|
||||||
|
$current_dir = $thumbdir;
|
||||||
|
$cache = new Cache($current_dir, $config);
|
||||||
|
|
||||||
|
if ($config['disableCache'] === false) {
|
||||||
|
$cacheHash = '../cache/html/' . md5($current_dir);
|
||||||
|
$cache->countDirsAndFiles();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($cache->changeFile() || $cache->changeConf() || !file_exists($cacheHash . '.html') || $config['disableCache'] === true) {
|
||||||
|
|
||||||
|
if ($cache->changeConf()) {
|
||||||
|
$cache->clearCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($config['disableCache'] !== true) {
|
||||||
|
$cache->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
$list = new FileAndDir($current_dir, $requestedDir, $config);
|
||||||
|
|
||||||
|
$listDir = $list->listDirs();
|
||||||
|
$folderNote = $list->getFolderNote();
|
||||||
|
$breadcrumb_navigation = $list->makeBreadcrumb();
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
$userCss = '';
|
||||||
|
// If user set personal css rule, load it
|
||||||
|
if (file_exists('../datas/user.css')) {
|
||||||
|
$userCss = '<style>'.file_get_contents('../datas/user.css').'</style>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// If template exist load it or load default template
|
||||||
|
if (file_exists('templates/' . $config['templateFile'] . '/' . $config['templateFile'] . '.php')) {
|
||||||
|
require 'templates/' . $config['templateFile'] . '/' . $config['templateFile'] . '.php';
|
||||||
|
} else {
|
||||||
|
require 'templates/board/board.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = ob_get_contents();
|
||||||
|
$gen = 'Build in : ';
|
||||||
|
if ($config['disableCache'] === false) {
|
||||||
|
file_put_contents($cacheHash . '.html', $content);
|
||||||
|
}
|
||||||
|
ob_end_clean();
|
||||||
|
} else {
|
||||||
|
$gen = 'Serve from cache in : ';
|
||||||
|
$content = file_get_contents($cacheHash . '.html');
|
||||||
|
}
|
||||||
|
|
||||||
|
$time_end = microtime(true);
|
||||||
|
$executionTime = round(($time_end - $time_start), 5);
|
||||||
|
|
||||||
|
$content = preg_replace("/<% buildTime %>/", $gen . $executionTime . 's', $content);
|
||||||
|
|
||||||
|
echo $content;
|
0
public/photos/.gitkeep
Normal file
236
public/templates/board/board.css
Normal file
|
@ -0,0 +1,236 @@
|
||||||
|
:root {
|
||||||
|
color-scheme: light dark;
|
||||||
|
--background-color: light-dark(#e7e6df, #1d1e22);
|
||||||
|
--breadcrumb-color: #333333;
|
||||||
|
--caption-text-color: light-dark(#e7e6df, #333333);
|
||||||
|
--header-background: #fff;
|
||||||
|
--header-color: #333333;
|
||||||
|
--link-color: var(--title-color);
|
||||||
|
--link-hover-color: #e34f54;
|
||||||
|
--message-background: #2ecc71;
|
||||||
|
--text-color: light-dark(#333333, #e7e6df);
|
||||||
|
--title-color: #cc2027;
|
||||||
|
--logo-stroke: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] {
|
||||||
|
--background-color: #1d1e22;
|
||||||
|
--text-color: #e7e6df;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="light"] {
|
||||||
|
--background-color: #e7e6df;
|
||||||
|
--text-color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 62.5%;
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--background-color);
|
||||||
|
color: var(--text-color);
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-family: Helvetica, Arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--link-color);
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not(.card-content):hover {
|
||||||
|
color: var(--link-hover-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-style: italic;
|
||||||
|
font-family: Georgia, Lucida, serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 a {
|
||||||
|
color: var(--link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#logo-border-color {
|
||||||
|
fill: var(--title-color) !important;
|
||||||
|
stroke: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
height: 3em;
|
||||||
|
vertical-align: middle;
|
||||||
|
stroke: var(--logo-stroke) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dark-mode {
|
||||||
|
position: absolute;
|
||||||
|
right: 1em;
|
||||||
|
top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
body>header {
|
||||||
|
background-color: var(--header-background);
|
||||||
|
color: var(--header-color);
|
||||||
|
padding: 0;
|
||||||
|
margin: 0 0 .5em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#innerheader {
|
||||||
|
padding: 0 .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#breadcrumb a {
|
||||||
|
color: var(--breadcrumb-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#container,
|
||||||
|
.message {
|
||||||
|
max-width: 100%;
|
||||||
|
margin: 0px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message {
|
||||||
|
background-color: var(--message-background);
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.message>div {
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
transition: all .2s ease-in;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
font-size: 2.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
body>nav {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
padding-bottom: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside a {
|
||||||
|
color: var(--title-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside * {
|
||||||
|
margin: .2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: .5em;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: var(--header-background);
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(1, 1fr);
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
transition: all .2s ease-in;
|
||||||
|
position: relative;
|
||||||
|
width: min-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card a {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-footer {
|
||||||
|
color: var(--header-color);
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: .3em .6em;
|
||||||
|
text-align: center;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backtop,
|
||||||
|
#backtop:hover,
|
||||||
|
#backtop:active {
|
||||||
|
transition: all .2s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
padding-top: 1em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a {
|
||||||
|
color: var(--text-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buildTime {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backtop {
|
||||||
|
bottom: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0px 0px 2px -1px #000;
|
||||||
|
background-color: var(--title-color);
|
||||||
|
color: var(--header-background);
|
||||||
|
display: block;
|
||||||
|
margin: .5%;
|
||||||
|
padding: 1rem 4rem;
|
||||||
|
position: fixed;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#legend {
|
||||||
|
background-color: var(--header-background);
|
||||||
|
flex: none;
|
||||||
|
max-width: 90%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lightbox-container__media {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
p {
|
||||||
|
background-color: var(--header-background);
|
||||||
|
width: 100%;
|
||||||
|
max-width: 90%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gdesc-inner {
|
||||||
|
color: var(--caption-text-color);
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gdesc-inner ul {
|
||||||
|
padding: 0 0 0 1.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glightbox-container .gslide,
|
||||||
|
.gslide-image img {
|
||||||
|
user-select: auto;
|
||||||
|
}
|
103
public/templates/board/board.php
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use App\FileAndDir;
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html data-theme="auto" lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="author" content="<?= $config['author']; ?>">
|
||||||
|
<meta name="generator" content="NanoGal">
|
||||||
|
<title><?= $config['title']; ?></title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="<?= $config['description']; ?>">
|
||||||
|
<link href="assets/css/glightbox.min.css" rel="stylesheet">
|
||||||
|
<link href="templates/board/board.css" rel="stylesheet">
|
||||||
|
<?= $userCss; ?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header id="top">
|
||||||
|
<div id="innerheader">
|
||||||
|
<h1>
|
||||||
|
<svg class="logo" viewBox="0 0 135.467 135.467" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g transform="translate(-37.267 -74.664)">
|
||||||
|
<path d="M105 110.248l32.15 32.15L105 174.546l-32.15-32.15z" fill="none" stroke-width="2.377" />
|
||||||
|
<path
|
||||||
|
d="M125.872 142.397A20.872 20.872 0 01105 163.27a20.872 20.872 0 01-20.872-20.873A20.872 20.872 0 01105 121.525a20.872 20.872 0 0120.872 20.872z"
|
||||||
|
fill="none" stroke-width="2.338" />
|
||||||
|
<ellipse cx="105" cy="142.397" rx="9.621" ry="9.704" fill="#030101" />
|
||||||
|
<circle cx="128.534" cy="119.421" r="3.173" />
|
||||||
|
<path id="logo-border-color"
|
||||||
|
d="M77.916 108.243a7.163 7.163 0 00-7.179 7.178v53.908a7.164 7.164 0 007.18 7.179h53.907a7.163 7.163 0 007.179-7.179v-53.908a7.163 7.163 0 00-7.179-7.178zm-.113 2.475h54.134a4.603 4.603 0 014.613 4.612v54.134a4.603 4.603 0 01-4.613 4.613H77.803a4.603 4.603 0 01-4.613-4.613V115.33a4.603 4.603 0 014.613-4.612z"
|
||||||
|
fill="#333" />
|
||||||
|
<circle cx="111.946" cy="135.633" r="4.596" fill="#fff" />
|
||||||
|
<g fill="none" stroke-width="2.361">
|
||||||
|
<path
|
||||||
|
d="M73.37 181.786h-2.615a5.133 5.133 0 01-5.144-5.144v-2.607M144.389 174.023v2.62a5.133 5.133 0 01-5.144 5.143h-2.59M136.658 103.009h2.587a5.133 5.133 0 015.144 5.143v2.553M65.611 110.717v-2.565a5.133 5.133 0 015.144-5.143h2.607" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg><a href="/"><?= $config['title']; ?></a>
|
||||||
|
</h1>
|
||||||
|
<a href="#" id="dark-mode" onclick="switchTheme();">
|
||||||
|
<img height="24" src="/assets/images/moon.svg" alt="Dark/Light mode icon">
|
||||||
|
</a>
|
||||||
|
<nav>
|
||||||
|
<?= $breadcrumb_navigation; ?>
|
||||||
|
</nav>
|
||||||
|
<aside>
|
||||||
|
<?= $folderNote; ?>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
<?php if (!empty($messages)) : ?>
|
||||||
|
<div id="message" class="message">
|
||||||
|
<div>
|
||||||
|
<?= $messages; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main id="container">
|
||||||
|
<?php foreach ($listDir as $value) : ?>
|
||||||
|
<?php foreach ($value as $entry) : ?>
|
||||||
|
<div class="card">
|
||||||
|
<a href="<?= $entry['link']; ?>" class="<?= FileAndDir::addToLightBox($entry['type']); ?> card-content" data-gallery="gallery" data-glightbox="<?= $entry['dataAttr']; ?>">
|
||||||
|
<img src="<?= $entry['thumb']; ?>" loading="lazy" alt="" width="<?= $config['thumbSize']; ?>" height="<?= $config['thumbSize']; ?>">
|
||||||
|
</a>
|
||||||
|
<p class="card-footer">
|
||||||
|
<?= $entry['name']; ?>
|
||||||
|
</p>
|
||||||
|
<?= $entry['imgCaption']; ?>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<a href="#top" id="backtop">Top</a>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Gallery by <?= $config['author']; ?> /
|
||||||
|
<a href="https://github.com/sebsauvage/MinigalNano" title="Powered by NanoGal" target=" _blank">
|
||||||
|
Powered by NanoGal
|
||||||
|
</a> Fork of
|
||||||
|
<a href="https://github.com/sebsauvage/MinigalNano" title="Original MiniGal Nano" target="_blank">
|
||||||
|
MiniGal Nano
|
||||||
|
</a>
|
||||||
|
<p class="buildTime">
|
||||||
|
<% buildTime %>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="assets/js/glightbox.min.js"></script>
|
||||||
|
<script src="assets/js/app.js"></script>
|
||||||
|
<script>
|
||||||
|
const lightbox = GLightbox({
|
||||||
|
autoplayVideos: false,
|
||||||
|
descPosition: '<?= $config['imageCaptionPosition']; ?>'
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
243
public/templates/squares/squares.css
Normal file
|
@ -0,0 +1,243 @@
|
||||||
|
:root {
|
||||||
|
color-scheme: light dark;
|
||||||
|
--title-color: #cc2027;
|
||||||
|
--header-background: #fff;
|
||||||
|
--header-color: #333333;
|
||||||
|
--message-background: #2ecc71;
|
||||||
|
--breadcrumb-color: #333333;
|
||||||
|
--background-color: light-dark(#e7e6df, #1d1e22);
|
||||||
|
--text-color: light-dark(#333333, #e7e6df);
|
||||||
|
--caption-text-color: light-dark(#e7e6df, #333333);
|
||||||
|
--link-color: var(--title-color);
|
||||||
|
--link-hover-color: #e34f54;
|
||||||
|
--logo-stroke: light-dark(#333333, #b7a1a2);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] {
|
||||||
|
--background-color: #1d1e22;
|
||||||
|
--text-color: #e7e6df;
|
||||||
|
--logo-stroke: #b7a1a2;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="light"] {
|
||||||
|
--background-color: #e7e6df;
|
||||||
|
--text-color: #1d1e22;
|
||||||
|
--logo-stroke: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-size: 62.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
color: var(--text-color);
|
||||||
|
background-color: var(--background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0;
|
||||||
|
font-family: Georgia, Lucida, serif;
|
||||||
|
font-style: italic;
|
||||||
|
color: var(--link-color);
|
||||||
|
font-weight: normal;
|
||||||
|
text-align: center;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
body>header {
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logo-border-color {
|
||||||
|
fill: var(--title-color) !important;
|
||||||
|
stroke: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
height: 3em;
|
||||||
|
vertical-align: middle;
|
||||||
|
stroke: var(--logo-stroke) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dark-mode {
|
||||||
|
position: absolute;
|
||||||
|
top: 1em;
|
||||||
|
right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container,
|
||||||
|
#innerheader {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#innerheader a {
|
||||||
|
color: var(--link-color);
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#innerheader a:hover {
|
||||||
|
color: var(--link-hover-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
font-size: 1.3em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
padding: 0 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside a {
|
||||||
|
color: var(--title-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside * {
|
||||||
|
margin: .2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gallery li:hover img,
|
||||||
|
#gallery li img,
|
||||||
|
#gallery li em,
|
||||||
|
#gallery li:hover em,
|
||||||
|
#backtop,
|
||||||
|
#backtop:hover,
|
||||||
|
#backtop:active {
|
||||||
|
transition: all .2s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gallery {
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gallery li {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 0;
|
||||||
|
background-color: var(--header-background);
|
||||||
|
}
|
||||||
|
|
||||||
|
#gallery li img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gallery li img:hover {
|
||||||
|
position: relative;
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#gallery em {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
padding: 40% 0;
|
||||||
|
text-align: center;
|
||||||
|
font-family: Georgia, Lucida, serif;
|
||||||
|
font-size: 2rem;
|
||||||
|
font-style: italic;
|
||||||
|
color: var(--header-background);
|
||||||
|
background-color: rgba(0, 0, 0, .6);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gallery li:hover em {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
clear: both;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-top: 2rem;
|
||||||
|
margin: 25px 0px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backtop {
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 1rem 4rem;
|
||||||
|
background-color: var(--header-background);
|
||||||
|
color: var(--title-color);
|
||||||
|
font-weight: bold;
|
||||||
|
box-shadow: 0px 0px 2px -1px #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backtop:hover,
|
||||||
|
#backtop:active {
|
||||||
|
background-color: var(--title-color);
|
||||||
|
color: var(--header-background);
|
||||||
|
padding: 2rem 8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
padding-top: 1em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.buildTime {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lightbox-container__media {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
p {
|
||||||
|
background-color: var(--header-background);
|
||||||
|
width: 100%;
|
||||||
|
max-width: 90%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.gdesc-inner {
|
||||||
|
color: var(--caption-text-color);
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gdesc-inner ul {
|
||||||
|
padding: 0 0 0 1.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glightbox-container .gslide,
|
||||||
|
.gslide-image img {
|
||||||
|
user-select: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gslide-description a {
|
||||||
|
color: var(--link-color);
|
||||||
|
}
|
96
public/templates/squares/squares.php
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use App\FileAndDir;
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html data-theme="auto" lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="author" content="<?= $config['author']; ?>">
|
||||||
|
<meta name="generator" content="NanoGal">
|
||||||
|
<title><?= $config['title']; ?></title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="description" content="<?= $config['description']; ?>">
|
||||||
|
<link href="assets/css/glightbox.min.css" rel="stylesheet">
|
||||||
|
<link href="templates/squares/squares.css" rel="stylesheet">
|
||||||
|
<?= $userCss; ?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header id="top">
|
||||||
|
<div id="innerheader">
|
||||||
|
<h1><svg class="logo" viewBox="0 0 135.467 135.467" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g transform="translate(-37.267 -74.664)">
|
||||||
|
<path d="M105 110.248l32.15 32.15L105 174.546l-32.15-32.15z" fill="none" stroke-width="2.377" />
|
||||||
|
<path
|
||||||
|
d="M125.872 142.397A20.872 20.872 0 01105 163.27a20.872 20.872 0 01-20.872-20.873A20.872 20.872 0 01105 121.525a20.872 20.872 0 0120.872 20.872z"
|
||||||
|
fill="none" stroke-width="2.338" />
|
||||||
|
<ellipse cx="105" cy="142.397" rx="9.621" ry="9.704" fill="#030101" />
|
||||||
|
<circle cx="128.534" cy="119.421" r="3.173" />
|
||||||
|
<path id="logo-border-color"
|
||||||
|
d="M77.916 108.243a7.163 7.163 0 00-7.179 7.178v53.908a7.164 7.164 0 007.18 7.179h53.907a7.163 7.163 0 007.179-7.179v-53.908a7.163 7.163 0 00-7.179-7.178zm-.113 2.475h54.134a4.603 4.603 0 014.613 4.612v54.134a4.603 4.603 0 01-4.613 4.613H77.803a4.603 4.603 0 01-4.613-4.613V115.33a4.603 4.603 0 014.613-4.612z"
|
||||||
|
fill="#333" />
|
||||||
|
<circle cx="111.946" cy="135.633" r="4.596" fill="#fff" />
|
||||||
|
<g fill="none" stroke-width="2.361">
|
||||||
|
<path
|
||||||
|
d="M73.37 181.786h-2.615a5.133 5.133 0 01-5.144-5.144v-2.607M144.389 174.023v2.62a5.133 5.133 0 01-5.144 5.143h-2.59M136.658 103.009h2.587a5.133 5.133 0 015.144 5.143v2.553M65.611 110.717v-2.565a5.133 5.133 0 015.144-5.143h2.607" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg><a href="/"><?= $config['title']; ?></a>
|
||||||
|
</h1>
|
||||||
|
<a href="#" id="dark-mode" onclick="switchTheme();"><img height="24" src="/assets/images/moon.svg" alt="Dark/Light mode icon"></a>
|
||||||
|
<nav><?= $breadcrumb_navigation; ?></nav>
|
||||||
|
<aside><?= $folderNote; ?></aside>
|
||||||
|
</div>
|
||||||
|
<?php if (!empty($messages)) : ?>
|
||||||
|
<div id="message" class="message">
|
||||||
|
<div>
|
||||||
|
<?= $messages; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main id="container">
|
||||||
|
<ul id="gallery">
|
||||||
|
<?php foreach ($listDir as $value) : ?>
|
||||||
|
<?php foreach ($value as $entry) : ?>
|
||||||
|
<li>
|
||||||
|
<a href="<?= $entry['link']; ?>" class="<?= FileAndDir::addToLightBox($entry['type']); ?>" data-gallery="gallery" data-glightbox="<?= $entry['dataAttr']; ?>">
|
||||||
|
<?php if ($entry['type'] === 'folder'):; ?>
|
||||||
|
<em><?= $entry['name']; ?></em>
|
||||||
|
<?php endif; ?>
|
||||||
|
<img src="<?= $entry['thumb']; ?>" alt="Loading..." width="<?= $config['thumbSize']; ?>" height="<?= $config['thumbSize']; ?>">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?= $entry['imgCaption']; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<a href="#top" id="backtop">Top</a>
|
||||||
|
<footer>
|
||||||
|
Gallery by <?= $config['author']; ?> /
|
||||||
|
<a href="https://github.com/sebsauvage/MinigalNano" title="Powered by NanoGal" target=" _blank">
|
||||||
|
Powered by NanoGal
|
||||||
|
</a> Fork of
|
||||||
|
<a href="https://github.com/sebsauvage/MinigalNano" title="Original MiniGal Nano" target="_blank">
|
||||||
|
MiniGal Nano
|
||||||
|
</a>
|
||||||
|
<p class="buildTime">
|
||||||
|
<% buildTime %>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
<script src="assets/js/glightbox.min.js"></script>
|
||||||
|
<script src="assets/js/app.js"></script>
|
||||||
|
<script>
|
||||||
|
const lightbox = GLightbox({
|
||||||
|
autoplayVideos: false,
|
||||||
|
descPosition: '<?= $config['imageCaptionPosition']; ?>'
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
125
ressources/nanogal.svg
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 135.46667 135.46667"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:export-filename="nanogal_opti.svg"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||||
|
sodipodi:docname="nanogal.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#ffffff"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:export-bgcolor="#ffffffff"
|
||||||
|
inkscape:zoom="2.2980186"
|
||||||
|
inkscape:cx="183.41888"
|
||||||
|
inkscape:cy="264.57575"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1172"
|
||||||
|
inkscape:window-x="1920"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Logo_NanoGall" /><defs
|
||||||
|
id="defs1"><linearGradient
|
||||||
|
id="swatch40"
|
||||||
|
inkscape:swatch="solid"><stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop41" /></linearGradient><inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect11"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." /><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath26"><g
|
||||||
|
inkscape:label="Clip"
|
||||||
|
id="use26"
|
||||||
|
style="fill:#ffffff;fill-opacity:0.995074;stroke:none;stroke-opacity:1"><g
|
||||||
|
id="g17"
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:0.995074;stroke:none;stroke-opacity:1"
|
||||||
|
clip-path="none" /></g></clipPath></defs><g
|
||||||
|
inkscape:label="Logo_NanoGall"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="Logo_NanoGall"
|
||||||
|
transform="translate(-37.266665,-89.894037)"
|
||||||
|
style="display:inline"
|
||||||
|
inkscape:highlight-color="#36a949"><path
|
||||||
|
id="rotate_frame"
|
||||||
|
style="display:inline;fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:2.37699;stroke-opacity:1"
|
||||||
|
inkscape:label="rotate_frame"
|
||||||
|
d="m 104.99999,110.24776 32.14959,32.14959 -32.14959,32.14959 -32.149586,-32.14959 z"
|
||||||
|
transform="translate(-6.8749999e-7,15.230023)" /><path
|
||||||
|
id="frame"
|
||||||
|
style="display:inline;fill:#cc2027;fill-opacity:1;stroke:none;stroke-width:0.263665;stroke-opacity:1"
|
||||||
|
d="m 77.91638,123.47287 c -3.976845,0 -7.17889,3.20152 -7.17889,7.17837 v 53.90782 c 0,3.97685 3.202045,7.17889 7.17889,7.17889 h 53.90782 c 3.97685,0 7.17837,-3.20204 7.17837,-7.17889 v -53.90782 c 0,-3.97685 -3.20152,-7.17837 -7.17837,-7.17837 z m -0.113171,2.47478 h 54.134161 c 2.55544,0 4.61264,2.0572 4.61264,4.61264 v 54.13416 c 0,2.55544 -2.0572,4.61264 -4.61264,4.61264 H 77.803209 c -2.55544,0 -4.613155,-2.0572 -4.613155,-4.61264 v -54.13416 c 0,-2.55544 2.057715,-4.61264 4.613155,-4.61264 z"
|
||||||
|
inkscape:label="frame" /><path
|
||||||
|
id="stroke_circle"
|
||||||
|
style="display:inline;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2.33752"
|
||||||
|
inkscape:label="stroke_circle"
|
||||||
|
d="m 125.87227,142.39736 a 20.872282,20.872282 0 0 1 -20.87228,20.87228 20.872282,20.872282 0 0 1 -20.87228,-20.87228 20.872282,20.872282 0 0 1 20.87228,-20.87229 20.872282,20.872282 0 0 1 20.87228,20.87229 z"
|
||||||
|
transform="translate(-6.8749999e-7,15.230023)" /><ellipse
|
||||||
|
style="display:inline;fill:#030101;fill-opacity:1;stroke:none;stroke-width:2.19651;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="circle_1"
|
||||||
|
cx="104.99999"
|
||||||
|
cy="142.39734"
|
||||||
|
inkscape:label="circle_1"
|
||||||
|
rx="9.6212282"
|
||||||
|
ry="9.7036562"
|
||||||
|
transform="translate(-6.8749999e-7,15.230023)" /><circle
|
||||||
|
style="display:inline;fill:#000000;stroke:none;stroke-opacity:1;fill-opacity:1;stroke-width:0;stroke-dasharray:none"
|
||||||
|
id="circle_3"
|
||||||
|
cx="128.53357"
|
||||||
|
cy="119.42059"
|
||||||
|
r="3.1733704"
|
||||||
|
inkscape:label="circle_3"
|
||||||
|
transform="translate(-6.8749999e-7,15.230023)" /><circle
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="circle_2"
|
||||||
|
cx="111.94584"
|
||||||
|
cy="135.63322"
|
||||||
|
r="4.5959158"
|
||||||
|
inkscape:label="circle_2"
|
||||||
|
transform="translate(-6.8749999e-7,15.230023)" /><g
|
||||||
|
id="cut_frame"
|
||||||
|
inkscape:label="cut_frame"
|
||||||
|
style="display:inline;fill:#ff0000;stroke:#000000;stroke-opacity:1"
|
||||||
|
transform="translate(-5.9791667e-6,9.1273657)"><path
|
||||||
|
id="rect5"
|
||||||
|
clip-path="none"
|
||||||
|
style="display:inline;fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:2.36105;stroke-opacity:1"
|
||||||
|
inkscape:label="bottom_left_corner"
|
||||||
|
d="m 73.370482,187.88879 h -2.615339 c -2.849724,0 -5.143922,-2.29419 -5.143922,-5.14393 l 10e-7,-2.6076" /><path
|
||||||
|
id="path14"
|
||||||
|
clip-path="none"
|
||||||
|
style="display:inline;fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:2.36105;stroke-opacity:1"
|
||||||
|
inkscape:label="bottom_right_corner"
|
||||||
|
d="m 144.38879,180.12537 v 2.61949 c 0,2.84974 -2.29419,5.14393 -5.14393,5.14393 h -2.59053" /><path
|
||||||
|
id="path13"
|
||||||
|
style="display:inline;fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:2.36105;stroke-opacity:1"
|
||||||
|
d="m 136.65794,109.11122 h 2.58692 c 2.84974,0 5.14393,2.29419 5.14393,5.14392 v 2.55231"
|
||||||
|
inkscape:label="top_right_corner" /><path
|
||||||
|
id="path15"
|
||||||
|
style="display:inline;fill:none;fill-opacity:0;stroke:#000000;stroke-width:2.36105;stroke-opacity:1"
|
||||||
|
d="m 65.611221,116.81934 v -2.5642 c 0,-2.84973 2.294198,-5.14392 5.143922,-5.14392 v 0 h 2.60707"
|
||||||
|
inkscape:label="top_left_corner" /></g></g></svg>
|
After Width: | Height: | Size: 6.2 KiB |
18
ressources/nanogal_opti.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg width="512" height="512" viewBox="0 0 135.467 135.467" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g transform="translate(-37.267 -89.894)">
|
||||||
|
<path d="M105 125.478l32.15 32.15L105 189.776l-32.15-32.15z" fill="none" stroke="#000" stroke-width="2.377" />
|
||||||
|
<path
|
||||||
|
d="M77.916 123.473a7.163 7.163 0 00-7.179 7.178v53.908a7.164 7.164 0 007.18 7.179h53.907a7.163 7.163 0 007.179-7.179v-53.908a7.163 7.163 0 00-7.179-7.178zm-.113 2.475h54.134a4.603 4.603 0 014.613 4.612v54.134a4.603 4.603 0 01-4.613 4.613H77.803a4.603 4.603 0 01-4.613-4.613V130.56a4.603 4.603 0 014.613-4.612z"
|
||||||
|
fill="#cc2027" />
|
||||||
|
<path
|
||||||
|
d="M125.872 157.627A20.872 20.872 0 01105 178.5a20.872 20.872 0 01-20.872-20.873A20.872 20.872 0 01105 136.755a20.872 20.872 0 0120.872 20.872z"
|
||||||
|
fill="none" stroke="#000" stroke-width="2.338" />
|
||||||
|
<ellipse cx="105" cy="142.397" rx="9.621" ry="9.704" transform="translate(0 15.23)" fill="#030101" />
|
||||||
|
<circle cx="128.534" cy="119.421" r="3.173" transform="translate(0 15.23)" />
|
||||||
|
<circle cx="111.946" cy="135.633" r="4.596" transform="translate(0 15.23)" fill="#fff" />
|
||||||
|
<g fill="none" stroke="#000" stroke-width="2.361">
|
||||||
|
<path
|
||||||
|
d="M73.37 197.016h-2.615a5.133 5.133 0 01-5.144-5.144v-2.607M144.389 189.253v2.62a5.133 5.133 0 01-5.144 5.143h-2.59M136.658 118.239h2.587a5.133 5.133 0 015.144 5.144v2.552M65.611 125.947v-2.564a5.133 5.133 0 015.144-5.144h2.607" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
134
ressources/nanogal_text.svg
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 135.46667 135.46667"
|
||||||
|
version="1.1"
|
||||||
|
id="svg1"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:export-filename="nanogal_text_opti.svg"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
|
||||||
|
sodipodi:docname="nanogal_text.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
||||||
|
id="namedview1"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#ffffff"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:export-bgcolor="#ffffffff"
|
||||||
|
inkscape:zoom="1.1564613"
|
||||||
|
inkscape:cx="207.09729"
|
||||||
|
inkscape:cy="221.36495"
|
||||||
|
inkscape:window-width="1860"
|
||||||
|
inkscape:window-height="1172"
|
||||||
|
inkscape:window-x="60"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Logo_NanoGall" /><defs
|
||||||
|
id="defs1"><linearGradient
|
||||||
|
id="swatch40"
|
||||||
|
inkscape:swatch="solid"><stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop41" /></linearGradient><inkscape:path-effect
|
||||||
|
effect="powerclip"
|
||||||
|
id="path-effect11"
|
||||||
|
is_visible="true"
|
||||||
|
lpeversion="1"
|
||||||
|
inverse="true"
|
||||||
|
flatten="false"
|
||||||
|
hide_clip="false"
|
||||||
|
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue <b>Fond et contour</b> en l'absence de résultat de mise à plat après une conversion en chemin." /><clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath26"><g
|
||||||
|
inkscape:label="Clip"
|
||||||
|
id="use26"
|
||||||
|
style="fill:#ffffff;fill-opacity:0.995074;stroke:none;stroke-opacity:1"><g
|
||||||
|
id="g17"
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:0.995074;stroke:none;stroke-opacity:1"
|
||||||
|
clip-path="none" /></g></clipPath></defs><g
|
||||||
|
inkscape:label="Logo_NanoGall"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="Logo_NanoGall"
|
||||||
|
transform="translate(-37.266665,-89.894037)"
|
||||||
|
style="display:inline"><text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:22.5778px;display:inline;fill:#cc2027;fill-opacity:1;stroke:none;stroke-width:2.5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
x="58.862236"
|
||||||
|
y="209.03917"
|
||||||
|
id="nanogal_text"
|
||||||
|
inkscape:label="nanogal_text"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan5"
|
||||||
|
style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.5778px;font-family:Serif;-inkscape-font-specification:'Serif, Italic';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#cc2027;fill-opacity:1;stroke:none;stroke-width:2.5;stroke-opacity:1"
|
||||||
|
x="58.862236"
|
||||||
|
y="209.03917">NanoGal</tspan></text><path
|
||||||
|
id="rotate_frame"
|
||||||
|
style="display:inline;fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:2.37699;stroke-opacity:1"
|
||||||
|
inkscape:label="rotate_frame"
|
||||||
|
d="m 104.99999,110.24776 32.14959,32.14959 -32.14959,32.14959 -32.149586,-32.14959 z" /><rect
|
||||||
|
id="frame"
|
||||||
|
width="65.765366"
|
||||||
|
height="65.765366"
|
||||||
|
x="72.11731"
|
||||||
|
y="109.51466"
|
||||||
|
ry="5.7285228"
|
||||||
|
style="display:inline;fill:none;fill-opacity:0;stroke:#cc2027;stroke-width:2.5;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
inkscape:label="frame" /><path
|
||||||
|
id="stroke_circle"
|
||||||
|
style="display:inline;fill:none;fill-opacity:1;stroke:#000000;stroke-width:2.338;stroke-dasharray:none"
|
||||||
|
inkscape:label="stroke_circle"
|
||||||
|
d="m 125.87227,142.39736 a 20.872282,20.872282 0 0 1 -20.87228,20.87228 20.872282,20.872282 0 0 1 -20.87228,-20.87228 20.872282,20.872282 0 0 1 20.87228,-20.87229 20.872282,20.872282 0 0 1 20.87228,20.87229 z" /><ellipse
|
||||||
|
style="display:inline;fill:#030101;fill-opacity:1;stroke:none;stroke-width:2.19651;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="circle_1"
|
||||||
|
cx="104.99999"
|
||||||
|
cy="142.39734"
|
||||||
|
inkscape:label="circle_1"
|
||||||
|
rx="9.6212282"
|
||||||
|
ry="9.7036562" /><circle
|
||||||
|
style="display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="circle_3"
|
||||||
|
cx="128.53357"
|
||||||
|
cy="119.42059"
|
||||||
|
r="3.1733704"
|
||||||
|
inkscape:label="circle_3" /><circle
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="circle_2"
|
||||||
|
cx="111.94584"
|
||||||
|
cy="135.63322"
|
||||||
|
r="4.5959158"
|
||||||
|
inkscape:label="circle_2" /><g
|
||||||
|
id="cut_frame"
|
||||||
|
inkscape:label="cut_frame"
|
||||||
|
style="display:inline;fill:#ff0000;stroke:#000000;stroke-opacity:1"
|
||||||
|
transform="translate(-7.1666667e-6,-6.1026577)"><path
|
||||||
|
id="rect5"
|
||||||
|
clip-path="none"
|
||||||
|
style="display:inline;fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:2.36105;stroke-opacity:1"
|
||||||
|
inkscape:label="bottom_left_corner"
|
||||||
|
d="m 73.370482,187.88879 h -2.615339 c -2.849724,0 -5.143922,-2.29419 -5.143922,-5.14393 l 10e-7,-2.6076" /><path
|
||||||
|
id="path14"
|
||||||
|
clip-path="none"
|
||||||
|
style="display:inline;fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:2.36105;stroke-opacity:1"
|
||||||
|
inkscape:label="bottom_right_corner"
|
||||||
|
d="m 144.38879,180.12537 v 2.61949 c 0,2.84974 -2.29419,5.14393 -5.14393,5.14393 h -2.59053" /><path
|
||||||
|
id="path13"
|
||||||
|
style="display:inline;fill:#ff0000;fill-opacity:0;stroke:#000000;stroke-width:2.36105;stroke-opacity:1"
|
||||||
|
d="m 136.65794,109.11122 h 2.58692 c 2.84974,0 5.14393,2.29419 5.14393,5.14392 v 2.55231"
|
||||||
|
inkscape:label="top_right_corner" /><path
|
||||||
|
id="path15"
|
||||||
|
style="display:inline;fill:none;fill-opacity:0;stroke:#000000;stroke-width:2.36105;stroke-opacity:1"
|
||||||
|
d="m 65.611221,116.81934 v -2.5642 c 0,-2.84973 2.294198,-5.14392 5.143922,-5.14392 v 0 h 2.60707"
|
||||||
|
inkscape:label="top_left_corner" /></g></g></svg>
|
After Width: | Height: | Size: 6.3 KiB |
22
ressources/nanogal_text_opti.svg
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<svg width="512" height="512" viewBox="0 0 135.467 135.467" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g transform="translate(-37.267 -89.894)"><text x="58.862" y="209.039" font-size="22.578" fill="#cc2027"
|
||||||
|
stroke-width="2.5">
|
||||||
|
<tspan
|
||||||
|
style="-inkscape-font-specification:'Serif, Italic';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal"
|
||||||
|
x="58.862" y="209.039" font-style="italic" font-weight="400" font-family="Serif">NanoGal</tspan>
|
||||||
|
</text>
|
||||||
|
<path d="M105 110.248l32.15 32.15L105 174.546l-32.15-32.15z" fill="none" stroke="#000" stroke-width="2.377" />
|
||||||
|
<rect width="65.765" height="65.765" x="72.117" y="109.515" ry="5.729" fill="none" stroke="#cc2027"
|
||||||
|
stroke-width="2.5" />
|
||||||
|
<path
|
||||||
|
d="M125.872 142.397A20.872 20.872 0 01105 163.27a20.872 20.872 0 01-20.872-20.873A20.872 20.872 0 01105 121.525a20.872 20.872 0 0120.872 20.872z"
|
||||||
|
fill="none" stroke="#000" stroke-width="2.338" />
|
||||||
|
<ellipse cx="105" cy="142.397" rx="9.621" ry="9.704" fill="#030101" />
|
||||||
|
<circle cx="128.534" cy="119.421" r="3.173" />
|
||||||
|
<circle cx="111.946" cy="135.633" r="4.596" fill="#fff" />
|
||||||
|
<g fill="none" stroke="#000" stroke-width="2.361">
|
||||||
|
<path
|
||||||
|
d="M73.37 181.786h-2.615a5.133 5.133 0 01-5.144-5.144v-2.607M144.389 174.023v2.62a5.133 5.133 0 01-5.144 5.143h-2.59M136.658 103.009h2.587a5.133 5.133 0 015.144 5.143v2.553M65.611 110.717v-2.565a5.133 5.133 0 015.144-5.143h2.607" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.5 KiB |