Skip to content

Commit

Permalink
Merge pull request #95 from jspaaks/issue-5
Browse files Browse the repository at this point in the history
Issue 5
  • Loading branch information
jspaaks authored Aug 16, 2021
2 parents ff31652 + cfc3195 commit 8322a83
Show file tree
Hide file tree
Showing 20 changed files with 187 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/dist/build.js

Large diffs are not rendered by default.

19 changes: 14 additions & 5 deletions package-lock.json

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

7 changes: 7 additions & 0 deletions src/Abstract.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
remove
</button>
</p>
<HelpText
text="A description of the software (version)"
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#software-citation-metadata-required"
/>
<textarea
v-bind:class="{error: validation.error }"
v-bind:value="abstract"
Expand All @@ -35,6 +39,8 @@

<script>
import HelpText from './HelpText.vue';
import {add,
remove,
update} from './AbstractEmitters.js';
Expand All @@ -44,6 +50,7 @@ import {validate} from './AbstractValidators.js';
export default {
name: 'Abstract',
components: {
HelpText
},
props: {
abstract: String
Expand Down
7 changes: 7 additions & 0 deletions src/Affiliation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
remove
</button>
</p>
<HelpText
text="To specify the affiliation of a person, e.g., a university, research centre, etc."
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#exemplary-uses-2"
/>
<input
v-bind:class="{error: validation.error }"
v-bind:value="affiliation"
Expand Down Expand Up @@ -37,6 +41,8 @@

<script>
import HelpText from './HelpText.vue';
import {add,
remove,
update} from './AffiliationEmitters.js';
Expand All @@ -46,6 +52,7 @@ import {validate} from './AffiliationValidators.js';
export default {
name: 'Affiliation',
components: {
HelpText
},
props: {
affiliation: String
Expand Down
10 changes: 10 additions & 0 deletions src/Author.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
<p class="caption">
given-names
</p>
<HelpText
text="Specify given and any other names."
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#exemplary-uses-2"
/>
<input
v-bind:value="author.given_names"
v-on:input="update_given_names($event)"
Expand All @@ -66,6 +70,10 @@
<p class="caption">
family-names
</p>
<HelpText
text="Specify family names, including combinations of given and patronymic forms."
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#exemplary-uses-2"
/>
<input
v-bind:value="author.family_names"
v-on:input="update_family_names($event)"
Expand Down Expand Up @@ -94,6 +102,7 @@
import Affiliation from './Affiliation.vue';
import AuthorOrcid from './Orcid.vue';
import HelpText from './HelpText.vue';
import NameParticle from './NameParticle.vue';
import NameSuffix from './NameSuffix.vue';
Expand All @@ -120,6 +129,7 @@ export default {
components: {
Affiliation,
AuthorOrcid,
HelpText,
NameParticle,
NameSuffix
},
Expand Down
8 changes: 7 additions & 1 deletion src/Authors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
</div>
</button>
</p>
<HelpText
text="The author(s) of the software"
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#software-citation-metadata-required"
/>
<ul class="authors">
<Author
v-for="author in authors"
Expand Down Expand Up @@ -60,11 +64,13 @@ import {add,
update_orcid} from './AuthorsEmitters.js';
import Author from './Author.vue';
import HelpText from './HelpText.vue';
export default {
name: 'Authors',
components: {
Author
Author,
HelpText
},
props: {
authors: Array
Expand Down
8 changes: 8 additions & 0 deletions src/DateReleased.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
remove
</button>
</p>
<HelpText
v-show="has_date_released"
text="The release date of the software version."
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#software-citation-metadata-required"
/>
<button
v-show="!has_date_released"
tabindex="-1"
Expand Down Expand Up @@ -47,9 +52,12 @@ import {add,
import {validate} from './DateReleasedValidators.js';
import HelpText from './HelpText.vue';
export default {
name: 'DateReleased',
components: {
HelpText
},
props: {
date_released: String
Expand Down
8 changes: 8 additions & 0 deletions src/Doi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
remove
</button>
</p>
<HelpText
v-show="has_doi"
text="The DOI of the work (not the resolver URL, i.e., 10.5281/zenodo.1003150, not http://doi.org/10.5281/zenodo.1003150)"
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#software-citation-metadata-required"
/>
<button
v-show="!has_doi"
tabindex="-1"
Expand Down Expand Up @@ -47,9 +52,12 @@ import {add,
import {validate} from './DoiValidators.js';
import HelpText from './HelpText.vue';
export default {
name: 'Doi',
components: {
HelpText
},
props: {
doi: String
Expand Down
12 changes: 11 additions & 1 deletion src/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<p class="caption">
cff-version
</p>
<HelpText
text="The exact version of the Citation File Format that is used for the file."
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#cff-version-required"
/>
<input
v-bind:class="{error: cff_version_validation.error }"
v-bind:value="cff_version"
Expand All @@ -25,6 +29,10 @@
<p class="caption">
message
</p>
<HelpText
text="Specify instructions to users on how to cite the software the CITATION.cff file is associated with."
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#message-required"
/>
<textarea
v-bind:class="{error: message_validation.error }"
v-bind:value="message"
Expand Down Expand Up @@ -124,6 +132,7 @@

<script>
import CreativeWork from './CreativeWork.vue';
import HelpText from './HelpText.vue';
import {add_abstract,
add_affiliation,
Expand Down Expand Up @@ -188,7 +197,8 @@ import {validate_message,
export default {
name: 'Form',
components: {
CreativeWork
CreativeWork,
HelpText
},
props: {
abstract: String,
Expand Down
36 changes: 36 additions & 0 deletions src/HelpText.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<template>
<p class="help-text">
{{text}}
<a class="spec-link" target="docs" v-bind:href="url">(spec)</a>
</p>
</template>

<script>
export default {
name: 'HelpText',
components: {
},
props: {
text: String,
url: String
},
computed: {
},
methods: {
}
};
</script>

<style>
p.help-text {
font-style: italic;
font-size: 0.8rem;
margin-top: 0;
margin-bottom: 0.5em;
}
a.spec-link {
font-style: normal;
}
</style>
9 changes: 9 additions & 0 deletions src/Identifier.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<p class="caption">
type
</p>
<HelpText
text="The type of the identifier."
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#identifier-type-strings"
/>
<input
v-bind:value="identifier.type"
v-bind:class="{error: validation_type.error }"
Expand Down Expand Up @@ -75,8 +79,13 @@ import {move_identifier_down,
import {validate_type,
validate_value} from './IdentifierValidators.js';
import HelpText from './HelpText.vue';
export default {
name: 'Identifier',
components: {
HelpText
},
props: {
identifier: Object
},
Expand Down
6 changes: 6 additions & 0 deletions src/Identifiers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
</div>
</button>
</p>
<HelpText
text="Persistent identifiers for the software."
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#identifier-objects"
/>
<ul>
<Identifier
v-for="identifier in identifiers"
Expand Down Expand Up @@ -54,11 +58,13 @@ import {add_identifier,
update_identifier_type,
update_identifier_value} from './IdentifiersEmitters.js';
import HelpText from './HelpText.vue';
import Identifier from './Identifier.vue';
export default {
name: 'Identifiers',
components: {
HelpText,
Identifier
},
props: {
Expand Down
6 changes: 6 additions & 0 deletions src/Keywords.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
</div>
</button>
</p>
<HelpText
text="Keywords pertaining to the software version"
url="https://github.com/citation-file-format/citation-file-format/blob/1.1.0/README.md#software-citation-metadata-required"
/>
<ul>
<Keyword
v-for="keyword in keywords"
Expand Down Expand Up @@ -52,11 +56,13 @@ import {add_keyword,
remove_keywords,
update_keyword} from './KeywordsEmitters.js';
import HelpText from './HelpText.vue';
import Keyword from './Keyword.vue';
export default {
name: 'Keywords',
components: {
HelpText,
Keyword
},
props: {
Expand Down
Loading

0 comments on commit 8322a83

Please sign in to comment.