Added expand button to article page
This commit is contained in:
parent
1ac49647a3
commit
82f1660b0c
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/firstName")!>
|
||||||
<#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/lastName")!>
|
<#assign skipThis = propertyGroups.pullProperty("http://xmlns.com/foaf/0.1/lastName")!>
|
||||||
</#if>
|
</#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")!>
|
<#assign issue = propertyGroups.pullProperty("https://litvinovg.pro/text_structures#issue")!>
|
||||||
<#if issue.statements?has_content && issue.type == "data">
|
<#if issue.statements?has_content && issue.type == "data">
|
||||||
|
@ -249,6 +255,25 @@ for (i = 0; i < coll.length; i++) {
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</#if>
|
</#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>
|
<#if !editable>
|
||||||
<script>
|
<script>
|
||||||
var title = $('div#titleContainer').width();
|
var title = $('div#titleContainer').width();
|
||||||
|
|
Loading…
Add table
Reference in a new issue