Skip to content

Commit

Permalink
Merge pull request #132 from samvera/128-learn-more-homepage
Browse files Browse the repository at this point in the history
Learn More button on homepage; upgrade dependencies
  • Loading branch information
heathergreerklein authored Jan 22, 2024
2 parents 15680eb + fb99e5b commit 80ec1e0
Show file tree
Hide file tree
Showing 7 changed files with 1,023 additions and 1,021 deletions.
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
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
Loading

0 comments on commit 80ec1e0

Please sign in to comment.