mirror of
https://github.com/aelve/guide.git
synced 2024-11-23 12:15:06 +03:00
Categories links to old front
This commit is contained in:
parent
e5c10b520f
commit
583285476c
@ -20,9 +20,11 @@
|
||||
<h4 class="display-1 font-weight-black"> {{ groupName }} </h4>
|
||||
<a
|
||||
class="category-title"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
v-for="(category, index) in groupCategories"
|
||||
:key="index"
|
||||
href="#"
|
||||
:href="`https://guide.aelve.com/haskell/${getCategoryUrl(category)}`"
|
||||
>
|
||||
<h6
|
||||
class="ml-2 subheading font-weight-bold"
|
||||
@ -39,8 +41,10 @@
|
||||
|
||||
<script lang="ts">
|
||||
import _groupBy from 'lodash/groupBy'
|
||||
import _toKebabCase from 'lodash/kebabCase'
|
||||
import Vue from 'vue'
|
||||
import Component from 'vue-class-component'
|
||||
import { ICategory } from 'client/service/Category'
|
||||
|
||||
@Component
|
||||
export default class Categories extends Vue {
|
||||
@ -55,6 +59,9 @@ export default class Categories extends Vue {
|
||||
get groups() {
|
||||
return _groupBy(this.categories, 'group')
|
||||
}
|
||||
getCategoryUrl(category: ICategory): string {
|
||||
return `${_toKebabCase(category.title)}-${category.uid}`
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user