├── .gitignore
├── versions
├── current
└── history
├── .babelrc
├── img
└── header-cid-inspector.png
├── .github
└── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
├── components
├── Heading.jsx
├── Text.jsx
├── Html.jsx
├── Box.jsx
├── Swatch.jsx
└── Button.jsx
├── package.json
├── pages
└── index.js
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | /docs
3 | /lab.json
4 |
--------------------------------------------------------------------------------
/versions/current:
--------------------------------------------------------------------------------
1 | QmW7Y6314aYnwKPJCtLv747fZ9HuixjVjkJxH6asChL3Hs
2 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "env",
4 | "stage-2",
5 | "react"
6 | ]
7 | }
--------------------------------------------------------------------------------
/img/header-cid-inspector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ipfs-inactive/ipfs-ui-style-guide/HEAD/img/header-cid-inspector.png
--------------------------------------------------------------------------------
/versions/history:
--------------------------------------------------------------------------------
1 | QmbptNPkmmjuAPCVa3HwCobXuRJ3nv2bC4r2aFNXPpeY3P
2 | Qme6ZhtQgAtLGV2qmq2XrPukDdVBU8zvVPAKUXr13cQaup
3 | QmZtkeeY6UAncpzUrA1bospb5eAGj461ZMSquCE2eHJUCE
4 | QmUd6rjFKxGcHVJttp3Rk63XfNorCVQ34xpqGRhcy9o7Wm
5 | QmXJrqqmMgmcF1d92ibbTeR6d3wxxosTHeNwRQVy1yMKTX
6 | QmXAFFqZGqWQduM9B5SeNX2d7exFatwbqgqyans5R77ZDT
7 | QmP6yiLLjQqD8SREb1ueBwxeZcLtBJJe9P8SWXDFirGL2s
8 | QmW7Y6314aYnwKPJCtLv747fZ9HuixjVjkJxH6asChL3Hs
9 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: need/triage
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/components/Heading.jsx:
--------------------------------------------------------------------------------
1 | import {Text} from './Text.jsx'
2 |
3 | // Fancy header for jumbotrons in Montserrat
4 | export const PosterH1 = Text.withComponent('h1')
5 |
6 | PosterH1.defaultProps = {
7 | color: 'white',
8 | fontFamily: 'montserrat',
9 | fontSize: 5,
10 | fontWeight: 400
11 | }
12 |
13 | // Fancy strapline for jumbotrons in Montserrat and green
14 | export const PosterH2 = Text.withComponent('h2')
15 |
16 | PosterH2.defaultProps = {
17 | color: 'aqua',
18 | fontFamily: 'montserrat',
19 | fontSize: 4,
20 | fontWeight: 400
21 | }
22 |
23 | // Regular document section heading
24 | export const H2 = Text.withComponent('h2')
25 |
26 | H2.defaultProps = {
27 | fontSize: 6,
28 | fontWeight: 600,
29 | color: 'charcoal',
30 | m: 1
31 | }
32 |
33 | // Regular subheading
34 | export const H3 = Text.withComponent('h3')
35 |
36 | H3.defaultProps = {
37 | fontSize: 4,
38 | fontWeight: 500,
39 | color: 'charcoal-muted',
40 | m: 1
41 | }
42 |
--------------------------------------------------------------------------------
/components/Text.jsx:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components'
2 | import {
3 | color,
4 | space,
5 | width,
6 | fontSize,
7 | fontWeight,
8 | textAlign,
9 | lineHeight,
10 | letterSpacing,
11 | responsiveStyle,
12 | style
13 | } from 'styled-system'
14 |
15 | const fontFamily = responsiveStyle({
16 | prop: 'fontFamily',
17 | cssProperty: 'fontFamily',
18 | key: 'fonts'
19 | })
20 |
21 | const display = responsiveStyle({
22 | prop: 'display',
23 | cssProperty: 'display'
24 | })
25 |
26 | const textTransform = style({
27 | prop: 'textTransform',
28 | cssProperty: 'textTransform'
29 | })
30 |
31 | export const Text = styled.span`
32 | ${color}
33 | ${space}
34 | ${width}
35 | ${textAlign}
36 | ${display}
37 | ${textTransform}
38 | ${lineHeight}
39 | ${letterSpacing}
40 | ${fontSize}
41 | ${fontWeight}
42 | ${fontFamily}
43 | `
44 | Text.defaultProps = {
45 | fontSize: 2,
46 | fontWeight: 400,
47 | fontFamily: 0
48 | }
49 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a bug report
4 | title: ''
5 | labels: need/triage
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/components/Html.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 | import { ThemeProvider } from 'styled-components'
4 | import theme from 'ipfs-css/theme.json'
5 |
6 | const Html = ({ title = '', description = '', relativePathToRoot = '', styleTags, children }) => (
7 |
8 |
9 |
10 |
11 |
12 |
13 | {title}
14 | {styleTags}
15 |
16 |
17 |
18 |
19 | {children}
20 |
21 |
22 |
23 | )
24 |
25 | Html.propTypes = {
26 | children: PropTypes.node
27 | }
28 |
29 | export default Html
30 |
--------------------------------------------------------------------------------
/components/Box.jsx:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components'
2 | import {
3 | color,
4 | space,
5 | width,
6 | fontSize,
7 | fontWeight,
8 | textAlign,
9 | boxShadow,
10 | borderColor,
11 | borderWidth,
12 | borderRadius,
13 | responsiveStyle,
14 | cleanElement
15 | } from 'styled-system'
16 |
17 | const display = responsiveStyle({
18 | prop: 'display',
19 | cssProperty: 'display'
20 | })
21 |
22 | const verticalAlign = responsiveStyle({
23 | prop: 'verticalAlign',
24 | cssProperty: 'verticalAlign'
25 | })
26 |
27 | export const Box = styled(cleanElement('div'))`
28 | ${color}
29 | ${space}
30 | ${width}
31 | ${fontSize}
32 | ${fontWeight}
33 | ${textAlign}
34 | ${boxShadow}
35 | ${borderColor}
36 | ${borderWidth}
37 | ${borderRadius}
38 | ${display}
39 | ${verticalAlign}
40 | `
41 |
42 | export const Card = Box.extend`
43 | overflow: hidden;
44 | `
45 |
46 | Card.defaultProps = {
47 | display: 'inline-block',
48 | boxShadow: 0,
49 | borderRadius: 4
50 | }
51 |
52 | export const Half = Box.extend``
53 |
54 | Half.defaultProps = {
55 | display: 'inline-block',
56 | verticalAlign: 'top',
57 | width: '50%'
58 | }
59 |
60 | export const Section = Box.withComponent('section')
61 |
62 | export const Header = Box.withComponent('header')
63 |
64 | export const Footer = Box.withComponent('footer')
65 |
--------------------------------------------------------------------------------
/components/Swatch.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {withTheme} from 'styled-components'
3 | import {Box, Card, Half} from './Box.jsx'
4 | import {Text} from './Text.jsx'
5 |
6 | const Swatch = ({color, width, height, m, theme}) => {
7 | const footerHeight = height - 75
8 | return (
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {color}
17 |
18 |
19 |
20 | {theme.colors[color]}
21 |
22 |
23 |
24 |
25 | {theme.colors[`${color}-muted`]}
26 |
27 |
28 |
29 |
30 | )
31 | }
32 |
33 | Swatch.defaultProps = {
34 | width: 233,
35 | height: 160,
36 | m: 3
37 | }
38 |
39 | export default withTheme(Swatch)
40 |
--------------------------------------------------------------------------------
/components/Button.jsx:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components'
2 | import {space, width, fontSize, color, responsiveStyle} from 'styled-system'
3 |
4 | const display = responsiveStyle({
5 | prop: 'display',
6 | cssProperty: 'display'
7 | })
8 |
9 | const fontFamily = responsiveStyle({
10 | prop: 'fontFamily',
11 | cssProperty: 'fontFamily',
12 | key: 'fonts'
13 | })
14 |
15 | export const Button = styled.button`
16 | ${fontFamily}
17 | ${display}
18 | ${space}
19 | ${width}
20 | ${fontSize}
21 | ${color}
22 | appearance: none;
23 | text-decoration: none;
24 | min-width: 140px;
25 | vertical-align: middle;
26 | text-align: center;
27 | font-weight: 600;
28 | border-width: 0;
29 | border-radius: 3px;
30 | white-space: nowrap;
31 | line-height: 1;
32 | cursor: ${props => !props.disabled ? 'pointer' : 'initial'};
33 | transition: opacity .15s ease-in-out, box-shadow .15s ease-in-out;
34 | &:hover {
35 | opacity: ${props => props.disabled ? 1 : 0.9};
36 | }
37 | &:focus {
38 | outline: 0;
39 | }
40 | &:disabled {
41 | color: ${props => props.theme.colors.gray};
42 | background-color: ${props => props.theme.colors['gray-muted']};
43 | }
44 | &:active {
45 | opacity: 0.95;
46 | box-shadow: ${props => props.disabled ? 'initial' : 'inset 0 0 8px rgba(0,0,0,0.3)'};
47 | }
48 | `
49 |
50 | Button.defaultProps = {
51 | mx: 2,
52 | my: 2,
53 | px: 4,
54 | py: 3,
55 | fontFamily: 0,
56 | display: 'inline-block',
57 | fontSize: 2,
58 | color: 'white',
59 | bg: 'aqua'
60 | }
61 |
62 | export const ResponsiveButton = Button.extend``
63 |
64 | ResponsiveButton.defaultProps = {
65 | ...Button.defaultProps,
66 | display: ['block', 'inline-block'],
67 | width: ['100%', 'initial'],
68 | my: [3, 2],
69 | mx: [0, 2]
70 | }
71 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ipfs-ui-style-guide",
3 | "version": "1.0.0",
4 | "description": "A shared style guide for UI design in the IPFS universe.",
5 | "scripts": {
6 | "test": "say sorry && exit 1",
7 | "clean": "rm -rf ./docs/*",
8 | "build": "npm-run-all --serial clean --parallel build:*",
9 | "build:html": "node build/html.js",
10 | "build:static": "rsync -a node_modules/ipfs-css/{ipfs.css,fonts} docs",
11 | "watch": "run-p build:static watch:*",
12 | "watch:html": "nodemon -w theme.json -w components -w pages -e js,json,jsx -x npm run build:html",
13 | "watch:serve": "browser-sync start --files 'docs/bundle.*' --files 'docs/*.html' --server docs --port 4000 --reload-delay 600",
14 | "deploy": "run-s build deploy:*",
15 | "deploy:ipfs": "ipfs add -r -q docs | tail -n1 >versions/current; cat versions/current >> versions/history; cat versions/current"
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "git+https://github.com/ipfs-shipyard/ipfs-ui-style-guide.git"
20 | },
21 | "author": "olizilla",
22 | "license": "MIT",
23 | "bugs": {
24 | "url": "https://github.com/ipfs-shipyard/ipfs-ui-style-guide/issues"
25 | },
26 | "homepage": "https://github.com/ipfs-shipyard/ipfs-ui-style-guide#readme",
27 | "dependencies": {},
28 | "devDependencies": {
29 | "babel-preset-env": "1.7.0",
30 | "babel-preset-react": "^6.24.1",
31 | "babel-preset-stage-2": "^6.24.1",
32 | "babel-register": "^6.26.0",
33 | "browser-sync": "2.26.3",
34 | "cssnano": "^3.10.0",
35 | "ipfs-css": "^0.2.0",
36 | "nodemon": "1.18.5",
37 | "npm-run-all": "^4.1.2",
38 | "react": "^16.2.0",
39 | "react-dom": "^16.2.0",
40 | "require-directory": "^2.1.1",
41 | "standard": "^10.0.3",
42 | "styled-components": "^3.0.1",
43 | "styled-system": "^1.1.1",
44 | "tachyons": "^4.9.1"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {withTheme} from 'styled-components'
3 | import {Box, Section, Header} from '../components/Box.jsx'
4 | import {PosterH1, PosterH2, H2, H3} from '../components/Heading.jsx'
5 | import Swatch from '../components/Swatch.jsx'
6 | import {Button, ResponsiveButton} from '../components/Button.jsx'
7 |
8 | const Index = ({theme}) => {
9 | const colorNames = Object.keys(theme.colors).filter(name => !name.match(/muted$/))
10 | const primaryPalette = colorNames.slice(0, 4)
11 | const secondaryPalette = colorNames.slice(4)
12 | return (
13 |
14 |
15 |
16 |
17 | The Interplanetary File System
18 |
19 |
20 | IPFS UI Kit
21 |
22 |
23 |
24 |
25 |
26 |
27 | Color Palette
28 |
29 |
30 | Primary color palette
31 |
32 | {primaryPalette.map(name => )}
33 |
34 | Secondary color palette
35 |
36 | {secondaryPalette.map(name => )}
37 |
38 |
39 |
40 |
41 | Buttons
42 |
43 |
44 | Basic buttons in action
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | Responsive buttons
63 |
64 | Aqua
65 | Navy
66 | Teal
67 | Yellow
68 | Red
69 |
70 |
71 | )
72 | }
73 |
74 | export default withTheme(Index)
75 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | > This repository is no longer maintained. See [ipfs/ipfs-gui](https://github.com/ipfs/ipfs-gui) instead.
2 |
3 | # 👉 Looking for up-to-date IPFS visual guidelines?
4 |
5 | [](https://www.figma.com/proto/mH0OlgikgKzLmbMNO3noBs/IPFS-Brand-sheet-public)
6 |
7 | See the end of [ipfs-ui-style-guide/issues/3](https://github.com/ipfs-shipyard/ipfs-ui-style-guide/issues/3)
8 |
9 |
211 |
212 | ## License
213 |
214 | This repository is mainly for documents. All of these are licensed under the [CC-BY-SA 3.0](https://ipfs.io/ipfs/QmVreNvKsQmQZ83T86cWSjPu2vR3yZHGPm5jnxFuunEB9u) license © 2016 Protocol Labs Inc. Any code is under an [MIT license](LICENSE) © 2016 Protocol Labs Inc.
215 |
216 |
217 | [ipfs-css]: https://github.com/ipfs-shipyard/ipfs-css
218 | [ipfs.io]: https://ipfs.io
219 | [tachyons]: http://tachyons.io
220 | [tachyons type scale]: http://tachyons.io/docs/typography/scale
221 | [Parcel]: https://parceljs.org
222 | [create-react-app]: https://github.com/facebook/create-react-app
223 | [Montserrat]: https://github.com/JulietaUla/Montserrat
224 | [InterUI]: https://github.com/rsms/inter
225 |
--------------------------------------------------------------------------------