Skip to content

Commit

Permalink
Merge pull request #2139 from laws-africa/pdf
Browse files Browse the repository at this point in the history
PDF changes
  • Loading branch information
goose-life committed Jul 10, 2024
2 parents 3dbfe67 + 91d69fc commit a10713d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion indigo_api/static/xsl/fo/_toc.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
</xsl:template>

<xsl:template match="akn:tocItem">
<fo:block margin-top="{$para-spacing}" text-align-last="justify">
<fo:block margin-top="{$para-spacing}" text-align-last="justify"
end-indent="{$indent-toc}" last-line-end-indent="-{$indent-toc}">
<xsl:if test="@class='keep-with-next'">
<xsl:attribute name="keep-with-next">always</xsl:attribute>
</xsl:if>
Expand Down
2 changes: 1 addition & 1 deletion indigo_api/static/xsl/fo/main-fo.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
border-bottom-style="solid"
border-bottom-color="{$accent-colour}"
margin-top="-1.5cm">
<fo:block start-indent="1pt" end-indent="1pt">
<fo:block start-indent="1pt" end-indent="30pt" last-line-end-indent="-29pt">
<fo:inline>
<xsl:value-of select="//akn:staticContent/akn:container[@name='running-header']/akn:span[@class='left-align']"/>
<fo:leader leader-pattern="space"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
{% block expression-detail %}
<div name="expression-detail">
<p>{% blocktrans with date=document.expression_date|date:"j E Y" %}Document date: {{ date }}{% endblocktrans %}</p>
<p>FRBR URI: {{ document.expression_frbr_uri }}</p>
</div>
{% endblock %}
{% block updates %}
Expand Down Expand Up @@ -63,6 +62,7 @@
{% endblock %}
{% block licence %}
<div name="licence">
<p>FRBR URI: {{ document.expression_frbr_uri }}</p>
<p>
{% trans "There is no copyright on the legislative content of this document." %}<br/>
{% trans "This PDF copy is licensed under a Creative Commons Attribution 4.0 License (CC BY 4.0). Share widely and freely." %}
Expand All @@ -74,7 +74,7 @@
{% block toc %}
{% if toc %}
<container name="toc">
<h3>{{ document.title }}</h3>
<h3>{{ document.title }}{% if document.work.numbered_title %} ({{ document.work.numbered_title }}){% endif %}</h3>
<h3>{% trans "Contents" %}</h3>
<toc>
{% for entry in toc %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block running-header %}
<container name="running-header">
<span class="left-align">
{{ document.title }}
{{ document.title }}{% if document.work.numbered_title %} ({{ document.work.numbered_title }}){% endif %}
</span>
<span class="right-align">
{{ place_string }}
Expand Down
2 changes: 1 addition & 1 deletion indigo_api/tests/pdf_fixtures/basic_out.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<fo:page-sequence format="1" initial-page-number="1" master-reference="A4">
<fo:static-content flow-name="xsl-region-before">
<fo:block margin-top="-1.5cm" border-bottom-color="#D04242" border-bottom-style="solid" text-align-last="justify" line-height="1.3" font-size="9pt" font-family="PT Serif">
<fo:block end-indent="1pt" start-indent="1pt">
<fo:block last-line-end-indent="-29pt" end-indent="30pt" start-indent="1pt">
<fo:inline>
Restitution of Land Rights Act, 1994
<fo:leader leader-pattern="space"/>
Expand Down
2 changes: 1 addition & 1 deletion indigo_api/tests/pdf_fixtures/swahili_out.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<fo:page-sequence format="1" initial-page-number="1" master-reference="A4">
<fo:static-content flow-name="xsl-region-before">
<fo:block margin-top="-1.5cm" border-bottom-color="#D04242" border-bottom-style="solid" text-align-last="justify" line-height="1.3" font-size="9pt" font-family="PT Serif">
<fo:block end-indent="1pt" start-indent="1pt">
<fo:block last-line-end-indent="-29pt" end-indent="30pt" start-indent="1pt">
<fo:inline>
Katiba ya Jamhuri ya Muungano wa Tanzania, ya Mwaka
<fo:leader leader-pattern="space"/>
Expand Down
2 changes: 1 addition & 1 deletion indigo_api/tests/pdf_fixtures/tables_out.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<fo:page-sequence format="1" initial-page-number="1" master-reference="A4">
<fo:static-content flow-name="xsl-region-before">
<fo:block margin-top="-1.5cm" border-bottom-color="#D04242" border-bottom-style="solid" text-align-last="justify" line-height="1.3" font-size="9pt" font-family="PT Serif">
<fo:block end-indent="1pt" start-indent="1pt">
<fo:block last-line-end-indent="-29pt" end-indent="30pt" start-indent="1pt">
<fo:inline>
<fo:leader leader-pattern="space"/>
</fo:inline>
Expand Down

0 comments on commit a10713d

Please sign in to comment.