Skip to content

Commit

Permalink
Merge pull request #66 from samvera/55-why-use-samvera-updated
Browse files Browse the repository at this point in the history
Consolidate Why Use Samvera page into one page
  • Loading branch information
heathergreerklein authored Jul 7, 2023
2 parents f6e76cf + 828c800 commit 78b4d9c
Show file tree
Hide file tree
Showing 9 changed files with 227 additions and 118 deletions.
2 changes: 1 addition & 1 deletion components/layout/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default function Header() {
<Link
legacyBehavior
key={item.slug}
href={item.items[0].href}
href={item.items[0]?.href}
>
<a className="flex items-center p-3 -m-3 rounded-md hover:bg-gray-50">
<span className="ml-3 text-base font-medium text-gray-900">
Expand Down
98 changes: 54 additions & 44 deletions components/nav/NavItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,69 @@ import { Popover, Transition } from "@headlessui/react";

import { ChevronDownIcon } from "@heroicons/react/24/solid";
/* This example requires Tailwind CSS v2.0+ */
import { Fragment } from "react";
import { Fragment, useEffect, useState } from "react";
import Link from "next/link";

function classNames(...classes) {
return classes.filter(Boolean).join(" ");
}

export default function NavItem({ navItem }) {
return (
<Popover className="relative">
{({ open }) => (
<>
<Popover.Button
className={classNames(
open ? "text-samOrange" : "text-samGrey",
"lowercase group bg-white rounded-md inline-flex items-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
)}
>
<span>{navItem.label}</span>
<ChevronDownIcon
if (navItem.items.length > 0) {
return (
<Popover className="relative">
{({ open }) => (
<>
<Popover.Button
className={classNames(
open ? "text-gray-600" : "text-gray-400",
"ml-1 h-5 w-5 group-hover:text-gray-500"
open ? "text-samOrange" : "text-samGrey",
"lowercase group bg-white rounded-md inline-flex items-center focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
)}
aria-hidden="true"
/>
</Popover.Button>
>
<span>{navItem.label}</span>
<ChevronDownIcon
className={classNames(
open ? "text-gray-600" : "text-gray-400",
"ml-1 h-5 w-5 group-hover:text-gray-500"
)}
aria-hidden="true"
/>
</Popover.Button>

<Transition
as={Fragment}
enter="transition ease-out duration-200"
enterFrom="opacity-0 translate-y-1"
enterTo="opacity-100 translate-y-0"
leave="transition ease-in duration-150"
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1"
>
<Popover.Panel className="absolute z-10 px-2 mt-3 -ml-4 transform w-72 sm:px-0 lg:ml-0 lg:left-1/2 lg:-translate-x-1/2">
<div className="overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5">
<div className="relative grid gap-6 px-5 py-6 bg-white sm:p-8">
{navItem.items.map((item) => (
<Link legacyBehavior key={item.slug} href={item.href}>
<a className="flex items-start p-3 -m-3 rounded-lg hover:bg-gray-50 hover:text-samOrange">
{item.label}
</a>
</Link>
))}
<Transition
as={Fragment}
enter="transition ease-out duration-200"
enterFrom="opacity-0 translate-y-1"
enterTo="opacity-100 translate-y-0"
leave="transition ease-in duration-150"
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1"
>
<Popover.Panel className="absolute z-10 px-2 mt-3 -ml-4 transform w-72 sm:px-0 lg:ml-0 lg:left-1/2 lg:-translate-x-1/2">
<div className="overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5">
<div className="relative grid gap-6 px-5 py-6 bg-white sm:p-8">
{navItem.items.map((item) => (
<Link legacyBehavior key={item.slug} href={item.href}>
<a className="flex items-start p-3 -m-3 rounded-lg hover:bg-gray-50 hover:text-samOrange">
{item.label}
</a>
</Link>
))}
</div>
</div>
</div>
</Popover.Panel>
</Transition>
</>
)}
</Popover>
);
</Popover.Panel>
</Transition>
</>
)}
</Popover>
);
} else {
return (
<Link legacyBehavior href={`/${navItem.slug}`}>
<a className="flex items-start p-3 -m-3 rounded-lg hover:bg-gray-50 hover:text-samOrange">
{navItem.label}
</a>
</Link>
);
}
}
4 changes: 3 additions & 1 deletion lib/build-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ function getNavMap() {
*/
if (!["home", "contact-us", "news"].includes(directory)) {
const files = fs.readdirSync(`markdown/${directory}`);
const hasNoChildren = files.length === 1 && files[0] === "index.md";

const navItems = files.map((fileName) => {
const slug = fileName.replace(".md", "");

Expand All @@ -44,7 +46,7 @@ function getNavMap() {

navMap.push({
label: directory.replaceAll("-", " "),
items: navItems,
items: hasNoChildren ? [] : navItems,
slug: directory,
});
}
Expand Down
45 changes: 45 additions & 0 deletions markdown/why-use-samvera/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "Why Use Samvera?"
date: "2023-06-06"
---

## Samvera is Flexible and Extensible

The Samvera framework uses the best of current repository, search, and user-interface technologies. The separation of data and display, within the Samvera framework, promotes flexibility and extensibility.

#### Flexible

Within the Samvera framework, one "body" -- the digital repository -- supports multiple "heads" or tailored, content type-specific applications.

![Samvera repository structure](../images/HydraContentStructure4.gif) Where other repository systems may be tailored to a specific format or medium, requiring specific systems and expertise, the Samvera framework is flexible enough to serve multiple needs.

#### Extensible

The Samvera framework is architected to extend features based on specific concerns and use-cases. Established features with long-term community commitment are available, such as:

- [Browse Everything](https://github.com/projecthydra/browse-everything) allows your rails application to access user files from cloud storage, such as Dropbox, Skydrive, Google Drive, Box, and a server-side directory share
- [LDP](https://github.com/projecthydra/ldp) provides a Linked Data Platform and allows publication of RDF data

The agile and collaborative nature of the Samvera Community also enables experimentation with cutting-edge extensions, which can be added to address unique needs, explore usefulness and possibilities, and eventually gain community commitment.

## Sustainable

Samvera has grown into a vibrant, highly active community including more than 30 Partners who formally support our work and development.  A look at our [Partners page](https://samvera.org/samvera-partners/) or a glance at the footer section on this page will show you that these supporting organizations and institutions cover a range of cultural heritage sectors (libraries – academic and public, museums, broadcasters), large and small.  Not only is there a range of sectors represented, but Samvera’s Partners and adopters are spread around the world; whilst most are on the North American continent there is a growing number in Europe and a small number elsewhere.

We believe that no single system can provide the full range of repository-based solutions for a given institution’s needs and that no single institution can resource the development of a full range of solutions on its own. Samvera software is free and open source, available under an Apache 2 license.

The Partners have a vested interest in sustaining the products of Samvera in support of their own digital collections, some of national and international importance, and thus in sustaining the products for others in the community. Partnership is earned by demonstrating support in ways that serve the community as a whole, and the [Samvera Community Framework](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405210590/Samvera+Community+Framework) describes the mutually beneficial structure of activity that occurs. Further evidence Samvera’s strength can be seen in the [Partner Letters of Commitment](https://samvera.atlassian.net/wiki/spaces/samvera/pages/426510729/Samvera+Partners). It is the combination of community, partnership, and technology plus a shared interest in long term digital preservation objectives that makes Samvera what it is.

Samvera is committed to being an active, supportive community for its many users; in the furtherance of that commitment, the Community regularly examines the ways in which it attempts to deliver that support.  More, it continually asks whether it is suited to the demands of the next few years or whether improvements need to be made. Thus, Samvera Community is continually evolving to reflect needs in the Community and to reflect advancements in the technologies and standards that it embraces.

## The Samvera Community

The Samvera Community was conceived and executed as a collaborative, open source effort from its very beginning as the Hydra Project in 2008. The concept of a supportive community of adopters around the software has always been a primary aim and we adopted the African proverb that says "If you want to go fast, go alone. If you want to go far, go together."

Initially our work was a joint development project between Stanford University, the University of Virginia and the University of Hull in close collaboration with Fedora (now part of LYRASIS).  This core group was later expanded to include MediaShelf LLC, which has since evolved to become [Data Curation Experts](https://curationexperts.com/).

As Samvera has grown it has attracted [many adopters, and many of these have become formal Partners](https://samvera.org/samvera-partners/) in the Community. Partners commit to furthering the development of the Community. The structure of the Samvera Community is more fully described on our [Governance page](https://samvera.org/hydra-community-sourced-software/governance/).

The Samvera Community provides not only ongoing research and development of the Samvera software but also arranges meetings and training sessions which help provide face-to-face [peer support](https://samvera.org/samvera-flexible-extensible/peer-support/) of the software's deployment and use.  It supports a number of [mailing lists and other communication channels](https://samvera.org/communication/) that are used on a daily basis by adopters and potential adopters around the world.

Samvera itself is _not_ (and has never been) primarily grant funded.  It _is_ distributed and open. People have asked "what is your sustainability plan?"  We say we’ve already passed the first hurdle—many years of self-funded productivity, and a growing code, contributor and user base, not dependent on a transition plan.  See the [Grants page on the Samvera wiki](https://samvera.atlassian.net/wiki/spaces/samvera/pages/405211783/Grants) for additional information.  We gratefully acknowledge grant contributions from the US Institute for Museum and Library Services, the Andrew W. Mellon Foundation, Jisc in the UK, the National Endowment for the Humanities, and others, who have funded projects which have used our framework as part of their technology stack.
21 changes: 0 additions & 21 deletions markdown/why-use-samvera/samvera-flexible-extensible.md

This file was deleted.

12 changes: 0 additions & 12 deletions markdown/why-use-samvera/sustainability.md

This file was deleted.

14 changes: 0 additions & 14 deletions markdown/why-use-samvera/the-samvera-community.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import { getMarkdownPageContent, getPaths } from "lib/markdown-helpers";

import DynamicPage from "components/layout/DynamicPage";
import { buildWorkOpenGraphData } from "lib/open-graph";
import { getMarkdownPageContent } from "lib/markdown-helpers";

/**
* This is where the magic happens.
* 'parentDir' is the value of this file's parent directory
* along with a matching directory title which exists in
* /markdown.
*
* For example:
* /markdown/my-cool-directory/...
* /pages/my-cool-directory/...
*/
const CONFIG = {
parentDir: "why-use-samvera",
parentDirLabel: "Why use Samvera?",
Expand All @@ -24,23 +13,15 @@ export default function WhatIsSamveraPage({ content, frontmatter }) {
);
}

export async function getStaticPaths() {
const paths = getPaths(`markdown/${CONFIG.parentDir}`);
return {
paths,
fallback: false,
};
}

export async function getStaticProps({ params: { slug } }) {
export async function getStaticProps() {
const { content, frontmatter } = getMarkdownPageContent(
`markdown/${CONFIG.parentDir}/${slug}.md`
`markdown/${CONFIG.parentDir}/index.md`
);

const openGraphData = buildWorkOpenGraphData(
CONFIG.parentDirLabel,
frontmatter.title,
`${CONFIG.parentDir}/${slug}`
`${CONFIG.parentDir}/index`
);

return {
Expand Down
Loading

0 comments on commit 78b4d9c

Please sign in to comment.