Merge branch 'master' into search

This commit is contained in:
Vanessa Yuen 2018-01-05 23:31:14 +01:00
Родитель f7364fd158 bb4b65744b
Коммит 63f483fc15
51 изменённых файлов: 1714 добавлений и 80607 удалений

Просмотреть файл

@ -48,10 +48,10 @@ For more info about how this site works and how to contribute, see
- [Views](CONTRIBUTING.md#views)
- [Context](CONTRIBUTING.md#context)
- [Styles](CONTRIBUTING.md#styles)
- [Fontend JavaScript](CONTRIBUTING.md#frontend-javascript)
- [Frontend JavaScript](CONTRIBUTING.md#frontend-javascript)
- [Scripts](CONTRIBUTING.md#scripts)
- [Environment Variables](CONTRIBUTING.md#environment-variables)
## License
[MIT](LICENSE.md)
[MIT](LICENSE.md)

Просмотреть файл

@ -1,6 +1,8 @@
---
title: 'Project of the Week: Beaker Browser'
author: zeke
author:
- pfrazee
- zeke
date: '2017-02-07'
---

Просмотреть файл

@ -1,6 +1,10 @@
---
title: 'Project of the Week: Dat'
author: zeke
author:
- karissa
- yoshuawuyts
- maxogden
- zeke
date: '2017-02-21'
---

Просмотреть файл

@ -1,6 +1,8 @@
---
title: 'Project of the Week: Ghost'
author: zeke
author:
- felixrieseberg
- zeke
date: '2017-02-14'
---

Просмотреть файл

@ -1,6 +1,9 @@
---
title: 'Project of the Week: Jasper'
author: zeke
author:
- h13i32maru
- watilde
- zeke
date: '2017-03-21'
---

Просмотреть файл

@ -1,6 +1,9 @@
---
title: 'Project of the Week: Kap'
author: zeke
author:
- skllcrn
- sindresorhus
- zeke
date: '2017-01-31'
---

Просмотреть файл

@ -4,7 +4,7 @@ author: zeke
date: '2017-06-01'
---
The `electron` npm package now includes a TypeScript definition file that provides detailed annotations of the entire Electron API. These annotation can improve your Electron development
The `electron` npm package now includes a TypeScript definition file that provides detailed annotations of the entire Electron API. These annotations can improve your Electron development
experience **even if you're writing vanilla JavaScript**. Just
`npm install electron` to get up-to-date Electron typings in your project.

Просмотреть файл

@ -1,6 +1,9 @@
---
title: 'Project of the Week: Voltra'
author: zeke
author:
- '0x00A'
- aprileelcich
- zeke
date: '2017-03-07'
---

Просмотреть файл

@ -1,6 +1,8 @@
---
title: 'Project of the Week: WebTorrent'
author: zeke
author:
- feross
- zeke
date: '2017-03-14'
---

Просмотреть файл

@ -1,6 +1,9 @@
---
title: 'Project of the Week: WordPress Desktop'
author: zeke
author:
- mkaz
- johngodley
- zeke
date: '2017-02-28'
---

Просмотреть файл

@ -18,6 +18,11 @@ docs:
guides: Guides
api_reference: API Reference
advanced: Advanced
footer:
propose_change: Improve this doc
version_history: Version history
translate: Translate this doc
view_all_docs: All Docs on One Page
languages:
choose_language: Choose Your Site Language
@ -90,10 +95,10 @@ get_started:
explore:
title: Explore the Electron APIs
description:
The <a href="https://github.com/electron/electron-api-demos">Electron API Demos app</a>
"The <a href='https://github.com/electron/electron-api-demos'>Electron API Demos app</a>
interactively demonstrates the most important features of the Electron API.
See what's possible with Electron with sample code and helpful tips for
building your app.
building your app."
download_from_github: Download from GitHub
view_all_releases_on_github: <a href="https://github.com/electron/electron-api-demos/releases">View all releases</a> on GitHub
@ -122,12 +127,6 @@ taglines:
help_translate: "Help translate"
footer:
see_something: See something that needs fixing?
propose_change: Propose a change to the source file.
need_different_version: Need a different version of the docs?
see_available_versions: See available versions.
want_something_searchable: Want something searchable?
view_all_docs: View all docs on one page
see_the_faq: See the frequently asked questions
apps:

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -22,17 +22,24 @@ async function parsePost (filename) {
if (!post.date) throw new Error(`${filename} is missing a date attribute`)
let [year, month, day] = post.date.split('-')
post.href2 = `/blog/${year}/${month}/${day}/${post.slug}`
if (!Array.isArray(post.author)) { post.author = [post.author] }
post.author = post.author.map(a => { return { name: a } })
const imageRegex = /<img[^>]+src="?([^"\s]+)"?[^>]*>/g
let imageCatch = imageRegex.exec(post.content)
if (imageCatch) post.image = imageCatch[1]
return post
}
module.exports = function blogHandler (req, res, next) {
if (!req.path.startsWith('/blog')) return next()
const isFeed = ['/blog.xml', '/blog.json'].indexOf(req.path) > -1
if (!(req.path.startsWith('/blog') || isFeed)) return next()
const context = Object.assign(req.context, {posts: posts})
if (req.path === '/blog') {
return res.render('posts/index', context)
}
if (isFeed) return next()
// redirect /blog/2016/09/27/foo to /blog/foo
const parts = req.path.split('/')

Просмотреть файл

@ -1,6 +1,6 @@
const i18n = require('lib/i18n')
const vendoredVersions = require('data/versions.json')
.find(version => version.version === i18n.electronLatestStableVersion)
const releases = require('electron-releases')
const {deps} = releases.find(release => release.version === i18n.electronLatestStableVersion)
const {getLanguageNativeName} = require('locale-code')
// Supply all route handlers with a baseline `req.context` object
@ -23,7 +23,8 @@ module.exports = function contextBuilder (req, res, next) {
req.context = {
electronLatestStableVersion: i18n.electronLatestStableVersion,
electronLatestStableTag: i18n.electronLatestStableTag,
vendoredVersions: vendoredVersions,
releases: releases,
deps: deps,
currentLocale: req.language,
currentLocaleNativeName: getLanguageNativeName(req.language),
locales: i18n.locales,

369
package-lock.json сгенерированный
Просмотреть файл

@ -10,6 +10,15 @@
"integrity": "sha512-uzp4YLo3iaiI/ehncVFjv3RMi8Ag4CJI9b2FytpKYsn84Ty15cj1B/yuoTHAIFUc2qdYs1A6McjxFe99pXUWGg==",
"dev": true
},
"JSONStream": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
"integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=",
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
}
},
"abbrev": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
@ -1273,9 +1282,9 @@
"resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.0.2.tgz",
"integrity": "sha1-+GzWzvT1MAyOY+B6TVEvZfv/RTE=",
"requires": {
"JSONStream": "1.3.1",
"combine-source-map": "0.7.2",
"defined": "1.0.0",
"JSONStream": "1.3.1",
"through2": "2.0.3",
"umd": "3.0.1"
}
@ -1368,6 +1377,7 @@
"resolved": "https://registry.npmjs.org/browserify/-/browserify-14.4.0.tgz",
"integrity": "sha1-CJo0Y69Y0OSNjNQHCz90ZU1avKk=",
"requires": {
"JSONStream": "1.3.1",
"assert": "1.4.1",
"browser-pack": "6.0.2",
"browser-resolve": "1.11.2",
@ -1389,7 +1399,6 @@
"https-browserify": "1.0.0",
"inherits": "2.0.3",
"insert-module-globals": "7.0.1",
"JSONStream": "1.3.1",
"labeled-stream-splicer": "2.0.0",
"module-deps": "4.1.1",
"os-browserify": "0.1.2",
@ -1860,6 +1869,16 @@
"integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
"dev": true
},
"clean-deep": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/clean-deep/-/clean-deep-3.0.2.tgz",
"integrity": "sha512-sLUtFxYtHc3jM9pmwyYXOLln0nnQ1OhFrefQ7nqUlva1crHDbi4gVO+nnMSm5jztFXIRDMt+kMNh0mOscbARow==",
"requires": {
"lodash.isempty": "4.4.0",
"lodash.isplainobject": "4.0.6",
"lodash.transform": "4.6.0"
}
},
"cli-boxes": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz",
@ -2574,6 +2593,22 @@
"minimalistic-assert": "1.0.0"
}
},
"description": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/description/-/description-0.0.2.tgz",
"integrity": "sha512-CFp51cDtQl3GC9wnm2n4K0YhoCRI4I3sPAaRhxFqwtMOahoQIHXGgR20JdDtHYJ+4pyZQG7VplaxGOWeS18KyA==",
"requires": {
"remove-markdown": "0.2.2",
"striptags": "3.1.1"
},
"dependencies": {
"striptags": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/striptags/-/striptags-3.1.1.tgz",
"integrity": "sha1-yMPn/db7S7OjKjt1LltePjgJPr0="
}
}
},
"destroy": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
@ -2764,21 +2799,31 @@
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"electron-api-historian": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/electron-api-historian/-/electron-api-historian-1.1.0.tgz",
"integrity": "sha512-9VuCE2+GjTOhFnnm1tNLXQcLzfnksm/BH2dP/bZQvIjBp0HwWObOZvmAi605ZX/hgII6Jx8ewUvjzI4/yGl6Ag=="
},
"electron-apps": {
"version": "1.1985.0",
"resolved": "https://registry.npmjs.org/electron-apps/-/electron-apps-1.1985.0.tgz",
"integrity": "sha512-VA96jaW93gfobbYeXzcwuG9cDM3BhgOBtIZqYVAMNAnvN9AidRnSZ/Yv1dDNy8KOp9Cvnj3LDtSrzOQJ2bgBSQ=="
"version": "1.2027.0",
"resolved": "https://registry.npmjs.org/electron-apps/-/electron-apps-1.2027.0.tgz",
"integrity": "sha512-NLmc8re7xxUhoLiCtgWp6h4wdqdpa2BDSGiTCtUdNpkUKpce2e8XX5HjF24YmPBGEKzmR9rFtn2oIa89B2qsPw=="
},
"electron-i18n": {
"version": "0.28.1",
"resolved": "https://registry.npmjs.org/electron-i18n/-/electron-i18n-0.28.1.tgz",
"integrity": "sha512-YMPRsVEJZMEblEKaz1yfxnyfXm67JP8xQwl9CVEx4iovzcE29pY5CK11IEnyOXYnrfuRyO6fRmBeHB6J/bzyvg=="
"version": "0.35.0",
"resolved": "https://registry.npmjs.org/electron-i18n/-/electron-i18n-0.35.0.tgz",
"integrity": "sha512-Fi4upnzrD4XscX7ZVUXNp1HGdYIXC396Jd/IOpdAG6Q8qZ0ZilltAFeVAO/ibDUGiLp1ZFXiL0qa1dn7mrnSow=="
},
"electron-npm-packages": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/electron-npm-packages/-/electron-npm-packages-2.5.1.tgz",
"integrity": "sha1-5KtV7VM+PNZtWp1TX+bE46jKUQo="
},
"electron-releases": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/electron-releases/-/electron-releases-2.1.0.tgz",
"integrity": "sha512-cyKFD1bTE/UgULXfaueIN1k5EPFzs+FRc/rvCY5tIynefAPqopQEgjr0EzY+U3Dqrk/G4m9tXSPuZ77v6dL/Rw=="
},
"electron-to-chromium": {
"version": "1.3.26",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.26.tgz",
@ -3620,6 +3665,14 @@
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
"dev": true
},
"feed": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/feed/-/feed-1.1.1.tgz",
"integrity": "sha1-kUiXUX6U+jJ8xvc7tYWkfEqe0yE=",
"requires": {
"xml": "1.0.1"
}
},
"figures": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
@ -4462,13 +4515,6 @@
}
}
},
"string_decoder": {
"version": "1.0.1",
"bundled": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"string-width": {
"version": "1.0.2",
"bundled": true,
@ -4478,6 +4524,13 @@
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.1",
"bundled": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"stringstream": {
"version": "0.0.5",
"bundled": true,
@ -5257,18 +5310,17 @@
}
},
"hubdown": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/hubdown/-/hubdown-1.1.0.tgz",
"integrity": "sha512-jPCQKH7lZ/yaRi4MB3a89Q0R/9fl5rBDW2ilh8J3/Uk6KD85ocLOg7AtqCKHfQe/yPkjm7MWh1Ndw6aicgYYXA==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/hubdown/-/hubdown-2.0.0.tgz",
"integrity": "sha512-9/yefUgZzGM4Z++Qd/KzJAqZQJ5C72f0EWYg6yoBcipzd2DNyWLyjeTLF+fSc2jKLLKhP2V0dXykkXtBH010wA==",
"requires": {
"gray-matter": "3.1.1",
"pify": "3.0.0",
"remark": "8.0.0",
"remark-autolink-headings": "5.0.0",
"remark-github": "7.0.2",
"remark-highlight.js": "5.0.0",
"remark-html": "6.0.1",
"remark-inline-links": "3.0.4",
"remark-inline-links": "3.1.0",
"remark-slug": "4.2.3"
},
"dependencies": {
@ -5420,10 +5472,10 @@
"resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.0.1.tgz",
"integrity": "sha1-wDv04BywhtW15azorQr+eInWOMM=",
"requires": {
"JSONStream": "1.3.1",
"combine-source-map": "0.7.2",
"concat-stream": "1.5.2",
"is-buffer": "1.1.5",
"JSONStream": "1.3.1",
"lexical-scope": "1.2.0",
"process": "0.11.10",
"through2": "2.0.3",
@ -5916,12 +5968,6 @@
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
"integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg="
},
"json-parse-better-errors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz",
"integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==",
"dev": true
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
@ -5974,15 +6020,6 @@
"integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=",
"dev": true
},
"JSONStream": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz",
"integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=",
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
}
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
@ -6290,11 +6327,21 @@
"integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
"dev": true
},
"lodash.isempty": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz",
"integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4="
},
"lodash.isfinite": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz",
"integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M="
},
"lodash.isplainobject": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
},
"lodash.keys": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
@ -6327,6 +6374,11 @@
"integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
"dev": true
},
"lodash.transform": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.transform/-/lodash.transform-4.6.0.tgz",
"integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A="
},
"longest": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
@ -6453,7 +6505,7 @@
"integrity": "sha1-zbX4TitqLTEU3zO9BdnLMuPECDo=",
"requires": {
"unist-util-modify-children": "1.1.1",
"unist-util-visit": "1.2.0"
"unist-util-visit": "1.3.0"
}
},
"mdast-util-definitions": {
@ -6461,7 +6513,7 @@
"resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-1.2.2.tgz",
"integrity": "sha512-9NloPSwaB9f1PKcGqaScfqRf6zKOEjTIXVIbPOmgWI/JKxznlgVXC5C+8qgl3AjYg2vJBRgLYfLICaNiac89iA==",
"requires": {
"unist-util-visit": "1.2.0"
"unist-util-visit": "1.3.0"
}
},
"mdast-util-to-hast": {
@ -6478,7 +6530,7 @@
"unist-builder": "1.0.2",
"unist-util-generated": "1.1.1",
"unist-util-position": "3.0.0",
"unist-util-visit": "1.2.0",
"unist-util-visit": "1.3.0",
"xtend": "4.0.1"
}
},
@ -6497,12 +6549,6 @@
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"memorystream": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
"integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
"dev": true
},
"meow": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
@ -6687,6 +6733,7 @@
"resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz",
"integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=",
"requires": {
"JSONStream": "1.3.1",
"browser-resolve": "1.11.2",
"cached-path-relative": "1.0.1",
"concat-stream": "1.5.2",
@ -6694,7 +6741,6 @@
"detective": "4.5.0",
"duplexer2": "0.1.4",
"inherits": "2.0.3",
"JSONStream": "1.3.1",
"parents": "1.0.1",
"readable-stream": "2.3.3",
"resolve": "1.4.0",
@ -7049,144 +7095,6 @@
}
}
},
"npm-run-all": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.2.tgz",
"integrity": "sha512-Z2aRlajMK4SQ8u19ZA75NZZu7wupfCNQWdYosIi8S6FgBdGf/8Y6Hgyjdc8zU2cYmIRVCx1nM80tJPkdEd+UYg==",
"dev": true,
"requires": {
"ansi-styles": "3.2.0",
"chalk": "2.3.0",
"cross-spawn": "5.1.0",
"memorystream": "0.3.1",
"minimatch": "3.0.4",
"ps-tree": "1.1.0",
"read-pkg": "3.0.0",
"shell-quote": "1.6.1",
"string.prototype.padend": "3.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz",
"integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==",
"dev": true,
"requires": {
"color-convert": "1.9.1"
}
},
"chalk": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz",
"integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==",
"dev": true,
"requires": {
"ansi-styles": "3.2.0",
"escape-string-regexp": "1.0.5",
"supports-color": "4.5.0"
}
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"dev": true,
"requires": {
"lru-cache": "4.1.1",
"shebang-command": "1.2.0",
"which": "1.3.0"
}
},
"has-flag": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
"dev": true
},
"load-json-file": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
"integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
"dev": true,
"requires": {
"graceful-fs": "4.1.11",
"parse-json": "4.0.0",
"pify": "3.0.0",
"strip-bom": "3.0.0"
}
},
"lru-cache": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
"integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
"dev": true,
"requires": {
"pseudomap": "1.0.2",
"yallist": "2.1.2"
}
},
"parse-json": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"dev": true,
"requires": {
"error-ex": "1.3.1",
"json-parse-better-errors": "1.0.1"
}
},
"path-type": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
"integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
"dev": true,
"requires": {
"pify": "3.0.0"
}
},
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"dev": true
},
"read-pkg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
"integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
"dev": true,
"requires": {
"load-json-file": "4.0.0",
"normalize-package-data": "2.4.0",
"path-type": "3.0.0"
}
},
"strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
"dev": true
},
"supports-color": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
"integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
"dev": true,
"requires": {
"has-flag": "2.0.0"
}
},
"which": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
"integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
"dev": true,
"requires": {
"isexe": "2.0.0"
}
}
}
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@ -7556,6 +7464,14 @@
"error-ex": "1.3.1"
}
},
"parse-link-header": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz",
"integrity": "sha1-vt/g0hGK64S+deewJUGeyKYRQKc=",
"requires": {
"xtend": "4.0.1"
}
},
"parsejson": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/parsejson/-/parsejson-0.0.3.tgz",
@ -7832,23 +7748,17 @@
"integrity": "sha1-y+NiRxPP9IAfSqBTGsP58iTTOqU="
},
"primer-breadcrumb": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/primer-breadcrumb/-/primer-breadcrumb-1.0.2.tgz",
"integrity": "sha1-WVi8DbEJV/ZBQXAHyrfJybSkk/8=",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/primer-breadcrumb/-/primer-breadcrumb-1.5.0.tgz",
"integrity": "sha1-z+eMQpHwUDHX87fa2SFi6FcW12w=",
"requires": {
"primer-marketing-support": "1.3.1",
"primer-support": "4.4.1"
"primer-support": "4.5.1"
}
},
"primer-marketing-support": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/primer-marketing-support/-/primer-marketing-support-1.3.1.tgz",
"integrity": "sha512-GDwQ4TdZNS4p6UbSMxv7j7DlgegEDU43k2QKFJZ9EAtBN/rOKkf9gBa31yEiJQvgG7wZ84CvioObYtw885TL7g=="
},
"primer-support": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/primer-support/-/primer-support-4.4.1.tgz",
"integrity": "sha512-stQEoF4NfWy8JOVASUHxGY+Ot1eBguPH8rWoeLQy16zKzcS16kRccfvGbBXyv0G/aA+DdL8ZmjlXB2ubJ+wBJg=="
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/primer-support/-/primer-support-4.5.1.tgz",
"integrity": "sha1-MnOm79A2ugBTlEfWm6ZpvosR32Y="
},
"private": {
"version": "0.1.8",
@ -8269,19 +8179,7 @@
"resolved": "https://registry.npmjs.org/remark-autolink-headings/-/remark-autolink-headings-5.0.0.tgz",
"integrity": "sha1-nAD+2NCrM/upzOg9/2am/djvsx8=",
"requires": {
"unist-util-visit": "1.2.0"
}
},
"remark-github": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/remark-github/-/remark-github-7.0.2.tgz",
"integrity": "sha1-4+LK/Ke1Gbw6HPIVxX2QZgU0hPY=",
"requires": {
"is-alphabetical": "1.0.1",
"is-decimal": "1.0.1",
"is-hexadecimal": "1.0.1",
"mdast-util-to-string": "1.0.4",
"unist-util-visit": "1.2.0"
"unist-util-visit": "1.3.0"
}
},
"remark-highlight.js": {
@ -8290,7 +8188,7 @@
"integrity": "sha1-Ro+4rG4XAr1E7pZw4XLibi+g8Fo=",
"requires": {
"lowlight": "1.9.1",
"unist-util-visit": "1.2.0"
"unist-util-visit": "1.3.0"
}
},
"remark-html": {
@ -8305,13 +8203,13 @@
}
},
"remark-inline-links": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/remark-inline-links/-/remark-inline-links-3.0.4.tgz",
"integrity": "sha1-kdhY13bR7T7jHv06wOQix8GYZtc=",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/remark-inline-links/-/remark-inline-links-3.1.0.tgz",
"integrity": "sha512-XHEBq2FfrQXKyRVO+eolg0zb65yLak3x0hBUg5K49cBN6mFGLPiWzVdkGt9XnUuNYHLwJjZ4v05CT7lwqulQQQ==",
"requires": {
"mdast-util-definitions": "1.2.2",
"unist-util-remove": "1.0.0",
"unist-util-visit": "1.2.0"
"unist-util-visit": "1.3.0"
}
},
"remark-parse": {
@ -8343,7 +8241,7 @@
"requires": {
"github-slugger": "1.2.0",
"mdast-util-to-string": "1.0.4",
"unist-util-visit": "1.2.0"
"unist-util-visit": "1.3.0"
}
},
"remark-stringify": {
@ -8367,6 +8265,11 @@
"xtend": "4.0.1"
}
},
"remove-markdown": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.2.2.tgz",
"integrity": "sha1-ZrDO66n7d8qWNrsbAwfOIaMqEqY="
},
"remove-trailing-separator": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz",
@ -9495,14 +9398,6 @@
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-natural-compare": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-2.0.2.tgz",
@ -9518,15 +9413,12 @@
"strip-ansi": "3.0.1"
}
},
"string.prototype.padend": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz",
"integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=",
"dev": true,
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"define-properties": "1.1.2",
"es-abstract": "1.8.0",
"function-bind": "1.1.0"
"safe-buffer": "5.1.1"
}
},
"stringify-entities": {
@ -10060,7 +9952,7 @@
"resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.1.tgz",
"integrity": "sha1-WoXBVV/BugwQG4ZwfRXlD6TIcbs=",
"requires": {
"unist-util-visit": "1.2.0"
"unist-util-visit": "1.3.0"
}
},
"unist-util-stringify-position": {
@ -10069,9 +9961,9 @@
"integrity": "sha1-PMvcU2ee7W7PN3fdf14yKcG2qjw="
},
"unist-util-visit": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.2.0.tgz",
"integrity": "sha512-lI+jyPlDztHZ2CJhUchcRMQ7MNc0yASgYFxwRTxs0EZ+9HbYFBLVGDJ2FchTBy+pra0O1LVEn0Wkgf19mDVDzw==",
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.3.0.tgz",
"integrity": "sha512-9ntYcxPFtl44gnwXrQKZ5bMqXMY0ZHzUpqMFiU4zcc8mmf/jzYm8GhYgezuUlX4cJIM1zIDYaO6fG/fI+L6iiQ==",
"requires": {
"unist-util-is": "2.1.1"
}
@ -10469,6 +10361,11 @@
"integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=",
"dev": true
},
"xml": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz",
"integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU="
},
"xmlhttprequest-ssl": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz",

