e.preventDefault()}
+ >
{
{topic.long_name}
- {displayInterviews.map((interview, index) => (
-
- {interview.metadata.title}
-
- ))}
- {extraCount > 0 &&
+{extraCount}}
+
+ {displayInterviews.map((interview, index) => (
+ {
+ e.preventDefault();
+ handleNavigation(serverUrl + interview.link);
+ }}
+ >
+ {interview.metadata.title}
+
+ ))}
+
+ {interviews.length > 3 && (
+
+
+ {isExpanded ? 'Show Less' : 'Show More'}
+
+
+
+ )}
diff --git a/src/app/favicon.ico b/src/app/favicon.ico
index 21e6ada..30d6dc8 100644
Binary files a/src/app/favicon.ico and b/src/app/favicon.ico differ
diff --git a/src/app/globals.css b/src/app/globals.css
index 910f72a..eebb154 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -1,9 +1,9 @@
/*********************** Suffolk-added styles **********************/
#hero-section {
- background-color: #c3ecf3;
- padding-top: 10em;
- padding-bottom: 10em;
+ background-color: #fbfafe;
+ padding-top: 7em;
+ padding-bottom: 7em;
}
#hero-section h1 {
@@ -16,14 +16,20 @@
#how-it-works-section {
padding: 5em 0 5em 0;
+ background-color: #3e7d9a54;
}
-/*footer {
- background-color: #3e7d9a;
-}*/
+footer {
+ background-color: #fbfafe;
+}
+
+.card-container {
+ margin-bottom: 1.5em;
+ padding-top: 1.5em;
+}
#topics {
- background-color: #c3ecf3;
+ background-color: #fbfafe;
padding: 1em;
padding-top: 5em;
padding-bottom: 2em;
@@ -31,33 +37,45 @@
#topics .card-header {
background-color: #fff;
+ margin-bottom: 0;
}
#topics .card-body {
background-color: #fff;
+ display: flex;
+ flex-wrap: wrap;
+ align-items: flex-start;
+ gap: 10px;
+ padding: 1em;
}
#topics .card-header {
+ padding: 1em;
border-bottom: none;
}
+.tag-container {
+ overflow: hidden;
+ transition: max-height 0.4s ease-in-out;
+}
+
.form-tag {
transition: all 0.05s ease-in-out;
padding: 10px 10px;
- border-radius: 5px;
- background-color: #c3ecf3;
+ border-radius: 7px;
+ background-color: #3e7d9a2d;
color: black;
display: inline-block;
margin-right: 10px;
font-size: 14px;
margin-bottom: 10px;
border-style: solid;
- border-width: 1px;
- border-color: #c3ecf3;
+ border-color: #cbcdd4;
+ box-shadow: rgba(119, 119, 119, 0.16) 0px 1px 4px;
}
.form-tag:hover {
- border-color: rgba(1, 65, 255, 0.3);
+ border-color: rgb(62, 125, 154);
}
.topic-card {
@@ -70,21 +88,73 @@
}
.topic-card .fa-icon {
- color: #c69931;
+ font-size: 1.3em;
+ color: #fdb714;
}
.topic-card .icon-container {
- background-color: #2e4d82;
+ background-color: #162a47;
padding: 0.2em;
}
.topic-card .card-title {
- font-size: 1em;
+ font-size: 1.3em;
+ color: #002e60;
+ margin-bottom: 0px;
+}
+
+.hidden {
+ display: none;
+}
+
+.visible {
+ display: block;
+}
+
+.show-more {
+ cursor: pointer;
+ color: #162a47;
+ font-size: 0.8em;
+ display: flex;
+ align-items: center;
+ border: none;
+ margin-top: 10px;
+ align-self: flex-end;
+ padding: 0.5em;
+}
+
+.show-all-toggle {
+ cursor: pointer;
+ font-size: 1.2em;
+ border: none;
+ background: none;
+ margin-top: 10px;
+}
+
+.show-more i {
+ margin-left: 5px;
+}
+
+#nav-header-text {
color: #002e60;
+ align-self: end;
+ margin-bottom: -5px;
+}
+
+.show-container {
+ display: flex;
+ flex-direction: row;
+ margin-left: auto;
}
.courtformsonline-navbar {
- background-color: #002e60;
+ background: rgb(2, 0, 36);
+ background: linear-gradient(
+ 90deg,
+ #fbfafe 30%,
+ rgba(0, 28, 96, 1) 30%,
+ rgba(0, 46, 96, 1) 30%
+ );
height: 70px;
}
@@ -101,6 +171,10 @@
max-height: 70px;
}
+.show-all-categories {
+ margin-top: 10em;
+}
+
@font-face {
font-family: 'Inter';
src: url('/fonts/Inter-Bold.ttf') format('truetype');
@@ -129,3 +203,15 @@ h5 {
body {
font-family: 'Inter';
}
+
+@media (max-width: 990px) {
+ .courtformsonline-navbar {
+ background: rgb(2, 0, 36);
+ background: linear-gradient(
+ 90deg,
+ #fbfafe 75%,
+ rgba(0, 28, 96, 1) 75%,
+ rgba(0, 46, 96, 1) 75%
+ );
+ }
+}
diff --git a/src/app/hello.tsx b/src/app/hello.tsx
deleted file mode 100644
index c60cea3..0000000
--- a/src/app/hello.tsx
+++ /dev/null
@@ -1,4 +0,0 @@
-// `app/page.tsx` is the UI for the `/` URL
-export default function Page() {
- return
Hello, Home page!
;
-}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index e6147e0..b977af3 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -21,11 +21,16 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
-
-
- {children}
-
+
+
+
+
+
+ {children}
+
+
+
-
+
);
}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index e5d4d97..9ac97ae 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,14 +1,31 @@
-import Link from 'next/link';
import HeroSection from './components/HeroSection';
import HowItWorksSection from './components/HowItWorksSection';
import { fetchInterviews } from '../data/fetchInterviewData';
import TopicCard from './components/TopicCard';
import { legalTopics } from '../config/topics.config';
+import ShowAllToggle from './components/ShowAllToggle';
+import { formSources } from '../config/formSources.config';
export default async function TopicsPage() {
const interviewsResult = await fetchInterviews();
const { interviewsByTopic } = interviewsResult;
+ // Modify this to account for various jurisdictions
+ const serverKey = 'suffolkListLab';
+ const server = formSources.docassembleServers.find(
+ (server) => server.key === serverKey
+ );
+ const url = server ? server.url : 'https://apps.suffolklitlab.org';
+
+ const filteredTopics = legalTopics
+ .sort((a, b) => b.priority - a.priority)
+ .filter(
+ (topic, index) =>
+ topic.always_visible ||
+ (interviewsByTopic[topic.name] &&
+ interviewsByTopic[topic.name].length > 0)
+ );
+
return (
@@ -16,24 +33,18 @@ export default async function TopicsPage() {
Browse court forms by category
-
- {legalTopics
- .sort((a, b) => b.priority - a.priority)
- .filter(
- (topic) =>
- topic.always_visible ||
- (interviewsByTopic[topic.name] &&
- interviewsByTopic[topic.name].length > 0)
- )
- .map((topic) => (
-
- ))}
+
+ {filteredTopics.map((topic, index) => (
+
+ ))}
-
Show all categories
+ {filteredTopics.length > 9 &&
}