Skip to content

Commit bcd8fbf

Browse files
author
Evert Arias
committed
Initial commit
1 parent 2ee02e6 commit bcd8fbf

16 files changed

+9970
-0
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/installation.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
id: installation
3+
title: Installation
4+
---
5+
6+
:::important Important
7+
This section is a work in progress.
8+
:::
9+

docs/introduction.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
id: introduction
3+
title: Introduction
4+
---
5+
6+
:::important Important
7+
This section is a work in progress.
8+
:::
9+

docusaurus.config.js

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
module.exports = {
2+
title: "EasyButton",
3+
tagline: "The Arduino Library For Buttons",
4+
url: "https://easybtn.earias.me",
5+
baseUrl: "/",
6+
favicon: "img/favicon.ico",
7+
organizationName: "evert-arias", // Usually your GitHub org/user name.
8+
projectName: "EasyButton", // Usually your repo name.
9+
themeConfig: {
10+
navbar: {
11+
title: "EasyButton",
12+
logo: {
13+
alt: "EasyButton Logo",
14+
src: "img/logo.svg"
15+
},
16+
links: [
17+
{
18+
to: "docs/introduction",
19+
activeBasePath: "docs",
20+
label: "Docs",
21+
position: "left"
22+
},
23+
{ to: "https://blog.earias.me", label: "Blog", position: "left" },
24+
{
25+
href: "https://github.com/evert-arias/EasyButton",
26+
label: "GitHub",
27+
position: "right"
28+
}
29+
]
30+
},
31+
footer: {
32+
style: "dark",
33+
links: [
34+
{
35+
title: "Docs",
36+
items: [
37+
{
38+
label: "Introduction",
39+
to: "docs/doc1"
40+
},
41+
{
42+
label: "Installing in Arduino IDE",
43+
to: "docs/doc2"
44+
},
45+
{
46+
label: "Installing in PlatformIO",
47+
to: "docs/doc2"
48+
}
49+
]
50+
},
51+
{
52+
title: "Examples",
53+
items: [
54+
{
55+
label: "Pressed",
56+
to: "https://github.com/evert-arias/EasyButton"
57+
},
58+
{
59+
label: "Pressed For Duration",
60+
href: "https://github.com/evert-arias/EasyButton"
61+
},
62+
{
63+
label: "Sequence",
64+
href: "https://github.com/evert-arias/EasyButton"
65+
},
66+
{
67+
label: "Touch Button",
68+
href: "https://github.com/evert-arias/EasyButton"
69+
}
70+
]
71+
},
72+
{
73+
title: "Community",
74+
items: [
75+
{
76+
label: "Blog",
77+
to: "https://blog.earias.me/"
78+
},
79+
{
80+
label: "GitHub",
81+
href: "https://github.com/evert-arias/EasyButton"
82+
},
83+
{
84+
label: "Youtube",
85+
href: "https://www.youtube.com/channel/UCbdTIe6YpgJ6bCL7FI16Bcw"
86+
}
87+
]
88+
}
89+
],
90+
copyright: `Made with 💙 by Evert Arias`
91+
}
92+
},
93+
presets: [
94+
[
95+
"@docusaurus/preset-classic",
96+
{
97+
docs: {
98+
sidebarPath: require.resolve("./sidebars.js"),
99+
editUrl: "https://github.com/evert-arias/easybutton-website"
100+
},
101+
theme: {
102+
customCss: require.resolve("./src/css/custom.css")
103+
}
104+
}
105+
]
106+
]
107+
};

package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "easybutton-website",
3+
"version": "1.0.0",
4+
"private": true,
5+
"scripts": {
6+
"start": "docusaurus start",
7+
"build": "docusaurus build",
8+
"swizzle": "docusaurus swizzle",
9+
"deploy": "docusaurus deploy"
10+
},
11+
"dependencies": {
12+
"@docusaurus/core": "^2.0.0-alpha.48",
13+
"@docusaurus/preset-classic": "^2.0.0-alpha.48",
14+
"classnames": "^2.2.6",
15+
"react": "^16.8.4",
16+
"react-dom": "^16.8.4"
17+
},
18+
"browserslist": {
19+
"production": [
20+
">0.2%",
21+
"not dead",
22+
"not op_mini all"
23+
],
24+
"development": [
25+
"last 1 chrome version",
26+
"last 1 firefox version",
27+
"last 1 safari version"
28+
]
29+
}
30+
}

sidebars.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
someSidebar: {
3+
EasyButton: ['introduction', 'installation']
4+
},
5+
};

