Skip to content

Commit

Permalink
reviewers update
Browse files Browse the repository at this point in the history
  • Loading branch information
RPSoftCompany committed Mar 2, 2024
1 parent 3a6c5e3 commit 89b7ed4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 16 deletions.
18 changes: 12 additions & 6 deletions articles.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
],
"bibliography": [
{
"title": "U.S. Media Consumption to Rise to 15.5 Hours a Day – Per Person – by 2015 by James Short, San Diego Supercomputer Center at the University of California San Diego",
"title": "U.S. Media Consumption to Rise to 15.5 Hours a Day – Per Person – by 2015",
"link": "https://www.sdsc.edu/News%20Items/PR110613_hmi.html",
"ISBN": "",
"type": "article",
"author": "James Short"
"author": "by James Short, San Diego Supercomputer Center at the University of California San Diego"
}
],
"reviewers": [
Expand Down Expand Up @@ -81,8 +81,11 @@
],
"bibliography": [
{
"title": "U.S. Media Consumption to Rise to 15.5 Hours a Day – Per Person – by 2015 by James Short, San Diego Supercomputer Center at the University of California San Diego",
"link": "https://today.ucsd.edu/story/u.s._media_consumption_to_rise_to_15.5_hours_a_day_per_person_by_2015"
"title": "U.S. Media Consumption to Rise to 15.5 Hours a Day – Per Person – by 2015",
"link": "https://www.sdsc.edu/News%20Items/PR110613_hmi.html",
"ISBN": "",
"type": "article",
"author": "by James Short, San Diego Supercomputer Center at the University of California San Diego"
}
]
},
Expand Down Expand Up @@ -115,8 +118,11 @@
],
"bibliography": [
{
"title": "U.S. Media Consumption to Rise to 15.5 Hours a Day – Per Person – by 2015 by James Short, San Diego Supercomputer Center at the University of California San Diego",
"link": "https://today.ucsd.edu/story/u.s._media_consumption_to_rise_to_15.5_hours_a_day_per_person_by_2015"
"title": "U.S. Media Consumption to Rise to 15.5 Hours a Day – Per Person – by 2015",
"link": "https://www.sdsc.edu/News%20Items/PR110613_hmi.html",
"ISBN": "",
"type": "article",
"author": "by James Short, San Diego Supercomputer Center at the University of California San Diego"
}
]
}
Expand Down
33 changes: 23 additions & 10 deletions src/components/ArticlePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,21 @@
<p class="lg:hidden" v-if="reviewers.length > 0">
<div class="mt-3 border-b dark:border-neutral-800"/>
<h5>Article Reviewers</h5>
<div v-for="reviewer of reviewers" :key="reviewer.reviewer">
<div v-for="reviewer of sortedReviewers" :key="reviewer.reviewer">
<a target="_blank" class="link text-gray-600 dark:text-gray-400 hover:text-black hover:dark:text-gray-50"
:href="reviewer.link">{{ reviewer.reviewer }}</a>
</div>
</p>
<div v-if="bibliography.length > 0">
<div class="mt-3 border-b dark:border-neutral-800"/>
<h3>Bibliography</h3>
<a class="link text-gray-600 dark:text-gray-400 hover:text-black hover:dark:text-gray-50" target="_blank"
v-for="bib of bibliography" :key="bib.title" :href="bib.link">{{
bib.title
}}</a>
<template v-for="bib of bibliography" :key="bib.title">
<a class="link text-gray-600 dark:text-gray-400 hover:text-black hover:dark:text-gray-50" target="_blank"
:href="bib.link">{{
bib.title
}}</a>
<span>&nbsp;{{ bib.author }}</span>
</template>
</div>
</div>
</div>
Expand All @@ -72,17 +75,17 @@
</router-link>
</div>
<div class="mt-3 border-b dark:border-neutral-800" v-if="reviewers.length > 0"/>
<p class="text-right hyphens-auto mb-2 mt-3" v-if="reviewers.length > 0">
<h4 class="">Authors</h4>
<p class="text-right hyphens-auto mb-2 mt-3">
<h4 class="mt-0 mb-2">Authors</h4>
<div v-for="author of authors" :key="author.author">
<a target="_blank" class="link text-gray-600 dark:text-gray-400 hover:text-black hover:dark:text-gray-50"
:href="author.link">{{ author.author }}</a>
</div>
</p>
<div class="mt-3 border-b dark:border-neutral-800"/>
<p class="text-right hyphens-auto mb-2 mt-3" v-if="reviewers.length > 0">
<h4 class="">Article Reviewers</h4>
<div v-for="reviewer of reviewers" :key="reviewer.reviewer">
<h4 class="mt-0 mb-2">Article Reviewers</h4>
<div v-for="reviewer of sortedReviewers" :key="reviewer.reviewer">
<a target="_blank" class="link text-gray-600 dark:text-gray-400 hover:text-black hover:dark:text-gray-50"
:href="reviewer.link">{{ reviewer.reviewer }}</a>
</div>
Expand All @@ -100,7 +103,7 @@
</template>

<script setup>
import {onBeforeMount, ref, watch} from "vue";
import {computed, onBeforeMount, ref, watch} from "vue";
import {useRoute, useRouter} from "vue-router";
import articles from "../../articles.json" with {type: "json"}
import axios from "axios";
Expand Down Expand Up @@ -129,6 +132,16 @@ watch(route, async () => {
await updateData()
})
const sortedReviewers = computed(() => {
if (reviewers.value) {
return reviewers.value.sort((a, b) => {
return a.reviewer.localeCompare(b.reviewer)
})
}
return []
})
const updateData = async () => {
articleName.value = route.params.article
Expand Down

0 comments on commit 89b7ed4

Please sign in to comment.