Timeline Theme - added images to static pages

Static pages now use the same method of image assignment as entries.
This commit is contained in:
DonChambers 2019-03-16 13:48:54 -05:00
parent 6c699f2ce5
commit eafb79546d
4 changed files with 28 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: Timeline
Author: Don Chambers
Date: 2018-09-06
Date: 2019-03-16
Require Serendipity: 2.0
Backend: No
Recommended: Yes

View File

@ -33,6 +33,15 @@
{/foreach}
</ul>
</nav>
{/if}
{* CUSTOM TO THIS THEME - CUSTOM STATICPAGE IMAGE *}
{if $staticpage_custom.staticpage_image}
{if $staticpage_custom.staticpage_image|is_in_string:'<iframe,<embed,<object'}{* we assume this is a video, just emit the contents of the var *}
{$staticpage_custom.staticpage_image}
{else}
{serendipity_getImageSize file=$staticpage_custom.staticpage_image assign="img_size"}
<img class="{if $img_size[0]>=800}image-full-width{else}serendipity_image_left{/if}" src="{$staticpage_custom.staticpage_image}" width="{$img_size[0]}" height="{$img_size[1]}" alt=""/>
{/if}
{/if}
{if $staticpage_content}
<div class="{if $staticpage_articleformat}serendipity_entry_body clearfix{else}staticpage_content{/if}">

View File

@ -34,6 +34,15 @@
{$staticpage_precontent}
</div>
{/if}
{* CUSTOM TO THIS THEME - CUSTOM STATICPAGE IMAGE *}
{if $staticpage_custom.staticpage_image}
{if $staticpage_custom.staticpage_image|is_in_string:'<iframe,<embed,<object'}{* we assume this is a video, just emit the contents of the var *}
{$staticpage_custom.staticpage_image}
{else}
{serendipity_getImageSize file=$staticpage_custom.staticpage_image assign="img_size"}
<img class="{if $img_size[0]>=800}image-full-width{else}serendipity_image_left{/if}" src="{$staticpage_custom.staticpage_image}" width="{$img_size[0]}" height="{$img_size[1]}" alt=""/>
{/if}
{/if}
</section>
{/if}
{if $staticpage_navigation && $staticpage_shownavi && ($staticpage_navigation.prev.link || $staticpage_navigation.next.link)}

View File

@ -34,6 +34,15 @@
</ul>
</nav>
{/if}
{* CUSTOM TO THIS THEME - CUSTOM STATICPAGE IMAGE *}
{if $staticpage_custom.staticpage_image}
{if $staticpage_custom.staticpage_image|is_in_string:'<iframe,<embed,<object'}{* we assume this is a video, just emit the contents of the var *}
{$staticpage_custom.staticpage_image}
{else}
{serendipity_getImageSize file=$staticpage_custom.staticpage_image assign="img_size"}
<img class="{if $img_size[0]>=800}image-full-width{else}serendipity_image_left{/if}" src="{$staticpage_custom.staticpage_image}" width="{$img_size[0]}" height="{$img_size[1]}" alt=""/>
{/if}
{/if}
{if $staticpage_content}
<div class="{if $staticpage_articleformat}serendipity_entry_body clearfix{else}staticpage_content{/if}">
{$staticpage_content}