Skip to content

Commit

Permalink
Fix categories for SBP in cover page
Browse files Browse the repository at this point in the history
The cover page places series name and categories in the
following way:

  Series Name ("SUSE Best Practices")
  - space -
  Category 1
  Category 2

* Apply SASS/CSS stylesheet
* Change FO/HTML stylesheet to produce a single line for each category
* Regenerate CSS from SASS source
  • Loading branch information
tomschr committed May 13, 2024
1 parent 1508d78 commit 5b21ec4
Show file tree
Hide file tree
Showing 5 changed files with 372 additions and 341 deletions.
9 changes: 6 additions & 3 deletions sbp/fo/article.titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
<fo:table>
<fo:table-body>
<fo:table-cell text-align="start">
<fo:block>
<!-- The logo needs this placement, otherwise it's shited down and right -->
<fo:block padding-top="0pt" margin-top="-14pt" margin-left="-10pt">
<fo:instream-foreign-object
content-width="{$titlepage.logo.width.article}"
width="{$titlepage.logo.width}">
Expand All @@ -38,7 +39,7 @@
<fo:block font-size="&xxx-large;pt">
<xsl:value-of select="$json-ld-seriesname"/>
</fo:block>
<fo:block font-size="&large;pt">
<fo:block font-size="&large;pt" space-before="1em">
<xsl:apply-templates select="d:info/d:meta[@name='category'][1]" mode="article.titlepage.recto.auto.mode"/>
</fo:block>
</fo:table-cell>
Expand Down Expand Up @@ -110,7 +111,9 @@
</xsl:template>

<xsl:template match="d:meta[@name='category']" mode="article.titlepage.recto.auto.mode">
<xsl:apply-templates/>
<xsl:for-each select="*">
<fo:block><xsl:apply-templates/></fo:block>
</xsl:for-each>
</xsl:template>

<xsl:template match="d:meta[@name='platform']" mode="article.titlepage.recto.auto.mode">
Expand Down
7 changes: 5 additions & 2 deletions sbp/xhtml/titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@


<xsl:template match="d:meta[@name='category' or @name='type']" mode="article.titlepage.recto.auto.mode">
<xsl:message>SBP: meta category</xsl:message>
<xsl:apply-templates select="."/>
<div class="category">
<xsl:for-each select="*">
<p class="{local-name()}"><xsl:apply-templates/></p>
</xsl:for-each>
</div>
</xsl:template>


Expand Down
8 changes: 8 additions & 0 deletions source-assets/styles2022/sass/custom/content-title.sass
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ h2
margin-top: 3rem
margin-bottom: 3rem

.category
margin-top: 1.75rem

.phrase
display: block
text-align: right
line-height: 1rem


.cover
margin-top: 2rem
Expand Down
Loading

0 comments on commit 5b21ec4

Please sign in to comment.