Skip to content

Commit 5521a6b

Browse files
committed
chore: better layout for page
1 parent a6ae45c commit 5521a6b

9 files changed

Lines changed: 330 additions & 123 deletions

File tree

src/App.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,6 @@ export default function App() {
8787
/>
8888

8989
<main className="site-main">{pageLookup[currentPage] ?? pageLookup.home}</main>
90-
91-
<footer className="site-footer">
92-
<p>{siteData.footer.note}</p>
93-
<p className="footer-hint">
94-
Update the placeholder content in <code>src/data/siteData.js</code> when
95-
you are ready to populate the site.
96-
</p>
97-
</footer>
9890
</div>
9991
</div>
10092
);

src/components/PageIntro.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import SectionHeading from "./SectionHeading";
22

3-
export default function PageIntro({ eyebrow, title, description }) {
3+
export default function PageIntro({ eyebrow, title, description, plain = false }) {
44
return (
5-
<section className="page-intro">
5+
<section className={`page-intro${plain ? " page-intro-plain" : ""}`}>
66
<SectionHeading
77
description={description}
88
eyebrow={eyebrow}

src/components/PaperCard.jsx

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
11
import SmartLink from "./SmartLink";
22

3+
function getYoutubeEmbedUrl(url) {
4+
if (!url) {
5+
return null;
6+
}
7+
8+
try {
9+
const parsedUrl = new URL(url);
10+
const hostname = parsedUrl.hostname.replace(/^www\./, "");
11+
let videoId = null;
12+
13+
if (hostname === "youtu.be") {
14+
videoId = parsedUrl.pathname.split("/").filter(Boolean)[0];
15+
} else if (
16+
hostname === "youtube.com" ||
17+
hostname.endsWith(".youtube.com") ||
18+
hostname === "youtube-nocookie.com" ||
19+
hostname.endsWith(".youtube-nocookie.com")
20+
) {
21+
if (parsedUrl.pathname.startsWith("/embed/")) {
22+
videoId = parsedUrl.pathname.split("/").filter(Boolean)[1];
23+
} else if (parsedUrl.pathname.startsWith("/shorts/")) {
24+
videoId = parsedUrl.pathname.split("/").filter(Boolean)[1];
25+
} else {
26+
videoId = parsedUrl.searchParams.get("v");
27+
}
28+
}
29+
30+
return videoId ? `https://www.youtube.com/embed/${encodeURIComponent(videoId)}` : null;
31+
} catch {
32+
return null;
33+
}
34+
}
35+
336
export default function PaperCard({ compact = false, paper }) {
37+
const titleHref = paper.titleHref ?? paper.href;
38+
const youtubeEmbedUrl = compact ? null : getYoutubeEmbedUrl(paper.youtubeUrl);
39+
const paperLinks =
40+
compact || !Array.isArray(paper.links)
41+
? []
42+
: paper.links.filter((link) => link.href && link.label);
43+
444
return (
545
<article className={`paper-card${compact ? " paper-card-compact" : ""}`}>
646
<div className="paper-meta">
@@ -10,8 +50,8 @@ export default function PaperCard({ compact = false, paper }) {
1050
</div>
1151

1252
<h3 className="paper-title">
13-
{paper.href ? (
14-
<SmartLink className="paper-title-link" href={paper.href}>
53+
{titleHref ? (
54+
<SmartLink className="paper-title-link" href={titleHref}>
1555
{paper.title}
1656
</SmartLink>
1757
) : (
@@ -21,6 +61,32 @@ export default function PaperCard({ compact = false, paper }) {
2161

2262
{paper.authors ? <p className="paper-authors">{paper.authors}</p> : null}
2363
{paper.summary ? <p className="paper-summary">{paper.summary}</p> : null}
64+
65+
{youtubeEmbedUrl ? (
66+
<div className="paper-video">
67+
<iframe
68+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
69+
allowFullScreen
70+
loading="lazy"
71+
referrerPolicy="strict-origin-when-cross-origin"
72+
src={youtubeEmbedUrl}
73+
title={`${paper.title} video`}
74+
/>
75+
</div>
76+
) : null}
77+
78+
{paperLinks.length ? (
79+
<div className="inline-links paper-links">
80+
{paperLinks.map((link) => (
81+
<SmartLink
82+
className="text-link"
83+
href={link.href}
84+
key={`${paper.title}-${link.label}`}
85+
label={link.label}
86+
/>
87+
))}
88+
</div>
89+
) : null}
2490
</article>
2591
);
2692
}

src/data/siteData.js

Lines changed: 86 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ export const siteData = {
6262
},
6363
},
6464
home: {
65-
papersEyebrow: "Presented Papers",
66-
papersTitle: "Selected papers and presentations highlighted on the landing page.",
67-
papersDescription:
68-
"This section sits below the team photograph on the landing page and can feature the latest papers, conference presentations, or the group's most representative outputs.",
65+
papersEyebrow: "",
66+
papersTitle: "Latest accepted papers",
67+
// papersDescription:
68+
// "This section sits below the team photograph on the landing page and can feature the latest papers, conference presentations, or the group's most representative outputs.",
6969
},
7070
pages: {
7171
papers: {
72-
eyebrow: "Published Papers",
73-
title: "A complete list of the group's papers and scholarly output.",
72+
eyebrow: "",
73+
title: "Published Papers",
7474
description:
75-
"Use this page for every paper you want visitors to browse, including journal articles, conference papers, workshop contributions, and preprints.",
75+
"",
7676
},
7777
team: {
7878
eyebrow: "Team",
@@ -95,85 +95,108 @@ export const siteData = {
9595
},
9696
featuredPapers: [
9797
{
98-
title: "Placeholder Paper Title for the Home Page",
99-
venue: "Conference or Journal Name",
98+
title: "One-Shot View Planning and Online Optimization-based Replanning for Unknown Object Reconstruction",
99+
venue: "2026 IEEE International Conference on Robotics & Automation",
100100
year: "2026",
101-
authors: "First Author, Second Author, Third Author",
101+
authors: "J.J. Patiño, V. Romero-Cano, Y. Lai, Z. Kingston, J.D. Hernández",
102102
summary:
103-
"A short summary placeholder for a paper featured on the main page. Replace this with the real title, authors, and contribution statement.",
104-
href: "https://example.com/paper-one",
105-
tag: "Featured",
103+
"",
104+
titleHref: "https://orca.cardiff.ac.uk/id/eprint/184709/",
105+
youtubeUrl: "https://www.youtube.com/watch?v=Si_atZL73xI",
106+
links: [
107+
// {
108+
// label: "Paper link",
109+
// href: "https://example.com/paper-one",
110+
// },
111+
],
112+
tag: "To be published",
106113
},
107114
{
108-
title: "Another Highlighted Publication Template",
109-
venue: "Robotics Venue",
110-
year: "2025",
111-
authors: "Author A, Author B, Author C",
115+
title:
116+
"Exploring the Perceptions and Challenges of Social Robot Navigation: Two Case Studies in Different Socio-Technical Contexts",
117+
venue: "OzCHI '24: 36th Australasian Conference on Human-Computer Interaction",
118+
year: "2024",
119+
authors:
120+
"Steven Silva, Polina Oliinyk, Jose Patino, Dennys Paillacho, Juan D. Hernandez, Nervo Verdezoto",
112121
summary:
113-
"Use this card for another featured publication or conference paper that you want visitors to notice quickly when they open the site.",
114-
href: "https://example.com/paper-two",
115-
tag: "Recent",
122+
"A qualitative study of social robot navigation in real-world service settings across Ecuador and the UK, examining how robot behaviour, appearance, spatial constraints, and local context affect acceptance and user experience.",
123+
titleHref: "https://doi.org/10.1145/3726986.3727028",
124+
youtubeUrl: "https://www.youtube.com/watch?v=dFreXVsIJmc",
125+
links: [],
126+
tag: "Conference",
116127
},
117128
{
118-
title: "Template Entry for a Presented Paper",
119-
venue: "Workshop or Symposium",
120-
year: "2025",
121-
authors: "Researcher One, Researcher Two",
129+
title: "Online Social Robot Navigation in Indoor, Large and Crowded Environments",
130+
venue: "2023 IEEE International Conference on Robotics and Automation (ICRA)",
131+
year: "2023",
132+
authors:
133+
"Steven Silva, Nervo Verdezoto, Dennys Paillacho, Samuel Millan-Norman, Juan David Hernández",
122134
summary:
123-
"This slot can hold a third highlighted paper, poster, or invited talk entry depending on what you want to emphasize on the landing page.",
124-
href: "https://example.com/paper-three",
125-
tag: "Selected",
135+
"Presents an online social robot navigation framework for large, crowded indoor environments, combining social heatmap world modelling, multilayered sampling-based planning, and path-following control, with benchmarks and Pepper robot trials.",
136+
titleHref: "https://doi.org/10.1109/ICRA48891.2023.10160603",
137+
youtubeUrl: "https://www.youtube.com/watch?v=Gq149wFVj7A",
138+
links: [],
139+
tag: "Conference",
126140
},
127141
],
128142
papers: [
129143
{
130-
title: "Placeholder Paper Title for the Home Page",
131-
venue: "Conference or Journal Name",
144+
title: "One-Shot View Planning and Online Optimization-based Replanning for Unknown Object Reconstruction",
145+
venue: "2026 IEEE International Conference on Robotics & Automation",
132146
year: "2026",
133-
authors: "First Author, Second Author, Third Author",
134-
summary:
135-
"A short summary placeholder for a paper featured on the main page. Replace this with the real title, authors, and contribution statement.",
136-
href: "https://example.com/paper-one",
137-
tag: "Featured",
138-
},
139-
{
140-
title: "Another Highlighted Publication Template",
141-
venue: "Robotics Venue",
142-
year: "2025",
143-
authors: "Author A, Author B, Author C",
147+
authors: "J.J. Patiño, V. Romero-Cano, Y. Lai, Z. Kingston, J.D. Hernández",
144148
summary:
145-
"Use this card for another featured publication or conference paper that you want visitors to notice quickly when they open the site.",
146-
href: "https://example.com/paper-two",
147-
tag: "Recent",
149+
"",
150+
titleHref: "https://orca.cardiff.ac.uk/id/eprint/184709/",
151+
youtubeUrl: "https://www.youtube.com/watch?v=Si_atZL73xI",
152+
links: [
153+
// {
154+
// label: "Paper link",
155+
// href: "https://example.com/paper-one",
156+
// },
157+
],
158+
tag: "To be published",
148159
},
149160
{
150-
title: "Template Entry for a Presented Paper",
151-
venue: "Workshop or Symposium",
152-
year: "2025",
153-
authors: "Researcher One, Researcher Two",
161+
title:
162+
"Exploring the Perceptions and Challenges of Social Robot Navigation: Two Case Studies in Different Socio-Technical Contexts",
163+
venue: "OzCHI '24: 36th Australasian Conference on Human-Computer Interaction",
164+
year: "2024",
165+
authors:
166+
"Steven Silva, Polina Oliinyk, Jose Patino, Dennys Paillacho, Juan D. Hernandez, Nervo Verdezoto",
154167
summary:
155-
"This slot can hold a third highlighted paper, poster, or invited talk entry depending on what you want to emphasize on the landing page.",
156-
href: "https://example.com/paper-three",
157-
tag: "Selected",
168+
"A qualitative study of social robot navigation in real-world service settings across Ecuador and the UK, examining how robot behaviour, appearance, spatial constraints, and local context affect acceptance and user experience.",
169+
titleHref: "https://doi.org/10.1145/3726986.3727028",
170+
youtubeUrl: "https://www.youtube.com/watch?v=dFreXVsIJmc",
171+
links: [
172+
],
173+
tag: "Conference",
158174
},
159175
{
160-
title: "Journal Article Placeholder for the Full Papers Page",
161-
venue: "Robotics and Automation Journal",
162-
year: "2024",
163-
authors: "Author Name, Collaborator Name, Student Name",
176+
title: "Online Social Robot Navigation in Indoor, Large and Crowded Environments",
177+
venue: "2023 IEEE International Conference on Robotics and Automation (ICRA)",
178+
year: "2023",
179+
authors:
180+
"Steven Silva, Nervo Verdezoto, Dennys Paillacho, Samuel Millan-Norman, Juan David Hernández",
164181
summary:
165-
"A placeholder for a journal article entry with room for a concise explanation of the paper's focus, result, or application area.",
166-
href: "https://example.com/paper-four",
167-
tag: "Journal",
182+
"Presents an online social robot navigation framework for large, crowded indoor environments, combining social heatmap world modelling, multilayered sampling-based planning, and path-following control, with benchmarks and Pepper robot trials.",
183+
titleHref: "https://doi.org/10.1109/ICRA48891.2023.10160603",
184+
youtubeUrl: "https://www.youtube.com/watch?v=Gq149wFVj7A",
185+
links: [
186+
],
187+
tag: "Conference",
168188
},
169189
{
170-
title: "Conference Paper Placeholder for a Navigation Study",
171-
venue: "International Robotics Conference",
172-
year: "2024",
173-
authors: "Research Group Member, External Collaborator",
190+
title: "Towards Online Socially Acceptable Robot Navigation",
191+
venue: "2022 IEEE 18th International Conference on Automation Science and Engineering (CASE)",
192+
year: "2022",
193+
authors: "Steven Silva, Dennys Paillacho, Nervo Verdezoto, Juan David Hernández",
174194
summary:
175-
"This example shows how the full papers page can hold a larger archive than the short list on the front page.",
176-
href: "https://example.com/paper-five",
195+
"Introduces an online social robot navigation framework that generates collision-free and socially acceptable paths in uncontrolled crowded spaces using a modified sampling-based planner and social relevance validity checking.",
196+
titleHref: "https://doi.org/10.1109/CASE49997.2022.9926686",
197+
youtubeUrl: "https://www.youtube.com/watch?v=aZf27nthmX8",
198+
links: [
199+
],
177200
tag: "Conference",
178201
},
179202
],
@@ -353,8 +376,4 @@ export const siteData = {
353376
note:
354377
"This panel can also include office hours, a collaboration note, lab access information, or a link to an external contact form.",
355378
},
356-
footer: {
357-
note:
358-
"Initial template for the Cardiff University Computational Robotics research website.",
359-
},
360379
};

src/pages/ContactPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PageIntro from "../components/PageIntro";
44
export default function ContactPage({ contacts, pages }) {
55
return (
66
<>
7-
<PageIntro {...pages.contact} />
7+
<PageIntro plain {...pages.contact} />
88
<ContactPanel contacts={contacts} />
99
</>
1010
);

src/pages/PapersPage.jsx

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,65 @@
11
import PageIntro from "../components/PageIntro";
22
import PaperCard from "../components/PaperCard";
33

4+
function getYearSectionId(year) {
5+
return `papers-${String(year).replace(/[^a-z0-9_-]/gi, "-")}`;
6+
}
7+
8+
function getSortedYearGroups(papers) {
9+
const years = [...new Set(papers.map((paper) => paper.year).filter(Boolean))].sort(
10+
(firstYear, secondYear) =>
11+
Number.parseInt(secondYear, 10) - Number.parseInt(firstYear, 10) ||
12+
String(secondYear).localeCompare(String(firstYear)),
13+
);
14+
15+
return years.map((year) => ({
16+
papers: papers.filter((paper) => paper.year === year),
17+
year,
18+
}));
19+
}
20+
421
export default function PapersPage({ pages, papers }) {
22+
const yearGroups = getSortedYearGroups(papers);
23+
24+
const scrollToYear = (year) => {
25+
document.getElementById(getYearSectionId(year))?.scrollIntoView({
26+
behavior: "smooth",
27+
block: "start",
28+
});
29+
};
30+
531
return (
632
<>
7-
<PageIntro {...pages.papers} />
33+
<PageIntro plain {...pages.papers} />
834

935
<section className="page-section">
10-
<div className="paper-grid">
11-
{papers.map((paper) => (
12-
<PaperCard key={`${paper.title}-${paper.year}`} paper={paper} />
36+
<nav className="paper-year-slider" aria-label="Published papers by year">
37+
{yearGroups.map(({ year }) => (
38+
<button
39+
className="paper-year-button"
40+
key={year}
41+
onClick={() => scrollToYear(year)}
42+
type="button"
43+
>
44+
{year}
45+
</button>
46+
))}
47+
</nav>
48+
49+
<div className="paper-year-sections">
50+
{yearGroups.map(({ papers: groupedPapers, year }) => (
51+
<section
52+
className="paper-year-section"
53+
id={getYearSectionId(year)}
54+
key={year}
55+
>
56+
<h2 className="paper-year-title">{year}</h2>
57+
<div className="paper-grid">
58+
{groupedPapers.map((paper) => (
59+
<PaperCard key={`${paper.title}-${paper.year}`} paper={paper} />
60+
))}
61+
</div>
62+
</section>
1363
))}
1464
</div>
1565
</section>

0 commit comments

Comments
 (0)