From cba75c282bd8b19f20ea3cbb3a0b6fc953fa7de0 Mon Sep 17 00:00:00 2001 From: Ari Date: Wed, 26 Jun 2019 16:03:56 -0700 Subject: [PATCH 01/11] Revert "Get basic license card working, currently only cc-by supported" This reverts commit 4a5891cefe1efa69d0fa877ba0a27f74c73c3407. From 9c5de4bb2245a60a91977cfe9be505950c982b5f Mon Sep 17 00:00:00 2001 From: Ari Date: Thu, 27 Jun 2019 17:20:08 -0700 Subject: [PATCH 02/11] Update icon descriptions text, working on new icon title display method - still buggy --- src/index.html | 52 +++++++++++++++++++++++++++---------------- src/styles/styles.css | 5 +++++ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/index.html b/src/index.html index d208dfbe3..9d24bd479 100644 --- a/src/index.html +++ b/src/index.html @@ -514,38 +514,52 @@

Confused? Need Help?

- Attribution (BY)
-

You must attribute the work in the manner specified by the author or licensor.


+ (BY) Attribution Credit Required
+

+ All CC licenses require that others who use your work in any way must give + you credit the way you request, but not in a way that suggests you endorse + them or their use. If they want to use your work without giving credit for + endorsement purposes, they must get your permission first. +

- NoDerivatives (ND) + (ND/NoDerivatives) Modifying Not Allowed

- You may not create derivatives of the licensed work. + You let others copy, distribute, display, and perform, and modify your work, + as long as they distribute any modified work, they must get your permission first.

-
- - ShareAlike (SA) -

- You may create and distribute derivative works, but only under the same or a compatible license. +

+
+ +
+
+

(NC/NonCommercial)

+

Commercial use Not Allowed

+
+
+

+ You let others copy, distribute, display, perform, and (unless you have + chosen NoDerivatives) modify and use your work for any purpose other + than commercially, unless they get your permission first. +

+

+ Curious what qualifies as a Commercial Use? Check out the + CC wiki page on interpretation of Commercial Uses.

-
- - NonCommercial (NC) + + (SA/ShareAlike) Distributed on Same Terms

- The licensor permits others to copy, distribute and transmit the work. In return, - licensees may not use the work for commercial purposes -- unless they get the - licensor's permission.


+ You let others copy, distribute, perform, and modify your work, as long as + they distribute any modified work on the same terms. If they want to + distribute modified works under other terms, they must get your permission first. +

diff --git a/src/styles/styles.css b/src/styles/styles.css index 242beee3e..f0620a732 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -7,6 +7,11 @@ vertical-align: middle; } +.edu-icons-section p { + margin-top: 2%; + margin-bottom: 6%; +} + .chooser-controls-icons { width: 45px; } From 67dd6db1ebedce9130acd8f1bc27038224154e5a Mon Sep 17 00:00:00 2001 From: Ari Date: Thu, 27 Jun 2019 18:01:08 -0700 Subject: [PATCH 03/11] Get basic selected license card system working --- src/index.html | 27 ++++++++++++++++++++++ src/index.js | 41 +++++++++++++++++++++++++++++++++ src/scripts/choose-a-license.js | 13 ++++++++++- src/styles/sass/bulma-mods.scss | 1 + src/styles/styles.css | 8 +++++++ 5 files changed, 89 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 9d24bd479..ceaa12d05 100644 --- a/src/index.html +++ b/src/index.html @@ -234,6 +234,7 @@



--> + +
+
+
+

+ Your License! +

+
+
+
+
+ +
+
+ {{chooser.selected_license}} ({{chooser.selected_license_short}}) +

+ {{chooser.selected_license_desc}} +


+ +

{{chooser.selected_license_short_noversion}} attribution means you allow people to

+

Share {{chooser.selected_license_share}}, and

+

Adapt {{chooser.selected_license_adapt}}

