-
Notifications
You must be signed in to change notification settings - Fork 32
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
uploaded new favicon files #118
Changes from all commits
97c7d36
b2ca0e2
5facfe5
6f273e9
7744b54
dce7d4b
599c1d1
8eed71a
dbc314d
2aab2e8
f7b2c2b
9d44a11
0d22801
e7aa230
331c4cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
{ | ||
"name": "primer-style", | ||
"alias": "primer.style", | ||
"type": "static", | ||
"static": { | ||
"trailingSlash": true | ||
} | ||
"type": "static" | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"public": "docs", | ||
"trailingSlash": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* eslint-disable github/unescaped-html-literal */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our eslint rules don't like unescaped HTML literals, which is definitely good. It's not currently possible to inject unsafe markup into these elements (via |
||
const {join} = require('path') | ||
const {copyFileSync} = require('fs') | ||
const mkdirp = require('mkdirp') | ||
|
||
const argIndex = process.argv.indexOf('--out-dir') | ||
const outDir = argIndex > -1 ? process.argv[argIndex + 1] : 'docs' | ||
const iconsDir = join(outDir, 'icons') | ||
|
||
mkdirp.sync(iconsDir) | ||
|
||
const path = file => { | ||
copyFileSync(join(__dirname, file), join(iconsDir, file)) | ||
return `/icons/${file}` | ||
} | ||
|
||
const link = ({rel = 'icon', type = 'image/png', file}) => `<link rel="${rel}" type="${type}" href="${path(file)}">` | ||
|
||
const meta = ({name, file}) => `<link name="${name}" content="${path(file)}">` | ||
|
||
module.exports = [ | ||
link({rel: 'icon', type: 'image/png', sizes: '32x32', file: 'favicon-32.png'}), | ||
link({rel: 'icon', type: 'image/png', sizes: '48x48', file: 'favicon-48.png'}), | ||
link({rel: 'icon', type: 'image/png', sizes: '96x96', file: 'favicon-96.png'}), | ||
link({rel: 'icon', type: 'image/png', sizes: '144x144', file: 'favicon-144.png'}), | ||
link({rel: 'icon', type: 'image/png', sizes: '192x192', file: 'favicon-192.png'}), | ||
link({rel: 'apple-touch-icon', sizes: '120x120', file: 'touch-icon-iphone.png'}), | ||
link({rel: 'apple-touch-icon', sizes: '152x152', file: 'touch-icon-ipad.png'}), | ||
link({rel: 'apple-touch-icon', sizes: '167x167', file: 'touch-icon-ipad-retina.png'}), | ||
link({rel: 'apple-touch-icon', sizes: '180x180', file: 'touch-icon-iphone-retina.png'}), | ||
link({rel: 'icon', type: 'image/png', sizes: '192x192', file: 'android-icon.png'}), | ||
meta({name: 'msapplication-square310x310logo', file: 'microsoft-icon.png'}) | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
const icons = require('./icons') | ||
|
||
module.exports = ({html = '', css = '', scripts, title}) => | ||
`<!DOCTYPE html> | ||
<head> | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-126681523-1"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'UA-126681523-1'); | ||
</script> | ||
|
||
<title>${title}</title> | ||
<meta charset='utf-8'> | ||
<meta name='viewport' content='width=device-width,initial-scale=1' /> | ||
<link rel='stylesheet' href='https://unpkg.com/primer-layout/build/build.css' /> | ||
<link rel="apple-touch-icon" href="https://user-images.githubusercontent.com/334891/45369221-63075b00-b5b3-11e8-8ac7-7e588fe4c905.png"> | ||
<link rel="icon" href="https://user-images.githubusercontent.com/334891/45369187-51be4e80-b5b3-11e8-8066-b06025239a79.png"> | ||
<title>${title}</title> | ||
|
||
${icons.join('\n ')} | ||
|
||
<meta name="keywords" content="Design System" /> | ||
<meta property="og:article:author" content="GitHub Design Systems team" /> | ||
<meta property="og:title" content="Primer" /> | ||
|
@@ -28,6 +20,17 @@ module.exports = ({html = '', css = '', scripts, title}) => | |
<meta property="og:image:height" content="630" /> | ||
<meta property="twitter:card" content="summary_large_image" /> | ||
<meta property="twitter:site" content="@githubprimer" /> | ||
|
||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-126681523-1"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', 'UA-126681523-1'); | ||
</script> | ||
|
||
<link rel='stylesheet' href='https://unpkg.com/@primer/css/dist/layout.css' /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI, this is the new unpkg URL for the layout bundle in |
||
${css} | ||
</head> | ||
<body> | ||
|
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.
serve
kept complaining so I updated. 🤷♂️