Improved document structure
This commit is contained in:
parent
54809ee8c2
commit
10b4ed63eb
1 changed files with 50 additions and 17 deletions
|
@ -53,34 +53,67 @@
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#macro arrangeDocumentParts >
|
<#macro arrangeDocumentParts >
|
||||||
<div class="articleParts" style="display:block;">
|
<div class="complexDocument articleParts" style="display:block;">
|
||||||
|
<#assign lastLevel = 0 >
|
||||||
<#list paths as order>
|
<#list paths as order>
|
||||||
<div class = "articleExcerpt">
|
|
||||||
<#-- ${order.path} -->
|
<#-- ${order.path} -->
|
||||||
<#list excerpts as excerptProperties>
|
<#list excerpts as excerptProperties>
|
||||||
<#if order.elenphExcerpt?has_content && excerptProperties.elenphExcerpt == order.elenphExcerpt>
|
<#if order.elenphExcerpt?has_content && excerptProperties.elenphExcerpt == order.elenphExcerpt>
|
||||||
<#assign excerptText = excerptProperties.htmlContent >
|
<#assign excerptText = excerptProperties.htmlContent >
|
||||||
<#assign excerptTextName = excerptProperties.htmlLabel >
|
<#assign excerptTextName = excerptProperties.htmlLabel >
|
||||||
<#assign worksCounter = excerptProperties.worksCounter >
|
<#assign worksCounter = excerptProperties.worksCounter >
|
||||||
<#assign bibliographyCounter = excerptProperties.bibliographyCounter >
|
<#assign bibliographyCounter = excerptProperties.bibliographyCounter >
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
|
<@startDocumentPart order.level?number lastLevel/>
|
||||||
<#if excerptText?? && excerptTextName?? && excerptTextName?has_content && excerptText?has_content>
|
<#if excerptText?? && excerptTextName?? && excerptTextName?has_content && excerptText?has_content>
|
||||||
<button type="button" style="border:none;padding: 18px;width: 100%; text-align:left;" class="collapsible">${excerptTextName}</button>
|
<div class="htmlExcerpt" style="list-style:none;">
|
||||||
<div class="autoExpand htmlExcerpt" style="list-style:none; display:none;">
|
${excerptText}
|
||||||
${excerptText}
|
<@arrangeSources works worksCounter?number order.elenphExcerpt />
|
||||||
<@arrangeSources works worksCounter?number order.elenphExcerpt />
|
<@arrangeLiterature bibliography bibliographyCounter?number order.elenphExcerpt />
|
||||||
<@arrangeLiterature bibliography bibliographyCounter?number order.elenphExcerpt />
|
|
||||||
</div>
|
</div>
|
||||||
</#if>
|
</#if>
|
||||||
</div>
|
<#assign lastLevel = order.level?number >
|
||||||
|
|
||||||
</#list>
|
</#list>
|
||||||
|
<@endDocumentPart lastLevel />
|
||||||
</div>
|
</div>
|
||||||
<@arrangeSources works works?size />
|
<@arrangeSources works works?size />
|
||||||
<@arrangeLiterature bibliography bibliography?size />
|
<@arrangeLiterature bibliography bibliography?size />
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
|
<#macro startDocumentPart newLevel lastLevel=0 >
|
||||||
|
<#assign depth = newLevel - lastLevel >
|
||||||
|
<#if depth == 0>
|
||||||
|
<@closeDocPart 1 />
|
||||||
|
<@openDocPart 1 />
|
||||||
|
<#elseif depth > 0>
|
||||||
|
<@openDocPart depth />
|
||||||
|
<#else >
|
||||||
|
<@closeDocPart -depth+1 />
|
||||||
|
<@openDocPart 1 />
|
||||||
|
</#if>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro endDocumentPart lastLevel newLevel=0>
|
||||||
|
<#assign depth = lastLevel - newLevel >
|
||||||
|
<#if depth > 0>
|
||||||
|
<@closeDocPart depth />
|
||||||
|
</#if>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro closeDocPart count>
|
||||||
|
<#list 1..count as x>
|
||||||
|
</div>
|
||||||
|
</#list>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro openDocPart count>
|
||||||
|
<#list 1..count as x>
|
||||||
|
<button type="button" style="border:none;padding: 18px;width: 100%; text-align:left;" class="collapsible">${excerptTextName}</button>
|
||||||
|
<div class = "documentPart autoExpand articleExcerpt" style="display:block;">
|
||||||
|
</#list>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
<#macro arrangeSources sources counter filter="none">
|
<#macro arrangeSources sources counter filter="none">
|
||||||
<#if sources?? && sources?has_content && counter > 0>
|
<#if sources?? && sources?has_content && counter > 0>
|
||||||
<button type="button" class="collapsible" style="border: none; color: #8B4513; padding: 18px;width: 100%;text-align:left; background-color: #ffffff; background-image: url(${urls.base}/themes/iph/images/book_icon.png); background-repeat: no-repeat; background-position: left center;">Источники</button>
|
<button type="button" class="collapsible" style="border: none; color: #8B4513; padding: 18px;width: 100%;text-align:left; background-color: #ffffff; background-image: url(${urls.base}/themes/iph/images/book_icon.png); background-repeat: no-repeat; background-position: left center;">Источники</button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue