forked from abaevdict/abaev-basex
handle footnotes correctly, hide internal notes
This commit is contained in:
parent
0e7fb74acf
commit
9151b9eb32
4 changed files with 59 additions and 12 deletions
|
@ -68,6 +68,10 @@ body > header {
|
||||||
body>main {
|
body>main {
|
||||||
max-width:950px
|
max-width:950px
|
||||||
}
|
}
|
||||||
|
article.abv-entry {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(10%,15%) minmax(0,5%) minmax(75%,90%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media (min-width:1280px) {
|
@media (min-width:1280px) {
|
||||||
body>footer>nav,
|
body>footer>nav,
|
||||||
|
@ -131,11 +135,6 @@ main {
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
article.abv-entry {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: minmax(0px,15%) 5% minmax(50%,80%);
|
|
||||||
}
|
|
||||||
|
|
||||||
section {}
|
section {}
|
||||||
|
|
||||||
aside#leftbar {
|
aside#leftbar {
|
||||||
|
@ -404,6 +403,10 @@ div.index-submit {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.notes {
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
optgroup {}
|
optgroup {}
|
||||||
option {}
|
option {}
|
||||||
option:checked {}
|
option:checked {}
|
||||||
|
@ -422,7 +425,6 @@ button#open-leftbar{
|
||||||
left: 0;
|
left: 0;
|
||||||
/*height: 1ex;*/
|
/*height: 1ex;*/
|
||||||
/*line-height: 1ex;*/
|
/*line-height: 1ex;*/
|
||||||
/*width: 1em;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button#close-leftbar{
|
button#close-leftbar{
|
||||||
|
@ -432,6 +434,23 @@ button#close-leftbar{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
button#open-leftbar {
|
||||||
|
width: 1em;
|
||||||
|
height: 10ex;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
button#close-leftbar {
|
||||||
|
width: 1em;
|
||||||
|
height: 10ex;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* This matches forms or form elements that are invalid *and* have been
|
/* This matches forms or form elements that are invalid *and* have been
|
||||||
interacted with. Note that:
|
interacted with. Note that:
|
||||||
1) You may need to add the `interacted` class to forms yourself
|
1) You may need to add the `interacted` class to forms yourself
|
||||||
|
@ -521,6 +540,9 @@ span.abv-text-ul {
|
||||||
span.abv-text-sc {
|
span.abv-text-sc {
|
||||||
font-variant-caps: small-caps;
|
font-variant-caps: small-caps;
|
||||||
}
|
}
|
||||||
|
span.abv-name {
|
||||||
|
font-variant-caps: small-caps;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This file evolved from Natural Selection:
|
This file evolved from Natural Selection:
|
||||||
|
|
|
@ -16,8 +16,8 @@ declare %rest:path("{$lang}/entries/{$id}")
|
||||||
%output:html-version('5')
|
%output:html-version('5')
|
||||||
function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) {
|
function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) {
|
||||||
if (count($query) = 0) then
|
if (count($query) = 0) then
|
||||||
(: doc(`abaevdict_{$lang}/html/{$id}.html`) :)
|
doc(`abaevdict_{$lang}/html/{$id}.html`)
|
||||||
abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang)
|
(: abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang) :)
|
||||||
else
|
else
|
||||||
let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1]
|
let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1]
|
||||||
let $marked := ft:mark(
|
let $marked := ft:mark(
|
||||||
|
|
|
@ -3,7 +3,10 @@ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
|
||||||
|
|
||||||
import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
|
import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
|
||||||
|
|
||||||
abv-m:make-html(doc('abaevdict_en/xml/entry_a.xml'),'en')
|
abv-m:make-html(doc('abaevdict_en/xml/entry_abūzyn.xml'),'en')
|
||||||
|
|
||||||
|
(: for $node in collection('abaevdict')//tei:ref/@target[.='#ref_Walde—Pok.']
|
||||||
|
return replace value of node $node with '#ref_Walde-Pok.' :)
|
||||||
|
|
||||||
(: collection(`abaevdict_en/html`)/article[@id='entry_az'] :)
|
(: collection(`abaevdict_en/html`)/article[@id='entry_az'] :)
|
||||||
(: html:doc('abaevdict_en/html/entry_az.html') :)
|
(: html:doc('abaevdict_en/html/entry_az.html') :)
|
||||||
|
|
|
@ -102,6 +102,9 @@
|
||||||
</p>
|
</p>
|
||||||
</xsl:for-each-group>
|
</xsl:for-each-group>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="notes">
|
||||||
|
<xsl:apply-templates select="//tei:note[@type='footnote']" mode="footnote"/>
|
||||||
|
</div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:for-each-group>
|
</xsl:for-each-group>
|
||||||
|
@ -131,7 +134,7 @@
|
||||||
<xsl:template match="tei:form/tei:orth">
|
<xsl:template match="tei:form/tei:orth">
|
||||||
<xsl:variable name="elem">
|
<xsl:variable name="elem">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="ancestor::tei:cit[@type='formGrp']">i</xsl:when>
|
<xsl:when test="ancestor::tei:cit[@type='formGrp'] or ancestor::tei:re">i</xsl:when>
|
||||||
<xsl:otherwise>b</xsl:otherwise>
|
<xsl:otherwise>b</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
@ -335,8 +338,27 @@
|
||||||
</td>
|
</td>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match=
|
<!-- Footnotes -->
|
||||||
"text()">
|
<xsl:template match="tei:note[@type='footnote']">
|
||||||
|
<xsl:variable name="no"><xsl:number level="single"/></xsl:variable>
|
||||||
|
<a id="fn_{/tei:entry/@xml:id}_{$no}" href="#fntxt_{/tei:entry/@xml:id}_{$no}"><sup><xsl:value-of select="$no"/></sup></a>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="tei:note[@type='footnote']" mode='footnote'>
|
||||||
|
<xsl:variable name="no"><xsl:number level="single"/></xsl:variable>
|
||||||
|
<p>
|
||||||
|
<a id="fntxt_{/tei:entry/@xml:id}_{$no}" href="#fn_{/tei:entry/@xml:id}_{$no}"><sup><xsl:value-of select="$no"/></sup></a>
|
||||||
|
<xsl:apply-templates />
|
||||||
|
</p>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Remove internal notes -->
|
||||||
|
<xsl:template match="tei:note[@type='internal']">
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- get rid of new lines -->
|
||||||
|
|
||||||
|
<xsl:template match="text()">
|
||||||
<xsl:value-of select="replace(translate(., '
', ''), ' +', ' ')"/>
|
<xsl:value-of select="replace(translate(., '
', ''), ' +', ' ')"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
Loading…
Add table
Reference in a new issue