Compare commits
3 commits
649f42403f
...
84bb335b90
Author | SHA1 | Date | |
---|---|---|---|
84bb335b90 | |||
f0164afe9f | |||
c88fb4d28d |
7 changed files with 35 additions and 23 deletions
18
src/App.vue
18
src/App.vue
|
@ -1,16 +1,16 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import MainMenu from './components/MainMenu.vue'
|
import MainMenu from './components/MainMenu.vue'
|
||||||
import Search from './components/Search.vue'
|
import SearchBar from './components/SearchBar.vue'
|
||||||
import Filter from './components/Filter.vue'
|
import FilterView from './components/papers/FilterView.vue'
|
||||||
import Papers from './components/Papers.vue'
|
import PaperList from './components/papers/PaperList.vue'
|
||||||
import FooterMenu from './components/FooterMenu.vue'
|
import FooterMenu from './components/FooterMenu.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
MainMenu,
|
MainMenu,
|
||||||
Search,
|
SearchBar,
|
||||||
Filter,
|
FilterView,
|
||||||
Papers,
|
PaperList,
|
||||||
FooterMenu,
|
FooterMenu,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -37,18 +37,18 @@ export default {
|
||||||
<h1 class="p-2 text-xl">{{ applicationName }} {{ cityName }}</h1>
|
<h1 class="p-2 text-xl">{{ applicationName }} {{ cityName }}</h1>
|
||||||
<MainMenu />
|
<MainMenu />
|
||||||
</div>
|
</div>
|
||||||
<Search
|
<SearchBar
|
||||||
@searchSubmit="(type) => search.type = type"
|
@searchSubmit="(type) => search.type = type"
|
||||||
@searchQuery="(query) => search.value = query"
|
@searchQuery="(query) => search.value = query"
|
||||||
/>
|
/>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="flex flex-row max-w-5xl m-auto">
|
<main class="flex flex-row max-w-5xl m-auto">
|
||||||
<Filter
|
<FilterView
|
||||||
@paperFilter="(filter) => paperFilter = filter"
|
@paperFilter="(filter) => paperFilter = filter"
|
||||||
:papers="papers"
|
:papers="papers"
|
||||||
/>
|
/>
|
||||||
<Papers
|
<PaperList
|
||||||
@papers="(p) => papers = p"
|
@papers="(p) => papers = p"
|
||||||
:paperQuery="search"
|
:paperQuery="search"
|
||||||
:paperFilter="paperFilter"
|
:paperFilter="paperFilter"
|
||||||
|
|
|
@ -10,7 +10,11 @@ export default {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ul class="flex flex-row place-content-center">
|
<ul class="flex flex-row place-content-center">
|
||||||
<li class="p-2 place-content-center" v-for="entry of menuEntries">
|
<li
|
||||||
|
v-for="{entry, i} of menuEntries"
|
||||||
|
:key="i"
|
||||||
|
class="p-2 place-content-center"
|
||||||
|
>
|
||||||
<a :href="entry.uri">{{ entry.name }}</a>
|
<a :href="entry.uri">{{ entry.name }}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -4,4 +4,5 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div></div>
|
||||||
</template>
|
</template>
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|
||||||
export type Papers = {
|
export type Papers = {
|
||||||
body: string
|
body: string
|
||||||
content: string
|
content: string
|
||||||
|
@ -48,13 +49,19 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return filteredPapers
|
return filteredPapers
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fetchData() {
|
async fetchData() {
|
||||||
this.papers = await (await fetch(this.apiUri)).json()
|
this.papers = await (await fetch(this.apiUri)).json()
|
||||||
},
|
},
|
||||||
openPaper() {}
|
openPaper() {
|
||||||
|
|
||||||
|
},
|
||||||
|
date(paperDate: String) {
|
||||||
|
const date = new Date(paperDate)
|
||||||
|
return new Intl.DateTimeFormat('de-DE', { dateStyle: 'full' }).format(date)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -74,7 +81,7 @@ export default {
|
||||||
@click.prevent="openPaper()"
|
@click.prevent="openPaper()"
|
||||||
>
|
>
|
||||||
<h4 class="text-xl">{{ paper.name }}</h4>
|
<h4 class="text-xl">{{ paper.name }}</h4>
|
||||||
<p>{{ paper.published_at }}: {{ paper.paper_type}} von {{ paper.originator }}</p>
|
<p>{{ date(paper.published_at) }}: <a :href="paper.url" class="text-secondary-button-500">{{ paper.paper_type}} von {{ paper.originator }}</a></p>
|
||||||
</article>
|
</article>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
|
@ -12,16 +12,16 @@ export default {
|
||||||
colors: {
|
colors: {
|
||||||
'text': { // hand-choosen
|
'text': { // hand-choosen
|
||||||
50: '#FDFDFD',
|
50: '#FDFDFD',
|
||||||
100: '#F3F3F6',
|
100: '#F6F6F6',
|
||||||
200: '#DCDCE7',
|
200: '#E8E8E7',
|
||||||
300: '#C0BFD9',
|
300: '#D9D9D9',
|
||||||
400: '#AAA8CF',
|
400: '#D0D0CF',
|
||||||
500: '#8A86BB',
|
500: '#BBBBBB',
|
||||||
600: '#6C68A1',
|
600: '#A1A1A1',
|
||||||
700: '#554F84',
|
700: '#848484',
|
||||||
800: '#403B67',
|
800: '#686867',
|
||||||
900: '#2C2849',
|
900: '#494949',
|
||||||
950: '#1A182C',
|
950: '#2C2C2C',
|
||||||
},
|
},
|
||||||
'background': { // hand-choosen
|
'background': { // hand-choosen
|
||||||
50: '#FDFDFD',
|
50: '#FDFDFD',
|
||||||
|
|
Loading…
Reference in a new issue