Added expand button to article page
This commit is contained in:
parent
07626aec70
commit
d49f9382f4
1 changed files with 25 additions and 0 deletions
|
@ -92,6 +92,12 @@ ${scripts.add('<script async type="text/javascript" src="//cdn.plu.mx/widget-pop
|
|||
<#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/firstName")!>
|
||||
<#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/lastName")!>
|
||||
</#if>
|
||||
<div class="expandSwitch">
|
||||
<label class="switch">Раскрыть статью
|
||||
<input id="expandlCB" type="checkbox" checked="false" onclick="switchExpand();">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<#--
|
||||
<#assign issue = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#issue")!>
|
||||
<#if issue.statements?has_content && issue.type == "data">
|
||||
|
@ -249,6 +255,25 @@ for (i = 0; i < coll.length; i++) {
|
|||
</a>
|
||||
</span>
|
||||
</#if>
|
||||
|
||||
<script>
|
||||
console.log(localStorage.getItem('switchExpand'));
|
||||
if (localStorage.getItem('switchExpand') === true || localStorage.getItem('switchExpand') === 'true') {
|
||||
console.log("show html excerpts");
|
||||
$('.htmlExcerpt').show();
|
||||
}
|
||||
function switchExpand(){
|
||||
var checkBox = document.getElementById("expandlCB");
|
||||
if (checkBox.checked == true){
|
||||
$('.htmlExcerpt').show();
|
||||
localStorage.setItem('switchExpand',true);
|
||||
} else {
|
||||
$('.htmlExcerpt').hide();
|
||||
localStorage.setItem('switchExpand',false);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<#if !editable>
|
||||
<script>
|
||||
var title = $('div#titleContainer').width();
|
||||
|
|
Loading…
Add table
Reference in a new issue