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) {
|
declare function page:header($lang as xs:string, $href-other as xs:string) {
|
||||||
<header>
|
<header>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul class="abv-brand">
|
||||||
<li><strong>{
|
<li><img class="abv-logo" src="/static/Abaev_logo.png" alt="Abaevdict logo"></img>
|
||||||
|
<strong>{
|
||||||
switch($lang)
|
switch($lang)
|
||||||
case 'ru' return 'ИЭСОЯ В. И. Абаева'
|
case 'ru' return 'ИЭСОЯ В. И. Абаева'
|
||||||
default return 'Abaevdict'
|
default return 'Abaevdict'
|
||||||
|
@ -344,7 +345,14 @@ declare %rest:path("{$lang}/dict")
|
||||||
{for $doc at $i in $page:sorted
|
{for $doc at $i in $page:sorted
|
||||||
where $i > ($p - 1) * $page:items and $i <= $p * $page:items
|
where $i > ($p - 1) * $page:items and $i <= $p * $page:items
|
||||||
let $html := doc(`abaevdict_{$lang}/html/{$doc/@xml:id}.html`)
|
let $html := doc(`abaevdict_{$lang}/html/{$doc/@xml:id}.html`)
|
||||||
return $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>
|
</main>
|
||||||
|
|
||||||
<!-- Footer for page navigation -->
|
<!-- Footer for page navigation -->
|
||||||
|
@ -356,7 +364,7 @@ declare %rest:path("{$lang}/dict")
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- <ul><li>Page {$p} of {$page:total}</li></ul> -->
|
<!-- <ul><li>Page {$p} of {$page:total}</li></ul> -->
|
||||||
<ul>
|
<ul class="abv-nextpage">
|
||||||
<li>
|
<li>
|
||||||
{if ($p < $page:total) then
|
{if ($p < $page:total) then
|
||||||
<a class="pagination__next" href="?page={$p + 1}">Next page</a> else ()}
|
<a class="pagination__next" href="?page={$p + 1}">Next page</a> else ()}
|
||||||
|
|
Loading…
Add table
Reference in a new issue