forked from abaevdict/abaev-basex
Compare commits
2 commits
ac9d112c13
...
9151b9eb32
Author | SHA1 | Date | |
---|---|---|---|
|
9151b9eb32 | ||
|
0e7fb74acf |
4 changed files with 72 additions and 21 deletions
|
@ -68,6 +68,10 @@ body > header {
|
|||
body>main {
|
||||
max-width:950px
|
||||
}
|
||||
article.abv-entry {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(10%,15%) minmax(0,5%) minmax(75%,90%);
|
||||
}
|
||||
}
|
||||
@media (min-width:1280px) {
|
||||
body>footer>nav,
|
||||
|
@ -131,11 +135,6 @@ main {
|
|||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
article.abv-entry {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0px,15%) 5% minmax(50%,80%);
|
||||
}
|
||||
|
||||
section {}
|
||||
|
||||
aside#leftbar {
|
||||
|
@ -404,6 +403,10 @@ div.index-submit {
|
|||
float: right;
|
||||
}
|
||||
|
||||
div.notes {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
optgroup {}
|
||||
option {}
|
||||
option:checked {}
|
||||
|
@ -422,7 +425,6 @@ button#open-leftbar{
|
|||
left: 0;
|
||||
/*height: 1ex;*/
|
||||
/*line-height: 1ex;*/
|
||||
/*width: 1em;*/
|
||||
}
|
||||
|
||||
button#close-leftbar{
|
||||
|
@ -432,6 +434,23 @@ button#close-leftbar{
|
|||
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
|
||||
interacted with. Note that:
|
||||
1) You may need to add the `interacted` class to forms yourself
|
||||
|
@ -521,6 +540,9 @@ span.abv-text-ul {
|
|||
span.abv-text-sc {
|
||||
font-variant-caps: small-caps;
|
||||
}
|
||||
span.abv-name {
|
||||
font-variant-caps: small-caps;
|
||||
}
|
||||
|
||||
/*
|
||||
This file evolved from Natural Selection:
|
||||
|
|
|
@ -17,6 +17,7 @@ declare %rest:path("{$lang}/entries/{$id}")
|
|||
function entries:entry($lang as xs:string, $id as xs:string, $query as xs:string?) {
|
||||
if (count($query) = 0) then
|
||||
doc(`abaevdict_{$lang}/html/{$id}.html`)
|
||||
(: abv-m:make-html(doc(`abaevdict_{$lang}/xml/{$id}.xml`),$lang) :)
|
||||
else
|
||||
let $xml := doc(`abaevdict_{$lang}/xml/{$id}.xml`)/tei:entry[1]
|
||||
let $marked := ft:mark(
|
||||
|
|
|
@ -3,10 +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';
|
||||
|
||||
let $mapdata := abv-m:make-geomap(
|
||||
doc(`abaevdict_en/xml/entry_mad.xml`),
|
||||
'en')
|
||||
return json:serialize($mapdata)
|
||||
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'] :)
|
||||
(: html:doc('abaevdict_en/html/entry_az.html') :)
|
||||
|
|
|
@ -87,12 +87,24 @@
|
|||
group-adjacent="not(self::tei:etym)">
|
||||
<xsl:choose>
|
||||
<xsl:when test="current-grouping-key()">
|
||||
<p class="abv-mainpart">
|
||||
<div class="abv-mainpart">
|
||||
<p>
|
||||
<xsl:apply-templates select="current-group()"/>
|
||||
</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div class="abv-etym">
|
||||
<xsl:for-each-group select="node()"
|
||||
group-starting-with="tei:lb">
|
||||
<p>
|
||||
<xsl:apply-templates select="current-group()"/>
|
||||
</p>
|
||||
</xsl:for-each-group>
|
||||
</div>
|
||||
<div class="notes">
|
||||
<xsl:apply-templates select="//tei:note[@type='footnote']" mode="footnote"/>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each-group>
|
||||
|
@ -122,7 +134,7 @@
|
|||
<xsl:template match="tei:form/tei:orth">
|
||||
<xsl:variable name="elem">
|
||||
<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:choose>
|
||||
</xsl:variable>
|
||||
|
@ -260,9 +272,7 @@
|
|||
|
||||
<!-- ETYMOLOGY -->
|
||||
<xsl:template match="tei:etym">
|
||||
<p class="abv-etym">
|
||||
<xsl:apply-templates />
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tei:oRef">
|
||||
|
@ -284,7 +294,6 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="tei:lb">
|
||||
<xsl:element name="br"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tei:hi">
|
||||
|
@ -329,8 +338,27 @@
|
|||
</td>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match=
|
||||
"text()">
|
||||
<!-- Footnotes -->
|
||||
<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:template>
|
||||
</xsl:stylesheet>
|
Loading…
Add table
Add a link
Reference in a new issue