This is an automated email from the ASF dual-hosted git repository.
leonardcs pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps-site.git
The following commit(s) were added to refs/heads/main by this push:
new c44c8f8 Add community tab (#32)
c44c8f8 is described below
commit c44c8f8b98ad6b3a3fe186415a2c3588b8658fbc
Author: Leonard <[email protected]>
AuthorDate: Tue Jun 27 15:25:16 2023 +0200
Add community tab (#32)
* Add button component
* Add mailing list component
* Add mailing list page
* Update homepage title
---
src/components/buttons/Button/index.tsx | 23 ++++++++++++++
src/components/buttons/Button/style.module.css | 20 ++++++++++++
.../buttons/MailingListButtons/index.tsx | 37 ++++++++++++++++++++++
.../buttons/MailingListButtons/style.module.css | 6 ++++
src/pages/_meta.json | 15 +++++++++
src/pages/community/mailing-lists.mdx | 15 +++++++++
src/pages/index.mdx | 2 +-
7 files changed, 117 insertions(+), 1 deletion(-)
diff --git a/src/components/buttons/Button/index.tsx
b/src/components/buttons/Button/index.tsx
new file mode 100644
index 0000000..efc9e6e
--- /dev/null
+++ b/src/components/buttons/Button/index.tsx
@@ -0,0 +1,23 @@
+import styles from './style.module.css';
+
+interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
+ children: React.ReactNode;
+ size?: 'sm' | 'md';
+}
+
+export const Button: React.FC<ButtonProps> = props => {
+ const classes = [
+ 'nx-rounded',
+ 'nx-transition-colors',
+ styles.btn,
+ props.className
+ ];
+ if (props.size === 'sm') {
+ classes.push(styles['btn-sm']);
+ }
+ return (
+ <button {...props} className={classes.join(' ')}>
+ {props.children}
+ </button>
+ );
+};
diff --git a/src/components/buttons/Button/style.module.css
b/src/components/buttons/Button/style.module.css
new file mode 100644
index 0000000..bdaf05d
--- /dev/null
+++ b/src/components/buttons/Button/style.module.css
@@ -0,0 +1,20 @@
+.btn {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 0.5rem;
+ padding: 0.5rem 1rem;
+ background-color: hsl(var(--nextra-primary-hue) 100% 45%);
+ color: white;
+ font-weight: bold;
+ font-size: smaller;
+}
+
+.btn:hover {
+ background-color: hsl(var(--nextra-primary-hue) 100% 55%);
+}
+
+.btn.btn-sm {
+ padding: 0.3rem 0.6rem;
+ font-size: smaller;
+}
diff --git a/src/components/buttons/MailingListButtons/index.tsx
b/src/components/buttons/MailingListButtons/index.tsx
new file mode 100644
index 0000000..45d3a03
--- /dev/null
+++ b/src/components/buttons/MailingListButtons/index.tsx
@@ -0,0 +1,37 @@
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { faArrowUpRightFromSquare } from '@fortawesome/free-solid-svg-icons';
+
+import { Button } from '../Button';
+import styles from './style.module.css';
+
+interface MailingListButtonsProps {
+ list: string;
+}
+
+export const MailingListButtons: React.FC<MailingListButtonsProps> = ({
+ list
+}) => {
+ return (
+ <div className={styles.container}>
+ <a
+
href={`mailto:${list}[email protected]?subject=(send%20this%20email%20to%20subscribe)`}
+ >
+ <Button size="sm">Subscribe</Button>
+ </a>
+ <a
+
href={`mailto:${list}[email protected]?subject=(send%20this%20email%20to%20unsubscribe)`}
+ >
+ <Button size="sm">Unsubscribe</Button>
+ </a>
+ <a
+ href={`https://lists.apache.org/list.html?${list}@baremaps.apache.org`}
+ target="_blank"
+ >
+ <Button size="sm">
+ <span>Archive</span>
+ <FontAwesomeIcon icon={faArrowUpRightFromSquare}></FontAwesomeIcon>
+ </Button>
+ </a>
+ </div>
+ );
+};
diff --git a/src/components/buttons/MailingListButtons/style.module.css
b/src/components/buttons/MailingListButtons/style.module.css
new file mode 100644
index 0000000..040ca32
--- /dev/null
+++ b/src/components/buttons/MailingListButtons/style.module.css
@@ -0,0 +1,6 @@
+.container {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.5rem;
+ padding: 0.5rem 0;
+}
diff --git a/src/pages/_meta.json b/src/pages/_meta.json
index c6b3571..201da86 100644
--- a/src/pages/_meta.json
+++ b/src/pages/_meta.json
@@ -15,6 +15,21 @@
"title": "Documentation",
"type": "page"
},
+ "community": {
+ "title": "Community",
+ "type": "menu",
+ "items": {
+ "mailing-lists": {
+ "title": "Mailing Lists",
+ "href": "/community/mailing-lists"
+ },
+ "contact": {
+ "title": "Contribute to Baremaps",
+ "href":
"https://github.com/apache/incubator-baremaps/blob/main/CONTRIBUTING.md",
+ "newWindow": true
+ }
+ }
+ },
"experiments": {
"title": "Experiments",
"type": "page",
diff --git a/src/pages/community/mailing-lists.mdx
b/src/pages/community/mailing-lists.mdx
new file mode 100644
index 0000000..f87530f
--- /dev/null
+++ b/src/pages/community/mailing-lists.mdx
@@ -0,0 +1,15 @@
+---
+title: Mailing Lists
+layout: default
+sidebar: hide
+---
+
+import { MailingListButtons } from '@/components/buttons/MailingListButtons';
+
+# Mailing Lists
+
+The following mailing lists are available for users of Apache Baremaps:
+
+- [email protected] is for people who want to contribute code to
Baremaps.
+
+ <MailingListButtons list="dev" />
diff --git a/src/pages/index.mdx b/src/pages/index.mdx
index e4b0f2b..542b2aa 100644
--- a/src/pages/index.mdx
+++ b/src/pages/index.mdx
@@ -1,5 +1,5 @@
---
-title: Mapping Infrastructure Made Easy
+title: Apache Baremaps
---
import Link from 'next/link';