Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core Organism Component: Footer #108

Merged
merged 11 commits into from
Dec 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"react-dom": "16.7.0",
"react-helmet": "5.2.0",
"react-pose": "4.0.4",
"semver": "5.6.0",
"styled-components": "4.1.3",
"styled-modern-normalize": ">=0.2.0 <1.0.0",
"styled-theming": "2.2.0",
Expand Down
3 changes: 3 additions & 0 deletions src/assets/images/icons/eva-icons/heart-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/icons/eva-icons/heart-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/icons/simple-icons/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/icons/simple-icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/images/icons/simple-icons/keybase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/icons/simple-icons/reddit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/images/icons/simple-icons/slack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/icons/simple-icons/stackoverflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/icons/simple-icons/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/icons/spectrum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/images/logos/arcticicestudio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/components/atoms/core/Link/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { css } from "styled-components";
import { lighten, rgba } from "polished";

import { colors, themedMode, MODE_BRIGHT_SNOW_FLURRY, MODE_DARK_NIGHT_FROST } from "styles/theme";
import { colors, motion, themedMode, MODE_BRIGHT_SNOW_FLURRY, MODE_DARK_NIGHT_FROST } from "styles/theme";

const backgroundColorHover = themedMode({
[MODE_BRIGHT_SNOW_FLURRY]: rgba(colors.nord6, 0.45),
Expand Down Expand Up @@ -46,7 +46,8 @@ const fontColorHoverMinimal = themedMode({
const calmly = css`
border-radius: 0.25em;
color: ${fontColor};
transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
transition: color ${motion.speed.duration.transition.text.fade}ms ease-in-out,
background-color ${motion.speed.duration.transition.text.fade}ms ease-in-out;

&:hover,
&:active,
Expand All @@ -59,7 +60,7 @@ const calmly = css`
const decent = css`
border-bottom: 1px solid ${fontColor};
color: ${fontColorDecent};
transition: color 0.2s ease-in-out;
transition: color ${motion.speed.duration.transition.text.fade}ms ease-in-out;

&:hover,
&:active,
Expand All @@ -70,7 +71,7 @@ const decent = css`

const minimal = css`
border-bottom: 1px solid ${fontColor};
transition: border-bottom-color 0.2s ease-in-out;
transition: border-bottom-color ${motion.speed.duration.transition.text.fade}ms ease-in-out;

&:hover,
&:active,
Expand Down
14 changes: 9 additions & 5 deletions src/components/atoms/core/SiteMetadata/SiteMetadata.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const PureSiteMetadata = ({
description,
keywords: keywordsNord,
links: {
social: { twitter }
organization: {
social: { twitter }
}
},
title
},
Expand All @@ -38,7 +40,7 @@ const PureSiteMetadata = ({
}) => (
<Fragment>
<Helmet defaultTitle={title} titleTemplate={`${title} | %s`}>
<html lang="en" prefix="og: http://ogp.me/ns#" />
<html lang="en" />
<meta content={description} name="description" />
<meta content={author.name} name="author" />
<meta content={Array.from(new Set([...keywordsNord, ...keywordsNordDocs]))} name="keywords" />
Expand Down Expand Up @@ -110,9 +112,11 @@ const SiteMetadata = ({ pathName, ...passProp }) => (
description
keywords
links {
social {
twitter {
id
organization {
social {
twitter {
id
}
}
}
}
Expand Down
43 changes: 43 additions & 0 deletions src/components/atoms/core/vectors/divider/DividerSvg.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

import styled from "styled-components";

/**
* A styled SVG element with essential styles for divider vector graphic components.
*
* It applies two CSS styles to render problems and ensure SVG vector graphic components are handled as block-elements.
* Setting `dislay: block` is required to prevent gaps within the container caused by the SVG being treated as text
* element (`inline-block`) by default which gets affected by the `line-height` property. This can also be fixed by
* setting `line-height: 0` instead.
*
* Due to a bug or difference between Firefox and other browser rendering engines there is a `1px` gap between rendered
* SVGs elements and the following element.
* Applying `bottom: -1px` prevents these gaps, but unfortunately also requires following elements in the DOM to
* compensate for the resulting gap.
*
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://developer.mozilla.org/de/docs/Web/SVG
* @since 0.5.0
*/
const DividerSvg = styled.svg`
display: block;
bottom: -1px;
left: 0;
right: 0;
width: 100%;
background-color: transparent;
pointer-events: none;
user-select: none;
vertical-align: middle;
overflow: hidden;
`;

export default DividerSvg;
68 changes: 68 additions & 0 deletions src/components/atoms/core/vectors/divider/WaveFooter.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

import React from "react";
import { css } from "styled-components";
import { darken, lighten } from "polished";

import { colors, themedMode, MODE_BRIGHT_SNOW_FLURRY, MODE_DARK_NIGHT_FROST } from "styles/theme";

import { themeModeFillColorStyles } from "../shared/styles";
import DividerSvg from "./DividerSvg";

const fillColorWave1 = themedMode({
[MODE_BRIGHT_SNOW_FLURRY]: lighten(0.025, colors.nord6),
[MODE_DARK_NIGHT_FROST]: darken(0.02, colors.nord1)
});

const fillColorWave2 = themedMode({
[MODE_BRIGHT_SNOW_FLURRY]: lighten(0.035, colors.nord6),
[MODE_DARK_NIGHT_FROST]: darken(0.01, colors.nord1)
});

const fillColorWave3 = themedMode({
[MODE_BRIGHT_SNOW_FLURRY]: colors.background.sectioning.primary[MODE_BRIGHT_SNOW_FLURRY],
[MODE_DARK_NIGHT_FROST]: colors.background.sectioning.primary[MODE_DARK_NIGHT_FROST]
});

/**
* A SVG vector graphic divider component consisting of three overlapping waves.
*
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://developer.mozilla.org/de/docs/Web/SVG
* @since 0.5.0
*/
const WaveFooter = props => (
<DividerSvg {...props} viewBox="0 0 1920 250" xmlns="http://www.w3.org/2000/svg">
<path
css={css`
${themeModeFillColorStyles};
fill: ${fillColorWave1};
`}
d="M1920 250H0V0s126.707 78.536 349.975 80.05c177.852 1.203 362.805-63.874 553.803-63.874 290.517 0 383.458 57.712 603.992 61.408 220.527 3.696 278.059-61.408 412.23-17.239"
/>
<path
css={css`
${themeModeFillColorStyles};
fill: ${fillColorWave2};
`}
d="M1920 144s-467.917 116.857-1027.243-17.294C369.986 1.322 0 45.578 0 45.578V250h1920V144z"
/>
<path
css={css`
${themeModeFillColorStyles};
fill: ${fillColorWave3};
`}
d="M0 195.553s208.547-75.581 701.325-20.768c376.707 41.908 520.834-67.962 722.545-67.962 222.926 0 311.553 83.523 496.129 86.394V250H0v-54.447z"
/>
</DividerSvg>
);

export default WaveFooter;
21 changes: 21 additions & 0 deletions src/components/atoms/core/vectors/divider/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

/**
* @file Provides SVG vector graphic divider components.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://developer.mozilla.org/de/docs/Web/SVG
* @since 0.5.0
*/

import WaveFooter from "./WaveFooter";

/* eslint-disable-next-line import/prefer-default-export */
export { WaveFooter };
36 changes: 36 additions & 0 deletions src/components/atoms/core/vectors/icons/Discord.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

import React from "react";
import styled from "styled-components";

import { ReactComponent as DiscordSVG } from "assets/images/icons/simple-icons/discord.svg";

import { iconDefaultProps, iconPropTypes, themeModeFillColorStyles } from "../shared";

const DiscordIcon = styled(DiscordSVG)`
${themeModeFillColorStyles};
`;

/**
* The "Discord" logo icon from the "Simple Icons" project as styled SVG vector graphic component.
* By default, it uses the fill color and transition based on the current active global theme mode.
*
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://simpleicons.org
* @since 0.5.0
*/
const Discord = ({ className, svgRef }) => <DiscordIcon className={className} svgRef={svgRef} />;

Discord.propTypes = iconPropTypes;

Discord.defaultProps = iconDefaultProps;

export default Discord;
36 changes: 36 additions & 0 deletions src/components/atoms/core/vectors/icons/GitHub.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2018-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2018-present Sven Greb <[email protected]>
*
* Project: Nord Docs
* Repository: https://github.com/arcticicestudio/nord-docs
* License: MIT
*/

import React from "react";
import styled from "styled-components";

import { ReactComponent as GitHubSVG } from "assets/images/icons/simple-icons/github.svg";

import { iconDefaultProps, iconPropTypes, themeModeFillColorStyles } from "../shared";

const GitHubIcon = styled(GitHubSVG)`
${themeModeFillColorStyles};
`;

/**
* The "GitHub" logo icon from the "Simple Icons" project as styled SVG vector graphic component.
* By default, it uses the fill color and transition based on the current active global theme mode.
*
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://simpleicons.org
* @since 0.5.0
*/
const GitHub = ({ className, svgRef }) => <GitHubIcon className={className} svgRef={svgRef} />;

GitHub.propTypes = iconPropTypes;

GitHub.defaultProps = iconDefaultProps;

export default GitHub;
Loading