Просмотреть файл

@ -11,9 +11,6 @@
"start": "cross-env NODE_PATH=. NODE_ENV=production node server.js",
"bootstrap": "node script/bootstrap",
"test": "cross-env NODE_PATH=. NODE_ENV=test mocha && standard --fix",
"build": "npm-run-all build-*",
"build-versions": "node script/versions",
"build-releases": "node script/releases",
"release": "node script/release",
"dev": "cross-env NODE_PATH=. nodemon -e js,scss,yml,md server.js",
"prepack": "check-for-leaks",
@ -27,21 +24,26 @@
"browser-date-formatter": "^2.1.1",
"browser-sync": "^2.18.12",
"browserify-middleware": "^8.0.0",
"clean-deep": "^3.0.2",
"clipboard": "^1.7.1",
"compression": "^1.7.1",
"connect-browser-sync": "^2.1.0",
"connect-slashes": "^1.3.1",
"cookie-parser": "^1.4.3",
"cross-env": "^5.1.1",
"description": "0.0.4",
"dotenv": "^4.0.0",
"electron-apps": "1.1985.0",
"electron-i18n": "0.28.1",
"electron-api-historian": "1.1.0",
"electron-npm-packages": "^2.5.1",
"electron-apps": "1.2097.0",
"electron-i18n": "0.37.0",
"electron-releases": "2.1.0",
"electron-userland-reports": "1.6.0",
"express": "^4.16.2",
"express-graphql": "^0.6.11",
"express-hbs": "^1.0.4",
"express-request-language": "^1.1.15",
"feed": "^1.1.1",
"flat": "^4.0.0",
"github": "^13.0.1",
"got": "^8.0.0",
@ -49,7 +51,7 @@
"helmet": "^3.9.0",
"href-type": "^1.0.1",
"http-proxy-middleware": "^0.17.4",
"hubdown": "^1.1.0",
"hubdown": "^2.0.0",
"lil-env-thing": "^1.0.0",
"list.js": "^1.5.0",
"lobars": "^1.2.0",
@ -59,8 +61,9 @@
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"node-sass-middleware": "^0.11.0",
"parse-link-header": "^1.0.1",
"platform-utils": "^1.0.0",
"primer-breadcrumb": "1.0.2",
"primer-breadcrumb": "1.5.0",
"query-string": "^5.0.0",
"repos-using-electron": "github:electron/repos-using-electron",
"require-dir": "^0.3.2",
@ -80,7 +83,6 @@
"mocha": "^4.0.1",
"nock": "^9.1.3",
"nodemon": "^1.12.1",
"npm-run-all": "^4.1.2",
"standard": "^10.0.3",
"supertest": "^3.0.0",
"walk-sync": "^0.3.2"

