Adding pomenska shema and definicija
Plus some formatting
This commit is contained in:
parent
52f7858d8a
commit
85f8511cec
110
view.xsl
110
view.xsl
|
@ -37,8 +37,10 @@
|
|||
:root {
|
||||
--light-gray: #999999;
|
||||
--dark-gray: #666666;
|
||||
--dark-dark-gray: #444444;
|
||||
--light-red: #dd8899;
|
||||
--dark-red:#cc3366
|
||||
--dark-red: #cc3366;
|
||||
--dark-blue: #00008b;
|
||||
}
|
||||
|
||||
.xslt-clanek {
|
||||
|
@ -61,15 +63,11 @@
|
|||
margin-top: 0.5em;
|
||||
}
|
||||
.xslt-pomen-number {
|
||||
float: left;
|
||||
margin-left: 0.5em;
|
||||
color: var(--light-gray);
|
||||
font-weight: bold;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
.xslt-indicator {
|
||||
color: var(--light-gray);
|
||||
font-style: italic;
|
||||
text-transform: uppercase;
|
||||
color: var(--dark-dark-gray);
|
||||
font-weight: bold;
|
||||
}
|
||||
.xslt-zgledi {
|
||||
list-style-type: circle;
|
||||
|
@ -78,21 +76,48 @@
|
|||
color: var(--dark-gray);
|
||||
margin: 0.5em 0;"
|
||||
}
|
||||
.xslt-zgled-highlight {
|
||||
.xslt-zgled-highlight-k {
|
||||
font-weight: bold;
|
||||
}
|
||||
.xslt-zgled-highlight-i {
|
||||
color: var(--light-red);
|
||||
}
|
||||
.xslt-morelessbutton-div {
|
||||
padding-left: 2em;
|
||||
display: inline;
|
||||
}
|
||||
.xslt-morelessbutton-div:after {
|
||||
content: ' ';
|
||||
display: block;
|
||||
}
|
||||
.xslt-podpomen {
|
||||
margin: 0.5em 0.5em;
|
||||
margin: 0.5em 2em;
|
||||
}
|
||||
.xslt-number {
|
||||
float: left;
|
||||
color: var(--dark-gray);
|
||||
font-weight: bold;
|
||||
}
|
||||
.xslt-kolokacija-head {
|
||||
color: var(--dark-red);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.xslt-oznaka {
|
||||
color: var(--dark-blue);
|
||||
}
|
||||
.xslt-def-head {
|
||||
color: var(--dark-gray);
|
||||
}
|
||||
.xslt-def-head:before {
|
||||
content: ' ';
|
||||
display: block;
|
||||
}
|
||||
.xslt-def-head:after {
|
||||
content: ': ';
|
||||
}
|
||||
.xslt-def-body {
|
||||
color: var(--light-gray);
|
||||
}
|
||||
.xslt-clear {
|
||||
clear:both;
|
||||
font-size:0;
|
||||
|
@ -105,15 +130,29 @@
|
|||
******************************** -->
|
||||
|
||||
<xsl:template name="pomen_podpomen_logic">
|
||||
<xsl:apply-templates select="indikator | oznaka | pomenska_shema"/>
|
||||
<xsl:apply-templates select="indikator | oznaka"/>
|
||||
<div class="xslt-morelessbutton-div">
|
||||
<a class="morelessbutton" href="javascript:void(null)"></a>
|
||||
</div>
|
||||
<xsl:apply-templates select="pomenska_shema | definicija1 | definicija2"/>
|
||||
<div class="hideable" style="display: none; ">
|
||||
<xsl:apply-templates select="skladenjske_skupine"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ********************************
|
||||
Pomenska shema/definicija template
|
||||
******************************** -->
|
||||
<xsl:template name="definicija_pomenska_shema">
|
||||
<xsl:param name="left_side"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="text() != ''">
|
||||
<span class="xslt-def-head"><xsl:value-of select="$left_side"/></span>
|
||||
<span class="xslt-def-body"><xsl:apply-templates/></span>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ********************************
|
||||
Here are all of xslt rules
|
||||
Please dont polute xslt with it
|
||||
|
@ -121,8 +160,7 @@
|
|||
|
||||
<!-- Tags to skip -->
|
||||
|
||||
<xsl:template match="zapis | korpusi | korpus | frek_lemma | opombe |
|
||||
pomenska_shema | definicija1 | definicija2 | struktura"/>
|
||||
<xsl:template match="zapis | korpusi | korpus | frek_lemma | opombe | struktura"/>
|
||||
|
||||
<!-- Tags to convert to insert space before -->
|
||||
|
||||
|
@ -168,7 +206,7 @@
|
|||
|
||||
<xsl:template match="pomen">
|
||||
<div class="xslt-pomen-top">
|
||||
<div class="xslt-pomen-number">
|
||||
<div class="xslt-pomen-number xslt-number">
|
||||
<xsl:number />
|
||||
</div>
|
||||
<div style="margin-left: 2em;">
|
||||
|
@ -184,9 +222,13 @@
|
|||
<xsl:number count="pomen" level="any"/>
|
||||
</xsl:variable>
|
||||
|
||||
<div class="xslt-podpomen">
|
||||
<xsl:value-of select="$pomenNum"/>.<xsl:number/>
|
||||
<xsl:call-template name="pomen_podpomen_logic"/>
|
||||
<div> <!-- without this div, number and rest is not aligned vertically... -->
|
||||
<div class="xslt-number">
|
||||
<xsl:value-of select="$pomenNum"/>.<xsl:number/>
|
||||
</div>
|
||||
<div class="xslt-podpomen">
|
||||
<xsl:call-template name="pomen_podpomen_logic"/>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -216,7 +258,7 @@
|
|||
<xsl:text xml:space="preserve">, </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="indikator | oznaka">
|
||||
<xsl:template match="pomen/indikator | podpomen/indikator | indikator/oznaka">
|
||||
<xsl:text xml:space="preserve"> </xsl:text>
|
||||
<span class="xslt-indicator">
|
||||
<xsl:apply-templates/>
|
||||
|
@ -224,7 +266,35 @@
|
|||
<xsl:text xml:space="preserve"> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="zgledi">
|
||||
<!-- oznaka outside of indikator mark differently -->
|
||||
<xsl:template match="pomen/oznaka | podpomen/oznaka">
|
||||
<span class="xslt-oznaka"><xsl:apply-templates/></span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Three simmilar rules -->
|
||||
<xsl:template match="definicija1">
|
||||
<xsl:variable name="left_side">Definicija 1</xsl:variable>
|
||||
<xsl:call-template name="definicija_pomenska_shema">
|
||||
<xsl:with-param name="left_side" select="$left_side"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="definicija2">
|
||||
<xsl:variable name="left_side">Definicija 2</xsl:variable>
|
||||
<xsl:call-template name="definicija_pomenska_shema">
|
||||
<xsl:with-param name="left_side" select="$left_side"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="pomenska_shema">
|
||||
<xsl:variable name="left_side">Pomenska shema</xsl:variable>
|
||||
<xsl:call-template name="definicija_pomenska_shema">
|
||||
<xsl:with-param name="left_side" select="$left_side"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<!-- zgledi stuff -->
|
||||
<xsl:template match="zgledi">
|
||||
<ul class="xslt-zgledi" >
|
||||
<xsl:apply-templates/>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue
Block a user