Sign in

Exploring Theme Code – Simple Theme

  • This topic has 2 replies, 2 voices, and was last updated 6 months, 3 weeks ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #9546
    Avatar photobjazmoore

    I am looking at head.hbs in the theme Simple.  There is a couple sections that I am trying to wrap my head around.  Lines 31-45 look like this:

           {{#is "post"}}
                  {{#if hasGallery}}
                     <link rel="stylesheet" href="{{css "photoswipe.css" }}">
            {{#checkIf @config.custom.frontSource '==' "post" }}
               {{#checkIf @config.custom.frontGallery '==' true}}
                  {{#is "index"}}
                     <link rel="stylesheet" href="{{css "photoswipe.css" }}">

    I understand that if this is a “post” and it “hasGallery” it will load the photoswipe.css file.

    Why is the next section of code not redundant?  Can the content not be a post but have a custom front font source that equal to post?  How?  I do not see anything in the settings for this theme that would allow me to select the “post” font as a source for the front font.

    What am I missing?

    The same source code does almost the same thing in lines 48-89 (not shown) for loading light and dark icon sets when the Gallery is present.


    Avatar photoitips3727

    The way I understand this code, using your extract line number references above:

    lines 1 to 7 check if any post has an image gallery, if yes, then the photoswipe.css applies to display the gallery. If not, it’s ignored.

    Lines 8 to 14 probably relates to the front source / front page / home page, whatever you want to call it. The code then checks for any post on the home page (or the home page may just be a single post), if that post has a ‘front gallery’, then likewise, photoswipe.css also determines how the gallery displays.

    I don’t think there are any references to font sources.

    Though, I may be wrong (we’re all striving to learn here aren’t we? 🙂

    Avatar photoitips3727

    Also, the page at: seems to help.

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