diff --git a/gallery/archetypes/default.md b/gallery/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/gallery/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/gallery/config.toml b/gallery/config.toml new file mode 100644 index 0000000..1d7c819 --- /dev/null +++ b/gallery/config.toml @@ -0,0 +1,3 @@ +baseURL = 'http://example.org/' +languageCode = 'en-us' +title = 'My New Hugo Site' diff --git a/gallery/themes/autophugo/.github/workflows/build_github_pages.yml b/gallery/themes/autophugo/.github/workflows/build_github_pages.yml new file mode 100644 index 0000000..7d6ffc3 --- /dev/null +++ b/gallery/themes/autophugo/.github/workflows/build_github_pages.yml @@ -0,0 +1,21 @@ +name: Build GitHub Pages +on: + push: + branches: + - main + #- cur_ver_release +jobs: + build-github-pages: + runs-on: ubuntu-latest + steps: + - name: Install Hugo + run: sudo snap install hugo + - name: Checkout Repo + uses: actions/checkout@v2 + - name: Build Pages + run: make + - name: Deploy + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: exampleSite/public diff --git a/gallery/themes/autophugo/.gitignore b/gallery/themes/autophugo/.gitignore new file mode 100644 index 0000000..a5dc084 --- /dev/null +++ b/gallery/themes/autophugo/.gitignore @@ -0,0 +1,2 @@ +*.swp +.hugo_build.lock diff --git a/gallery/themes/autophugo/.nojekyll b/gallery/themes/autophugo/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/gallery/themes/autophugo/LICENSE.md b/gallery/themes/autophugo/LICENSE.md new file mode 100644 index 0000000..856b578 --- /dev/null +++ b/gallery/themes/autophugo/LICENSE.md @@ -0,0 +1,63 @@ +Creative Commons Attribution 3.0 Unported +http://creativecommons.org/licenses/by/3.0/ + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + 1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. + 2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. + 3. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. + 4. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. + 5. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. + 6. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. + 7. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + 8. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. + 9. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + 1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; + 2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; + 3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, + 4. to Distribute and Publicly Perform Adaptations. + 5. + + For the avoidance of doubt: + 1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; + 2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, + 3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + 1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. + 2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + 3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + 1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + 2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + 3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + 4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + 5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + 6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. diff --git a/gallery/themes/autophugo/Makefile b/gallery/themes/autophugo/Makefile new file mode 100644 index 0000000..af7db5a --- /dev/null +++ b/gallery/themes/autophugo/Makefile @@ -0,0 +1,28 @@ +EXAMPLE_SITE := exampleSite +CONFIG_GH_PAGES := config_for_github_pages.toml +CONFIG := config.toml +THEMES := ../../ + +public: + hugo -s ${EXAMPLE_SITE} --config ${CONFIG_GH_PAGES} --themesDir ${THEMES} + +server: + hugo -s ${EXAMPLE_SITE} --themesDir ${THEMES} server + +serverNoAlbum: + hugo -s exampleSiteNoAlbum --themesDir ${THEMES} server + +no_canonify_server_long_url_test: + hugo -s ${EXAMPLE_SITE} --themesDir ${THEMES} server -b http://localhost:1313/themes/autophugo/ + +canonify_server_long_url_test: + export HUGO_CANONIFYURLS=true && hugo -s ${EXAMPLE_SITE} --themesDir ${THEMES} server -b http://localhost:1313/themes/autophugo/ + +no_canonify_server_short_url_test: + hugo -s ${EXAMPLE_SITE} --themesDir ${THEMES} server -b http://localhost:1313/ + +canonify_server_short_url_test: + export HUGO_CANONIFYURLS=true && hugo -s ${EXAMPLE_SITE} --themesDir ${THEMES} server -b http://localhost:1313/ + + +.PHONY: public server diff --git a/gallery/themes/autophugo/README.md b/gallery/themes/autophugo/README.md new file mode 100644 index 0000000..4023f2a --- /dev/null +++ b/gallery/themes/autophugo/README.md @@ -0,0 +1,181 @@ +# AutoPhugo + +AutoPhugo [ˌɔtoʊˈfjuːgəʊ] is a gallery/photoblog theme for Hugo that's a little more automatic than [Phugo](https://github.com/kc0bfv/phugo/). It is a port of HTML5 UP [Multiverse template](https://html5up.net/multiverse). Phugo was originally created by Aerohub, Pavel Kanyshev. + +Preview at + +## Features + +- Fully Responsive +- HTML5 + CSS3 +- FontAwesome Icons +- Multi-level Albums Support +- Google Analytics +- Basic Breadcrumbs +- Contact Form +- Automated Image Scaling + +## Recent Change + +**PLEASE NOTE** + +On 10 Jul 2021 clicking an image now updates the location bar hash (fragment id). That way, the URL represents the open image too... This required some javascript changes. If these cause a problem for you, please let me know so I can make changes to this functionality. + +On 23 Jan 2020 subalbum and noalbum support no longer requires specifying a `type` in the metadata. Furthermore, images and subalbums can be mixed within albums - including on the homepage (although mixing can be confusing for users). Simply build an `assets` directory structure by placing images and directories wherever you want, then mirror the directory structure in `content`. + +On 19 Dec 2020 `albumthumb` file paths work differently. You must specify the path relative to the assets directory. So - where before the `fish/_index.md` example content specified `fish_02.jpg` as the `albumthumb`, now it specifies `fish/fish_02.jpg`. I apologize for the breaking change, but it really should've worked this way from the start. It brings things in-line with the resources src, and the subalbum path specifications. + +## Installation + +Follow [Hugo's standard instructions](https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme) for adding a theme to your site. + +## Configuration + +The `exampleSite` demonstrates the features unique to this theme. In your site config params section the following extra parameters are supported: + +* `favicon` - the favicon URL, relative to your site (placed in header meta tag) +* `description` - the description for the header meta tag. This will be interpreted as markdown, and some markdown will require the string to be enclosed in quotes. +* `msvalidate` - MS validation tag +* `googlesiteverification` - Google site verification tag +* `thumb_width` - thumbnail width after resizing (default 480 pixels) +* `thumb_quality` - thumbnail encoding quality percentage after resizing (default 50%) +* `full_width` - display-sized image width after resizing (default 960 pixels) +* `full_quality` - display-sized image encoding quality after resizing (default 90%) +* `column_count` - the number of columns in which to display images (default 2) +* `breadcrumb_use_title` - if true, breadcrumbs (the path-like display at the bottom) will use page titles instead of paths +* `filename_as_phototitle` - if true, a humanized form of the filename will be used as the phototitle (default false) +* `images_downloadable` - if true, images have a download button (default true) +* `images_downloadable_use_orig` - if true, the download button will download the original image instead of the full size image - this will likely greatly increase the size of your site (default false) +* `taxonomies_links` - if true, links to the taxonomy pages will be present in the footer and on the tagged items (default false) + +Additionally, `Author.name` and `Author.email` in the site config will display as the author and webmaster email. + +Header and footer customization is possible with the following site parameters. These are a little more complex to implement in TOML - check out the `exampleSite` configuration for a demonstration and comments: + +* `header.links` - a list of maps with keys `name`, `url`, and `icon`, describing links that will be visible in the navigation bar +* `footer.paragraph` - a map with keys `headline` and `text` specifying the content to display in the `footer` popout (labeled "About" on the example site) +* `footer.social` - a map with keys `headline` (text) and `links` (list of maps). `links` entries can have `label`, `url`, and `icon` for each. These are intended to be social media links with a "Follow Me"-ish headline. +* `footer.contact` - a map with keys `hide`, `realEmail`, `headline`, `buttonText`, and `resetText`, `name`, `email`, and `message`,specifying the properties of the contact form (or hiding it). See the `exampleSite` config for details about how to set this up. +* `footer.copyright` - copyright info for your site + +The `exampleSiteNoAlbum` directory demonstrates a no-album layout, where all photos show up on the front page. + +## Album Construction + +Inside your project create the directory `assets/NAME-OF-YOUR-ALBUM`. Place all of one album's photos inside that directory. + +Inside your project run: + +``` +$ hugo new NAME-OF-YOUR-ALBUM/_index.md +``` + +It will create an index file for your first album. Open `content/NAME-OF-YOUR-ALBUM/_index.md` with your text editor. You'll see something like this: + +``` +--- +title: "NAME-OF-YOUR-ALBUM" +date: "2020-03-15T00:00:00+00:00" +albumthumb: "NAME-OF-YOUR-ALBUM/photo00.jpg" +draft: false +resources: +- src: "NAME-OF-YOUR-ALBUM/photo00.jpg" +- src: "NAME-OF-YOUR-ALBUM/photo01.jpg" +- src: "NAME-OF-YOUR-ALBUM/photo02.jpg" +--- +``` + +Change the title of your album if you wish, and set the filename of album's cover thumbnail. The filename is relative to the assets folder, so if your album is named `dogs` and one of your images there is named `dog_01.jpg` you can put `dogs/dog_01.jpg` in `albumthumb` to select it. + +In addition to those frontmatter options, you can also specify metadata for some or all of your images. Do that by modifying the `resources` array with map elements. The maps specify the image they apply to with the `src` key, as `src: "album/image.jpg"`. You can then specify some or all of the following items: `alt`, `phototitle`, and `description`. Demonstration of this is in the `exampleSite` directory albums. + +### Sub-Albums + +If you'd like to create an album that contains other albums - you can do that! The following command creates an album called "dogs", for instance: + +``` +hugo new dogs/_index.md +``` + +The resulting `content/dogs/_index.md` file looks like: + +``` +--- +title: "Dogs" +date: 2020-03-15T14:00:00-06:00 +albumthumb: "dogs/subalbum/photo_00.jpg" +--- +``` + +Make sure to specify an albumthumb! + +Now you could create albums inside that "dogs" album just like before... + +``` +hugo new dogs/pensive-dogs/_index.md +``` + +Your `assets` directory layout should mirror the directory layout in `content`. + +See the `exampleSite` and the `dogs` folder and subfolders specifically. The `dogs` album actually contains images and subalbums mixed together as a demonstration. + +### Image and Subalbum Mixing + +You can place images and subalbums together - the `assets` directory would contain images and directories in that case. You'd create content directories that mirror that layout. The `dogs` album is an example of this. + +**Watch out!** This is likely to be confusing to users though. There's no default delineation when these mixed albums are displayed. Subalbums display towards the top, and images lower - but otherwise a user will have no clear idea what will happen when they click an image. Will it display full-sized, or will it open a subalbum? + +## Using Custom Weights + +Default sorting for subalbums and images sorts by weight. For subalbums with the same weight it sorts by date, and for images with the same weight it sorts by filename. If you don't specify a weight for an item, the default is 0. Therefore - if you don't set any weights you'll sort by date... Lower weights come first so negative weights get sorted before unspecified weights and positive ones. + +## Tagging and Categorizing (taxonomies) + +You can tag and categorize your images and subalbums, and you can create other taxonomies and use those too! There are a couple site configurations to understand... + +`disableKinds = ["taxonomy", "term"]` + +If you want tags or categories do *not* have this line in your site config. If you specify these values for disableKinds in your site config you will disable all taxonomy pages. Term pages are not generated as part of this theme - the terms all appear on their taxonomy page. Regardless, if you want to have tags or categories, do *not* have the above line. + +You can use the `[taxonomies]` site config section to create new taxonomies or remove the defaults. More information is in the [Hugo documentation](https://gohugo.io/content-management/taxonomies/#default-taxonomies). + +The `taxonomies_links` parameter defaults to false, disabling links to the taxonomies pages even if they get generated... Set it to true in your site config and links will show up in the page footers and on tagged items. + +## Building the Site + +Run `hugo` to build your site. Output will be placed in the `public` directory. The original images will not be included - only the resized versions. + +When building your site, hugo must build thumbnails and distribution-sized images. This process can take some time, especially if you have many pictures... It stores versions of the images in the `resources` directory, so it doesn't have to redo the process every build. + +Therefore - after adding an album your next build may take minutes. Future ones will be quicker. + +## Development Notes + +If you try multiple sizes or quality settings for your images, you'll start to amass large numbers of images in your `resources` directory. Once you settle on a quality and size you like you should consider deleting the resources and rebuilding to eliminate the unused images. + +Regardless of the number of resources you have, Hugo will only deploy the ones actually used in a build. Unused image resources will not be deployed. + +## Advanced Features + +Image resizing: normally you specify `thumb_width` and `full_width` in your configuration, and the qualities, to modify how Autophugo scales your images. Autophugo uses these values to build a string for Hugo's Resize function. You can specify that string directly though... Set `thumb_size` or `full_size` directly in your config to bypass the other ones. The format of the string is [documented here](https://gohugo.io/content-management/image-processing/). You can specify `full_size` and `thumb_size` for the entire site, or in the `_index.md` for a specific subalbum. + +You can also change the method Hugo uses to resize your full-sized images (the option is not available for thumbnails). Hugo has both `Resize` and `Fit` methods that are appropriate for resizing the full-sized images. By default Autophugo uses `Resize`. By setting `full_resize_method` to `Fit`, `Resize`, or `None`, you can change that. You must also specify a `full_size` if you change to the `Fit` method. That's because both the height and width must be specified, and with `Resize` you only need one or the other. Again, the format of the `full_size` string is [documented here](https://gohugo.io/content-management/image-processing/). Here are some examples: + +* Scale an image down, keeping aspect ratio, to a max height of 960px and a max width of 960px, with a 90% quality: `full_resize_method = "fit"`, `full_size = "960x960 q90"` +* Scale an image to a width of 960px, allowing whatever height is required for the original aspect ratio, with a 90% quality: `full_resize_method = "resize"`, `full_size = "960x q90"` +* Do no scaling or quality change of the full-sized version of the image: `full_resize_method = "none"` + +## Comparison to Phugo + +Unfortunately the [original Phugo](https://github.com/aerohub/phugo) hasn't been updated in a while, and was dropped from common theme lists. AutoPhugo implements the pull requests over on Phugo, causing it to work error-free on modern Hugo. Further, it sets standardized column layout, automatically builds albums based on files alone (Phugo required entering each filename as a shortcode), and automatically resizes photos for display and thumbnail. Plus, subalbums. + +## Acknowledgements + +* Subgallery support - tfl0pz, Ognyan Nikolov +* [Magnific Popup lightbox](https://dimsemenov.com/plugins/magnific-popup/) - Dmitry Semenov + +## License + +The original template is released under the Creative Commons Attribution 3.0 License. Please keep the original attribution link when using for your own project. + +The Magnific Popup lightbox is available under the MIT license, more info at their website linked above. diff --git a/gallery/themes/autophugo/archetypes/default.md b/gallery/themes/autophugo/archetypes/default.md new file mode 100644 index 0000000..936a736 --- /dev/null +++ b/gallery/themes/autophugo/archetypes/default.md @@ -0,0 +1,18 @@ +--- +{{- $imgglob := printf "*%s" (path.Join .File.Dir "*") -}} +{{- $resources := where (resources.Match $imgglob) "ResourceType" "image" }} +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +weight: 0 +albumthumb: "{{ cond (gt (len $resources) 0) (index $resources 0) "" }}" +draft: false +## Optional additional meta info for resources list +# alt: Image alternative and screen-reader text +# phototitle: A title for the photo +# description: A sub-title or description for the photo +resources: +{{ range $elem_index, $elem_val := $resources -}} +- src: "{{ . }}" + weight: {{ add (mul $elem_index 10) 10 }} +{{ end -}} +--- diff --git a/gallery/themes/autophugo/assets/css/font-awesome.min.css b/gallery/themes/autophugo/assets/css/font-awesome.min.css new file mode 100644 index 0000000..9b27f8e --- /dev/null +++ b/gallery/themes/autophugo/assets/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.6.3');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/gallery/themes/autophugo/assets/css/magnific-popup.css b/gallery/themes/autophugo/assets/css/magnific-popup.css new file mode 100644 index 0000000..de94785 --- /dev/null +++ b/gallery/themes/autophugo/assets/css/magnific-popup.css @@ -0,0 +1,351 @@ +/* Magnific Popup CSS */ +.mfp-bg { + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1042; + overflow: hidden; + position: fixed; + background: #0b0b0b; + opacity: 0.8; } + +.mfp-wrap { + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1043; + position: fixed; + outline: none !important; + -webkit-backface-visibility: hidden; } + +.mfp-container { + text-align: center; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + padding: 0 8px; + box-sizing: border-box; } + +.mfp-container:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; } + +.mfp-align-top .mfp-container:before { + display: none; } + +.mfp-content { + position: relative; + display: inline-block; + vertical-align: middle; + margin: 0 auto; + text-align: left; + z-index: 1045; } + +.mfp-inline-holder .mfp-content, +.mfp-ajax-holder .mfp-content { + width: 100%; + cursor: auto; } + +.mfp-ajax-cur { + cursor: progress; } + +.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { + cursor: -moz-zoom-out; + cursor: -webkit-zoom-out; + cursor: zoom-out; } + +.mfp-zoom { + cursor: pointer; + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; } + +.mfp-auto-cursor .mfp-content { + cursor: auto; } + +.mfp-close, +.mfp-arrow, +.mfp-preloader, +.mfp-counter { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } + +.mfp-loading.mfp-figure { + display: none; } + +.mfp-hide { + display: none !important; } + +.mfp-preloader { + color: #CCC; + position: absolute; + top: 50%; + width: auto; + text-align: center; + margin-top: -0.8em; + left: 8px; + right: 8px; + z-index: 1044; } + .mfp-preloader a { + color: #CCC; } + .mfp-preloader a:hover { + color: #FFF; } + +.mfp-s-ready .mfp-preloader { + display: none; } + +.mfp-s-error .mfp-content { + display: none; } + +button.mfp-close, +button.mfp-arrow { + overflow: visible; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; + display: block; + outline: none; + padding: 0; + z-index: 1046; + box-shadow: none; + touch-action: manipulation; } + +button::-moz-focus-inner { + padding: 0; + border: 0; } + +.mfp-close { + width: 44px; + height: 44px; + line-height: 44px; + position: absolute; + right: 0; + top: 0; + text-decoration: none; + text-align: center; + opacity: 0.65; + padding: 0 0 18px 10px; + color: #FFF; + font-style: normal; + font-size: 28px; + font-family: Arial, Baskerville, monospace; } + .mfp-close:hover, + .mfp-close:focus { + opacity: 1; } + .mfp-close:active { + top: 1px; } + +.mfp-close-btn-in .mfp-close { + color: #333; } + +.mfp-image-holder .mfp-close, +.mfp-iframe-holder .mfp-close { + color: #FFF; + right: -6px; + text-align: right; + padding-right: 6px; + width: 100%; } + +.mfp-counter { + position: absolute; + top: 0; + right: 0; + color: #CCC; + font-size: 12px; + line-height: 18px; + white-space: nowrap; } + +.mfp-arrow { + position: absolute; + opacity: 0.65; + margin: 0; + top: 50%; + margin-top: -55px; + padding: 0; + width: 90px; + height: 110px; + -webkit-tap-highlight-color: transparent; } + .mfp-arrow:active { + margin-top: -54px; } + .mfp-arrow:hover, + .mfp-arrow:focus { + opacity: 1; } + .mfp-arrow:before, + .mfp-arrow:after { + content: ''; + display: block; + width: 0; + height: 0; + position: absolute; + left: 0; + top: 0; + margin-top: 35px; + margin-left: 35px; + border: medium inset transparent; } + .mfp-arrow:after { + border-top-width: 13px; + border-bottom-width: 13px; + top: 8px; } + .mfp-arrow:before { + border-top-width: 21px; + border-bottom-width: 21px; + opacity: 0.7; } + +.mfp-arrow-left { + left: 0; } + .mfp-arrow-left:after { + border-right: 17px solid #FFF; + margin-left: 31px; } + .mfp-arrow-left:before { + margin-left: 25px; + border-right: 27px solid #3F3F3F; } + +.mfp-arrow-right { + right: 0; } + .mfp-arrow-right:after { + border-left: 17px solid #FFF; + margin-left: 39px; } + .mfp-arrow-right:before { + border-left: 27px solid #3F3F3F; } + +.mfp-iframe-holder { + padding-top: 40px; + padding-bottom: 40px; } + .mfp-iframe-holder .mfp-content { + line-height: 0; + width: 100%; + max-width: 900px; } + .mfp-iframe-holder .mfp-close { + top: -40px; } + +.mfp-iframe-scaler { + width: 100%; + height: 0; + overflow: hidden; + padding-top: 56.25%; } + .mfp-iframe-scaler iframe { + position: absolute; + display: block; + top: 0; + left: 0; + width: 100%; + height: 100%; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + background: #000; } + +/* Main image in popup */ +img.mfp-img { + width: auto; + max-width: 100%; + height: auto; + display: block; + line-height: 0; + box-sizing: border-box; + padding: 40px 0 60px; + margin: 0 auto; } + +/* The shadow behind the image */ +.mfp-figure { + line-height: 0; } + .mfp-figure:after { + content: ''; + position: absolute; + left: 0; + top: 40px; + bottom: 60px; + display: block; + right: 0; + width: auto; + height: auto; + z-index: -1; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); + background: #444; } + .mfp-figure small { + color: #BDBDBD; + display: block; + font-size: 12px; + line-height: 14px; } + .mfp-figure figure { + margin: 0; } + +.mfp-bottom-bar { + margin-top: -56px; + position: absolute; + top: 100%; + left: 0; + width: 100%; + cursor: auto; } + +.mfp-title { + text-align: left; + line-height: 18px; + color: #F3F3F3; + word-wrap: break-word; + padding-right: 36px; } + +.mfp-image-holder .mfp-content { + max-width: 100%; } + +.mfp-gallery .mfp-image-holder .mfp-figure { + cursor: pointer; } + +@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 500px) { + /** + * Remove all paddings around the image on small screen + */ + .mfp-img-mobile .mfp-image-holder { + padding-left: 0; + padding-right: 0; } + .mfp-img-mobile img.mfp-img { + padding: 0; } + .mfp-img-mobile .mfp-figure:after { + top: 0; + bottom: 0; } + .mfp-img-mobile .mfp-figure small { + display: inline; + margin-left: 5px; } + .mfp-img-mobile .mfp-bottom-bar { + background: rgba(0, 0, 0, 0.4); + bottom: 0; + margin: 0; + top: auto; + padding: 3px 5px; + position: fixed; + box-sizing: border-box; } + .mfp-img-mobile .mfp-bottom-bar:empty { + padding: 0; } + .mfp-img-mobile .mfp-counter { + right: 5px; + top: 3px; } + .mfp-img-mobile .mfp-close { + top: 0; + right: 0; + width: 35px; + height: 35px; + line-height: 35px; + background: rgba(0, 0, 0, 0.2); + position: fixed; + text-align: center; + padding: 0; } } + +@media all and (max-width: 900px) { + .mfp-arrow { + -webkit-transform: scale(0.75); + transform: scale(0.75); } + .mfp-arrow-left { + -webkit-transform-origin: 0; + transform-origin: 0; } + .mfp-arrow-right { + -webkit-transform-origin: 100%; + transform-origin: 100%; } + .mfp-container { + padding-left: 6px; + padding-right: 6px; } } diff --git a/gallery/themes/autophugo/assets/css/main.css b/gallery/themes/autophugo/assets/css/main.css new file mode 100644 index 0000000..90a86d4 --- /dev/null +++ b/gallery/themes/autophugo/assets/css/main.css @@ -0,0 +1,330 @@ +/* Reset */ +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } + +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } + +body { line-height: 1; } + +ol, ul { list-style: none; } + +blockquote, q { quotes: none; } + +blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } + +table { border-collapse: collapse; border-spacing: 0; } + +body { -webkit-text-size-adjust: none; } + +.thumb img { width: 100%; display: block; } + +.flexrow { display: flex; flex-wrap: wrap; padding: 0; width: 100%; } +.flexcol { flex: 1; padding: 0px 2px 0px 2px; } + +/* Box Model */ +*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } + +@-moz-keyframes spinner { 0% { -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); -webkit-transform: rotate(359deg); -ms-transform: rotate(359deg); transform: rotate(359deg); } } +@-webkit-keyframes spinner { 0% { -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); -webkit-transform: rotate(359deg); -ms-transform: rotate(359deg); transform: rotate(359deg); } } +@-ms-keyframes spinner { 0% { -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); -webkit-transform: rotate(359deg); -ms-transform: rotate(359deg); transform: rotate(359deg); } } +@keyframes spinner { 0% { -moz-transform: rotate(0deg); -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); -webkit-transform: rotate(359deg); -ms-transform: rotate(359deg); transform: rotate(359deg); } } +/* Basic */ +@-ms-viewport { width: device-width; } +body { -ms-overflow-style: scrollbar; } + +@media screen and (max-width: 600px) { h1 { width: 60%; } } + +@media screen and (max-width: 480px) { html, body { min-width: 320px; } } +body { background: #242629; } +body.loading *, body.loading *:before, body.loading *:after { -moz-animation: none !important; -webkit-animation: none !important; -ms-animation: none !important; animation: none !important; -moz-transition: none !important; -webkit-transition: none !important; -ms-transition: none !important; transition: none !important; } +body.resizing *, body.resizing *:before, body.resizing *:after { -moz-animation: none !important; -webkit-animation: none !important; -ms-animation: none !important; animation: none !important; -moz-transition: none !important; -webkit-transition: none !important; -ms-transition: none !important; transition: none !important; } + +/* Type */ +body, input, select, textarea { color: #a0a0a1; font-family: "Source Sans Pro", Helvetica, sans-serif; font-size: 15pt; font-weight: 300; letter-spacing: 0.025em; line-height: 1.65; } +@media screen and (max-width: 1680px) { body, input, select, textarea { font-size: 11pt; } } + +a { -moz-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; -ms-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; border-bottom: dotted 1px; color: #7293A0; text-decoration: none; } +a:hover { border-bottom-color: transparent; } + +strong, b { color: #ffffff; font-weight: 300; } + +em, i { font-style: italic; } + +p { margin: 0 0 2em 0; } + +h1, h2, h3, h4, h5, h6 { color: #ffffff; font-weight: 300; letter-spacing: 0.1em; line-height: 1.5; margin: 0 0 1em 0; text-transform: uppercase; } +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: inherit; text-decoration: none; } + +h1 { font-size: 2em; } + +h2 { font-size: 1.25em; } + +h3 { font-size: 1.1em; } + +h4 { font-size: 1em; } + +h5 { font-size: 0.9em; } + +h6 { font-size: 0.7em; } + +@media screen and (max-width: 736px) { h2 { font-size: 1em; } + h3 { font-size: 0.9em; } + h4 { font-size: 0.8em; } + h5 { font-size: 0.7em; } + h6 { font-size: 0.7em; } } +sub { font-size: 0.8em; position: relative; top: 0.5em; } + +sup { font-size: 0.8em; position: relative; top: -0.5em; } + +blockquote { border-left: 4px #36383c; font-style: italic; margin: 0 0 2em 0; padding: 0.5em 0 0.5em 2em; } + +code { background: #34363b; border: solid 1px #36383c; font-family: "Courier New", monospace; font-size: 0.9em; margin: 0 0.25em; padding: 0.25em 0.65em; } + +pre { -webkit-overflow-scrolling: touch; font-family: "Courier New", monospace; font-size: 0.9em; margin: 0 0 2em 0; } +pre code { display: block; line-height: 1.75; padding: 1em 1.5em; overflow-x: auto; } + +hr { border: 0; border-bottom: solid 1px #36383c; margin: 2em 0; } +hr.major { margin: 3em 0; } + +.align-left { text-align: left; } + +.align-center { text-align: center; } + +.align-right { text-align: right; } + +/* Button */ +input[type="submit"], input[type="reset"], input[type="button"], button, .button { -moz-appearance: none; -webkit-appearance: none; -ms-appearance: none; appearance: none; -moz-transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, color 0.2s ease-in-out; -webkit-transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, color 0.2s ease-in-out; -ms-transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, color 0.2s ease-in-out; transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, color 0.2s ease-in-out; background-color: transparent; border: 0; border-radius: 0; box-shadow: inset 0 0 0 2px #36383c; color: #ffffff !important; cursor: pointer; display: inline-block; font-size: 0.9em; font-weight: 300; height: 3.0555555556em; letter-spacing: 0.1em; line-height: 3.0555555556em; padding: 0 2.5em; text-align: center; text-decoration: none; text-transform: uppercase; white-space: nowrap; } +input[type="submit"]:hover, input[type="reset"]:hover, input[type="button"]:hover, button:hover, .button:hover { box-shadow: inset 0 0 0 2px #7293A0; color: #7293A0; } +input[type="submit"]:hover:active, input[type="reset"]:hover:active, input[type="button"]:hover:active, button:hover:active, .button:hover:active { background-color: rgba(114, 147, 160, 0.15); color: #7293A0 !important; } +input[type="submit"].icon, input[type="reset"].icon, input[type="button"].icon, button.icon, .button.icon { padding-left: 1.35em; } +input[type="submit"].icon:before, input[type="reset"].icon:before, input[type="button"].icon:before, button.icon:before, .button.icon:before { margin-right: 0.5em; } +input[type="submit"].fit, input[type="reset"].fit, input[type="button"].fit, button.fit, .button.fit { display: block; margin: 0 0 1em 0; width: 100%; } +input[type="submit"].small, input[type="reset"].small, input[type="button"].small, button.small, .button.small { font-size: 0.8em; } +input[type="submit"].big, input[type="reset"].big, input[type="button"].big, button.big, .button.big { font-size: 1.35em; } +input[type="submit"].special, input[type="reset"].special, input[type="button"].special, button.special, .button.special { background-color: #7293A0; box-shadow: none; } +input[type="submit"].special:hover, input[type="reset"].special:hover, input[type="button"].special:hover, button.special:hover, .button.special:hover { background-color: #90aab5; color: #ffffff !important; } +input[type="submit"].special:hover:active, input[type="reset"].special:hover:active, input[type="button"].special:hover:active, button.special:hover:active, .button.special:hover:active { background-color: #5a7985; } +input[type="submit"].disabled, input[type="submit"]:disabled, input[type="reset"].disabled, input[type="reset"]:disabled, input[type="button"].disabled, input[type="button"]:disabled, button.disabled, button:disabled, .button.disabled, .button:disabled { -moz-pointer-events: none; -webkit-pointer-events: none; -ms-pointer-events: none; pointer-events: none; opacity: 0.35; } + +/* Form */ +form { margin: 0 0 2em 0; } +form .field { margin: 0 0 1.3em 0; } +form .field.half { float: left; padding: 0 0 0 0.65em; width: 50%; } +form .field.half.first { padding: 0 0.65em 0 0; } +form > .actions { margin: 1.5em 0 0 0 !important; } +@media screen and (max-width: 736px) { form .field.half { float: none; padding: 0; width: 100%; } + form .field.half.first { padding: 0; } } + +label { color: #ffffff; display: block; font-size: 0.9em; font-weight: 300; margin: 0 0 1em 0; } + +input[type="text"], input[type="password"], input[type="email"], input[type="tel"], select, textarea { -moz-appearance: none; -webkit-appearance: none; -ms-appearance: none; appearance: none; background: #34363b; border: 0; border-radius: 0; color: #a0a0a1; display: block; outline: 0; padding: 0 1em; text-decoration: none; width: 100%; } +input[type="text"]:invalid, input[type="password"]:invalid, input[type="email"]:invalid, input[type="tel"]:invalid, select:invalid, textarea:invalid { box-shadow: none; } +input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="tel"]:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px #7293A0; } + +.select-wrapper { text-decoration: none; display: block; position: relative; } +.select-wrapper:before { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; font-family: FontAwesome; font-style: normal; font-weight: normal; text-transform: none !important; } +.select-wrapper:before { color: #36383c; content: '\f078'; display: block; height: 2.75em; line-height: 2.75em; pointer-events: none; position: absolute; right: 0; text-align: center; top: 0; width: 2.75em; } +.select-wrapper select::-ms-expand { display: none; } + +input[type="text"], input[type="password"], input[type="email"], select { height: 2.75em; } + +textarea { padding: 0.75em 1em; } + +input[type="checkbox"], input[type="radio"] { -moz-appearance: none; -webkit-appearance: none; -ms-appearance: none; appearance: none; display: block; float: left; margin-right: -2em; opacity: 0; width: 1em; z-index: -1; } +input[type="checkbox"] + label, input[type="radio"] + label { text-decoration: none; color: #a0a0a1; cursor: pointer; display: inline-block; font-size: 1em; font-weight: 300; padding-left: 2.4em; padding-right: 0.75em; position: relative; } +input[type="checkbox"] + label:before, input[type="radio"] + label:before { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; font-family: FontAwesome; font-style: normal; font-weight: normal; text-transform: none !important; } +input[type="checkbox"] + label:before, input[type="radio"] + label:before { background: #34363b; content: ''; display: inline-block; height: 1.65em; left: 0; line-height: 1.58125em; position: absolute; text-align: center; top: 0; width: 1.65em; } +input[type="checkbox"]:checked + label:before, input[type="radio"]:checked + label:before { background: #7293A0; border-color: #7293A0; color: #ffffff; content: '\f00c'; } +input[type="checkbox"]:focus + label:before, input[type="radio"]:focus + label:before { box-shadow: 0 0 0 2px #7293A0; } + +input[type="radio"] + label:before { border-radius: 100%; } + +::-webkit-input-placeholder { color: #707071 !important; opacity: 1.0; } + +:-moz-placeholder { color: #707071 !important; opacity: 1.0; } + +::-moz-placeholder { color: #707071 !important; opacity: 1.0; } + +:-ms-input-placeholder { color: #707071 !important; opacity: 1.0; } + +.formerize-placeholder { color: #707071 !important; opacity: 1.0; } + +/* Icon */ +.icon { text-decoration: none; border-bottom: none; position: relative; } +.icon:before { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; font-family: FontAwesome; font-style: normal; font-weight: normal; text-transform: none !important; } +.icon > .label { display: none; } + +/* List */ +ol { list-style: decimal; margin: 0 0 2em 0; padding-left: 1.25em; } +ol li { padding-left: 0.25em; } + +ul { list-style: disc; margin: 0 0 2em 0; padding-left: 1em; } +ul li { padding-left: 0.5em; } +ul.alt { list-style: none; padding-left: 0; } +ul.alt li { border-top: solid 1px #36383c; padding: 0.5em 0; } +ul.alt li:first-child { border-top: 0; padding-top: 0; } +ul.icons { cursor: default; list-style: none; padding-left: 0; } +ul.icons li { display: inline-block; padding: 0 1em 0 0; } +ul.icons li:last-child { padding-right: 0; } +ul.icons li .icon { color: #505051; } +ul.icons li .icon:before { font-size: 1.5em; } +ul.actions { cursor: default; list-style: none; padding-left: 0; } +ul.actions li { display: inline-block; padding: 0 1em 0 0; vertical-align: middle; } +ul.actions li:last-child { padding-right: 0; } +ul.actions.small li { padding: 0 0.5em 0 0; } +ul.actions.vertical li { display: block; padding: 1em 0 0 0; } +ul.actions.vertical li:first-child { padding-top: 0; } +ul.actions.vertical li > * { margin-bottom: 0; } +ul.actions.vertical.small li { padding: 0.5em 0 0 0; } +ul.actions.vertical.small li:first-child { padding-top: 0; } +ul.actions.fit { display: table; margin-left: -1em; padding: 0; table-layout: fixed; width: calc(100% + 1em); } +ul.actions.fit li { display: table-cell; padding: 0 0 0 1em; } +ul.actions.fit li > * { margin-bottom: 0; } +ul.actions.fit.small { margin-left: -0.5em; width: calc(100% + 0.5em); } +ul.actions.fit.small li { padding: 0 0 0 0.5em; } +@media screen and (max-width: 480px) { ul.actions { margin: 0 0 2em 0; } + ul.actions li { padding: 1em 0 0 0; display: block; text-align: center; width: 100%; } + ul.actions li:first-child { padding-top: 0; } + ul.actions li > * { width: 100%; margin: 0 !important; } + ul.actions li > *.icon:before { margin-left: -2em; } + ul.actions.small li { padding: 0.5em 0 0 0; } + ul.actions.small li:first-child { padding-top: 0; } } + +dl { margin: 0 0 2em 0; } +dl dt { display: block; font-weight: 300; margin: 0 0 1em 0; } +dl dd { margin-left: 2em; } + +/* Table */ +.table-wrapper { -webkit-overflow-scrolling: touch; overflow-x: auto; } + +table { margin: 0 0 2em 0; width: 100%; } +table tbody tr { border: solid 1px #36383c; border-left: 0; border-right: 0; } +table tbody tr:nth-child(2n + 1) { background-color: #34363b; } +table td { padding: 0.75em 0.75em; } +table th { color: #ffffff; font-size: 0.9em; font-weight: 300; padding: 0 0.75em 0.75em 0.75em; text-align: left; } +table thead { border-bottom: solid 2px #36383c; } +table tfoot { border-top: solid 2px #36383c; } +table.alt { border-collapse: separate; } +table.alt tbody tr td { border: solid 1px #36383c; border-left-width: 0; border-top-width: 0; } +table.alt tbody tr td:first-child { border-left-width: 1px; } +table.alt tbody tr:first-child td { border-top-width: 1px; } +table.alt thead { border-bottom: 0; } +table.alt tfoot { border-top: 0; } + +/* Panel */ +.panel { padding: 4em 4em 2em 4em ; -moz-transform: translateY(100vh); -webkit-transform: translateY(100vh); -ms-transform: translateY(100vh); transform: translateY(100vh); -moz-transition: -moz-transform 0.5s ease; -webkit-transition: -webkit-transform 0.5s ease; -ms-transition: -ms-transform 0.5s ease; transition: transform 0.5s ease, visibility 0.5s ease; -webkit-overflow-scrolling: touch; background: rgba(36, 38, 41, 0.975); bottom: 4em; left: 0; max-height: calc(80vh - 4em); overflow-y: auto; position: fixed; width: 100%; z-index: 101; visibility: hidden; } +.panel.active { -moz-transform: translateY(1px); -webkit-transform: translateY(1px); -ms-transform: translateY(1px); transform: translateY(1px); visibility: visible; } +.panel > .inner { margin: 0 auto; max-width: 100%; width: 75em; } +.panel > .inner.split { display: -moz-flex; display: -webkit-flex; display: -ms-flex; display: flex; } +.panel > .inner.split > div { margin-left: 4em; width: 50%; } +.panel > .inner.split > :first-child { margin-left: 0; } +.panel > .closer { -moz-transition: opacity 0.2s ease-in-out; -webkit-transition: opacity 0.2s ease-in-out; -ms-transition: opacity 0.2s ease-in-out; transition: opacity 0.2s ease-in-out; background-image: url("images/close.svg"); background-position: center; background-repeat: no-repeat; background-size: 3em; cursor: pointer; height: 5em; opacity: 0.25; position: absolute; right: 0; top: 0; width: 5em; z-index: 2; } +.panel > .closer:hover { opacity: 1.0; } +@media screen and (max-width: 1280px) { .panel { padding: 3em 3em 1em 3em ; } + .panel > .inner.split > div { margin-left: 3em; } + .panel > .closer { background-size: 2.5em; background-position: 75% 25%; } } +@media screen and (max-width: 980px) { .panel > .inner.split { -moz-flex-direction: column; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; } + .panel > .inner.split > div { margin-left: 0; width: 100%; } } +@media screen and (max-width: 736px) { .panel { -moz-transform: translateY(-100vh); -webkit-transform: translateY(-100vh); -ms-transform: translateY(-100vh); transform: translateY(-100vh); padding: 4em 2em 2em 2em ; bottom: auto; top: calc(4em - 1px); } + .panel.active { -moz-transform: translateY(0); -webkit-transform: translateY(0); -ms-transform: translateY(0); transform: translateY(0); } } + +/* Wrapper */ +#wrapper { -moz-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -moz-filter 0.5s ease; -webkit-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -webkit-filter 0.5s ease; -ms-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -ms-filter 0.5s ease; transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, filter 0.5s ease; position: relative; } +#wrapper:after { -moz-pointer-events: none; -webkit-pointer-events: none; -ms-pointer-events: none; pointer-events: none; -moz-transition: opacity 0.5s ease, visibility 0.5s; -webkit-transition: opacity 0.5s ease, visibility 0.5s; -ms-transition: opacity 0.5s ease, visibility 0.5s; transition: opacity 0.5s ease, visibility 0.5s; background: rgba(36, 38, 41, 0.5); content: ''; display: block; height: 100%; left: 0; opacity: 0; position: absolute; top: 0; visibility: hidden; width: 100%; z-index: 1; } +body.ie #wrapper:after { background: rgba(36, 38, 41, 0.8); } +body.modal-active #wrapper { -moz-filter: blur(8px); -webkit-filter: blur(8px); -ms-filter: blur(8px); filter: blur(8px); } +body.modal-active #wrapper:after { -moz-pointer-events: auto; -webkit-pointer-events: auto; -ms-pointer-events: auto; pointer-events: auto; opacity: 1; visibility: visible; z-index: 103; } +#wrapper:before { -moz-animation: spinner 1s infinite linear !important; -webkit-animation: spinner 1s infinite linear !important; -ms-animation: spinner 1s infinite linear !important; animation: spinner 1s infinite linear !important; -moz-pointer-events: none; -webkit-pointer-events: none; -ms-pointer-events: none; pointer-events: none; -moz-transition: top 0.75s ease-in-out, opacity 0.35s ease-out, visibility 0.35s; -webkit-transition: top 0.75s ease-in-out, opacity 0.35s ease-out, visibility 0.35s; -ms-transition: top 0.75s ease-in-out, opacity 0.35s ease-out, visibility 0.35s; transition: top 0.75s ease-in-out, opacity 0.35s ease-out, visibility 0.35s; background-image: url("images/spinner.svg"); background-position: center; background-repeat: no-repeat; background-size: contain; content: ''; display: block; font-size: 2em; height: 2em; left: 50%; line-height: 2em; margin: -1em 0 0 -1em; opacity: 0; position: fixed; text-align: center; top: 75%; visibility: hidden; width: 2em; } +body.loading #wrapper:before { -moz-transition: opacity 1s ease-out !important; -webkit-transition: opacity 1s ease-out !important; -ms-transition: opacity 1s ease-out !important; transition: opacity 1s ease-out !important; -moz-transition-delay: 0.5s !important; -webkit-transition-delay: 0.5s !important; -ms-transition-delay: 0.5s !important; transition-delay: 0.5s !important; opacity: 0.25; top: 50%; visibility: visible; } + +/* Header */ +body { padding: 0 0 4em 0; } + +#header { -moz-transform: translateY(0); -webkit-transform: translateY(0); -ms-transform: translateY(0); transform: translateY(0); -moz-transition: -moz-transform 1s ease; -webkit-transition: -webkit-transform 1s ease; -ms-transition: -ms-transform 1s ease; transition: transform 1s ease; -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; background: #1f2224; bottom: -1em; height: 5em; left: 0; line-height: 4em; padding: 0 1.5em; position: fixed; user-select: none; width: 100%; z-index: 102; } +body.loading #header { -moz-transform: translateY(4em); -webkit-transform: translateY(4em); -ms-transform: translateY(4em); transform: translateY(4em); } +#header h1 { color: #a0a0a1; display: inline-block; font-size: 1em; line-height: 1; margin: 0; vertical-align: middle; } +#header h1 a { border: 0; color: inherit; } +#header h1 a:hover { color: inherit !important; } +#header nav { position: absolute; right: 0; top: 0; } +#header nav > ul { list-style: none; margin: 0; padding: 0; } +#header nav > ul > li { display: inline-block; padding: 0; } +#header nav > ul > li a { -moz-transition: background-color 0.5s ease; -webkit-transition: background-color 0.5s ease; -ms-transition: background-color 0.5s ease; transition: background-color 0.5s ease; border: 0; color: #ffffff; display: inline-block; letter-spacing: 0.1em; padding: 0 1.65em; text-transform: uppercase; } +#header nav > ul > li a.icon:before { color: #505051; float: right; margin-left: 0.75em; } +#header nav > ul > li a:hover { color: #ffffff !important; } +#header nav > ul > li a.active { background-color: #242629; } + +@media screen and (max-width: 736px) { body { padding: 4em 0 0 0; } + #header { -moz-transform: translateY(0); -webkit-transform: translateY(0); -ms-transform: translateY(0); transform: translateY(0); bottom: auto; height: 4em; padding: 0 1em; top: 0; } + body.loading #header { -moz-transform: translateY(-3.4em); -webkit-transform: translateY(-3.4em); -ms-transform: translateY(-3.4em); transform: translateY(-3.4em); } + #header h1 { font-size: 0.9em; } + #header nav > ul > li a { font-size: 0.9em; padding: 0 1.15em; } } +/* Main */ +#main { -moz-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -moz-filter 0.5s ease; -webkit-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -webkit-filter 0.5s ease; -ms-transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, -ms-filter 0.5s ease; transition: -moz-filter 0.5s ease, -webkit-filter 0.5s ease, -ms-filter 0.5s ease, filter 0.5s ease; display: -moz-flex; display: -webkit-flex; display: -ms-flex; display: flex; -moz-flex-wrap: wrap; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } +#main .thumb { -moz-transition: opacity 1.25s ease-in-out; -webkit-transition: opacity 1.25s ease-in-out; -ms-transition: opacity 1.25s ease-in-out; transition: opacity 1.25s ease-in-out; -moz-pointer-events: auto; -webkit-pointer-events: auto; -ms-pointer-events: auto; pointer-events: auto; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); opacity: 1; overflow: hidden; position: relative; } +#main .thumb:after { background-image: -moz-linear-gradient(to top, rgba(10,17,25,0.35) 5%, rgba(10,17,25,0) 35%); background-image: -webkit-linear-gradient(to top, rgba(10,17,25,0.35) 5%, rgba(10,17,25,0) 35%); background-image: -ms-linear-gradient(to top, rgba(10,17,25,0.35) 5%, rgba(10,17,25,0) 35%); background-image: linear-gradient(to top, rgba(10,17,25,0.35) 5%, rgba(10,17,25,0) 35%); -moz-pointer-events: none; -webkit-pointer-events: none; -ms-pointer-events: none; pointer-events: none; background-size: cover; content: ''; display: block; height: 100%; left: 0; position: absolute; top: 0; width: 100%; } +#main .thumb > .image { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); background-position: center; background-repeat: no-repeat; background-size: cover; border: 0; width: 100%; } +#main .thumb > .link { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); background-position: center; background-repeat: no-repeat; background-size: cover; border: 0; width: 100%; } +#main .thumb > h2 { -moz-pointer-events: none; -webkit-pointer-events: none; -ms-pointer-events: none; pointer-events: none; bottom: 1.875em; font-size: 0.8em; left: 2.1875em; margin: 0; position: absolute; z-index: 1; } +#main .thumb > p { display: none; } +#main:after { -moz-pointer-events: none; -webkit-pointer-events: none; -ms-pointer-events: none; pointer-events: none; -moz-transition: opacity 0.5s ease, visibility 0.5s; -webkit-transition: opacity 0.5s ease, visibility 0.5s; -ms-transition: opacity 0.5s ease, visibility 0.5s; transition: opacity 0.5s ease, visibility 0.5s; background: rgba(36, 38, 41, 0.25); content: ''; display: block; height: 100%; left: 0; opacity: 1; position: absolute; top: 0; visibility: hidden; width: 100%; z-index: 1; } +body.ie #main:after { background: rgba(36, 38, 41, 0.55); } +#main:before { -moz-pointer-events: none; -webkit-pointer-events: none; -ms-pointer-events: none; pointer-events: none; -moz-transition: opacity 0.5s ease, visibility 0.5s; -webkit-transition: opacity 0.5s ease, visibility 0.5s; -ms-transition: opacity 0.5s ease, visibility 0.5s; transition: opacity 0.5s ease, visibility 0.5s; background: rgba(36, 38, 41, 0.25); content: ''; display: block; height: 100%; left: 0; opacity: 1; position: absolute; top: 0; visibility: hidden; width: 100%; z-index: 1; } +body.ie #main:before { background: rgba(36, 38, 41, 0.55); } +body.content-active #main { -moz-filter: blur(6px); -webkit-filter: blur(6px); -ms-filter: blur(6px); filter: blur(6px); } +body.content-active #main:after { -moz-pointer-events: auto; -webkit-pointer-events: auto; -ms-pointer-events: auto; pointer-events: auto; opacity: 1; visibility: visible; } +body.loading #main .thumb { -moz-pointer-events: none; -webkit-pointer-events: none; -ms-pointer-events: none; pointer-events: none; opacity: 0; visibility: hidden;} +#main .thumb { -moz-transition-delay: 2.525s; -webkit-transition-delay: 2.525s; -ms-transition-delay: 2.525s; transition-delay: 2.525s; width: 100%; padding: 0px 0px 4px 0px; } +#main .thumb:nth-child(1) { -moz-transition-delay: 0.65s; -webkit-transition-delay: 0.65s; -ms-transition-delay: 0.65s; transition-delay: 0.65s; } +#main .thumb:nth-child(2) { -moz-transition-delay: 0.8s; -webkit-transition-delay: 0.8s; -ms-transition-delay: 0.8s; transition-delay: 0.8s; } +#main .thumb:nth-child(3) { -moz-transition-delay: 0.95s; -webkit-transition-delay: 0.95s; -ms-transition-delay: 0.95s; transition-delay: 0.95s; } +#main .thumb:nth-child(4) { -moz-transition-delay: 1.1s; -webkit-transition-delay: 1.1s; -ms-transition-delay: 1.1s; transition-delay: 1.1s; } +#main .thumb:nth-child(5) { -moz-transition-delay: 1.25s; -webkit-transition-delay: 1.25s; -ms-transition-delay: 1.25s; transition-delay: 1.25s; } +#main .thumb:nth-child(6) { -moz-transition-delay: 1.4s; -webkit-transition-delay: 1.4s; -ms-transition-delay: 1.4s; transition-delay: 1.4s; } +#main .thumb:nth-child(7) { -moz-transition-delay: 1.55s; -webkit-transition-delay: 1.55s; -ms-transition-delay: 1.55s; transition-delay: 1.55s; } +#main .thumb:nth-child(8) { -moz-transition-delay: 1.7s; -webkit-transition-delay: 1.7s; -ms-transition-delay: 1.7s; transition-delay: 1.7s; } +#main .thumb:nth-child(9) { -moz-transition-delay: 1.85s; -webkit-transition-delay: 1.85s; -ms-transition-delay: 1.85s; transition-delay: 1.85s; } +#main .thumb:nth-child(10) { -moz-transition-delay: 2s; -webkit-transition-delay: 2s; -ms-transition-delay: 2s; transition-delay: 2s; } +#main .thumb:nth-child(11) { -moz-transition-delay: 2.15s; -webkit-transition-delay: 2.15s; -ms-transition-delay: 2.15s; transition-delay: 2.15s; } +#main .thumb:nth-child(12) { -moz-transition-delay: 2.3s; -webkit-transition-delay: 2.3s; -ms-transition-delay: 2.3s; transition-delay: 2.3s; } + +/* Footer */ +#footer .copyright { color: #505051; font-size: 0.9em; } +#footer .copyright a { color: inherit; } + + +/* Magnific Popup Lightbox */ +.mfp-container a, .mfp-container button, .mfp-container .nav-left, .mfp-container .nav-right { transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; text-decoration: none; } + +.mfp-container .nav-left, .mfp-container .nav-right { background-image: url("images/arrow.svg"); background-position: center; background-repeat: no-repeat; background-size: 5em; cursor: pointer; height: 8em; margin-top: -4em; opacity: 0.65; position: absolute; top: 50%; width: 6em; z-index: 1046; border-bottom: none; box-shadow: none; } +.mfp-container .nav-left:hover, .mfp-container .nav-right:hover { opacity: 1; } + +.mfp-container .nav-left { transform: scaleX(-1); left: 0; } +.mfp-container .nav-right { right: 0; } + +.mfp-bottom-bar .mfp-title { float: left; width: 100%; } + +.mfp-bottom-bar .caption-surround { float: left; } +.mfp-bottom-bar .caption-surround h2 { margin-bottom: .25em; } + +.mfp-bottom-bar .download-button { float: right; padding-left: 1em; padding-right: 1em; } +.mfp-bottom-bar .download-button a { border-bottom: none; } +.mfp-bottom-bar .download-button a, .mfp-figure .mfp-close { opacity: .65; color: #ffffff; } +.mfp-bottom-bar .download-button a:hover, .mfp-figure .mfp-close:hover { opacity: 1; } + +article.thumb a:focus img { border: solid 1px #ffffff; } + + +/* TODO: implement flexible, changing multicolumn layout, in Javascript */ +/* For now - max-width of 1200px */ +body, #footer, #header { max-width: 1200px; margin: 0 auto; left: auto; } + + +/* Other */ +.taxonomy_list div { display: flex; flex-wrap: wrap; padding: 0; } +.tax_term { margin: 0 5px 0 0; height: fit-content; } +.taxonomy_list h2 { margin-right: 5px; } +.caption_tax { display: none; } +.caption-surround .caption_tax { display: flex; flex-wrap: wrap; padding: 0; } diff --git a/gallery/themes/autophugo/assets/css/source-sans-pro.css b/gallery/themes/autophugo/assets/css/source-sans-pro.css new file mode 100644 index 0000000..a8b0ad5 --- /dev/null +++ b/gallery/themes/autophugo/assets/css/source-sans-pro.css @@ -0,0 +1,24 @@ +@font-face { + font-family: 'Source Sans Pro'; + font-style: italic; + font-weight: 300; + src: url(../fonts/ssp/SourceSansPro-LightItalic.ttf) format('truetype'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: italic; + font-weight: 400; + src: url(../fonts/ssp/SourceSansPro-Italic.ttf) format('truetype'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 300; + src: url(../fonts/ssp/SourceSansPro-Light.ttf) format('truetype'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: url(../fonts/ssp/SourceSansPro-Regular.ttf) format('truetype'); +} diff --git a/gallery/themes/autophugo/assets/css/user.css b/gallery/themes/autophugo/assets/css/user.css new file mode 100644 index 0000000..842fb2d --- /dev/null +++ b/gallery/themes/autophugo/assets/css/user.css @@ -0,0 +1 @@ +/* Override this by placing your own custom "user.css" in your "assets/css" directory. When you do, this file will automatically be ignored! */ diff --git a/gallery/themes/autophugo/assets/js/jquery.magnific-popup.js b/gallery/themes/autophugo/assets/js/jquery.magnific-popup.js new file mode 100644 index 0000000..b288155 --- /dev/null +++ b/gallery/themes/autophugo/assets/js/jquery.magnific-popup.js @@ -0,0 +1,1885 @@ +/*! Magnific Popup - v1.1.0 - 2016-02-20 +* http://dimsemenov.com/plugins/magnific-popup/ +* Copyright (c) 2016 Dmitry Semenov; */ +;(function (factory) { +if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS + factory(require('jquery')); + } else { + // Browser globals + factory(window.jQuery || window.Zepto); + } + }(function($) { + +/*>>core*/ +/** + * + * Magnific Popup Core JS file + * + */ + + +/** + * Private static constants + */ +var CLOSE_EVENT = 'Close', + BEFORE_CLOSE_EVENT = 'BeforeClose', + AFTER_CLOSE_EVENT = 'AfterClose', + BEFORE_APPEND_EVENT = 'BeforeAppend', + MARKUP_PARSE_EVENT = 'MarkupParse', + OPEN_EVENT = 'Open', + CHANGE_EVENT = 'Change', + NS = 'mfp', + EVENT_NS = '.' + NS, + READY_CLASS = 'mfp-ready', + REMOVING_CLASS = 'mfp-removing', + PREVENT_CLOSE_CLASS = 'mfp-prevent-close'; + + +/** + * Private vars + */ +/*jshint -W079 */ +var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this' + MagnificPopup = function(){}, + _isJQ = !!(window.jQuery), + _prevStatus, + _window = $(window), + _document, + _prevContentType, + _wrapClasses, + _currPopupType; + + +/** + * Private functions + */ +var _mfpOn = function(name, f) { + mfp.ev.on(NS + name + EVENT_NS, f); + }, + _getEl = function(className, appendTo, html, raw) { + var el = document.createElement('div'); + el.className = 'mfp-'+className; + if(html) { + el.innerHTML = html; + } + if(!raw) { + el = $(el); + if(appendTo) { + el.appendTo(appendTo); + } + } else if(appendTo) { + appendTo.appendChild(el); + } + return el; + }, + _mfpTrigger = function(e, data) { + mfp.ev.triggerHandler(NS + e, data); + + if(mfp.st.callbacks) { + // converts "mfpEventName" to "eventName" callback and triggers it if it's present + e = e.charAt(0).toLowerCase() + e.slice(1); + if(mfp.st.callbacks[e]) { + mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]); + } + } + }, + _getCloseBtn = function(type) { + if(type !== _currPopupType || !mfp.currTemplate.closeBtn) { + mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace(/%title%/g, mfp.st.tClose ) ); + _currPopupType = type; + } + return mfp.currTemplate.closeBtn; + }, + // Initialize Magnific Popup only when called at least once + _checkInstance = function() { + if(!$.magnificPopup.instance) { + /*jshint -W020 */ + mfp = new MagnificPopup(); + mfp.init(); + $.magnificPopup.instance = mfp; + } + }, + // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr + supportsTransitions = function() { + var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist + v = ['ms','O','Moz','Webkit']; // 'v' for vendor + + if( s['transition'] !== undefined ) { + return true; + } + + while( v.length ) { + if( v.pop() + 'Transition' in s ) { + return true; + } + } + + return false; + }; + + + +/** + * Public functions + */ +MagnificPopup.prototype = { + + constructor: MagnificPopup, + + /** + * Initializes Magnific Popup plugin. + * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed + */ + init: function() { + var appVersion = navigator.appVersion; + mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener; + mfp.isAndroid = (/android/gi).test(appVersion); + mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion); + mfp.supportsTransition = supportsTransitions(); + + // We disable fixed positioned lightbox on devices that don't handle it nicely. + // If you know a better way of detecting this - let me know. + mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) ); + _document = $(document); + + mfp.popupsCache = {}; + }, + + /** + * Opens popup + * @param data [description] + */ + open: function(data) { + + var i; + + if(data.isObj === false) { + // convert jQuery collection to array to avoid conflicts later + mfp.items = data.items.toArray(); + + mfp.index = 0; + var items = data.items, + item; + for(i = 0; i < items.length; i++) { + item = items[i]; + if(item.parsed) { + item = item.el[0]; + } + if(item === data.el[0]) { + mfp.index = i; + break; + } + } + } else { + mfp.items = $.isArray(data.items) ? data.items : [data.items]; + mfp.index = data.index || 0; + } + + // if popup is already opened - we just update the content + if(mfp.isOpen) { + mfp.updateItemHTML(); + return; + } + + mfp.types = []; + _wrapClasses = ''; + if(data.mainEl && data.mainEl.length) { + mfp.ev = data.mainEl.eq(0); + } else { + mfp.ev = _document; + } + + if(data.key) { + if(!mfp.popupsCache[data.key]) { + mfp.popupsCache[data.key] = {}; + } + mfp.currTemplate = mfp.popupsCache[data.key]; + } else { + mfp.currTemplate = {}; + } + + + + mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); + mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos; + + if(mfp.st.modal) { + mfp.st.closeOnContentClick = false; + mfp.st.closeOnBgClick = false; + mfp.st.showCloseBtn = false; + mfp.st.enableEscapeKey = false; + } + + + // Building markup + // main containers are created only once + if(!mfp.bgOverlay) { + + // Dark overlay + mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() { + mfp.close(); + }); + + mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) { + if(mfp._checkIfClose(e.target)) { + mfp.close(); + } + }); + + mfp.container = _getEl('container', mfp.wrap); + } + + mfp.contentContainer = _getEl('content'); + if(mfp.st.preloader) { + mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading); + } + + + // Initializing modules + var modules = $.magnificPopup.modules; + for(i = 0; i < modules.length; i++) { + var n = modules[i]; + n = n.charAt(0).toUpperCase() + n.slice(1); + mfp['init'+n].call(mfp); + } + _mfpTrigger('BeforeOpen'); + + + if(mfp.st.showCloseBtn) { + // Close button + if(!mfp.st.closeBtnInside) { + mfp.wrap.append( _getCloseBtn() ); + } else { + _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) { + values.close_replaceWith = _getCloseBtn(item.type); + }); + _wrapClasses += ' mfp-close-btn-in'; + } + } + + if(mfp.st.alignTop) { + _wrapClasses += ' mfp-align-top'; + } + + + + if(mfp.fixedContentPos) { + mfp.wrap.css({ + overflow: mfp.st.overflowY, + overflowX: 'hidden', + overflowY: mfp.st.overflowY + }); + } else { + mfp.wrap.css({ + top: _window.scrollTop(), + position: 'absolute' + }); + } + if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) { + mfp.bgOverlay.css({ + height: _document.height(), + position: 'absolute' + }); + } + + + + if(mfp.st.enableEscapeKey) { + // Close on ESC key + _document.on('keyup' + EVENT_NS, function(e) { + if(e.keyCode === 27) { + mfp.close(); + } + }); + } + + _window.on('resize' + EVENT_NS, function() { + mfp.updateSize(); + }); + + + if(!mfp.st.closeOnContentClick) { + _wrapClasses += ' mfp-auto-cursor'; + } + + if(_wrapClasses) + mfp.wrap.addClass(_wrapClasses); + + + // this triggers recalculation of layout, so we get it once to not to trigger twice + var windowHeight = mfp.wH = _window.height(); + + + var windowStyles = {}; + + if( mfp.fixedContentPos ) { + if(mfp._hasScrollBar(windowHeight)){ + var s = mfp._getScrollbarSize(); + if(s) { + windowStyles.marginRight = s; + } + } + } + + if(mfp.fixedContentPos) { + if(!mfp.isIE7) { + windowStyles.overflow = 'hidden'; + } else { + // ie7 double-scroll bug + $('body, html').css('overflow', 'hidden'); + } + } + + + + var classesToadd = mfp.st.mainClass; + if(mfp.isIE7) { + classesToadd += ' mfp-ie7'; + } + if(classesToadd) { + mfp._addClassToMFP( classesToadd ); + } + + // add content + mfp.updateItemHTML(); + + _mfpTrigger('BuildControls'); + + // remove scrollbar, add margin e.t.c + $('html').css(windowStyles); + + // Add aria-hidden attributes to page elements, so that they are not + // accessible for as long as the popup is on. + // The original aria-hidden attributes (if any) are saved as + // data-aria-hidden, and resumed afterwards. + mfp._ariaHiddenElements = $('body').children(); + $(mfp._ariaHiddenElements).each(function() { + $(this).attr('data-aria-hidden', $(this).attr('aria-hidden')); + $(this).attr('aria-hidden', 'true'); + }); + + // add everything to DOM + mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) ); + + // Save last focused element + mfp._lastFocusedEl = document.activeElement; + + // Wait for next cycle to allow CSS transition + setTimeout(function() { + + if(mfp.content) { + mfp._addClassToMFP(READY_CLASS); + mfp._setFocus(); + } else { + // if content is not defined (not loaded e.t.c) we add class only for BG + mfp.bgOverlay.addClass(READY_CLASS); + } + + // Trap the focus in popup + _document.on('focusin' + EVENT_NS, mfp._onFocusIn); + + }, 16); + + mfp.isOpen = true; + mfp.updateSize(windowHeight); + _mfpTrigger(OPEN_EVENT); + + return data; + }, + + /** + * Closes the popup + */ + close: function() { + if(!mfp.isOpen) return; + _mfpTrigger(BEFORE_CLOSE_EVENT); + + mfp.isOpen = false; + // for CSS3 animation + if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) { + mfp._addClassToMFP(REMOVING_CLASS); + setTimeout(function() { + mfp._close(); + }, mfp.st.removalDelay); + } else { + mfp._close(); + } + }, + + /** + * Helper for close() function + */ + _close: function() { + _mfpTrigger(CLOSE_EVENT); + + var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' '; + + mfp.bgOverlay.detach(); + mfp.wrap.detach(); + mfp.container.empty(); + + if(mfp.st.mainClass) { + classesToRemove += mfp.st.mainClass + ' '; + } + + mfp._removeClassFromMFP(classesToRemove); + + if(mfp.fixedContentPos) { + var windowStyles = {marginRight: ''}; + if(mfp.isIE7) { + $('body, html').css('overflow', ''); + } else { + windowStyles.overflow = ''; + } + $('html').css(windowStyles); + } + + _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS); + mfp.ev.off(EVENT_NS); + + // clean up DOM elements that aren't removed + mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style'); + mfp.bgOverlay.attr('class', 'mfp-bg'); + mfp.container.attr('class', 'mfp-container'); + + // Remove aria-hidden attributes from page elements + $(mfp._ariaHiddenElements).each(function() { + if(typeof $(this).attr('data-aria-hidden') === 'undefined') { + $(this).removeAttr('aria-hidden'); + } else { + $(this).attr('aria-hidden', $(this).attr('data-aria-hidden')); + } + $(this).removeAttr('data-aria-hidden'); + }); + mfp._ariaHiddenElements = []; + + // remove close button from target element + if(mfp.st.showCloseBtn && + (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) { + if(mfp.currTemplate.closeBtn) + mfp.currTemplate.closeBtn.detach(); + } + + + if(mfp.st.autoFocusLast && mfp._lastFocusedEl) { + $(mfp._lastFocusedEl).focus(); // put tab focus back + } + mfp.currItem = null; + mfp.content = null; + mfp.currTemplate = null; + mfp.prevHeight = 0; + + _mfpTrigger(AFTER_CLOSE_EVENT); + }, + + updateSize: function(winHeight) { + + if(mfp.isIOS) { + // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2 + var zoomLevel = document.documentElement.clientWidth / window.innerWidth; + var height = window.innerHeight * zoomLevel; + mfp.wrap.css('height', height); + mfp.wH = height; + } else { + mfp.wH = winHeight || _window.height(); + } + // Fixes #84: popup incorrectly positioned with position:relative on body + if(!mfp.fixedContentPos) { + mfp.wrap.css('height', mfp.wH); + } + + _mfpTrigger('Resize'); + + }, + + /** + * Set content of popup based on current index + */ + updateItemHTML: function() { + var item = mfp.items[mfp.index]; + + // Detach and perform modifications + mfp.contentContainer.detach(); + + if(mfp.content) + mfp.content.detach(); + + if(!item.parsed) { + item = mfp.parseEl( mfp.index ); + } + + var type = item.type; + + _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]); + // BeforeChange event works like so: + // _mfpOn('BeforeChange', function(e, prevType, newType) { }); + + mfp.currItem = item; + + if(!mfp.currTemplate[type]) { + var markup = mfp.st[type] ? mfp.st[type].markup : false; + + // allows to modify markup + _mfpTrigger('FirstMarkupParse', markup); + + if(markup) { + mfp.currTemplate[type] = $(markup); + } else { + // if there is no markup found we just define that template is parsed + mfp.currTemplate[type] = true; + } + } + + if(_prevContentType && _prevContentType !== item.type) { + mfp.container.removeClass('mfp-'+_prevContentType+'-holder'); + } + + var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]); + mfp.appendContent(newContent, type); + + item.preloaded = true; + + _mfpTrigger(CHANGE_EVENT, item); + _prevContentType = item.type; + + // Append container back after its content changed + mfp.container.prepend(mfp.contentContainer); + + _mfpTrigger('AfterChange'); + }, + + + /** + * Set HTML content of popup + */ + appendContent: function(newContent, type) { + mfp.content = newContent; + + if(newContent) { + if(mfp.st.showCloseBtn && mfp.st.closeBtnInside && + mfp.currTemplate[type] === true) { + // if there is no markup, we just append close button element inside + if(!mfp.content.find('.mfp-close').length) { + mfp.content.append(_getCloseBtn()); + } + } else { + mfp.content = newContent; + } + } else { + mfp.content = ''; + } + + _mfpTrigger(BEFORE_APPEND_EVENT); + mfp.container.addClass('mfp-'+type+'-holder'); + + mfp.contentContainer.append(mfp.content); + }, + + + /** + * Creates Magnific Popup data object based on given data + * @param {int} index Index of item to parse + */ + parseEl: function(index) { + var item = mfp.items[index], + type; + + if(item.tagName) { + item = { el: $(item) }; + } else { + type = item.type; + item = { data: item, src: item.src }; + } + + if(item.el) { + var types = mfp.types; + + // check for 'mfp-TYPE' class + for(var i = 0; i < types.length; i++) { + if( item.el.hasClass('mfp-'+types[i]) ) { + type = types[i]; + break; + } + } + + item.src = item.el.attr('data-mfp-src'); + if(!item.src) { + item.src = item.el.attr('href'); + } + } + + item.type = type || mfp.st.type || 'inline'; + item.index = index; + item.parsed = true; + mfp.items[index] = item; + _mfpTrigger('ElementParse', item); + + return mfp.items[index]; + }, + + + /** + * Initializes single popup or a group of popups + */ + addGroup: function(el, options) { + var eHandler = function(e) { + e.mfpEl = this; + mfp._openClick(e, el, options); + }; + + if(!options) { + options = {}; + } + + var eName = 'click.magnificPopup'; + options.mainEl = el; + + if(options.items) { + options.isObj = true; + el.off(eName).on(eName, eHandler); + } else { + options.isObj = false; + if(options.delegate) { + el.off(eName).on(eName, options.delegate , eHandler); + } else { + options.items = el; + el.off(eName).on(eName, eHandler); + } + } + }, + _openClick: function(e, el, options) { + var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick; + + + if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) { + return; + } + + var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn; + + if(disableOn) { + if($.isFunction(disableOn)) { + if( !disableOn.call(mfp) ) { + return true; + } + } else { // else it's number + if( _window.width() < disableOn ) { + return true; + } + } + } + + if(e.type) { + e.preventDefault(); + + // This will prevent popup from closing if element is inside and popup is already opened + if(mfp.isOpen) { + e.stopPropagation(); + } + } + + options.el = $(e.mfpEl); + if(options.delegate) { + options.items = el.find(options.delegate); + } + mfp.open(options); + }, + + + /** + * Updates text on preloader + */ + updateStatus: function(status, text) { + + if(mfp.preloader) { + if(_prevStatus !== status) { + mfp.container.removeClass('mfp-s-'+_prevStatus); + } + + if(!text && status === 'loading') { + text = mfp.st.tLoading; + } + + var data = { + status: status, + text: text + }; + // allows to modify status + _mfpTrigger('UpdateStatus', data); + + status = data.status; + text = data.text; + + mfp.preloader.html(text); + + mfp.preloader.find('a').on('click', function(e) { + e.stopImmediatePropagation(); + }); + + mfp.container.addClass('mfp-s-'+status); + _prevStatus = status; + } + }, + + + /* + "Private" helpers that aren't private at all + */ + // Check to close popup or not + // "target" is an element that was clicked + _checkIfClose: function(target) { + + if($(target).closest('.' + PREVENT_CLOSE_CLASS).length) { + return; + } + + var closeOnContent = mfp.st.closeOnContentClick; + var closeOnBg = mfp.st.closeOnBgClick; + + if(closeOnContent && closeOnBg) { + return true; + } else { + + // We close the popup if click is on close button or on preloader. Or if there is no content. + if(!mfp.content || $(target).closest('.mfp-close').length || + (mfp.preloader && target === mfp.preloader[0]) ) { + return true; + } + + // if click is outside the content + if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) { + if(closeOnBg) { + // last check, if the clicked element is in DOM, (in case it's removed onclick) + if( $.contains(document, target) ) { + return true; + } + } + } else if(closeOnContent) { + return true; + } + + } + return false; + }, + _addClassToMFP: function(cName) { + mfp.bgOverlay.addClass(cName); + mfp.wrap.addClass(cName); + }, + _removeClassFromMFP: function(cName) { + this.bgOverlay.removeClass(cName); + mfp.wrap.removeClass(cName); + }, + _hasScrollBar: function(winHeight) { + return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) ); + }, + _setFocus: function() { + (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus(); + }, + _onFocusIn: function(e) { + if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) { + mfp._setFocus(); + return false; + } + }, + _parseMarkup: function(template, values, item) { + var arr; + if(item.data) { + values = $.extend(item.data, values); + } + _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] ); + + $.each(values, function(key, value) { + if(value === undefined || value === false) { + return true; + } + arr = key.split('_'); + if(arr.length > 1) { + var el = template.find(EVENT_NS + '-'+arr[0]); + + if(el.length > 0) { + var attr = arr[1]; + if(attr === 'replaceWith') { + if(el[0] !== value[0]) { + el.replaceWith(value); + } + } else if(attr === 'img') { + if(el.is('img')) { + el.attr('src', value); + } else { + el.replaceWith( $('').attr('src', value).attr('class', el.attr('class')) ); + } + } else { + el.attr(arr[1], value); + } + } + + } else { + template.find(EVENT_NS + '-'+key).html(value); + } + }); + }, + + _getScrollbarSize: function() { + // thx David + if(mfp.scrollbarSize === undefined) { + var scrollDiv = document.createElement("div"); + scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; + document.body.appendChild(scrollDiv); + mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + } + return mfp.scrollbarSize; + } + +}; /* MagnificPopup core prototype end */ + + + + +/** + * Public static functions + */ +$.magnificPopup = { + instance: null, + proto: MagnificPopup.prototype, + modules: [], + + open: function(options, index) { + _checkInstance(); + + if(!options) { + options = {}; + } else { + options = $.extend(true, {}, options); + } + + options.isObj = true; + options.index = index || 0; + return this.instance.open(options); + }, + + close: function() { + return $.magnificPopup.instance && $.magnificPopup.instance.close(); + }, + + registerModule: function(name, module) { + if(module.options) { + $.magnificPopup.defaults[name] = module.options; + } + $.extend(this.proto, module.proto); + this.modules.push(name); + }, + + defaults: { + + // Info about options is in docs: + // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options + + disableOn: 0, + + key: null, + + midClick: false, + + mainClass: '', + + preloader: true, + + focus: '', // CSS selector of input to focus after popup is opened + + closeOnContentClick: false, + + closeOnBgClick: true, + + closeBtnInside: true, + + showCloseBtn: true, + + enableEscapeKey: true, + + modal: false, + + alignTop: false, + + removalDelay: 0, + + prependTo: null, + + fixedContentPos: 'auto', + + fixedBgPos: 'auto', + + overflowY: 'auto', + + closeMarkup: '', + + tClose: 'Close (Esc)', + + tLoading: 'Loading...', + + autoFocusLast: true + + } +}; + + + +$.fn.magnificPopup = function(options) { + _checkInstance(); + + var jqEl = $(this); + + // We call some API method of first param is a string + if (typeof options === "string" ) { + + if(options === 'open') { + var items, + itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup, + index = parseInt(arguments[1], 10) || 0; + + if(itemOpts.items) { + items = itemOpts.items[index]; + } else { + items = jqEl; + if(itemOpts.delegate) { + items = items.find(itemOpts.delegate); + } + items = items.eq( index ); + } + mfp._openClick({mfpEl:items}, jqEl, itemOpts); + } else { + if(mfp.isOpen) + mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); + } + + } else { + // clone options obj + options = $.extend(true, {}, options); + + /* + * As Zepto doesn't support .data() method for objects + * and it works only in normal browsers + * we assign "options" object directly to the DOM element. FTW! + */ + if(_isJQ) { + jqEl.data('magnificPopup', options); + } else { + jqEl[0].magnificPopup = options; + } + + mfp.addGroup(jqEl, options); + + } + return jqEl; +}; + +/*>>core*/ + +/*>>inline*/ + +var INLINE_NS = 'inline', + _hiddenClass, + _inlinePlaceholder, + _lastInlineElement, + _putInlineElementsBack = function() { + if(_lastInlineElement) { + _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach(); + _lastInlineElement = null; + } + }; + +$.magnificPopup.registerModule(INLINE_NS, { + options: { + hiddenClass: 'hide', // will be appended with `mfp-` prefix + markup: '', + tNotFound: 'Content not found' + }, + proto: { + + initInline: function() { + mfp.types.push(INLINE_NS); + + _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() { + _putInlineElementsBack(); + }); + }, + + getInline: function(item, template) { + + _putInlineElementsBack(); + + if(item.src) { + var inlineSt = mfp.st.inline, + el = $(item.src); + + if(el.length) { + + // If target element has parent - we replace it with placeholder and put it back after popup is closed + var parent = el[0].parentNode; + if(parent && parent.tagName) { + if(!_inlinePlaceholder) { + _hiddenClass = inlineSt.hiddenClass; + _inlinePlaceholder = _getEl(_hiddenClass); + _hiddenClass = 'mfp-'+_hiddenClass; + } + // replace target inline element with placeholder + _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); + } + + mfp.updateStatus('ready'); + } else { + mfp.updateStatus('error', inlineSt.tNotFound); + el = $('
'); + } + + item.inlineElement = el; + return el; + } + + mfp.updateStatus('ready'); + mfp._parseMarkup(template, {}, item); + return template; + } + } +}); + +/*>>inline*/ + +/*>>ajax*/ +var AJAX_NS = 'ajax', + _ajaxCur, + _removeAjaxCursor = function() { + if(_ajaxCur) { + $(document.body).removeClass(_ajaxCur); + } + }, + _destroyAjaxRequest = function() { + _removeAjaxCursor(); + if(mfp.req) { + mfp.req.abort(); + } + }; + +$.magnificPopup.registerModule(AJAX_NS, { + + options: { + settings: null, + cursor: 'mfp-ajax-cur', + tError: 'The content could not be loaded.' + }, + + proto: { + initAjax: function() { + mfp.types.push(AJAX_NS); + _ajaxCur = mfp.st.ajax.cursor; + + _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); + _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); + }, + getAjax: function(item) { + + if(_ajaxCur) { + $(document.body).addClass(_ajaxCur); + } + + mfp.updateStatus('loading'); + + var opts = $.extend({ + url: item.src, + success: function(data, textStatus, jqXHR) { + var temp = { + data:data, + xhr:jqXHR + }; + + _mfpTrigger('ParseAjax', temp); + + mfp.appendContent( $(temp.data), AJAX_NS ); + + item.finished = true; + + _removeAjaxCursor(); + + mfp._setFocus(); + + setTimeout(function() { + mfp.wrap.addClass(READY_CLASS); + }, 16); + + mfp.updateStatus('ready'); + + _mfpTrigger('AjaxContentAdded'); + }, + error: function() { + _removeAjaxCursor(); + item.finished = item.loadError = true; + mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); + } + }, mfp.st.ajax.settings); + + mfp.req = $.ajax(opts); + + return ''; + } + } +}); + +/*>>ajax*/ + +/*>>image*/ +var _imgInterval, + _getTitle = function(item) { + if(item.data && item.data.title !== undefined) + return item.data.title; + + var src = mfp.st.image.titleSrc; + + if(src) { + if($.isFunction(src)) { + return src.call(mfp, item); + } else if(item.el) { + return item.el.attr(src) || ''; + } + } + return ''; + }; + +$.magnificPopup.registerModule('image', { + + options: { + markup: '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
', + cursor: 'mfp-zoom-out-cur', + titleSrc: 'title', + verticalFit: true, + tError: 'The image could not be loaded.' + }, + + proto: { + initImage: function() { + var imgSt = mfp.st.image, + ns = '.image'; + + mfp.types.push('image'); + + _mfpOn(OPEN_EVENT+ns, function() { + if(mfp.currItem.type === 'image' && imgSt.cursor) { + $(document.body).addClass(imgSt.cursor); + } + }); + + _mfpOn(CLOSE_EVENT+ns, function() { + if(imgSt.cursor) { + $(document.body).removeClass(imgSt.cursor); + } + _window.off('resize' + EVENT_NS); + }); + + _mfpOn('Resize'+ns, mfp.resizeImage); + if(mfp.isLowIE) { + _mfpOn('AfterChange', mfp.resizeImage); + } + }, + resizeImage: function() { + var item = mfp.currItem; + if(!item || !item.img) return; + + if(mfp.st.image.verticalFit) { + var decr = 0; + // fix box-sizing in ie7/8 + if(mfp.isLowIE) { + decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); + } + item.img.css('max-height', mfp.wH-decr); + } + }, + _onImageHasSize: function(item) { + if(item.img) { + + item.hasSize = true; + + if(_imgInterval) { + clearInterval(_imgInterval); + } + + item.isCheckingImgSize = false; + + _mfpTrigger('ImageHasSize', item); + + if(item.imgHidden) { + if(mfp.content) + mfp.content.removeClass('mfp-loading'); + + item.imgHidden = false; + } + + } + }, + + /** + * Function that loops until the image has size to display elements that rely on it asap + */ + findImageSize: function(item) { + + var counter = 0, + img = item.img[0], + mfpSetInterval = function(delay) { + + if(_imgInterval) { + clearInterval(_imgInterval); + } + // decelerating interval that checks for size of an image + _imgInterval = setInterval(function() { + if(img.naturalWidth > 0) { + mfp._onImageHasSize(item); + return; + } + + if(counter > 200) { + clearInterval(_imgInterval); + } + + counter++; + if(counter === 3) { + mfpSetInterval(10); + } else if(counter === 40) { + mfpSetInterval(50); + } else if(counter === 100) { + mfpSetInterval(500); + } + }, delay); + }; + + mfpSetInterval(1); + }, + + getImage: function(item, template) { + + var guard = 0, + + // image load complete handler + onLoadComplete = function() { + if(item) { + if (item.img[0].complete) { + item.img.off('.mfploader'); + + if(item === mfp.currItem){ + mfp._onImageHasSize(item); + + mfp.updateStatus('ready'); + } + + item.hasSize = true; + item.loaded = true; + + _mfpTrigger('ImageLoadComplete'); + + } + else { + // if image complete check fails 200 times (20 sec), we assume that there was an error. + guard++; + if(guard < 200) { + setTimeout(onLoadComplete,100); + } else { + onLoadError(); + } + } + } + }, + + // image error handler + onLoadError = function() { + if(item) { + item.img.off('.mfploader'); + if(item === mfp.currItem){ + mfp._onImageHasSize(item); + mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) ); + } + + item.hasSize = true; + item.loaded = true; + item.loadError = true; + } + }, + imgSt = mfp.st.image; + + + var el = template.find('.mfp-img'); + if(el.length) { + var img = document.createElement('img'); + img.className = 'mfp-img'; + if(item.el && item.el.find('img').length && + item.el.find('img').attr('alt')) { + img.alt = item.el.find('img').attr('alt'); + } + item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); + img.src = item.src; + + // without clone() "error" event is not firing when IMG is replaced by new IMG + // TODO: find a way to avoid such cloning + if(el.is('img')) { + item.img = item.img.clone(); + } + + img = item.img[0]; + if(img.naturalWidth > 0) { + item.hasSize = true; + } else if(!img.width) { + item.hasSize = false; + } + } + + mfp._parseMarkup(template, { + title: _getTitle(item), + img_replaceWith: item.img + }, item); + + mfp.resizeImage(); + + if(item.hasSize) { + if(_imgInterval) clearInterval(_imgInterval); + + if(item.loadError) { + template.addClass('mfp-loading'); + mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) ); + } else { + template.removeClass('mfp-loading'); + mfp.updateStatus('ready'); + } + return template; + } + + mfp.updateStatus('loading'); + item.loading = true; + + if(!item.hasSize) { + item.imgHidden = true; + template.addClass('mfp-loading'); + mfp.findImageSize(item); + } + + return template; + } + } +}); + +/*>>image*/ + +/*>>zoom*/ +var hasMozTransform, + getHasMozTransform = function() { + if(hasMozTransform === undefined) { + hasMozTransform = document.createElement('p').style.MozTransform !== undefined; + } + return hasMozTransform; + }; + +$.magnificPopup.registerModule('zoom', { + + options: { + enabled: false, + easing: 'ease-in-out', + duration: 300, + opener: function(element) { + return element.is('img') ? element : element.find('img'); + } + }, + + proto: { + + initZoom: function() { + var zoomSt = mfp.st.zoom, + ns = '.zoom', + image; + + if(!zoomSt.enabled || !mfp.supportsTransition) { + return; + } + + var duration = zoomSt.duration, + getElToAnimate = function(image) { + var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), + transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, + cssObj = { + position: 'fixed', + zIndex: 9999, + left: 0, + top: 0, + '-webkit-backface-visibility': 'hidden' + }, + t = 'transition'; + + cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition; + + newImg.css(cssObj); + return newImg; + }, + showMainContent = function() { + mfp.content.css('visibility', 'visible'); + }, + openTimeout, + animatedImg; + + _mfpOn('BuildControls'+ns, function() { + if(mfp._allowZoom()) { + + clearTimeout(openTimeout); + mfp.content.css('visibility', 'hidden'); + + // Basically, all code below does is clones existing image, puts in on top of the current one and animated it + + image = mfp._getItemToZoom(); + + if(!image) { + showMainContent(); + return; + } + + animatedImg = getElToAnimate(image); + + animatedImg.css( mfp._getOffset() ); + + mfp.wrap.append(animatedImg); + + openTimeout = setTimeout(function() { + animatedImg.css( mfp._getOffset( true ) ); + openTimeout = setTimeout(function() { + + showMainContent(); + + setTimeout(function() { + animatedImg.remove(); + image = animatedImg = null; + _mfpTrigger('ZoomAnimationEnded'); + }, 16); // avoid blink when switching images + + }, duration); // this timeout equals animation duration + + }, 16); // by adding this timeout we avoid short glitch at the beginning of animation + + + // Lots of timeouts... + } + }); + _mfpOn(BEFORE_CLOSE_EVENT+ns, function() { + if(mfp._allowZoom()) { + + clearTimeout(openTimeout); + + mfp.st.removalDelay = duration; + + if(!image) { + image = mfp._getItemToZoom(); + if(!image) { + return; + } + animatedImg = getElToAnimate(image); + } + + animatedImg.css( mfp._getOffset(true) ); + mfp.wrap.append(animatedImg); + mfp.content.css('visibility', 'hidden'); + + setTimeout(function() { + animatedImg.css( mfp._getOffset() ); + }, 16); + } + + }); + + _mfpOn(CLOSE_EVENT+ns, function() { + if(mfp._allowZoom()) { + showMainContent(); + if(animatedImg) { + animatedImg.remove(); + } + image = null; + } + }); + }, + + _allowZoom: function() { + return mfp.currItem.type === 'image'; + }, + + _getItemToZoom: function() { + if(mfp.currItem.hasSize) { + return mfp.currItem.img; + } else { + return false; + } + }, + + // Get element postion relative to viewport + _getOffset: function(isLarge) { + var el; + if(isLarge) { + el = mfp.currItem.img; + } else { + el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem); + } + + var offset = el.offset(); + var paddingTop = parseInt(el.css('padding-top'),10); + var paddingBottom = parseInt(el.css('padding-bottom'),10); + offset.top -= ( $(window).scrollTop() - paddingTop ); + + + /* + + Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa. + + */ + var obj = { + width: el.width(), + // fix Zepto height+padding issue + height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop + }; + + // I hate to do this, but there is no another option + if( getHasMozTransform() ) { + obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)'; + } else { + obj.left = offset.left; + obj.top = offset.top; + } + return obj; + } + + } +}); + + + +/*>>zoom*/ + +/*>>iframe*/ + +var IFRAME_NS = 'iframe', + _emptyPage = '//about:blank', + + _fixIframeBugs = function(isShowing) { + if(mfp.currTemplate[IFRAME_NS]) { + var el = mfp.currTemplate[IFRAME_NS].find('iframe'); + if(el.length) { + // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug + if(!isShowing) { + el[0].src = _emptyPage; + } + + // IE8 black screen bug fix + if(mfp.isIE8) { + el.css('display', isShowing ? 'block' : 'none'); + } + } + } + }; + +$.magnificPopup.registerModule(IFRAME_NS, { + + options: { + markup: '
'+ + '
'+ + ''+ + '
', + + srcAction: 'iframe_src', + + // we don't care and support only one default type of URL by default + patterns: { + youtube: { + index: 'youtube.com', + id: 'v=', + src: '//www.youtube.com/embed/%id%?autoplay=1' + }, + vimeo: { + index: 'vimeo.com/', + id: '/', + src: '//player.vimeo.com/video/%id%?autoplay=1' + }, + gmaps: { + index: '//maps.google.', + src: '%id%&output=embed' + } + } + }, + + proto: { + initIframe: function() { + mfp.types.push(IFRAME_NS); + + _mfpOn('BeforeChange', function(e, prevType, newType) { + if(prevType !== newType) { + if(prevType === IFRAME_NS) { + _fixIframeBugs(); // iframe if removed + } else if(newType === IFRAME_NS) { + _fixIframeBugs(true); // iframe is showing + } + }// else { + // iframe source is switched, don't do anything + //} + }); + + _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() { + _fixIframeBugs(); + }); + }, + + getIframe: function(item, template) { + var embedSrc = item.src; + var iframeSt = mfp.st.iframe; + + $.each(iframeSt.patterns, function() { + if(embedSrc.indexOf( this.index ) > -1) { + if(this.id) { + if(typeof this.id === 'string') { + embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); + } else { + embedSrc = this.id.call( this, embedSrc ); + } + } + embedSrc = this.src.replace('%id%', embedSrc ); + return false; // break; + } + }); + + var dataObj = {}; + if(iframeSt.srcAction) { + dataObj[iframeSt.srcAction] = embedSrc; + } + mfp._parseMarkup(template, dataObj, item); + + mfp.updateStatus('ready'); + + return template; + } + } +}); + + + +/*>>iframe*/ + +/*>>gallery*/ +/** + * Get looped index depending on number of slides + */ +var _getLoopedId = function(index) { + var numSlides = mfp.items.length; + if(index > numSlides - 1) { + return index - numSlides; + } else if(index < 0) { + return numSlides + index; + } + return index; + }, + _replaceCurrTotal = function(text, curr, total) { + return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); + }; + +$.magnificPopup.registerModule('gallery', { + + options: { + enabled: false, + arrowMarkup: '', + preload: [0,2], + navigateByImgClick: true, + arrows: true, + + tPrev: 'Previous (Left arrow key)', + tNext: 'Next (Right arrow key)', + tCounter: '%curr% of %total%' + }, + + proto: { + initGallery: function() { + + var gSt = mfp.st.gallery, + ns = '.mfp-gallery'; + + mfp.direction = true; // true - next, false - prev + + if(!gSt || !gSt.enabled ) return false; + + _wrapClasses += ' mfp-gallery'; + + _mfpOn(OPEN_EVENT+ns, function() { + + if(gSt.navigateByImgClick) { + mfp.wrap.on('click'+ns, '.mfp-img', function() { + if(mfp.items.length > 1) { + mfp.next(); + return false; + } + }); + } + + _document.on('keydown'+ns, function(e) { + if (!e.altKey && !e.ctrlKey && !e.shiftKey) { + if (e.keyCode === 37) { + mfp.prev(); + } else if (e.keyCode === 39) { + mfp.next(); + } + } + }); + }); + + _mfpOn('UpdateStatus'+ns, function(e, data) { + if(data.text) { + data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); + } + }); + + _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) { + var l = mfp.items.length; + values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : ''; + }); + + _mfpOn('BuildControls' + ns, function() { + if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) { + var markup = gSt.arrowMarkup, + arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS), + arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS); + + arrowLeft.click(function() { + mfp.prev(); + }); + arrowRight.click(function() { + mfp.next(); + }); + + mfp.container.append(arrowLeft.add(arrowRight)); + } + }); + + _mfpOn(CHANGE_EVENT+ns, function() { + if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); + + mfp._preloadTimeout = setTimeout(function() { + mfp.preloadNearbyImages(); + mfp._preloadTimeout = null; + }, 16); + }); + + + _mfpOn(CLOSE_EVENT+ns, function() { + _document.off(ns); + mfp.wrap.off('click'+ns); + mfp.arrowRight = mfp.arrowLeft = null; + }); + + }, + next: function() { + mfp.direction = true; + mfp.index = _getLoopedId(mfp.index + 1); + mfp.updateItemHTML(); + }, + prev: function() { + mfp.direction = false; + mfp.index = _getLoopedId(mfp.index - 1); + mfp.updateItemHTML(); + }, + goTo: function(newIndex) { + mfp.direction = (newIndex >= mfp.index); + mfp.index = newIndex; + mfp.updateItemHTML(); + }, + preloadNearbyImages: function() { + var p = mfp.st.gallery.preload, + preloadBefore = Math.min(p[0], mfp.items.length), + preloadAfter = Math.min(p[1], mfp.items.length), + i; + + for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) { + mfp._preloadItem(mfp.index+i); + } + for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) { + mfp._preloadItem(mfp.index-i); + } + }, + _preloadItem: function(index) { + index = _getLoopedId(index); + + if(mfp.items[index].preloaded) { + return; + } + + var item = mfp.items[index]; + if(!item.parsed) { + item = mfp.parseEl( index ); + } + + _mfpTrigger('LazyLoad', item); + + if(item.type === 'image') { + item.img = $('').on('load.mfploader', function() { + item.hasSize = true; + }).on('error.mfploader', function() { + item.hasSize = true; + item.loadError = true; + _mfpTrigger('LazyLoadError', item); + }).attr('src', item.src); + } + + + item.preloaded = true; + } + } +}); + +/*>>gallery*/ + +/*>>retina*/ + +var RETINA_NS = 'retina'; + +$.magnificPopup.registerModule(RETINA_NS, { + options: { + replaceSrc: function(item) { + return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; }); + }, + ratio: 1 // Function or number. Set to 1 to disable. + }, + proto: { + initRetina: function() { + if(window.devicePixelRatio > 1) { + + var st = mfp.st.retina, + ratio = st.ratio; + + ratio = !isNaN(ratio) ? ratio : ratio(); + + if(ratio > 1) { + _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) { + item.img.css({ + 'max-width': item.img[0].naturalWidth / ratio, + 'width': '100%' + }); + }); + _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) { + item.src = st.replaceSrc(item, ratio); + }); + } + } + + } + } +}); + +/*>>retina*/ + _checkInstance(); })); diff --git a/gallery/themes/autophugo/assets/js/jquery.min.js b/gallery/themes/autophugo/assets/js/jquery.min.js new file mode 100644 index 0000000..2c69bc9 --- /dev/null +++ b/gallery/themes/autophugo/assets/js/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0').appendTo($this); + + // Closer. + $closer + .on('click', function(event) { + $this.trigger('---hide'); + }); + + // Events. + $this + .on('click', function(event) { + event.stopPropagation(); + }) + .on('---toggle', function() { + + if ($this.hasClass('active')) + $this.triggerHandler('---hide'); + else + $this.triggerHandler('---show'); + + }) + .on('---show', function() { + + // Hide other content. + if ($body.hasClass('content-active')) + $panels.trigger('---hide'); + + // Activate content, toggles. + $this.addClass('active'); + $toggles.addClass('active'); + + // Activate body. + $body.addClass('content-active'); + + }) + .on('---hide', function() { + + // Deactivate content, toggles. + $this.removeClass('active'); + $toggles.removeClass('active'); + + // Deactivate body. + $body.removeClass('content-active'); + + }); + + // Toggles. + $toggles + .removeAttr('href') + .css('cursor', 'pointer') + .on('click', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + $this.trigger('---toggle'); + + }); + + }); + + // Global events. + $body + .on('click', function(event) { + + if ($body.hasClass('content-active')) { + + event.preventDefault(); + event.stopPropagation(); + + $panels.trigger('---hide'); + + } + + }); + + $window + .on('keyup', function(event) { + + if (event.keyCode == 27 + && $body.hasClass('content-active')) { + + event.preventDefault(); + event.stopPropagation(); + + $panels.trigger('---hide'); + + } + + }); + + // Footer. + var $footer = $('#footer'); + + // Main. + var $main = $('#main'); + + // Thumbs. + $main.children('.thumb').each(function() { + + var $this = $(this), + $image = $this.find('.image'), $image_img = $image.children('img'), + x; + + // No image? Bail. + if ($image.length == 0) + return; + + // Image. + // This sets the background of the "image" to the image pointed to by its child + // (which is then hidden). Gives us way more flexibility. + + // Set background. + $image.css('background-image', 'url(' + $image_img.attr('src') + ')'); + + // Set background position. + if (x = $image_img.data('position')) + $image.css('background-position', x); + + // Hide original img. + $image_img.hide(); + + }); + + // Thumbs Index. + $main.children('.thumb').each(function() { + + var $this = $(this), + $link = $this.find('.link'), $link_img = $link.children('img'), + x; + + // No link? Bail. + if ($link.length == 0) + return; + + // link. + // This sets the background of the "link" to the link pointed to by its child + // (which is then hidden). Gives us way more flexibility. + + // Set background. + $link.css('background-image', 'url(' + $link_img.attr('src') + ')'); + + // Set background position. + if (x = $link_img.data('position')) + $link.css('background-position', x); + + // Hide original img. + $link_img.hide(); + }); + + var gallery_items = $(".gallery-item").sort( + function(item_a, item_b){ + return item_a.getAttribute("gallery_index") - + item_b.getAttribute("gallery_index"); + } + ); + gallery_items.magnificPopup({ + type: "image", + mainClass: "mfp-img-mobile", + image: { + titleSrc: function(item) { + let caption = ''; + if(item.el.attr("downloadable") == "true"){ + caption += '
'; + } + caption += '
'; + if( item.el.attr("phototitle") != "" ) { + caption += "

" + item.el.attr("phototitle") + "

"; + } + if( item.el.attr("description") != "" ) { + caption += '
' + + item.el.attr("description") + "
"; + } + let tax_elem = item.el.parent().find(".caption_tax"); + if( tax_elem.length > 0 ) { + caption += tax_elem[0].outerHTML; + } + caption += "
"; + return caption; + }, + }, + gallery:{ + enabled:true, + arrowMarkup: '', + }, + callbacks: { + change: function() { + // Replace the current history state with a URL with + // a new hash part. The hash part tells the site to load + // a specific image in fullscreen. Replacing the history + // causes the back and forward buttons to now go to the + // URL with the hash version... Simply changing the URL + // will instead cause a browser to add a new URL to the + // history with the hash part. Then if you look at a ton + // of images on one page, they'll all clutter up your history + // and you'll have to back through them all to get back to + // what seems like the previous page. I think this + // replaceState version is a better behavior. + const hash = "#" + this.currItem.el.attr("id"); + window.history.replaceState(undefined, undefined, hash); + }, + close: function() { + // Clear the hash part without adding new things to the history + window.history.replaceState(undefined, undefined, ""); + }, + }, + fixedContentPos: true, + }); + + // If there's a fragment id, see if it's an image index + // If it is, and it's really a gallery_item then click on it + let click_hash = function () { + let fid = $(window.location.hash); + if( fid.length == 1 && + ( + fid[0].classList.contains("gallery-item") || + fid[0].classList.contains("gallery-item-marker") + ) + ) { + let curr_item = $.magnificPopup.instance.currItem; + if( curr_item && + curr_item.el.attr("id") == fid[0].id ) + { + // Nothing needs to happen in this case... + return false; + } else + { + // Otherwise we need to update the popup, so click it + fid.click(); + return false; + } + } else { + // Some other hash was present, let the browser handle it + $.magnificPopup.close(); + return true; + } + return true; + } + + // Check the fragment id at load + if( window.location.hash != "" ) { + click_hash(); + } + + // Check the fragment id on hashchange + $(window).on("hashchange", click_hash); + }); + +})(jQuery); diff --git a/gallery/themes/autophugo/assets/js/util.js b/gallery/themes/autophugo/assets/js/util.js new file mode 100644 index 0000000..6e82fdb --- /dev/null +++ b/gallery/themes/autophugo/assets/js/util.js @@ -0,0 +1,587 @@ +(function($) { + + /** + * Generate an indented list of links from a nav. Meant for use with panel(). + * @return {jQuery} jQuery object. + */ + $.fn.navList = function() { + + var $this = $(this); + $a = $this.find('a'), + b = []; + + $a.each(function() { + + var $this = $(this), + indent = Math.max(0, $this.parents('li').length - 1), + href = $this.attr('href'), + target = $this.attr('target'); + + b.push( + '' + + '' + + $this.text() + + '' + ); + + }); + + return b.join(''); + + }; + + /** + * Panel-ify an element. + * @param {object} userConfig User config. + * @return {jQuery} jQuery object. + */ + $.fn.panel = function(userConfig) { + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).panel(userConfig); + + return $this; + + } + + // Vars. + var $this = $(this), + $body = $('body'), + $window = $(window), + id = $this.attr('id'), + config; + + // Config. + config = $.extend({ + + // Delay. + delay: 0, + + // Hide panel on link click. + hideOnClick: false, + + // Hide panel on escape keypress. + hideOnEscape: false, + + // Hide panel on swipe. + hideOnSwipe: false, + + // Reset scroll position on hide. + resetScroll: false, + + // Reset forms on hide. + resetForms: false, + + // Side of viewport the panel will appear. + side: null, + + // Target element for "class". + target: $this, + + // Class to toggle. + visibleClass: 'visible' + + }, userConfig); + + // Expand "target" if it's not a jQuery object already. + if (typeof config.target != 'jQuery') + config.target = $(config.target); + + // Panel. + + // Methods. + $this._hide = function(event) { + + // Already hidden? Bail. + if (!config.target.hasClass(config.visibleClass)) + return; + + // If an event was provided, cancel it. + if (event) { + + event.preventDefault(); + event.stopPropagation(); + + } + + // Hide. + config.target.removeClass(config.visibleClass); + + // Post-hide stuff. + window.setTimeout(function() { + + // Reset scroll position. + if (config.resetScroll) + $this.scrollTop(0); + + // Reset forms. + if (config.resetForms) + $this.find('form').each(function() { + this.reset(); + }); + + }, config.delay); + + }; + + // Vendor fixes. + $this + .css('-ms-overflow-style', '-ms-autohiding-scrollbar') + .css('-webkit-overflow-scrolling', 'touch'); + + // Hide on click. + if (config.hideOnClick) { + + $this.find('a') + .css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)'); + + $this + .on('click', 'a', function(event) { + + var $a = $(this), + href = $a.attr('href'), + target = $a.attr('target'); + + if (!href || href == '#' || href == '' || href == '#' + id) + return; + + // Cancel original event. + event.preventDefault(); + event.stopPropagation(); + + // Hide panel. + $this._hide(); + + // Redirect to href. + window.setTimeout(function() { + + if (target == '_blank') + window.open(href); + else + window.location.href = href; + + }, config.delay + 10); + + }); + + } + + // Event: Touch stuff. + $this.on('touchstart', function(event) { + + $this.touchPosX = event.originalEvent.touches[0].pageX; + $this.touchPosY = event.originalEvent.touches[0].pageY; + + }) + + $this.on('touchmove', function(event) { + + if ($this.touchPosX === null + || $this.touchPosY === null) + return; + + var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX, + diffY = $this.touchPosY - event.originalEvent.touches[0].pageY, + th = $this.outerHeight(), + ts = ($this.get(0).scrollHeight - $this.scrollTop()); + + // Hide on swipe? + if (config.hideOnSwipe) { + + var result = false, + boundary = 20, + delta = 50; + + switch (config.side) { + + case 'left': + result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta); + break; + + case 'right': + result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta)); + break; + + case 'top': + result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta); + break; + + case 'bottom': + result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta)); + break; + + default: + break; + + } + + if (result) { + + $this.touchPosX = null; + $this.touchPosY = null; + $this._hide(); + + return false; + + } + + } + + // Prevent vertical scrolling past the top or bottom. + if (($this.scrollTop() < 0 && diffY < 0) + || (ts > (th - 2) && ts < (th + 2) && diffY > 0)) { + + event.preventDefault(); + event.stopPropagation(); + + } + + }); + + // Event: Prevent certain events inside the panel from bubbling. + $this.on('click touchend touchstart touchmove', function(event) { + event.stopPropagation(); + }); + + // Event: Hide panel if a child anchor tag pointing to its ID is clicked. + $this.on('click', 'a[href="#' + id + '"]', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + config.target.removeClass(config.visibleClass); + + }); + + // Body. + + // Event: Hide panel on body click/tap. + $body.on('click touchend', function(event) { + $this._hide(event); + }); + + // Event: Toggle. + $body.on('click', 'a[href="#' + id + '"]', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + config.target.toggleClass(config.visibleClass); + + }); + + // Window. + + // Event: Hide on ESC. + if (config.hideOnEscape) + $window.on('keydown', function(event) { + + if (event.keyCode == 27) + $this._hide(event); + + }); + + return $this; + + }; + + /** + * Apply "placeholder" attribute polyfill to one or more forms. + * @return {jQuery} jQuery object. + */ + $.fn.placeholder = function() { + + // Browser natively supports placeholders? Bail. + if (typeof (document.createElement('input')).placeholder != 'undefined') + return $(this); + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).placeholder(); + + return $this; + + } + + // Vars. + var $this = $(this); + + // Text, TextArea. + $this.find('input[type=text],textarea') + .each(function() { + + var i = $(this); + + if (i.val() == '' + || i.val() == i.attr('placeholder')) + i + .addClass('polyfill-placeholder') + .val(i.attr('placeholder')); + + }) + .on('blur', function() { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + return; + + if (i.val() == '') + i + .addClass('polyfill-placeholder') + .val(i.attr('placeholder')); + + }) + .on('focus', function() { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + return; + + if (i.val() == i.attr('placeholder')) + i + .removeClass('polyfill-placeholder') + .val(''); + + }); + + // Password. + $this.find('input[type=password]') + .each(function() { + + var i = $(this); + var x = $( + $('
') + .append(i.clone()) + .remove() + .html() + .replace(/type="password"/i, 'type="text"') + .replace(/type=password/i, 'type=text') + ); + + if (i.attr('id') != '') + x.attr('id', i.attr('id') + '-polyfill-field'); + + if (i.attr('name') != '') + x.attr('name', i.attr('name') + '-polyfill-field'); + + x.addClass('polyfill-placeholder') + .val(x.attr('placeholder')).insertAfter(i); + + if (i.val() == '') + i.hide(); + else + x.hide(); + + i + .on('blur', function(event) { + + event.preventDefault(); + + var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); + + if (i.val() == '') { + + i.hide(); + x.show(); + + } + + }); + + x + .on('focus', function(event) { + + event.preventDefault(); + + var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']'); + + x.hide(); + + i + .show() + .focus(); + + }) + .on('keypress', function(event) { + + event.preventDefault(); + x.val(''); + + }); + + }); + + // Events. + $this + .on('submit', function() { + + $this.find('input[type=text],input[type=password],textarea') + .each(function(event) { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + i.attr('name', ''); + + if (i.val() == i.attr('placeholder')) { + + i.removeClass('polyfill-placeholder'); + i.val(''); + + } + + }); + + }) + .on('reset', function(event) { + + event.preventDefault(); + + $this.find('select') + .val($('option:first').val()); + + $this.find('input,textarea') + .each(function() { + + var i = $(this), + x; + + i.removeClass('polyfill-placeholder'); + + switch (this.type) { + + case 'submit': + case 'reset': + break; + + case 'password': + i.val(i.attr('defaultValue')); + + x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); + + if (i.val() == '') { + i.hide(); + x.show(); + } + else { + i.show(); + x.hide(); + } + + break; + + case 'checkbox': + case 'radio': + i.attr('checked', i.attr('defaultValue')); + break; + + case 'text': + case 'textarea': + i.val(i.attr('defaultValue')); + + if (i.val() == '') { + i.addClass('polyfill-placeholder'); + i.val(i.attr('placeholder')); + } + + break; + + default: + i.val(i.attr('defaultValue')); + break; + + } + }); + + }); + + return $this; + + }; + + /** + * Moves elements to/from the first positions of their respective parents. + * @param {jQuery} $elements Elements (or selector) to move. + * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations. + */ + $.prioritize = function($elements, condition) { + + var key = '__prioritize'; + + // Expand $elements if it's not already a jQuery object. + if (typeof $elements != 'jQuery') + $elements = $($elements); + + // Step through elements. + $elements.each(function() { + + var $e = $(this), $p, + $parent = $e.parent(); + + // No parent? Bail. + if ($parent.length == 0) + return; + + // Not moved? Move it. + if (!$e.data(key)) { + + // Condition is false? Bail. + if (!condition) + return; + + // Get placeholder (which will serve as our point of reference for when this element needs to move back). + $p = $e.prev(); + + // Couldn't find anything? Means this element's already at the top, so bail. + if ($p.length == 0) + return; + + // Move element to top of parent. + $e.prependTo($parent); + + // Mark element as moved. + $e.data(key, $p); + + } + + // Moved already? + else { + + // Condition is true? Bail. + if (condition) + return; + + $p = $e.data(key); + + // Move element back to its original location (using our placeholder). + $e.insertAfter($p); + + // Unmark element as moved. + $e.removeData(key); + + } + + }); + + }; + +})(jQuery); diff --git a/gallery/themes/autophugo/exampleSite/assets/cats/cat_01.jpg b/gallery/themes/autophugo/exampleSite/assets/cats/cat_01.jpg new file mode 100644 index 0000000..855721e Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/cats/cat_01.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/cats/cat_02.jpg b/gallery/themes/autophugo/exampleSite/assets/cats/cat_02.jpg new file mode 100644 index 0000000..0541d65 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/cats/cat_02.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/cats/cat_03.jpg b/gallery/themes/autophugo/exampleSite/assets/cats/cat_03.jpg new file mode 100644 index 0000000..aec12df Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/cats/cat_03.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/cats/cat_04.jpg b/gallery/themes/autophugo/exampleSite/assets/cats/cat_04.jpg new file mode 100644 index 0000000..03948d2 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/cats/cat_04.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/cats/credits.txt b/gallery/themes/autophugo/exampleSite/assets/cats/credits.txt new file mode 100644 index 0000000..dd41f3b --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/assets/cats/credits.txt @@ -0,0 +1,7 @@ +cat_01 https://www.flickr.com/photos/105675854@N04/25113442788/in/photolist-EgbXAU-284fF59-WLUso6-26R87PR-YLumdD-LZcChv-8SfqP-YGjrJN-f4EAt2-XhK2r7-6VZLwY-f4EDHk-f4Ez5v-V6M21d-2fgWWMJ-213BaF2-2aKcAfi-ZjHDzd-YBP9yK-ZD9bY5-ZD9jDq-n5cJmU-213B9TF-LZczx2-EHqo2k-ZD8GxN-Egb47A-2b7b1ou-2dx759A-ZD9vy1-Egb3CE-ZWqzZR-CBksG9-213Bajk-ZEEmgo-QxgA2m-CDbMze-2efGB8Y-213B9MP-iRsUzF-23tbFek-213Cz8a-Hnkdui-213B9Dx-22hHB7V-ZWqxCr-21cvMT9-2f2NmuW-22oVPEF-Egb3Qo + +cat_02 https://www.flickr.com/photos/97668319@N03/35951425865/in/photolist-EgbXAU-284fF59-WLUso6-26R87PR-YLumdD-LZcChv-8SfqP-YGjrJN-f4EAt2-XhK2r7-6VZLwY-f4EDHk-f4Ez5v-V6M21d-2fgWWMJ-213BaF2-2aKcAfi-ZjHDzd-YBP9yK-ZD9bY5-ZD9jDq-n5cJmU-213B9TF-LZczx2-EHqo2k-ZD8GxN-Egb47A-2b7b1ou-2dx759A-ZD9vy1-Egb3CE-ZWqzZR-CBksG9-213Bajk-ZEEmgo-QxgA2m-CDbMze-2efGB8Y-213B9MP-iRsUzF-23tbFek-213Cz8a-Hnkdui-213B9Dx-22hHB7V-ZWqxCr-21cvMT9-2f2NmuW-22oVPEF-Egb3Qo/ + +cat_03 https://www.flickr.com/photos/154451308@N06/37212237446/in/photolist-EgbXAU-284fF59-WLUso6-26R87PR-YLumdD-LZcChv-8SfqP-YGjrJN-f4EAt2-XhK2r7-6VZLwY-f4EDHk-f4Ez5v-V6M21d-2fgWWMJ-213BaF2-2aKcAfi-ZjHDzd-YBP9yK-ZD9bY5-ZD9jDq-n5cJmU-213B9TF-LZczx2-EHqo2k-ZD8GxN-Egb47A-2b7b1ou-2dx759A-ZD9vy1-Egb3CE-ZWqzZR-CBksG9-213Bajk-ZEEmgo-QxgA2m-CDbMze-2efGB8Y-213B9MP-iRsUzF-23tbFek-213Cz8a-Hnkdui-213B9Dx-22hHB7V-ZWqxCr-21cvMT9-2f2NmuW-22oVPEF-Egb3Qo/ + +cat_04 https://www.flickr.com/photos/sohura/34852274600/in/photolist-EgbXAU-284fF59-WLUso6-26R87PR-YLumdD-LZcChv-8SfqP-YGjrJN-f4EAt2-XhK2r7-6VZLwY-f4EDHk-f4Ez5v-V6M21d-2fgWWMJ-213BaF2-2aKcAfi-ZjHDzd-YBP9yK-ZD9bY5-ZD9jDq-n5cJmU-213B9TF-LZczx2-EHqo2k-ZD8GxN-Egb47A-2b7b1ou-2dx759A-ZD9vy1-Egb3CE-ZWqzZR-CBksG9-213Bajk-ZEEmgo-QxgA2m-CDbMze-2efGB8Y-213B9MP-iRsUzF-23tbFek-213Cz8a-Hnkdui-213B9Dx-22hHB7V-ZWqxCr-21cvMT9-2f2NmuW-22oVPEF-Egb3Qo/ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/credits.txt b/gallery/themes/autophugo/exampleSite/assets/dogs/credits.txt new file mode 100644 index 0000000..5fefa88 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/assets/dogs/credits.txt @@ -0,0 +1,29 @@ +dog_01 https://www.flickr.com/photos/136949915@N08/22503868957/in/photolist-AhAddD-68TSp6-Bifw3Q-okFbrC-Ex2VdF-NdnC1M-Ex2WG2-NZdh8D-P4PWKE-qVRQHm-AEkzdy-P4RK7W-LiuQCS-NWGCYu-26kwbuz-QJDKHn-NZdnd8-LnaXTW-NZfAgi-68TSke-77s844-NZeBvK-85Debz-BNCCM9-ACQXKi-Nxo9aB-86s8CP-o4nUSh-8wKAoQ-utZTV9-8wGB7c-LJUrNk-KUEjGq-BNCWR5-22nhf4f-VD7wmz-jKSCHw-621zuL-QLeb9P-29cFgv8-RMQVw9-23qbg62-25wYngv-61WmZa-Rm6JvB-Sd5sFy-uddSDr-27iD1ZP-MCVJVi-24eB3nu + +dog_02 https://www.flickr.com/photos/dsoltesz/14662506814/in/photolist-AhAddD-68TSp6-Bifw3Q-okFbrC-Ex2VdF-NdnC1M-Ex2WG2-NZdh8D-P4PWKE-qVRQHm-AEkzdy-P4RK7W-LiuQCS-NWGCYu-26kwbuz-QJDKHn-NZdnd8-LnaXTW-NZfAgi-68TSke-77s844-NZeBvK-85Debz-BNCCM9-ACQXKi-Nxo9aB-86s8CP-o4nUSh-8wKAoQ-utZTV9-8wGB7c-LJUrNk-KUEjGq-BNCWR5-22nhf4f-VD7wmz-jKSCHw-621zuL-QLeb9P-29cFgv8-RMQVw9-23qbg62-25wYngv-61WmZa-Rm6JvB-Sd5sFy-uddSDr-27iD1ZP-MCVJVi-24eB3nu/ + +dog_03 https://www.flickr.com/photos/150654414@N02/31987783891/in/photolist-AhAddD-68TSp6-Bifw3Q-okFbrC-Ex2VdF-NdnC1M-Ex2WG2-NZdh8D-P4PWKE-qVRQHm-AEkzdy-P4RK7W-LiuQCS-NWGCYu-26kwbuz-QJDKHn-NZdnd8-LnaXTW-NZfAgi-68TSke-77s844-NZeBvK-85Debz-BNCCM9-ACQXKi-Nxo9aB-86s8CP-o4nUSh-8wKAoQ-utZTV9-8wGB7c-LJUrNk-KUEjGq-BNCWR5-22nhf4f-VD7wmz-jKSCHw-621zuL-QLeb9P-29cFgv8-RMQVw9-23qbg62-25wYngv-61WmZa-Rm6JvB-Sd5sFy-uddSDr-27iD1ZP-MCVJVi-24eB3nu/ + +dog_04 https://www.flickr.com/photos/150654414@N02/31987783891/in/photolist-AhAddD-68TSp6-Bifw3Q-okFbrC-Ex2VdF-NdnC1M-Ex2WG2-NZdh8D-P4PWKE-qVRQHm-AEkzdy-P4RK7W-LiuQCS-NWGCYu-26kwbuz-QJDKHn-NZdnd8-LnaXTW-NZfAgi-68TSke-77s844-NZeBvK-85Debz-BNCCM9-ACQXKi-Nxo9aB-86s8CP-o4nUSh-8wKAoQ-utZTV9-8wGB7c-LJUrNk-KUEjGq-BNCWR5-22nhf4f-VD7wmz-jKSCHw-621zuL-QLeb9P-29cFgv8-RMQVw9-23qbg62-25wYngv-61WmZa-Rm6JvB-Sd5sFy-uddSDr-27iD1ZP-MCVJVi-24eB3nu/ + +dog_05 https://www.flickr.com/photos/160949630@N04/47528596131/in/photolist-2fpWtKZ-AhApV6-68Y58J-27gFNdB-okSN1T-QgC7hk-NZfytR-P4PVFq-8WPmU3-qRP7hK-68Y4y5-P7YwAk-NEmFWC-aDVRjw-25tg4ry-NEpeRf-AhAddD-68TSp6-Bifw3Q-okFbrC-Ex2VdF-NdnC1M-Ex2WG2-NZdh8D-P4PWKE-qVRQHm-AEkzdy-P4RK7W-LiuQCS-NWGCYu-26kwbuz-QJDKHn-NZdnd8-LnaXTW-NZfAgi-68TSke-77s844-NZeBvK-85Debz-BNCCM9-ACQXKi-Nxo9aB-86s8CP-o4nUSh-8wKAoQ-utZTV9-8wGB7c-LJUrNk-KUEjGq-BNCWR5 + +dog_06 https://www.flickr.com/photos/142789010@N06/43451689661/in/photolist-29cFgv8-RMQVw9-23qbg62-25wYngv-61WmZa-Rm6JvB-Sd5sFy-uddSDr-27iD1ZP-MCVJVi-24eB3nu-2fGBUvX-qogvzU-25nYKfA-tziyrj-HByBct-2b1RKQJ-2cjya2W-24vS61w-PkUbK9-2eHExf7-25wYmme-29TPZCj-QquARn-PNE94A-PiSeaY-24oVhXA-K2wqQP-SbW1yn-27fyMNp-NvSGFt-26CcLYs-LaT38r-GrLy9k-25tg5hb-25tg7h3-ryhPap-213t9wz-Mhd9rX-h9XfAb-ZgJxY1-YcNgrW-jL4QqP-KXpR7G-288LDuG-ptyoCE-Dd8Zpb-21scfmW-XWVMGC-PgNKHt + +dog_07 https://www.flickr.com/photos/142789010@N06/43451689661/in/photolist-29cFgv8-RMQVw9-23qbg62-25wYngv-61WmZa-Rm6JvB-Sd5sFy-uddSDr-27iD1ZP-MCVJVi-24eB3nu-2fGBUvX-qogvzU-25nYKfA-tziyrj-HByBct-2b1RKQJ-2cjya2W-24vS61w-PkUbK9-2eHExf7-25wYmme-29TPZCj-QquARn-PNE94A-PiSeaY-24oVhXA-K2wqQP-SbW1yn-27fyMNp-NvSGFt-26CcLYs-LaT38r-GrLy9k-25tg5hb-25tg7h3-ryhPap-213t9wz-Mhd9rX-h9XfAb-ZgJxY1-YcNgrW-jL4QqP-KXpR7G-288LDuG-ptyoCE-Dd8Zpb-21scfmW-XWVMGC-PgNKHt + +dog_08 https://www.flickr.com/photos/sebastiandooris/3292390483/in/photolist-29cFgv8-RMQVw9-23qbg62-25wYngv-61WmZa-Rm6JvB-Sd5sFy-uddSDr-27iD1ZP-MCVJVi-24eB3nu-2fGBUvX-qogvzU-25nYKfA-tziyrj-HByBct-2b1RKQJ-2cjya2W-24vS61w-PkUbK9-2eHExf7-25wYmme-29TPZCj-QquARn-PNE94A-PiSeaY-24oVhXA-K2wqQP-SbW1yn-27fyMNp-NvSGFt-26CcLYs-LaT38r-GrLy9k-25tg5hb-25tg7h3-ryhPap-213t9wz-Mhd9rX-h9XfAb-ZgJxY1-YcNgrW-jL4QqP-KXpR7G-288LDuG-ptyoCE-Dd8Zpb-21scfmW-XWVMGC-PgNKHt/ + +dog_09 https://www.flickr.com/photos/11335395@N06/1259928036/ + +dog_10 https://www.flickr.com/photos/trojanllama/8667749191/ + +dog_11 https://www.flickr.com/photos/66176388@N00/26494408736/ + +jumping_dog_01 https://www.flickr.com/photos/ragingloon/49260684983/ + +jumping_dog_02 https://www.flickr.com/photos/mr-outdoorguy/2782350251/ + +jumping_dog_03 https://www.flickr.com/photos/nitros/36342530/ + +jumping_dog_04 https://www.flickr.com/photos/186781681@N03/49587221992/ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_05.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_05.jpg new file mode 100644 index 0000000..1d27278 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_05.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_09.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_09.jpg new file mode 100644 index 0000000..316834e Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_09.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_10.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_10.jpg new file mode 100644 index 0000000..60eddc1 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_10.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_11.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_11.jpg new file mode 100644 index 0000000..cc2802a Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/running-dogs/dog_11.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_04.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_04.jpg new file mode 100644 index 0000000..c31b855 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_04.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_06.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_06.jpg new file mode 100644 index 0000000..51fd289 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_06.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_08.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_08.jpg new file mode 100644 index 0000000..554ec1d Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/happy-dogs/stationary-dogs/dog_08.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_01.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_01.jpg new file mode 100644 index 0000000..862dda4 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_01.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_02.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_02.jpg new file mode 100644 index 0000000..a0cacdb Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_02.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_03.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_03.jpg new file mode 100644 index 0000000..dc3ba1a Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_03.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_04.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_04.jpg new file mode 100644 index 0000000..3c98135 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/jumping_dog_04.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_01.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_01.jpg new file mode 100644 index 0000000..282fc88 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_01.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_02.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_02.jpg new file mode 100644 index 0000000..6ce02a6 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_02.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_03.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_03.jpg new file mode 100644 index 0000000..3e5d96b Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_03.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_07.jpg b/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_07.jpg new file mode 100644 index 0000000..0102371 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/dogs/pensive-dogs/dog_07.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/fish/credits.txt b/gallery/themes/autophugo/exampleSite/assets/fish/credits.txt new file mode 100644 index 0000000..a0308cb --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/assets/fish/credits.txt @@ -0,0 +1,13 @@ +fish_01 https://www.flickr.com/photos/mathiasappel/25512150434/in/photolist-ESqruE-8dV38t-FKHHQV-8dV2QM-TM5NB7-BjTh9s-Sxkitr-Fbgu18-RPKCdx-TMaquk-9Ey8bB-5cLiE4-FbgtWR-Fhn9eG-ES6N9j-pkUvjr-hpgH4n-pASCPp-uGKdX9-fjsAZ4-DScRr1-fsGU1K-9ZjyK-fDWTw2-qjuMdG-qucngp-fnbAuU-puhWgA-pCijVc-psEPg9-XGhRSj-pYPqbf-2a8Kvvu-9ZjFh-A3zYpD-2cUhy5g-2bNhHHw-A6RBDD-VpYGTp-P6ooSY-tioz9Y-vY2jWE-P99efK-QdJZst-Vau6TS-2bvzjUp-EPnjqn-ovySRX-T2HsRG-4Vabdf + +fish_02 https://www.flickr.com/photos/135565977@N04/25714099791/in/photolist-ESqruE-8dV38t-FKHHQV-8dV2QM-TM5NB7-BjTh9s-Sxkitr-Fbgu18-RPKCdx-TMaquk-9Ey8bB-5cLiE4-FbgtWR-Fhn9eG-ES6N9j-pkUvjr-hpgH4n-pASCPp-uGKdX9-fjsAZ4-DScRr1-fsGU1K-9ZjyK-fDWTw2-qjuMdG-qucngp-fnbAuU-puhWgA-pCijVc-psEPg9-XGhRSj-pYPqbf-2a8Kvvu-9ZjFh-A3zYpD-2cUhy5g-2bNhHHw-A6RBDD-VpYGTp-P6ooSY-tioz9Y-vY2jWE-P99efK-QdJZst-Vau6TS-2bvzjUp-EPnjqn-ovySRX-T2HsRG-4Vabdf/ + +fish_03 https://www.flickr.com/photos/pamrabin/36555571626/in/photolist-ESqruE-8dV38t-FKHHQV-8dV2QM-TM5NB7-BjTh9s-Sxkitr-Fbgu18-RPKCdx-TMaquk-9Ey8bB-5cLiE4-FbgtWR-Fhn9eG-ES6N9j-pkUvjr-hpgH4n-pASCPp-uGKdX9-fjsAZ4-DScRr1-fsGU1K-9ZjyK-fDWTw2-qjuMdG-qucngp-fnbAuU-puhWgA-pCijVc-psEPg9-XGhRSj-pYPqbf-2a8Kvvu-9ZjFh-A3zYpD-2cUhy5g-2bNhHHw-A6RBDD-VpYGTp-P6ooSY-tioz9Y-vY2jWE-P99efK-QdJZst-Vau6TS-2bvzjUp-EPnjqn-ovySRX-T2HsRG-4Vabdf/ + +fish_04 https://www.flickr.com/photos/volvob12b/17918417164/in/photolist-ESqruE-8dV38t-FKHHQV-8dV2QM-TM5NB7-BjTh9s-Sxkitr-Fbgu18-RPKCdx-TMaquk-9Ey8bB-5cLiE4-FbgtWR-Fhn9eG-ES6N9j-pkUvjr-hpgH4n-pASCPp-uGKdX9-fjsAZ4-DScRr1-fsGU1K-9ZjyK-fDWTw2-qjuMdG-qucngp-fnbAuU-puhWgA-pCijVc-psEPg9-XGhRSj-pYPqbf-2a8Kvvu-9ZjFh-A3zYpD-2cUhy5g-2bNhHHw-A6RBDD-VpYGTp-P6ooSY-tioz9Y-vY2jWE-P99efK-QdJZst-Vau6TS-2bvzjUp-EPnjqn-ovySRX-T2HsRG-4Vabdf/ + +fish_05 https://www.flickr.com/photos/moonjazz/18839082726/ + +fish_06 https://www.flickr.com/photos/internetarchivebookimages/18007428638/ + +fish_07 https://www.flickr.com/photos/summarkota/6087767228/ diff --git a/gallery/themes/autophugo/exampleSite/assets/fish/fish_01.jpg b/gallery/themes/autophugo/exampleSite/assets/fish/fish_01.jpg new file mode 100644 index 0000000..e852df7 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/fish/fish_01.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/fish/fish_02.jpg b/gallery/themes/autophugo/exampleSite/assets/fish/fish_02.jpg new file mode 100644 index 0000000..1c55ca6 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/fish/fish_02.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/fish/fish_03.jpg b/gallery/themes/autophugo/exampleSite/assets/fish/fish_03.jpg new file mode 100644 index 0000000..7bae96d Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/fish/fish_03.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/fish/fish_04.jpg b/gallery/themes/autophugo/exampleSite/assets/fish/fish_04.jpg new file mode 100644 index 0000000..d273dde Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/fish/fish_04.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/fish/fish_05.jpg b/gallery/themes/autophugo/exampleSite/assets/fish/fish_05.jpg new file mode 100644 index 0000000..4cd075c Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/fish/fish_05.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/fish/fish_06.jpg b/gallery/themes/autophugo/exampleSite/assets/fish/fish_06.jpg new file mode 100644 index 0000000..eda944f Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/fish/fish_06.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/fish/fish_07.jpg b/gallery/themes/autophugo/exampleSite/assets/fish/fish_07.jpg new file mode 100644 index 0000000..6e1c15e Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/fish/fish_07.jpg differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Jamestown.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jamestown.gif new file mode 100644 index 0000000..eb9b8bb Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jamestown.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Jami.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jami.gif new file mode 100644 index 0000000..e91eec7 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jami.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Jamie.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jamie.gif new file mode 100644 index 0000000..824802a Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jamie.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Jan.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jan.gif new file mode 100644 index 0000000..c165e11 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jan.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Jana.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jana.gif new file mode 100644 index 0000000..7e707b9 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jana.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janacek.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janacek.gif new file mode 100644 index 0000000..6d4c349 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janacek.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Jane.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jane.gif new file mode 100644 index 0000000..534268e Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jane.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janell.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janell.gif new file mode 100644 index 0000000..7af18c5 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janell.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janelle.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janelle.gif new file mode 100644 index 0000000..ae60bed Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janelle.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janesville.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janesville.gif new file mode 100644 index 0000000..1907e00 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janesville.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janet.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janet.gif new file mode 100644 index 0000000..933aa5c Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janet.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janette.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janette.gif new file mode 100644 index 0000000..10ce461 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janette.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janice.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janice.gif new file mode 100644 index 0000000..ac2b096 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janice.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janie.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janie.gif new file mode 100644 index 0000000..35c526d Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janie.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janine.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janine.gif new file mode 100644 index 0000000..21b8288 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janine.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janis.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janis.gif new file mode 100644 index 0000000..456a322 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janis.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janissary.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janissary.gif new file mode 100644 index 0000000..c812758 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janissary.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janjaweed.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janjaweed.gif new file mode 100644 index 0000000..20d0a44 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janjaweed.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Janna.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janna.gif new file mode 100644 index 0000000..3a135c0 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Janna.gif differ diff --git a/gallery/themes/autophugo/exampleSite/assets/many-simple/Jannie.gif b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jannie.gif new file mode 100644 index 0000000..926ae6e Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/assets/many-simple/Jannie.gif differ diff --git a/gallery/themes/autophugo/exampleSite/config.toml b/gallery/themes/autophugo/exampleSite/config.toml new file mode 100644 index 0000000..2d0ceab --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/config.toml @@ -0,0 +1,111 @@ +# Settings +baseurl = "http://example.org/" +languageCode = "en-us" +title = "AutoPhugo" +theme = "autophugo" +#googleAnalytics = "" +disableKinds = ["taxonomy", "term"] +#[taxonomies] +# tag = "tags" +# category = "categories" + +[Author] + name = "Karl Sickendick" + email = "kc0bfv@gmail.com" + +[params] + # Meta + description = "AutoPhugo - Photo Gallery on Hugo" + keywords = "phugo, hugo, photogallery, photoblog, hugo theme" + #msvalidate = "" + #googlesiteverification = "" + #thumb_width = 480 + #thumb_quality = 50 + #full_width = 960 + #full_quality = 90 + #column_count = 2 + #breadcrumb_use_title = false + #filename_as_phototitle = false + #images_downloadable = true + #images_downloadable_use_orig = false + #taxonomies_links = false + + # Headerbar links + # Do not put too many links here, + # it will break mobile appearance + + [[params.header.links]] + name = "About" + url = "#footer" + icon = "fa-info-circle" + + # Footer panel + + [params.footer.paragraph] + headline = "Magna feugiat sed adipiscing" + text = "Nulla consequat, ex ut suscipit rutrum, mi dolor tincidunt erat, et scelerisque turpis ipsum eget quis orci mattis aliquet. Maecenas fringilla et ante at lorem et ipsum. Dolor nulla eu bibendum sapien. Donec non pharetra dui. Nulla consequat, ex ut suscipit rutrum, mi dolor tincidunt erat, et scelerisque turpis ipsum." + + [params.footer.social] + headline = "Follow me" + + [[params.footer.social.links]] + label = "Twitter" + url = "#" + icon = "fa-twitter" + + [[params.footer.social.links]] + label = "Facebook" + url = "#" + icon = "fa-facebook" + + [[params.footer.social.links]] + label = "Instagram" + url = "#" + icon = "fa-instagram" + + [[params.footer.social.links]] + label = "Github" + url = "#" + icon = "fa-github" + + [[params.footer.social.links]] + label = "LinkedIn" + url = "#" + icon = "fa-linkedin" + + # Contact form + + # Since this template is static, the contact form uses www.formspree.io as a + # proxy. The form makes a POST request to their servers to send the actual + # email. Visitors can send up to a 1000 emails each month for free. + # + # What you need to do for the setup? + # + # - set your integration endpoint address under 'formspreeID' below + # - create a formspree account and a simple form + # - then get the integration endpoint generated to you form + # - you're done. Happy mailing! + + [params.footer.contact] + hide = false # Set this to true if you don't want to have a contact form on your site + formspreeID = "myuniqueID" # Getting value from Formspree integration endpoint (eg. https://formspree.io/f/myuniqueID) + headline = "Get in touch" + buttonText = "Send" + resetText = "Reset" + + # 'warning' defines error messages for invalid inputs + [params.footer.contact.name] + text = "Name *" + warning = "Please, enter your name" + + [params.footer.contact.email] + text = "Email *" + warning = "Please, enter your email." + + [params.footer.contact.message] + text = "Message *" + warning = "Please, enter your message" + + # Copyright + [params.footer.copyright] + name = "Your name" diff --git a/gallery/themes/autophugo/exampleSite/config_for_github_pages.toml b/gallery/themes/autophugo/exampleSite/config_for_github_pages.toml new file mode 100644 index 0000000..575d762 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/config_for_github_pages.toml @@ -0,0 +1,112 @@ +# Settings +baseurl = "https://kc0bfv.github.io/autophugo/" +languageCode = "en-us" +title = "AutoPhugo" +theme = "autophugo" +#googleAnalytics = "" +disableKinds = ["taxonomy", "term"] +#[taxonomies] +# tag = "tags" +# category = "categories" + +[Author] + name = "Karl Sickendick" + email = "kc0bfv@gmail.com" + +[params] + # Meta + description = "AutoPhugo - Photo Gallery on Hugo" + keywords = "phugo, hugo, photogallery, photoblog, hugo theme" + #msvalidate = "" + #googlesiteverification = "" + #thumb_width = 480 + #thumb_quality = 50 + #full_width = 960 + #full_quality = 90 + #column_count = 2 + #breadcrumb_use_title = false + #filename_as_phototitle = false + #images_downloadable = true + #images_downloadable_use_orig = false + #taxonomies_links = false + + # Headerbar links + # Do not put too many links here, + # it will break mobile appearance + + [[params.header.links]] + name = "About" + url = "#footer" + icon = "fa-info-circle" + + # Footer panel + + [params.footer.paragraph] + headline = "Magna feugiat sed adipiscing" + text = "Nulla consequat, ex ut suscipit rutrum, mi dolor tincidunt erat, et scelerisque turpis ipsum eget quis orci mattis aliquet. Maecenas fringilla et ante at lorem et ipsum. Dolor nulla eu bibendum sapien. Donec non pharetra dui. Nulla consequat, ex ut suscipit rutrum, mi dolor tincidunt erat, et scelerisque turpis ipsum." + + [params.footer.social] + headline = "Follow me" + + [[params.footer.social.links]] + label = "Twitter" + url = "#" + icon = "fa-twitter" + + [[params.footer.social.links]] + label = "Facebook" + url = "#" + icon = "fa-facebook" + + [[params.footer.social.links]] + label = "Instagram" + url = "#" + icon = "fa-instagram" + + [[params.footer.social.links]] + label = "Github" + url = "#" + icon = "fa-github" + + [[params.footer.social.links]] + label = "LinkedIn" + url = "#" + icon = "fa-linkedin" + + # Contact form + + # Since this template is static, the contact form uses www.formspree.io as a + # proxy. The form makes a POST request to their servers to send the actual + # email. Visitors can send up to a 1000 emails each month for free. + # + # What you need to do for the setup? + # + # - set your email address under 'realEmail' below + # - upload the generated site to your server + # - send a dummy email yourself to confirm your account + # - click the confirm link in the email from www.formspree.io + # - you're done. Happy mailing! + + [params.footer.contact] + hide = false # Set this to true if you don't want to have a contact form on your site + realEmail = "example@example.org" + headline = "Get in touch" + buttonText = "Send" + resetText = "Reset" + + # 'warning' defines error messages for invalid inputs + [params.footer.contact.name] + text = "Name *" + warning = "Please, enter your name" + + [params.footer.contact.email] + text = "Email *" + warning = "Please, enter your email." + + [params.footer.contact.message] + text = "Message *" + warning = "Please, enter your message" + + # Copyright + [params.footer.copyright] + name = "Your name" diff --git a/gallery/themes/autophugo/exampleSite/content/_index.md b/gallery/themes/autophugo/exampleSite/content/_index.md new file mode 100644 index 0000000..ec380ec --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/_index.md @@ -0,0 +1,3 @@ +--- +--- + diff --git a/gallery/themes/autophugo/exampleSite/content/cats/_index.md b/gallery/themes/autophugo/exampleSite/content/cats/_index.md new file mode 100644 index 0000000..33b8178 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/cats/_index.md @@ -0,0 +1,22 @@ +--- +title: "Cats" +date: 2020-03-15T10:06:11-06:00 +weight: 0 +tags: +- friendly +resources: +- src: cats/cat_01.jpg + weight: 1 + alt: Cat in the grass + phototitle: Grass cat + description: This cat stalks through the grass + categories: + - dark colored +- src: cats/cat_02.jpg + alt: A cat in some sort of urban setting + phototitle: Cool cat + description: One of the coolest cats +- src: cats/cat_03.jpg + weight: -1 +--- + diff --git a/gallery/themes/autophugo/exampleSite/content/dogs/_index.md b/gallery/themes/autophugo/exampleSite/content/dogs/_index.md new file mode 100644 index 0000000..67e96c2 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/dogs/_index.md @@ -0,0 +1,30 @@ +--- +title: "Dog Group" +date: 2020-03-15T14:00:00-06:00 +weight: -1 +albumthumb: "dogs/happy-dogs/stationary-dogs/dog_04.jpg" +draft: false +tags: +- friendly +## Optional additional meta info for resources list +# alt: Image alternative and screen-reader text +# phototitle: A title for the photo +# description: A sub-title or description for the photo +resources: +- src: "dogs/jumping_dog_01.jpg" + weight: 10 +- src: "dogs/jumping_dog_02.jpg" + weight: 20 + tags: + - water + categories: + - dark colored +- src: "dogs/jumping_dog_03.jpg" + weight: 30 +- src: "dogs/jumping_dog_04.jpg" + weight: 40 + tags: + - water + categories: + - dark colored +--- diff --git a/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/_index.md b/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/_index.md new file mode 100644 index 0000000..7fed7b4 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/_index.md @@ -0,0 +1,6 @@ +--- +title: "Happy Dogs" +date: 2020-03-14T19:43:59-06:00 +albumthumb: "dogs/happy-dogs/stationary-dogs/dog_04.jpg" +--- + diff --git a/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/running-dogs/_index.md b/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/running-dogs/_index.md new file mode 100644 index 0000000..2c3e7a6 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/running-dogs/_index.md @@ -0,0 +1,23 @@ +--- +title: "Running Dogs" +date: 2020-11-29T16:34:40-06:00 +albumthumb: "dogs/happy-dogs/running-dogs/dog_05.jpg" +resources: +- src: dogs/happy-dogs/running-dogs/dog_05.jpg + alt: Two dogs running down a grassy trail towards the photographer + description: Clearly a [dog day afternoon](https://en.wikipedia.org/wiki/Dog_Day_Afternoon)! + categories: + - dark colored +- src: dogs/happy-dogs/running-dogs/dog_09.jpg + alt: Two brown hounds chasing something in a field + phototitle: How Now Brown Hound + categories: + - dark colored +- src: dogs/happy-dogs/running-dogs/dog_10.jpg + alt: A brown greyhound running to the right in a grassy field on a sunny day + phototitle: A brown greyhound +- src: dogs/happy-dogs/running-dogs/dog_11.jpg + alt: A grey-brown dog bounding towards the photographer + phototitle: A brown/grey hound +--- + diff --git a/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/stationary-dogs/_index.md b/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/stationary-dogs/_index.md new file mode 100644 index 0000000..5f43722 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/dogs/happy-dogs/stationary-dogs/_index.md @@ -0,0 +1,18 @@ +--- +title: "Stationary Dogs" +date: 2020-11-29T16:40:00-06:00 +albumthumb: "dogs/happy-dogs/stationary-dogs/dog_04.jpg" +resources: +- src: dogs/happy-dogs/stationary-dogs/dog_04.jpg + alt: Two dogs in a field looking to the left past the photographer. + phototitle: Field of Dogs + description: Taken in some moor somewhere + categories: + - dark colored +- src: dogs/happy-dogs/stationary-dogs/dog_06.jpg + alt: A dog leaning out a window, as seen from a rear-view mirror. + phototitle: Dog Retrospective +- src: dogs/happy-dogs/stationary-dogs/dog_08.jpg + alt: Silly dog, shaggy, ears back, tongue wagging + description: Not sure if this one is stationary, now that I look again... +--- diff --git a/gallery/themes/autophugo/exampleSite/content/dogs/pensive-dogs/_index.md b/gallery/themes/autophugo/exampleSite/content/dogs/pensive-dogs/_index.md new file mode 100644 index 0000000..531a232 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/dogs/pensive-dogs/_index.md @@ -0,0 +1,15 @@ +--- +title: "Pensive Dogs" +date: 2020-03-14T19:43:59-06:00 +albumthumb: "dogs/pensive-dogs/dog_01.jpg" +resources: +- src: dogs/pensive-dogs/dog_01.jpg + alt: A little scotty dog + phototitle: Some Photo Metadata + description: More Photo Metadata +- src: dogs/pensive-dogs/dog_02.jpg + description: Some fields may be specified and some left off, and some might end up fairly long for any specified window size, but this just has to deal with it and still display nicely so that folks like it +- src: dogs/pensive-dogs/dog_03.jpg + alt: Another example of just some fields specified +--- + diff --git a/gallery/themes/autophugo/exampleSite/content/fish/_index.md b/gallery/themes/autophugo/exampleSite/content/fish/_index.md new file mode 100644 index 0000000..e72b259 --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/fish/_index.md @@ -0,0 +1,31 @@ +--- +title: "Fish!" +date: 2020-03-15T17:12:50-06:00 +weight: 0 +albumthumb: "fish/fish_02.jpg" +resources: +- src: fish/fish_01.jpg + alt: A fish with a large hump on his forehead + phototitle: Blue Guy + description: Coming to an aquarium near you +- src: fish/fish_02.jpg + alt: A clownfish poking around in some sea anemone or something + phototitle: Class Clown + description: There's one in every school +- src: fish/fish_03.jpg + tags: + - water +- src: fish/fish_04.jpg + tags: + - not friendly +- src: fish/fish_05.jpg + alt: A lion fish near the sea floor + phototitle: Lion Fish Time! + description: A poisonish lion fish + tags: + - not friendly +- src: fish/fish_07.jpg + alt: Blue fish in front of yellow coral + phototitle: Swimming Blue Fish + description: Just some little blue guys swimming in front of a big yellow guy +--- diff --git a/gallery/themes/autophugo/exampleSite/content/many-simple/_index.md b/gallery/themes/autophugo/exampleSite/content/many-simple/_index.md new file mode 100644 index 0000000..782b84b --- /dev/null +++ b/gallery/themes/autophugo/exampleSite/content/many-simple/_index.md @@ -0,0 +1,15 @@ +--- +title: "Many Simple Images" +date: 2019-12-21T12:11:50-06:00 +weight: 1 +albumthumb: "many-simple/Jamestown.gif" +draft: false +## Optional additional meta info for resources list +# alt: Image alternative and screen-reader text +# phototitle: A title for the photo +# description: A sub-title or description for the photo +resources: +- src: many-simple/Janine.gif + tags: + - not friendly +--- diff --git a/gallery/themes/autophugo/exampleSite/static/favicon.ico b/gallery/themes/autophugo/exampleSite/static/favicon.ico new file mode 100644 index 0000000..3669333 Binary files /dev/null and b/gallery/themes/autophugo/exampleSite/static/favicon.ico differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_01.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_01.jpg new file mode 100644 index 0000000..855721e Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_01.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_02.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_02.jpg new file mode 100644 index 0000000..0541d65 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_02.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_03.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_03.jpg new file mode 100644 index 0000000..aec12df Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_03.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_04.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_04.jpg new file mode 100644 index 0000000..03948d2 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/cat_04.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_01.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_01.jpg new file mode 100644 index 0000000..282fc88 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_01.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_02.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_02.jpg new file mode 100644 index 0000000..6ce02a6 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_02.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_03.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_03.jpg new file mode 100644 index 0000000..3e5d96b Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_03.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_04.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_04.jpg new file mode 100644 index 0000000..c31b855 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_04.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_05.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_05.jpg new file mode 100644 index 0000000..1d27278 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_05.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_06.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_06.jpg new file mode 100644 index 0000000..51fd289 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_06.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_07.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_07.jpg new file mode 100644 index 0000000..0102371 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_07.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_08.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_08.jpg new file mode 100644 index 0000000..554ec1d Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_08.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_09.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_09.jpg new file mode 100644 index 0000000..316834e Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_09.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_10.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_10.jpg new file mode 100644 index 0000000..60eddc1 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_10.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_11.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_11.jpg new file mode 100644 index 0000000..cc2802a Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/dog_11.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_01.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_01.jpg new file mode 100644 index 0000000..e852df7 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_01.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_02.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_02.jpg new file mode 100644 index 0000000..1c55ca6 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_02.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_03.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_03.jpg new file mode 100644 index 0000000..7bae96d Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_03.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_04.jpg b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_04.jpg new file mode 100644 index 0000000..d273dde Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/assets/fish_04.jpg differ diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/config.toml b/gallery/themes/autophugo/exampleSiteNoAlbum/config.toml new file mode 100644 index 0000000..2d0ceab --- /dev/null +++ b/gallery/themes/autophugo/exampleSiteNoAlbum/config.toml @@ -0,0 +1,111 @@ +# Settings +baseurl = "http://example.org/" +languageCode = "en-us" +title = "AutoPhugo" +theme = "autophugo" +#googleAnalytics = "" +disableKinds = ["taxonomy", "term"] +#[taxonomies] +# tag = "tags" +# category = "categories" + +[Author] + name = "Karl Sickendick" + email = "kc0bfv@gmail.com" + +[params] + # Meta + description = "AutoPhugo - Photo Gallery on Hugo" + keywords = "phugo, hugo, photogallery, photoblog, hugo theme" + #msvalidate = "" + #googlesiteverification = "" + #thumb_width = 480 + #thumb_quality = 50 + #full_width = 960 + #full_quality = 90 + #column_count = 2 + #breadcrumb_use_title = false + #filename_as_phototitle = false + #images_downloadable = true + #images_downloadable_use_orig = false + #taxonomies_links = false + + # Headerbar links + # Do not put too many links here, + # it will break mobile appearance + + [[params.header.links]] + name = "About" + url = "#footer" + icon = "fa-info-circle" + + # Footer panel + + [params.footer.paragraph] + headline = "Magna feugiat sed adipiscing" + text = "Nulla consequat, ex ut suscipit rutrum, mi dolor tincidunt erat, et scelerisque turpis ipsum eget quis orci mattis aliquet. Maecenas fringilla et ante at lorem et ipsum. Dolor nulla eu bibendum sapien. Donec non pharetra dui. Nulla consequat, ex ut suscipit rutrum, mi dolor tincidunt erat, et scelerisque turpis ipsum." + + [params.footer.social] + headline = "Follow me" + + [[params.footer.social.links]] + label = "Twitter" + url = "#" + icon = "fa-twitter" + + [[params.footer.social.links]] + label = "Facebook" + url = "#" + icon = "fa-facebook" + + [[params.footer.social.links]] + label = "Instagram" + url = "#" + icon = "fa-instagram" + + [[params.footer.social.links]] + label = "Github" + url = "#" + icon = "fa-github" + + [[params.footer.social.links]] + label = "LinkedIn" + url = "#" + icon = "fa-linkedin" + + # Contact form + + # Since this template is static, the contact form uses www.formspree.io as a + # proxy. The form makes a POST request to their servers to send the actual + # email. Visitors can send up to a 1000 emails each month for free. + # + # What you need to do for the setup? + # + # - set your integration endpoint address under 'formspreeID' below + # - create a formspree account and a simple form + # - then get the integration endpoint generated to you form + # - you're done. Happy mailing! + + [params.footer.contact] + hide = false # Set this to true if you don't want to have a contact form on your site + formspreeID = "myuniqueID" # Getting value from Formspree integration endpoint (eg. https://formspree.io/f/myuniqueID) + headline = "Get in touch" + buttonText = "Send" + resetText = "Reset" + + # 'warning' defines error messages for invalid inputs + [params.footer.contact.name] + text = "Name *" + warning = "Please, enter your name" + + [params.footer.contact.email] + text = "Email *" + warning = "Please, enter your email." + + [params.footer.contact.message] + text = "Message *" + warning = "Please, enter your message" + + # Copyright + [params.footer.copyright] + name = "Your name" diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/content/_index.md b/gallery/themes/autophugo/exampleSiteNoAlbum/content/_index.md new file mode 100644 index 0000000..517b4a3 --- /dev/null +++ b/gallery/themes/autophugo/exampleSiteNoAlbum/content/_index.md @@ -0,0 +1,14 @@ +--- +date: 2020-03-15T14:06:11-06:00 +weight: 0 +resources: +- src: cat_01.jpg + alt: Cat in the grass + phototitle: Grass cat + description: This cat stalks through the grass +- src: cat_02.jpg + alt: A cat in some sort of urban setting + phototitle: Cool cat + description: One of the coolest cats +--- + diff --git a/gallery/themes/autophugo/exampleSiteNoAlbum/static/favicon.ico b/gallery/themes/autophugo/exampleSiteNoAlbum/static/favicon.ico new file mode 100644 index 0000000..3669333 Binary files /dev/null and b/gallery/themes/autophugo/exampleSiteNoAlbum/static/favicon.ico differ diff --git a/gallery/themes/autophugo/images/screenshot.png b/gallery/themes/autophugo/images/screenshot.png new file mode 100644 index 0000000..eacce72 Binary files /dev/null and b/gallery/themes/autophugo/images/screenshot.png differ diff --git a/gallery/themes/autophugo/images/tn.png b/gallery/themes/autophugo/images/tn.png new file mode 100644 index 0000000..26bf465 Binary files /dev/null and b/gallery/themes/autophugo/images/tn.png differ diff --git a/gallery/themes/autophugo/layouts/404.html b/gallery/themes/autophugo/layouts/404.html new file mode 100644 index 0000000..5958f25 --- /dev/null +++ b/gallery/themes/autophugo/layouts/404.html @@ -0,0 +1,3 @@ +{{ define "main" }} + 404 - Not Found +{{ end }} diff --git a/gallery/themes/autophugo/layouts/_default/baseof.html b/gallery/themes/autophugo/layouts/_default/baseof.html new file mode 100644 index 0000000..ab1947a --- /dev/null +++ b/gallery/themes/autophugo/layouts/_default/baseof.html @@ -0,0 +1,22 @@ + +{{- partial "lang.html" . }} + + + {{- block "title" . }} + {{- with .Title }}{{ . }} - {{ end }}{{ .Site.Title -}} + {{- end -}} + +{{- partial "head.html" . }} + + +
+ {{- partial "header.html" . }} +
+ {{ block "main" . }} + {{ end }} +
+ {{- partial "footer.html" . }} +
+{{- partial "scripts.html" . }} + + diff --git a/gallery/themes/autophugo/layouts/_default/list.html b/gallery/themes/autophugo/layouts/_default/list.html new file mode 100644 index 0000000..39f3058 --- /dev/null +++ b/gallery/themes/autophugo/layouts/_default/list.html @@ -0,0 +1,159 @@ +{{ define "main" }} + + {{- /* Things in site config */}} + {{- $thumb_width := default 480 ($.Param "thumb_width") }} + {{- $full_width := default 960 ($.Param "full_width") }} + {{- $thumb_quality := default 50 ($.Param "thumb_quality") }} + {{- $full_quality := default 90 ($.Param "full_quality") }} + {{- $filename_as_phototitle := default false ($.Param "filename_as_phototitle") }} + + {{- /* Calculate thumb_ and full_size from params, unless one is provided in the config. */}} + {{- $thumb_size := default (printf "%dx q%d" $thumb_width $thumb_quality) ($.Param "thumb_size") }} + {{- $full_resize_method := lower (default "resize" ($.Param "full_resize_method")) -}} + {{- $full_size := default (printf "%dx q%d" $full_width $full_quality) ($.Param "full_size") }} + + {{- /* Build the list of sections and thumbnails */}} + {{- $.Scratch.Set "sections" (slice) }} + {{- range .Sections.ByDate }} + {{- $title := .Title }} + {{- $link := .RelPermalink }} + {{- $weight := default 0 (.Param "weight") }} + + {{- partial "scratch_set_retalbumthumb.html" . }} + {{- /* Note that the Scratch below must come from . context, not $ */}} + {{- $image := .Scratch.Get "retalbumthumb" }} + + {{- if not $image }} + {{- errorf (printf "When processing '%s', no thumbnail image found for: %s" $.Page.File.Path $title) }} + {{- else }} + {{- $.Scratch.Set "orientation" 1 }} + {{- with $image.Exif }} + {{- $.Scratch.Set "orientation" .Tags.Orientation }} + {{- end }} + {{- $orientation := $.Scratch.Get "orientation" }} + {{- /* TODO: handle flipped orientations */}} + {{- $.Scratch.Set "rotation" "" }} + {{- if (eq $orientation 1) }} + {{- $.Scratch.Set "rotation" "" }} + {{- else if (eq $orientation 8) }} + {{- $.Scratch.Set "rotation" " r90" }} + {{- else if (eq $orientation 3) }} + {{- $.Scratch.Set "rotation" " r180" }} + {{- else if (eq $orientation 6) }} + {{- $.Scratch.Set "rotation" " r270" }} + {{- end }} + {{- $rotation := $.Scratch.Get "rotation" }} + {{- $resize_cmd := printf "%s%s" $thumb_size $rotation }} + {{- $thumb := $image.Resize $resize_cmd }} + {{- $new_sect := dict "type" "link" "title" $title "link" $link "thumb" $thumb "weight" $weight }} + + {{- $sections := $.Scratch.Get "sections" }} + {{- $sections := $sections | append $new_sect }} + {{- $.Scratch.Set "sections" $sections }} + {{- end }} + {{- end }} + {{- /* Section list is complete, now resort */}} + {{- $.Scratch.Set "sections" (sort ($.Scratch.Get "sections") "weight") }} + {{- $sections := $.Scratch.Get "sections" }} + + {{- /* Get and reorder the list of images */}} + {{- if .File }} + {{- $imgglob := printf "%s" (path.Join .File.Dir "*") }} + {{- $.Scratch.Set "imgglob" $imgglob }} + {{- end }} + {{- $imgglob := default "*" ($.Scratch.Get "imgglob") }} + {{- $imageresources := where (resources.Match $imgglob) "ResourceType" "image" }} + + {{- /* Build some image objects */}} + {{- $.Scratch.Set "images" (slice) }} + {{- range $elem_index, $elem_val := $imageresources }} + + {{- /* Build some scratch for upcoming search... */}} + {{- $img_dat := newScratch }} + {{- $img_dat.Set "alt" "" }} + {{- $img_dat.Set "description" "" }} + {{- $img_dat.Set "weight" 0 }} + {{- $img_dat.Set "taxonomies" dict }} + + {{- if $filename_as_phototitle }} + {{- $filename := replace (path.Base $elem_val.Name) (path.Ext $elem_val.Name) "" }} + {{- $img_dat.Set "phototitle" (humanize $filename) }} + {{- else }} + {{- $img_dat.Set "phototitle" "" }} + {{- end }} + + {{- /* Search the resources for a matching image src, save off details */}} + {{- $img_path := $elem_val.Name }} + {{- with $.Params.resources }} + {{- range first 1 (where . "src" $img_path) }} + {{- $found := . }} + {{- if isset . "alt" }}{{ $img_dat.Set "alt" .alt }}{{ end }} + {{- if isset . "phototitle" }}{{ $img_dat.Set "phototitle" .phototitle }}{{ end }} + {{- if isset . "description" }}{{ $img_dat.Set "description" .description }}{{ end }} + {{- if isset . "weight" }}{{ $img_dat.Set "weight" .weight }}{{ end }} + + {{- /* Build an dict of arrays - the keys are taxonomy name, values are an array of terms in that taxonomy */}} + {{- range $taxname, $taxterms := $.Site.Taxonomies }} + {{- if isset $found $taxname }} + {{- $newentry := dict $taxname (index $found $taxname) }} + {{- $newvals := merge ($img_dat.Get "taxonomies") $newentry }} + {{- $img_dat.Set "taxonomies" $newvals }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + {{- $.Scratch.Set "orientation" 1 }} + {{- with $elem_val.Exif }} + {{- $.Scratch.Set "orientation" .Tags.Orientation }} + {{- end }} + {{- $orientation := $.Scratch.Get "orientation" }} + {{- /* TODO: handle flipped orientations */}} + {{- $.Scratch.Set "rotation" "" }} + {{- if (eq $orientation 1) }} + {{- $.Scratch.Set "rotation" "" }} + {{- else if (eq $orientation 8) }} + {{- $.Scratch.Set "rotation" " r90" }} + {{- else if (eq $orientation 3) }} + {{- $.Scratch.Set "rotation" " r180" }} + {{- else if (eq $orientation 6) }} + {{- $.Scratch.Set "rotation" " r270" }} + {{- end }} + {{- $rotation := $.Scratch.Get "rotation" }} + {{- $thumb_resize_cmd := printf "%s%s" $thumb_size $rotation }} + {{- $full_resize_cmd := printf "%s%s" $full_size $rotation }} + + {{- /* Save off the image object */}} + {{- $alt := $img_dat.Get "alt" }} + {{- $phototitle := $img_dat.Get "phototitle" }} + {{- $description := $img_dat.Get "description" }} + {{- $weight := $img_dat.Get "weight" }} + {{- $taxonomies := $img_dat.Get "taxonomies" }} + {{- $thumb := $elem_val.Resize $thumb_resize_cmd }} + + {{- $.Scratch.Set "full_resized" $thumb }} + {{- if (eq $full_resize_method "resize") }} + {{- $.Scratch.Set "full_resized" ($elem_val.Resize $full_resize_cmd) }} + {{- else if (eq $full_resize_method "fit") }} + {{- $.Scratch.Set "full_resized" ($elem_val.Fit $full_resize_cmd) }} + {{- else if (eq $full_resize_method "none") }} + {{- $.Scratch.Set "full_resized" $elem_val }} + {{- else }} + {{- errorf "Invalid 'full_resize_method' specified! Must be resize or fit." }} + {{- end }} + {{- $full := $.Scratch.Get "full_resized" }} + + {{- $new_img := dict "type" "image" "image" $elem_val "thumb" $thumb "full" $full "alt" $alt "phototitle" $phototitle "description" $description "weight" $weight "orig" $elem_val "taxonomies" $taxonomies }} + + {{- $images := $.Scratch.Get "images" }} + {{- $images := $images | append $new_img }} + {{- $.Scratch.Set "images" $images }} + {{- end }} + {{- /* Image list is complete, now resort */}} + {{- $.Scratch.Set "images" (sort ($.Scratch.Get "images") "weight") }} + {{- $images := $.Scratch.Get "images" }} + + {{- $.Scratch.Set "content" ($sections | append $images) }} + {{- partial "render_img_column_flexrow.html" $ }} + +{{ end }} diff --git a/gallery/themes/autophugo/layouts/_default/terms.html b/gallery/themes/autophugo/layouts/_default/terms.html new file mode 100644 index 0000000..c90f260 --- /dev/null +++ b/gallery/themes/autophugo/layouts/_default/terms.html @@ -0,0 +1,72 @@ +{{ define "main" }} + {{- $thumb_width := default 480 ($.Param "thumb_width") }} + {{- $thumb_quality := default 50 ($.Param "thumb_quality") }} + + {{- $thumb_size := default (printf "%dx q%d" $thumb_width $thumb_quality) ($.Param "thumb_size") }} + + {{- $.Scratch.Set "tags" (dict) }} + + {{- range $.Site.Pages }} + {{- $page := . }} + + {{- /* Enumerate the tags on the page */}} + {{- range (index $page.Params $.Data.Plural) }} + {{- $tag := . }} + + {{- partial "scratch_set_retalbumthumb.html" $page }} + {{- /* Note that the Scratch below must come from $page context, not $ */}} + {{- $image := $page.Scratch.Get "retalbumthumb" }} + + {{- if not $image }} + {{- errorf (printf "When processing '%s', no thumbnail image found for: %s" $page.Path $tag) }} + {{- end }} + + {{- $thumb := $image.Resize $thumb_size }} + + {{- /* Create an object representing this tag term entry */}} + {{- $page_desc := dict "type" "link" "link" $page.RelPermalink "title" $page.Title "thumb" $thumb }} + + {{- /* Add this object to the list */}} + {{- $cur_entry := (index ($.Scratch.Get "tags") $tag) }} + {{- $new_list := $cur_entry | append $page_desc }} + {{- $.Scratch.Set "tags" (merge ($.Scratch.Get "tags") (dict $tag $new_list)) }} + {{ end }} + + {{- /* Enumerate the tags on the resource images */}} + {{- with $page.File }} + {{- range resources.Match (path.Join $page.File.Dir "*") }} + {{- $img := . }} + {{- $filename := path.Base $img.Name }} + {{- $filedir := path.Dir $img.Name }} + + {{- with $page.Params.resources }} + {{- range first 1 (where . "src" $img.Name) }} + {{- $resource := . }} + {{- range (index . $.Data.Plural) }} + {{- $tag := . }} + + {{- $thumb := $img.Resize $thumb_size }} + + {{- /* Create an object representing this tag term entry */}} + {{- $url := ( printf "/%s/#%s" $filedir ( md5 $filename ) ) | relURL }} + {{- $img_desc := dict "type" "link" "link" $url "title" $resource.phototitle "thumb" $thumb }} + {{- /* Add this object to the list */}} + {{- $cur_entry := (index ($.Scratch.Get "tags") $tag) }} + {{- $new_list := $cur_entry | append $img_desc }} + {{- $.Scratch.Set "tags" (merge ($.Scratch.Get "tags") (dict $tag $new_list)) }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + + {{- range $term, $term_list := $.Scratch.Get "tags" }} + +

{{ $term }}

+ {{- $.Scratch.Set "content" $term_list }} + {{- partial "render_img_column_flexrow.html" $ }} + + {{ end }} +{{ end }} diff --git a/gallery/themes/autophugo/layouts/partials/footer.html b/gallery/themes/autophugo/layouts/partials/footer.html new file mode 100644 index 0000000..c92a2a6 --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/footer.html @@ -0,0 +1,83 @@ +{{ "" | safeHTML }} +
+
+
+
+

{{ with .Site.Params.footer.paragraph.headline }}{{ . | markdownify }}{{ end }}

+

{{ with .Site.Params.footer.paragraph.text }}{{ . | markdownify }}{{ end }}

+
+
+

{{ with .Site.Params.footer.social.headline }}{{ . | markdownify }}{{ end }}

+
    + {{ range .Site.Params.footer.social.links }} +
  • {{ .label }}
  • + {{ end }} +
+
+ + {{- /* Unfortunately I cannot find a way to determine if disableKinds + is turned on, so I cannot check that for taxonomy or term. + Instead I have to use this new parameter */}} + {{- if (default false ($.Param "taxonomies_links")) }} + + {{- with $.Site.Taxonomies }} +
+

View all:

+
+ {{- range $taxname, $taxterms := $.Site.Taxonomies }} + {{- $url := ( printf "/%s/" ($taxname | urlize) ) | relURL }} + + {{- end }} +
+
+ {{- end }} + + {{- /* Only display the terms list if this page has some */}} + {{- $.Scratch.Set "terms_present" false }} + {{- range $taxname, $taxterms := $.Site.Taxonomies }} + {{- range ($.Param $taxname) }} + {{- $.Scratch.Set "terms_present" true }} + {{- end }} + {{- end }} + {{- if $.Scratch.Get "terms_present" }} +
+

Terms:

+
+ {{- range $taxname, $taxterms := $.Site.Taxonomies }} + {{- range ($.Param $taxname) }} + {{- $url := ( printf "/%s/#%s" ($taxname | urlize) ( . | urlize ) ) | relURL }} + + {{- end }} + {{- end }} +
+
+ {{- end }} + {{- end }} +
+ {{ if not .Site.Params.footer.contact.hide }} +
+
+

{{ with .Site.Params.footer.contact.headline }}{{ . | markdownify }}{{ end }}

+
+
+ +
+
+ +
+
+ +
+
    +
  • +
  • +
+
+
+
+ {{ end }} +
+ +
diff --git a/gallery/themes/autophugo/layouts/partials/head.html b/gallery/themes/autophugo/layouts/partials/head.html new file mode 100644 index 0000000..b14032b --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/head.html @@ -0,0 +1,36 @@ + + + + +{{ $description := $.Param "description" }} +{{- with $description }}{{ end }} +{{ $author := .Params.author.name | default .Site.Author.name }} +{{- with $author }}{{ end }} + + + +{{- partial "scratch_set_retalbumthumb.html" . }} +{{- /* Note that the Scratch below must come from . context, not $ */}} +{{- .Scratch.Set "image" (.Scratch.Get "retalbumthumb") }} + +{{- partial "opengraph_twittercard.html" . }} + + + +{{ with .Site.Params.googlesiteverification }}{{ end }} +{{ with .Site.Params.msvalidate }}{{ end }} +{{ hugo.Generator }} +{{ with .OutputFormats.Get "RSS" }} + + +{{ end }} + +{{ template "_internal/google_analytics_async.html" . }} + +{{- $font_awesome := resources.Get "css/font-awesome.min.css" -}} +{{- $google_font := resources.Get "css/source-sans-pro.css" -}} +{{- $main_css := resources.Get "css/main.css" -}} +{{- $mg_pop_css := resources.Get "css/magnific-popup.css" -}} +{{- $user_css := resources.Get "css/user.css" -}} +{{- $custom_css := slice $font_awesome $google_font $main_css $mg_pop_css $user_css | resources.Concat "css/custom.css" | resources.Minify | resources.Fingerprint -}} + diff --git a/gallery/themes/autophugo/layouts/partials/header.html b/gallery/themes/autophugo/layouts/partials/header.html new file mode 100644 index 0000000..87bc154 --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/header.html @@ -0,0 +1,39 @@ + diff --git a/gallery/themes/autophugo/layouts/partials/lang.html b/gallery/themes/autophugo/layouts/partials/lang.html new file mode 100644 index 0000000..437e088 --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/lang.html @@ -0,0 +1 @@ + diff --git a/gallery/themes/autophugo/layouts/partials/navigation.html b/gallery/themes/autophugo/layouts/partials/navigation.html new file mode 100644 index 0000000..4567645 --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/navigation.html @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/gallery/themes/autophugo/layouts/partials/opengraph_twittercard.html b/gallery/themes/autophugo/layouts/partials/opengraph_twittercard.html new file mode 100644 index 0000000..e401f21 --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/opengraph_twittercard.html @@ -0,0 +1,19 @@ +{{- $description := $.Param "description" }} + + + + +{{- with $description }}{{ end }} +{{- with .Site.Social.twitter }}{{- end }} + + + +{{- with $description }}{{ end }} + + + +{{- with .Params.locale }}{{ end }} +{{- with .Site.Title }}{{ end }} + +{{- /* Facebook Page Admin ID for Domain Insights */}} +{{- with .Site.Social.facebook_admin }}{{ end }} diff --git a/gallery/themes/autophugo/layouts/partials/render_img_column_flexrow.html b/gallery/themes/autophugo/layouts/partials/render_img_column_flexrow.html new file mode 100644 index 0000000..1ea34a1 --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/render_img_column_flexrow.html @@ -0,0 +1,102 @@ +{{- /* This partial requires input context to have a Scratch with "content" + + $.Scratch.Get "content" must return a slice (array) of object maps + + Those objects need a "type" key, which can be "link" or something else. + + See below to see what needs to be in those different types + */}} + +
+ + {{- $column_count := default 2 ($.Param "column_count") }} + {{- $downloadable := default true ($.Param "images_downloadable") }} + {{- $orig_download := default false ($.Param "images_downloadable_use_orig") }} + + {{- /* Initialize the column storage */}} + {{- range $column_ind := seq $column_count }} + {{- $st_name := printf "col-%d" $column_ind }} + {{- $st_height_name := printf "col-height-%d" $column_ind }} + {{- $.Scratch.Set $st_name (slice) }} + {{- $.Scratch.Set $st_height_name 0 }} + {{- end }} + + + {{- /* Add the sections into the columns followed by images */}} + {{- range $elem_index, $elem_val := $.Scratch.Get "content" }} + {{- /* Find the least-filled column */}} + {{- $.Scratch.Set "min_height" -1 }} + {{- $.Scratch.Set "min_col" -1 }} + {{- range $column_ind := seq $column_count }} + {{- $st_height_name := printf "col-height-%d" $column_ind }} + {{- $col_height := $.Scratch.Get $st_height_name }} + {{- $min_height := $.Scratch.Get "min_height" }} + {{- if (or (eq $min_height -1) (lt $col_height $min_height)) }} + {{- $.Scratch.Set "min_height" $col_height }} + {{- $.Scratch.Set "min_col" $column_ind }} + {{- end }} + {{- end }} + + {{- /* column_ind becomes the least-filled column */}} + {{- $column_ind := $.Scratch.Get "min_col" }} + {{- if eq $column_ind -1 }} + {{- errorf (printf "When processing '%s', failed to find a least-filled column!" $.Page.File.Path) }} + {{- end }} + {{- $st_name := printf "col-%d" $column_ind }} + {{- $st_height_name := printf "col-height-%d" $column_ind }} + + {{- /* Create a new version of the elem_val with an index reflecting position now, well after sorting is complete, and as we're placing things */}} + {{- $reind_val := merge $elem_val (dict "index" $elem_index) }} + + {{- $column := $.Scratch.Get $st_name }} + {{- $column := $column | append $reind_val }} + {{- $.Scratch.Set $st_name $column }} + + {{- $.Scratch.Set $st_height_name (add ($.Scratch.Get $st_height_name) $reind_val.thumb.Height) }} + {{- end }} + + {{- /* Output the images in columns */}} + {{- range $column_ind := seq $column_count }} + {{- $st_name := printf "col-%d" $column_ind }} + {{- $column := $.Scratch.Get $st_name }} +
+ {{- range $column }} + {{- $filename := path.Base .image.Name }} +
+ {{- if (eq .type "link") }} + {{ .title }} +

{{ .title }}

+ {{- else }} + + + {{ . }} + + {{- if (default false ($.Param "taxonomies_links")) }} +
+ {{- range $taxname, $terms := .taxonomies }} + {{- range $terms }} +
+ {{- $url := ( printf "/%s/#%s" ($taxname | urlize) ( . | urlize ) ) | relURL }} + {{ . | humanize }} +
+ {{- end }} + {{- end }} +
+ {{- end }} +

{{ .phototitle }}

+ {{- end }} +
+ {{- end }} +
+ {{- end }} +
diff --git a/gallery/themes/autophugo/layouts/partials/scratch_set_retalbumthumb.html b/gallery/themes/autophugo/layouts/partials/scratch_set_retalbumthumb.html new file mode 100644 index 0000000..b3f0582 --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/scratch_set_retalbumthumb.html @@ -0,0 +1,27 @@ +{{- /* + Sets retalbumthumb in .Scratch to the correct albumthumb. + PLEASE NOTE: partials can only get local "dot" . context, they + do not get the global $ context. Therefore, you must get the returned + scratch data from the . context, not from $. + + Requires . to be set to the right section. + */}} + +{{- .Scratch.Delete "retalbumthumb" }} + +{{- /* If no albumthumb is set, get the first image*/}} +{{- if or (not (isset .Params "albumthumb")) (eq .Params.albumthumb "") }} + {{- with .File }} + {{- $.Scratch.Set "imgglob" (printf "%s" (path.Join .Dir "**")) }} + {{- end }} + {{- $imgglob := default "**" ($.Scratch.Get "imgglob") }} + {{- $imageresources := where (resources.Match $imgglob) "ResourceType" "image" }} + {{- .Scratch.Set "retalbumthumb" (index $imageresources 0) }} +{{- end }} + +{{- /* Otherwise get the albumthumb*/}} +{{- with .Params.albumthumb }} + {{- $image := resources.Get . }} + {{- /* The $ here with Scratch means the context outside the with */}} + {{- $.Scratch.Set "retalbumthumb" $image }} +{{- end }} diff --git a/gallery/themes/autophugo/layouts/partials/scripts.html b/gallery/themes/autophugo/layouts/partials/scripts.html new file mode 100644 index 0000000..3d14b1f --- /dev/null +++ b/gallery/themes/autophugo/layouts/partials/scripts.html @@ -0,0 +1,6 @@ +{{- $jquery := resources.Get "js/jquery.min.js" -}} +{{- $mg_pop := resources.Get "js/jquery.magnific-popup.js" -}} +{{- $main := resources.Get "js/main.js" -}} +{{- $util := resources.Get "js/util.js" -}} +{{- $custom_js := slice $jquery $mg_pop $main $util | resources.Concat "js/custom.js" | resources.Minify | resources.Fingerprint -}} + diff --git a/gallery/themes/autophugo/static/css/images/arrow.svg b/gallery/themes/autophugo/static/css/images/arrow.svg new file mode 100644 index 0000000..2945bb6 --- /dev/null +++ b/gallery/themes/autophugo/static/css/images/arrow.svg @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/gallery/themes/autophugo/static/css/images/close.svg b/gallery/themes/autophugo/static/css/images/close.svg new file mode 100644 index 0000000..e375a18 --- /dev/null +++ b/gallery/themes/autophugo/static/css/images/close.svg @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/gallery/themes/autophugo/static/css/images/spinner.svg b/gallery/themes/autophugo/static/css/images/spinner.svg new file mode 100644 index 0000000..de560f5 --- /dev/null +++ b/gallery/themes/autophugo/static/css/images/spinner.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/gallery/themes/autophugo/static/fonts/FontAwesome.otf b/gallery/themes/autophugo/static/fonts/FontAwesome.otf new file mode 100644 index 0000000..d4de13e Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/FontAwesome.otf differ diff --git a/gallery/themes/autophugo/static/fonts/fontawesome-webfont.eot b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..c7b00d2 Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.eot differ diff --git a/gallery/themes/autophugo/static/fonts/fontawesome-webfont.svg b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..8b66187 --- /dev/null +++ b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.svg @@ -0,0 +1,685 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gallery/themes/autophugo/static/fonts/fontawesome-webfont.ttf b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..f221e50 Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.ttf differ diff --git a/gallery/themes/autophugo/static/fonts/fontawesome-webfont.woff b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..6e7483c Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.woff differ diff --git a/gallery/themes/autophugo/static/fonts/fontawesome-webfont.woff2 b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..7eb74fd Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/fontawesome-webfont.woff2 differ diff --git a/gallery/themes/autophugo/static/fonts/ssp/OFL.txt b/gallery/themes/autophugo/static/fonts/ssp/OFL.txt new file mode 100644 index 0000000..72d81ab --- /dev/null +++ b/gallery/themes/autophugo/static/fonts/ssp/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Italic.ttf b/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Italic.ttf new file mode 100644 index 0000000..e7b9182 Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Italic.ttf differ diff --git a/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Light.ttf b/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Light.ttf new file mode 100644 index 0000000..348871a Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Light.ttf differ diff --git a/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-LightItalic.ttf b/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-LightItalic.ttf new file mode 100644 index 0000000..989dc8e Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-LightItalic.ttf differ diff --git a/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Regular.ttf b/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Regular.ttf new file mode 100644 index 0000000..b422bf4 Binary files /dev/null and b/gallery/themes/autophugo/static/fonts/ssp/SourceSansPro-Regular.ttf differ diff --git a/gallery/themes/autophugo/static/fonts/ssp/source b/gallery/themes/autophugo/static/fonts/ssp/source new file mode 100644 index 0000000..24428d6 --- /dev/null +++ b/gallery/themes/autophugo/static/fonts/ssp/source @@ -0,0 +1 @@ +https://fonts.google.com/specimen/Source+Sans+Pro diff --git a/gallery/themes/autophugo/theme.toml b/gallery/themes/autophugo/theme.toml new file mode 100644 index 0000000..c558fc6 --- /dev/null +++ b/gallery/themes/autophugo/theme.toml @@ -0,0 +1,18 @@ +name = "AutoPhugo" +license = "CCA 3.0 Unported" +licenselink = "https://github.com/kc0bfv/autophugo/blob/master/LICENSE.md" +description = "Image gallery/Photoblog Theme for Hugo." +homepage = "https://github.com/kc0bfv/autophugo/" +tags = ["gallery", "photoblog", "responsive", "mobile", "dark", "creative", "images"] +features = ["albums", "contact form", "breadcrumbs"] +min_version = "0.58.0" + +authors = [ + {name = "Karl Sickendick", homepage = "https://notmet.net"}, + {name = "Pavel Kanyshev", homepage = "https://github.com/aerohub"}, +] + +# If porting an existing theme +[original] + name = "Multiverse" + homepage = "https://html5up.net/multiverse"