Skip to content

Commit

Permalink
secret
Browse files Browse the repository at this point in the history
  • Loading branch information
bukinoshita committed Nov 22, 2017
0 parents commit 46916e1
Show file tree
Hide file tree
Showing 22 changed files with 6,909 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.next
.env
.env.production
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: node_js
node_js:
- '8'
- '7'
74 changes: 74 additions & 0 deletions code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
40 changes: 40 additions & 0 deletions components/logo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions components/row.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict'

import React from 'react'

export default ({ children }) => (
<div>
{children}

<style jsx>{`
div {
max-width: 900px;
margin-left: auto;
margin-right: auto;
padding-left: 25px;
padding-right: 25px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
`}</style>
</div>
)
8 changes: 8 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributing to secret

1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device.
2. Install the dependencies: `yarn`
3. Make your changes
4. Your commit should look like this: [message] ([issue-url]) — eg: `add linter (https://github.com/bukinoshita/secret/issues/41)`
5. Run tests: `yarn test`
6. Send your [Pull Request](https://help.github.com/articles/creating-a-pull-request/) to the `master` branch
234 changes: 234 additions & 0 deletions layouts/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
'use strict'

import React from 'react'
import Head from 'next/head'
import Router from 'next/router'
import Link from 'next/link'
import Progress from 'nprogress'
import PropTypes from 'prop-types'

import Row from './../components/row'
import Logo from './../components/logo'

import pkg from './../package'
import { colors, typography } from './../theme'

let progress
const stopProgress = () => {
clearTimeout(progress)
Progress.done()
}

Router.onRouteChangeStart = () => {
progress = setTimeout(Progress.start, 200)
}

Router.onRouteChangeComplete = stopProgress
Router.onRouteChangeError = stopProgress

if (global.document) {
const info = [
`Version: ${pkg.version}`,
`Find the code here: https://github.com/${pkg.repository}`,
`Have a great day! 🎉`
]

for (const message of info) {
console.log(message)
}
}

const Page = ({ children }) => {
return (
<main>
<Head>
<title>
{pkg.name}{pkg.description}
</title>

<meta name="theme-color" content={colors.black} />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charSet="utf-8" />
<meta name="description" content={pkg.description} />
<meta name="keywords" content={pkg.keywords} />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@bukinoshita" />
<meta name="twitter:creator" content="@bukinoshita" />
<meta name="twitter:title" content={pkg.name} />
<meta name="twitter:description" content={pkg.description} />
<meta
property="twitter:image:src"
content={`https://getsecret.now.sh/static/cover.png`}
/>

<meta property="og:url" content="https://getsecret.now.sh" />
<meta property="og:type" content="website" />
<meta property="og:title" content={pkg.name} />
<meta property="og:image" content="static/cover.png" />
<meta property="og:description" content={pkg.description} />
<meta property="og:site_name" content={pkg.name} />

<link rel="apple-touch-icon" href="/static/icon.png" />
<link rel="icon" href="/static/icon.png" type="image/png" />

<script
async
src="https://www.googletagmanager.com/gtag/js?id=UA-110046805-1"
/>
<script src="/static/analytics.js" />
</Head>

<Row>
<header>
<Link prefetch href="/">
<div>
<Logo />

<p>
send a message through a safe, private, and encrypted link that
automatically expires to ensure your stuff does not remain
online forever.
</p>
</div>
</Link>
</header>

{children}

<footer>
<span>
created by{' '}
<a href="https://twitter.com/bukinoshita">@bukinoshita</a> /{' '}
<a href="https://github.com/bukinoshita/secret">github</a>
</span>
</footer>
</Row>

<style jsx>{`
main {
position: relative;
min-height: 100vh;
}
header {
text-align: center;
height: 350px;
display: flex;
align-items: center;
}
header div {
width: 100%;
cursor: pointer;
}
p {
color: ${colors.gray};
margin-top: 20px;
font-size: ${typography.f14};
line-height: 24px;
max-width: 500px;
margin-left: auto;
margin-right: auto;
}
footer {
position: absolute;
bottom: 30px;
left: 0;
right: 0;
text-align: center;
}
span {
color: ${colors.gray};
font-size: ${typography.f12};
text-align: center;
display: block;
}
a {
color: ${colors.white};
font-weight: ${typography.bold};
position: relative;
}
a:after {
content: '';
height: 1px;
background-color: ${colors.white};
position: absolute;
pointer-events: none;
bottom: -4px;
left: 0;
right: 0;
opacity: 0;
transform: scale(0, 1);
transition: all 200ms;
}
a:hover:after {
opacity: 1;
transform: scale(1, 1);
}
`}</style>

<style jsx global>
{`
* {
padding: 0;
margin: 0;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
font-family: -apple-system, system-ui, BlinkMacSystemFont,
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
body {
background-color: ${colors.black};
}
a {
text-decoration: none;
}
li {
list-style: none;
}
img {
max-width: 100%;
}
#nprogress {
pointer-events: none;
}
#nprogress .bar {
background: ${colors.black};
position: fixed;
z-index: 1031;
top: 0;
left: 0;
width: 100%;
height: 2px;
}
#nprogress .peg {
display: block;
position: absolute;
right: 0px;
width: 100px;
height: 100%;
box-shadow: 0 0 10px ${colors.black}, 0 0 5px ${colors.black};
opacity: 1;
transform: rotate(3deg) translate(0px, -4px);
}
svg {
vertical-align: middle;
}
`}
</style>
</main>
)
}

Page.propTypes = {
children: PropTypes.node
}

export default Page
Loading

0 comments on commit 46916e1

Please sign in to comment.