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