-
Notifications
You must be signed in to change notification settings - Fork 615
Deploy with Now, inline CSS #221
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
Merged
Merged
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
43b03e6
set top, zIndex default props on Sticky
shawnbot 9be4fcd
make top nav sticky, simplify App
shawnbot 15724d5
just export the component page
shawnbot 7338865
add pl={3} to examples top nav
shawnbot 853fa75
refactor SideNav to take basename, etc.
shawnbot e03897b
add examples/doc-components/index; kill GitHubAvatar
shawnbot 839c2f6
add custom Library component to replace kit's
shawnbot 1b23930
use new Library, add landing route for Demos
shawnbot dc758b3
use new Library, add landing route for Components
shawnbot de145fd
lint
shawnbot a01d902
clean up doc-components imports
shawnbot d31377f
tidy up Flex examples
shawnbot eebf010
tidy demo code samples
shawnbot 89ece36
tidy up Library and example listings
shawnbot ffc9755
simplify SideNav
shawnbot 7df0063
add widths to Library columns
shawnbot c130602
shrink SideNav box
shawnbot 86a619d
set examples top nav z-index to 100
shawnbot c2e07c2
reorganize demos
shawnbot 2496f80
sort Library examples alphabetically
shawnbot 9ab97b4
factor out redundant example constant names
shawnbot 5ba47ae
add home page link, dry up top nav
shawnbot 05c803b
massage whitespace around content area
shawnbot 8a714b9
linkt
shawnbot 1319771
[skip ci] build docs
shawnbot d92297c
[skip ci] skip ci plz
shawnbot 216325c
[skip ci] update bundle
shawnbot a6b8970
[skip ci] Merge remote-tracking branch 'origin/release-2.0.0-beta' in…
shawnbot 634cfa4
remove home page
shawnbot 64ebb46
remove home page link, octicon
shawnbot 743526c
move html.js -> examples/.html.js
shawnbot 5633a88
[skip ci] rebuild docs
shawnbot 5a1b18a
bring back flexDirection
shawnbot c3979bf
[skip ci] rebuild docs
shawnbot f87779e
Merge remote-tracking branch 'origin/release-2.0.0-beta' into fewer-s…
shawnbot 960dad5
[skip ci] Merge remote-tracking branch 'origin/master' into fewer-scr…
shawnbot 675b591
try fixed basename
shawnbot db058bb
[skip ci] update docs
shawnbot b76d9b8
[skip ci] derp, fix /demos/ basename
shawnbot 5041ca9
[skip ci] update docs again
shawnbot 7573b46
add trailing slash to top nav links
shawnbot e54aa42
[skip ci] update docs
shawnbot 7c26a14
[skip ci] use primer.github.io favicon
shawnbot 31d7680
tidy up colors demo
shawnbot d6be18a
flesh out CircleOcticon examples
shawnbot 9837a73
remove <Box> from MergeBox and MergeButton demos
shawnbot 83a69b6
[skip ci] build docs
shawnbot 8f8b7c2
suggest node >=8
shawnbot 47d8c78
nix basename from redirect URL, tidy
shawnbot 0904e9c
rename .html.js to _html.js, tidy
shawnbot 15fd3bb
rename build run-script to dist
shawnbot 088a958
add now.json for static deployment
shawnbot ab4c5eb
update package-lock.json
shawnbot 821eb84
[skip ci] rebuild docs
shawnbot fd73f5c
lint
shawnbot 3e38e6e
add local favicon.png
shawnbot d255182
add primer-react.scs
shawnbot 0037a30
add primer-react CSS export
shawnbot d675c63
inline the css
shawnbot edf5454
update package-lock.json
shawnbot 35beea3
use our Octicon with utility props
shawnbot d3858ca
ok maybe we do need primer-utilities
shawnbot fe9b395
factor out utility classes in examples
shawnbot a57eb39
install primer-utilities
shawnbot 133f8e1
add deploy run script
shawnbot 317ce9a
[skip ci] rebuild docs
shawnbot 6637913
fix padding on docs
shawnbot 55142ab
include primer-css subset in Styles component, not in HTML template
shawnbot c50bb20
DRY up Library component with Content block
shawnbot d6ab271
[skip ci] rebuild docs
shawnbot 048d26a
lint
shawnbot b899d03
[skip ci] build docs
shawnbot 4b063e6
move styles up to avoid FOUC
shawnbot f3df934
[skip ci] build docs
shawnbot d0e0fdf
move primer CSS back into <head>
shawnbot 92b37aa
[skip ci] build docs
shawnbot b8fff5e
lint
shawnbot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
.DS_Store | ||
coverage/ | ||
dist/ | ||
docs/TEMP/ | ||
node_modules | ||
npm-debug.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const css = require('../src/css') | ||
|
||
module.exports = ({html = '', scripts, title = 'primer-react', static: staticBuild}) => | ||
`<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>${title}</title> | ||
<meta name='viewport' content='width=device-width,initial-scale=1' /> | ||
<meta name='generator' content='Compositor X0' /> | ||
<meta name='og:title' content='Primer React' /> | ||
<meta name='description' content='Primer components built with React.js.' /> | ||
<link rel='icon' href='/assets/favicon.png' /> | ||
<style id="primer-css">${css}</style> | ||
</head> | ||
<body> | ||
<script> | ||
(function() { | ||
var redirect = sessionStorage.redirect | ||
delete sessionStorage.redirect | ||
if (redirect && redirect !== location.href) { | ||
history.replaceState(null, null, redirect) | ||
} | ||
})() | ||
</script> | ||
<div id="root">${html}</div> | ||
</body> | ||
</html> | ||
${staticBuild ? '' : scripts} | ||
` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import React from 'react' | ||
import {Check} from '@githubprimer/octicons-react' | ||
import {Check, X, Zap} from '@githubprimer/octicons-react' | ||
import {LiveEditor} from '@compositor/kit' | ||
import {CircleOcticon} from '../../src' | ||
import {CircleOcticon, FlexContainer} from '../../src' | ||
|
||
const CircleOcticonExample = { | ||
export default { | ||
name: 'CircleOcticon', | ||
element: ( | ||
<div className="d-flex"> | ||
<LiveEditor | ||
code={`<CircleOcticon icon={Check} size={32} bg="green.5" color="white" />`} | ||
scope={{CircleOcticon, Check}} | ||
/> | ||
</div> | ||
<LiveEditor | ||
code={` | ||
<FlexContainer> | ||
<CircleOcticon icon={Check} size={32} bg="green.5" color="white" mr={2} /> | ||
<CircleOcticon icon={Zap} size={48} bg="blue.5" color="white" mr={2} /> | ||
<CircleOcticon icon={X} size={64} bg="red.5" color="white" mr={2} /> | ||
</FlexContainer> | ||
`.trim()} | ||
scope={{CircleOcticon, Check, FlexContainer, X, Zap}} | ||
/> | ||
) | ||
} | ||
|
||
export default CircleOcticonExample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use this babel plugin to inline the CSS.