inject map link html
This commit is contained in:
parent
04f2106615
commit
d19a835055
1 changed files with 13 additions and 5 deletions
|
@ -40,8 +40,9 @@ declare function page:head($title as xs:string, $script as node()* := ()) {
|
|||
declare function page:header($lang as xs:string, $href-other as xs:string) {
|
||||
<header>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><strong>{
|
||||
<ul class="abv-brand">
|
||||
<li><img class="abv-logo" src="/static/Abaev_logo.png" alt="Abaevdict logo"></img>
|
||||
<strong>{
|
||||
switch($lang)
|
||||
case 'ru' return 'ИЭСОЯ В. И. Абаева'
|
||||
default return 'Abaevdict'
|
||||
|
@ -343,8 +344,15 @@ declare %rest:path("{$lang}/dict")
|
|||
<main>
|
||||
{for $doc at $i in $page:sorted
|
||||
where $i > ($p - 1) * $page:items and $i <= $p * $page:items
|
||||
let $html := doc(`abaevdict_{$lang}/html/{$doc/@xml:id}.html`)
|
||||
return $html}
|
||||
let $html := doc(`abaevdict_{$lang}/html/{$doc/@xml:id}.html`)
|
||||
return if (doc('abaevdict_index/mentioned_en.xml')/
|
||||
lang-index/lang/word/entry[@id=string($doc/@xml:id)]) then
|
||||
$html transform with {insert nodes (<br/>,
|
||||
<a class="abv-map" data-abv-entry="{$doc/@xml:id}">
|
||||
<img src="/static/map.png"></img></a>) as last
|
||||
into ./article[1]/h6[1]}
|
||||
else $html
|
||||
}
|
||||
</main>
|
||||
|
||||
<!-- Footer for page navigation -->
|
||||
|
@ -356,7 +364,7 @@ declare %rest:path("{$lang}/dict")
|
|||
</li>
|
||||
</ul>
|
||||
<!-- <ul><li>Page {$p} of {$page:total}</li></ul> -->
|
||||
<ul>
|
||||
<ul class="abv-nextpage">
|
||||
<li>
|
||||
{if ($p < $page:total) then
|
||||
<a class="pagination__next" href="?page={$p + 1}">Next page</a> else ()}
|
||||
|
|
Loading…
Add table
Reference in a new issue