Skip to content

Commit

Permalink
More progress.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathewjordan committed Nov 7, 2024
1 parent 661dd01 commit cadecd5
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 20 deletions.
29 changes: 24 additions & 5 deletions components/Collection/Collection.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,31 @@ import { styled } from "@/stitches.config";

/* eslint sort-keys: 0 */

const CollectionHeader = styled("div", {
display: "flex",
justifyContent: "space-between",
marginTop: "1.5em",
gap: "$gr4",

"div:last-child": {
flexShrink: 0,
flexGrow: 0,
marginBottom: "$gr2",
},

"@sm": {
flexDirection: "column",
gap: "0",
},
});

const Description = styled("p", {
fontSize: "$gr5",
fontFamily: "$northwesternSansLight",
lineHeight: "1.55em",
margin: "$gr2 0 $gr5",
color: "$black50",
margin: "$gr2 0 $gr6",

"@sm": {
fontSize: "$gr3",
},
});

const HeroWrapper = styled("div", {
Expand All @@ -22,4 +41,4 @@ const Interstitial = styled("div", {
padding: "$gr3 0",
});

export { Description, Interstitial, HeroWrapper };
export { CollectionHeader, Description, Interstitial, HeroWrapper };
2 changes: 1 addition & 1 deletion components/Collection/NavTabs.styled.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as TabsPrimitive from "@radix-ui/react-tabs";

import { styled } from "@/stitches.config";

/* eslint sort-keys: 0 */
Expand Down Expand Up @@ -63,7 +64,6 @@ const StyledContent = styled(TabsPrimitive.Content, {
borderBottomLeftRadius: 6,
borderBottomRightRadius: 6,
outline: "none",
"&:focus": { boxShadow: `0 0 0 2px #f0f0f0` },

"& a": {
color: "$purple",
Expand Down
6 changes: 3 additions & 3 deletions components/Shared/Expand/Expand.styled.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { VariantProps, styled } from "@/stitches.config";

import { Button } from "@nulib/design-system";

/* eslint sort-keys: 0 */

const ExpandButton = styled(Button, {
margin: "0 auto",
opacity: "1",
transition: "$dcAll",
});
Expand All @@ -14,9 +14,9 @@ const ExpandEdge = styled("div", {
width: "100%",
bottom: "0",
display: "flex",
justifyContent: "center",
padding: "$4 0 0",
backgroundColor: "$white",
justifyContent: "flex-start",
paddingTop: "$gr7",
background: "linear-gradient(to bottom, #fff0 0%, #fff 61.8%)",
transition: "$dcAll",
overflow: "hidden",
Expand Down
7 changes: 6 additions & 1 deletion components/Shared/Expand/Expand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ const Expand: React.FC<ExpandProps & ExpandVariants> = ({
>
<ExpandContent ref={contentRef}>{children}</ExpandContent>
<ExpandEdge>
<ExpandButton onClick={handleExpand} isLowercase disabled={isExpanded}>
<ExpandButton
onClick={handleExpand}
isLowercase
isPrimary
disabled={isExpanded}
>
{buttonText}
</ExpandButton>
</ExpandEdge>
Expand Down
2 changes: 1 addition & 1 deletion components/Work/TopInfo.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const TopInfoContent = styled("div", {
});

const TopInfoWrapper = styled("section", {
margin: "$gr5 0",
margin: "$gr5 0 $gr6",

[`> header`]: {
display: "flex",
Expand Down
13 changes: 4 additions & 9 deletions pages/collections/[id].tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
CollectionHeader,
Description,
HeroWrapper,
Interstitial,
Expand Down Expand Up @@ -187,13 +188,7 @@ const Collection: NextPage = () => {
<TabsTrigger value="metadata">All Subjects</TabsTrigger>
</TabsList>
<TabsContent value="explore">
<div
style={{
display: "flex",
justifyContent: "space-between",
marginTop: "1.5em",
}}
>
<CollectionHeader>
<Heading
as="h2"
css={{
Expand All @@ -203,10 +198,10 @@ const Collection: NextPage = () => {
{collection?.title}
</Heading>{" "}
<IIIFShare uri="" />
</div>
</CollectionHeader>
{description && (
<Description data-testid="description">
<ReadMore text={description} words={55} />
{<ReadMore text={description} words={55} />}
</Description>
)}
{topMetadata.length > 0 && (
Expand Down

0 comments on commit cadecd5

Please sign in to comment.