Просмотреть файл

@ -1,5 +1,4 @@
const processes = require('../../data/processes.json')
const versions = require('../../data/versions.json')
const i18n = require('../../lib/i18n')
const singlePage = require('./show')
@ -13,8 +12,7 @@ module.exports = (req, res, next) => {
{ path: 'all', name: 'All the Electron Docs!' },
{ path: 'api', name: 'API' },
{ path: 'development', name: 'Development' },
{ path: 'tutorial', name: 'Guides' },
{ path: 'versions', name: 'Versions' }
{ path: 'tutorial', name: 'Guides' }
]
const category = req.params.category
const selectedCategories = categoryList.filter(cat => cat.path === category)
@ -28,11 +26,6 @@ module.exports = (req, res, next) => {
layout: 'docs',
viewingAllDocs: true
})
} else if (category === 'versions') {
context = Object.assign(req.context, {
layout: 'docs',
versions: versions
})
} else {
context = Object.assign(req.context, {
layout: 'docs',

34
routes/docs/history.js Normal file
Просмотреть файл

@ -0,0 +1,34 @@
const i18n = require('../../lib/i18n')
const semver = require('semver')
const historian = require('electron-api-historian')
module.exports = (req, res, next) => {
const doc = i18n.docs[req.language][req.path.replace('/history', '')]
if (!doc) return next()
// find releases that include the current doc
const filenameKey = doc.href.replace(/^\//, '') + '.md'
doc.birthTag = historian[filenameKey]
if (doc.birthTag) {
doc.releases = req.context.releases.filter(release => {
return semver.gte(release.version, doc.birthTag.replace('v', ''))
})
} else {
doc.releases = []
doc.noPriorReleases = true
}
const context = Object.assign(req.context, {
page: {
title: `${doc.title} Version History | Electron`,
description: doc.description,
url: req.url
},
doc: doc,
viewingDocHistory: true,
layout: 'docs'
})
return res.render('docs/history', context)
}

37
routes/feed/blog.js Normal file
Просмотреть файл

@ -0,0 +1,37 @@
const Feed = require('feed')
const description = require('description')
module.exports = function feedHandler (req, res, next) {
let feed = new Feed({
title: 'Electron',
description: 'Build cross platform desktop apps with JavaScript, HTML, and CSS.',
id: 'http://electronjs.org/',
link: 'http://electronjs.org/',
generator: 'Electron website',
feedLinks: {
json: 'https://electronjs.org/blog.json',
atom: 'https://electronjs.org/blog.xml'
}
})
req.context.posts.forEach(function (post) {
feed.addItem({
id: `https://electronjs.org${post.href}`,
title: post.title,
content: post.content,
description: description({ content: post.content, endWith: '[...]', limit: 200 }),
link: `https://electronjs.org${post.href}`,
date: new Date(post.date),
published: new Date(post.date),
author: post.author,
image: post.image || 'https://electronjs.org/images/opengraph.png'
})
})
if (req.path === '/blog.xml') {
res.set('content-type', 'text/xml')
res.send(feed.atom1())
} else if (req.path === '/blog.json') {
res.json(JSON.parse(feed.json1()))
} else {
return next()
}
}

Просмотреть файл

@ -1,9 +0,0 @@
const releases = require('../data/releases.json')
module.exports = (req, res) => {
const context = Object.assign(req.context, {
releases: releases
})
res.render('releases', context)
}

3
routes/releases/index.js Normal file
Просмотреть файл

@ -0,0 +1,3 @@
module.exports = (req, res) => {
res.render('releases', req.context)
}

Просмотреть файл

@ -1,66 +0,0 @@
#!/usr/bin/env node
const fs = require('fs')
const path = require('path')
const semver = require('semver')
const hubdown = require('hubdown')
const GitHub = require('github')
const github = new GitHub()
github.authenticate({
type: 'token',
token: 'da809a6077bb1b0aa7c5623f7b2d5f1fec2faae4'
})
console.log('Fetching electron/electron releases from the GitHub API')
async function getReleases () {
const res = await github.repos.getReleases({
owner: 'electron',
repo: 'electron',
per_page: 100
})
return Promise.all(res.data
.filter(release => !(release.draft || release.prerelease))
.filter(release => semver.valid(release.tag_name.substring(1)))
.map(processRelease)
)
}
async function processRelease(release) {
release.version = release.tag_name.substring(1)
release.body = release.body
// turn PR references like #123 into hyperlinks
.replace(
/ #(\d+)$/gm,
' <a href="https://github.com/electron/electron/pull/$1">#$1</a>'
)
// adjust heading levels (h2 becomes h3, etc)
.replace(/^#### /gm, '##### ')
.replace(/^### /gm, '#### ')
.replace(/^## /gm, '### ')
const parsed = await hubdown(release.body)
release.body_html = parsed.content
return release
}
getReleases().then(releases => {
releases = releases
.sort((a, b) => semver.compare(b.version, a.version))
console.log(releases.map(release => release.version).join('\n'))
fs.writeFileSync(
path.join(__dirname, '../data/releases.json'),
JSON.stringify(releases, null, 2)
)
})

Просмотреть файл

@ -1,21 +0,0 @@
#!/usr/bin/env node
// This script downloads the S3-based metadata file that includes
// the V8, Node, and Chromium versions numbers for each Electron release.
const fs = require('fs')
const path = require('path')
const got = require('got')
const semver = require('semver')
const versionsUrl = 'https://atom.io/download/electron/index.json'
console.log(`Downloading version data from ${versionsUrl}`)
got(versionsUrl, {json: true})
.then(response => {
const versions = response.body
.sort((a, b) => semver.compare(b.version, a.version))
const filepath = path.join(__dirname, '../data/versions.json')
console.log(`Saving version data to ${filepath}`)
fs.writeFileSync(filepath, JSON.stringify(versions, null, 2))
})

Просмотреть файл

@ -58,35 +58,32 @@ app.use(browsersync())
// Routes
const routes = require('./routes')
app.get('/', routes.home)
app.get('/apps', routes.apps.index)
app.get('/app/:slug', (req, res) => res.redirect(`/apps/${req.params.slug}`))
app.get('/apps', routes.apps.index)
app.get('/apps/:slug', routes.apps.show)
app.get('/awesome', (req, res) => res.redirect('/community'))
app.get('/blog.json', routes.feed.blog)
app.get('/blog.xml', routes.feed.blog)
app.get('/community', routes.community)
app.get('/contact', routes.contact)
app.get('/devtron', routes.devtron)
app.get('/docs', routes.docs.index)
app.get('/docs/versions', (req, res) => res.redirect(301, '/releases'))
app.get('/docs/:category', routes.docs.category)
app.get('/docs/:category/:slug/history', routes.docs.history)
app.get('/docs/:category/*', routes.docs.show)
app.get('/docs/latest*', (req, res) => res.redirect(req.path.replace(/^\/docs\/latest/ig, '/docs')))
app.get('/docs/v0*', (req, res) => res.redirect(req.path.replace(/^\/docs\/v0\.\d+\.\d+/ig, '/docs')))
app.get('/docs', routes.docs.index)
app.get('/docs/:category', routes.docs.category)
app.get('/docs/:category/*', routes.docs.show)
app.get('/issues', (req, res) => res.redirect(301, 'https://github.com/electron/electronjs.org/issues'))
app.get('/issues/new', (req, res) => res.redirect(301, 'https://github.com/electron/electronjs.org/issues/new'))
app.get('/languages', routes.languages.index)
app.get('/maintainers/join', (req, res) => res.redirect('https://goo.gl/FJmZZm'))
app.get('/pulls', (req, res) => res.redirect(301, 'https://github.com/electron/electronjs.org/pulls'))
app.get('/releases', routes.releases.index)
app.get('/spectron', routes.spectron)
app.get('/userland', routes.userland.index)
app.get('/userland/*', routes.userland.show)
app.get('/maintainers/join', (req, res) => res.redirect('https://goo.gl/FJmZZm'))
app.get('/awesome', (req, res) => res.redirect('/community'))
app.get('/community', routes.community)
app.get('/languages', routes.languages.index)
app.get('/contact', routes.contact)
app.get('/releases', routes.releases)
app.get('/devtron', routes.devtron)
app.get('/spectron', routes.spectron)
app.use('/crowdin', routes.languages.proxy)
app.get('/search/:searchIn*?', routes.search.index)
// Generic 404 handler

Просмотреть файл

@ -125,22 +125,22 @@
display: none;
}
// hide filter categories on mobile
@media only screen and (max-width: 750px) {
.categories-filter {
display: none;
}
.inline-filter {
display: block;
}
.container-narrow {
width: 100%;
// mobile handle, use breakpoint from /bower_components/basecoat/scss/mixins/_breakpoints.scss
.container-narrow {
padding-right: 15px;
padding-left: 15px;
@include breakpoint(md) { // return normal value
padding-right: 0;
padding-left: 0;
}
}
// only show inline filter on mobile
@media only screen and (min-width: 750px) {
.inline-filter {
display: none;
.row { // default is -15px
margin-right: -12px; // work with .page-section { padding: 12px }
margin-left: -12px;
}
.mobile-hidden {
display: none;
@include breakpoint(md) {
display: block;
}
}
}

Просмотреть файл

@ -12,18 +12,26 @@
}
}
.footer-nav {
.footer-nav {
@include breakpoint(md) {
float: left;
}
}
.footer-love {
.footer-nav-item {
&.icon {
text-decoration: none !important;
border: none !important;
font-size: 130%;
}
.devicon-github-plain {
font-size: 150%;
}
}
.footer-social {
@include breakpoint(md) {
float: right;
}
.octicon-logo-github {
position: relative;
bottom: -2px; // visually center
}
}

Просмотреть файл

@ -4,7 +4,7 @@
@include breakpoint(sm) { padding: $spacer4; }
@include breakpoint(md) { padding: $spacer5; }
@include breakpoint(lg) { padding: $spacer6; }
@include breakpoint(xl) { padding: $spacer8; }
@include breakpoint(xl) { padding: $spacer6; }
.container,
.container-narrow {

Просмотреть файл

@ -16,7 +16,7 @@
}
}
.who-when {
.blog-byline {
color: $main-color-subtle;
font-size: $body-font-size;
}

Просмотреть файл

@ -3,12 +3,14 @@
.docs-version {
display: inline-block;
padding: .1em .4em;
padding: 0 .4em;
margin-left: 10px;
vertical-align: middle;
font-size: $body-font-size * 1.25;
font-size: $body-font-size * 0.95;
line-height: 1.8;
font-weight: 200;
-webkit-font-smoothing: initial;
color: $main-color-subtle;
background-color: $main-bg-color;
border: 1px solid $border-color;
border-radius: $border-radius;
}
@ -114,22 +116,17 @@
text-align: left;
padding: $spacer2;
}
tr {
border-bottom: 1px solid $border-color;
text-align: left;
td {
padding: $spacer2;
line-height: 1.4;
font-size: 14px;
}
}
width: 100%;
}
.docs p a,
.docs li a {
text-decoration: underline;
}
.doc-actions {
a {
text-decoration: none;
}
}

Просмотреть файл

@ -51,6 +51,8 @@ $octicons-font-path: "../bower_components/octicons/octicons/";
@import "../bower_components/basecoat/scss/tables";
@import "../node_modules/primer-breadcrumb/lib/breadcrumb";
// Devicon
@import "vendor/devicon/devicon.css";
// Utilities
@import "../bower_components/primer-css/scss/flex-table";

20
styles/vendor/devicon/LICENSE поставляемый Executable file
Просмотреть файл

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2015 konpa
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

919
styles/vendor/devicon/devicon.css поставляемый Executable file
Просмотреть файл

@ -0,0 +1,919 @@
@font-face {
font-family: 'devicon';
src:url('fonts/devicon.eot?-hdf3wh');
src:url('fonts/devicon.eot?#iefix-hdf3wh') format('embedded-opentype'),
url('fonts/devicon.woff?-hdf3wh') format('woff'),
url('fonts/devicon.ttf?-hdf3wh') format('truetype'),
url('fonts/devicon.svg?-hdf3wh#devicon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="devicon-"], [class*=" devicon-"] {
font-family: 'devicon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.devicon-sketch-line-wordmark:before {
content: "\e94c";
}
.devicon-sketch-line:before {
content: "\e94d";
}
.devicon-npm-original-wordmark:before {
content: "\e952";
}
.devicon-ionic-original-wordmark:before {
content: "\e953";
}
.devicon-ionic-original:before {
content: "\e954";
}
.devicon-ember-original-wordmark:before {
content: "\e955";
}
.devicon-electron-original-wordmark:before {
content: "\e956";
}
.devicon-electron-original:before {
content: "\e957";
}
.devicon-vagrant-plain-wordmark:before {
content: "\e94e";
}
.devicon-vagrant-plain:before {
content: "\e94f";
}
.devicon-yarn-plain-wordmark:before {
content: "\e950";
}
.devicon-yarn-plain:before {
content: "\e951";
}
.devicon-handlebars-plain-wordmark:before {
content: "\e94a";
}
.devicon-handlebars-plain:before {
content: "\e94b";
}
.devicon-couchdb-plain-wordmark:before {
content: "\e948";
}
.devicon-couchdb-plain:before {
content: "\e949";
}
.devicon-behance-plain-wordmark:before {
content: "\e943";
}
.devicon-behance-plain:before {
content: "\e945";
}
.devicon-linkedin-plain-wordmark:before {
content: "\e946";
}
.devicon-linkedin-plain:before {
content: "\e947";
}
.devicon-ceylon-plain-wordmark:before {
content: "\e943";
}
.devicon-ceylon-plain:before {
content: "\e944";
}
.devicon-elm-plain-wordmark:before {
content: "\e941";
}
.devicon-elm-plain:before {
content: "\e942";
}
.devicon-cakephp-plain-wordmark:before {
content: "\e93f";
}
.devicon-cakephp-plain:before {
content: "\e940";
}
.devicon-stylus-original:before {
content: "\e93e";
}
.devicon-express-original-wordmark:before {
content: "\e93c";
}
.devicon-express-original:before {
content: "\e93d";
}
.devicon-devicon-plain-wordmark:before {
content: "\e93a";
}
.devicon-devicon-plain:before {
content: "\e93b";
}
.devicon-intellij-plain-wordmark:before {
content: "\e932";
}
.devicon-intellij-plain:before {
content: "\e933";
}
.devicon-pycharm-plain-wordmark:before {
content: "\e934";
}
.devicon-pycharm-plain:before {
content: "\e935";
}
.devicon-rubymine-plain-wordmark:before {
content: "\e936";
}
.devicon-rubymine-plain:before {
content: "\e937";
}
.devicon-webstorm-plain-wordmark:before {
content: "\e938";
}
.devicon-webstorm-plain:before {
content: "\e939";
}
.devicon-tomcat-line-wordmark:before {
content: "\e92c";
}
.devicon-tomcat-line:before {
content: "\e92d";
}
.devicon-vuejs-line-wordmark:before {
content: "\e92e";
}
.devicon-vuejs-line:before {
content: "\e92f";
}
.devicon-vuejs-plain-wordmark:before {
content: "\e930";
}
.devicon-vuejs-plain:before {
content: "\e931";
}
.devicon-swift-plain-wordmark:before {
content: "\e92a";
}
.devicon-swift-plain:before {
content: "\e92b";
}
.devicon-webpack-plain-wordmark:before {
content: "\e928";
}
.devicon-webpack-plain:before {
content: "\e929";
}
.devicon-visualstudio-plain-wordmark:before {
content: "\e926";
}
.devicon-visualstudio-plain:before {
content: "\e927";
}
.devicon-slack-plain-wordmark:before {
content: "\e924";
}
.devicon-slack-plain:before {
content: "\e925";
}
.devicon-facebook-original:before,
.devicon-facebook-plain:before {
content: "\e91c";
}
.devicon-typescript-original:before,
.devicon-typescript-plain:before {
content: "\e920";
}
.devicon-babel-original:before,
.devicon-babel-plain:before {
content: "\e921";
}
.devicon-mocha-plain:before {
content: "\e919";
}
.devicon-jasmine-plain-wordmark:before {
content: "\e91b";
}
.devicon-jasmine-plain:before {
content: "\e91a";
}
.devicon-gatling-plain-wordmark:before {
content: "\e918";
}
.devicon-gatling-plain:before {
content: "\e917";
}
.devicon-ssh-original-wordmark:before,
.devicon-ssh-plain-wordmark:before {
content: "\e916";
}
.devicon-ssh-original:before,
.devicon-ssh-plain:before {
content: "\e915";
}
.devicon-sourcetree-original-wordmark:before,
.devicon-sourcetree-plain-wordmark:before {
content: "\e914";
}
.devicon-sourcetree-original:before,
.devicon-sourcetree-plain:before {
content: "\e913";
}
.devicon-phpstorm-plain-wordmark:before {
content: "\e912";
}
.devicon-phpstorm-plain:before {
content: "\e911";
}
.devicon-protractor-plain-wordmark:before {
content: "\e901";
}
.devicon-protractor-plain:before {
content: "\e900";
}
.devicon-gradle-plain-wordmark:before {
content: "\e8f1";
}
.devicon-gradle-plain:before {
content: "\e902";
}
.devicon-cucumber-plain-wordmark:before {
content: "\e905";
}
.devicon-cucumber-plain:before {
content: "\e904";
}
.devicon-jeet-plain-wordmark:before {
content: "\e906";
}
.devicon-jeet-plain:before {
content: "\e903";
}
.devicon-gitlab-plain-wordmark:before {
content: "\e908";
}
.devicon-gitlab-plain:before {
content: "\e907";
}
.devicon-github-original-wordmark:before,
.devicon-github-plain-wordmark:before {
content: "\e90a";
}
.devicon-github-original:before,
.devicon-github-plain:before {
content: "\e909";
}
.devicon-d3js-plain:before {
content: "\e90c";
}
.devicon-confluence-original-wordmark:before,
.devicon-confluence-plain-wordmark:before {
content: "\e90e";
}
.devicon-confluence-original:before,
.devicon-confluence-plain:before {
content: "\e90d";
}
.devicon-bitbucket-original-wordmark:before,
.devicon-bitbucket-plain-wordmark:before {
content: "\e910";
}
.devicon-bitbucket-original:before,
.devicon-bitbucket-plain:before {
content: "\e90f";
}
.devicon-safari-line-wordmark:before {
content: "\e632";
}
.devicon-safari-line:before {
content: "\e63a";
}
.devicon-safari-plain-wordmark:before {
content: "\e63b";
}
.devicon-safari-plain:before {
content: "\e63c";
}
.devicon-jetbrains-plain:before,
.devicon-jetbrains-line:before,
.devicon-jetbrains-line-wordmark:before,
.devicon-jetbrains-plain-wordmark:before {
content: "\e63d";
}
.devicon-django-line:before,
.devicon-django-line-wordmark:before {
content: "\e63e";
}
.devicon-django-plain:before,
.devicon-django-plain-wordmark:before {
content: "\e63f";
}
.devicon-gimp-plain:before {
content: "\e633";
}
.devicon-redhat-plain-wordmark:before {
content: "\e62a";
}
.devicon-redhat-plain:before {
content: "\e62b";
}
.devicon-cplusplus-line:before,
.devicon-cplusplus-line-wordmark:before {
content: "\e634";
}
.devicon-cplusplus-plain:before,
.devicon-cplusplus-plain-wordmark:before {
content: "\e635";
}
.devicon-csharp-line:before,
.devicon-csharp-line-wordmark:before {
content: "\e636";
}
.devicon-csharp-plain:before,
.devicon-csharp-plain-wordmark:before {
content: "\e637";
}
.devicon-c-line:before,
.devicon-c-line-wordmark:before {
content: "\e638";
}
.devicon-c-plain:before,
.devicon-c-plain-wordmark:before {
content: "\e639";
}
.devicon-nodewebkit-line-wordmark:before {
content: "\e611";
}
.devicon-nodewebkit-line:before {
content: "\e612";
}
.devicon-nodewebkit-plain-wordmark:before {
content: "\e613";
}
.devicon-nodewebkit-plain:before {
content: "\e614";
}
.devicon-nginx-original:before,
.devicon-nginx-original-wordmark:before,
.devicon-nginx-plain:before,
.devicon-nginx-plain-wordmark:before {
content: "\e615";
}
.devicon-erlang-plain-wordmark:before {
content: "\e616";
}
.devicon-erlang-plain:before {
content: "\e617";
}
.devicon-doctrine-line-wordmark:before {
content: "\e618";
}
.devicon-doctrine-line:before {
content: "\e619";
}
.devicon-doctrine-plain-wordmark:before {
content: "\e61a";
}
.devicon-doctrine-plain:before {
content: "\e625";
}
.devicon-apache-line-wordmark:before {
content: "\e626";
}
.devicon-apache-line:before {
content: "\e627";
}
.devicon-apache-plain-wordmark:before {
content: "\e628";
}
.devicon-apache-plain:before {
content: "\e629";
}
.devicon-go-line:before {
content: "\e610";
}
.devicon-redis-plain-wordmark:before {
content: "\e606";
}
.devicon-redis-plain:before {
content: "\e607";
}
.devicon-meteor-plain-wordmark:before {
content: "\e608";
}
.devicon-meteor-plain:before {
content: "\e609";
}
.devicon-heroku-line-wordmark:before,
.devicon-heroku-original-wordmark:before {
content: "\e60a";
}
.devicon-heroku-line:before,
.devicon-heroku-original:before {
content: "\e60b";
}
.devicon-heroku-plain-wordmark:before {
content: "\e60c";
}
.devicon-heroku-plain:before {
content: "\e60f";
}
.devicon-go-plain:before {
content: "\e61b";
}
.devicon-docker-plain-wordmark:before {
content: "\e61e";
}
.devicon-docker-plain:before {
content: "\e61f";
}
.devicon-amazonwebservices-original:before,
.devicon-amazonwebservices-plain:before {
content: "\e603";
}
.devicon-amazonwebservices-plain-wordmark:before {
content: "\e604";
}
.devicon-android-plain-wordmark:before {
content: "\e60d";
}
.devicon-android-plain:before {
content: "\e60e";
}
.devicon-angularjs-plain-wordmark:before {
content: "\e61c";
}
.devicon-angularjs-plain:before {
content: "\e61d";
}
.devicon-appcelerator-original:before,
.devicon-appcelerator-plain:before {
content: "\e620";
}
.devicon-appcelerator-plain-wordmark:before {
content: "\e621";
}
.devicon-apple-original:before,
.devicon-apple-plain:before {
content: "\e622";
}
.devicon-atom-original-wordmark:before,
.devicon-atom-plain-wordmark:before {
content: "\e623";
}
.devicon-atom-original:before,
.devicon-atom-plain:before {
content: "\e624";
}
.devicon-backbonejs-plain-wordmark:before {
content: "\e62c";
}
.devicon-backbonejs-plain:before {
content: "\e62d";
}
.devicon-bootstrap-plain-wordmark:before {
content: "\e62e";
}
.devicon-bootstrap-plain:before {
content: "\e62f";
}
.devicon-bower-line-wordmark:before {
content: "\e630";
}
.devicon-bower-line:before {
content: "\e631";
}
.devicon-bower-plain-wordmark:before {
content: "\e64e";
}
.devicon-bower-plain:before {
content: "\e64f";
}
.devicon-chrome-plain-wordmark:before {
content: "\e665";
}
.devicon-chrome-plain:before {
content: "\e666";
}
.devicon-codeigniter-plain-wordmark:before {
content: "\e667";
}
.devicon-codeigniter-plain:before {
content: "\e668";
}
.devicon-coffeescript-original-wordmark:before,
.devicon-coffeescript-plain-wordmark:before {
content: "\e669";
}
.devicon-coffeescript-original:before,
.devicon-coffeescript-plain:before {
content: "\e66a";
}
.devicon-css3-plain-wordmark:before {
content: "\e678";
}
.devicon-css3-plain:before {
content: "\e679";
}
.devicon-debian-plain-wordmark:before {
content: "\e67e";
}
.devicon-debian-plain:before {
content: "\e67f";
}
.devicon-dot-net-plain-wordmark:before {
content: "\e6d3";
}
.devicon-dot-net-plain:before {
content: "\e6d4";
}
.devicon-drupal-plain-wordmark:before {
content: "\e6e2";
}
.devicon-drupal-plain:before {
content: "\e6e3";
}
.devicon-firefox-plain-wordmark:before {
content: "\e75d";
}
.devicon-firefox-plain:before {
content: "\e75e";
}
.devicon-foundation-plain-wordmark:before {
content: "\e7a2";
}
.devicon-foundation-plain:before {
content: "\e7a3";
}
.devicon-git-plain-wordmark:before {
content: "\e7a7";
}
.devicon-git-plain:before {
content: "\e7a8";
}
.devicon-google-original-wordmark:before,
.devicon-google-plain-wordmark:before {
content: "\e91d";
}
.devicon-google-original:before,
.devicon-google-plain:before {
content: "\e91e";
}
.devicon-grunt-line-wordmark:before {
content: "\e7a9";
}
.devicon-grunt-line:before {
content: "\e7aa";
}
.devicon-grunt-plain-wordmark:before {
content: "\e7ea";
}
.devicon-grunt-plain:before {
content: "\e7eb";
}
.devicon-gulp-plain:before {
content: "\e7ec";
}
.devicon-html5-plain-wordmark:before {
content: "\e7f6";
}
.devicon-html5-plain:before {
content: "\e7f7";
}
.devicon-ie10-original:before,
.devicon-ie10-plain:before {
content: "\e7f8";
}
.devicon-illustrator-line:before {
content: "\e7f9";
}
.devicon-illustrator-plain:before {
content: "\e7fa";
}
.devicon-inkscape-plain-wordmark:before {
content: "\e834";
}
.devicon-inkscape-plain:before {
content: "\e835";
}
.devicon-java-plain-wordmark:before {
content: "\e841";
}
.devicon-java-plain:before {
content: "\e842";
}
.devicon-javascript-plain:before {
content: "\e845";
}
.devicon-jquery-plain-wordmark:before {
content: "\e849";
}
.devicon-jquery-plain:before {
content: "\e84a";
}
.devicon-krakenjs-plain-wordmark:before {
content: "\e84f";
}
.devicon-krakenjs-plain:before {
content: "\e850";
}
.devicon-laravel-plain-wordmark:before {
content: "\e851";
}
.devicon-laravel-plain:before {
content: "\e852";
}
.devicon-less-plain-wordmark:before {
content: "\e853";
}
.devicon-linux-plain:before {
content: "\eb1c";
}
.devicon-mongodb-plain-wordmark:before {
content: "\eb43";
}
.devicon-mongodb-plain:before {
content: "\eb44";
}
.devicon-moodle-plain-wordmark:before {
content: "\eb5a";
}
.devicon-moodle-plain:before {
content: "\eb5b";
}
.devicon-mysql-plain-wordmark:before {
content: "\eb60";
}
.devicon-mysql-plain:before {
content: "\eb61";
}
.devicon-nodejs-plain-wordmark:before {
content: "\eb69";
}
.devicon-nodejs-plain:before {
content: "\eb6a";
}
.devicon-oracle-original:before,
.devicon-oracle-plain:before {
content: "\eb6b";
}
.devicon-photoshop-line:before {
content: "\eb6c";
}
.devicon-photoshop-plain:before {
content: "\eb6d";
}
.devicon-php-plain:before {
content: "\eb71";
}
.devicon-postgresql-plain-wordmark:before {
content: "\eb7c";
}
.devicon-postgresql-plain:before {
content: "\eb7d";
}
.devicon-python-plain-wordmark:before {
content: "\eb88";
}
.devicon-python-plain:before {
content: "\eb89";
}
.devicon-rails-plain-wordmark:before {
content: "\eba2";
}
.devicon-rails-plain:before {
content: "\eba3";
}
.devicon-react-original-wordmark:before,
.devicon-react-plain-wordmark:before {
content: "\e600";
}
.devicon-react-original:before,
.devicon-react-plain:before {
content: "\e601";
}
.devicon-ruby-plain-wordmark:before {
content: "\ebc9";
}
.devicon-ruby-plain:before {
content: "\ebca";
}
.devicon-sass-original:before,
.devicon-sass-plain:before {
content: "\ebcb";
}
.devicon-sequelize-original-wordmark:before,
.devicon-sequelize-plain-wordmark:before {
content: "\e922";
}
.devicon-sequelize-original:before,
.devicon-sequelize-plain:before {
content: "\e923";
}
.devicon-symfony-original-wordmark:before,
.devicon-symfony-plain-wordmark:before {
content: "\e602";
}
.devicon-symfony-original:before,
.devicon-symfony-plain:before {
content: "\e605";
}
.devicon-travis-plain-wordmark:before {
content: "\ebcc";
}
.devicon-travis-plain:before {
content: "\ebcd";
}
.devicon-trello-plain-wordmark:before {
content: "\ebce";
}
.devicon-trello-plain:before {
content: "\ebcf";
}
.devicon-twitter-original:before,
.devicon-twitter-plain:before {
content: "\e91f";
}
.devicon-ubuntu-plain-wordmark:before {
content: "\ebd0";
}
.devicon-ubuntu-plain:before {
content: "\ebd1";
}
.devicon-vim-plain:before {
content: "\ebf3";
}
.devicon-windows8-original-wordmark:before,
.devicon-windows8-plain-wordmark:before {
content: "\ebf4";
}
.devicon-windows8-original:before,
.devicon-windows8-plain:before {
content: "\ebf5";
}
.devicon-wordpress-plain-wordmark:before {
content: "\ebfd";
}
.devicon-wordpress-plain:before {
content: "\ebfe";
}
.devicon-yii-plain-wordmark:before {
content: "\ec01";
}
.devicon-yii-plain:before {
content: "\ec02";
}
.devicon-zend-plain-wordmark:before {
content: "\ec03";
}
.devicon-zend-plain:before {
content: "\ec04";
}

Двоичные данные
styles/vendor/devicon/fonts/devicon.eot поставляемый Executable file

Двоичный файл не отображается.

244
styles/vendor/devicon/fonts/devicon.svg поставляемый Executable file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

После

Ширина:  |  Высота:  |  Размер: 792 KiB

Двоичные данные
styles/vendor/devicon/fonts/devicon.ttf поставляемый Executable file

Двоичный файл не отображается.

Двоичные данные
styles/vendor/devicon/fonts/devicon.woff поставляемый Executable file

Двоичный файл не отображается.

Просмотреть файл

@ -23,6 +23,14 @@ describe('electronjs.org', () => {
res.headers['content-encoding'].should.equal('gzip')
})
test('blog feeds', async () => {
let res = await supertest(app).get(`/blog.json`)
res.headers['content-type'].should.equal('application/json; charset=utf-8')
res.body.title.should.equal('Electron')
res = await supertest(app).get(`/blog.xml`)
res.headers['content-type'].should.equal('text/xml; charset=utf-8')
})
describe('404 pages', () => {
test('404 path on page, detect a 404 path of page to create a issue', async () => {
const $ = await get('/404-page-asdfgh')
@ -106,8 +114,14 @@ describe('electronjs.org', () => {
test('API doc', async () => {
const $ = await get('/docs/api/browser-window')
$('.docs-breadcrumbs a').should.have.length(3)
$('.docs-breadcrumbs a').should.have.length(4)
$('.docs-breadcrumbs a[href="/docs/api"]').should.have.text('API')
$('.docs-breadcrumbs')
.text()
.trim()
.replace(/\n/g, '')
.replace(/\s+/g, ' ')
.should.include('Docs / API / BrowserWindow v')
})
test('redirects pre-1.0 docs URLs', async () => {
@ -156,9 +170,19 @@ describe('electronjs.org', () => {
$('.error-page').text().should.include('Page not found')
})
test('doc change proposal', async () => {
test('docs footer', async () => {
// includes a link to edit the doc
const $ = await get('/docs/api/accelerator')
$('.propose-change').attr('href').should.eq('https://github.com/electron/electron/tree/master/docs/api/accelerator.md')
// TODO: test other docs footer links
})
test('doc history', async () => {
const $ = await get('/docs/api/accelerator/history')
// $('body').text().should.include('The Accelerator API was introduced in Electron v0.15.3')
// $('head > title').text().should.eq('accelerator Version History | Electron')
$('tr').length.should.be.above(10)
})
})
@ -173,6 +197,12 @@ describe('electronjs.org', () => {
titles.should.include('Electron 1.6.7')
titles.should.include('Electron 0.37.8')
})
test('/docs/versions redirects to /releases', async () => {
const res = await supertest(app).get('/docs/versions')
res.statusCode.should.be.equal(301)
res.headers.location.should.equal('/releases')
})
})
describe('userland', () => {

Просмотреть файл

@ -1,62 +1,69 @@
<section class='page-section'>
<section class="page-section">
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-3 categories-filter">
<div class="col-xs-3 px-4 categories-filter">
<input class="filterable-list-input" placeholder="Filter apps by name, description, etc..." type="search" autofocus="on" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" aria-label="keywords for search">
<input class="filterable-list-input" placeholder="Filter apps by name, description, etc..." type="search" autofocus="on" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
<div class="mobile-hidden">
<h3>Categories</h3>
<h3>Categories</h3>
<ul class="filter-list category-list">
{{#if currentCategory}}
<li>
<a href="/apps" class="filter-item" aria-current="page" id="category-{{this.slug}}">
<span class="count" title="results">{{totalAppCount}}</span>
View All
</a>
</li>
{{/if}}
{{#each categories}}
<li>
<a href="/apps?category={{this.slug}}" class="filter-item {{className}}" aria-current="page" id="category-{{this.slug}}">
<span class="count" title="results">{{this.count}}</span>
{{this.name}}
</a>
</li>
{{/each}}
</ul>
</div>
<ul class="filter-list category-list">
{{#if currentCategory}}
<li>
<a href="/apps" class="filter-item" aria-current="page" id="category-{{this.slug}}">
<span class="count" title="results">{{totalAppCount}}</span>
View All
</a>
</li>
{{/if}}
{{#each categories}}
<li>
<a href="/apps?category={{this.slug}}" class="filter-item {{className}}" aria-current="page" id="category-{{this.slug}}">
<span class="count" title="results">{{this.count}}</span>
{{this.name}}
</a>
</li>
{{/each}}
</ul>
</div>
</div>
<!-- ./categories-filter -->
<div class='col-xs-9 container-narrow text-center' id="apps">
<input class="inline-filter filterable-list-input" placeholder="Filter apps by name, description, etc..." type="search" autofocus="on" tabindex="0" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
<div class="col-xs-12 col-md-9 container-narrow" id="apps">
<ul class="mb-4 filterable-list app-list">
{{#each apps}}
{{#unless this.disabled}}
<li class='listed-app'>
<a href='/apps/{{this.slug}}' title='{{this.name}} - {{app.description}}'>
<div class='listed-app-logo-wrapper'>
<div class="listed-app-logo-placeholder placeholder" style="background: {{this.goodColorOnWhite}}"></div>
<img class='listed-app-logo' data-src='/node_modules/electron-apps/apps/{{this.slug}}/{{this.icon64}}' alt='{{app.name}}'>
</div>
<span class='listed-app-name text-gray-dark'>{{this.name}}</span>
<span class='listed-app-description text-gray-light'>{{this.description}}</span>
<span class='listed-app-date text-gray-light'>Added&nbsp;<span data-date='{{this.date}}'>{{this.date}}</span></span>
<span class='listed-app-keywords' style='display:none;'>
{{this.keywords}}
<ul class="mb-4 filterable-list app-list">
{{#each apps}}
{{#unless this.disabled}}
<li class='listed-app'>
<a href='/apps/{{this.slug}}' title='{{this.name}} - {{app.description}}'>
<div class='listed-app-logo-wrapper'>
<div class="listed-app-logo-placeholder placeholder" style="background: {{this.goodColorOnWhite}}"></div>
<img class='listed-app-logo' data-src='/node_modules/electron-apps/apps/{{this.slug}}/{{this.icon64}}' alt='{{app.name}}'>
</div>
<span class='listed-app-name text-gray-dark'>{{this.name}}</span>
<span class='listed-app-description text-gray-light'>{{this.description}}</span>
<span class='listed-app-date text-gray-light'>Added&nbsp;<span data-date='{{this.date}}'>{{this.date}}</span></span>
<span class='listed-app-keywords' style='display:none;'>
{{this.keywords}}
{{#if this.homebrewCaskName}}
homebrew cask
{{/if}}
</span>
</a>
</li>
{{/unless}}
{{/each}}
</ul>
{{#if this.homebrewCaskName}}
homebrew cask
{{/if}}
</span>
</a>
</li>
{{/unless}}
{{/each}}
</ul>
<p class="mt-6">
<a href="https://github.com/electron/electron-apps#readme">Make a Pull Request</a> to add your application.
</p>
<hr>
<p class="mt-6 text-center">
<a href="https://github.com/electron/electron-apps#readme">Make a Pull Request</a> to add your application.
</p>
<hr>
</div>
</div>
</div>
</section>

43
views/docs/history.html Normal file
Просмотреть файл

@ -0,0 +1,43 @@
<p>
{{#if doc.isApiDoc}}
The <code>{{doc.title}}</code> API
{{else}}
The <code>{{doc.title}}</code> document
{{/if}}
{{#if doc.noPriorReleases}}
has been published to Electron's master branch,
but has not yet been included in an Electron release.
{{else}}
was introduced
{{#each doc.releases}}
{{#if @last}}
<time data-date="{{this.created_at}}"></time>
{{/if}}
{{/each}}
in
<a href="https://github.com/electron/electron/releases/tag/{{doc.birthTag}}">
Electron {{doc.birthTag}}
</a>
{{/if}}
</p>
<table class="table table-ruled table-full-width mb-7">
{{#each doc.releases}}
<tr>
<td>
<a href="https://github.com/electron/electron/blob/{{this.tag_name}}{{../doc.href}}.md">
<span class="octicon octicon-mark-github mr-1"></span>
{{../doc.slug}}.md @ {{this.version}}
</a>
</td>
<td>
<time data-date="{{this.created_at}}" data-format="%B %d, %Y">{{this.created_at}}</time>
</td>
<td>
<time data-date="{{this.created_at}}"></time>
</td>
</tr>
{{/each}}
</table>

Просмотреть файл

@ -55,7 +55,7 @@
<section class="page-section page-section-spacious">
<p class="text-center">
<a href="/docs/all">{{localized.footer.view_all_docs}}</a>
<a href="/docs/all">{{localized.docs.footer.view_all_docs}}</a>
{{localized.or}}
<a href="/docs/faq">{{localized.footer.see_the_faq}}</a>.
</p>

Просмотреть файл

@ -1,7 +0,0 @@
<ul>
{{#each versions}}
<li>
<a href="https://github.com/electron/electron/tree/v{{this.version}}/docs">{{this.version}}</a>
</li>
{{/each}}
</ul>

Просмотреть файл

@ -10,10 +10,10 @@
<div class="subtron py-4 text-center">
<div class="container">
<div id="electron-versions" class="electron-versions">
<span class="electron-versions-main">Electron: <strong>{{{vendoredVersions.version}}}</strong></span>
<span>Node: <strong>{{{vendoredVersions.node}}}</strong></span>
<span>Chromium: <strong>{{{vendoredVersions.chrome}}}</strong></span>
<span>V8: <strong>{{{vendoredVersions.v8}}}</strong></span>
<span class="electron-versions-main">Electron: <strong>{{{deps.version}}}</strong></span>
<span>Node: <strong>{{{deps.node}}}</strong></span>
<span>Chromium: <strong>{{{deps.chrome}}}</strong></span>
<span>V8: <strong>{{{deps.v8}}}</strong></span>
</div>
</div>
</div>
@ -114,9 +114,9 @@
<span class="octicon octicon-desktop-download mr-1"></span>
<span class="label">{{{localized.download_from_github}}}</span>
</a>
<p id="download-alternatives" class="text-sm" style="display:none;">
</p>
<p id="download-alternatives" class="text-sm" style="display:none;">
{{{localized.view_all_releases_on_github}}}
</p>
</p>
</div>
</div>

Просмотреть файл

@ -2,18 +2,35 @@
<div class='subtron text-left'>
<div class='container-narrow'>
<h1><span class="mr-3 mr-lg-4">{{localized.docs.title}}</span><span class="docs-version">{{electronLatestStableVersion}}</span></h1>
<h1>
<span class="mr-3 mr-lg-4">{{localized.docs.title}}</span>
<!-- <span class="docs-version">{{electronLatestStableVersion}}</span> -->
</h1>
</div>
<div class='container-narrow'>
<div class='container-narrow mt-2'>
<h4 class="docs-breadcrumbs">
<a href='/'>Electron {{electronLatestStableVersion}}</a> /
<a href='/docs'>Docs</a> /
{{#if category}}
{{category}}
{{else if doc}}
{{#if doc.category}}<a href="/docs/{{doc.category}}">{{doc.categoryFancy}}</a> / {{/if}} {{doc.title}}
{{#if doc.category}}
<a href="/docs/{{doc.category}}">{{doc.categoryFancy}}</a>
/
{{/if}}
<a href="{{doc.href}}">{{doc.title}}</a>
{{#if viewingDocHistory}}
/ Version History
{{else}}
<a href="{{doc.href}}/history">
<span class="docs-version">{{electronLatestStableTag}}</span>
</a>
{{/if}}
{{else if viewingAllDocs}}
All
{{/if}}
@ -25,6 +42,23 @@
<div class='container-narrow'>
{{{body}}}
<hr>
{{> docs_footer}}
<div class="doc-actions text-center">
<a class="mr-4 propose-change" href='{{doc.githubUrl}}'>
<span class="octicon octicon-mark-github"></span>
{{localized.docs.footer.propose_change}}
</a>
<a class="mr-4" href='https://crowdin.com/project/electron'>
<span class="octicon octicon-globe"></span>
{{localized.docs.footer.translate}}
</a>
<a class="mr-4" href='{{doc.href}}/history'>
<span class="octicon octicon-history"></span>
{{localized.docs.footer.version_history}}
</a>
</div>
</div>
</section>

Просмотреть файл

@ -0,0 +1,9 @@
<div class="blog-byline mt-2 mb-4">
<span data-date="{{post.date}}" data-format="%B %d, %Y" class="blog-index-time"></span>
{{#each post.author}}
<a href="https://github.com/{{this.name}}" class="author-link ml-3">
<img src="https://github.com/{{this.name}}.png?size=36" alt="{{this.name}}" class="avatar mr-2">{{this.name}}
</a>
{{/each}}
</div>

Просмотреть файл

@ -1,19 +0,0 @@
<div class='text-center'>
<span class="d-inline-block text-left">
<span class="octicon octicon-pencil mr-2"></span>
{{localized.footer.see_something}}
<a class="propose-change" href='https://github.com/electron/electron/tree/master{{page.url}}.md'>{{localized.footer.propose_change}}</a>
<br>
<span class="octicon octicon-zap mr-2"></span>
{{localized.footer.need_different_version}}
<a href='/docs/versions'>{{localized.footer.see_available_versions}}</a>
<br>
<span class="octicon octicon-book mr-2"></span>
{{localized.footer.want_something_searchable}}
<a href='/docs/all'>{{localized.footer.view_all_docs}}</a>
</span>
</div>

Просмотреть файл

@ -9,11 +9,12 @@
<a class="footer-nav-item" href="/releases">{{localized.nav.releases}}</a>
<a class="footer-nav-item" href="/contact">{{localized.nav.contact}}</a>
<a class="footer-nav-item" href="https://github.com/electron/electron/tree/master/CODE_OF_CONDUCT.md">{{localized.nav.code_of_conduct}}</a>
<a class="footer-nav-item" href="/languages">{{localized.nav.languages}}</a>
<a class="footer-nav-item" href="/languages">{{localized.nav.languages}}</a>
</nav>
<span class="footer-love">
<a href='https://github.com' class="no-underline"><span class='octicon octicon-code'></span> with <span class='octicon octicon-heart'></span> by <span class='octicon octicon-logo-github'></span></a>
<span class="footer-social">
<a class="footer-nav-item icon" href="https://github.com/electron" title="Github Organization"><i class="devicon-github-plain vertical-middle"></i></a>
<a class="footer-nav-item icon" href="https://twitter.com/electronjs" title="@electronjs on Twitter"><i class="devicon-twitter-plain vertical-middle"></i></a>
</span>
</div>
</footer>

Просмотреть файл

@ -37,6 +37,7 @@
<meta name="twitter:site" content="@ElectronJS" />
<link rel='shortcut icon' href='/images/favicon.ico'/>
<link rel="alternate" type="application/rss+xml" title="Electron Blog" href="https://electronjs.org/blog.xml" />
<link rel='stylesheet' href='/styles/index.css'>
<script src="/scripts/index.js"></script>

Просмотреть файл

@ -24,7 +24,7 @@
<!-- <a class="site-header-nav-item" href="/userland">{{localized.nav.userland}}</a> -->
<a class="site-header-nav-item" href="/releases">{{localized.nav.releases}}</a>
<a class="site-header-nav-item" href="/contact">{{localized.nav.contact}}</a>
<a class="site-header-nav-item octicon" href="https://github.com/electron" title="Github Organization"><span class="mega-octicon octicon-mark-github vertical-middle"></a>
<a class="site-header-nav-item octicon" href="https://github.com/electron" title="Github Organization"><span class="mega-octicon octicon-mark-github vertical-middle"></span></a>
<a class="site-header-nav-item bordered" href="/languages">{{currentLocaleNativeName}}</a>
</nav>
</div>

Просмотреть файл

@ -16,13 +16,8 @@
<a href="{{this.href}}" class="blog-index-link mr-2">
{{{this.title}}}
</a>
<div class="who-when mt-1 mb-4">
<span class="octicon octicon-calendar pr-2"></span>
<span data-date="{{this.date}}" data-format="%B %d, %Y" class="blog-index-time"></span>
<a href="https://github.com/{{this.author}}" class="author-link ml-3">
<img src="https://github.com/{{this.author}}.png?size=36" alt="{{this.author}}" class="avatar mr-2">{{this.author}}
</a>
</div>
{{> blog_byline post=this}}
</h2>
{{{this.excerpt}}}
<p><a href="{{this.href}}">Read More&nbsp;<span class="octicon octicon-arrow-small-right"></span></a></p>

Просмотреть файл

@ -1,11 +1,5 @@
<h1>{{{post.title}}}</h1>
<div class="who-when mt-1 mb-4">
<span class="octicon octicon-calendar pr-2"></span>
<span data-date="{{post.date}}" data-format="%B %d, %Y" class="blog-index-time"></span>
<a href="https://github.com/{{post.author}}" class="author-link ml-3">
<img src="https://github.com/{{post.author}}.png?size=36" alt="{{post.author}}" class="avatar mr-2">{{post.author}}
</a>
</div>
{{> blog_byline}}
{{{post.content}}}