-
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 branch 'main' into issue-450-add-KTextTruncator
- Loading branch information
Showing
8 changed files
with
354 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
|
||
<DocsPageTemplate apiDocs> | ||
<DocsPageSection title="Overview" anchor="#overview"> | ||
<p>Shows Kolibri logo.</p> | ||
|
||
<DocsShow> | ||
<KLogo | ||
altText="Kolibri Logo" | ||
:height="150" | ||
width="100%" | ||
:maxWidth="150" | ||
/> | ||
</DocsShow> | ||
<DocsShowCode language="html"> | ||
<KLogo | ||
altText="Kolibri logo" | ||
:height="150" | ||
width="100%" | ||
:maxWidth="150" | ||
/> | ||
</DocsShowCode> | ||
</DocsPageSection> | ||
|
||
<DocsPageSection title="Usage" anchor="#usage"> | ||
<h3>Alternative text</h3> | ||
|
||
<p>Alternative text (<code>altText</code>) is required for the logo image. When creating it, consider the following:</p> | ||
<ul> | ||
<li>If the logo is used as a flat image, you can use the string "Kolibri logo"</li> | ||
<li>If the the logo is used as a link, then the alternative text needs to give the context where the link is leading (for example "Go to home page", or similar)</li> | ||
</ul> | ||
</DocsPageSection> | ||
|
||
<DocsPageSection title="Related" anchor="#related"> | ||
<ul> | ||
<li> | ||
<code>KLogo</code> is derived from <DocsLibraryLink component="KImg" /> and provides a subset of <code>KImg</code>'s API. | ||
</li> | ||
</ul> | ||
</DocsPageSection> | ||
</DocsPageTemplate> | ||
|
||
</template> | ||
|
||
|
||
<script> | ||
export default {}; | ||
</script> |
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 |
---|---|---|
|
@@ -158,4 +158,4 @@ | |
</script> | ||
|
||
|
||
<style scoped></style> | ||
<style 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<template> | ||
|
||
<KImg | ||
:src="logo" | ||
:altText="altText" | ||
:height="height" | ||
:width="width" | ||
:maxHeight="maxHeight" | ||
:minHeight="minHeight" | ||
:maxWidth="maxWidth" | ||
:minWidth="minWidth" | ||
/> | ||
|
||
</template> | ||
|
||
|
||
<script> | ||
import kolibriLogo from './kolibri-logo.svg'; | ||
export default { | ||
name: 'KLogo', | ||
props: { | ||
/** | ||
* Alternative text for the logo | ||
*/ | ||
altText: { | ||
type: String, | ||
required: true, | ||
default: '', | ||
}, | ||
/** | ||
* Sets the height for the logo | ||
*/ | ||
height: { | ||
type: [Number, String], | ||
default: undefined, | ||
}, | ||
/** | ||
* Sets the width for the logo | ||
*/ | ||
width: { | ||
type: [Number, String], | ||
default: undefined, | ||
}, | ||
/** | ||
* Sets the maximum height for the logo | ||
*/ | ||
maxHeight: { | ||
type: [Number, String], | ||
default: undefined, | ||
}, | ||
/** | ||
* Sets the minimum height for the logo | ||
*/ | ||
minHeight: { | ||
type: [Number, String], | ||
default: undefined, | ||
}, | ||
/** | ||
* Sets the maximum width for the logo | ||
*/ | ||
maxWidth: { | ||
type: [Number, String], | ||
default: undefined, | ||
}, | ||
/** | ||
* Sets the minimum width for the logo | ||
*/ | ||
minWidth: { | ||
type: [Number, String], | ||
default: undefined, | ||
}, | ||
}, | ||
computed: { | ||
logo() { | ||
return kolibriLogo; | ||
}, | ||
}, | ||
}; | ||
</script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.