Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed Google Samvera Public Calendar #133

Merged
merged 4 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion components/home/ApplicationTypes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ export default function ApplicationTypes({ applicationTypes = [] }) {
<div className="py-24 bg-samGreyDark sm:py-32">
<div className="px-6 mx-auto max-w-7xl lg:px-8">
<div className="max-w-2xl mx-auto lg:text-center">
<h2 className="text-base font-semibold leading-7 text-samBlue">
<h2
id="applications"
className="text-base font-semibold leading-7 text-samBlue"
>
Applications
</h2>
<p className="mt-2 text-3xl font-bold tracking-tight text-white sm:text-4xl">
Expand Down
9 changes: 2 additions & 7 deletions components/home/Hero.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Image from "next/image";
import Link from "next/link";
import { prefix } from "prefix";
import svc2023 from "../../public/images/samvera-connect-2023.png";
import groupPhoto from "../../public/images/washu-samvera-group.jpeg";

export default function HomeHero() {
Expand Down Expand Up @@ -31,12 +29,9 @@ export default function HomeHero() {
</Link>
</div>
<div className="mt-3 rounded-md shadow sm:mt-0 sm:ml-3">
<Link
className="button-inverted"
href="/repository-solutions/applications-demos"
>
<a className="button-inverted" href="#applications">
Learn more
</Link>
</a>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/layout/HeaderNew.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const newsNavigation = [
},
{
label: "Samvera calendar",
href: "https://samvera.atlassian.net/wiki/spaces/samvera/pages/433553767/Samvera+Events+Calendar",
isExternal: true,
href: "/news-and-events/calendar",
isExternal: false,
},
{
label: "Samvera Connect 2023 Conference",
Expand Down
8 changes: 4 additions & 4 deletions lib/markdown-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ var fs = require("fs");
module.exports = {
getMarkdownPageContent(filePath) {
try {
if (!fs.existsSync(filePath)) {
return null;
}
const readFile = fs.readFileSync(filePath, "utf-8");

if (!readFile) return null;

const { data: frontmatter, content } = matter(readFile);

return { content, frontmatter };
} catch (err) {
console.error("error processing markdown file");
console.error(`Error processing markdown file: ${filePath}. `);
}
},

Expand Down
58 changes: 29 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,54 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build && next export",
"build-site-nav": "node lib/build-nav.js",
"start": "next start",
"ci-test": "jest",
"depcheck": "npx depcheck --ignores=app-config,autoprefixer,components,fixtures,jest-environment-jsdom,lib,pages,prefix,postcss,site-navigation",
"dev": "next dev",
"lint": "next lint",
"test": "jest --watch",
"ci-test": "jest"
"start": "next start",
"test": "jest --watch"
},
"dependencies": {
"-": "^0.0.1",
"@contentful/rich-text-from-markdown": "^15.16.8",
"@contentful/rich-text-from-markdown": "^15.16.9",
"@contentful/rich-text-react-renderer": "^15.19.0",
"@contentful/rich-text-types": "^16.3.0",
"@headlessui/react": "^1.7.17",
"@headlessui/react": "^1.7.18",
"@headlessui/tailwindcss": "^0.2.0",
"@heroicons/react": "^2.0.18",
"@tanstack/react-query": "^5.8.4",
"autoprefixer": "^10.4.16",
"contentful": "^10.6.11",
"date-fns": "^2.30.0",
"@heroicons/react": "^2.1.1",
"@tanstack/react-query": "^5.17.19",
"autoprefixer": "^10.4.17",
"contentful": "^10.6.16",
"date-fns": "^3.3.1",
"deepmerge": "^4.3.1",
"gray-matter": "^4.0.3",
"jest": "^29.7.0",
"markdown-it": "^13.0.2",
"next": "^13.5.6",
"markdown-it": "^14.0.0",
"next": "^14.1.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype-raw": "^6.1.1",
"rehype-sanitize": "^5.0.1",
"rehype-stringify": "^9.0.4",
"remark": "^14.0.3",
"remark-html": "^15.0.2",
"remark-rehype": "^10.1.0",
"sass": "^1.69.5",
"swiper": "^10.3.1",
"unified": "^10.1.2"
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"rehype-stringify": "^10.0.0",
"remark": "^15.0.1",
"remark-html": "^16.0.1",
"remark-rehype": "^11.1.0",
"sass": "^1.70.0",
"swiper": "^11.0.5",
"unified": "^11.0.4"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"depcheck": "^1.4.7",
"eslint": "^8.54.0",
"eslint-config-next": "^13.5.6",
"eslint": "^8.56.0",
"eslint-config-next": "^14.1.0",
"eslint-plugin-jest-dom": "^5.1.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.31",
"remark-parse": "^10.0.2",
"tailwindcss": "^3.3.5"
"postcss": "^8.4.33",
"remark-parse": "^11.0.0",
"tailwindcss": "^3.4.1"
}
}
2 changes: 1 addition & 1 deletion pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { prefix } from "prefix";

export default function Document() {
return (
<Html>
<Html className="scroll-smooth">
<Head>
<style
dangerouslySetInnerHTML={{
Expand Down
6 changes: 4 additions & 2 deletions pages/news-and-events/[slug].jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ export async function getStaticProps({ params: { slug } }) {
content_type: "blogPost",
"fields.slug": slug,
});
blogPost = response.items[0].fields;
if (response.total > 0) {
blogPost = response.items[0].fields;
}
} catch {
console.error("Error retrieving blog post from Contentful");
console.error(`Error retrieving blog post: ${slug} from Contentful`);
}

const ogTitle = markdownContent
Expand Down
49 changes: 49 additions & 0 deletions pages/news-and-events/calendar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import Breadcrumbs from "components/Breadcrumbs";
import Layout from "components/layout/Layout";
import Main from "components/layout/Main";

const CONFIG = {
parentDir: "news-and-events",
parentDirLabel: "News and Events",
};

export default function SamveraCalendarPage() {
return (
<Layout>
<Main>
<Breadcrumbs
items={[
{
href: "/",
label: "Home",
},
{
href: `/${CONFIG.parentDir}`,
label: CONFIG.parentDirLabel,
},
]}
/>

<div className="py-12">
<div className="px-6 mx-auto max-w-7xl lg:px-8">
<div className="max-w-2xl mx-auto text-center">
<h1 className="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
Samvera Community Calendar
</h1>
<p className="mt-2 text-lg leading-8 text-gray-600">
Stay up to date with News and Events in the Samvera Public
Calendar.
</p>
</div>

<iframe
src="https://calendar.google.com/calendar/embed?src=c_ilbdqo36kpg2b30b9ebreeklec%40group.calendar.google.com&ctz=America%2FNew_York"
className="w-full aspect-video"
frameBorder="0"
></iframe>
</div>
</div>
</Main>
</Layout>
);
}
Loading
Loading