Skip to content

Commit

Permalink
tuning restrictions + presentation + browse navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
respinos committed Dec 11, 2023
1 parent 15b6a9a commit a920c60
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/scss/text/_text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ ins::after {
margin-left: 1rem;
}

.lg + .lg {
margin-top: 1rem;
}

.line {
display: block;
}
Expand Down
6 changes: 6 additions & 0 deletions templates/text/qbat/qbat.base.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@
</nav>
</xsl:template>

<xsl:template match="qui:callout">
<m-callout subtle="subtle" icon="warning" variant="warning">
<xsl:apply-templates select="." mode="copy-guts" />
</m-callout>
</xsl:template>

<xsl:template match="xhtml:title/qui:values" mode="copy">
<xsl:for-each select="qui:value">
<xsl:value-of select="." />
Expand Down
7 changes: 7 additions & 0 deletions templates/text/qbat/qbat.browse.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
<xsl:template name="build-results-pagination">
<xsl:variable name="nav" select="//qui:main/qui:nav[@role='results']" />
<xsl:if test="$nav/@min &lt; $nav/@max">
<xsl:apply-templates select="//qui:form[@rel='browse']" />
<nav id="pagination" aria-label="Result navigation" class="[ pagination__row ][ flex flex-space-between flex-align-center sticky-bottom ]">
<div class="[ pagination__group ][ flex flex-align-center gap-0_5 ]">
<xsl:if test="$nav/qui:link">
Expand Down Expand Up @@ -595,4 +596,10 @@
</a>
</dd>
</xsl:template>

<xsl:template match="qui:form[@rel='browse']">
<form action="{@action}" method="GET" hidden="hidden" id="{@id}">
<xsl:apply-templates />
</form>
</xsl:template>
</xsl:stylesheet>
1 change: 1 addition & 0 deletions templates/text/qbat/qbat.header.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
</h1>
<!-- <xsl:apply-templates select="//qui:form[@id='item-search']" /> -->
</div>
<xsl:apply-templates select="qui:callout[@slot='access']" />
</xsl:template>

<xsl:template name="build-collection-heading-xxx">
Expand Down
2 changes: 1 addition & 1 deletion templates/text/qbat/qbat.home.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<xsl:with-param name="classes">browse-link</xsl:with-param>
</xsl:apply-templates>

<xsl:if test="count(//qui:block[@slot != 'information' and @slot != 'links']) &gt; 0">
<xsl:if test="count(//qui:block[@slot != 'information' and @slot != 'links'][normalize-space(.)]) &gt; 0">
<div class="[ pr-1 mb-1 ]">
<h3>Page Index</h3>
<div class="toc js-toc"></div>
Expand Down
3 changes: 0 additions & 3 deletions templates/text/qbat/qbat.text.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
window.mUse = window.mUse || [];
</script>

<link rel="stylesheet" href="{$docroot}styles/text/pageviewer.css" />
<link rel="stylesheet" href="{$docroot}styles/text/text.css" />

<xsl:call-template name="build-entry-scripts" />

</xsl:template>
Expand Down
8 changes: 7 additions & 1 deletion templates/text/qui/includes/qui.header-common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,13 @@
</xsl:call-template>
</xsl:template>

<xsl:template match="EXTENT" mode="metadata-value">
<xsl:template match="SOURCEDESC//EXTENT" mode="metadata-value" priority="101">
<qui:value>
<xsl:value-of select="." />
</qui:value>
</xsl:template>

<xsl:template match="FILEDESC/EXTENT" mode="metadata-value">
<xsl:variable name="extent" select="substring-before(., ' ')" />
<xsl:variable name="key">
<xsl:text>uplift.header.str.extent</xsl:text>
Expand Down
5 changes: 5 additions & 0 deletions templates/text/qui/qui.base.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
<xsl:call-template name="build-site-header" />
<xsl:call-template name="build-sub-header" />
<qui:main>
<xsl:if test="/Top/AuthRequired = 'true'">
<qui:callout slot="access">
<xsl:value-of select="key('get-lookup', 'header.str.fullaccess')" />
</qui:callout>
</xsl:if>
<xsl:call-template name="build-body-main" />
<xsl:call-template name="build-item-search-form" />
</qui:main>
Expand Down
11 changes: 10 additions & 1 deletion templates/text/qui/qui.browse.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<xsl:value-of select="1" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="( ( $slice-start + 1 ) div $slice-size) + 1" />
<xsl:value-of select="round(( ( $slice-start + 1 ) div $slice-size) + 1)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Expand Down Expand Up @@ -80,6 +80,7 @@
<!-- <xsl:value-of select="dlxs:capitalize($current-browse-field)"/> -->
</qui:header>
<!-- <xsl:call-template name="build-action-panel" /> -->
<xsl:call-template name="build-browse-form" />
<xsl:call-template name="build-results-list" />
<xsl:call-template name="build-browse-index" />
<xsl:call-template name="build-browse-navigation" />
Expand Down Expand Up @@ -137,6 +138,14 @@
</qui:nav>
</xsl:template>

<xsl:template name="build-browse-form">
<qui:form rel="browse" action="/cgi/t/text/text-idx" id="collection-search" class="visually-hidden">
<xsl:for-each select="//BrowseStringForm/HiddenVars/Variable">
<qui:hidden-input name="{@name}" value="{.}" />
</xsl:for-each>
</qui:form>
</xsl:template>

<xsl:template name="build-browse-index">
<xsl:variable name="default-value" select="//BrowseNav/DefaultValue" />
<qui:form role="browse">
Expand Down

0 comments on commit a920c60

Please sign in to comment.