-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made the KLogo component #460
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
03338bb
Made the kolibriFly prop
ShivangRawat30 9c067f5
KLogo component made
ShivangRawat30 c2311ae
Merge branch '373' of https://github.com/ShivangRawat30/kolibri-desig…
ShivangRawat30 1562e9a
minor change
ShivangRawat30 ff15d1a
Rename Index.vue to index.vue
ShivangRawat30 b5774e0
isDecorative removed.
ShivangRawat30 af6bc07
Update index.vue
ShivangRawat30 faf3f1a
Update index.vue
ShivangRawat30 36321df
minor change
ShivangRawat30 b07e362
changes KLogo props
ShivangRawat30 dd94eeb
minor changes
ShivangRawat30 b4d4f46
removed validateAndFormatUnits
ShivangRawat30 b198aba
commit
ShivangRawat30 9f4c6f3
linting fixed
ShivangRawat30 db2d355
Cleanup KLogo
MisRob 585985f
Use lowercase for docs page name
MisRob 56a795a
Finalize KLogo docs page
MisRob 6e3dee1
Merge branch 'main' into 373
MisRob f00125e
Improve guidance wording
MisRob 6b43d8b
Merge branch 'main' into 373
MisRob 945c281
Update changelog
MisRob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
<div> | ||
<img | ||
:src="src" | ||
:src="logo" | ||
:alt="alternateText" | ||
:style="styleObject" | ||
> | ||
|
@@ -14,6 +14,8 @@ | |
|
||
<script> | ||
|
||
import kolibriLogo from '../docs/common/DocsPageTemplate/SideNav/kolibri-logo.svg'; | ||
|
||
export default { | ||
name: 'KImg', | ||
props: { | ||
|
@@ -80,6 +82,13 @@ | |
type: [Number, String], | ||
default: undefined, | ||
}, | ||
/** | ||
* Renders the kolibri icon for the component | ||
*/ | ||
kolibriFly: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
data() { | ||
return { | ||
|
@@ -115,6 +124,9 @@ | |
imgMinWidth() { | ||
return this.validateAndFormatUnits(this.minWidth); | ||
}, | ||
logo() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the item being shown won't always be a "logo" maybe we can call this something like |
||
return this.kolibriFly ? kolibriLogo : this.src; | ||
}, | ||
}, | ||
created() { | ||
if (!this.isDecorative && !this.altText) { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should be linking to an SVG in the docs directory here. Perhaps it'd be worth copy-pasting it directly into the same directory as this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely would be good to copy it to
KImg
/KLogo
directoryThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt that someone re-organizing docs code and pages would get an idea to check whether it broke something in library. So good to have strict separation.