diff options
| author | Tolmachev Igor <me@igorek.dev> | 2026-05-15 22:50:00 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2026-05-16 23:54:32 +0300 |
| commit | 75e1481287c007fafc5d7897d03cbcbc58eb0da7 (patch) | |
| tree | beea90891978a5a7dc71c6bd6faa8316b88c3fc1 | |
| download | mirror_pages-75e1481287c007fafc5d7897d03cbcbc58eb0da7.tar.gz mirror_pages-75e1481287c007fafc5d7897d03cbcbc58eb0da7.zip | |
| -rw-r--r-- | LICENSE | 674 | ||||
| -rw-r--r-- | README.md | 16 | ||||
| -rw-r--r-- | browse.html | 1181 |
3 files changed, 1871 insertions, 0 deletions
| @@ -0,0 +1,674 @@ | |||
| 1 | GNU GENERAL PUBLIC LICENSE | ||
| 2 | Version 3, 29 June 2007 | ||
| 3 | |||
| 4 | Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> | ||
| 5 | Everyone is permitted to copy and distribute verbatim copies | ||
| 6 | of this license document, but changing it is not allowed. | ||
| 7 | |||
| 8 | Preamble | ||
| 9 | |||
| 10 | The GNU General Public License is a free, copyleft license for | ||
| 11 | software and other kinds of works. | ||
| 12 | |||
| 13 | The licenses for most software and other practical works are designed | ||
| 14 | to take away your freedom to share and change the works. By contrast, | ||
| 15 | the GNU General Public License is intended to guarantee your freedom to | ||
| 16 | share and change all versions of a program--to make sure it remains free | ||
| 17 | software for all its users. We, the Free Software Foundation, use the | ||
| 18 | GNU General Public License for most of our software; it applies also to | ||
| 19 | any other work released this way by its authors. You can apply it to | ||
| 20 | your programs, too. | ||
| 21 | |||
| 22 | When we speak of free software, we are referring to freedom, not | ||
| 23 | price. Our General Public Licenses are designed to make sure that you | ||
| 24 | have the freedom to distribute copies of free software (and charge for | ||
| 25 | them if you wish), that you receive source code or can get it if you | ||
| 26 | want it, that you can change the software or use pieces of it in new | ||
| 27 | free programs, and that you know you can do these things. | ||
| 28 | |||
| 29 | To protect your rights, we need to prevent others from denying you | ||
| 30 | these rights or asking you to surrender the rights. Therefore, you have | ||
| 31 | certain responsibilities if you distribute copies of the software, or if | ||
| 32 | you modify it: responsibilities to respect the freedom of others. | ||
| 33 | |||
| 34 | For example, if you distribute copies of such a program, whether | ||
| 35 | gratis or for a fee, you must pass on to the recipients the same | ||
| 36 | freedoms that you received. You must make sure that they, too, receive | ||
| 37 | or can get the source code. And you must show them these terms so they | ||
| 38 | know their rights. | ||
| 39 | |||
| 40 | Developers that use the GNU GPL protect your rights with two steps: | ||
| 41 | (1) assert copyright on the software, and (2) offer you this License | ||
| 42 | giving you legal permission to copy, distribute and/or modify it. | ||
| 43 | |||
| 44 | For the developers' and authors' protection, the GPL clearly explains | ||
| 45 | that there is no warranty for this free software. For both users' and | ||
| 46 | authors' sake, the GPL requires that modified versions be marked as | ||
| 47 | changed, so that their problems will not be attributed erroneously to | ||
| 48 | authors of previous versions. | ||
| 49 | |||
| 50 | Some devices are designed to deny users access to install or run | ||
| 51 | modified versions of the software inside them, although the manufacturer | ||
| 52 | can do so. This is fundamentally incompatible with the aim of | ||
| 53 | protecting users' freedom to change the software. The systematic | ||
| 54 | pattern of such abuse occurs in the area of products for individuals to | ||
| 55 | use, which is precisely where it is most unacceptable. Therefore, we | ||
| 56 | have designed this version of the GPL to prohibit the practice for those | ||
| 57 | products. If such problems arise substantially in other domains, we | ||
| 58 | stand ready to extend this provision to those domains in future versions | ||
| 59 | of the GPL, as needed to protect the freedom of users. | ||
| 60 | |||
| 61 | Finally, every program is threatened constantly by software patents. | ||
| 62 | States should not allow patents to restrict development and use of | ||
| 63 | software on general-purpose computers, but in those that do, we wish to | ||
| 64 | avoid the special danger that patents applied to a free program could | ||
| 65 | make it effectively proprietary. To prevent this, the GPL assures that | ||
| 66 | patents cannot be used to render the program non-free. | ||
| 67 | |||
| 68 | The precise terms and conditions for copying, distribution and | ||
| 69 | modification follow. | ||
| 70 | |||
| 71 | TERMS AND CONDITIONS | ||
| 72 | |||
| 73 | 0. Definitions. | ||
| 74 | |||
| 75 | "This License" refers to version 3 of the GNU General Public License. | ||
| 76 | |||
| 77 | "Copyright" also means copyright-like laws that apply to other kinds of | ||
| 78 | works, such as semiconductor masks. | ||
| 79 | |||
| 80 | "The Program" refers to any copyrightable work licensed under this | ||
| 81 | License. Each licensee is addressed as "you". "Licensees" and | ||
| 82 | "recipients" may be individuals or organizations. | ||
| 83 | |||
| 84 | To "modify" a work means to copy from or adapt all or part of the work | ||
| 85 | in a fashion requiring copyright permission, other than the making of an | ||
| 86 | exact copy. The resulting work is called a "modified version" of the | ||
| 87 | earlier work or a work "based on" the earlier work. | ||
| 88 | |||
| 89 | A "covered work" means either the unmodified Program or a work based | ||
| 90 | on the Program. | ||
| 91 | |||
| 92 | To "propagate" a work means to do anything with it that, without | ||
| 93 | permission, would make you directly or secondarily liable for | ||
| 94 | infringement under applicable copyright law, except executing it on a | ||
| 95 | computer or modifying a private copy. Propagation includes copying, | ||
| 96 | distribution (with or without modification), making available to the | ||
| 97 | public, and in some countries other activities as well. | ||
| 98 | |||
| 99 | To "convey" a work means any kind of propagation that enables other | ||
| 100 | parties to make or receive copies. Mere interaction with a user through | ||
| 101 | a computer network, with no transfer of a copy, is not conveying. | ||
| 102 | |||
| 103 | An interactive user interface displays "Appropriate Legal Notices" | ||
| 104 | to the extent that it includes a convenient and prominently visible | ||
| 105 | feature that (1) displays an appropriate copyright notice, and (2) | ||
| 106 | tells the user that there is no warranty for the work (except to the | ||
| 107 | extent that warranties are provided), that licensees may convey the | ||
| 108 | work under this License, and how to view a copy of this License. If | ||
| 109 | the interface presents a list of user commands or options, such as a | ||
| 110 | menu, a prominent item in the list meets this criterion. | ||
| 111 | |||
| 112 | 1. Source Code. | ||
| 113 | |||
| 114 | The "source code" for a work means the preferred form of the work | ||
| 115 | for making modifications to it. "Object code" means any non-source | ||
| 116 | form of a work. | ||
| 117 | |||
| 118 | A "Standard Interface" means an interface that either is an official | ||
| 119 | standard defined by a recognized standards body, or, in the case of | ||
| 120 | interfaces specified for a particular programming language, one that | ||
| 121 | is widely used among developers working in that language. | ||
| 122 | |||
| 123 | The "System Libraries" of an executable work include anything, other | ||
| 124 | than the work as a whole, that (a) is included in the normal form of | ||
| 125 | packaging a Major Component, but which is not part of that Major | ||
| 126 | Component, and (b) serves only to enable use of the work with that | ||
| 127 | Major Component, or to implement a Standard Interface for which an | ||
| 128 | implementation is available to the public in source code form. A | ||
| 129 | "Major Component", in this context, means a major essential component | ||
| 130 | (kernel, window system, and so on) of the specific operating system | ||
| 131 | (if any) on which the executable work runs, or a compiler used to | ||
| 132 | produce the work, or an object code interpreter used to run it. | ||
| 133 | |||
| 134 | The "Corresponding Source" for a work in object code form means all | ||
| 135 | the source code needed to generate, install, and (for an executable | ||
| 136 | work) run the object code and to modify the work, including scripts to | ||
| 137 | control those activities. However, it does not include the work's | ||
| 138 | System Libraries, or general-purpose tools or generally available free | ||
| 139 | programs which are used unmodified in performing those activities but | ||
| 140 | which are not part of the work. For example, Corresponding Source | ||
| 141 | includes interface definition files associated with source files for | ||
| 142 | the work, and the source code for shared libraries and dynamically | ||
| 143 | linked subprograms that the work is specifically designed to require, | ||
| 144 | such as by intimate data communication or control flow between those | ||
| 145 | subprograms and other parts of the work. | ||
| 146 | |||
| 147 | The Corresponding Source need not include anything that users | ||
| 148 | can regenerate automatically from other parts of the Corresponding | ||
| 149 | Source. | ||
| 150 | |||
| 151 | The Corresponding Source for a work in source code form is that | ||
| 152 | same work. | ||
| 153 | |||
| 154 | 2. Basic Permissions. | ||
| 155 | |||
| 156 | All rights granted under this License are granted for the term of | ||
| 157 | copyright on the Program, and are irrevocable provided the stated | ||
| 158 | conditions are met. This License explicitly affirms your unlimited | ||
| 159 | permission to run the unmodified Program. The output from running a | ||
| 160 | covered work is covered by this License only if the output, given its | ||
| 161 | content, constitutes a covered work. This License acknowledges your | ||
| 162 | rights of fair use or other equivalent, as provided by copyright law. | ||
| 163 | |||
| 164 | You may make, run and propagate covered works that you do not | ||
| 165 | convey, without conditions so long as your license otherwise remains | ||
| 166 | in force. You may convey covered works to others for the sole purpose | ||
| 167 | of having them make modifications exclusively for you, or provide you | ||
| 168 | with facilities for running those works, provided that you comply with | ||
| 169 | the terms of this License in conveying all material for which you do | ||
| 170 | not control copyright. Those thus making or running the covered works | ||
| 171 | for you must do so exclusively on your behalf, under your direction | ||
| 172 | and control, on terms that prohibit them from making any copies of | ||
| 173 | your copyrighted material outside their relationship with you. | ||
| 174 | |||
| 175 | Conveying under any other circumstances is permitted solely under | ||
| 176 | the conditions stated below. Sublicensing is not allowed; section 10 | ||
| 177 | makes it unnecessary. | ||
| 178 | |||
| 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. | ||
| 180 | |||
| 181 | No covered work shall be deemed part of an effective technological | ||
| 182 | measure under any applicable law fulfilling obligations under article | ||
| 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or | ||
| 184 | similar laws prohibiting or restricting circumvention of such | ||
| 185 | measures. | ||
| 186 | |||
| 187 | When you convey a covered work, you waive any legal power to forbid | ||
| 188 | circumvention of technological measures to the extent such circumvention | ||
| 189 | is effected by exercising rights under this License with respect to | ||
| 190 | the covered work, and you disclaim any intention to limit operation or | ||
| 191 | modification of the work as a means of enforcing, against the work's | ||
| 192 | users, your or third parties' legal rights to forbid circumvention of | ||
| 193 | technological measures. | ||
| 194 | |||
| 195 | 4. Conveying Verbatim Copies. | ||
| 196 | |||
| 197 | You may convey verbatim copies of the Program's source code as you | ||
| 198 | receive it, in any medium, provided that you conspicuously and | ||
| 199 | appropriately publish on each copy an appropriate copyright notice; | ||
| 200 | keep intact all notices stating that this License and any | ||
| 201 | non-permissive terms added in accord with section 7 apply to the code; | ||
| 202 | keep intact all notices of the absence of any warranty; and give all | ||
| 203 | recipients a copy of this License along with the Program. | ||
| 204 | |||
| 205 | You may charge any price or no price for each copy that you convey, | ||
| 206 | and you may offer support or warranty protection for a fee. | ||
| 207 | |||
| 208 | 5. Conveying Modified Source Versions. | ||
| 209 | |||
| 210 | You may convey a work based on the Program, or the modifications to | ||
| 211 | produce it from the Program, in the form of source code under the | ||
| 212 | terms of section 4, provided that you also meet all of these conditions: | ||
| 213 | |||
| 214 | a) The work must carry prominent notices stating that you modified | ||
| 215 | it, and giving a relevant date. | ||
| 216 | |||
| 217 | b) The work must carry prominent notices stating that it is | ||
| 218 | released under this License and any conditions added under section | ||
| 219 | 7. This requirement modifies the requirement in section 4 to | ||
| 220 | "keep intact all notices". | ||
| 221 | |||
| 222 | c) You must license the entire work, as a whole, under this | ||
| 223 | License to anyone who comes into possession of a copy. This | ||
| 224 | License will therefore apply, along with any applicable section 7 | ||
| 225 | additional terms, to the whole of the work, and all its parts, | ||
| 226 | regardless of how they are packaged. This License gives no | ||
| 227 | permission to license the work in any other way, but it does not | ||
| 228 | invalidate such permission if you have separately received it. | ||
| 229 | |||
| 230 | d) If the work has interactive user interfaces, each must display | ||
| 231 | Appropriate Legal Notices; however, if the Program has interactive | ||
| 232 | interfaces that do not display Appropriate Legal Notices, your | ||
| 233 | work need not make them do so. | ||
| 234 | |||
| 235 | A compilation of a covered work with other separate and independent | ||
| 236 | works, which are not by their nature extensions of the covered work, | ||
| 237 | and which are not combined with it such as to form a larger program, | ||
| 238 | in or on a volume of a storage or distribution medium, is called an | ||
| 239 | "aggregate" if the compilation and its resulting copyright are not | ||
| 240 | used to limit the access or legal rights of the compilation's users | ||
| 241 | beyond what the individual works permit. Inclusion of a covered work | ||
| 242 | in an aggregate does not cause this License to apply to the other | ||
| 243 | parts of the aggregate. | ||
| 244 | |||
| 245 | 6. Conveying Non-Source Forms. | ||
| 246 | |||
| 247 | You may convey a covered work in object code form under the terms | ||
| 248 | of sections 4 and 5, provided that you also convey the | ||
| 249 | machine-readable Corresponding Source under the terms of this License, | ||
| 250 | in one of these ways: | ||
| 251 | |||
| 252 | a) Convey the object code in, or embodied in, a physical product | ||
| 253 | (including a physical distribution medium), accompanied by the | ||
| 254 | Corresponding Source fixed on a durable physical medium | ||
| 255 | customarily used for software interchange. | ||
| 256 | |||
| 257 | b) Convey the object code in, or embodied in, a physical product | ||
| 258 | (including a physical distribution medium), accompanied by a | ||
| 259 | written offer, valid for at least three years and valid for as | ||
| 260 | long as you offer spare parts or customer support for that product | ||
| 261 | model, to give anyone who possesses the object code either (1) a | ||
| 262 | copy of the Corresponding Source for all the software in the | ||
| 263 | product that is covered by this License, on a durable physical | ||
| 264 | medium customarily used for software interchange, for a price no | ||
| 265 | more than your reasonable cost of physically performing this | ||
| 266 | conveying of source, or (2) access to copy the | ||
| 267 | Corresponding Source from a network server at no charge. | ||
| 268 | |||
| 269 | c) Convey individual copies of the object code with a copy of the | ||
| 270 | written offer to provide the Corresponding Source. This | ||
| 271 | alternative is allowed only occasionally and noncommercially, and | ||
| 272 | only if you received the object code with such an offer, in accord | ||
| 273 | with subsection 6b. | ||
| 274 | |||
| 275 | d) Convey the object code by offering access from a designated | ||
| 276 | place (gratis or for a charge), and offer equivalent access to the | ||
| 277 | Corresponding Source in the same way through the same place at no | ||
| 278 | further charge. You need not require recipients to copy the | ||
| 279 | Corresponding Source along with the object code. If the place to | ||
| 280 | copy the object code is a network server, the Corresponding Source | ||
| 281 | may be on a different server (operated by you or a third party) | ||
| 282 | that supports equivalent copying facilities, provided you maintain | ||
| 283 | clear directions next to the object code saying where to find the | ||
| 284 | Corresponding Source. Regardless of what server hosts the | ||
| 285 | Corresponding Source, you remain obligated to ensure that it is | ||
| 286 | available for as long as needed to satisfy these requirements. | ||
| 287 | |||
| 288 | e) Convey the object code using peer-to-peer transmission, provided | ||
| 289 | you inform other peers where the object code and Corresponding | ||
| 290 | Source of the work are being offered to the general public at no | ||
| 291 | charge under subsection 6d. | ||
| 292 | |||
| 293 | A separable portion of the object code, whose source code is excluded | ||
| 294 | from the Corresponding Source as a System Library, need not be | ||
| 295 | included in conveying the object code work. | ||
| 296 | |||
| 297 | A "User Product" is either (1) a "consumer product", which means any | ||
| 298 | tangible personal property which is normally used for personal, family, | ||
| 299 | or household purposes, or (2) anything designed or sold for incorporation | ||
| 300 | into a dwelling. In determining whether a product is a consumer product, | ||
| 301 | doubtful cases shall be resolved in favor of coverage. For a particular | ||
| 302 | product received by a particular user, "normally used" refers to a | ||
| 303 | typical or common use of that class of product, regardless of the status | ||
| 304 | of the particular user or of the way in which the particular user | ||
| 305 | actually uses, or expects or is expected to use, the product. A product | ||
| 306 | is a consumer product regardless of whether the product has substantial | ||
| 307 | commercial, industrial or non-consumer uses, unless such uses represent | ||
| 308 | the only significant mode of use of the product. | ||
| 309 | |||
| 310 | "Installation Information" for a User Product means any methods, | ||
| 311 | procedures, authorization keys, or other information required to install | ||
| 312 | and execute modified versions of a covered work in that User Product from | ||
| 313 | a modified version of its Corresponding Source. The information must | ||
| 314 | suffice to ensure that the continued functioning of the modified object | ||
| 315 | code is in no case prevented or interfered with solely because | ||
| 316 | modification has been made. | ||
| 317 | |||
| 318 | If you convey an object code work under this section in, or with, or | ||
| 319 | specifically for use in, a User Product, and the conveying occurs as | ||
| 320 | part of a transaction in which the right of possession and use of the | ||
| 321 | User Product is transferred to the recipient in perpetuity or for a | ||
| 322 | fixed term (regardless of how the transaction is characterized), the | ||
| 323 | Corresponding Source conveyed under this section must be accompanied | ||
| 324 | by the Installation Information. But this requirement does not apply | ||
| 325 | if neither you nor any third party retains the ability to install | ||
| 326 | modified object code on the User Product (for example, the work has | ||
| 327 | been installed in ROM). | ||
| 328 | |||
| 329 | The requirement to provide Installation Information does not include a | ||
| 330 | requirement to continue to provide support service, warranty, or updates | ||
| 331 | for a work that has been modified or installed by the recipient, or for | ||
| 332 | the User Product in which it has been modified or installed. Access to a | ||
| 333 | network may be denied when the modification itself materially and | ||
| 334 | adversely affects the operation of the network or violates the rules and | ||
| 335 | protocols for communication across the network. | ||
| 336 | |||
| 337 | Corresponding Source conveyed, and Installation Information provided, | ||
| 338 | in accord with this section must be in a format that is publicly | ||
| 339 | documented (and with an implementation available to the public in | ||
| 340 | source code form), and must require no special password or key for | ||
| 341 | unpacking, reading or copying. | ||
| 342 | |||
| 343 | 7. Additional Terms. | ||
| 344 | |||
| 345 | "Additional permissions" are terms that supplement the terms of this | ||
| 346 | License by making exceptions from one or more of its conditions. | ||
| 347 | Additional permissions that are applicable to the entire Program shall | ||
| 348 | be treated as though they were included in this License, to the extent | ||
| 349 | that they are valid under applicable law. If additional permissions | ||
| 350 | apply only to part of the Program, that part may be used separately | ||
| 351 | under those permissions, but the entire Program remains governed by | ||
| 352 | this License without regard to the additional permissions. | ||
| 353 | |||
| 354 | When you convey a copy of a covered work, you may at your option | ||
| 355 | remove any additional permissions from that copy, or from any part of | ||
| 356 | it. (Additional permissions may be written to require their own | ||
| 357 | removal in certain cases when you modify the work.) You may place | ||
| 358 | additional permissions on material, added by you to a covered work, | ||
| 359 | for which you have or can give appropriate copyright permission. | ||
| 360 | |||
| 361 | Notwithstanding any other provision of this License, for material you | ||
| 362 | add to a covered work, you may (if authorized by the copyright holders of | ||
| 363 | that material) supplement the terms of this License with terms: | ||
| 364 | |||
| 365 | a) Disclaiming warranty or limiting liability differently from the | ||
| 366 | terms of sections 15 and 16 of this License; or | ||
| 367 | |||
| 368 | b) Requiring preservation of specified reasonable legal notices or | ||
| 369 | author attributions in that material or in the Appropriate Legal | ||
| 370 | Notices displayed by works containing it; or | ||
| 371 | |||
| 372 | c) Prohibiting misrepresentation of the origin of that material, or | ||
| 373 | requiring that modified versions of such material be marked in | ||
| 374 | reasonable ways as different from the original version; or | ||
| 375 | |||
| 376 | d) Limiting the use for publicity purposes of names of licensors or | ||
| 377 | authors of the material; or | ||
| 378 | |||
| 379 | e) Declining to grant rights under trademark law for use of some | ||
| 380 | trade names, trademarks, or service marks; or | ||
| 381 | |||
| 382 | f) Requiring indemnification of licensors and authors of that | ||
| 383 | material by anyone who conveys the material (or modified versions of | ||
| 384 | it) with contractual assumptions of liability to the recipient, for | ||
| 385 | any liability that these contractual assumptions directly impose on | ||
| 386 | those licensors and authors. | ||
| 387 | |||
| 388 | All other non-permissive additional terms are considered "further | ||
| 389 | restrictions" within the meaning of section 10. If the Program as you | ||
| 390 | received it, or any part of it, contains a notice stating that it is | ||
| 391 | governed by this License along with a term that is a further | ||
| 392 | restriction, you may remove that term. If a license document contains | ||
| 393 | a further restriction but permits relicensing or conveying under this | ||
| 394 | License, you may add to a covered work material governed by the terms | ||
| 395 | of that license document, provided that the further restriction does | ||
| 396 | not survive such relicensing or conveying. | ||
| 397 | |||
| 398 | If you add terms to a covered work in accord with this section, you | ||
| 399 | must place, in the relevant source files, a statement of the | ||
| 400 | additional terms that apply to those files, or a notice indicating | ||
| 401 | where to find the applicable terms. | ||
| 402 | |||
| 403 | Additional terms, permissive or non-permissive, may be stated in the | ||
| 404 | form of a separately written license, or stated as exceptions; | ||
| 405 | the above requirements apply either way. | ||
| 406 | |||
| 407 | 8. Termination. | ||
| 408 | |||
| 409 | You may not propagate or modify a covered work except as expressly | ||
| 410 | provided under this License. Any attempt otherwise to propagate or | ||
| 411 | modify it is void, and will automatically terminate your rights under | ||
| 412 | this License (including any patent licenses granted under the third | ||
| 413 | paragraph of section 11). | ||
| 414 | |||
| 415 | However, if you cease all violation of this License, then your | ||
| 416 | license from a particular copyright holder is reinstated (a) | ||
| 417 | provisionally, unless and until the copyright holder explicitly and | ||
| 418 | finally terminates your license, and (b) permanently, if the copyright | ||
| 419 | holder fails to notify you of the violation by some reasonable means | ||
| 420 | prior to 60 days after the cessation. | ||
| 421 | |||
| 422 | Moreover, your license from a particular copyright holder is | ||
| 423 | reinstated permanently if the copyright holder notifies you of the | ||
| 424 | violation by some reasonable means, this is the first time you have | ||
| 425 | received notice of violation of this License (for any work) from that | ||
| 426 | copyright holder, and you cure the violation prior to 30 days after | ||
| 427 | your receipt of the notice. | ||
| 428 | |||
| 429 | Termination of your rights under this section does not terminate the | ||
| 430 | licenses of parties who have received copies or rights from you under | ||
| 431 | this License. If your rights have been terminated and not permanently | ||
| 432 | reinstated, you do not qualify to receive new licenses for the same | ||
| 433 | material under section 10. | ||
| 434 | |||
| 435 | 9. Acceptance Not Required for Having Copies. | ||
| 436 | |||
| 437 | You are not required to accept this License in order to receive or | ||
| 438 | run a copy of the Program. Ancillary propagation of a covered work | ||
| 439 | occurring solely as a consequence of using peer-to-peer transmission | ||
| 440 | to receive a copy likewise does not require acceptance. However, | ||
| 441 | nothing other than this License grants you permission to propagate or | ||
| 442 | modify any covered work. These actions infringe copyright if you do | ||
| 443 | not accept this License. Therefore, by modifying or propagating a | ||
| 444 | covered work, you indicate your acceptance of this License to do so. | ||
| 445 | |||
| 446 | 10. Automatic Licensing of Downstream Recipients. | ||
| 447 | |||
| 448 | Each time you convey a covered work, the recipient automatically | ||
| 449 | receives a license from the original licensors, to run, modify and | ||
| 450 | propagate that work, subject to this License. You are not responsible | ||
| 451 | for enforcing compliance by third parties with this License. | ||
| 452 | |||
| 453 | An "entity transaction" is a transaction transferring control of an | ||
| 454 | organization, or substantially all assets of one, or subdividing an | ||
| 455 | organization, or merging organizations. If propagation of a covered | ||
| 456 | work results from an entity transaction, each party to that | ||
| 457 | transaction who receives a copy of the work also receives whatever | ||
| 458 | licenses to the work the party's predecessor in interest had or could | ||
| 459 | give under the previous paragraph, plus a right to possession of the | ||
| 460 | Corresponding Source of the work from the predecessor in interest, if | ||
| 461 | the predecessor has it or can get it with reasonable efforts. | ||
| 462 | |||
| 463 | You may not impose any further restrictions on the exercise of the | ||
| 464 | rights granted or affirmed under this License. For example, you may | ||
| 465 | not impose a license fee, royalty, or other charge for exercise of | ||
| 466 | rights granted under this License, and you may not initiate litigation | ||
| 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that | ||
| 468 | any patent claim is infringed by making, using, selling, offering for | ||
| 469 | sale, or importing the Program or any portion of it. | ||
| 470 | |||
| 471 | 11. Patents. | ||
| 472 | |||
| 473 | A "contributor" is a copyright holder who authorizes use under this | ||
| 474 | License of the Program or a work on which the Program is based. The | ||
| 475 | work thus licensed is called the contributor's "contributor version". | ||
| 476 | |||
| 477 | A contributor's "essential patent claims" are all patent claims | ||
| 478 | owned or controlled by the contributor, whether already acquired or | ||
| 479 | hereafter acquired, that would be infringed by some manner, permitted | ||
| 480 | by this License, of making, using, or selling its contributor version, | ||
| 481 | but do not include claims that would be infringed only as a | ||
| 482 | consequence of further modification of the contributor version. For | ||
| 483 | purposes of this definition, "control" includes the right to grant | ||
| 484 | patent sublicenses in a manner consistent with the requirements of | ||
| 485 | this License. | ||
| 486 | |||
| 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free | ||
| 488 | patent license under the contributor's essential patent claims, to | ||
| 489 | make, use, sell, offer for sale, import and otherwise run, modify and | ||
| 490 | propagate the contents of its contributor version. | ||
| 491 | |||
| 492 | In the following three paragraphs, a "patent license" is any express | ||
| 493 | agreement or commitment, however denominated, not to enforce a patent | ||
| 494 | (such as an express permission to practice a patent or covenant not to | ||
| 495 | sue for patent infringement). To "grant" such a patent license to a | ||
| 496 | party means to make such an agreement or commitment not to enforce a | ||
| 497 | patent against the party. | ||
| 498 | |||
| 499 | If you convey a covered work, knowingly relying on a patent license, | ||
| 500 | and the Corresponding Source of the work is not available for anyone | ||
| 501 | to copy, free of charge and under the terms of this License, through a | ||
| 502 | publicly available network server or other readily accessible means, | ||
| 503 | then you must either (1) cause the Corresponding Source to be so | ||
| 504 | available, or (2) arrange to deprive yourself of the benefit of the | ||
| 505 | patent license for this particular work, or (3) arrange, in a manner | ||
| 506 | consistent with the requirements of this License, to extend the patent | ||
| 507 | license to downstream recipients. "Knowingly relying" means you have | ||
| 508 | actual knowledge that, but for the patent license, your conveying the | ||
| 509 | covered work in a country, or your recipient's use of the covered work | ||
| 510 | in a country, would infringe one or more identifiable patents in that | ||
| 511 | country that you have reason to believe are valid. | ||
| 512 | |||
| 513 | If, pursuant to or in connection with a single transaction or | ||
| 514 | arrangement, you convey, or propagate by procuring conveyance of, a | ||
| 515 | covered work, and grant a patent license to some of the parties | ||
| 516 | receiving the covered work authorizing them to use, propagate, modify | ||
| 517 | or convey a specific copy of the covered work, then the patent license | ||
| 518 | you grant is automatically extended to all recipients of the covered | ||
| 519 | work and works based on it. | ||
| 520 | |||
| 521 | A patent license is "discriminatory" if it does not include within | ||
| 522 | the scope of its coverage, prohibits the exercise of, or is | ||
| 523 | conditioned on the non-exercise of one or more of the rights that are | ||
| 524 | specifically granted under this License. You may not convey a covered | ||
| 525 | work if you are a party to an arrangement with a third party that is | ||
| 526 | in the business of distributing software, under which you make payment | ||
| 527 | to the third party based on the extent of your activity of conveying | ||
| 528 | the work, and under which the third party grants, to any of the | ||
| 529 | parties who would receive the covered work from you, a discriminatory | ||
| 530 | patent license (a) in connection with copies of the covered work | ||
| 531 | conveyed by you (or copies made from those copies), or (b) primarily | ||
| 532 | for and in connection with specific products or compilations that | ||
| 533 | contain the covered work, unless you entered into that arrangement, | ||
| 534 | or that patent license was granted, prior to 28 March 2007. | ||
| 535 | |||
| 536 | Nothing in this License shall be construed as excluding or limiting | ||
| 537 | any implied license or other defenses to infringement that may | ||
| 538 | otherwise be available to you under applicable patent law. | ||
| 539 | |||
| 540 | 12. No Surrender of Others' Freedom. | ||
| 541 | |||
| 542 | If conditions are imposed on you (whether by court order, agreement or | ||
| 543 | otherwise) that contradict the conditions of this License, they do not | ||
| 544 | excuse you from the conditions of this License. If you cannot convey a | ||
| 545 | covered work so as to satisfy simultaneously your obligations under this | ||
| 546 | License and any other pertinent obligations, then as a consequence you may | ||
| 547 | not convey it at all. For example, if you agree to terms that obligate you | ||
| 548 | to collect a royalty for further conveying from those to whom you convey | ||
| 549 | the Program, the only way you could satisfy both those terms and this | ||
| 550 | License would be to refrain entirely from conveying the Program. | ||
| 551 | |||
| 552 | 13. Use with the GNU Affero General Public License. | ||
| 553 | |||
| 554 | Notwithstanding any other provision of this License, you have | ||
| 555 | permission to link or combine any covered work with a work licensed | ||
| 556 | under version 3 of the GNU Affero General Public License into a single | ||
| 557 | combined work, and to convey the resulting work. The terms of this | ||
| 558 | License will continue to apply to the part which is the covered work, | ||
| 559 | but the special requirements of the GNU Affero General Public License, | ||
| 560 | section 13, concerning interaction through a network will apply to the | ||
| 561 | combination as such. | ||
| 562 | |||
| 563 | 14. Revised Versions of this License. | ||
| 564 | |||
| 565 | The Free Software Foundation may publish revised and/or new versions of | ||
| 566 | the GNU General Public License from time to time. Such new versions will | ||
| 567 | be similar in spirit to the present version, but may differ in detail to | ||
| 568 | address new problems or concerns. | ||
| 569 | |||
| 570 | Each version is given a distinguishing version number. If the | ||
| 571 | Program specifies that a certain numbered version of the GNU General | ||
| 572 | Public License "or any later version" applies to it, you have the | ||
| 573 | option of following the terms and conditions either of that numbered | ||
| 574 | version or of any later version published by the Free Software | ||
| 575 | Foundation. If the Program does not specify a version number of the | ||
| 576 | GNU General Public License, you may choose any version ever published | ||
| 577 | by the Free Software Foundation. | ||
| 578 | |||
| 579 | If the Program specifies that a proxy can decide which future | ||
| 580 | versions of the GNU General Public License can be used, that proxy's | ||
| 581 | public statement of acceptance of a version permanently authorizes you | ||
| 582 | to choose that version for the Program. | ||
| 583 | |||
| 584 | Later license versions may give you additional or different | ||
| 585 | permissions. However, no additional obligations are imposed on any | ||
| 586 | author or copyright holder as a result of your choosing to follow a | ||
| 587 | later version. | ||
| 588 | |||
| 589 | 15. Disclaimer of Warranty. | ||
| 590 | |||
| 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | ||
| 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | ||
| 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY | ||
| 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, | ||
| 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM | ||
| 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF | ||
| 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | ||
| 599 | |||
| 600 | 16. Limitation of Liability. | ||
| 601 | |||
| 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
| 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS | ||
| 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY | ||
| 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE | ||
| 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF | ||
| 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD | ||
| 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), | ||
| 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | ||
| 610 | SUCH DAMAGES. | ||
| 611 | |||
| 612 | 17. Interpretation of Sections 15 and 16. | ||
| 613 | |||
| 614 | If the disclaimer of warranty and limitation of liability provided | ||
| 615 | above cannot be given local legal effect according to their terms, | ||
| 616 | reviewing courts shall apply local law that most closely approximates | ||
| 617 | an absolute waiver of all civil liability in connection with the | ||
| 618 | Program, unless a warranty or assumption of liability accompanies a | ||
| 619 | copy of the Program in return for a fee. | ||
| 620 | |||
| 621 | END OF TERMS AND CONDITIONS | ||
| 622 | |||
| 623 | How to Apply These Terms to Your New Programs | ||
| 624 | |||
| 625 | If you develop a new program, and you want it to be of the greatest | ||
| 626 | possible use to the public, the best way to achieve this is to make it | ||
| 627 | free software which everyone can redistribute and change under these terms. | ||
| 628 | |||
| 629 | To do so, attach the following notices to the program. It is safest | ||
| 630 | to attach them to the start of each source file to most effectively | ||
| 631 | state the exclusion of warranty; and each file should have at least | ||
| 632 | the "copyright" line and a pointer to where the full notice is found. | ||
| 633 | |||
| 634 | <one line to give the program's name and a brief idea of what it does.> | ||
| 635 | Copyright (C) <year> <name of author> | ||
| 636 | |||
| 637 | This program is free software: you can redistribute it and/or modify | ||
| 638 | it under the terms of the GNU General Public License as published by | ||
| 639 | the Free Software Foundation, either version 3 of the License, or | ||
| 640 | (at your option) any later version. | ||
| 641 | |||
| 642 | This program is distributed in the hope that it will be useful, | ||
| 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 645 | GNU General Public License for more details. | ||
| 646 | |||
| 647 | You should have received a copy of the GNU General Public License | ||
| 648 | along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
| 649 | |||
| 650 | Also add information on how to contact you by electronic and paper mail. | ||
| 651 | |||
| 652 | If the program does terminal interaction, make it output a short | ||
| 653 | notice like this when it starts in an interactive mode: | ||
| 654 | |||
| 655 | <program> Copyright (C) <year> <name of author> | ||
| 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | ||
| 657 | This is free software, and you are welcome to redistribute it | ||
| 658 | under certain conditions; type `show c' for details. | ||
| 659 | |||
| 660 | The hypothetical commands `show w' and `show c' should show the appropriate | ||
| 661 | parts of the General Public License. Of course, your program's commands | ||
| 662 | might be different; for a GUI interface, you would use an "about box". | ||
| 663 | |||
| 664 | You should also get your employer (if you work as a programmer) or school, | ||
| 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. | ||
| 666 | For more information on this, and how to apply and follow the GNU GPL, see | ||
| 667 | <https://www.gnu.org/licenses/>. | ||
| 668 | |||
| 669 | The GNU General Public License does not permit incorporating your program | ||
| 670 | into proprietary programs. If your program is a subroutine library, you | ||
| 671 | may consider it more useful to permit linking proprietary applications with | ||
| 672 | the library. If this is what you want to do, use the GNU Lesser General | ||
| 673 | Public License instead of this License. But first, please read | ||
| 674 | <https://www.gnu.org/licenses/why-not-lgpl.html>. | ||
diff --git a/README.md b/README.md new file mode 100644 index 0000000..24580aa --- /dev/null +++ b/README.md | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | # Mirror pages | ||
| 2 | |||
| 3 | Browse template for [mirror.igorek.dev](https://mirror.igorek.dev). | ||
| 4 | |||
| 5 | ## Usage | ||
| 6 | |||
| 7 | Reference it from the `file_server` directive in your `Caddyfile`: | ||
| 8 | |||
| 9 | ```caddyfile | ||
| 10 | mirror.igorek.dev { | ||
| 11 | root * /path/to/files | ||
| 12 | file_server { | ||
| 13 | browse /path/to/browse.html | ||
| 14 | } | ||
| 15 | } | ||
| 16 | ``` | ||
diff --git a/browse.html b/browse.html new file mode 100644 index 0000000..45d3915 --- /dev/null +++ b/browse.html | |||
| @@ -0,0 +1,1181 @@ | |||
| 1 | {{ $nonce := uuidv4 -}} | ||
| 2 | {{ $nonceAttribute := print "nonce=" (quote $nonce) -}} | ||
| 3 | {{ $csp := printf "default-src 'none'; img-src 'self' data:; object-src 'none'; base-uri 'none'; script-src 'nonce-%s'; style-src 'nonce-%s' fonts.googleapis.com; font-src fonts.gstatic.com; frame-ancestors 'none'; form-action 'none';" $nonce $nonce -}} | ||
| 4 | {{/* To disable the Content-Security-Policy, set this to false */}}{{ $enableCsp := true -}} | ||
| 5 | {{ if $enableCsp -}} | ||
| 6 | {{- .RespHeader.Set "Content-Security-Policy" $csp -}} | ||
| 7 | {{ end -}} | ||
| 8 | {{- /* Helper: emit &limit=…&offset=… only when set. Use as {{template "qs" .}} */ -}} | ||
| 9 | {{- define "qs" -}} | ||
| 10 | {{- if ne 0 .Limit}}&limit={{.Limit}}{{end -}} | ||
| 11 | {{- if ne 0 .Offset}}&offset={{.Offset}}{{end -}} | ||
| 12 | {{- end -}} | ||
| 13 | {{- define "icon"}} | ||
| 14 | {{- if .IsDir}} | ||
| 15 | {{- if .IsSymlink}} | ||
| 16 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folder-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 17 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 18 | <path d="M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z" stroke-width="0" fill="currentColor"/> | ||
| 19 | <path fill="var(--color-surface-container)" d="M2.795 17.306c0-2.374 1.792-4.314 4.078-4.538v-1.104a.38.38 0 0 1 .651-.272l2.45 2.492a.132.132 0 0 1 0 .188l-2.45 2.492a.381.381 0 0 1-.651-.272V15.24c-1.889.297-3.436 1.39-3.817 3.26a2.809 2.809 0 0 1-.261-1.193Z" stroke-width=".127478"/> | ||
| 20 | </svg> | ||
| 21 | {{- else}} | ||
| 22 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folder-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 23 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 24 | <path d="M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z" stroke-width="0" fill="currentColor"/> | ||
| 25 | </svg> | ||
| 26 | {{- end}} | ||
| 27 | {{- else if or (eq .Name "LICENSE") (eq .Name "README")}} | ||
| 28 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-license" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 29 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 30 | <path d="M15 21h-9a3 3 0 0 1 -3 -3v-1h10v2a2 2 0 0 0 4 0v-14a2 2 0 1 1 2 2h-2m2 -4h-11a3 3 0 0 0 -3 3v11"/> | ||
| 31 | <path d="M9 7l4 0"/> | ||
| 32 | <path d="M9 11l4 0"/> | ||
| 33 | </svg> | ||
| 34 | {{- else if .HasExt ".jpg" ".jpeg" ".png" ".gif" ".webp" ".tiff" ".bmp" ".heif" ".heic" ".svg" ".avif"}} | ||
| 35 | {{- if eq .Tpl.Layout "grid"}} | ||
| 36 | <img loading="lazy" src="{{.Name | pathEscape}}"> | ||
| 37 | {{- else}} | ||
| 38 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-photo" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 39 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 40 | <path d="M15 8h.01"/> | ||
| 41 | <path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z"/> | ||
| 42 | <path d="M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5"/> | ||
| 43 | <path d="M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"/> | ||
| 44 | </svg> | ||
| 45 | {{- end}} | ||
| 46 | {{- else if .HasExt ".mp4" ".mov" ".m4v" ".mpeg" ".mpg" ".avi" ".ogg" ".webm" ".mkv" ".vob" ".gifv" ".3gp"}} | ||
| 47 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-movie" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 48 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 49 | <path d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"/> | ||
| 50 | <path d="M8 4l0 16"/> | ||
| 51 | <path d="M16 4l0 16"/> | ||
| 52 | <path d="M4 8l4 0"/> | ||
| 53 | <path d="M4 16l4 0"/> | ||
| 54 | <path d="M4 12l16 0"/> | ||
| 55 | <path d="M16 8l4 0"/> | ||
| 56 | <path d="M16 16l4 0"/> | ||
| 57 | </svg> | ||
| 58 | {{- else if .HasExt ".mp3" ".m4a" ".aac" ".ogg" ".flac" ".wav" ".wma" ".midi" ".cda"}} | ||
| 59 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-music" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 60 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 61 | <path d="M6 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"/> | ||
| 62 | <path d="M16 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"/> | ||
| 63 | <path d="M9 17l0 -13l10 0l0 13"/> | ||
| 64 | <path d="M9 8l10 0"/> | ||
| 65 | </svg> | ||
| 66 | {{- else if .HasExt ".pdf"}} | ||
| 67 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-pdf" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 68 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 69 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 70 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> | ||
| 71 | <path d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"/> | ||
| 72 | <path d="M17 18h2"/> | ||
| 73 | <path d="M20 15h-3v6"/> | ||
| 74 | <path d="M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z"/> | ||
| 75 | </svg> | ||
| 76 | {{- else if .HasExt ".csv" ".tsv"}} | ||
| 77 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-csv" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 78 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 79 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 80 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> | ||
| 81 | <path d="M7 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"/> | ||
| 82 | <path d="M10 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> | ||
| 83 | <path d="M16 15l2 6l2 -6"/> | ||
| 84 | </svg> | ||
| 85 | {{- else if .HasExt ".txt" ".doc" ".docx" ".odt" ".fodt" ".rtf"}} | ||
| 86 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-text" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 87 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 88 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 89 | <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/> | ||
| 90 | <path d="M9 9l1 0"/> | ||
| 91 | <path d="M9 13l6 0"/> | ||
| 92 | <path d="M9 17l6 0"/> | ||
| 93 | </svg> | ||
| 94 | {{- else if .HasExt ".xls" ".xlsx" ".ods" ".fods"}} | ||
| 95 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-spreadsheet" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 96 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 97 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 98 | <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/> | ||
| 99 | <path d="M8 11h8v7h-8z"/> | ||
| 100 | <path d="M8 15h8"/> | ||
| 101 | <path d="M11 11v7"/> | ||
| 102 | </svg> | ||
| 103 | {{- else if .HasExt ".ppt" ".pptx" ".odp" ".fodp"}} | ||
| 104 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-presentation-analytics" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 105 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 106 | <path d="M9 12v-4"/> | ||
| 107 | <path d="M15 12v-2"/> | ||
| 108 | <path d="M12 12v-1"/> | ||
| 109 | <path d="M3 4h18"/> | ||
| 110 | <path d="M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10"/> | ||
| 111 | <path d="M12 16v4"/> | ||
| 112 | <path d="M9 20h6"/> | ||
| 113 | </svg> | ||
| 114 | {{- else if .HasExt ".zip" ".gz" ".xz" ".tar" ".7z" ".rar" ".xz" ".zst"}} | ||
| 115 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-zip" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 116 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 117 | <path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"/> | ||
| 118 | <path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"/> | ||
| 119 | <path d="M11 5l-1 0"/> | ||
| 120 | <path d="M13 7l-1 0"/> | ||
| 121 | <path d="M11 9l-1 0"/> | ||
| 122 | <path d="M13 11l-1 0"/> | ||
| 123 | <path d="M11 13l-1 0"/> | ||
| 124 | <path d="M13 15l-1 0"/> | ||
| 125 | </svg> | ||
| 126 | {{- else if .HasExt ".deb" ".dpkg"}} | ||
| 127 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-debian" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 128 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 129 | <path d="M12 17c-2.397 -.943 -4 -3.153 -4 -5.635c0 -2.19 1.039 -3.14 1.604 -3.595c2.646 -2.133 6.396 -.27 6.396 3.23c0 2.5 -2.905 2.121 -3.5 1.5c-.595 -.621 -1 -1.5 -.5 -2.5"/> | ||
| 130 | <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/> | ||
| 131 | </svg> | ||
| 132 | {{- else if .HasExt ".rpm" ".exe" ".flatpak" ".appimage" ".jar" ".msi" ".apk"}} | ||
| 133 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 134 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 135 | <path d="M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5"/> | ||
| 136 | <path d="M12 12l8 -4.5"/> | ||
| 137 | <path d="M12 12l0 9"/> | ||
| 138 | <path d="M12 12l-8 -4.5"/> | ||
| 139 | <path d="M16 5.25l-8 4.5"/> | ||
| 140 | </svg> | ||
| 141 | {{- else if .HasExt ".ps1"}} | ||
| 142 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-powershell" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 143 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 144 | <path d="M4.887 20h11.868c.893 0 1.664 -.665 1.847 -1.592l2.358 -12c.212 -1.081 -.442 -2.14 -1.462 -2.366a1.784 1.784 0 0 0 -.385 -.042h-11.868c-.893 0 -1.664 .665 -1.847 1.592l-2.358 12c-.212 1.081 .442 2.14 1.462 2.366c.127 .028 .256 .042 .385 .042z"/> | ||
| 145 | <path d="M9 8l4 4l-6 4"/> | ||
| 146 | <path d="M12 16h3"/> | ||
| 147 | </svg> | ||
| 148 | {{- else if .HasExt ".py" ".pyc" ".pyo"}} | ||
| 149 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-python" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 150 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 151 | <path d="M12 9h-7a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h3"/> | ||
| 152 | <path d="M12 15h7a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-3"/> | ||
| 153 | <path d="M8 9v-4a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v5a2 2 0 0 1 -2 2h-4a2 2 0 0 0 -2 2v5a2 2 0 0 0 2 2h4a2 2 0 0 0 2 -2v-4"/> | ||
| 154 | <path d="M11 6l0 .01"/> | ||
| 155 | <path d="M13 18l0 .01"/> | ||
| 156 | </svg> | ||
| 157 | {{- else if .HasExt ".bash" ".sh" ".com" ".bat" ".dll" ".so"}} | ||
| 158 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-script" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 159 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 160 | <path d="M17 20h-11a3 3 0 0 1 0 -6h11a3 3 0 0 0 0 6h1a3 3 0 0 0 3 -3v-11a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v8"/> | ||
| 161 | </svg> | ||
| 162 | {{- else if .HasExt ".dmg"}} | ||
| 163 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-finder" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 164 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 165 | <path d="M3 4m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1z"/> | ||
| 166 | <path d="M7 8v1"/> | ||
| 167 | <path d="M17 8v1"/> | ||
| 168 | <path d="M12.5 4c-.654 1.486 -1.26 3.443 -1.5 9h2.5c-.19 2.867 .094 5.024 .5 7"/> | ||
| 169 | <path d="M7 15.5c3.667 2 6.333 2 10 0"/> | ||
| 170 | </svg> | ||
| 171 | {{- else if .HasExt ".iso" ".img"}} | ||
| 172 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-disc" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 173 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 174 | <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/> | ||
| 175 | <path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/> | ||
| 176 | <path d="M7 12a5 5 0 0 1 5 -5"/> | ||
| 177 | <path d="M12 17a5 5 0 0 0 5 -5"/> | ||
| 178 | </svg> | ||
| 179 | {{- else if .HasExt ".md" ".mdown" ".markdown"}} | ||
| 180 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-markdown" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 181 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 182 | <path d="M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"/> | ||
| 183 | <path d="M7 15v-6l2 2l2 -2v6"/> | ||
| 184 | <path d="M14 13l2 2l2 -2m-2 2v-6"/> | ||
| 185 | </svg> | ||
| 186 | {{- else if .HasExt ".ttf" ".otf" ".woff" ".woff2" ".eof"}} | ||
| 187 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-typography" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 188 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 189 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 190 | <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/> | ||
| 191 | <path d="M11 18h2"/> | ||
| 192 | <path d="M12 18v-7"/> | ||
| 193 | <path d="M9 12v-1h6v1"/> | ||
| 194 | </svg> | ||
| 195 | {{- else if .HasExt ".go"}} | ||
| 196 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-golang" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 197 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 198 | <path d="M15.695 14.305c1.061 1.06 2.953 .888 4.226 -.384c1.272 -1.273 1.444 -3.165 .384 -4.226c-1.061 -1.06 -2.953 -.888 -4.226 .384c-1.272 1.273 -1.444 3.165 -.384 4.226z"/> | ||
| 199 | <path d="M12.68 9.233c-1.084 -.497 -2.545 -.191 -3.591 .846c-1.284 1.273 -1.457 3.165 -.388 4.226c1.07 1.06 2.978 .888 4.261 -.384a3.669 3.669 0 0 0 1.038 -1.921h-2.427"/> | ||
| 200 | <path d="M5.5 15h-1.5"/> | ||
| 201 | <path d="M6 9h-2"/> | ||
| 202 | <path d="M5 12h-3"/> | ||
| 203 | </svg> | ||
| 204 | {{- else if .HasExt ".html" ".htm"}} | ||
| 205 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-html" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 206 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 207 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 208 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> | ||
| 209 | <path d="M2 21v-6"/> | ||
| 210 | <path d="M5 15v6"/> | ||
| 211 | <path d="M2 18h3"/> | ||
| 212 | <path d="M20 15v6h2"/> | ||
| 213 | <path d="M13 21v-6l2 3l2 -3v6"/> | ||
| 214 | <path d="M7.5 15h3"/> | ||
| 215 | <path d="M9 15v6"/> | ||
| 216 | </svg> | ||
| 217 | {{- else if .HasExt ".js"}} | ||
| 218 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-js" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 219 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 220 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 221 | <path d="M3 15h3v4.5a1.5 1.5 0 0 1 -3 0"/> | ||
| 222 | <path d="M9 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> | ||
| 223 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"/> | ||
| 224 | </svg> | ||
| 225 | {{- else if .HasExt ".css"}} | ||
| 226 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-css" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 227 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 228 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 229 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> | ||
| 230 | <path d="M8 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"/> | ||
| 231 | <path d="M11 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> | ||
| 232 | <path d="M17 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> | ||
| 233 | </svg> | ||
| 234 | {{- else if .HasExt ".json" ".json5" ".jsonc"}} | ||
| 235 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-json" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 236 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 237 | <path d="M20 16v-8l3 8v-8"/> | ||
| 238 | <path d="M15 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"/> | ||
| 239 | <path d="M1 8h3v6.5a1.5 1.5 0 0 1 -3 0v-.5"/> | ||
| 240 | <path d="M7 15a1 1 0 0 0 1 1h1a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h1a1 1 0 0 1 1 1"/> | ||
| 241 | </svg> | ||
| 242 | {{- else if .HasExt ".ts"}} | ||
| 243 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-ts" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 244 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 245 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 246 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"/> | ||
| 247 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 248 | <path d="M9 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> | ||
| 249 | <path d="M3.5 15h3"/> | ||
| 250 | <path d="M5 15v6"/> | ||
| 251 | </svg> | ||
| 252 | {{- else if .HasExt ".sql"}} | ||
| 253 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-sql" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 254 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 255 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 256 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 257 | <path d="M5 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> | ||
| 258 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> | ||
| 259 | <path d="M18 15v6h2"/> | ||
| 260 | <path d="M13 15a2 2 0 0 1 2 2v2a2 2 0 1 1 -4 0v-2a2 2 0 0 1 2 -2z"/> | ||
| 261 | <path d="M14 20l1.5 1.5"/> | ||
| 262 | </svg> | ||
| 263 | {{- else if .HasExt ".db" ".sqlite" ".bak" ".mdb"}} | ||
| 264 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-database" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 265 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 266 | <path d="M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0"/> | ||
| 267 | <path d="M4 6v6a8 3 0 0 0 16 0v-6"/> | ||
| 268 | <path d="M4 12v6a8 3 0 0 0 16 0v-6"/> | ||
| 269 | </svg> | ||
| 270 | {{- else if .HasExt ".eml" ".email" ".mailbox" ".mbox" ".msg"}} | ||
| 271 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-mail" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 272 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 273 | <path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"/> | ||
| 274 | <path d="M3 7l9 6l9 -6"/> | ||
| 275 | </svg> | ||
| 276 | {{- else if .HasExt ".crt" ".pem" ".x509" ".cer" ".ca-bundle"}} | ||
| 277 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-certificate" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 278 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 279 | <path d="M15 15m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"/> | ||
| 280 | <path d="M13 17.5v4.5l2 -1.5l2 1.5v-4.5"/> | ||
| 281 | <path d="M10 19h-5a2 2 0 0 1 -2 -2v-10c0 -1.1 .9 -2 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -1 1.73"/> | ||
| 282 | <path d="M6 9l12 0"/> | ||
| 283 | <path d="M6 12l3 0"/> | ||
| 284 | <path d="M6 15l2 0"/> | ||
| 285 | </svg> | ||
| 286 | {{- else if .HasExt ".key" ".keystore" ".jks" ".p12" ".pfx" ".pub"}} | ||
| 287 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-key" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 288 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 289 | <path d="M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z"/> | ||
| 290 | <path d="M15 9h.01"/> | ||
| 291 | </svg> | ||
| 292 | {{- else}} | ||
| 293 | {{- if .IsSymlink}} | ||
| 294 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-symlink" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 295 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 296 | <path d="M4 21v-4a3 3 0 0 1 3 -3h5"/> | ||
| 297 | <path d="M9 17l3 -3l-3 -3"/> | ||
| 298 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 299 | <path d="M5 11v-6a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-9.5"/> | ||
| 300 | </svg> | ||
| 301 | {{- else}} | ||
| 302 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 303 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 304 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> | ||
| 305 | <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/> | ||
| 306 | </svg> | ||
| 307 | {{- end}} | ||
| 308 | {{- end}} | ||
| 309 | {{- end}} | ||
| 310 | <!DOCTYPE html> | ||
| 311 | <html lang="en"> | ||
| 312 | <head> | ||
| 313 | <title>~{{html .Path}}</title> | ||
| 314 | <link rel="canonical" href="{{.Path}}/" /> | ||
| 315 | <meta charset="utf-8"> | ||
| 316 | <meta name="color-scheme" content="light dark"> | ||
| 317 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| 318 | <link rel="icon" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20512%20512%22%3E%3Ccircle%20cx%3D%22256%22%20cy%3D%22256%22%20r%3D%22256%22%20fill%3D%22%23cde7ed%22/%3E%3Ctext%20x%3D%2265.45%22%20y%3D%22335.83%22%20font-family%3D%22Noto%20Sans%20Mono%2Cmonospace%22%20font-size%3D%22210.084%22%20fill%3D%22%23051f24%22%3E~/i%3C/text%3E%3C/svg%3E" type="image/svg+xml" /> | ||
| 319 | <link rel="stylesheet" {{ $nonceAttribute }} href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wdth,wght@0,62.5..100,100..900;1,62.5..100,100..900&display=swap"> | ||
| 320 | <style {{ $nonceAttribute }}> | ||
| 321 | @media (prefers-color-scheme: light) { | ||
| 322 | :root { | ||
| 323 | --color-primary: rgb(0 104 119); | ||
| 324 | --color-on-primary: rgb(255 255 255); | ||
| 325 | |||
| 326 | --color-secondary: rgb(75 98 104); | ||
| 327 | |||
| 328 | --color-surface: rgb(245 250 252); | ||
| 329 | --color-surface-container: rgb(233 239 240); | ||
| 330 | --color-on-surface: rgb(23 29 30); | ||
| 331 | } | ||
| 332 | } | ||
| 333 | |||
| 334 | @media (prefers-color-scheme: dark) { | ||
| 335 | :root { | ||
| 336 | --color-primary: rgb(131 210 228); | ||
| 337 | --color-on-primary: rgb(0 54 63); | ||
| 338 | |||
| 339 | --color-secondary: rgb(178 203 209); | ||
| 340 | |||
| 341 | --color-surface: rgb(14 20 22); | ||
| 342 | --color-surface-container: rgb(27 33 34); | ||
| 343 | --color-on-surface: rgb(222 227 229); | ||
| 344 | } | ||
| 345 | } | ||
| 346 | |||
| 347 | * { | ||
| 348 | box-sizing: border-box; | ||
| 349 | } | ||
| 350 | |||
| 351 | /* Apply theme-change transitions only to top-level coloured surfaces so | ||
| 352 | switching prefers-color-scheme stays smooth without touching every node. */ | ||
| 353 | body, | ||
| 354 | main, section, footer, | ||
| 355 | nav.breadcrumbs > a, | ||
| 356 | .layout, .sort-control, | ||
| 357 | #filter, #summary, #summary b, | ||
| 358 | tbody tr, td a, th a { | ||
| 359 | transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; | ||
| 360 | } | ||
| 361 | |||
| 362 | html, body { | ||
| 363 | margin: 0; | ||
| 364 | padding: 0; | ||
| 365 | } | ||
| 366 | |||
| 367 | body { | ||
| 368 | font-family: "Noto Sans", sans-serif; | ||
| 369 | background-color: var(--color-surface); | ||
| 370 | color: var(--color-on-surface); | ||
| 371 | margin: 0 auto; | ||
| 372 | padding: 0 0.5rem; | ||
| 373 | max-width: 60rem; | ||
| 374 | min-height: 100vh; | ||
| 375 | } | ||
| 376 | |||
| 377 | a { | ||
| 378 | color: var(--color-primary); | ||
| 379 | text-decoration: none; | ||
| 380 | } | ||
| 381 | |||
| 382 | /* Keyboard-only focus ring. No outline-offset so it sits flush with the | ||
| 383 | element edge — otherwise inputs (which have their own border) appear | ||
| 384 | to have a double ring. */ | ||
| 385 | a:focus-visible, | ||
| 386 | button:focus-visible, | ||
| 387 | input:focus-visible { | ||
| 388 | outline: 0.15rem solid var(--color-primary); | ||
| 389 | border-radius: 0.25rem; | ||
| 390 | } | ||
| 391 | |||
| 392 | svg.icon { | ||
| 393 | vertical-align: middle; | ||
| 394 | flex-shrink: 0; | ||
| 395 | } | ||
| 396 | |||
| 397 | img { | ||
| 398 | max-width: 100%; | ||
| 399 | max-height: 100%; | ||
| 400 | border-radius: 0.5rem; | ||
| 401 | vertical-align: middle; | ||
| 402 | } | ||
| 403 | |||
| 404 | td img { | ||
| 405 | max-width: 1.5em; | ||
| 406 | max-height: 2em; | ||
| 407 | object-fit: cover; | ||
| 408 | border-radius: 0.25rem; | ||
| 409 | } | ||
| 410 | |||
| 411 | /* Breadcrumb-навигация в виде pill-ссылок (как nav на сайте) */ | ||
| 412 | nav.breadcrumbs { | ||
| 413 | margin-top: 1rem; | ||
| 414 | display: flex; | ||
| 415 | align-items: center; | ||
| 416 | gap: 0.5rem; | ||
| 417 | overflow-x: auto; | ||
| 418 | padding: 0.15rem 0.15rem; | ||
| 419 | scrollbar-width: thin; | ||
| 420 | scrollbar-color: var(--color-secondary) transparent; | ||
| 421 | } | ||
| 422 | |||
| 423 | nav.breadcrumbs::-webkit-scrollbar { | ||
| 424 | height: 0.3rem; | ||
| 425 | } | ||
| 426 | |||
| 427 | nav.breadcrumbs::-webkit-scrollbar-thumb { | ||
| 428 | background-color: var(--color-secondary); | ||
| 429 | border-radius: 1rem; | ||
| 430 | } | ||
| 431 | |||
| 432 | nav.breadcrumbs::-webkit-scrollbar-track { | ||
| 433 | background: transparent; | ||
| 434 | } | ||
| 435 | |||
| 436 | nav.breadcrumbs > a { | ||
| 437 | background-color: var(--color-surface-container); | ||
| 438 | border-radius: 2rem; | ||
| 439 | padding: 0.5rem 1rem; | ||
| 440 | text-align: center; | ||
| 441 | text-wrap: nowrap; | ||
| 442 | flex-shrink: 0; | ||
| 443 | } | ||
| 444 | |||
| 445 | nav.breadcrumbs > a:last-child { | ||
| 446 | outline: 0.1rem solid var(--color-primary); | ||
| 447 | } | ||
| 448 | |||
| 449 | main, section, footer { | ||
| 450 | background-color: var(--color-surface-container); | ||
| 451 | border-radius: 2rem; | ||
| 452 | margin: 1rem 0; | ||
| 453 | padding: 1.5rem; | ||
| 454 | } | ||
| 455 | |||
| 456 | main > :first-child, | ||
| 457 | section > :first-child, | ||
| 458 | footer > :first-child { margin-top: 0; } | ||
| 459 | |||
| 460 | main > :last-child, | ||
| 461 | section > :last-child, | ||
| 462 | footer > :last-child { margin-bottom: 0; } | ||
| 463 | |||
| 464 | /* ===== Meta-секция (сводка + переключатели + поиск) ===== */ | ||
| 465 | .meta { | ||
| 466 | display: flex; | ||
| 467 | gap: 1rem; | ||
| 468 | align-items: center; | ||
| 469 | flex-wrap: wrap; | ||
| 470 | } | ||
| 471 | |||
| 472 | #summary { | ||
| 473 | display: flex; | ||
| 474 | gap: 1rem; | ||
| 475 | align-items: center; | ||
| 476 | margin-right: auto; | ||
| 477 | color: var(--color-on-surface); | ||
| 478 | font-size: 0.95rem; | ||
| 479 | } | ||
| 480 | |||
| 481 | #summary b { color: var(--color-primary); } | ||
| 482 | |||
| 483 | .meta-controls { | ||
| 484 | display: flex; | ||
| 485 | gap: 0.5rem; | ||
| 486 | align-items: center; | ||
| 487 | flex-wrap: wrap; | ||
| 488 | } | ||
| 489 | |||
| 490 | .layout, | ||
| 491 | .sort-control { | ||
| 492 | color: var(--color-secondary); | ||
| 493 | cursor: pointer; | ||
| 494 | display: inline-flex; | ||
| 495 | align-items: center; | ||
| 496 | gap: 0.25rem; | ||
| 497 | padding: 0.4rem 0.7rem; | ||
| 498 | border-radius: 1rem; | ||
| 499 | background: var(--color-surface); | ||
| 500 | font-size: 0.85rem; | ||
| 501 | } | ||
| 502 | |||
| 503 | /* Reset native button styles so .layout works on <button> and <a> alike. */ | ||
| 504 | button.layout { | ||
| 505 | border: none; | ||
| 506 | font-family: inherit; | ||
| 507 | line-height: inherit; | ||
| 508 | } | ||
| 509 | |||
| 510 | .layout svg, | ||
| 511 | .sort-control svg { | ||
| 512 | width: 1rem; | ||
| 513 | height: 1rem; | ||
| 514 | flex-shrink: 0; | ||
| 515 | } | ||
| 516 | |||
| 517 | .layout.current { | ||
| 518 | color: var(--color-primary); | ||
| 519 | outline: 0.1rem solid var(--color-primary); | ||
| 520 | } | ||
| 521 | |||
| 522 | .filter-container { | ||
| 523 | position: relative; | ||
| 524 | display: inline-flex; | ||
| 525 | align-items: center; | ||
| 526 | } | ||
| 527 | |||
| 528 | #search-icon { | ||
| 529 | color: var(--color-secondary); | ||
| 530 | position: absolute; | ||
| 531 | left: 0.6rem; | ||
| 532 | width: 1rem; | ||
| 533 | height: 1rem; | ||
| 534 | pointer-events: none; | ||
| 535 | } | ||
| 536 | |||
| 537 | #filter { | ||
| 538 | padding: 0.45rem 1rem 0.45rem 2rem; | ||
| 539 | border: 0.1rem solid var(--color-primary); | ||
| 540 | border-radius: 1rem; | ||
| 541 | font-family: inherit; | ||
| 542 | color: var(--color-on-surface); | ||
| 543 | background: var(--color-surface); | ||
| 544 | font-size: 0.9rem; | ||
| 545 | outline: none; | ||
| 546 | } | ||
| 547 | |||
| 548 | /* Match the input's border-radius so the focus ring lines up cleanly. */ | ||
| 549 | #filter:focus-visible { | ||
| 550 | border-radius: 1rem; | ||
| 551 | } | ||
| 552 | |||
| 553 | /* ===== Таблица ===== */ | ||
| 554 | table { | ||
| 555 | width: 100%; | ||
| 556 | border-collapse: collapse; | ||
| 557 | } | ||
| 558 | |||
| 559 | th, td { text-align: left; } | ||
| 560 | |||
| 561 | th { | ||
| 562 | position: sticky; | ||
| 563 | top: 0; | ||
| 564 | background: var(--color-surface-container); | ||
| 565 | white-space: nowrap; | ||
| 566 | z-index: 2; | ||
| 567 | text-transform: uppercase; | ||
| 568 | font-size: 0.8rem; | ||
| 569 | letter-spacing: 0.05rem; | ||
| 570 | padding: 0.75rem 0.5rem; | ||
| 571 | color: var(--color-secondary); | ||
| 572 | border-bottom: 0.1rem solid var(--color-surface); | ||
| 573 | } | ||
| 574 | |||
| 575 | th a { | ||
| 576 | color: var(--color-on-surface); | ||
| 577 | display: inline-flex; | ||
| 578 | align-items: center; | ||
| 579 | gap: 0.25rem; | ||
| 580 | } | ||
| 581 | |||
| 582 | th a:hover { color: var(--color-primary); } | ||
| 583 | |||
| 584 | th .icon-tabler { width: 1rem; height: 1rem; } | ||
| 585 | |||
| 586 | td { | ||
| 587 | white-space: nowrap; | ||
| 588 | padding: 0 0.5rem; | ||
| 589 | } | ||
| 590 | |||
| 591 | td:nth-child(1) { | ||
| 592 | width: 75%; | ||
| 593 | max-width: 0; /* enables ellipsis on flex child below */ | ||
| 594 | } | ||
| 595 | |||
| 596 | td:nth-child(1) a { | ||
| 597 | padding: 0.75rem 0; | ||
| 598 | display: flex; | ||
| 599 | align-items: center; | ||
| 600 | gap: 0.5rem; | ||
| 601 | min-width: 0; | ||
| 602 | } | ||
| 603 | |||
| 604 | td:nth-child(1) .icon-tabler { | ||
| 605 | flex-shrink: 0; | ||
| 606 | } | ||
| 607 | |||
| 608 | td:nth-child(2), | ||
| 609 | th:nth-child(2) { | ||
| 610 | padding-right: 1rem; | ||
| 611 | min-width: 8rem; | ||
| 612 | } | ||
| 613 | |||
| 614 | th .dirfirst { | ||
| 615 | padding: 0; | ||
| 616 | margin-right: 0.25rem; | ||
| 617 | opacity: 0.6; | ||
| 618 | } | ||
| 619 | |||
| 620 | th .dirfirst:hover { opacity: 1; } | ||
| 621 | |||
| 622 | tbody tr:hover { | ||
| 623 | background-color: var(--color-surface); | ||
| 624 | } | ||
| 625 | |||
| 626 | td a:hover { color: var(--color-secondary); } | ||
| 627 | |||
| 628 | td a:visited { color: var(--color-secondary); } | ||
| 629 | |||
| 630 | td .go-up { | ||
| 631 | text-transform: uppercase; | ||
| 632 | font-size: 0.75rem; | ||
| 633 | font-weight: bold; | ||
| 634 | letter-spacing: 0.05rem; | ||
| 635 | } | ||
| 636 | |||
| 637 | .name, .go-up { | ||
| 638 | overflow: hidden; | ||
| 639 | text-overflow: ellipsis; | ||
| 640 | white-space: nowrap; | ||
| 641 | min-width: 0; | ||
| 642 | } | ||
| 643 | |||
| 644 | .listing .icon-tabler { color: var(--color-secondary); } | ||
| 645 | .listing a:hover .icon-tabler { color: var(--color-primary); } | ||
| 646 | .listing .icon-tabler-folder-filled { color: var(--color-primary) !important; } | ||
| 647 | |||
| 648 | /* Полоса размера */ | ||
| 649 | .size, .timestamp { font-size: 0.85rem; color: var(--color-secondary); } | ||
| 650 | |||
| 651 | .size.dash { | ||
| 652 | text-align: center; | ||
| 653 | } | ||
| 654 | |||
| 655 | .sizebar { | ||
| 656 | position: relative; | ||
| 657 | padding: 0.25rem 0.5rem; | ||
| 658 | display: flex; | ||
| 659 | border-radius: 0.5rem; | ||
| 660 | overflow: hidden; | ||
| 661 | } | ||
| 662 | |||
| 663 | .sizebar-bar { | ||
| 664 | background-color: var(--color-surface); | ||
| 665 | position: absolute; | ||
| 666 | top: 0; right: 0; bottom: 0; left: 0; | ||
| 667 | z-index: 0; | ||
| 668 | pointer-events: none; | ||
| 669 | border-radius: 0.5rem; | ||
| 670 | } | ||
| 671 | |||
| 672 | .sizebar-text { | ||
| 673 | position: relative; | ||
| 674 | z-index: 1; | ||
| 675 | overflow: hidden; | ||
| 676 | text-overflow: ellipsis; | ||
| 677 | white-space: nowrap; | ||
| 678 | } | ||
| 679 | |||
| 680 | /* ===== Сетка ===== */ | ||
| 681 | .grid { | ||
| 682 | display: grid; | ||
| 683 | grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); | ||
| 684 | gap: 0.75rem; | ||
| 685 | } | ||
| 686 | |||
| 687 | .grid .entry { | ||
| 688 | position: relative; | ||
| 689 | width: 100%; | ||
| 690 | } | ||
| 691 | |||
| 692 | .grid .entry a { | ||
| 693 | display: flex; | ||
| 694 | flex-direction: column; | ||
| 695 | align-items: center; | ||
| 696 | justify-content: center; | ||
| 697 | padding: 1rem; | ||
| 698 | height: 100%; | ||
| 699 | background-color: var(--color-surface); | ||
| 700 | border-radius: 1rem; | ||
| 701 | color: var(--color-on-surface); | ||
| 702 | gap: 0.5rem; | ||
| 703 | } | ||
| 704 | |||
| 705 | .grid .entry a:hover { | ||
| 706 | outline: 0.1rem solid var(--color-primary); | ||
| 707 | color: var(--color-primary); | ||
| 708 | } | ||
| 709 | |||
| 710 | .grid .entry svg { | ||
| 711 | width: 3rem; | ||
| 712 | height: 3rem; | ||
| 713 | } | ||
| 714 | |||
| 715 | .grid .entry img { | ||
| 716 | max-height: 10rem; | ||
| 717 | object-fit: cover; | ||
| 718 | border-radius: 0.5rem; | ||
| 719 | } | ||
| 720 | |||
| 721 | .grid .entry .name { | ||
| 722 | margin-top: 0.25rem; | ||
| 723 | text-align: center; | ||
| 724 | font-size: 0.9rem; | ||
| 725 | width: 100%; | ||
| 726 | } | ||
| 727 | |||
| 728 | .grid .entry .size { | ||
| 729 | font-size: 0.75rem; | ||
| 730 | color: var(--color-secondary); | ||
| 731 | } | ||
| 732 | |||
| 733 | /* ===== Empty state ===== */ | ||
| 734 | .empty-state { | ||
| 735 | display: flex; | ||
| 736 | flex-direction: column; | ||
| 737 | align-items: center; | ||
| 738 | justify-content: center; | ||
| 739 | padding: 2rem 1rem; | ||
| 740 | gap: 0.5rem; | ||
| 741 | color: var(--color-secondary); | ||
| 742 | text-align: center; | ||
| 743 | grid-column: 1 / -1; /* span full width in grid layout */ | ||
| 744 | } | ||
| 745 | |||
| 746 | .empty-state svg { | ||
| 747 | width: 3rem; | ||
| 748 | height: 3rem; | ||
| 749 | opacity: 0.6; | ||
| 750 | } | ||
| 751 | |||
| 752 | /* ===== Footer ===== */ | ||
| 753 | footer.site-footer { | ||
| 754 | background: none; | ||
| 755 | border-radius: 0; | ||
| 756 | padding: 0.75rem 0 1.5rem; | ||
| 757 | margin: 0.5rem 0 0; | ||
| 758 | text-align: center; | ||
| 759 | font-size: 0.7rem; | ||
| 760 | color: var(--color-secondary); | ||
| 761 | } | ||
| 762 | |||
| 763 | footer.site-footer a { | ||
| 764 | color: inherit; | ||
| 765 | } | ||
| 766 | |||
| 767 | @media (max-width: 600px) { | ||
| 768 | .hideable { display: none; } | ||
| 769 | td:nth-child(1) { width: auto; } | ||
| 770 | th:nth-child(2), | ||
| 771 | td:nth-child(2) { | ||
| 772 | padding-right: 0.5rem; | ||
| 773 | text-align: right; | ||
| 774 | } | ||
| 775 | #filter { max-width: 7rem; } | ||
| 776 | main, section, footer { padding: 1rem; border-radius: 1.5rem; } | ||
| 777 | nav.breadcrumbs > a { padding: 0.4rem 0.75rem; font-size: 0.9rem; } | ||
| 778 | } | ||
| 779 | </style> | ||
| 780 | {{- if eq .Layout "grid"}} | ||
| 781 | <style {{ $nonceAttribute }}>body { max-width: 80rem; }</style> | ||
| 782 | {{- end}} | ||
| 783 | </head> | ||
| 784 | <body> | ||
| 785 | <nav class="breadcrumbs"> | ||
| 786 | {{- range $i, $crumb := .Breadcrumbs}} | ||
| 787 | <a href="{{html $crumb.Link}}">{{html $crumb.Text}}</a> | ||
| 788 | {{- end}} | ||
| 789 | </nav> | ||
| 790 | |||
| 791 | <section> | ||
| 792 | <div class="meta"> | ||
| 793 | <div id="summary"> | ||
| 794 | <span class="meta-item"> | ||
| 795 | <b>{{.NumDirs}}</b> director{{if eq 1 .NumDirs}}y{{else}}ies{{end}} | ||
| 796 | </span> | ||
| 797 | <span class="meta-item"> | ||
| 798 | <b>{{.NumFiles}}</b> file{{if ne 1 .NumFiles}}s{{end}} | ||
| 799 | </span> | ||
| 800 | <span class="meta-item"> | ||
| 801 | <b>{{.HumanTotalFileSize}}</b> total | ||
| 802 | </span> | ||
| 803 | {{- if ne 0 .Limit}} | ||
| 804 | <span class="meta-item"> | ||
| 805 | (showing <b>{{.Limit}}</b>) | ||
| 806 | </span> | ||
| 807 | {{- end}} | ||
| 808 | </div> | ||
| 809 | <div class="meta-controls"> | ||
| 810 | <button type="button" id="layout-list" class='layout{{if eq $.Layout "list" ""}} current{{end}}' title="List view" aria-label="List view"{{if eq $.Layout "list" ""}} aria-pressed="true"{{else}} aria-pressed="false"{{end}}> | ||
| 811 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-list" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 812 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 813 | <path d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"/> | ||
| 814 | <path d="M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"/> | ||
| 815 | </svg> | ||
| 816 | List | ||
| 817 | </button> | ||
| 818 | <button type="button" id="layout-grid" class='layout{{if eq $.Layout "grid"}} current{{end}}' title="Grid view" aria-label="Grid view"{{if eq $.Layout "grid"}} aria-pressed="true"{{else}} aria-pressed="false"{{end}}> | ||
| 819 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 820 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 821 | <path d="M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"/> | ||
| 822 | <path d="M14 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"/> | ||
| 823 | <path d="M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"/> | ||
| 824 | <path d="M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"/> | ||
| 825 | </svg> | ||
| 826 | Grid | ||
| 827 | </button> | ||
| 828 | {{- if and (eq .Layout "grid") (eq .Sort "name") (ne .Order "asc")}} | ||
| 829 | <a href="?sort=name&order=asc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by name (Z→A)"> | ||
| 830 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 831 | <text x="2" y="10" font-size="9" fill="currentColor">Z</text> | ||
| 832 | <text x="2" y="20" font-size="9" fill="currentColor">A</text> | ||
| 833 | <path d="M13 4v12"></path> | ||
| 834 | <path d="M12 16l1 2l1 -2"></path> | ||
| 835 | </svg> | ||
| 836 | </a> | ||
| 837 | {{- else if and (eq .Layout "grid") (eq .Sort "name") (ne .Order "desc")}} | ||
| 838 | <a href="?sort=name&order=desc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by name (A→Z)"> | ||
| 839 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 840 | <text x="2" y="10" font-size="9" fill="currentColor">A</text> | ||
| 841 | <text x="2" y="20" font-size="9" fill="currentColor">Z</text> | ||
| 842 | <path d="M13 4v12"></path> | ||
| 843 | <path d="M12 16l1 2l1 -2"></path> | ||
| 844 | </svg> | ||
| 845 | </a> | ||
| 846 | {{- else if and (eq .Layout "grid")}} | ||
| 847 | <a href="?sort=name&order=asc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by name"> | ||
| 848 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 849 | <text x="2" y="20" font-size="9" fill="currentColor">A</text> | ||
| 850 | <text x="2" y="10" font-size="9" fill="currentColor">Z</text> | ||
| 851 | <path d="M13 4v12"></path> | ||
| 852 | <path d="M12 16l1 2l1 -2"></path> | ||
| 853 | </svg> | ||
| 854 | </a> | ||
| 855 | {{- end}} | ||
| 856 | {{- if and (eq .Layout "grid") (eq .Sort "size") (ne .Order "asc")}} | ||
| 857 | <a href="?sort=size&order=asc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by size (asc)"> | ||
| 858 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 859 | <rect x="2" y="4" width="4" height="3" rx="0.4" ry="0.4"></rect> | ||
| 860 | <rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect> | ||
| 861 | <rect x="2" y="16" width="12" height="3" rx="0.4" ry="0.4"></rect> | ||
| 862 | <path d="M18 4v12"></path> | ||
| 863 | <path d="M17 16l1 2l1 -2"></path> | ||
| 864 | </svg> | ||
| 865 | </a> | ||
| 866 | {{- else if and (eq .Layout "grid") (eq .Sort "size") (ne .Order "desc")}} | ||
| 867 | <a href="?sort=size&order=desc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by size (desc)"> | ||
| 868 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 869 | <rect x="2" y="4" width="12" height="3" rx="0.4" ry="0.4"></rect> | ||
| 870 | <rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect> | ||
| 871 | <rect x="2" y="16" width="4" height="3" rx="0.4" ry="0.4"></rect> | ||
| 872 | <path d="M18 4v12"></path> | ||
| 873 | <path d="M17 16l1 2l1 -2"></path> | ||
| 874 | </svg> | ||
| 875 | </a> | ||
| 876 | {{- else if and (eq .Layout "grid")}} | ||
| 877 | <a href="?sort=size&order=asc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by size"> | ||
| 878 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 879 | <rect x="2" y="4" width="4" height="3" rx="0.4" ry="0.4"></rect> | ||
| 880 | <rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect> | ||
| 881 | <rect x="2" y="16" width="12" height="3" rx="0.4" ry="0.4"></rect> | ||
| 882 | <path d="M18 4v12"></path> | ||
| 883 | <path d="M17 16l1 2l1 -2"></path> | ||
| 884 | </svg> | ||
| 885 | </a> | ||
| 886 | {{- end}} | ||
| 887 | {{- if and (eq .Layout "grid") (eq .Sort "time") (ne .Order "asc")}} | ||
| 888 | <a href="?sort=time&order=asc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by time (asc)"> | ||
| 889 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 890 | <circle cx="9" cy="11" r="8"></circle> | ||
| 891 | <line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line> | ||
| 892 | <line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line> | ||
| 893 | <path d="M20 4v12"></path> | ||
| 894 | <path d="M19 16l1 2l1 -2"></path> | ||
| 895 | </svg> | ||
| 896 | </a> | ||
| 897 | {{- else if and (eq .Layout "grid") (eq .Sort "time") (ne .Order "desc")}} | ||
| 898 | <a href="?sort=time&order=desc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by time (desc)"> | ||
| 899 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 900 | <circle cx="9" cy="11" r="8"></circle> | ||
| 901 | <line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line> | ||
| 902 | <line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line> | ||
| 903 | <path d="M20 4v12"></path> | ||
| 904 | <path d="M19 5l1 -2l1 2"></path> | ||
| 905 | </svg> | ||
| 906 | </a> | ||
| 907 | {{- else if and (eq .Layout "grid")}} | ||
| 908 | <a href="?sort=time&order=asc{{template "qs" .}}&layout=grid" class="sort-control" title="Sort by time"> | ||
| 909 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 910 | <circle cx="9" cy="11" r="8"></circle> | ||
| 911 | <line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line> | ||
| 912 | <line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line> | ||
| 913 | <path d="M20 4v12"></path> | ||
| 914 | <path d="M19 16l1 2l1 -2"></path> | ||
| 915 | </svg> | ||
| 916 | </a> | ||
| 917 | {{- end}} | ||
| 918 | <div class="filter-container"> | ||
| 919 | <svg id="search-icon" xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 920 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 921 | <path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/> | ||
| 922 | <path d="M21 21l-6 -6"/> | ||
| 923 | </svg> | ||
| 924 | <input type="search" placeholder="Search" id="filter" aria-label="Filter files by name" autocomplete="off"> | ||
| 925 | </div> | ||
| 926 | </div> | ||
| 927 | </div> | ||
| 928 | </section> | ||
| 929 | |||
| 930 | <section> | ||
| 931 | <div class='listing{{if eq .Layout "grid"}} grid{{end}}'> | ||
| 932 | {{- if eq (len .Items) 0}} | ||
| 933 | <div class="empty-state" role="status"> | ||
| 934 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 935 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 936 | <path d="M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z"/> | ||
| 937 | </svg> | ||
| 938 | <div>This directory is empty.</div> | ||
| 939 | </div> | ||
| 940 | {{- else if eq .Layout "grid"}} | ||
| 941 | {{- range .Items}} | ||
| 942 | <div class="entry"> | ||
| 943 | <a href="{{html .URL}}" title="{{html .Name}}{{if not .IsDir}} — {{.HumanSize}}{{end}} — {{.HumanModTime "02-Jan-2006 15:04"}}"> | ||
| 944 | {{template "icon" .}} | ||
| 945 | <div class="name">{{html .Name}}</div> | ||
| 946 | <div class="size">{{.HumanSize}}</div> | ||
| 947 | </a> | ||
| 948 | </div> | ||
| 949 | {{- end}} | ||
| 950 | {{- else}} | ||
| 951 | <table aria-describedby="summary"> | ||
| 952 | <thead> | ||
| 953 | <tr> | ||
| 954 | <th> | ||
| 955 | {{- if and (eq .Sort "namedirfirst") (ne .Order "desc")}} | ||
| 956 | <a href="?sort=namedirfirst&order=desc{{template "qs" .}}" title="Dirs first (desc)" class="dirfirst"> | ||
| 957 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 958 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 959 | <path d="M18 14l-6 -6l-6 6h12"/> | ||
| 960 | </svg> | ||
| 961 | </a> | ||
| 962 | {{- else if and (eq .Sort "namedirfirst") (ne .Order "asc")}} | ||
| 963 | <a href="?sort=namedirfirst&order=asc{{template "qs" .}}" title="Dirs first (asc)" class="dirfirst"> | ||
| 964 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 965 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 966 | <path d="M6 10l6 6l6 -6h-12"/> | ||
| 967 | </svg> | ||
| 968 | </a> | ||
| 969 | {{- else}} | ||
| 970 | <a href="?sort=namedirfirst&order=asc{{template "qs" .}}" title="Dirs first" class="dirfirst"> | ||
| 971 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 972 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 973 | <path d="M18 14l-6 -6l-6 6h12"/> | ||
| 974 | </svg> | ||
| 975 | </a> | ||
| 976 | {{- end}} | ||
| 977 | {{- if and (eq .Sort "name") (ne .Order "desc")}} | ||
| 978 | <a href="?sort=name&order=desc{{template "qs" .}}"> | ||
| 979 | Name | ||
| 980 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 981 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 982 | <path d="M18 14l-6 -6l-6 6h12"/> | ||
| 983 | </svg> | ||
| 984 | </a> | ||
| 985 | {{- else if and (eq .Sort "name") (ne .Order "asc")}} | ||
| 986 | <a href="?sort=name&order=asc{{template "qs" .}}"> | ||
| 987 | Name | ||
| 988 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 989 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 990 | <path d="M6 10l6 6l6 -6h-12"/> | ||
| 991 | </svg> | ||
| 992 | </a> | ||
| 993 | {{- else}} | ||
| 994 | <a href="?sort=name&order=asc{{template "qs" .}}"> | ||
| 995 | Name | ||
| 996 | </a> | ||
| 997 | {{- end}} | ||
| 998 | </th> | ||
| 999 | <th> | ||
| 1000 | {{- if and (eq .Sort "size") (ne .Order "desc")}} | ||
| 1001 | <a href="?sort=size&order=desc{{template "qs" .}}"> | ||
| 1002 | Size | ||
| 1003 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 1004 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 1005 | <path d="M18 14l-6 -6l-6 6h12"/> | ||
| 1006 | </svg> | ||
| 1007 | </a> | ||
| 1008 | {{- else if and (eq .Sort "size") (ne .Order "asc")}} | ||
| 1009 | <a href="?sort=size&order=asc{{template "qs" .}}"> | ||
| 1010 | Size | ||
| 1011 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 1012 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 1013 | <path d="M6 10l6 6l6 -6h-12"/> | ||
| 1014 | </svg> | ||
| 1015 | </a> | ||
| 1016 | {{- else}} | ||
| 1017 | <a href="?sort=size&order=asc{{template "qs" .}}"> | ||
| 1018 | Size | ||
| 1019 | </a> | ||
| 1020 | {{- end}} | ||
| 1021 | </th> | ||
| 1022 | <th class="hideable"> | ||
| 1023 | {{- if and (eq .Sort "time") (ne .Order "desc")}} | ||
| 1024 | <a href="?sort=time&order=desc{{template "qs" .}}"> | ||
| 1025 | Modified | ||
| 1026 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 1027 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 1028 | <path d="M18 14l-6 -6l-6 6h12"/> | ||
| 1029 | </svg> | ||
| 1030 | </a> | ||
| 1031 | {{- else if and (eq .Sort "time") (ne .Order "asc")}} | ||
| 1032 | <a href="?sort=time&order=asc{{template "qs" .}}"> | ||
| 1033 | Modified | ||
| 1034 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 1035 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 1036 | <path d="M6 10l6 6l6 -6h-12"/> | ||
| 1037 | </svg> | ||
| 1038 | </a> | ||
| 1039 | {{- else}} | ||
| 1040 | <a href="?sort=time&order=asc{{template "qs" .}}"> | ||
| 1041 | Modified | ||
| 1042 | </a> | ||
| 1043 | {{- end}} | ||
| 1044 | </th> | ||
| 1045 | </tr> | ||
| 1046 | </thead> | ||
| 1047 | <tbody> | ||
| 1048 | {{- if .CanGoUp}} | ||
| 1049 | <tr> | ||
| 1050 | <td> | ||
| 1051 | <a href=".."> | ||
| 1052 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-corner-left-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 1053 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> | ||
| 1054 | <path d="M18 18h-6a3 3 0 0 1 -3 -3v-10l-4 4m8 0l-4 -4"/> | ||
| 1055 | </svg> | ||
| 1056 | <span class="go-up">Up</span> | ||
| 1057 | </a> | ||
| 1058 | </td> | ||
| 1059 | <td class="size dash">-</td> | ||
| 1060 | <td class="hideable"></td> | ||
| 1061 | </tr> | ||
| 1062 | {{- end}} | ||
| 1063 | {{- range .Items}} | ||
| 1064 | <tr class="file"> | ||
| 1065 | <td> | ||
| 1066 | <a href="{{html .URL}}" title="{{html .Name}}{{if not .IsDir}} — {{.HumanSize}}{{end}} — {{.HumanModTime "02-Jan-2006 15:04"}}"> | ||
| 1067 | {{template "icon" .}} | ||
| 1068 | {{- if not .SymlinkPath}} | ||
| 1069 | <span class="name">{{html .Name}}</span> | ||
| 1070 | {{- else}} | ||
| 1071 | <span class="name">{{html .Name}} <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-narrow-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> | ||
| 1072 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0" /> | ||
| 1073 | <path d="M15 16l4 -4" /> | ||
| 1074 | <path d="M15 8l4 4" /> | ||
| 1075 | </svg> {{html .SymlinkPath}}</span> | ||
| 1076 | {{- end}} | ||
| 1077 | </a> | ||
| 1078 | </td> | ||
| 1079 | {{- if .IsDir}} | ||
| 1080 | <td class="size dash">-</td> | ||
| 1081 | {{- else}} | ||
| 1082 | <td class="size" data-size="{{.Size}}"> | ||
| 1083 | <div class="sizebar"> | ||
| 1084 | <div class="sizebar-bar"></div> | ||
| 1085 | <div class="sizebar-text"> | ||
| 1086 | {{if .IsSymlink}}↱ {{end}}{{.HumanSize}} | ||
| 1087 | </div> | ||
| 1088 | </div> | ||
| 1089 | </td> | ||
| 1090 | {{- end}} | ||
| 1091 | <td class="timestamp hideable"> | ||
| 1092 | <time datetime="{{.HumanModTime "2006-01-02T15:04:05Z"}}">{{.HumanModTime "02-Jan-2006 15:04"}}</time> | ||
| 1093 | </td> | ||
| 1094 | </tr> | ||
| 1095 | {{- end}} | ||
| 1096 | </tbody> | ||
| 1097 | </table> | ||
| 1098 | {{- end}} | ||
| 1099 | </div> | ||
| 1100 | </section> | ||
| 1101 | |||
| 1102 | <footer class="site-footer"> | ||
| 1103 | Served with <a rel="noopener noreferrer" href="https://caddyserver.com">Caddy</a> | ||
| 1104 | </footer> | ||
| 1105 | |||
| 1106 | <script {{ $nonceAttribute }}> | ||
| 1107 | // @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0 | ||
| 1108 | (() => { | ||
| 1109 | const filterEl = document.getElementById('filter'); | ||
| 1110 | const layoutListBtn = document.getElementById('layout-list'); | ||
| 1111 | const layoutGridBtn = document.getElementById('layout-grid'); | ||
| 1112 | |||
| 1113 | // --- Filter ------------------------------------------------------- | ||
| 1114 | function applyFilter() { | ||
| 1115 | if (!filterEl) return; | ||
| 1116 | const q = filterEl.value.trim().toLowerCase(); | ||
| 1117 | // Works for both list rows and grid entries. | ||
| 1118 | document.querySelectorAll('tr.file, .grid .entry').forEach((el) => { | ||
| 1119 | if (!q) { el.style.display = ''; return; } | ||
| 1120 | const nameEl = el.querySelector('.name'); | ||
| 1121 | const name = (nameEl?.textContent || '').trim().toLowerCase(); | ||
| 1122 | el.style.display = name.includes(q) ? '' : 'none'; | ||
| 1123 | }); | ||
| 1124 | } | ||
| 1125 | |||
| 1126 | filterEl?.addEventListener('input', applyFilter); | ||
| 1127 | |||
| 1128 | // --- Layout switch ----------------------------------------------- | ||
| 1129 | function setQueryParam(k, v) { | ||
| 1130 | const qs = new URLSearchParams(window.location.search); | ||
| 1131 | if (!v) { qs.delete(k); } else { qs.set(k, v); } | ||
| 1132 | const s = qs.toString(); | ||
| 1133 | window.location = s ? (window.location.pathname + '?' + s) : window.location.pathname; | ||
| 1134 | } | ||
| 1135 | |||
| 1136 | layoutListBtn?.addEventListener('click', () => setQueryParam('layout', '')); | ||
| 1137 | layoutGridBtn?.addEventListener('click', () => setQueryParam('layout', 'grid')); | ||
| 1138 | |||
| 1139 | // --- Localized timestamps ---------------------------------------- | ||
| 1140 | // Use the browser's locale instead of hardcoded English month names. | ||
| 1141 | const dateFmt = new Intl.DateTimeFormat(undefined, { | ||
| 1142 | year: 'numeric', month: 'short', day: '2-digit', | ||
| 1143 | hour: '2-digit', minute: '2-digit', hour12: false, | ||
| 1144 | }); | ||
| 1145 | function localizeDates() { | ||
| 1146 | document.querySelectorAll('time[datetime]').forEach((e) => { | ||
| 1147 | const iso = e.getAttribute('datetime'); | ||
| 1148 | const d = new Date(iso); | ||
| 1149 | if (Number.isNaN(d.getTime())) return; | ||
| 1150 | e.textContent = dateFmt.format(d); | ||
| 1151 | e.title = d.toLocaleString(); | ||
| 1152 | }); | ||
| 1153 | } | ||
| 1154 | |||
| 1155 | // --- Init --------------------------------------------------------- | ||
| 1156 | function init() { | ||
| 1157 | // Populate filter from URL ?filter= if user navigated with one. | ||
| 1158 | if (filterEl && !filterEl.value) { | ||
| 1159 | const param = new URLSearchParams(window.location.search).get('filter'); | ||
| 1160 | if (param) filterEl.value = param; | ||
| 1161 | } | ||
| 1162 | applyFilter(); | ||
| 1163 | localizeDates(); | ||
| 1164 | |||
| 1165 | // Scroll breadcrumbs to the end so the current folder is visible. | ||
| 1166 | const breadcrumbs = document.querySelector('nav.breadcrumbs'); | ||
| 1167 | if (breadcrumbs) breadcrumbs.scrollLeft = breadcrumbs.scrollWidth; | ||
| 1168 | |||
| 1169 | filterEl?.focus({ preventScroll: true }); | ||
| 1170 | } | ||
| 1171 | |||
| 1172 | if (document.readyState === 'loading') { | ||
| 1173 | document.addEventListener('DOMContentLoaded', init, { once: true }); | ||
| 1174 | } else { | ||
| 1175 | init(); | ||
| 1176 | } | ||
| 1177 | })(); | ||
| 1178 | // @license-end | ||
| 1179 | </script> | ||
| 1180 | </body> | ||
| 1181 | </html> | ||
