-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cria as XSL para a versão 3.0 implementando SciELO Design System (#379)
* Cria a pasta v3.0 contendo XSL que incluem o arquivo XSL correspondente na versão 2.0 * Reescreve os templates para trocar H1 por H3 * Altera templates que apresentam autores - troca `class="contribGroup"` por `class="scielo__contribGroup"` - troca `class="outlineFadeLink" data-toggle="modal"` por `class="btn btn-secondary btn-sm outlineFadeLink" data-bs-toggle="modal"` - troca `<span class="dropdown">...</span>` por `<div class="dropdown">...</div>` - altera apresentação dos dados dos autores * Troca h1 por h3 * Modifica atributos dos links que abrem um modal * Altera os atributos do link que faz cópia do DOI do artigo * Troca h1 para h3, h2 para h4, h3 para h5 * Modifica atributos de links presentes em modal * Aplicação de design system em elementos a, ul, logo acesso aberto, etc Deixa configurável os caminhos de CSS * Adiciona novos parâmetros: - bootstrap_css_path - article_css_path - design_system_static_img_path * Troca h1 por h3 * Troca h4 por h5 e corrige botão 'close' * XSL root para a versão 3.0 * Aplica Design System aos modais * Garante a existência de um espaço após doi * Modifica os atributos do elemento a (link) que há no thumbnail de figura ou tabela * Adiciona `<meta name="viewport" content="width=device-width, initial-scale=1"/>` Faz ajustes no menu flutuante do rodapé * Modifica os links entre as menções de notas e referências bibliográficas para se adequar com o modo de leitura para acessibilidade * Modifica htmlgenerator para gerar os htmls com a versão 3.0 * voltar à versão anterior, pois mudanças aplicadas deveriam ter sido feitas em v3.0 * Faz correções na aplicação do design system * Adiciona html v3.0 (design system) * Evita que conteúdo de xref fique com `sup` excedente * Adiciona os HTML gerados pela versão 3.0 * Atualiza a versão do Design System * Remove link de retorno para a menção da nota * Ajusta a apresentação de xref e elementos associados (fn, author-notes, ref) para atender leitor / acessibilidade * Ajustes no código / testes para corrigir testes quebrados * Corrige o link para a versão "original" de graphic * Ajusta o path dos arquivos html de controle de mudança * Adiciona dados de afiliação ocultos no html para adicionar link para o scimago * Adiciona dados de afiliação ocultos no html para adicionar link para o scimago e adiciona estilo na lista de referência para o número ser apresentado em azul * Corrige o nome do módulo que contém a classe para manipular os dados de journal-meta * Remove item duplicado * Altera versão para 3.1.0
- Loading branch information
1 parent
46fccd3
commit 2104f9b
Showing
138 changed files
with
44,069 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:mml="http://www.w3.org/1998/Math/MathML" | ||
exclude-result-prefixes="xlink mml"> | ||
|
||
<xsl:include href="v3.0/article.xsl"/> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
packtools/catalogs/htmlgenerator/v3.0/article-meta-abstract.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" | ||
exclude-result-prefixes="xlink mml"> | ||
|
||
<xsl:include href="../v2.0/article-meta-abstract.xsl"/> | ||
|
||
<xsl:template match="article" mode="create-anchor-and-title-for-abstracts-without-title"> | ||
<xsl:variable name="q_titles" select="count(.//abstract[title])+count(.//trans-abstract[title])"/> | ||
<xsl:if test="$q_titles = 0"> | ||
<xsl:variable name="q_abstracts" select="count(.//abstract[.//text()])+count(.//trans-abstract[.//text()])"/> | ||
|
||
<!-- obtém o título traduzido para Abstracts ou Abstract --> | ||
<xsl:variable name="title"> | ||
<xsl:apply-templates select="." mode="text-labels"> | ||
<xsl:with-param name="text"> | ||
<xsl:choose> | ||
<xsl:when test="$q_abstracts=1">Abstract</xsl:when> | ||
<xsl:otherwise>Abstracts</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:with-param> | ||
</xsl:apply-templates> | ||
</xsl:variable> | ||
|
||
<!-- insere a âncora e o título --> | ||
<div class="articleSection" data-anchor="{$title}"> | ||
<h3 class="articleSectionTitle"><xsl:value-of select="$title"/></h3> | ||
</div> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
<xsl:template match="abstract/sec/title | trans-abstract/sec/title"> | ||
<h4><xsl:apply-templates select="*|text()"/></h4> | ||
</xsl:template> | ||
|
||
<xsl:template match="abstract[title] | trans-abstract[title]" mode="anchor-and-title"> | ||
<!-- Apresenta a âncora e o título, ou seja, Abstract, Resumo, ou Resumen --> | ||
|
||
<!-- âncora --> | ||
<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'"> | ||
<xsl:attribute name="dir">rtl</xsl:attribute> | ||
</xsl:if> | ||
|
||
<!-- título --> | ||
<h3> | ||
<xsl:attribute name="class">articleSectionTitle</xsl:attribute> | ||
<xsl:apply-templates select="." mode="title"></xsl:apply-templates> | ||
</h3> | ||
</xsl:template> | ||
</xsl:stylesheet> |
105 changes: 105 additions & 0 deletions
105
packtools/catalogs/htmlgenerator/v3.0/article-meta-contrib.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" | ||
exclude-result-prefixes="xlink mml"> | ||
|
||
<xsl:include href="../v2.0/article-meta-contrib.xsl"/> | ||
|
||
<xsl:template match="article" mode="contrib-group"> | ||
<div> | ||
<xsl:attribute name="class">scielo__contribGroup</xsl:attribute> | ||
<xsl:apply-templates select="front/article-meta//contrib-group"/> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="sub-article" mode="contrib-group"> | ||
<div> | ||
<xsl:attribute name="class">scielo__contribGroup</xsl:attribute> | ||
<xsl:apply-templates select="front-stub/contrib-group | front/contrib-group"></xsl:apply-templates> | ||
<xsl:if test="not(.//contrib) and ../@article-type='translation'"> | ||
<xsl:apply-templates select="$article//article-meta//contrib"></xsl:apply-templates> | ||
</xsl:if> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="article-meta/contrib-group | front/contrib-group | front-stub/contrib-group"> | ||
<xsl:variable name="id"><xsl:apply-templates select="." mode="modal-id"></xsl:apply-templates></xsl:variable> | ||
<xsl:apply-templates select="contrib[@contrib-type='author']" mode="article-meta-contrib"/> | ||
<xsl:if test="contrib/*[name()!='name' and name()!='collab']"> | ||
<a href="" class="btn btn-secondary btn-sm outlineFadeLink" data-bs-toggle="modal" | ||
data-bs-target="#ModalTutors{$id}"> | ||
<xsl:apply-templates select="." mode="interface"> | ||
<xsl:with-param name="text">About the author<xsl:if test="count(contrib[@contrib-type='author'])>1">s</xsl:if></xsl:with-param> | ||
</xsl:apply-templates> | ||
</a> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
<xsl:template match="contrib" mode="article-meta-contrib"> | ||
<xsl:variable name="id"> | ||
<xsl:value-of select="position()"/> | ||
</xsl:variable> | ||
<div class="dropdown"> | ||
<button id="contribGroupTutor{$id}"> | ||
<xsl:attribute name="class">btn btn-secondary dropdown-toggle</xsl:attribute> | ||
<xsl:attribute name="type">button</xsl:attribute> | ||
<xsl:attribute name="data-bs-toggle">dropdown</xsl:attribute> | ||
<xsl:attribute name="aria-expanded">false</xsl:attribute> | ||
<xsl:choose> | ||
<xsl:when test="$ABBR_CONTRIB='true'"> | ||
<xsl:apply-templates select="name|collab|on-behalf-of" mode="abbrev"/> | ||
</xsl:when> | ||
<xsl:otherwise><xsl:apply-templates select="name|collab|on-behalf-of"/></xsl:otherwise> | ||
</xsl:choose> | ||
</button> | ||
<xsl:apply-templates select="." mode="contrib-dropdown-menu"> | ||
<xsl:with-param name="id"> | ||
<xsl:value-of select="$id"/> | ||
</xsl:with-param> | ||
</xsl:apply-templates> | ||
</div> | ||
</xsl:template> | ||
|
||
|
||
<xsl:template match="contrib" mode="contrib-dropdown-menu"> | ||
<xsl:param name="id"/> | ||
<xsl:if test="role or xref or contrib-id or bio"> | ||
<ul class="dropdown-menu" role="menu" aria-labelledby="contribGrupoTutor{$id}"> | ||
<xsl:apply-templates select="." mode="contrib-dropdown-menu-general"/> | ||
<xsl:apply-templates select="xref[@ref-type='corresp']" mode="contrib-dropdown-menu-corresp"/> | ||
</ul> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
<xsl:template match="contrib" mode="contrib-dropdown-menu-general"> | ||
<xsl:if test="role or xref[@ref-type!='corresp'] or contrib-id or bio"> | ||
<li> | ||
<xsl:apply-templates select="role | bio"/> | ||
<xsl:apply-templates select="xref[@ref-type!='corresp']" mode="contrib-dropdown-menu"/> | ||
<xsl:apply-templates select="contrib-id"/> | ||
</li> | ||
</xsl:if> | ||
</xsl:template> | ||
|
||
<xsl:template match="*" mode="contrib-dropdown-menu-corresp"> | ||
<xsl:apply-templates select="*|text()"/> | ||
</xsl:template> | ||
|
||
<xsl:template match="xref[@ref-type='corresp']" mode="contrib-dropdown-menu-corresp"> | ||
<xsl:variable name="rid"><xsl:value-of select="@rid"/></xsl:variable> | ||
<!-- | ||
<li><div class="corresp"> <h3><sup>4</sup></h3> Autor para correspondência: <a href="mailto:author@gmail.com">author@gmail.com</a> </div></li> | ||
--> | ||
|
||
<li> | ||
<xsl:apply-templates select="$article//*[@id=$rid]" mode="contrib-dropdown-menu-corresp"/> | ||
</li> | ||
</xsl:template> | ||
|
||
<xsl:template match="author-notes/corresp" mode="contrib-dropdown-menu-corresp"> | ||
<div class="corresp"> | ||
<xsl:apply-templates select="*|text()"/> | ||
</div> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
8 changes: 8 additions & 0 deletions
8
packtools/catalogs/htmlgenerator/v3.0/article-meta-permissions.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" | ||
exclude-result-prefixes="xlink mml"> | ||
|
||
<xsl:include href="../v2.0/article-meta-permissions.xsl"/> | ||
|
||
</xsl:stylesheet> |
8 changes: 8 additions & 0 deletions
8
packtools/catalogs/htmlgenerator/v3.0/article-meta-product.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" | ||
exclude-result-prefixes="xlink mml"> | ||
|
||
<xsl:include href="../v2.0/article-meta-product.xsl"/> | ||
|
||
</xsl:stylesheet> |
8 changes: 8 additions & 0 deletions
8
packtools/catalogs/htmlgenerator/v3.0/article-meta-related-article.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" | ||
exclude-result-prefixes="xlink mml"> | ||
|
||
<xsl:include href="../v2.0/article-meta-related-article.xsl"/> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" | ||
exclude-result-prefixes="xlink mml"> | ||
|
||
<xsl:include href="../v2.0/article-meta.xsl"/> | ||
|
||
<xsl:template match="article-id[@pub-id-type='doi']" mode="display"> | ||
<xsl:variable name="link">https://doi.org/<xsl:value-of select="."/></xsl:variable> | ||
<a href="{$link}" class="_doi" target="_blank"><xsl:value-of select="$link"/></a> | ||
<xsl:text> <!-- espaço --></xsl:text> | ||
<a | ||
href="javascript:;" | ||
class="btn btn-secondary btn-sm scielo__btn-with-icon--left copyLink" | ||
data-clipboard-text="{$link}"> | ||
<span class="material-icons-outlined">link</span> | ||
<xsl:apply-templates select="." mode="interface"> | ||
<xsl:with-param name="text">copy</xsl:with-param> | ||
</xsl:apply-templates> | ||
</a> | ||
</xsl:template> | ||
</xsl:stylesheet> |
62 changes: 62 additions & 0 deletions
62
packtools/catalogs/htmlgenerator/v3.0/article-text-back.xsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" | ||
exclude-result-prefixes="xlink mml"> | ||
|
||
<xsl:include href="../v2.0/article-text-back.xsl"/> | ||
|
||
<xsl:template match="fn-group" mode="back-section"> | ||
<!-- | ||
Insere o "título" da seção de notas de rodapé | ||
--> | ||
<div class="articleSection"> | ||
<div class="row"> | ||
<div class="col"> | ||
<ul class="refList articleFootnotes"> | ||
<xsl:apply-templates select="*|text()" mode="back-section-content"/> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="back/fn" mode="back-section"> | ||
<!-- | ||
Insere o "título" da seção de notas de rodapé | ||
--> | ||
<div> | ||
<xsl:attribute name="class">articleSection</xsl:attribute> | ||
<div class="row"> | ||
<div class="col"> | ||
<ul class="refList articleFootnotes"> | ||
<xsl:apply-templates select="."/> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="*[title] | *[label]" mode="back-section"> | ||
<div> | ||
<xsl:attribute name="class">articleSection</xsl:attribute> | ||
<xsl:attribute name="data-anchor"><xsl:apply-templates select="." mode="title"/></xsl:attribute> | ||
<h3> | ||
<xsl:attribute name="class">articleSectionTitle</xsl:attribute> | ||
<xsl:apply-templates select="." mode="title"/> | ||
</h3> | ||
<xsl:apply-templates select="*|text()" mode="back-section-content"/> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="text()" mode="back-section-content"> | ||
<xsl:value-of select="."/> | ||
</xsl:template> | ||
|
||
<xsl:template match="*" mode="back-section-content"> | ||
<xsl:apply-templates select="."/> | ||
</xsl:template> | ||
|
||
<xsl:template match="title|label" mode="back-section-content"> | ||
<!-- do nothing --> | ||
</xsl:template> | ||
</xsl:stylesheet> |
Oops, something went wrong.