src/css/custom.css

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* stylelint-disable docusaurus/copyright-header */
2+
/**
3+
* Any CSS included here will be global. The classic template
4+
* bundles Infima by default. Infima is a CSS framework designed to
5+
* work well for content-centric websites.
6+
*/
7+
8+
/* You can override the default Infima variables here. */
9+
:root {
10+
--ifm-color-primary: #56b3c1;
11+
--ifm-color-primary-dark: #4f96ae;
12+
--ifm-color-primary-darker: #477b9b;
13+
--ifm-color-primary-darkest: #3e6387;
14+
--ifm-color-primary-light: #5cd4d5;
15+
--ifm-color-primary-lighter: #5fded7;
16+
--ifm-color-primary-lightest:#61e8d8;
17+
--ifm-code-font-size: 95%;
18+
}
19+
20+
.docusaurus-highlight-code-line {
21+
background-color: rgb(72, 77, 91);
22+
display: block;
23+
margin: 0 calc(-1 * var(--ifm-pre-padding));
24+
padding: 0 var(--ifm-pre-padding);
25+
}

src/pages/index.js

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import React from 'react';
2+
import classnames from 'classnames';
3+
import Layout from '@theme/Layout';
4+
import Link from '@docusaurus/Link';
5+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
6+
import useBaseUrl from '@docusaurus/useBaseUrl';
7+
import styles from './styles.module.css';
8+
9+
const features = [
10+
{
11+
title: <>Easy to Use</>,
12+
imageUrl: 'img/undraw_the_world_is_mine_nb0e.svg',
13+
description: (
14+
<>
15+
EasyButton is small and does not depend on third party libraries making it very easy to install and include in your project.
16+
</>
17+
),
18+
},
19+
{
20+
title: <>Non-blocking</>,
21+
imageUrl: 'img/undraw_season_change_f99v.svg',
22+
description: (
23+
<>
24+
EasyButton is a non-blocking library,
25+
which means it won't affect the rest of your code with
26+
dangerous delays that impact the overall performance of your code.
27+
</>
28+
),
29+
},
30+
{
31+
title: <>Intuitive API</>,
32+
imageUrl: 'img/undraw_control_panel1_20gm.svg',
33+
description: (
34+
<>
35+
Handling buttons is a simple task on arduino, but the code can look very ugly, full of conditions and delays that are not safe at all.
36+
EasyButton not only saves you development time, it also provides an easy and intuitive API for handling buttons with callbacks.
37+
</>
38+
),
39+
},
40+
];
41+
42+
function Feature({imageUrl, title, description}) {
43+
const imgUrl = useBaseUrl(imageUrl);
44+
return (
45+
<div className={classnames('col col--4', styles.feature)}>
46+
{imgUrl && (
47+
<div className="text--center">
48+
<img className={styles.featureImage} src={imgUrl} alt={title} />
49+
</div>
50+
)}
51+
<h3>{title}</h3>
52+
<p>{description}</p>
53+
</div>
54+
);
55+
}
56+
57+
function Home() {
58+
const context = useDocusaurusContext();
59+
const {siteConfig = {}} = context;
60+
return (
61+
<Layout
62+
title={`${siteConfig.title}`}
63+
description="The Arduino Library For Buttons">
64+
<header className={classnames('hero hero--primary', styles.heroBanner)}>
65+
<div className="container">
66+
<h1 className="hero__title">{siteConfig.title}</h1>
67+
<p className="hero__subtitle">{siteConfig.tagline}</p>
68+
<div className={styles.buttons}>
69+
<Link
70+
className={classnames(
71+
'button button--outline button--secondary button--lg',
72+
styles.getStarted,
73+
)}
74+
to={'https://github.com/evert-arias/EasyButton/releases'}>
75+
Download
76+
</Link>
77+
</div>
78+
</div>
79+
</header>
80+
<main>
81+
{features && features.length && (
82+
<section className={styles.features}>
83+
<div className="container">
84+
<div className="row">
85+
{features.map((props, idx) => (
86+
<Feature key={idx} {...props} />
87+
))}
88+
</div>
89+
</div>
90+
</section>
91+
)}
92+
</main>
93+
</Layout>
94+
);
95+
}
96+
97+
export default Home;

src/pages/styles.module.css

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/* stylelint-disable docusaurus/copyright-header */
2+
/**
3+
* CSS files with the .module.css suffix will be treated as CSS modules
4+
* and scoped locally.
5+
*/
6+
7+
.heroBanner {
8+
padding: 4rem 0;
9+
text-align: center;
10+
position: relative;
11+
overflow: hidden;
12+
}
13+
14+
@media screen and (max-width: 966px) {
15+
.heroBanner {
16+
padding: 2rem;
17+
}
18+
}
19+
20+
.buttons {
21+
display: flex;
22+
align-items: center;
23+
justify-content: center;
24+
}
25+
26+
.features {
27+
display: flex;
28+
align-items: center;
29+
padding: 2rem 0;
30+
width: 100%;
31+
}
32+
33+
.featureImage {
34+
height: 200px;
35+
width: 200px;
36+
}

static/img/favicon.ico

15 KB
Binary file not shown.

0 commit comments

Comments
 (0)