Sign in

Question about adding Hero image in Mercury theme

  • This topic has 9 replies, 3 voices, and was last updated 3 weeks, 2 days ago by .
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3831
    flim

    I want to add a Hero image to the Mercury theme, I use the Tattoo theme as reference. Is it copy the Hero related config.json setting, main.css and modify the hbs to get the job done?

    #3860
    flim

    I am wondering where Publii store the Hero image. If I have a few tag pages, each with different hero, should I hard code the hero image in each tag template, or adding a section in config file for each template? 🙄

    #3908
    flim

    Anyone has experience about adding a Hero image on tag page?

    #3914
    Verhoeckx

    The new version of Publii (0.37) does have a Featured image option for the tag pages. Does that solve your problem?

    #3960
    flim

    I tried to upload an image that is 1920 x 930 jpeg but the Upload progress never completed. I tried a small gif and success. Any size limit for the Tag’s Featured image?

    #3961
    Bob
    Support

    I tried to upload an image that is 1920 x 930 jpeg but the Upload progress never completed. I tried a small gif and success. Any size limit for the Tag’s Featured image?

    The tags featured images are available in v.2.2.0.0 Mercury theme; after installing, if it still doesn’t work for you, it means that you override the config,json file, and need to merge with the latest version.

    PS: The .gif or .svg files work because Publii does not generate thumbnails for this type of extensions.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3986
    flim

    Finally I can upload image from my local hard drive. Upload from network drive didn’t work.

    I tested with the “vanilla’ Mercury 2.2.0, but the Featured image didn’t shown up. I check the tag.hbs, it seems Mercury theme didn’t utilize the Featured image in tag page.

    #3987
    Bob
    Support

    I tested with the “vanilla’ Mercury 2.2.0, but the Featured image didn’t shown up. I check the tag.hbs, it seems Mercury theme didn’t utilize the Featured image in tag page.

    https://demo.getpublii.com/themes/mercury/1/tags/

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3989
    flim

    Oh I mean the Featured image of individual Tag page, not the Tags page. I want to show the Featured image just below the navbar, like the Tattoo theme.

    This snippet found in Tattoo theme’s tag.hbs, but not exists in Mercury theme, I am checking how to incorporate this in Mercury theme.

    {{#featuredImage}}
       {{#if url}}
          <figure class="hero__image">
             <img
                src="{{url}}"
                {{#if @config.site.responsiveImages}}
                   {{responsiveImageAttributes 'tagImage' srcset.tag sizes.tag}}
                {{/if}}
                {{ lazyload "eager" }}
                height="{{height}}"
                width="{{width}}"
                alt="{{alt}}">
    
             {{#checkIfAny caption credits}}
                <figcaption>
                   {{caption}}
                   {{credits}}
                </figcaption>
             {{/checkIfAny}}
          </figure>
       {{else}}
          {{#checkIfAll @config.custom.uploadHero @config.custom.displayHeroImage}}
             <figure class="hero__image">
                <img
                   src="{{@config.custom.uploadHero}}"
                   {{#if @config.site.responsiveImages}}
                      {{responsiveImageAttributes @config.custom.uploadHero}}
                   {{/if}}
                   {{ lazyload "eager" }}
                   {{imageDimensions @config.custom.uploadHero}}
                   alt="{{@config.custom.uploadHeroAlt}}">
    
                {{#if @config.custom.uploadHeroCaption}}
                   <figcaption>
                      {{@config.custom.uploadHeroCaption}}
                   </figcaption>
                {{/if}}
             </figure>
          {{/checkIfAll}}
       {{/if}}
    {{/featuredImage}}

     

    #3990
    Bob
    Support

    This snippet found in Tattoo theme’s tag.hbs, but not exists in Mercury theme

    Our existing themes have been updated to support the majority of these new features, however, do be aware that not all of these features are available on every theme; in some cases, the styling or design of the theme means that adding e.g. featured images to a tag or author page is not really possible, and this is why you can not find it on the Mercury theme.

    PS: Our support doesn’t include custom development or customization. If you need some extra features or elements in our themes, feel free to contact us via https://getpublii.com/customization-service/ page.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.