From 59d67e974f3c1024f05e3528a4afcd5ff655d8c6 Mon Sep 17 00:00:00 2001 From: indirectlylit Date: Thu, 28 Jul 2016 10:19:04 -0700 Subject: [PATCH 1/6] migrate svgs to inline, css style-able --- .../assets/src/vue/content-icon/index.vue | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue index 1261559aa5b..507bec9b559 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue @@ -1,6 +1,36 @@ @@ -23,11 +53,10 @@ // TODO - I18N return `${this.progress} - ${this.kind}`; }, - src() { - // Note: dynamic requires should be used carefully because - // they greedily add items to the webpack bundle. - // See https://webpack.github.io/docs/context.html - return require(`./content-icons/${this.progress}-${this.kind}.svg`); + }, + methods: { + thisIs(progress, kind) { + return this.progress === progress && this.kind === kind; }, }, }; From f6867a520a4c581461db9f2f384c4b7d7e55eae2 Mon Sep 17 00:00:00 2001 From: indirectlylit Date: Thu, 28 Jul 2016 10:24:26 -0700 Subject: [PATCH 2/6] add validation to content-icon component --- .../plugins/learn/assets/src/vue/content-icon/index.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue index 507bec9b559..19a2b6531c4 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue @@ -37,15 +37,24 @@ - + diff --git a/kolibri/plugins/learn/assets/src/vue/content-page/index.vue b/kolibri/plugins/learn/assets/src/vue/content-page/index.vue index 70ca5d20f2a..4550303f7c5 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-page/index.vue +++ b/kolibri/plugins/learn/assets/src/vue/content-page/index.vue @@ -14,6 +14,7 @@ @@ -96,7 +97,7 @@ .content-container height: 60vh margin-bottom: 1em - + #little-arrow font-size: 28px font-weight: 900 diff --git a/kolibri/plugins/learn/assets/src/vue/learn.styl b/kolibri/plugins/learn/assets/src/vue/learn.styl index 2b67950a9f9..bc64baeb6ed 100644 --- a/kolibri/plugins/learn/assets/src/vue/learn.styl +++ b/kolibri/plugins/learn/assets/src/vue/learn.styl @@ -28,3 +28,7 @@ width-auto-adjust() $grid-width = grid-width($n-cols) @media (min-width: breakpoint($grid-width)) width: $grid-width + +.pageicon + fill: $core-text-default + From 66c0d3c15061a5a7712c5da5707353f2699e4766 Mon Sep 17 00:00:00 2001 From: indirectlylit Date: Thu, 28 Jul 2016 11:27:17 -0700 Subject: [PATCH 4/6] fix up color selection --- .../src/vue/content-icon/content-icons/complete-audio.svg | 2 +- .../vue/content-icon/content-icons/complete-document.svg | 2 +- .../vue/content-icon/content-icons/complete-exercise.svg | 4 ++-- .../src/vue/content-icon/content-icons/complete-video.svg | 4 ++-- .../src/vue/content-icon/content-icons/partial-audio.svg | 2 +- .../src/vue/content-icon/content-icons/partial-document.svg | 2 +- .../src/vue/content-icon/content-icons/partial-exercise.svg | 6 +++--- .../src/vue/content-icon/content-icons/partial-video.svg | 6 +++--- .../src/vue/content-icon/content-icons/unstarted-audio.svg | 2 +- .../vue/content-icon/content-icons/unstarted-document.svg | 2 +- .../vue/content-icon/content-icons/unstarted-exercise.svg | 4 ++-- .../src/vue/content-icon/content-icons/unstarted-video.svg | 4 ++-- kolibri/plugins/learn/assets/src/vue/content-icon/index.vue | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-audio.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-audio.svg index b581fd5bac9..0baa336ce17 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-audio.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-audio.svg @@ -7,4 +7,4 @@ - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-document.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-document.svg index 107d3542f00..86d55c6ad0a 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-document.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-document.svg @@ -7,4 +7,4 @@ - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-exercise.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-exercise.svg index 4a6df7c025d..1c45d505721 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-exercise.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-exercise.svg @@ -4,7 +4,7 @@ - + - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-video.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-video.svg index 301e5ab3214..5bad3d843e6 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-video.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/complete-video.svg @@ -4,7 +4,7 @@ - + - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-audio.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-audio.svg index 96336732a3a..f0c0d4558f3 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-audio.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-audio.svg @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-document.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-document.svg index 2824b0942df..8fa9c8b3b3f 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-document.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-document.svg @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-exercise.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-exercise.svg index fdb0fafaf58..695c8798c0b 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-exercise.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-exercise.svg @@ -4,8 +4,8 @@ - - + + - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-video.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-video.svg index 2825d8aec04..e06d6720abe 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-video.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/partial-video.svg @@ -5,8 +5,8 @@ - - + + - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-audio.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-audio.svg index cccc3bc2f83..c5c0b3b7b41 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-audio.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-audio.svg @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-document.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-document.svg index 0cf610fa473..60c0a5ac5eb 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-document.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-document.svg @@ -7,4 +7,4 @@ - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-exercise.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-exercise.svg index 0472a4db20f..2af70bea993 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-exercise.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-exercise.svg @@ -5,7 +5,7 @@ - + - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-video.svg b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-video.svg index 6b924db8a02..fe6fb0597da 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-video.svg +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/content-icons/unstarted-video.svg @@ -4,7 +4,7 @@ - + - \ No newline at end of file + diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue index 83f697325e4..f2a7786c9a1 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue @@ -82,7 +82,7 @@ @require '~core-theme.styl' // replace the correct path - .pageicon path[fill='#996189'] + .pageicon [fill='#996189'] fill: $core-text-default // a bit smaller From 66ba8333c34d8ce4a77221701e61e681352e9c16 Mon Sep 17 00:00:00 2001 From: indirectlylit Date: Thu, 28 Jul 2016 11:27:36 -0700 Subject: [PATCH 5/6] add size as an input --- .../assets/src/vue/content-card/index.vue | 1 + .../assets/src/vue/content-icon/index.vue | 32 +++++++++---------- .../assets/src/vue/content-page/index.vue | 1 + 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/kolibri/plugins/learn/assets/src/vue/content-card/index.vue b/kolibri/plugins/learn/assets/src/vue/content-card/index.vue index 6f1c6566348..d964781f45d 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-card/index.vue +++ b/kolibri/plugins/learn/assets/src/vue/content-card/index.vue @@ -6,6 +6,7 @@ diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue index f2a7786c9a1..3267faa62fc 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue @@ -2,33 +2,33 @@
- + - + - + - + - + - + - + - + - + - + - + - +
@@ -46,6 +46,10 @@ type: Boolean, default: false, }, + size: { + type: Number, + default: 30, + }, progress: { type: String, default: 'unstarted', @@ -85,8 +89,4 @@ .pageicon [fill='#996189'] fill: $core-text-default - // a bit smaller - .pageicon - height: 96% - diff --git a/kolibri/plugins/learn/assets/src/vue/content-page/index.vue b/kolibri/plugins/learn/assets/src/vue/content-page/index.vue index 4550303f7c5..2803272c0c3 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-page/index.vue +++ b/kolibri/plugins/learn/assets/src/vue/content-page/index.vue @@ -15,6 +15,7 @@ From ac5f139ad4ab629fe00ea02642afa1f58b51ee13 Mon Sep 17 00:00:00 2001 From: indirectlylit Date: Thu, 28 Jul 2016 11:32:08 -0700 Subject: [PATCH 6/6] whitespace --- .../assets/src/vue/content-icon/index.vue | 36 +++++++------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue index 3267faa62fc..edd94a96d62 100644 --- a/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue +++ b/kolibri/plugins/learn/assets/src/vue/content-icon/index.vue @@ -2,34 +2,22 @@
- - - - - - - - + + + + - - - - - - - - + + + + - - - - - - - - + + + +