Skip to content

Commit

Permalink
Changed reading guide to follow new format and data structure on /ad
Browse files Browse the repository at this point in the history
  • Loading branch information
Refrase committed Feb 3, 2017
1 parent f76b99f commit 382963b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
27 changes: 8 additions & 19 deletions src/routes/add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,12 @@
<h4 class="margin-top-2-1 margin-bottom">Guide</h4>
<div class="display-flex">
<div class="flex-1">
<h6 class="margin-bottom">What</h6>
<textarea v-model="article.guide.what.text" type="text" placeholder="Text"></textarea>
<h6 class="margin-bottom">About</h6>
<textarea v-model="article.guide.about" type="text" placeholder="Text"></textarea>
</div>
<div class="margin-left-2-1 flex-1">
<h6 class="margin-bottom">Where</h6>
<textarea v-model="article.guide.where.text" type="text" placeholder="Text"></textarea>
</div>
<div class="margin-left-2-1 flex-1">
<h6 class="margin-bottom">Why</h6>
<textarea v-model="article.guide.why.text" type="text" placeholder="Text"></textarea>
<h6 class="margin-bottom">Keep eye on</h6>
<textarea v-model="article.guide.keepEyeOn" type="text" placeholder="Text"></textarea>
</div>
</div>

Expand All @@ -119,7 +115,7 @@
<h4 class="subtitle">Assign article to course</h4>
<form v-on:submit.prevent="assignDataToData(assignArticleToCourse.articleId, 'articles', assignArticleToCourse.courseId, 'courses')">
<label for="article">Article ID:</label>
<select class="margin-right-2-1" name="article" v-model="assignArticleToCourse.articleId">
<select class="margin-right-2-1" style="width: 200px;" name="article" v-model="assignArticleToCourse.articleId">
<option v-for="(article, index) in articles" :value="article.id">{{ article.title }} ({{ article.author }})</option>
</select>
<label for="course">Course ID:</label>
Expand Down Expand Up @@ -155,7 +151,7 @@
<option v-for="(concept, index) in concepts" :value="concept.id">{{ concept.name }}</option>
</select>
<label for="course">Article ID:</label>
<select class="margin-right-2-1" name="article" v-model="assignConceptToArticle.articleId">
<select class="margin-right-2-1" style="width: 200px;" name="article" v-model="assignConceptToArticle.articleId">
<option v-for="(article, index) in articles" :value="article.id">{{ article.title }} ({{ article.author }})</option>
</select>
<button type="submit">Assign concept</button>
Expand Down Expand Up @@ -224,15 +220,8 @@
},
},
guide: {
what: {
text: null
},
where: {
text: null
},
why: {
text: null
}
about: null,
keepEyeOn: null
},
tableOfContents: {
chapter01: null,
Expand Down
12 changes: 6 additions & 6 deletions src/routes/article.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<ul class="list-unstyled color-base-lighter-2">
<li class="margin-bottom fontSize-small">{{ article.author }} ({{ article.year }})</li>
<li class="margin-bottom fontSize-small">{{ pagesTotal }} pages ({{ article.pageFrom }}-{{ article.pageTo }})</li>
<li v-if="article.chapter" class="margin-bottom-1-2 fontSize-small">Chapter {{ article.chapter }}</li>
<li v-if="article.citedBy" class="margin-bottom-1-2 fontSize-small">Cited by {{ article.citedBy }}</li>
<li v-if="article.chapter" class="margin-bottom fontSize-small">Chapter {{ article.chapter }}</li>
<li v-if="article.citedBy" class="margin-bottom fontSize-small">Cited by {{ article.citedBy }}</li>
</ul>

<div v-if="article.tableOfContents">
Expand All @@ -63,11 +63,11 @@

<div class="article_introduction_upper">

<h2 class="margin-bottom-4-1">Reading guide</h2>
<h2 class="margin-bottom-3-1">Reading guide</h2>
<ul class="margin-bottom-6-1 list-unstyled guide">
<li v-for="(item, key, index) in article.guide" v-if="key !== 'concepts'" class="margin-bottom">
<h4 class="margin-bottom-1-2">{{ item.title }}</h4>
<p class="guide_text margin-bottom-3-1">{{ item.text }}</p>
<li v-for="(item, key, index) in article.guide" class="margin-bottom">
<h4 class="margin-bottom-2-1" v-if="key === 'keepEyeOn'">Hold øje med</h4>
<p class="guide_text margin-bottom-6-1">{{ item }}</p>
</li>
</ul>

Expand Down

0 comments on commit 382963b

Please sign in to comment.