Skip to content

Commit f7fc231

Browse files
authored
Merge pull request #441 from citation-file-format/439-link-to-schema
Create SchemaGuideLink with an icon that points to the schema guide
2 parents 825a536 + d543e27 commit f7fc231

9 files changed

Lines changed: 59 additions & 7 deletions

src/components/SchemaGuideLink.vue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<template>
2+
<a v-bind:href="'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md' + anchor">
3+
<q-icon name="ion-information-circle-outline" />
4+
</a>
5+
</template>
6+
7+
<script lang="ts">
8+
import { defineComponent } from 'vue'
9+
10+
export default defineComponent({
11+
name: 'SchemaGuideLink',
12+
props: {
13+
anchor: {
14+
type: String,
15+
required: true
16+
}
17+
}
18+
})
19+
</script>
20+
21+
<style scoped>
22+
a {
23+
text-decoration: none;
24+
}
25+
</style>

src/components/ScreenAbstract.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<div id="form-content">
1414
<p class="question">
1515
What is the abstract of the work?
16+
<SchemaGuideLink anchor="#abstract" />
1617
</p>
1718
<q-input
1819
autogrow
@@ -36,13 +37,15 @@
3637
</template>
3738

3839
<script lang="ts">
40+
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
3941
import Stepper from 'components/Stepper.vue'
4042
import StepperActions from 'components/StepperActions.vue'
4143
import { defineComponent } from 'vue'
4244
import { useCff } from '../store/cff'
4345
export default defineComponent({
4446
name: 'ScreenAbstract',
4547
components: {
48+
SchemaGuideLink,
4649
Stepper,
4750
StepperActions
4851
},

src/components/ScreenAuthors.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
</div>
1111

1212
<div id="form-content">
13+
<p class="question">
14+
Who are the author(s) of the work?
15+
<SchemaGuideLink anchor="#authors" />
16+
</p>
1317
<div class="scroll-to-bottom-container">
1418
<span class="bottom" />
1519
<div>
@@ -72,6 +76,7 @@
7276

7377
<script lang="ts">
7478
import { computed, defineComponent, nextTick, ref } from 'vue'
79+
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
7580
import Stepper from 'components/Stepper.vue'
7681
import StepperActions from 'components/StepperActions.vue'
7782
import AuthorCardEditing from 'components/AuthorCardEditing.vue'
@@ -85,6 +90,7 @@ import { authorsErrors } from 'src/authors-errors'
8590
export default defineComponent({
8691
name: 'ScreenAuthors',
8792
components: {
93+
SchemaGuideLink,
8894
Stepper,
8995
StepperActions,
9096
AuthorCardEditing,

src/components/ScreenIdentifiers.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@
1212
<div id="form-content">
1313
<p class="question">
1414
What persistent identifiers are available for the work?
15-
See
16-
<a
17-
href="https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md#definitionsidentifier"
18-
target="_blank"
19-
>
20-
schema guide
21-
</a> for examples.
15+
<SchemaGuideLink anchor="#identifiers" />
2216
</p>
2317
<div class="scroll-to-bottom-container">
2418
<span class="bottom" />
@@ -83,6 +77,7 @@
8377

8478
<script lang="ts">
8579
import { computed, defineComponent, nextTick, ref } from 'vue'
80+
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
8681
import Stepper from 'components/Stepper.vue'
8782
import StepperActions from 'components/StepperActions.vue'
8883
import IdentifierCardEditing from 'components/IdentifierCardEditing.vue'
@@ -96,6 +91,7 @@ import { identifiersErrors } from 'src/identifiers-errors'
9691
export default defineComponent({
9792
name: 'ScreenIdentifiers',
9893
components: {
94+
SchemaGuideLink,
9995
Stepper,
10096
StepperActions,
10197
IdentifierCardEditing,

src/components/ScreenKeywords.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<div id="form-content">
1313
<p class="question">
1414
What keywords describe the work?
15+
<SchemaGuideLink anchor="#keywords" />
1516
</p>
1617
<div class="scroll-to-bottom-container">
1718
<span class="bottom" />
@@ -60,6 +61,7 @@
6061
</template>
6162

6263
<script lang="ts">
64+
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
6365
import Stepper from 'components/Stepper.vue'
6466
import StepperActions from 'components/StepperActions.vue'
6567
import Keyword from 'components/Keyword.vue'
@@ -72,6 +74,7 @@ import { getMyErrors } from 'src/store/validator'
7274
export default defineComponent({
7375
name: 'ScreenKeywords',
7476
components: {
77+
SchemaGuideLink,
7578
Stepper,
7679
StepperActions,
7780
Keyword

src/components/ScreenLicense.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<div id="form-content">
1313
<p class="question">
1414
What is the license of the work?
15+
<SchemaGuideLink anchor="#license" />
1516
</p>
1617
<q-select
1718
bg-color="white"
@@ -51,12 +52,14 @@ import { defineComponent, ref } from 'vue'
5152
import { useCff } from '../store/cff'
5253
import { QSelect } from 'quasar'
5354
import schema from '../schemas/1.2.0/schema.json'
55+
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
5456
import Stepper from 'components/Stepper.vue'
5557
import StepperActions from 'components/StepperActions.vue'
5658
5759
export default defineComponent({
5860
name: 'ScreenLicense',
5961
components: {
62+
SchemaGuideLink,
6063
Stepper,
6164
StepperActions
6265
},

src/components/ScreenRelatedResources.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<div id="form-content">
1313
<p class="question">
1414
What is the URL of the work in a source code repository?
15+
<SchemaGuideLink anchor="#repository-code" />
1516
</p>
1617
<q-input
1718
bg-color="white"
@@ -26,6 +27,7 @@
2627

2728
<p class="question">
2829
What is the URL of a landing page/website for the work?
30+
<SchemaGuideLink anchor="#url" />
2931
</p>
3032
<q-input
3133
bg-color="white"
@@ -40,6 +42,7 @@
4042

4143
<p class="question">
4244
What is the URL of the work in a repository?
45+
<SchemaGuideLink anchor="#repository" />
4346
</p>
4447
<q-input
4548
bg-color="white"
@@ -54,6 +57,7 @@
5457

5558
<p class="question">
5659
What is the URL of the work in a build artifact/binary repository?
60+
<SchemaGuideLink anchor="#repository-artifact" />
5761
</p>
5862
<q-input
5963
bg-color="white"
@@ -74,6 +78,7 @@
7478
</template>
7579

7680
<script lang="ts">
81+
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
7782
import Stepper from 'components/Stepper.vue'
7883
import StepperActions from 'components/StepperActions.vue'
7984
import { computed, defineComponent } from 'vue'
@@ -83,6 +88,7 @@ import { getMyErrors } from 'src/store/validator'
8388
export default defineComponent({
8489
name: 'ScreenRelatedResources',
8590
components: {
91+
SchemaGuideLink,
8692
Stepper,
8793
StepperActions
8894
},

src/components/ScreenStart.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<div id="form-content">
1414
<p class="question">
1515
What is the title of the work?
16+
<SchemaGuideLink anchor="#title" />
1617
</p>
1718
<q-input
1819
bg-color="white"
@@ -26,6 +27,7 @@
2627
/>
2728
<p class="question">
2829
What do you want citers to do with the information provided in your CITATION.cff file?
30+
<SchemaGuideLink anchor="#message" />
2931
</p>
3032
<q-input
3133
bg-color="white"
@@ -60,6 +62,7 @@
6062
</q-input>
6163
<p class="question">
6264
What type of work does this CITATION.cff describe?
65+
<SchemaGuideLink anchor="#type" />
6366
</p>
6467
<q-option-group
6568
type="radio"
@@ -76,6 +79,7 @@
7679
</template>
7780

7881
<script lang="ts">
82+
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
7983
import Stepper from 'components/Stepper.vue'
8084
import StepperActions from 'components/StepperActions.vue'
8185
import { computed, defineComponent } from 'vue'
@@ -85,6 +89,7 @@ import { getMyErrors } from 'src/store/validator'
8589
export default defineComponent({
8690
name: 'ScreenStart',
8791
components: {
92+
SchemaGuideLink,
8893
Stepper,
8994
StepperActions
9095
},

src/components/ScreenVersionSpecific.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<div id="form-content">
1313
<p class="question">
1414
What is the commit identifier of the work?
15+
<SchemaGuideLink anchor="#commit" />
1516
</p>
1617
<q-input
1718
bg-color="white"
@@ -24,6 +25,7 @@
2425

2526
<p class="question">
2627
What is the version of the work?
28+
<SchemaGuideLink anchor="#version" />
2729
</p>
2830
<q-input
2931
bg-color="white"
@@ -36,6 +38,7 @@
3638

3739
<p class="question">
3840
When was the version released?
41+
<SchemaGuideLink anchor="#date-released" />
3942
</p>
4043
<q-input
4144
bg-color="white"
@@ -88,6 +91,7 @@
8891
</template>
8992

9093
<script lang="ts">
94+
import SchemaGuideLink from 'components/SchemaGuideLink.vue'
9195
import Stepper from 'components/Stepper.vue'
9296
import StepperActions from 'components/StepperActions.vue'
9397
import { computed, defineComponent } from 'vue'
@@ -97,6 +101,7 @@ import { getMyErrors } from 'src/store/validator'
97101
export default defineComponent({
98102
name: 'ScreenVersionSpecific',
99103
components: {
104+
SchemaGuideLink,
100105
Stepper,
101106
StepperActions
102107
},

0 commit comments

Comments
 (0)