diff --git a/.well-known/pki-validation/0141ED2624914000AB1E5A966A5DDFE6.txt b/.well-known/pki-validation/0141ED2624914000AB1E5A966A5DDFE6.txt new file mode 100644 index 0000000..7e93ce9 --- /dev/null +++ b/.well-known/pki-validation/0141ED2624914000AB1E5A966A5DDFE6.txt @@ -0,0 +1 @@ +82CAB53B60D8D2D3C3497B6639D69A9A05E8ED5CDEE2BE9526D23423BF514C57 comodoca.com 5c1b6af61fc51 \ No newline at end of file diff --git a/404.html b/404.html new file mode 100644 index 0000000..28395d2 --- /dev/null +++ b/404.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + TypeORM - Amazing ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms. + + + + + diff --git a/README-zh_CN.md b/README-zh_CN.md new file mode 100644 index 0000000..8284d19 --- /dev/null +++ b/README-zh_CN.md @@ -0,0 +1,57 @@ +TypeORM 文档网站 +============================= + +文档 : [https://typeorm.io/](https://typeorm.io/) + +项目仓库 : [https://github.com/typeorm/typeorm](https://github.com/typeorm/typeorm) + +## TypeORM 是什么? + +TypeORM 是一个[ORM](https://en.wikipedia.org/wiki/Object-relational_mapping)框架,它可以运行在 NodeJS、Browser、Cordova、PhoneGap、Ionic、React Native、Expo 和 Electron 平台上,可以与 TypeScript 和 JavaScript (ES5,ES6,ES7,ES8)一起使用。 它的目标是始终支持最新的 JavaScript 特性并提供额外的特性以帮助你开发任何使用数据库的(不管是只有几张表的小型应用还是拥有多数据库的大型企业应用)应用程序。 + +不同于现有的所有其他 JavaScript ORM 框架,TypeORM 支持 Active Record 和 Data Mapper 模式,这意味着你可以以最高效的方式编写高质量的、松耦合的、可扩展的、可维护的应用程序。 + +TypeORM 参考了很多其他优秀 ORM 的实现, 比如 [Hibernate](http://hibernate.org/orm/), [Doctrine](http://www.doctrine-project.org/) 和 [Entity Framework](https://www.asp.net/entity-framework)。 + +TypeORM 的一些特性: + +* 支持 DataMapper 和 ActiveRecord (随你选择) +* 实体和列 +* 数据库特性列类型 +* 实体管理 +* 存储库和自定义存储库 +* 清晰的对象关系模型 +* 关联(关系) +* 贪婪和延迟关系 +* 单向的,双向的和自引用的关系 +* 支持多重继承模式 +* 级联 +* 索引 +* 事务 +* 迁移和自动迁移 +* 连接池 +* 主从复制 +* 使用多个数据库连接 +* 使用多个数据库类型 +* 跨数据库和跨模式查询 +* 优雅的语法,灵活而强大的 QueryBuilder +* 左联接和内联接 +* 使用联查查询的适当分页 +* 查询缓存 +* 原始结果流 +* 日志 +* 监听者和订阅者(钩子) +* 支持闭包表模式 +* 在模型或者分离的配置文件中声明模式 +* json / xml / yml / env格式的连接配置 +* 支持 MySQL / MariaDB / Postgres / SQLite / Microsoft SQL Server / Oracle / sql.js +* 支持 MongoDB NoSQL 数据库 +* 可在 NodeJS / 浏览器 / Ionic / Cordova / React Native / Expo / Electron 平台上使用 +* 支持 TypeScript 和 JavaScript +* 生成高性能、灵活、清晰和可维护的代码 +* 遵循所有可能的最佳实践 +* 命令行工具 + +还有更多... + +查看[网站](http://typeorm.io)上的更多文档。 diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..68730c9 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +include: [".well-known"] diff --git a/google552c2ac57e25d91e.html b/google552c2ac57e25d91e.html new file mode 100644 index 0000000..58af12f --- /dev/null +++ b/google552c2ac57e25d91e.html @@ -0,0 +1 @@ +google-site-verification: google552c2ac57e25d91e.html \ No newline at end of file diff --git a/index.html b/index.html index a811494..7860819 100644 --- a/index.html +++ b/index.html @@ -5,16 +5,27 @@ + + + + + @@ -24,25 +35,31 @@ TypeORM - Amazing ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms. - - + -
+
- - - - + + + + + + + + + + + @@ -59,4 +76,4 @@ - \ No newline at end of file + diff --git a/locale/en.js b/locale/en.js new file mode 100644 index 0000000..604a006 --- /dev/null +++ b/locale/en.js @@ -0,0 +1,179 @@ +const locale_en = { + title: "TypeORM - Amazing ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.", + contribute: "Found a typo and want to contribute to the documentation?", + edit: "Edit this page on Github!", + links: [{ + url: "", + name: "Getting Started" + }, { + name: "DataSource", + links: [ + { + url: "data-source", + name: "Working with Data Source" + }, + { + url: "data-source-options", + name: "Data Source Options" + }, + { + url: "multiple-data-sources", + name: "Multiple Data Sources" + }, + { + url: "data-source-api", + name: "DataSource API" + } + ] + }, { + name: "Entity", + links: [{ + url: "entities", + name: "What is Entity?" + }, { + url: "embedded-entities", + name: "Embedded Entities" + }, { + url: "entity-inheritance", + name: "Entity Inheritance" + }, { + url: "tree-entities", + name: "Tree Entities" + }, { + url: "view-entities", + name: "View Entities" + }, { + url: "separating-entity-definition", + name: "Separating Entity Definition" + }] + }, { + name: "Relations", + links: [{ + url: "relations", + name: "What are Relations?" + }, { + url: "one-to-one-relations", + name: "One-to-One" + }, { + url: "many-to-one-one-to-many-relations", + name: "Many-to-One and One-to-Many" + }, { + url: "many-to-many-relations", + name: "Many-to-Many" + }, { + url: "eager-and-lazy-relations", + name: "Eager and Lazy Relations" + }, { + url: "relations-faq", + name: "Relations FAQ" + }] + }, { + name: "Entity Manager and Repository", + links: [{ + url: "working-with-entity-manager", + name: "Working with Entity Manager" + }, { + url: "working-with-repository", + name: "Working with Repository" + }, { + url: "find-options", + name: "Find Options" + }, { + url: "custom-repository", + name: "Custom Repository" + }, { + url: "entity-manager-api", + name: "Entity Manager API" + }, { + url: "repository-api", + name: "Repository API" + }] + }, { + url: "query-builder", + name: "Query Builder", + links: [{ + url: "select-query-builder", + name: "Select using Query Builder" + }, { + url: "insert-query-builder", + name: "Insert using Query Builder" + }, { + url: "update-query-builder", + name: "Update using Query Builder" + }, { + url: "delete-query-builder", + name: "Delete using Query Builder" + }, { + url: "relational-query-builder", + name: "Working with Relations" + }, { + url: "caching", + name: "Caching Results" + }] + }, { + name: "Advanced Topics", + links: [{ + url: "migrations", + name: "Migrations" + }, { + url: "transactions", + name: "Transactions" + }, { + url: "indices", + name: "Indices" + }, { + url: "listeners-and-subscribers", + name: "Listeners and Subscribers" + }, { + url: "logging", + name: "Logging" + }, { + url: "using-cli", + name: "Using CLI" + }] + }, { + name: "Guides", + links: [{ + url: "active-record-data-mapper", + name: "Active Record vs Data Mapper" + }, { + url: "mongodb", + name: "Working with MongoDB" + }, { + url: "validation", + name: "Using Validation" + }, { + url: "example-with-express", + name: "Example with Express" + }, { + url: "usage-with-javascript", + name: "Usage with JavaScript" + }, { + url: "sequelize-migration", + name: "Migration from Sequelize" + }] + }, { + name: "Help", + links: [{ + url: "faq", + name: "FAQ" + }, { + url: "supported-platforms", + name: "Supported Platforms" + }, { + url: "decorator-reference", + name: "Decorator Reference" + }, + // { + // url: "internals", + // name: "Internals" + // }, + { + url: "changelog", + name: "Changelog" + }, { + url: "support", + name: "Support" + }] + }] +} \ No newline at end of file diff --git a/locale/zh_CN.js b/locale/zh_CN.js new file mode 100644 index 0000000..55fdd66 --- /dev/null +++ b/locale/zh_CN.js @@ -0,0 +1,185 @@ +const locale_zh_CN = { + title: "TypeORM - 用于TypeScript和JavaScript(ES7,ES6,ES5)的ORM。支持MySQL、PostgreSQL、MariaDB、SQLite、MS SQL Server、Oracle、WebSQL数据库。 支持NodeJS、浏览器、Ionic、Cordova和Electron平台。", + contribute: "发现错误并希望为文档做出贡献?", + edit: "在Github上编辑此页面!", + links: [{ + url: "", + name: "快速开始" + }, { + name: "数据库连接", + links: [{ + url: "connection", + name: "使用Connection" + }, { + url: "using-ormconfig", + name: "使用ormconfig.json" + }, { + url: "connection-options", + name: "Connection选项" + }, { + url: "multiple-connections", + name: "多个Connection" + }, { + url: "connection-api", + name: "Connection API" + }] + }, { + name: "实体", + links: [{ + url: "entities", + name: "什么是实体?" + }, { + url: "embedded-entities", + name: "嵌入式实体" + }, { + url: "entity-inheritance", + name: "实体继承" + }, { + url: "tree-entities", + name: "树实体" + }, { + url: "separating-entity-definition", + name: "分离实体定义" + }] + }, { + name: "关系", + links: [{ + url: "relations", + name: "什么是关系?" + }, { + url: "one-to-one-relations", + name: "一对一" + }, { + url: "many-to-one-one-to-many-relations", + name: "多对一和一对多" + }, { + url: "many-to-many-relations", + name: "多对多" + }, { + url: "eager-and-lazy-relations", + name: "Eager 和 Lazy 关系" + }, { + url: "relations-faq", + name: "关系常见问题" + }] + }, { + name: "Entity Manager 和 Repository", + links: [{ + url: "working-with-entity-manager", + name: "使用Entity Manager" + }, { + url: "working-with-repository", + name: "使用Repository" + }, { + url: "find-options", + name: "Find选项" + }, { + url: "custom-repository", + name: "自定义Repository" + }, { + url: "entity-manager-api", + name: "实体管理器API" + }, { + url: "repository-api", + name: "Repository API" + }] + }, { + url: "query-builder", + name: "Query Builder", + links: [{ + url: "select-query-builder", + name: "使用Query Builder查询" + }, { + url: "insert-query-builder", + name: "使用Query Builder插入" + }, { + url: "update-query-builder", + name: "使用Query Builder更新" + }, { + url: "delete-query-builder", + name: "使用Query Builder删除" + }, { + url: "relational-query-builder", + name: "与Relations结合" + }, { + url: "caching", + name: "结果缓存" + }] + }, { + name: "进阶主题", + links: [{ + url: "migrations", + name: "迁移" + }, { + url: "transactions", + name: "事务" + }, { + url: "indices", + name: "索引" + }, { + url: "listeners-and-subscribers", + name: "监听者和订阅者" + }, { + url: "logging", + name: "日志" + }, { + url: "using-cli", + name: "使用CLI" + }] + }, { + name: "指南", + links: [{ + url: "active-record-data-mapper", + name: "Active Record vs Data Mapper" + }, { + url: "mongodb", + name: "使用MongoDB" + }, { + url: "validation", + name: "使用验证" + }, { + url: "example-with-express", + name: "Express示例" + }, { + url: "usage-with-javascript", + name: "JavaScript示例" + }, { + url: "sequelize-migration", + name: "从Sequelize迁移" + // { + // url: "schema-in-files", + // name: "文件中定义架构" + // }, + // { + // url: "naming-strategy", + // name: "如何使用自定义命名策略" + // }, + }] + }, { + name: "帮助", + links: [{ + url: "faq", + name: "FAQ" + }, { + url: "supported-platforms", + name: "支持的平台" + }, { + url: "decorator-reference", + name: "装饰器参考" + }, + // { + // url: "internals", + // name: "Internals" + // }, + { + url: "roadmap", + name: "路线图" + }, { + url: "changelog", + name: "更新日志" + }, { + url: "support", + name: "支持" + }] + }] +} diff --git a/package.json b/package.json index 5e74dc5..b1481b9 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "prismjs": "^1.6.0", "reflect-metadata": "^0.1.10", "showdown": "^1.7.4", - "typeorm": "0.1.0-alpha.46", + "typeorm": "0.3.0", "vue": "^2.4.2", "vue-router": "^2.7.0" }, diff --git a/script/component/DocumentPage.js b/script/component/DocumentPage.js index 71a09e1..e7efa07 100644 --- a/script/component/DocumentPage.js +++ b/script/component/DocumentPage.js @@ -1,35 +1,58 @@ const DocumentPage = { template: `
- + -
- Found a typo and want to contribute to the documentation? Edit this page on Github! -
+
`, data: function() { + const route = normalizeRoute(this.$route); + return { - document: this.$route.params.document, - fragment: this.$route.params.fragment, + document: route.document, + hash: route.hash, + locale: $cookies.get("locale") || "en", + readLink: "https://raw.githubusercontent.com/typeorm/typeorm/master/", + editLink: "https://github.com/typeorm/typeorm/edit/master/" }; }, watch: { '$route': function(to, from) { - this.document = to.params.document; - this.fragment = to.params.fragment; + const route = normalizeRoute(to); + + this.document = route.document; + this.hash = route.hash; this.updateTitle(); } }, - create: function() { + mounted() { this.updateTitle(); }, methods: { - updateTitle: function() { - const link = Links.find(link => link.url === this.document); - if (link) { - window.document.title = link.name + " | TypeORM"; + getCurrentDocumentName(links = Links) { + for (const link of links) { + if (link.url === this.document) + return link.name; + else if (link.links instanceof Array) { + const res = this.getCurrentDocumentName(link.links); + if (res != null) + return res; + } } + + return null; + }, + updateTitle: function() { + const documentName = this.getCurrentDocumentName(); + if (!this.document) + document.title = this.$t("title"); + else if (documentName) + window.document.title = documentName + " | TypeORM"; + else + document.title = this.$t("title"); } }, components: { @@ -39,24 +62,43 @@ const DocumentPage = { readUrl: function () { if (this.document === "changelog") { return `https://raw.githubusercontent.com/typeorm/typeorm/master/CHANGELOG.md`; - } else if (!this.document || this.document === "readme") { - return `https://raw.githubusercontent.com/typeorm/typeorm/master/README.md`; - + return this.readLink + (this.locale === "en"? `README.md`: `README-${this.locale}.md`); } else { - return `https://raw.githubusercontent.com/typeorm/typeorm/master/docs/${this.document}.md`; + return this.readLink + (this.locale === "en"? `docs/${this.document}.md`: `docs/${this.locale}/${this.document}.md`); } }, editUrl: function () { if (this.document === "changelog") { return `https://github.com/typeorm/typeorm/edit/master/CHANGELOG.md`; - } else if (!this.document) { - return `https://github.com/typeorm/typeorm/edit/master/README.md`; - + return this.editLink + (this.locale === "en"? "README.md": `README-${this.locale}.md`); } else { - return `https://github.com/typeorm/typeorm/edit/master/docs/${this.document}.md`; + return this.editLink + (this.locale === "en"? `docs/${this.document}.md`: `docs/${this.locale}/${this.document}.md`); } } } -}; \ No newline at end of file +}; + +// Treat https://typeorm.io/?route=%2Fentities%23what-is-entity as https://typeorm.io/entities#what-is-entity +// This is used for Algolia DocSearch crawler indexing as a workaround +// for the site being a single page app while utilizing a 404 page for that +function normalizeRoute(route) { + let document = route.params.document; + let hash = route.hash; + + if (route.query != null && route.query["route"] != null) { + const url = new URL(window.location.origin + route.query["route"]); + document = url.pathname.split("/")[1]; + + if (document == null) + document = route.params.document; + else + hash = url.hash; + } + + return { + document, + hash, + }; +} diff --git a/script/component/MainPage.js b/script/component/MainPage.js index fe01195..779fa6f 100644 --- a/script/component/MainPage.js +++ b/script/component/MainPage.js @@ -1,8 +1,9 @@ const MainPage = { template: `
-
-
-
+ +
+
-
+
{{ link.name }}
-
-
+
+ +
-
+
`, - data: function() { + data: function () { return { - links: Links + links: this.$t("links"), + langs: { en: "English"/*, "zh_CN": "简体中文"*/ }, + // to enable chinese back we need to update the documentation + darkMode: window._darkMode }; }, + mounted() { + // + var scriptEl = document.createElement('script'); + scriptEl.setAttribute('src', '//cdn.carbonads.com/carbon.js?serve=CK7DL53W&placement=typeormio'); + scriptEl.setAttribute('id', '_carbonads_js'); + scriptEl.setAttribute('async', null); + this.$refs.carbon.appendChild(scriptEl); + + docsearch({ + container: '#docsearch', + appId: '2UUKVSBT3M', + indexName: 'typeorm', + apiKey: '8392de2c2e76d873b60bf10562aab788' + }); + }, methods: { - goToLink: function() { - window.scrollTo(0,0); - } + goToLink: function () { + window.scrollTo(0, 0); + + var scriptEl = document.createElement('script'); + scriptEl.setAttribute('src', '//cdn.carbonads.com/carbon.js?serve=CK7DL53W&placement=typeormio'); + scriptEl.setAttribute('id', '_carbonads_js'); + scriptEl.setAttribute('async', null); + this.$refs.carbon.innerHTML = '' + this.$refs.carbon.appendChild(scriptEl); + }, + changeLang: function (locale) { + $cookies.set("locale", locale); + this.$i18n.locale = locale; + window.location.reload(true); + }, + setDarkMode: function (enabled) { + window._darkMode = this.darkMode = enabled; + }, } -}; \ No newline at end of file +}; diff --git a/script/component/MarkdownReader.js b/script/component/MarkdownReader.js index 157944c..8e38581 100644 --- a/script/component/MarkdownReader.js +++ b/script/component/MarkdownReader.js @@ -1,6 +1,6 @@ const MarkdownReader = { - template: `
`, - props: ["file", "fragment"], + template: `
`, + props: ["file", "hash"], data: function() { return { html: "", @@ -10,26 +10,33 @@ const MarkdownReader = { watch: { 'file': function(file) { this.setDocument(); - this.loadFile(file); + this.loadFile(file) + .then(() => { + this.scrollToHash(this.hash); + }); }, - 'fragment': function(fragment) { - this.scrollToFragment(fragment); + 'hash': function(hash) { + this.scrollToHash(hash); } }, created: function () { this.setDocument(); this.loadFile(this.file) .then(() => { - this.scrollToFragment(this.fragment); + this.scrollToHash(this.hash); }); }, methods: { - scrollToFragment: function(fragment) { - const fragmentElement = document.getElementById(fragment); - if (fragmentElement) - fragmentElement.scrollIntoView(); - else - window.scrollTo(0, 0); + scrollToHash: function(hash) { + if (hash) { + const fragmentElement = document.getElementById(hash.substring("#".length)); + if (fragmentElement) { + fragmentElement.scrollIntoView(); + return; + } + } + + window.scrollTo(0, 0); }, setDocument: function () { if(this.$route.params.document) { @@ -48,7 +55,7 @@ const MarkdownReader = { showdown.extension('header-anchors', () => { - var ancTpl = '$1 $4'; + var ancTpl = '$1 $4'; return [{ type: "html", @@ -61,19 +68,19 @@ const MarkdownReader = { return [{ type: "html", regex: //g, - replace: "" + replace: "" }]; }); showdown.extension('other-page-links-replacer', () => { return [{ type: "html", - regex: //g, - replace: "" + regex: //g, + replace: "" }]; }); - const converter = new showdown.Converter({ extensions: ['header-anchors', 'links-replacer', 'other-page-links-replacer'] }); + const converter = new showdown.Converter({ metadata: true, extensions: ['header-anchors', 'links-replacer', 'other-page-links-replacer'] }); converter.setFlavor('github'); converter.setOption('simpleLineBreaks', false); diff --git a/script/constant/Links.js b/script/constant/Links.js index a02f9a6..eb1f2d0 100644 --- a/script/constant/Links.js +++ b/script/constant/Links.js @@ -4,27 +4,23 @@ const Links = [ name: "Getting Started" }, { - name: "Connection", + name: "DataSource", links: [ { - url: "connection", - name: "Working with Connection" + url: "data-source", + name: "Working with Data Source" }, { - url: "using-ormconfig", - name: "Using ormconfig.json" + url: "data-source-options", + name: "Data Source Options" }, { - url: "connection-options", - name: "Connection Options" + url: "multiple-data-sources", + name: "Multiple Data Sources" }, { - url: "multiple-connections", - name: "Multiple Connections" - }, - { - url: "connection-api", - name: "Connection API" + url: "data-source-api", + name: "DataSource API" } ] }, @@ -47,6 +43,14 @@ const Links = [ url: "tree-entities", name: "Tree Entities" }, + { + url: "view-entities", + name: "View Entities" + }, + { + url: "separating-entity-definition", + name: "Separating Entity Definition" + }, ] }, { @@ -222,10 +226,10 @@ const Links = [ // url: "internals", // name: "Internals" // }, - { - url: "roadmap", - name: "Roadmap" - }, + // { + // url: "roadmap", + // name: "Roadmap" + // }, { url: "changelog", name: "Changelog" diff --git a/script/darkmode.js b/script/darkmode.js new file mode 100644 index 0000000..500ab83 --- /dev/null +++ b/script/darkmode.js @@ -0,0 +1,34 @@ +{ + const LS_KEY = "use-dark-mode", + setLsValue = (enabled) => + window.localStorage.setItem(LS_KEY, enabled ? "1" : "0"); + + let useDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches; + const storedPreference = window.localStorage.getItem(LS_KEY); + if (storedPreference === null) { + setLsValue(useDarkMode); + } else { + useDarkMode = storedPreference === "1"; + } + + const darkStylesheets = Array.from( + document.head.querySelectorAll("link[data-dark-stylesheet]") + ); + const setDarkMode = (enabled) => { + useDarkMode = enabled; + setLsValue(enabled); + for (const stylesheet of darkStylesheets) { + enabled + ? stylesheet.setAttribute("rel", "stylesheet") + : stylesheet.removeAttribute("rel"); + } + }; + Object.defineProperty(window, "_darkMode", { + get() { + return useDarkMode; + }, + set: setDarkMode, + }); + + setDarkMode(useDarkMode); +} diff --git a/script/index.js b/script/index.js index 57f6da8..e33b81a 100644 --- a/script/index.js +++ b/script/index.js @@ -1,12 +1,45 @@ +// Ready translated locale messages +const messages = { + en: locale_en, + zh_CN: locale_zh_CN +} + +// Create VueI18n instance with options +const i18n = new VueI18n({ + locale: $cookies.get("locale") || "en", // set locale + fallbackLocale: "en", + messages // set locale messages +}) + +const router = new VueRouter({ + mode: "history", + routes: [ + { path: "/:document?/:fragment?", component: DocumentPage }, + ] +}); + +// Because the documentation previously used "hash" mode in the Router, paths +// starting with a hash will be redirected to prevent breaking old permalinks. +router.beforeEach((to, from, next) => { + if (to.fullPath.startsWith("/#/")) { + // Remove leading hash and replace following slash with hash. + // Before: https://typeorm.io/#/entities/entity-columns + // After: https://typeorm.io/entities#entity-columns + const path = "/" + to.fullPath.substring("/#/".length).replace("/", "#"); + next(path); + } else + next(); +}); + new Vue({ - el: "#app", - router: new VueRouter({ - routes: [ - { path: "/:document?/:fragment?", component: DocumentPage }, - ] - }), - components: { - "main-page": MainPage, - "markdown-reader": MarkdownReader, - } -}); \ No newline at end of file + el: "#app", + i18n, + router: router, + components: { + "main-page": MainPage, + "markdown-reader": MarkdownReader, + }, + mounted: function () { + i18n.locale = $cookies.get("locale") || "en"; + } +}); diff --git a/style/app-dark.css b/style/app-dark.css new file mode 100644 index 0000000..67f0e9b --- /dev/null +++ b/style/app-dark.css @@ -0,0 +1,139 @@ +body { + background-color: #18191a; + color: #eeeeee; +} + +.carbon-container { + border-top: 1px solid #3b3b3b; +} +h2, h3 { + border-bottom: 1px solid #3b3b3b; +} + +.brand-type { + color: #E83524; +} +.brand-orm { + color: #ffffff; +} +.svgIcon { + fill: #eeeeee; +} + +a.anchor { + color: #E83524; +} + +a { + color: #8ad4ff; +} + +a:not(.anchor):hover { + color: #dbefff; +} + +.document h1+ul li::before { + color: #E83524; +} +code { + color: #8ad4ff; +} +h1 code, h2 code, h3 code { + color: #333; +} + +.left-panel ul a { + color: #cccccc; +} +.left-panel ul a.router-link-active { + color: #E83524; +} +.left-panel ul a b { + color: #999999; +} +.left-panel ul a:hover { + color: #E83524; +} +.left-panel ul a b:hover { + color: #E83524; +} + +.navbar { + background-color: rgba(36, 37, 38, 0.6); + border-bottom: 1px solid #1b1b1b; +} + +.navbar-brand { + font-size: 1.4rem; +} + +.contribute { + color: #999; +} + +.contribute a { + color: #cecece; +} + +.language .dropdown-menu a { + color: #616161; +} + +.language .dropdown-item:hover, +.language .dropdown-item:focus { + color: #E83524 !important; + background-color: #f8f9fa; +} + +.language .dropdown-item.active, +.language .dropdown-item:active { + color: #ffffff; + background-color: transparent; +} + +img[src$="/logo_big.png"] { + background-color: rgb(255 255 255); + border-radius: 12px; +} + + +#carbonads { + background-color: hsl(0, 0%, 2%); +} + +#carbonads a { + color: inherit; +} + +#carbonads a:hover { + color: inherit; +} + +.DocSearch { + --docsearch-text-color: #f5f6f7; + --docsearch-muted-color: #7f8497; + --docsearch-logo-color: #fff; + --docsearch-container-background: rgba(47, 55, 69, 0.7); + + /* Modal */ + --docsearch-modal-background: #18191a; + + /* Search box */ + --docsearch-searchbox-background: #18191a; + --docsearch-searchbox-focus-background: #000; + + /* Hit */ + --docsearch-hit-color: #f5f6f7; + --docsearch-hit-active-color: #fff; + --docsearch-hit-background: #1c1e21; + + /* Footer */ + --docsearch-footer-background: #242526; + --docsearch-key-gradient: linear-gradient(-26.5deg, #515151, #404040); + + /* Shadows */ + --docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40,0,0 3px 8px 0 #000309; + --docsearch-hit-shadow: none; + --docsearch-key-shadow: inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3); + --docsearch-footer-shadow: inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2); +} diff --git a/style/app.css b/style/app.css index 6d25e54..e166e31 100644 --- a/style/app.css +++ b/style/app.css @@ -1,3 +1,6 @@ +html { + scroll-padding-top: 80px; +} body { padding-bottom: 20px; } @@ -33,6 +36,30 @@ h2, h3 { } .navbar { margin-bottom: 30px; + position: sticky; + top: 0px; + z-index: 1; + background-color: rgba(255, 255, 255, 1); + border-bottom: 1px solid #EEE; + height: 60px; +} +.brand-type { + color: #E83524; +} +.brand-orm { + color: #000; +} +.svgIcon { + fill: #2c2c2c; +} +@supports (-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px)) { + .navbar { + -webkit-backdrop-filter: blur(6px); + backdrop-filter: blur(6px); + } +} +.navbar { + background-color: rgba(255, 255, 255, 0.6); } .document h1+ul, .document h1+ul ul { list-style: none; @@ -55,9 +82,30 @@ h1 code, h2 code, h3 code { color: #333; } -.bg-light { - background-color: transparent !important; - border-bottom: 1px solid #EEE; +.panels { + display: flex; + flex-direction: row;; + flex-wrap: wrap; +} + +.left-panel { + max-width: 340px; + min-width: 240px; + padding-right: 16px; + flex: 1; +} + +@media only screen and (max-width: 579px) { + .left-panel { + max-width: 579px; + } +} + +.right-panel { + flex: 2; + width: 0px; + min-width: 340px; + padding: 0px 16px; } .left-panel ul { @@ -94,17 +142,157 @@ h1 code, h2 code, h3 code { color: #333; } -.gitter { - background-image: url("../image/icon/gitter.svg"); - fill: #1DA1F2; - width: 18px; - height: 18px; -} - pre { overflow: auto !important; } ol { margin-bottom: 2rem; -} \ No newline at end of file +} +.language > .nav-dropdown { + margin: 0; + padding: 0; + list-style: none; + position: absolute; + border: 1px solid; + right: 20px; + z-index: 9; +} + +.language .dropdown-menu a { + color: #616161; + cursor: pointer; +} + +.language .dropdown-item:hover, +.language .dropdown-item:focus { + color: #E83524 !important; + text-decoration: none; + background-color: #f8f9fa; +} + +.language .dropdown-item.active, +.language .dropdown-item:active { + color: #ffffff; + text-decoration: none; + background-color: transparent; +} + +.carbon-container { + border-top: 1px solid #eee; + padding-top: 20px; + margin-left: 80px; + margin-right: 60px; + min-width: 120px; + margin-bottom: 20px; +} + +#carbonads { + --width: 180px; + --font-size: 14px; +} + +#carbonads { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; + display: block; + overflow: hidden; + margin-bottom: 20px; + max-width: var(--width); + border-radius: 4px; + text-align: center; + box-shadow: 0 0 0 1px hsla(0, 0%, 0%, .1); + background-color: hsl(0, 0%, 98%); + font-size: var(--font-size); + line-height: 1.5; +} + +#carbonads a { + color: inherit; + text-decoration: none; +} + +#carbonads a:hover { + color: inherit; +} + +#carbonads span { + position: relative; + display: block; + overflow: hidden; +} + +.carbon-img { + display: block; + margin-bottom: 8px; + max-width: var(--width); + line-height: 1; +} + +.carbon-img img { + display: block; + margin: 0 auto; + max-width: var(--width) !important; + width: var(--width); + height: auto; +} + +.carbon-text { + display: block; + padding: 0 1em 8px; +} + +.carbon-poweredby { + display: block; + padding: 10px var(--font-size); + background: repeating-linear-gradient(-45deg, transparent, transparent 5px, hsla(0, 0%, 0%, .025) 5px, hsla(0, 0%, 0%, .025) 10px) hsla(203, 11%, 95%, .4); + text-transform: uppercase; + letter-spacing: .5px; + font-weight: 600; + font-size: 9px; + line-height: 0; +} + +@media only screen and (min-width: 320px) and (max-width: 759px) { + #carbonads { + float: none; + margin: 0 auto; + max-width: 330px; + } + #carbonads span { + position: relative; + } + #carbonads > span { + max-width: none; + } + .carbon-img { + float: left; + margin: 0; + } + + .carbon-img img { + max-width: 130px !important; + } + .carbon-text { + float: left; + margin-bottom: 0; + padding: 8px 20px; + text-align: left; + max-width: calc(100% - 130px - 3em); + } + .carbon-poweredby { + left: 130px; + bottom: 0; + display: block; + width: 100%; + } +} + +img { + max-width: 100%; + height: auto; +} + +.DocSearch mark { + padding: initial; +} + diff --git a/style/prism-dark.css b/style/prism-dark.css new file mode 100644 index 0000000..a329a6f --- /dev/null +++ b/style/prism-dark.css @@ -0,0 +1,423 @@ +/** + * prism.js One Dark theme for JavaScript, CoffeeScript, CSS and HTML + * Based on https://github.com/PrismJS/prism-themes/blob/master/themes/prism-one-dark.css + * @author Hoon Wei Ting + */ + +:not(pre) > code, pre { + background: hsl(220, 13%, 18%); + color: hsl(220, 14%, 71%); +} + +pre code { + background-color: transparent; +} + +/* Code blocks */ +pre { + border: 2px solid #141414; +} + +code[class*="language-"], +pre[class*="language-"] { + background: hsl(220, 13%, 18%); + color: hsl(220, 14%, 71%); + text-shadow: 0 1px rgba(0, 0, 0, 0.3); + font-family: "Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Selection */ +code[class*="language-"]::-moz-selection, +code[class*="language-"] *::-moz-selection, +pre[class*="language-"] *::-moz-selection { + background: hsl(220, 13%, 28%); + color: inherit; + text-shadow: none; +} + +code[class*="language-"]::selection, +code[class*="language-"] *::selection, +pre[class*="language-"] *::selection { + background: hsl(220, 13%, 28%); + color: inherit; + text-shadow: none; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.2em 0.3em; + border-radius: 0.3em; + white-space: normal; +} + +/* Print */ +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} + +.token.comment, +.token.prolog, +.token.cdata { + color: hsl(220, 10%, 40%); +} + +.token.doctype, +.token.punctuation, +.token.entity { + color: hsl(220, 14%, 71%); +} + +.token.attr-name, +.token.class-name, +.token.boolean, +.token.constant, +.token.number, +.token.atrule { + color: hsl(29, 54%, 61%); +} + +.token.keyword { + color: hsl(286, 60%, 67%); +} + +.token.property, +.token.tag, +.token.symbol, +.token.deleted, +.token.important { + color: hsl(355, 65%, 65%); +} + +.token.selector, +.token.string, +.token.char, +.token.builtin, +.token.inserted, +.token.regex, +.token.attr-value, +.token.attr-value > .token.punctuation { + color: hsl(95, 38%, 62%); +} + +.token.variable, +.token.operator, +.token.function { + color: hsl(207, 82%, 66%); + background: rgba(255, 255, 255, 0); +} + +.token.url { + color: hsl(187, 47%, 55%); +} + +/* HTML overrides */ +.token.attr-value > .token.punctuation.attr-equals, +.token.special-attr > .token.attr-value > .token.value.css { + color: hsl(220, 14%, 71%); +} + +/* CSS overrides */ +.language-css .token.selector { + color: hsl(355, 65%, 65%); +} + +.language-css .token.property { + color: hsl(220, 14%, 71%); +} + +.language-css .token.function, +.language-css .token.url > .token.function { + color: hsl(187, 47%, 55%); +} + +.language-css .token.url > .token.string.url { + color: hsl(95, 38%, 62%); +} + +.language-css .token.important, +.language-css .token.atrule .token.rule { + color: hsl(286, 60%, 67%); +} + +/* JS overrides */ +.language-javascript .token.operator { + color: hsl(286, 60%, 67%); +} + +.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation { + color: hsl(5, 48%, 51%); +} + +/* JSON overrides */ +.language-json .token.operator { + color: hsl(220, 14%, 71%); +} + +.language-json .token.null.keyword { + color: hsl(29, 54%, 61%); +} + +/* MD overrides */ +.language-markdown .token.url, +.language-markdown .token.url > .token.operator, +.language-markdown .token.url-reference.url > .token.string { + color: hsl(220, 14%, 71%); +} + +.language-markdown .token.url > .token.content { + color: hsl(207, 82%, 66%); +} + +.language-markdown .token.url > .token.url, +.language-markdown .token.url-reference.url { + color: hsl(187, 47%, 55%); +} + +.language-markdown .token.blockquote.punctuation, +.language-markdown .token.hr.punctuation { + color: hsl(220, 10%, 40%); + font-style: italic; +} + +.language-markdown .token.code-snippet { + color: hsl(95, 38%, 62%); +} + +.language-markdown .token.bold .token.content { + color: hsl(29, 54%, 61%); +} + +.language-markdown .token.italic .token.content { + color: hsl(286, 60%, 67%); +} + +.language-markdown .token.strike .token.content, +.language-markdown .token.strike .token.punctuation, +.language-markdown .token.list.punctuation, +.language-markdown .token.title.important > .token.punctuation { + color: hsl(355, 65%, 65%); +} + +/* General */ +.token.bold { + font-weight: bold; +} + +.token.comment, +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.namespace { + opacity: 0.8; +} + +/* Plugin overrides */ +/* Selectors should have higher specificity than those in the plugins' default stylesheets */ + +/* Show Invisibles plugin overrides */ +.token.token.tab:not(:empty):before, +.token.token.cr:before, +.token.token.lf:before, +.token.token.space:before { + color: hsla(220, 14%, 71%, 0.15); + text-shadow: none; +} + +/* Toolbar plugin overrides */ +/* Space out all buttons and move them away from the right edge of the code block */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item { + margin-right: 0.4em; +} + +/* Styling the buttons */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { + background: hsl(220, 13%, 26%); + color: hsl(220, 9%, 55%); + padding: 0.1em 0.4em; + border-radius: 0.3em; +} + +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { + background: hsl(220, 13%, 28%); + color: hsl(220, 14%, 71%); +} + +/* Line Highlight plugin overrides */ +/* The highlighted line itself */ +.line-highlight.line-highlight { + background: hsla(220, 100%, 80%, 0.04); +} + +/* Default line numbers in Line Highlight plugin */ +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { + background: hsl(220, 13%, 26%); + color: hsl(220, 14%, 71%); + padding: 0.1em 0.6em; + border-radius: 0.3em; + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ +} + +/* Hovering over a linkable line number (in the gutter area) */ +/* Requires Line Numbers plugin as well */ +pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before { + background-color: hsla(220, 100%, 80%, 0.04); +} + +/* Line Numbers and Command Line plugins overrides */ +/* Line separating gutter from coding area */ +.line-numbers.line-numbers .line-numbers-rows, +.command-line .command-line-prompt { + border-right-color: hsla(220, 14%, 71%, 0.15); +} + +/* Stuff in the gutter */ +.line-numbers .line-numbers-rows > span:before, +.command-line .command-line-prompt > span:before { + color: hsl(220, 14%, 45%); +} + +/* Match Braces plugin overrides */ +/* Note: Outline colour is inherited from the braces */ +.rainbow-braces .token.token.punctuation.brace-level-1, +.rainbow-braces .token.token.punctuation.brace-level-5, +.rainbow-braces .token.token.punctuation.brace-level-9 { + color: hsl(355, 65%, 65%); +} + +.rainbow-braces .token.token.punctuation.brace-level-2, +.rainbow-braces .token.token.punctuation.brace-level-6, +.rainbow-braces .token.token.punctuation.brace-level-10 { + color: hsl(95, 38%, 62%); +} + +.rainbow-braces .token.token.punctuation.brace-level-3, +.rainbow-braces .token.token.punctuation.brace-level-7, +.rainbow-braces .token.token.punctuation.brace-level-11 { + color: hsl(207, 82%, 66%); +} + +.rainbow-braces .token.token.punctuation.brace-level-4, +.rainbow-braces .token.token.punctuation.brace-level-8, +.rainbow-braces .token.token.punctuation.brace-level-12 { + color: hsl(286, 60%, 67%); +} + +/* Diff Highlight plugin overrides */ +/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ +pre.diff-highlight > code .token.token.deleted:not(.prefix), +pre > code.diff-highlight .token.token.deleted:not(.prefix) { + background-color: hsla(353, 100%, 66%, 0.15); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix), +pre > code.diff-highlight .token.token.inserted:not(.prefix) { + background-color: hsla(137, 100%, 55%, 0.15); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +/* Previewers plugin overrides */ +/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-dark-ui */ +/* Border around popup */ +.prism-previewer.prism-previewer:before, +.prism-previewer-gradient.prism-previewer-gradient div { + border-color: hsl(224, 13%, 17%); +} + +/* Angle and time should remain as circles and are hence not included */ +.prism-previewer-color.prism-previewer-color:before, +.prism-previewer-gradient.prism-previewer-gradient div, +.prism-previewer-easing.prism-previewer-easing:before { + border-radius: 0.3em; +} + +/* Triangles pointing to the code */ +.prism-previewer.prism-previewer:after { + border-top-color: hsl(224, 13%, 17%); +} + +.prism-previewer-flipped.prism-previewer-flipped.after { + border-bottom-color: hsl(224, 13%, 17%); +} + +/* Background colour within the popup */ +.prism-previewer-angle.prism-previewer-angle:before, +.prism-previewer-time.prism-previewer-time:before, +.prism-previewer-easing.prism-previewer-easing { + background: hsl(219, 13%, 22%); +} + +/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ +/* For time, this is the alternate colour */ +.prism-previewer-angle.prism-previewer-angle circle, +.prism-previewer-time.prism-previewer-time circle { + stroke: hsl(220, 14%, 71%); + stroke-opacity: 1; +} + +/* Stroke colours of the handle, direction point, and vector itself */ +.prism-previewer-easing.prism-previewer-easing circle, +.prism-previewer-easing.prism-previewer-easing path, +.prism-previewer-easing.prism-previewer-easing line { + stroke: hsl(220, 14%, 71%); +} + +/* Fill colour of the handle */ +.prism-previewer-easing.prism-previewer-easing circle { + fill: transparent; +} diff --git a/style/prism.css b/style/prism.css index 99f4717..0cbce7c 100644 --- a/style/prism.css +++ b/style/prism.css @@ -4,6 +4,10 @@ * @author Tim Shedor */ +pre[class*="language-"] { + margin: .5em 0 1rem; +} + code[class*="language-"], pre[class*="language-"] { color: black; @@ -24,13 +28,12 @@ pre[class*="language-"] { -moz-hyphens: none; -ms-hyphens: none; hyphens: none; - margin-bottom: 1rem; + /*margin-bottom: 1rem;*/ } /* Code blocks */ pre { position: relative; - margin: .5em 0; /* box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf; */ /* background-color: #fdfdfd; */ /* background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%); */ diff --git a/well-known/pki-validation/0141ED2624914000AB1E5A966A5DDFE6.txt b/well-known/pki-validation/0141ED2624914000AB1E5A966A5DDFE6.txt new file mode 100644 index 0000000..7e93ce9 --- /dev/null +++ b/well-known/pki-validation/0141ED2624914000AB1E5A966A5DDFE6.txt @@ -0,0 +1 @@ +82CAB53B60D8D2D3C3497B6639D69A9A05E8ED5CDEE2BE9526D23423BF514C57 comodoca.com 5c1b6af61fc51 \ No newline at end of file