Skip to content

Commit

Permalink
patching boobag + static browse
Browse files Browse the repository at this point in the history
  • Loading branch information
respinos committed Dec 5, 2023
1 parent 7c3c3ac commit 445b17c
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 14 deletions.
49 changes: 48 additions & 1 deletion styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,12 @@ details.panel > summary {
justify-content: space-between;
align-items: center;
border-left: 2px solid transparent;
padding-left: 0;
}

details.panel[open] {
padding: 0.25em 0.5em;
padding-left: 0;
}

details.panel[open] > summary:first-of-type {
Expand All @@ -277,6 +279,43 @@ details.panel > summary::-webkit-details-marker {
display: none;
}

details.list-group > summary {
display: flex;
justify-content: space-between;
align-items: center;
/* border-left: 2px solid transparent;
padding-left: 0; */
}

details.list-group[open] {
/* padding: 0.25em 0.5em;
padding-left: 0; */
}

details.list-group[open] > summary:first-of-type {
font-weight: var(--semibold);
color: var(--color-teal-400);
/* border-left: 2px solid var(--color-teal-400); */
/* padding: 0.25em 0.5em; */
}

details.list-group > summary::after {
font-family: "Material Icons";
font-size: 24px;
content: "\e5cf";
color: var(--color-teal-400);
}

details.list-group[open] > summary::after {
font-family: "Material Icons";
content: "\e5ce";
color: var(--color-teal-400);
}
/* Removes the default arrow on Chrome */
details.list-group > summary::-webkit-details-marker {
display: none;
}

/* should a checkbox ever shrink? no. */
input[type="checkbox"] {
flex-shrink: 0;
Expand Down Expand Up @@ -805,7 +844,15 @@ fieldset legend {
grid-area: thumbnail;
}

.results-list--grid:has(:not(.results--list__image)) .results-list__blank {
.results-list__blank {
display: none !important;
}

.main-panel:has(.results-list__image) .results-list__blank {
display: flex !important;
}

.xxresults-list--grid:has(:not(.results--list__image)) .results-list__blank {
/* do not show ever */
display: none !important;
}
Expand Down
25 changes: 22 additions & 3 deletions templates/text/qbat/qbat.base.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,11 @@
<form style="display: none" method="GET" action="/cgi/t/text/text-idx" id="bbaction-form" target="{$target}">
<xsl:apply-templates select="//qui:form[@action='bbaction']/qui:hidden-input" />
<input type="hidden" name="bbaction" value="" id="bbaction-page" />
<input type="hidden" name="bbc" value="{$collid}" />
<input type="hidden" name="c" value="{$collid}" />
<input type="hidden" name="cc" value="{$collid}" />
<xsl:if test="$collid != '*'">
<input type="hidden" name="bbc" value="{$collid}" />
<input type="hidden" name="c" value="{$collid}" />
<input type="hidden" name="cc" value="{$collid}" />
</xsl:if>
</form>
</xsl:template>

Expand Down Expand Up @@ -1017,6 +1019,23 @@
</li>
</xsl:template>

<xsl:template match="xhtml:a[@target='_blank']" mode="copy" priority="101">
<a>
<xsl:apply-templates select="@*" mode="copy" />
<xsl:apply-templates mode="copy" />
<svg width="25" height="25" viewBox="0 0 24 24" style="margin-left: 0.25rem; vertical-align: text-bottom; display: inline-block; fill: currentColor;">
<title>Open in new window</title>
<path d="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z"></path>
</svg>
</a>
<xsl:if test="false()">
<span class="text-muted flex flex-align-center gap-0_5 ml-1" style="margin-left: 0.5rem; display: inline-flex; color: var(--color-neutral-300);">
(opens in a new window)
<span class="material-icons" aria-hidden="true">open_in_new</span>
</span>
</xsl:if>
</xsl:template>

<xsl:template match="@*|*|text()" mode="copy">
<!-- <xsl:message>AHOY DEFAULT COPY <xsl:value-of select="namespace-uri()" />::<xsl:value-of select="local-name()" /> :: <xsl:value-of select="namespace-uri()" /></xsl:message> -->
<xsl:copy>
Expand Down
2 changes: 1 addition & 1 deletion templates/text/qbat/qbat.bookbag.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@

<xsl:variable name="bb-id" select="generate-id()" />
<label class="[ portfolio-selection ]" for="bb{$bb-id}">
<input id="bb{$bb-id}" type="checkbox" name="bbidno" value="{@identifier}" autocomplete="off" />
<input id="bb{$bb-id}" type="checkbox" name="bbidno" value="{concat(@bcc, ':', @identifier)}" autocomplete="off" />
<span class="visually-hidden">Remove item from bookbag</span>
</label>
</section>
Expand Down
18 changes: 14 additions & 4 deletions templates/text/qbat/qbat.static.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

<xsl:template match="qui:block[@data-current-page='contents']//xhtml:details" mode="copy">
<details>
<xsl:attribute name="class">panel w-100</xsl:attribute>
<xsl:attribute name="class">list-group w-100</xsl:attribute>
<xsl:apply-templates select="@*" mode="copy" />
<xsl:apply-templates mode="copy" />
</details>
Expand Down Expand Up @@ -126,15 +126,15 @@
</xsl:template>

<xsl:template match="qui:block[@data-current-page='contents']//xhtml:ul" mode="copy">
<ul>
<xsl:attribute name="class">
<ul data-attribute="{@class}">
<!-- <xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@class">
<xsl:value-of select="@class" />
</xsl:when>
<xsl:otherwise>list-unstyled</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute> -->
<xsl:apply-templates select="@*" mode="copy" />
<xsl:apply-templates mode="copy" />
</ul>
Expand Down Expand Up @@ -189,5 +189,15 @@
</nav>
</xsl:if>
</xsl:template>

<xsl:template match="xhtml:h3" mode="copy">
<h3>
<xsl:if test="not(@id)">
<xsl:attribute name="class">js-toc-ignore</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="@*" mode="copy" />
<xsl:apply-templates mode="copy" />
</h3>
</xsl:template>

</xsl:stylesheet>
2 changes: 1 addition & 1 deletion templates/text/qui/includes/qui.header-reslist.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<xsl:param name="item" />

<xsl:choose>
<xsl:when test="$item/ItemHeader/HEADER">
<xsl:when test="$item/ItemHeader/HEADER or $item/HEADER">
<xsl:call-template name="build-metadata-fields-for-monograph">
<xsl:with-param name="item" select="$item" />
</xsl:call-template>
Expand Down
2 changes: 1 addition & 1 deletion templates/text/qui/qui.bookbag.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

<xsl:variable name="identifier" select="translate(@idno, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />

<qui:section identifier="{$identifier}" auth-required="{AuthRequired}" encoding-type="{DocEncodingType}" encoding-level="{ItemEncodingLevel}">
<qui:section identifier="{$identifier}" bcc="{@bcc}" auth-required="{AuthRequired}" encoding-type="{DocEncodingType}" encoding-level="{ItemEncodingLevel}">
<xsl:apply-templates select="Tombstone" />
<xsl:apply-templates select="TocHref">
<xsl:with-param name="item-encoding-level" xml:base="$item-encoding-level" />
Expand Down
4 changes: 2 additions & 2 deletions templates/text/qui/qui.reslist.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@

<xsl:variable name="identifier" select="translate(ItemIdno, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />

<qui:section identifier="{ItemIdno}" auth-required="{AuthRequired}" encoding-type="{DocEncodingType}" encoding-level="{ItemEncodingLevel}">
<qui:section identifier="{@idno}" collid="{@collid}" auth-required="{AuthRequired}" encoding-type="{DocEncodingType}" encoding-level="{ItemEncodingLevel}">
<xsl:apply-templates select="Tombstone" />
<xsl:apply-templates select="DetailHref" />
<xsl:apply-templates select="TocHref">
Expand All @@ -478,7 +478,7 @@
<qui:link rel="bookmark" href="{BookbagAddHref}" label="{key('get-lookup', 'results.str.21')}" />
</xsl:if> -->
<xsl:if test="normalize-space(BookbagAddHref)">
<qui:form slot="bookbag" rel="add" href="{BookbagAddHref}" data-identifier="{$identifier}">
<qui:form slot="bookbag" rel="add" href="{BookbagAddHref}" data-identifier="{concat(@collid, ':', $identifier)}">
</qui:form>
</xsl:if>
<xsl:if test="not($encoding-type='serialissue')">
Expand Down
2 changes: 1 addition & 1 deletion templates/text/qui/qui.static.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</xsl:template>

<xsl:template name="build-head-block">
<qui:base href="/{substring($collid, 1, 1)}/{$collid}/" />
<!-- <qui:base href="/{substring($collid, 1, 1)}/{$collid}/" /> -->
</xsl:template>

<xsl:template name="build-body-main">
Expand Down

0 comments on commit 445b17c

Please sign in to comment.