+
+
+
+
diff --git a/src/index.js b/src/index.js index 21d2c7e08..ba7a41e4e 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,11 @@ var app_state = new Vue({ // eslint-disable-line chooser: { selected_license: "[License Name]", selected_license_short: "[License Short]", + selected_license_short_noversion: "[License Short NoVersion]", + selected_license_short_slugified: "[Slugified Short]", + selected_license_desc: "[Description]", + selected_license_share: "[Share]", + selected_license_adapt: "[Adapt]", selected_license_link: "", icons: { nc_shown: false, @@ -28,6 +33,42 @@ var app_state = new Vue({ // eslint-disable-line normal_icon: true, metadata_text: "" } + }, + license_packs: { + "by": { + "description": "As the most accommodating of \ + licenses offered, the CC BY license allows others \ + to distribute, remix, tweak, and build upon your \ + work, even commercially, as long as they credit \ + you for the original creation.", + "Share": "the material in any medium or format", + "Adapt": "it for any purpose, even commercially" + }, + "by-sa": { + "description": "", + "Share": "", + "Adapt": "" + }, + "by-nd": { + "description": "", + "Share": "", + "Adapt": "" + }, + "by-nc": { + "description": "", + "Share": "", + "Adapt": "" + }, + "by-nc-sa": { + "description": "", + "Share": "", + "Adapt": "" + }, + "by-nc-nd": { + "description": "", + "Share": "", + "Adapt": "" + }, } } }); diff --git a/src/scripts/choose-a-license.js b/src/scripts/choose-a-license.js index fe1bed453..28558c837 100644 --- a/src/scripts/choose-a-license.js +++ b/src/scripts/choose-a-license.js @@ -1,6 +1,7 @@ function set_license() { set_license_text() - set_license_icons() + //set_license_icons() + set_license_info() } function set_license_text() { @@ -18,6 +19,14 @@ function set_license_text() { set_license_link() } +function set_license_info() { + var chooser_state = app_state.chooser + var pack = app_state.license_packs[chooser_state.selected_license_short_slugified] + chooser_state.selected_license_desc = pack["description"] + chooser_state.selected_license_share = pack["Share"] + chooser_state.selected_license_adapt = pack["Adapt"] +} + function set_license_icons() { var state = app_state.chooser if (state.inputs.allow_adaptations) { @@ -81,6 +90,8 @@ function gen_shortened_name(url_version = false) { } else if(license.includes("ShareAlike")) { short += "-SA" } + app_state.chooser.selected_license_short_noversion = short + app_state.chooser.selected_license_short_slugified = short.slice(3).toLowerCase() return (url_version ? short.slice(3).toLowerCase() : short += " 4.0") } diff --git a/src/styles/sass/bulma-mods.scss b/src/styles/sass/bulma-mods.scss index 1037d8b8b..f1f44df16 100644 --- a/src/styles/sass/bulma-mods.scss +++ b/src/styles/sass/bulma-mods.scss @@ -21,6 +21,7 @@ $default: $cc-orange; @import "../../../node_modules/bulma/sass/layout/section.sass"; @import "../../../node_modules/bulma/sass/grid/all.sass"; @import "../../../node_modules/bulma/sass/components/modal.sass"; +@import "../../../node_modules/bulma/sass/components/card.sass"; @import "../../../node_modules/bulma-switch/dist/css/bulma-switch.sass"; @import "../../../node_modules/cool-checkboxes-for-bulma.io/dist/css/bulma-radio-checkbox.css"; @import "../../../node_modules/@creativebulma/bulma-collapsible/dist/css/bulma-collapsible.min.css"; \ No newline at end of file diff --git a/src/styles/styles.css b/src/styles/styles.css index f0620a732..685f44868 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -16,6 +16,14 @@ width: 45px; } +.chooser-selected-card-title { + margin: 1.5% auto; +} + +.chooser-selected-title { + font-size: 1.5vw; +} + .unselected { width: 45px; opacity: 0.4; From 5cbc1d4a17b5521edd7810193cb6d830ea4e58d2 Mon Sep 17 00:00:00 2001 From: Ari Date: Thu, 27 Jun 2019 18:26:07 -0700 Subject: [PATCH 04/11] Get license icon setting working, license packs still need descriptions --- src/index.html | 13 ++++++++----- src/index.js | 16 +++++----------- src/scripts/choose-a-license.js | 9 +++++++-- src/styles/styles.css | 10 ++++++++++ 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/index.html b/src/index.html index ceaa12d05..731de1bae 100644 --- a/src/index.html +++ b/src/index.html @@ -255,9 +255,12 @@

-
- -
+ + + + + +
{{chooser.selected_license}} ({{chooser.selected_license_short}})

@@ -265,8 +268,8 @@


{{chooser.selected_license_short_noversion}} attribution means you allow people to

-

Share {{chooser.selected_license_share}}, and

-

Adapt {{chooser.selected_license_adapt}}

+

Share the material in any medium or format, and

+

Adapt {{chooser.selected_license_adapt}}

diff --git a/src/index.js b/src/index.js index ba7a41e4e..b6c0d5218 100644 --- a/src/index.js +++ b/src/index.js @@ -41,33 +41,27 @@ var app_state = new Vue({ // eslint-disable-line to distribute, remix, tweak, and build upon your \ work, even commercially, as long as they credit \ you for the original creation.", - "Share": "the material in any medium or format", "Adapt": "it for any purpose, even commercially" }, "by-sa": { "description": "", - "Share": "", - "Adapt": "" + "Adapt": "it for any purpose, even commercially" }, "by-nd": { "description": "", - "Share": "", - "Adapt": "" + "Adapt": false }, "by-nc": { "description": "", - "Share": "", - "Adapt": "" + "Adapt": "it for any purpose, except commercially" }, "by-nc-sa": { "description": "", - "Share": "", - "Adapt": "" + "Adapt": "it for any purpose, except commercially" }, "by-nc-nd": { "description": "", - "Share": "", - "Adapt": "" + "Adapt": false }, } } diff --git a/src/scripts/choose-a-license.js b/src/scripts/choose-a-license.js index 28558c837..cc84658f7 100644 --- a/src/scripts/choose-a-license.js +++ b/src/scripts/choose-a-license.js @@ -1,6 +1,6 @@ function set_license() { set_license_text() - //set_license_icons() + set_license_icons() set_license_info() } @@ -23,8 +23,13 @@ function set_license_info() { var chooser_state = app_state.chooser var pack = app_state.license_packs[chooser_state.selected_license_short_slugified] chooser_state.selected_license_desc = pack["description"] - chooser_state.selected_license_share = pack["Share"] + chooser_state.selected_license_adapt = pack["Adapt"] + if (!pack["Adapt"]) { // If adaptations are not allowed + document.getElementById("generated-license-adapt").style.display = "none" + } else { + document.getElementById("generated-license-adapt").style.display = "block" + } } function set_license_icons() { diff --git a/src/styles/styles.css b/src/styles/styles.css index 685f44868..9577b6b6a 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -81,6 +81,16 @@ h3 { opacity: 1; filter: alpha(opacity=100); /* msie */ } + +.selected-generated-icons { + width: 50%; + margin: 2% auto; + background-color: aqua; +} + +.selected-generated-icons img { + width: 60px +} /* input[type="checkbox"] { background: #ef9421; From b9e1e6e4216d7462a77c9ae7e1296fceeba8426c Mon Sep 17 00:00:00 2001 From: Ari Date: Mon, 1 Jul 2019 18:09:19 -0700 Subject: [PATCH 05/11] Add new chosen license designs --- src/index.html | 52 +++++++++++++++++++++------------ src/scripts/choose-a-license.js | 6 ++-- src/styles/styles.css | 30 ++++++++++++------- 3 files changed, 57 insertions(+), 31 deletions(-) diff --git a/src/index.html b/src/index.html index 731de1bae..ff034276f 100644 --- a/src/index.html +++ b/src/index.html @@ -254,24 +254,40 @@

-
- - - - - +
+ + + + + + -
- {{chooser.selected_license}} ({{chooser.selected_license_short}}) -

- {{chooser.selected_license_desc}} -


- -

{{chooser.selected_license_short_noversion}} attribution means you allow people to

-

Share the material in any medium or format, and

-

Adapt {{chooser.selected_license_adapt}}

+
+ {{chooser.selected_license}} +

({{chooser.selected_license_short}})

+

+ {{chooser.selected_license_desc}} +

+ +

{{chooser.selected_license_short_noversion}} attribution means you allow people to


+

Share the material in any medium or format, and

+

Adapt {{chooser.selected_license_adapt}}

@@ -567,9 +583,9 @@

Confused? Need Help?

-
-

(NC/NonCommercial)

-

Commercial use Not Allowed

+
+ (NC/NonCommercial)
+ Commercial use Not Allowed

diff --git a/src/scripts/choose-a-license.js b/src/scripts/choose-a-license.js index 0a0939f74..9db651463 100644 --- a/src/scripts/choose-a-license.js +++ b/src/scripts/choose-a-license.js @@ -1,7 +1,7 @@ function set_license() { - set_license_text( + set_license_text() set_license_icons() - set_license_info + set_license_info() } function set_license_text() { @@ -28,7 +28,7 @@ function set_license_info() { if (!pack["Adapt"]) { // If adaptations are not allowed document.getElementById("generated-license-adapt").style.display = "none" } else { - document.getElementById("generated-license-adapt").style.display = "block + document.getElementById("generated-license-adapt").style.display = "block" } } diff --git a/src/styles/styles.css b/src/styles/styles.css index 89a552831..731c7826d 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -20,10 +20,6 @@ margin: 1.5% auto; } -.chooser-selected-title { - font-size: 1.5vw; -} - .unselected { width: 45px; opacity: 0.4; @@ -91,15 +87,29 @@ h3 { filter: alpha(opacity=100); /* msie */ } -.selected-generated-icons { - width: 50%; - margin: 2% auto; - background-color: aqua; +.chooser-selected-title { + margin-bottom: 3%; +} + +.chooser-selected-title b { + font-size: 1.5vw; + vertical-align: middle; +} + +.chooser-selected-title img { + vertical-align: middle; + width: 42px; + opacity: 0.7; + filter: alpha(opacity=70); /* msie */ } -.selected-generated-icons img { - width: 60px +.chooser-selected-title:hover img { + vertical-align: middle; + width: 42px; + opacity: 1; + filter: alpha(opacity=100); /* msie */ } + /* input[type="checkbox"] { background: #ef9421; From 1cf30f908db43802678f511861f325726c498fbb Mon Sep 17 00:00:00 2001 From: Ari Date: Mon, 1 Jul 2019 19:41:06 -0700 Subject: [PATCH 06/11] Add more license descriptions, fix icon explanation title css --- src/index.html | 58 ++++++++++++++++++------- src/index.js | 76 +++++++++++++++------------------ src/scripts/choose-a-license.js | 3 +- src/styles/styles.css | 16 ++++++- 4 files changed, 94 insertions(+), 59 deletions(-) diff --git a/src/index.html b/src/index.html index ff034276f..f4fcdc8ad 100644 --- a/src/index.html +++ b/src/index.html @@ -278,14 +278,13 @@

{{chooser.selected_license}} -

({{chooser.selected_license_short}})

+ ({{chooser.selected_license_short}})

{{chooser.selected_license_desc}} -

- -

{{chooser.selected_license_short_noversion}} attribution means you allow people to


+


+

{{chooser.selected_license_short_noversion}} attribution means you allow people to

Share the material in any medium or format, and

Adapt {{chooser.selected_license_adapt}}

@@ -559,8 +558,15 @@

Confused? Need Help?

- - (BY) Attribution Credit Required
+
+
+ +
+
+ Attribution Required +

(BY)

+
+

All CC licenses require that others who use your work in any way must give you credit the way you request, but not in a way that suggests you endorse @@ -569,8 +575,15 @@

Confused? Need Help?

- - (ND/NoDerivatives) Modifying Not Allowed +
+
+ +
+
+ Modifying Not Allowed +

(ND/ NoDerivatives)

+
+

You let others copy, distribute, display, and perform, and modify your work, as long as they distribute any modified work, they must get your permission first. @@ -583,24 +596,39 @@

Confused? Need Help?

-
- (NC/NonCommercial)
- Commercial use Not Allowed +
+ Commercial Use Not Allowed +

(NC/ NonCommercial)

-

+ +

You let others copy, distribute, display, perform, and (unless you have chosen NoDerivatives) modify and use your work for any purpose other than commercially, unless they get your permission first.

Curious what qualifies as a Commercial Use? Check out the - CC wiki page on interpretation of Commercial Uses. + + CC wiki page on interpretation of Commercial Uses. +

- - (SA/ShareAlike) Distributed on Same Terms +
+
+ +
+
+ Distributed on Same Terms +

(SA/ ShareAlike)

+
+

You let others copy, distribute, perform, and modify your work, as long as they distribute any modified work on the same terms. If they want to diff --git a/src/index.js b/src/index.js index ade9e3ec6..3ceb29d8e 100644 --- a/src/index.js +++ b/src/index.js @@ -20,7 +20,7 @@ var app_state = new Vue({ // eslint-disable-line inputs: { share_alike: false, allow_adaptations: true, - allow_commercial_uses: true, + allow_commercial_uses: false, }, metadata: { work_title: "", @@ -32,40 +32,6 @@ var app_state = new Vue({ // eslint-disable-line license_mark: "", normal_icon: true, metadata_text: "" - }, - license_packs: { - "by": { - "description": "As the most accommodating of \ - the licenses offered, the CC BY license \ - allows others to distribute, remix, tweak, \ - and build upon your work, even commercially \ - , as long as they credit you for the \ - original creation.", - "Adapt": "it for any purpose, even commercial." - }, - "by-sa": { - "description": "", - "Adapt": "remix, transform, and build upon the \ - material for any purpose, even commercially." - }, - "by-nd": { - "description": "", - "Adapt": false - }, - "by-nc": { - "description": "", - "Adapt": "remix, transform, and build upon the material, \ - but not for commercial purposes." - }, - "by-nc-sa": { - "description": "", - "Adapt": "remix, transform, and build upon the material, \ - but not for commercial purposes." - }, - "by-nc-nd": { - "description": "", - "Adapt": false - } } }, license_packs: { @@ -78,23 +44,49 @@ var app_state = new Vue({ // eslint-disable-line "Adapt": "it for any purpose, even commercially" }, "by-sa": { - "description": "", + "description": "The CC BY-SA license is realtively \ + accommodating. Similar to the CC BY license, BY-SA \ + allows others to distribute, remix, tweak, and build \ + upon your work, even commercially, as long as they \ + credit you for the original creation, and share the \ + derivative work under the same license.", "Adapt": "it for any purpose, even commercially" }, "by-nd": { - "description": "", + "description": "The CC BY-ND license begins to become \ + less accommodating. BY-ND stipulates that people are \ + free to distribute your work, even commercially, \ + and must credit you with the original creation, but \ + they are not allowed to remix, tweak, or build upon \ + your work.", "Adapt": false }, "by-nc": { - "description": "", - "Adapt": "it for any purpose, except commercially" + "description": "The CC BY-NC license begins to become \ + less accommodating. BY-NC stipulates that others may \ + not use your work for commercial purposes. BY-NC allows \ + others to distribute, remix, tweak, and build upon your \ + work, as long as they credit you with the original creation.", + "Adapt": "it for any purpose, except commercially", }, "by-nc-sa": { - "description": "", - "Adapt": "it for any purpose, except commercially" + "description": "The CC BY-NC-SA license is the second \ + least accommodating license that CC offers. BY-NC-SA \ + stipulates that others are free to distribute, remix, \ + tweak, and build upon your work, as long as they share \ + the derivative work under the same license, credit you \ + with the original creation, and as long as the work \ + is not used for commercial purposes.", + "Adapt": "it for any purpose, except commercially", }, "by-nc-nd": { - "description": "", + "description": "The CC BY-NC-ND license is the \ + least accommodating license that CC offers. BY-NC-ND \ + stipulates that others are free to distribute your \ + work, but not for commercial purposes, and that \ + others may not remix, tweak, or build upon your \ + work. BY-NC-ND also stipulates that others must \ + credit you for the original creation.", "Adapt": false }, } diff --git a/src/scripts/choose-a-license.js b/src/scripts/choose-a-license.js index 9db651463..9b0b50361 100644 --- a/src/scripts/choose-a-license.js +++ b/src/scripts/choose-a-license.js @@ -175,7 +175,8 @@ function show_sa_check() { var element = document.getElementById("sa-checkbox") if (app_state.chooser.inputs.share_alike) { element.checked = "true" - } else { + } + else { element.checked = "false" } diff --git a/src/styles/styles.css b/src/styles/styles.css index 731c7826d..9b528ae97 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -4,7 +4,6 @@ .edu-icons-section img { width: 40px; - vertical-align: middle; } .edu-icons-section p { @@ -12,6 +11,21 @@ margin-bottom: 6%; } +.edu-icons-section-icon_title { + vertical-align: middle !important; + margin-bottom: 0px !important; + padding-bottom: 0px !important; + margin-left: 2% !important; +} + +.edu-icons-section-icon_title b { + padding-top: 0px; +} + +.edu-icons-section-icon_title p { + margin: 0px; +} + .chooser-controls-icons { width: 45px; } From 1fd1dca225a627cb6efffe33c593e09cceb541c8 Mon Sep 17 00:00:00 2001 From: Ari Date: Mon, 1 Jul 2019 20:20:20 -0700 Subject: [PATCH 07/11] Cleanup --- src/index.html | 2 +- src/index.js | 12 ++++++------ src/scripts/choose-a-license.js | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/index.html b/src/index.html index f4fcdc8ad..bb71b2f9f 100644 --- a/src/index.html +++ b/src/index.html @@ -285,7 +285,7 @@

{{chooser.selected_license_desc}}


{{chooser.selected_license_short_noversion}} attribution means you allow people to

-

Share the material in any medium or format, and

+

Share the material in any medium or format

Adapt {{chooser.selected_license_adapt}}

diff --git a/src/index.js b/src/index.js index 3ceb29d8e..d59012e3c 100644 --- a/src/index.js +++ b/src/index.js @@ -20,7 +20,7 @@ var app_state = new Vue({ // eslint-disable-line inputs: { share_alike: false, allow_adaptations: true, - allow_commercial_uses: false, + allow_commercial_uses: true, }, metadata: { work_title: "", @@ -50,7 +50,8 @@ var app_state = new Vue({ // eslint-disable-line upon your work, even commercially, as long as they \ credit you for the original creation, and share the \ derivative work under the same license.", - "Adapt": "it for any purpose, even commercially" + "Adapt": "it for any purpose, even commercially \ + (must share under the same license)" }, "by-nd": { "description": "The CC BY-ND license begins to become \ @@ -58,8 +59,7 @@ var app_state = new Vue({ // eslint-disable-line free to distribute your work, even commercially, \ and must credit you with the original creation, but \ they are not allowed to remix, tweak, or build upon \ - your work.", - "Adapt": false + your work." }, "by-nc": { "description": "The CC BY-NC license begins to become \ @@ -77,7 +77,8 @@ var app_state = new Vue({ // eslint-disable-line the derivative work under the same license, credit you \ with the original creation, and as long as the work \ is not used for commercial purposes.", - "Adapt": "it for any purpose, except commercially", + "Adapt": "it for any purpose, except commercially \ + (must share under the same license)", }, "by-nc-nd": { "description": "The CC BY-NC-ND license is the \ @@ -87,7 +88,6 @@ var app_state = new Vue({ // eslint-disable-line others may not remix, tweak, or build upon your \ work. BY-NC-ND also stipulates that others must \ credit you for the original creation.", - "Adapt": false }, } } diff --git a/src/scripts/choose-a-license.js b/src/scripts/choose-a-license.js index 9b0b50361..f46156184 100644 --- a/src/scripts/choose-a-license.js +++ b/src/scripts/choose-a-license.js @@ -27,7 +27,8 @@ function set_license_info() { chooser_state.selected_license_adapt = pack["Adapt"] if (!pack["Adapt"]) { // If adaptations are not allowed document.getElementById("generated-license-adapt").style.display = "none" - } else { + } + else { document.getElementById("generated-license-adapt").style.display = "block" } } From 387aab479a1d7ba16bd39d494fe81d71f0ebd195 Mon Sep 17 00:00:00 2001 From: Ari Date: Mon, 1 Jul 2019 22:35:05 -0700 Subject: [PATCH 08/11] Some Cleanup --- src/scripts/choose-a-license.js | 8 ++++++-- src/styles/sass/bulma-mods.scss | 12 ++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/scripts/choose-a-license.js b/src/scripts/choose-a-license.js index f46156184..96a8b6724 100644 --- a/src/scripts/choose-a-license.js +++ b/src/scripts/choose-a-license.js @@ -56,7 +56,8 @@ function set_license_icons() { if (state.inputs.allow_commercial_uses) { state.icons.nc_shown = false toggle_license_icon("nc", false) - } else { + } + else { state.icons.nc_shown = true toggle_license_icon("nc", true) } @@ -68,6 +69,7 @@ function gen_license_name() { if (!state.inputs.allow_commercial_uses) { license_base += "-NonCommercial" } + if (state.inputs.allow_adaptations) { if (state.inputs.share_alike) { license_base += "-ShareAlike" @@ -91,9 +93,11 @@ function gen_shortened_name(url_version = false) { if (license.includes("NonCommercial")) { short += "-NC" } + if (license.includes("NoDerivatives")) { short += "-ND" - } else if(license.includes("ShareAlike")) { + } + else if(license.includes("ShareAlike")) { short += "-SA" } app_state.chooser.selected_license_short_noversion = short diff --git a/src/styles/sass/bulma-mods.scss b/src/styles/sass/bulma-mods.scss index a8be8eb26..d99acfc3c 100644 --- a/src/styles/sass/bulma-mods.scss +++ b/src/styles/sass/bulma-mods.scss @@ -14,12 +14,8 @@ $default: $cc-orange; @import "../../../node_modules/bulma/sass/elements/_all.sass"; @import "../../../node_modules/bulma/sass/base/_all.sass"; @import "../../../node_modules/bulma/sass/form/_all.sass"; -@import "../../../node_modules/bulma/sass/components/navbar.sass"; -@import "../../../node_modules/bulma/sass/layout/hero.sass"; -@import "../../../node_modules/bulma/sass/layout/section.sass"; -@import "../../../node_modules/bulma/sass/grid/all.sass"; -@import "../../../node_modules/bulma/sass/components/modal.sass"; -@import "../../../node_modules/bulma/sass/components/card.sass"; +@import "../../../node_modules/bulma/sass/components/_all.sass"; +@import "../../../node_modules/bulma/sass/grid/_all.sass"; +@import "../../../node_modules/bulma/sass/layout/_all.sass"; @import "../../../node_modules/bulma-switch/dist/css/bulma-switch.sass"; -@import "../../../node_modules/cool-checkboxes-for-bulma.io/dist/css/bulma-radio-checkbox.css"; -@import "../../../node_modules/@creativebulma/bulma-collapsible/dist/css/bulma-collapsible.min.css"; \ No newline at end of file +@import "../../../node_modules/cool-checkboxes-for-bulma.io/dist/css/bulma-radio-checkbox.css"; \ No newline at end of file From f4a7e74ccc54f89db0d51ae0d4e39af568de433f Mon Sep 17 00:00:00 2001 From: Ari Date: Mon, 1 Jul 2019 22:35:05 -0700 Subject: [PATCH 09/11] Some More Cleanup --- src/scripts/choose-a-license.js | 8 ++++++-- src/styles/sass/bulma-mods.scss | 12 ++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/scripts/choose-a-license.js b/src/scripts/choose-a-license.js index f46156184..96a8b6724 100644 --- a/src/scripts/choose-a-license.js +++ b/src/scripts/choose-a-license.js @@ -56,7 +56,8 @@ function set_license_icons() { if (state.inputs.allow_commercial_uses) { state.icons.nc_shown = false toggle_license_icon("nc", false) - } else { + } + else { state.icons.nc_shown = true toggle_license_icon("nc", true) } @@ -68,6 +69,7 @@ function gen_license_name() { if (!state.inputs.allow_commercial_uses) { license_base += "-NonCommercial" } + if (state.inputs.allow_adaptations) { if (state.inputs.share_alike) { license_base += "-ShareAlike" @@ -91,9 +93,11 @@ function gen_shortened_name(url_version = false) { if (license.includes("NonCommercial")) { short += "-NC" } + if (license.includes("NoDerivatives")) { short += "-ND" - } else if(license.includes("ShareAlike")) { + } + else if(license.includes("ShareAlike")) { short += "-SA" } app_state.chooser.selected_license_short_noversion = short diff --git a/src/styles/sass/bulma-mods.scss b/src/styles/sass/bulma-mods.scss index a8be8eb26..d99acfc3c 100644 --- a/src/styles/sass/bulma-mods.scss +++ b/src/styles/sass/bulma-mods.scss @@ -14,12 +14,8 @@ $default: $cc-orange; @import "../../../node_modules/bulma/sass/elements/_all.sass"; @import "../../../node_modules/bulma/sass/base/_all.sass"; @import "../../../node_modules/bulma/sass/form/_all.sass"; -@import "../../../node_modules/bulma/sass/components/navbar.sass"; -@import "../../../node_modules/bulma/sass/layout/hero.sass"; -@import "../../../node_modules/bulma/sass/layout/section.sass"; -@import "../../../node_modules/bulma/sass/grid/all.sass"; -@import "../../../node_modules/bulma/sass/components/modal.sass"; -@import "../../../node_modules/bulma/sass/components/card.sass"; +@import "../../../node_modules/bulma/sass/components/_all.sass"; +@import "../../../node_modules/bulma/sass/grid/_all.sass"; +@import "../../../node_modules/bulma/sass/layout/_all.sass"; @import "../../../node_modules/bulma-switch/dist/css/bulma-switch.sass"; -@import "../../../node_modules/cool-checkboxes-for-bulma.io/dist/css/bulma-radio-checkbox.css"; -@import "../../../node_modules/@creativebulma/bulma-collapsible/dist/css/bulma-collapsible.min.css"; \ No newline at end of file +@import "../../../node_modules/cool-checkboxes-for-bulma.io/dist/css/bulma-radio-checkbox.css"; \ No newline at end of file From 3be60dbaeb02bce6f00fa6c8cf0b352b84a42f7d Mon Sep 17 00:00:00 2001 From: Ari Date: Tue, 2 Jul 2019 22:04:58 -0700 Subject: [PATCH 10/11] Update chooser modals, swap full and short selected license names --- src/index.html | 29 +++++++++++------------------ src/styles/styles.css | 12 ++++-------- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/src/index.html b/src/index.html index bb71b2f9f..e869f5a0e 100644 --- a/src/index.html +++ b/src/index.html @@ -157,7 +157,7 @@

@@ -255,21 +263,6 @@

- @@ -277,8 +270,8 @@

- {{chooser.selected_license}} - ({{chooser.selected_license_short}}) + {{chooser.selected_license_short}} + ({{chooser.selected_license}})

diff --git a/src/styles/styles.css b/src/styles/styles.css index 9b528ae97..baa12ff1a 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -78,11 +78,6 @@ h3 { text-align: center; } -.selected-license-name { - font-weight: bold; - font-size: 1.2rem; -} - .selected-license-card-title { padding-top: 2%; } @@ -106,7 +101,7 @@ h3 { } .chooser-selected-title b { - font-size: 1.5vw; + font-size: 1.8rem; vertical-align: middle; } @@ -117,12 +112,13 @@ h3 { filter: alpha(opacity=70); /* msie */ } +/* .chooser-selected-title:hover img { vertical-align: middle; width: 42px; opacity: 1; - filter: alpha(opacity=100); /* msie */ -} + filter: alpha(opacity=100); +}*/ /* input[type="checkbox"] { From 5a0c4f9348559198b212d29505b551a398701d0d Mon Sep 17 00:00:00 2001 From: Ari Date: Wed, 3 Jul 2019 12:55:26 -0700 Subject: [PATCH 11/11] Swap share_adapt and license description sections --- src/index.html | 14 ++++++++------ src/styles/styles.css | 8 ++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/index.html b/src/index.html index e869f5a0e..1450e0556 100644 --- a/src/index.html +++ b/src/index.html @@ -271,15 +271,17 @@

{{chooser.selected_license_short}} - ({{chooser.selected_license}}) + {{chooser.selected_license}}

-

+

+

{{chooser.selected_license_short_noversion}} attribution means you allow people to

+

Share the material in any medium or format

+

Adapt {{chooser.selected_license_adapt}}

+
+

{{chooser.selected_license_desc}} -


-

{{chooser.selected_license_short_noversion}} attribution means you allow people to

-

Share the material in any medium or format

-

Adapt {{chooser.selected_license_adapt}}

+

diff --git a/src/styles/styles.css b/src/styles/styles.css index baa12ff1a..067285e92 100644 --- a/src/styles/styles.css +++ b/src/styles/styles.css @@ -105,6 +105,14 @@ h3 { vertical-align: middle; } +.chooser-selected-description { + font-size: .9em +} + +.chooser-selected-share_adapt { + margin-bottom: 1em +} + .chooser-selected-title img { vertical-align: middle; width: 42px;