forked from MinBZK/Algoritmeregister
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve "Zoekresultaten in KOOP stijl" Closes MinBZK#28 See merge request ictu/devops/algoritmeregister/algoritmeregister!10
- Loading branch information
Showing
5 changed files
with
142 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<li class="item"> | ||
<div class="item-header"> | ||
<a :href="`/algoritme/${props.algoritme.id}`" class="result--title"> | ||
{{ props.algoritme.name }} | ||
</a> | ||
</div> | ||
<p>{{ truncatedDescription }} <a :href="`/algoritme/${props.algoritme.id} `" v-if="isTruncated">lees meer </a></p> | ||
|
||
<p> | ||
<dl class="dl columns--data"> | ||
<div v-for="sT in summaryTiles"> | ||
<dt>{{ | ||
t(`algorithmProperties.algemeneInformatie.${sT}.label`) | ||
}}</dt> | ||
<dd class="word-break">{{ algoritme[sT as keyof typeof algoritme] }}</dd> | ||
</div> | ||
</dl> | ||
</p> | ||
</li> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { summaryTiles } from '@/config/config' | ||
import { useI18n } from 'vue-i18n' | ||
import type { Algoritme } from '@/types/algoritme' | ||
const { t } = useI18n() | ||
const props = defineProps<{ | ||
algoritme: Algoritme | ||
}>() | ||
const length = 300 | ||
const truncatedDescription = computed(() => { | ||
const truncatedString = props.algoritme.description_short.substring(0, length) | ||
return truncatedString == props.algoritme.description_short ? props.algoritme.description_short : truncatedString + '...' | ||
}) | ||
const isTruncated = computed(() => { | ||
return truncatedDescription.value != props.algoritme.description_short.substring(0,length) | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<div class="sort"> | ||
<div class="columns"> | ||
<div class="column"> | ||
Sorteer op: | ||
<ul class="sort__options"> | ||
<li> | ||
<a | ||
href="#" | ||
role="button" | ||
class="sort--ascending is-active" | ||
aria-current="true" | ||
><span class="visually-hidden">Sorteer op: </span>Datum<span | ||
class="visually-hidden" | ||
> | ||
oplopend</span | ||
></a | ||
> | ||
</li> | ||
<li> | ||
<a | ||
href="#" | ||
role="button" | ||
class="sort--ascending" | ||
aria-current="false" | ||
><span class="visually-hidden">Sorteer op: </span>Titel<span | ||
class="visually-hidden" | ||
> | ||
oplopend</span | ||
></a | ||
> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters