Skip to content

Commit

Permalink
[página artigo v2.0] Corrige links do menu esquerdo (#615)
Browse files Browse the repository at this point in the history
* Corrige a âncora do menu Parecer

* Adiciona comentários para manter pareado os atributos class='articleSection' e data-anchor='título da seção no menu esquerdo' para que os links funcionem bem e completa fn (edited-by e data-availability)
  • Loading branch information
robertatakenaka authored May 16, 2024
1 parent ce98be3 commit 2015516
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@

<xsl:template match="article" mode="create-anchor-and-title-for-abstracts-without-title-div-h-number">
<xsl:param name="title"/>
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<div class="articleSection" data-anchor="{$title}">
<h1 class="articleSectionTitle"><xsl:value-of select="$title"/></h1>
</div>
Expand Down Expand Up @@ -191,6 +192,7 @@
<!-- Apresenta a âncora e o título, ou seja, Abstract, Resumo, ou Resumen -->

<!-- âncora -->
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<xsl:attribute name="class">articleSection</xsl:attribute>
<xsl:attribute name="data-anchor"><xsl:apply-templates select="." mode="title"/></xsl:attribute>
<xsl:if test="@xml:lang='ar'">
Expand Down
6 changes: 5 additions & 1 deletion packtools/catalogs/htmlgenerator/v2.0/article-text-back.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@

<xsl:template match="*" mode="back-section-menu">
<xsl:if test="title or label">
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<xsl:attribute name="class">articleSection</xsl:attribute>
<xsl:attribute name="data-anchor">
<xsl:apply-templates select="label"/>
<xsl:if test="label and title">&#160;</xsl:if>
Expand All @@ -97,6 +99,8 @@
<xsl:variable name="name" select="name()"/>
<!-- cria menu somente para o primeiro ref-list (há casos de série de ref-list) -->
<xsl:if test="not(preceding-sibling::node()) or preceding-sibling::*[1][name()!=$name]">
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<xsl:attribute name="class">articleSection</xsl:attribute>
<xsl:attribute name="data-anchor">
<xsl:apply-templates select="." mode="text-labels">
<xsl:with-param name="text">ref-list</xsl:with-param>
Expand All @@ -116,7 +120,7 @@
</xsl:template>

<xsl:template match="*" mode="back-section">
<div class="articleSection">
<div>
<xsl:apply-templates select="." mode="back-section-menu"/>
<xsl:apply-templates select="." mode="back-section-h"/>
<xsl:apply-templates select="." mode="back-section-content"/>
Expand Down
2 changes: 2 additions & 0 deletions packtools/catalogs/htmlgenerator/v2.0/article-text-fn.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
Evita que no menu apareça o mesmo título mais de uma vez
-->
<xsl:if test="not(preceding-sibling::node()) or preceding-sibling::*[1][not(@fn-type)] or preceding-sibling::*[1][@fn-type!=$name]">
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<xsl:attribute name="class">articleSection</xsl:attribute>
<xsl:attribute name="data-anchor">
<xsl:apply-templates select="." mode="text-labels">
<xsl:with-param name="text"><xsl:value-of select="@fn-type"/></xsl:with-param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<xsl:with-param name="text">Data availability</xsl:with-param>
</xsl:apply-templates>
</xsl:variable>
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<div class="articleSection">
<xsl:attribute name="data-anchor"><xsl:value-of select="$title"/></xsl:attribute>
<h1 class="articleSectionTitle"><xsl:value-of select="$title"/></h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@

<xsl:template match="title-group" mode="sub-article-not-translation-component">
<!-- Apresentação padrão de um compontente do Bloco do sub-article (not translation) ou response -->
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<div class="articleSection">
<xsl:attribute name="data-anchor">
<xsl:apply-templates select=".//article-title"/>
Expand Down
1 change: 1 addition & 0 deletions packtools/catalogs/htmlgenerator/v2.0/article-text.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<xsl:param name="alt_title"></xsl:param>
<div>
<xsl:if test="$alt_title!=''">
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<xsl:attribute name="class">articleSection</xsl:attribute>
<xsl:attribute name="data-anchor"><xsl:value-of select="$alt_title"/></xsl:attribute>
</xsl:if>
Expand Down
1 change: 1 addition & 0 deletions packtools/catalogs/htmlgenerator/v2.0/generic-history.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</xsl:template>

<xsl:template match="history" mode="history-section">
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<div class="articleSection">
<xsl:attribute name="data-anchor"><xsl:apply-templates select="." mode="text-labels">
<xsl:with-param name="text">History</xsl:with-param>
Expand Down
1 change: 1 addition & 0 deletions packtools/catalogs/htmlgenerator/v2.0/generic-pub-date.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<xsl:template match="article-meta | sub-article | response" mode="generic-pub-date">
<xsl:if test=".//pub-date">
<!-- manter pareado class="articleSection" e data-anchor="nome da seção no menu esquerdo" -->
<div class="articleSection">
<xsl:attribute name="data-anchor"><xsl:apply-templates select="." mode="text-labels">
<xsl:with-param name="text">Publication Dates</xsl:with-param>
Expand Down

0 comments on commit 2015516

Please sign in to comment.