-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New v2.3 Simplr theme.
- Loading branch information
Showing
49 changed files
with
492 additions
and
602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<txp:if_different> | ||
<txp:variable name="custom_halftone" value="@supports(mix-blend-mode:screen){.halftone{overflow:hidden;position:relative;background:#fff;filter:contrast(25000%);transform:translateZ(0)}.halftone > *{filter:brightness(.5) blur(4px)}.halftone::after{content:'';position:absolute;z-index:1;top:-100%;left:-100%;right:-100%;bottom:-100%;background-blend-mode:multiply;background:radial-gradient(4px 4px,#0ff,#fff),radial-gradient(4px 4px,#f0f,#fff),radial-gradient(4px 4px,#ff0,#fff);background-size:4px 4px;background-position:0 -3px,-2px 0,2px 0;mix-blend-mode:screen;transform:rotate(11.25deg);pointer-events:none}}" /> | ||
<txp:variable name="halftone" value="halftone" /> | ||
<txp:variable name="device" value="mobile" /> | ||
<txp:php> | ||
global $variable; | ||
$variable['full'] = (count(explode(',', custom_field(array('name'=>'article_image')))) > 1 ? '' : ' full'); | ||
</txp:php> | ||
|
||
<txp:else /> | ||
</txp:if_different> | ||
|
||
<txp:variable name="id" value='<txp:article_id />' /> | ||
|
||
<txp:if_article_list> | ||
|
||
<txp:if_article_image><txp:php> | ||
// Get the first ID, store it into a TXP variable | ||
global $variable; | ||
$variable['first_pic'] = strtok(custom_field(array('name'=>'article_image')), ','); | ||
</txp:php> | ||
<txp:images form="images" limit="1" id='<txp:variable name="first_pic" />' break=""> | ||
<figure class="aspect-ratio"> | ||
<a href="<txp:permlink />/" title="<txp:text item="read_more" />"> | ||
<picture<txp:if_plugin name="smd_thumbnail"><txp:smd_if_thumbnail type="w_tiny27"> class="halftone" style="background:url(),url(<txp:smd_thumbnail type='w_tiny27' display='url' id='<txp:image_info type="id" />' />) center center no-repeat;background-size:100% 100%;</txp:smd_if_thumbnail></txp:if_plugin>min-height:150px;min-height:44vw"> | ||
<txp:if_plugin name="smd_thumbnail"> | ||
<img src="<txp:smd_thumbnail type='w_320' display='url' id='<txp:image_info type="id" />' form="img_sizes" />" srcset="<txp:smd_thumbnail type='w_320' id='<txp:image_info type="id" />' form="img_srcset" />, <txp:smd_thumbnail type='w_980' id='<txp:image_info type="id" />' form="img_srcset" />, <txp:smd_thumbnail type='w_1280' id='<txp:image_info type="id" />' form="img_srcset" />" sizes="(min-width: 1200px) 1140px, (min-width: 992px) 940px, (min-width: 768px) 720px, calc(100vw - 20px)" alt="<txp:image_info type='alt' />" /> | ||
<txp:else /> | ||
<img src="<txp:image_url link='0' />" width="<txp:image_info type="w" />" height="<txp:image_info type="h" />" alt="<txp:image_info type='alt' />" lazyload="on" class="no-select" /> | ||
</txp:if_plugin> | ||
</picture> | ||
</a> | ||
<figcaption> | ||
<txp:output_form form="image_count" /> <txp:image_info escape="" /> | ||
</figcaption> | ||
</figure> | ||
</txp:images> | ||
<txp:else /> | ||
<txp:variable name="device" value="mobile" /> | ||
</txp:if_article_image> | ||
|
||
<txp:output_form form="article_metas" /> | ||
|
||
<div class="excerpt"> | ||
<txp:if_excerpt> | ||
<txp:excerpt /> | ||
<txp:else /> | ||
<p><txp:output_form form="shrink_text" /></p> | ||
</txp:if_excerpt> | ||
<span class="more"><a href="<txp:permlink />/"><txp:text item="continue_reading" /> →</a></span> | ||
<txp:if_last_article><txp:else /><hr class="bg-gray" /></txp:if_last_article> | ||
</div> | ||
|
||
<txp:else /> | ||
|
||
<txp:if_article_image><div class="gallery lightbox-gallery"> | ||
<txp:output_form form="no_lightbox_images" /> | ||
</div> | ||
<txp:else /> | ||
<variable name="device" value="mobile" /> | ||
</txp:if_article_image> | ||
<txp:output_form form="article_metas" /> | ||
|
||
<div class="row mb3"> | ||
<txp:body /> | ||
</div> | ||
|
||
<txp:output_form form="post_pager" /> | ||
|
||
|
||
<txp:output_form form="comments_display" /> | ||
|
||
</txp:if_article_list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<txp:if_article_list> | ||
|
||
<txp:output_form form="article_metas" /> | ||
|
||
<div class="excerpt"> | ||
<txp:if_excerpt> | ||
<txp:excerpt /> | ||
<txp:else /> | ||
<p><txp:output_form form="shrink_text" /></p> | ||
</txp:if_excerpt> | ||
<span class="more"><a href="<txp:permlink />/"><txp:text item="continue_reading" /> →</a></span> | ||
<txp:if_last_article><txp:else /><hr class="bg-gray" /></txp:if_last_article> | ||
</div> | ||
|
||
<txp:else /> | ||
|
||
|
||
<txp:output_form form="article_metas" /> | ||
|
||
<div class="row mb3"> | ||
<txp:body /> | ||
</div> | ||
|
||
<txp:output_form form="post_pager" /> | ||
|
||
|
||
<txp:output_form form="comments_display" /> | ||
|
||
</txp:if_article_list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/*! Simple animated 'Go to Top' scroll by cara-tm.com, https://github.com/cara-tm/GoTop - MIT license. */ | ||
;(function GoTop(){"use strict";var link="gotop",D=document,_dis=Math.max(D.body.scrollHeight,D.documentElement.scrollHeight,D.body.offsetHeight,D.documentElement.offsetHeight,D.body.clientHeight,D.documentElement.clientHeight,D.body.scrollHeight),_el=document.getElementById(link);_el.className=0?"visible":"";"undefined"!=typeof _el&&null!=_el&&(window.onscroll=function(){if(1==true){_el.className=(window.pageYOffset||D.documentElement.scrollTop)+window.innerHeight>=750+0+48?"visible":"";}else{_el.className=(window.pageYOffset||D.documentElement.scrollTop)>=_dis-750-48+0?"visible":"";}},_el.onclick=function(){function a(){h=new Date().getTime()-m,b>h&&(c.scrollTop=n-n*(1-Math.cos(h/b*Math.PI))/1,e=setTimeout(function(){a()},0));}var b=500,c="BackCompat"==D.compatMode?D.body:D.documentElement;0===c.scrollTop&&(c=D.body);var e,h,i=c.scrollTop,m=new Date().getTime(),n=i;return clearTimeout(e),a(),!1;});{var _rs=_dis+48-750-0;console.log("GoTop: "+(750+48)+"px")}})();/*! External links */function targetBlank(){var b=location.host.replace("www.","");b=new RegExp(b,"i");for(var e,c=document.getElementsByTagName("a"),d=0;d<c.length;d++)e=c[d].host,b.test(e)||c[d].setAttribute("target","_blank")}targetBlank();<txp:if_variable name="device" value="mobile"><txp:else />/*! Simple tooltips by cara-tm.com, MIT license. https://github.com/cara-tm/simple-tooltips */;(function(a){'use strict';if(document.querySelectorAll&Math.max(document.documentElement.clientWidth,document.body.innerWidth||0)||680<=document.body.clientWidth){document.querySelector('html').classList.add('tooltips');for(var a=document.querySelectorAll('.tooltip'),b=0;b<a.length;b++){var c=a[b].getAttribute('title');c!=null?(a[b].setAttribute('data-tooltip',c),a[b].setAttribute('aria-haspopup','true'),a[b].setAttribute('role','link'),a[b].removeAttribute('title')):''}}})(); | ||
<txp:if_section name=""><txp:else />/*! Lightbox JS: Fullsize Image Overlays - CCA 2.5 License, by Lokesh Dhakar - http://www.huddletogether.com - Adaptations by cara-tm.com */var loadingImage='<txp:site_url />img/white-loader-min.gif',close_tooltip="Close",close_string="press <span>x</span> key to close",page_url="<txp:section url="1" />";function getPageScroll(){var a;return self.pageYOffset?a=self.pageYOffset:document.documentElement&&document.documentElement.scrollTop?a=document.documentElement.scrollTop:document.body&&(a=document.body.scrollTop),arrayPageScroll=['',a],arrayPageScroll}function getPageSize(){var a,b;window.innerHeight&&window.scrollMaxY?(a=document.body.scrollWidth,b=window.innerHeight+window.scrollMaxY):document.body.scrollHeight>document.body.offsetHeight?(a=document.body.scrollWidth,b=document.body.scrollHeight):(a=document.body.offsetWidth,b=document.body.offsetHeight);var c,d;return self.innerHeight?(c=self.innerWidth,d=self.innerHeight):document.documentElement&&document.documentElement.clientHeight?(c=document.documentElement.clientWidth,d=document.documentElement.clientHeight):document.body&&(c=document.body.clientWidth,d=document.body.clientHeight),pageHeight=b<d?d:b,pageWidth=a<c?c:a,arrayPageSize=[pageWidth,pageHeight,c,d],arrayPageSize}function pause(a){for(var b=new Date,c=b.getTime()+a;;)if(b=new Date,b.getTime()>c)return}function getKey(a){keycode=null==a?event.keyCode:a.which,key=String.fromCharCode(keycode).toLowerCase(),'x'==key&&hideLightbox()}function listenKey(){document.onkeypress=getKey}function showLightbox(a){var b=document.getElementById('overlay'),c=document.getElementById('lightbox'),d=document.getElementById('lightboxCaption'),f=document.getElementById('lightboxImage'),g=document.getElementById('loadingImage'),h=document.getElementById('lightboxDetails'),j=getPageSize(),k=getPageScroll();g&&(g.style.top=k[1]+(j[3]-35-g.height)/2+'px',g.style.left=(j[0]-20-g.width)/2+'px',g.style.display='block'),b.style.height=j[1]+'px',b.style.display='block',imgPreload=new Image,imgPreload.onload=function(){f.src=a.href;var l=k[1]+(j[3]-35-imgPreload.height)/2,m=(j[0]-20-imgPreload.width)/2,n=m;for(c.style.top=0>l?'0px':l+'px',c.style.left=0>m?'0px':m+'px',c.style.right=0>n?'0px':n+'px',a.getAttribute('data-title')?(d.style.display='block',d.innerHTML=a.getAttribute('data-title')):d.style.display='none',-1!=navigator.appVersion.indexOf('MSIE')&&pause(250),g&&(g.style.display='none'),selects=document.getElementsByTagName('select'),i=0;i!=selects.length;i++)selects[i].style.visibility='hidden';return c.style.display='block',j=getPageSize(),b.style.height=j[1]+'px',listenKey(),!1},imgPreload.src=a.href}function removeClass(a,b){var c=new RegExp('(\\s|^)'+b+'(\\s|$)');a.className=a.className.replace(c,' ')}function hideLightbox(){for(objOverlay=document.getElementById('overlay'),objLightbox=document.getElementById('lightbox'),objOverlay.style.display='none',objLightbox.style.display='none',selects=document.getElementsByTagName('select'),i=0;i!=selects.length;i++)selects[i].style.visibility='visible';document.onkeypress='';removeClass(document.getElementsByTagName('html')[0],'lightboxOn')}function initLightbox(){if(document.getElementsByTagName){for(var c,a=document.getElementsByTagName('a'),b=0;b<a.length;b++)c=a[b],c.getAttribute('href')&&'lightbox'==c.getAttribute('data-box')&&(c.onclick=function(){document.getElementsByTagName('html')[0].className+=' lightboxOn';return showLightbox(this),!1});var d=document.getElementsByTagName('body').item(0),f=document.createElement('div');f.setAttribute('id','overlay'),f.onclick=function(){return hideLightbox(),!1},f.style.display='none',f.style.position='absolute',f.style.top='0',f.style.left='0',f.style.zIndex='90',f.style.width='100%',d.insertBefore(f,d.firstChild);var g=getPageSize(),h=getPageScroll(),j=new Image;j.onload=function(){var r=document.createElement('a');r.setAttribute('href','#'),r.onclick=function(){return hideLightbox(),!1},f.appendChild(r);var s=document.createElement('img');return s.src=loadingImage,s.setAttribute('id','loadingImage'),s.style.position='absolute',s.style.zIndex='150',r.appendChild(s),j.onload=function(){},!1},j.src=loadingImage;var k=document.createElement('div');k.setAttribute('id','lightbox'),k.style.display='none',k.style.position='absolute',k.style.position='absolute',k.style.zIndex='100',d.insertBefore(k,f.nextSibling);var l=document.createElement('a'),r=document.createElement('span');l.setAttribute('href','#'),l.setAttribute('title',close_tooltip),r.innerHTML='×',r.setAttribute('id','closeButton'),l.appendChild(r);l.onclick=function(){return hideLightbox(),!1},k.appendChild(l);var n=document.createElement('img');n.setAttribute('id','lightboxImage'),l.appendChild(n);var o=document.createElement('div');o.setAttribute('id','lightboxDetails'),k.appendChild(o);var p=document.createElement('div');p.setAttribute('id','lightboxCaption'),p.style.display='none',o.appendChild(p);var q=document.createElement('div');q.setAttribute('id','keyboardMsg'),q.innerHTML=close_string,o.appendChild(q)}}function addLoadEvent(a){var b=window.onload;window.onload='function'==typeof window.onload?function(){b(),a()}:a}addLoadEvent(initLightbox);</txp:if_section>/*! Simple Scrollbar v0.1.0 - https://github.com/buzinas/simple-scrollbar - MIT license */ | ||
(function(n,t){function u(n){n.hasOwnProperty("data-simple-scrollbar")||Object.defineProperty(n,"data-simple-scrollbar",new SimpleScrollbar(n))}function e(n,i){function f(n){var t=n.pageY-u;u=n.pageY;r(function(){i.el.scrollTop+=t/i.scrollRatio})}function e(){n.classList.remove("ss-grabbed");t.body.classList.remove("ss-grabbed");t.removeEventListener("mousemove",f);t.removeEventListener("mouseup",e)}var u;n.addEventListener("mousedown",function(i){return u=i.pageY,n.classList.add("ss-grabbed"),t.body.classList.add("ss-grabbed"),t.addEventListener("mousemove",f),t.addEventListener("mouseup",e),!1})}function i(n){for(this.target=n,this.bar='<div class="ss-scroll">',this.wrapper=t.createElement("div"),this.wrapper.setAttribute("class","ss-wrapper"),this.el=t.createElement("div"),this.el.setAttribute("class","ss-content"),this.wrapper.appendChild(this.el);this.target.firstChild;)this.el.appendChild(this.target.firstChild);this.target.appendChild(this.wrapper);this.target.insertAdjacentHTML("beforeend",this.bar);this.bar=this.target.lastChild;e(this.bar,this);this.moveBar();this.el.addEventListener("scroll",this.moveBar.bind(this));this.el.addEventListener("mouseenter",this.moveBar.bind(this));this.target.classList.add("ss-container")}function f(){for(var i=t.querySelectorAll("*[ss-container]"),n=0;n<i.length;n++)u(i[n])}var r=n.requestAnimationFrame||n.setImmediate||function(n){return setTimeout(n,0)};i.prototype={moveBar:function(){var t=this.el.scrollHeight,i=this.el.clientHeight,n=this;this.scrollRatio=i/t;r(function(){n.bar.style.cssText="height:"+i/t*100+"%; top:"+n.el.scrollTop/t*100+"%;right:-"+(n.target.clientWidth-n.bar.clientWidth-20)+"px;"})}};t.addEventListener("DOMContentLoaded",f);i.initEl=u;i.initAll=f;n.SimpleScrollbar=i})(window,document);<txp:php> | ||
// Init: Do not load Simple Scrollbar for ltr languages | ||
if(text(array('item'=>'lang_dir'))=='ltr'){ | ||
echo "var bar=document.querySelector('.aside');SimpleScrollbar.initEl(bar);"; | ||
} | ||
</txp:php></txp:if_variable> |
Oops, something went wrong.