From a7ee876ec6d272d264fd9f0526e879621a3c1a6b Mon Sep 17 00:00:00 2001 From: Devon Rueckner Date: Wed, 23 Sep 2020 16:09:59 -0700 Subject: [PATCH 1/7] WIP on versions --- docs/common/DocsAnchorTarget.vue | 4 ++-- docs/pages/versions.vue | 31 +++++++++++++++++++++++++++++++ docs/tableOfContents.js | 4 ++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 docs/pages/versions.vue diff --git a/docs/common/DocsAnchorTarget.vue b/docs/common/DocsAnchorTarget.vue index fb9d6cab5..c871fe125 100644 --- a/docs/common/DocsAnchorTarget.vue +++ b/docs/common/DocsAnchorTarget.vue @@ -34,8 +34,8 @@ log.warn(`'anchor' prop value '${value}' must start with a '#'`); return false; } - if (!value.match(/^#[a-zA-Z0-9_-]*$/)) { - log.warn(`'anchor' prop value '${value}' must match /^#[a-zA-Z0-9_-]*$/`); + if (!value.match(/^#[\w.:]*$/)) { + log.warn(`'anchor' prop value '${value}' invalid`); return false; } return true; diff --git a/docs/pages/versions.vue b/docs/pages/versions.vue new file mode 100644 index 000000000..930155b65 --- /dev/null +++ b/docs/pages/versions.vue @@ -0,0 +1,31 @@ + + + + + + + diff --git a/docs/tableOfContents.js b/docs/tableOfContents.js index 058bd66ef..db5dba2bf 100644 --- a/docs/tableOfContents.js +++ b/docs/tableOfContents.js @@ -64,6 +64,10 @@ export default [ path: '/principles', title: 'Design principles', }), + new Page({ + path: '/versions', + title: 'Version history', + }), ], }), new Section({ From 0e5db5d242abf9822a843386fe528c1ff26fce24 Mon Sep 17 00:00:00 2001 From: Devon Rueckner Date: Wed, 23 Sep 2020 17:03:17 -0700 Subject: [PATCH 2/7] factor github link out into a reusable docs component --- docs/assets/definitions.scss | 2 +- docs/common/DocsAnchorTarget.vue | 4 +- docs/common/DocsGithubLink.vue | 107 ++++++++++++++++++++ docs/common/DocsPageTemplate/BranchLink.vue | 48 +++++++++ docs/common/DocsPageTemplate/GitHubLink.vue | 66 ------------ docs/common/DocsPageTemplate/Header.vue | 6 +- docs/pages/versions.vue | 21 ++-- docs/plugins/load-common-components.js | 2 + 8 files changed, 178 insertions(+), 78 deletions(-) create mode 100644 docs/common/DocsGithubLink.vue create mode 100644 docs/common/DocsPageTemplate/BranchLink.vue delete mode 100644 docs/common/DocsPageTemplate/GitHubLink.vue diff --git a/docs/assets/definitions.scss b/docs/assets/definitions.scss index b90560541..53475f465 100644 --- a/docs/assets/definitions.scss +++ b/docs/assets/definitions.scss @@ -4,5 +4,5 @@ $code-color: #696680; $link-color: #368d74; $link-hover-color: #26614d; $selection-color: #f0e7ed; -$basic-transition: color 0.25s ease; +$basic-transition: color 0.25s ease, fill 0.25s ease; $nav-width: 260px; diff --git a/docs/common/DocsAnchorTarget.vue b/docs/common/DocsAnchorTarget.vue index c871fe125..994beadce 100644 --- a/docs/common/DocsAnchorTarget.vue +++ b/docs/common/DocsAnchorTarget.vue @@ -31,11 +31,11 @@ type: String, validator(value) { if (!value.startsWith('#')) { - log.warn(`'anchor' prop value '${value}' must start with a '#'`); + log.error(`'anchor' prop value '${value}' must start with a '#'`); return false; } if (!value.match(/^#[\w.:]*$/)) { - log.warn(`'anchor' prop value '${value}' invalid`); + log.error(`'anchor' prop value '${value}' invalid`); return false; } return true; diff --git a/docs/common/DocsGithubLink.vue b/docs/common/DocsGithubLink.vue new file mode 100644 index 000000000..8ea0d1b20 --- /dev/null +++ b/docs/common/DocsGithubLink.vue @@ -0,0 +1,107 @@ + + + + + + + diff --git a/docs/common/DocsPageTemplate/BranchLink.vue b/docs/common/DocsPageTemplate/BranchLink.vue new file mode 100644 index 000000000..36c883ed0 --- /dev/null +++ b/docs/common/DocsPageTemplate/BranchLink.vue @@ -0,0 +1,48 @@ + + + + + + + diff --git a/docs/common/DocsPageTemplate/GitHubLink.vue b/docs/common/DocsPageTemplate/GitHubLink.vue deleted file mode 100644 index b0f1573b2..000000000 --- a/docs/common/DocsPageTemplate/GitHubLink.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - diff --git a/docs/common/DocsPageTemplate/Header.vue b/docs/common/DocsPageTemplate/Header.vue index cc27cd690..55fcfe0eb 100644 --- a/docs/common/DocsPageTemplate/Header.vue +++ b/docs/common/DocsPageTemplate/Header.vue @@ -13,7 +13,7 @@ link to current page - +