-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from indirectlylit/versions
versions
- Loading branch information
Showing
10 changed files
with
230 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<template> | ||
|
||
<a :href="linkUrl" target="_blank"> | ||
<svg | ||
class="logo" | ||
role="img" | ||
viewBox="0 0 24 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<title>GitHub</title> | ||
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" /> | ||
</svg><span>{{ linkText }}</span> | ||
</a> | ||
|
||
</template> | ||
|
||
|
||
<script> | ||
import log from 'loglevel'; | ||
function validator(value) { | ||
if (typeof value === 'string') { | ||
if (value.startsWith('#')) { | ||
log.error(`PR or issue number '${value}' should not start with a '#'`); | ||
return false; | ||
} | ||
if (!value.match(/^\d+$/)) { | ||
log.error(`PR or issue number '${value}' invalid`); | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
export default { | ||
name: 'DocsExternalLink', | ||
props: { | ||
/** | ||
* If provided, set the link text | ||
*/ | ||
text: { | ||
type: String, | ||
required: false, | ||
}, | ||
/** | ||
* If provided, set the link URL | ||
*/ | ||
href: { | ||
type: String, | ||
required: false, | ||
}, | ||
/** | ||
* If provided, create a link to a PR in the design-system repo | ||
*/ | ||
pull: { | ||
type: [String, Number], | ||
required: false, | ||
validator, | ||
}, | ||
/** | ||
* If provided, create a link to an issue in the design-system repo | ||
*/ | ||
issue: { | ||
type: [String, Number], | ||
required: false, | ||
validator, | ||
}, | ||
}, | ||
computed: { | ||
linkText() { | ||
if (this.text) return this.text; | ||
if (this.pull) return `#${this.pull}`; | ||
if (this.issue) return `#${this.issue}`; | ||
return this.linkUrl; | ||
}, | ||
linkUrl() { | ||
if (this.href) return this.href; | ||
if (this.pull) | ||
return `https://github.com/learningequality/kolibri-design-system/pull/${this.pull}`; | ||
if (this.issue) | ||
return `https://github.com/learningequality/kolibri-design-system/issue/${this.issue}`; | ||
log.error(`No URL, PR, or issue provided`); | ||
return undefined; | ||
}, | ||
}, | ||
mounted() { | ||
if (this.pull && this.issue) { | ||
log.warn("Pass either 'pull' or 'issue', not both"); | ||
} | ||
}, | ||
}; | ||
</script> | ||
|
||
|
||
<style lang="scss" scoped> | ||
.logo { | ||
position: relative; | ||
top: -1px; | ||
width: 16px; | ||
height: 16px; | ||
margin-right: 4px; | ||
vertical-align: middle; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
|
||
<div class="link-wrapper"> | ||
<DocsGithubLink | ||
v-if="showLink" | ||
:href="linkUrl" | ||
:text="linkText" | ||
/> | ||
<span v-else> | ||
Local environment | ||
</span> | ||
<span>| <DocsInternalLink text="Version history" href="/versions" /></span> | ||
</div> | ||
|
||
</template> | ||
|
||
|
||
<script> | ||
import environment from '~/environment'; | ||
export default { | ||
name: 'BranchLink', | ||
computed: { | ||
showLink() { | ||
return environment && !environment.local; | ||
}, | ||
linkUrl() { | ||
return environment.url; | ||
}, | ||
linkText() { | ||
return environment.branch; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
|
||
<style lang="scss" scoped> | ||
.link-wrapper { | ||
margin: 18px; | ||
font-size: 14px; | ||
font-weight: normal; | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<template> | ||
|
||
<DocsPageTemplate> | ||
|
||
<DocsPageSection title="Overview" anchor="#overview"> | ||
<p> | ||
Releases are specified as tags in the <DocsExternalLink text="Github releases page" href="https://github.com/learningequality/kolibri-design-system/releases" /> | ||
</p> | ||
</DocsPageSection> | ||
|
||
<DocsPageSection title="Version 0.2" anchor="#0.2"> | ||
<h3>0.2.1</h3> | ||
<h4>Content updates</h4> | ||
<ul> | ||
<li>Added design principles documentation - <DocsGithubLink pull="95" /></li> | ||
<li>Added errors documentation - <DocsGithubLink pull="97" /></li> | ||
<li>Added switches documentation - <DocsGithubLink pull="105" /></li> | ||
<li>Added menu documentation - <DocsGithubLink pull="106" /></li> | ||
</ul> | ||
<h4>Library updates</h4> | ||
<ul> | ||
<li>Added 'email', 'sidebar', and 'add' icons - <DocsGithubLink pull="110" /></li> | ||
<li>Updated 'clipboard' icon - <DocsGithubLink pull="121" /></li> | ||
<li>Fixed z-order bug in icon button - <DocsGithubLink pull="95" />, <DocsGithubLink pull="122" /></li> | ||
</ul> | ||
<h4>Docs site updates</h4> | ||
<ul> | ||
<li>Added support for exporting icons to user documentation - <DocsGithubLink pull="104" /></li> | ||
<li>Documentation bugs and improvements - <DocsGithubLink pull="112" />, <DocsGithubLink pull="114" />, <DocsGithubLink pull="115" /></li> | ||
</ul> | ||
<h3>0.2.1</h3> | ||
<h4>Library updates</h4> | ||
<ul> | ||
<li>Fixed regression related to external links opening in new tabs - <DocsGithubLink pull="93" /></li> | ||
</ul> | ||
<h3>0.2.0</h3> | ||
<p> | ||
This was the first release of the Design System, with documentation written in a Nuxt-based statically-generated site. The focus was on migrating components out of the Kolibri and making them reusable in a shared component library. | ||
</p> | ||
</DocsPageSection> | ||
|
||
<DocsPageSection title="Version 0.1" anchor="#0.1"> | ||
<p> | ||
The design system was originally based on a set of internal Kolibri components and their use as documented in the Kolibri Style Guide, which was first introduced into the Kolibri code base <DocsExternalLink text="in version 0.6" href="https://github.com/learningequality/kolibri/tree/release-v0.6.x/kolibri/plugins/style_guide" />. This remained until <DocsExternalLink text="version 0.13" href="https://github.com/learningequality/kolibri/tree/release-v0.13.x/kolibri/plugins/style_guide" /> after which the content was migrated here. | ||
</p> | ||
</DocsPageSection> | ||
|
||
</DocsPageTemplate> | ||
|
||
</template> | ||
|
||
|
||
<script> | ||
export default {}; | ||
</script> | ||
|
||
|
||
<style lang="scss" scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters