Skip to content
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

Change instances of "cc-chooser" to "chooser", other cleanup and small fixes #129

Merged
merged 8 commits into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cc-chooser
# chooser

The Creative Commons License Chooser is meant to help people learn about CC licenses, and select the license that best fits their needs. The new version in this repo places greater importance on usability and an educational experience of the six CC licenses.

Expand All @@ -9,7 +9,7 @@ This site is built using [Vue.js](https://vuejs.org/) (and vue-cli), and [Buefy]

#### Roadmap

Tasks, issues, and discussion related to the release of the new chooser are tracked with the [`Launch Milestone`](https://github.com/creativecommons/cc-chooser/milestone/1).
Tasks, issues, and discussion related to the release of the new chooser are tracked with the [`Launch Milestone`](https://github.com/creativecommons/chooser/milestone/1).

## Getting Started
Run the following commands in order to have the code up and running on your machine:
Expand All @@ -24,11 +24,11 @@ $ npm run serve
You should now have the application running and accessible at http://localhost:8080 (note: will run on a different port if 8080 is occupied, most common alternative port is 8081).

## Contributing
Before getting started on an issue, please comment on the issue you would like to work on to indicate that you are interested. Issues marked with the yellow `in progress` tag are already claimed, and are not up for grabs.
For information on contributing, please see [Creative Commons' Contribution Guidelines](https://opensource.creativecommons.org/contributing-code/)

If you create a PR for your work, but you are not finished yet, please include `WIP:` in the beginning of your PR title. When your work on your PR is completed and you are ready for a final review, please remove the `WIP:` prefix from the title to indicate that your work is done.

Here's a [handy link](https://github.com/creativecommons/cc-chooser/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22+-label%3A%22in+progress%22) that will show you all open issues in this repo that have the `help wanted` tag, but do not have the `in progress` tag.
Here's a [handy link](https://github.com/creativecommons/chooser/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22+-label%3A%22in+progress%22) that will show you all open issues in this repo that have the `help wanted` tag, but do not have the `in progress` tag.
All issues in this list are up for grabs!
If it says "No results matched your search", then there are no issues currently up for grabs.

Expand Down
1 change: 0 additions & 1 deletion docs/css/app.27d8733e.css

This file was deleted.

1 change: 1 addition & 0 deletions docs/css/app.fddf921f.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><link rel=icon type=image/png href=https://d15omoko64skxi.cloudfront.net/wp-content/uploads/2016/05/cc-site-icon-300x300.png sizes=192x192><link rel=apple-touch-icon-precomposed href=https://d15omoko64skxi.cloudfront.net/wp-content/uploads/2016/05/cc-site-icon-300x300.png><meta name=twitter:card content=summary><meta name=twitter:site content=@creativecommons><meta name=twitter:creator content=@creativecommons><meta property=og:url content=https://beta-chooser.creativecommons.org><meta property=og:title content="Choose a License"><meta property=og:type content=website><meta property=og:description content="Want to license your work with Creative Commons, but not sure where to start, or which license is right for you? Use our license chooser!"><meta property=og:image content=https://mirrors.creativecommons.org/presskit/logos/cc.logo.large.png><meta property=og:locale content=en_US><meta property=og:locale:alternate content=ru_RU><title>Choose a License</title><link href=/css/app.27d8733e.css rel=preload as=style><link href=/js/app.e6777d53.js rel=preload as=script><link href=/js/chunk-vendors.8ad4a80c.js rel=preload as=script><link href=/css/app.27d8733e.css rel=stylesheet></head><body><noscript><strong>We're sorry but License Chooser doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.8ad4a80c.js></script><script src=/js/app.e6777d53.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="Want to license your work with Creative Commons, but not sure where to start, or which license is right for you? Use our license chooser!"><link rel=icon href=/favicon.ico><link rel=icon type=image/png href=https://d15omoko64skxi.cloudfront.net/wp-content/uploads/2016/05/cc-site-icon-300x300.png sizes=192x192><link rel=apple-touch-icon-precomposed href=https://d15omoko64skxi.cloudfront.net/wp-content/uploads/2016/05/cc-site-icon-300x300.png><meta name=twitter:card content=summary><meta name=twitter:site content=@creativecommons><meta name=twitter:creator content=@creativecommons><meta property=og:url content=https://beta-chooser.creativecommons.org><meta property=og:title content="Choose a License"><meta property=og:type content=website><meta property=og:description content="Want to license your work with Creative Commons, but not sure where to start, or which license is right for you? Use our license chooser!"><meta property=og:image content=https://mirrors.creativecommons.org/presskit/logos/cc.logo.large.png><meta property=og:locale content=en_US><meta property=og:locale:alternate content=ru_RU><title>Choose a License</title><link href=/css/app.fddf921f.css rel=preload as=style><link href=/js/app.52658b24.js rel=preload as=script><link href=/js/chunk-vendors.8ad4a80c.js rel=preload as=script><link href=/css/app.fddf921f.css rel=stylesheet></head><body><noscript><strong>We're sorry but License Chooser doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.8ad4a80c.js></script><script src=/js/app.52658b24.js></script></body></html>
2 changes: 2 additions & 0 deletions docs/js/app.52658b24.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/app.52658b24.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/js/app.e6777d53.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/app.e6777d53.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "cc-chooser",
"name": "chooser",
"version": "1.0.0",
"description": "The new and improved Creative Commons License Chooser",
"author": "akmadian <akmadian@gmail.com>",
"private": false,
"repository": {
"type": "git",
"url": "git+https://github.com/creativecommons/cc-chooser.git"
"url": "git+https://github.com/creativecommons/chooser.git"
},
"license": "MIT",
"scripts": {
Expand All @@ -15,7 +15,7 @@
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"test": "vue-cli-service test:unit --coverage",
"test": "vue-cli-service test:unit --coverage && vue-cli-service test:e2e",
akmadian marked this conversation as resolved.
Show resolved Hide resolved
"i18n:report": "vue-cli-service i18n:report -v --src src/**/*.vue --locales src/locales/**.json -o output.json"
},
"dependencies": {
Expand Down
18 changes: 12 additions & 6 deletions src/components/AttributionDetailsStep.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
<template>
<div class="step-content">
<div v-if="status==='current'"
class="step-actions">
<div
v-if="status==='current'"
class="step-actions"
>
<p class="attribution-details-instructions">
{{ $t('stepper.AD.instructions') }}
</p>
<form class="attribution-details-form">
<b-field :label="this.$t('stepper.AD.form.creator-name.label')">
<b-input v-model="creatorName"
<b-input
v-model="creatorName"
:placeholder="this.$t('stepper.AD.form.creator-name.placeholder')"
/>
</b-field>
<b-field :label="this.$t('stepper.AD.form.creator-profile.label')">
<b-input v-model="creatorProfileUrl"
<b-input
v-model="creatorProfileUrl"
:placeholder="this.$t('stepper.AD.form.creator-profile.placeholder')"
/>
</b-field>
<b-field :label="this.$t('stepper.AD.form.work-title.label')">
<b-input v-model="workTitle"
<b-input
v-model="workTitle"
:placeholder="this.$t('stepper.AD.form.work-title.placeholder')"
/>
</b-field>
<b-field :label="this.$t('stepper.AD.form.work-url.label')">
<b-input v-model="workUrl"
<b-input
v-model="workUrl"
:placeholder="this.$t('stepper.AD.form.work-url.placeholder')"
/>
</b-field>
Expand Down
18 changes: 12 additions & 6 deletions src/components/CopyrightWaiverStep.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
<template>
<div class="step-content">
<div v-if="status==='previous'"
class="step-description vocab-body body-normal">
<div
v-if="status==='previous'"
class="step-description vocab-body body-normal"
>
<p class="vocab-body body-normal">
{{ $t('stepper.CW.selected') }}
</p>
</div>
<div v-else-if="status==='current'"
class="step-actions">
<div
v-else-if="status==='current'"
class="step-actions"
>
<b-checkbox v-model="copyrightWaiverAgreed">
{{ $t('stepper.CW.copyright-waive-agreement') }}
</b-checkbox>
<textarea :value="this.$t('cc0-waiver.text')"
:class="'waiver-textarea'"/>
<textarea
:value="this.$t('cc0-waiver.text')"
:class="'waiver-textarea'"
/>
<b-checkbox v-model="copyrightWaiverConfirmed">
{{ $t("stepper.CW.copyright-waive-confirmation") }}
</b-checkbox>
Expand Down
12 changes: 9 additions & 3 deletions src/components/DropdownStep.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<template>
<div class="step-content">
<div v-if="status==='previous'" class="step-description">
<div
v-if="status==='previous'"
class="step-description"
>
{{ cardText }}
</div>
<div v-else-if="status==='current'" class="step-actions">
<div
v-else-if="status==='current'"
class="step-actions"
>
<LicenseDropdown @input="updateSelected" />
</div>
</div>
Expand Down Expand Up @@ -35,4 +41,4 @@ export default {
}
}
}
</script>
</script>
32 changes: 24 additions & 8 deletions src/components/FirstStep.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
<template>
<div class="step-content">
<p v-if="status==='previous'"
class="step-description vocab-body body-normal">
<p
v-if="status==='previous'"
class="step-description vocab-body body-normal"
>
{{ $t(cardText) }}
</p>
<div v-else-if="status==='current'" class="step-actions">
<div class="field" :class="yesSelected">
<b-radio v-model="radio"
native-value="yes">
<div
v-else-if="status==='current'"
class="step-actions"
>
<div
class="field"
:class="yesSelected"
>
<b-radio
v-model="radio"
native-value="yes"
>
<span class="vocab-body body-normal">
{{ $t('stepper.yes') }}{{ $t(yesText) }}
</span>
</b-radio>
</div>
<div class="field" :class="noSelected">
<b-radio v-model="radio" native-value="no">
<div
class="field"
:class="noSelected"
>
<b-radio
v-model="radio"
native-value="no"
>
<span class="vocab-body body-normal">
{{ $t('stepper.no') }}{{ $t(noText) }}
</span>
Expand Down
32 changes: 21 additions & 11 deletions src/components/HelpSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,31 @@
{{ $t('help.heading') }}
</h3>
<ul class="help-links">
<li v-for="(modal, idx) in modals"
<li
v-for="(modal, idx) in modals"
:key="idx"
class="help-link">
<a class="vocab-body body-big help-link-a"
@click="clickHandler(idx)">
class="help-link"
>
<a
class="vocab-body body-big help-link-a"
@click="clickHandler(idx)"
>
{{ $t(`help.${modal.title}.heading`) }}
</a>
</li>
</ul>
<b-modal :active.sync="modals[1].status">
<header class="modal-card-head">
<p class="modal-card-title modal-title"
v-html="this.$t('help.what-are-cc-licenses.heading')"/>
<p
class="modal-card-title modal-title"
v-html="this.$t('help.what-are-cc-licenses.heading')"
/>
</header>
<section class="modal-card-body">
<article class="help-text"
v-html="this.$t('help.what-are-cc-licenses.text')"/>
<article
class="help-text"
v-html="this.$t('help.what-are-cc-licenses.text')"
/>
<footer class="modal-card-foot">
<p v-html="this.$t('help.what-are-cc-licenses.footer')" />
</footer>
Expand All @@ -34,8 +42,10 @@
</header>
<section class="modal-card-body">
<article v-html="this.$t('help.how-licenses-work.text')" />
<footer class="modal-card-foot"
v-html="this.$t('help.how-licenses-work.footer')"/>
<footer
class="modal-card-foot"
v-html="this.$t('help.how-licenses-work.footer')"
/>
</section>
</b-modal>
<b-modal :active.sync="modals[3].status">
Expand Down Expand Up @@ -180,7 +190,7 @@
</tr>
<tr>
<th>{{ $t('help.how-licenses-communicated.license-icons') }}</th>
<td><LicenseIconography :icon-list="['', 'by', 'nc']" /></td>
<td><LicenseIcons :icons-arr="['by', 'nc']" /></td>
</tr>
</tbody>
</table>
Expand Down
56 changes: 40 additions & 16 deletions src/components/LicenseCode.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
<template>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I edited LicenseIcons css only looking at this component, so I added margin-left of 3px to the icons so that they are not too close to the license name in RichText code. Now I see LicenseIcons are used in the HelpSection as well, so because the left margin is local to LicenseCode component, it would be better to add styling here, so that the styling in other components is not affected.

.license-text .photo-license-icons {
    height: 1.4rem!important;
    **margin-left: 3px;**
}

<p xmlns:dct="http://purl.org/dc/terms/"
<p
xmlns:dct="http://purl.org/dc/terms/"
xmlns:cc="http://creativecommons.org/ns#"
class="license-text">
<i18n path="license-use.richtext.full-text" tag="span">
class="license-text"
>
<i18n
path="license-use.richtext.full-text"
tag="span"
>
<template v-slot:workTitle>
<a v-if="workUrl && isWeb"
<a
v-if="workUrl && isWeb"
:href="workUrl"
rel="cc:attributionURL">
rel="cc:attributionURL"
>
<span v-if="!workTitle">{{ $t('license-use.richtext.workTitle') }}</span>
<span v-else rel="dc:title">
<span
v-else
rel="dc:title"
>
{{ workTitle }}
</span>
</a>
<span v-else-if="workTitle" rel="dc:title">
<span
v-else-if="workTitle"
rel="dc:title"
>
{{ workTitle }}
</span>
<span v-else>{{ $t('license-use.richtext.workTitle') }}</span>
</template>
<template v-slot:creator>
<a v-if="creatorProfileUrl && isWeb"
<a
v-if="creatorProfileUrl && isWeb"
:href="creatorProfileUrl"
rel="cc:attributionURL">
rel="cc:attributionURL"
>
<span v-html="creatorSpan" /></a>
<span v-else-if="creatorName" v-html="creatorSpan" />
<span
v-else-if="creatorName"
v-html="creatorSpan"
/>
</template>
<template v-slot:by>
{{ $t(byString) }}
Expand All @@ -31,22 +49,28 @@
<span>{{ $t('license-use.richtext.licensed-text') }}</span>
</template>
<template v-slot:licenseName>
<a v-if="isWeb"
<a
v-if="isWeb"
:href="licenseUrl('web')"
target="_blank"
rel="license noopener noreferrer"
style="display: inline-block;">
style="display: inline-block;"
>
{{ shortName }}
</a>
<span v-else>{{ shortName }}</span>
<LicenseIcons v-if="isWeb"
<LicenseIcons
v-if="isWeb"
:url="licenseUrl('web')"
:icons-arr="iconsList" />
:icons-arr="iconsList"
/>
</template>
</i18n>
<i18n v-if="!isWeb"
<i18n
v-if="!isWeb"
path="license-use.richtext.print-instructions"
tag="span">
tag="span"
>
<template v-slot:linkToLicenseDeed>
{{ licenseUrl('print') }}
</template>
Expand Down
Loading