Skip to content

Commit

Permalink
v1.5.2: Fixed blog <title> tag, fixed heading tags
Browse files Browse the repository at this point in the history
  • Loading branch information
timyboy12345 committed Sep 25, 2024
1 parent a04c0f4 commit d4edc7b
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 29 deletions.
4 changes: 2 additions & 2 deletions components/cards/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="flex flex-col justify-between h-full">
<div class="text-gray-800 dark:text-gray-300">
<slot name="title">
<h1 v-if="title" class="text-lg text-indigo-800 dark:text-indigo-500 font-bold">{{ title }}</h1>
<h2 v-if="subTitle" class="text-sm text-gray-600 dark:text-gray-500">{{ subTitle }}</h2>
<h2 v-if="title" class="text-lg text-indigo-800 dark:text-indigo-500 font-bold">{{ title }}</h2>
<p v-if="subTitle" class="text-sm text-gray-600 dark:text-gray-500">{{ subTitle }}</p>
</slot>

<slot name="content">
Expand Down
4 changes: 2 additions & 2 deletions components/cards/ImageCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<div class="w-full flex flex-col bottom-0 absolute">
<div class="p-4 m-4 rounded z-5 bg-white rounded">
<h1 v-if="title" class="text-lg text-indigo-800 font-bold">{{ title }}</h1>
<h2 v-if="subtitle" class="text-sm text-gray-600 -mt-1">{{ subtitle }}</h2>
<h1 v-if="title" class="text-xl text-indigo-800 font-bold">{{ title }}</h1>
<p v-if="subtitle" class="text-sm text-gray-600 -mt-1">{{ subtitle }}</p>

<!-- eslint-disable-next-line vue/no-v-html -->
<p v-if="description" class="mt-2 text-gray-800" v-html="description"></p>
Expand Down
52 changes: 30 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "themeparks-nuxtjs",
"version": "1.5.1",
"version": "1.5.2",
"private": false,
"repository": {
"url": "https://github.com/timyboy12345/Themeparks-NuxtJS"
Expand Down
6 changes: 5 additions & 1 deletion pages/blog/:slug/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@
<h1 class="text-2xl font-bold text-indigo-800 dark:text-indigo-600">{{ blogPost.title }}</h1>
<h2 class="text-gray-600 dark:text-gray-500 my-2">
{{ blogPost.createdAt | formatDate }}
<!-- TODO: Uncomment once updatedAt is implemented -->
<!-- <span v-if="blogPost.createdAt !== blogPost.updatedAt">| {{ blogPost.updatedAt | formatDate }}</span>-->
<span v-if="blogPost.author">| {{ blogPost.author.firstName }}</span>
</h2>

<!-- eslint-disable-next-line vue/no-v-html -->
<article class="prose dark:prose-invert max-w-none" v-html="$md.render(blogPost.content)"></article>
</div>

Expand Down Expand Up @@ -112,7 +116,7 @@ export default {
},
head() {
return {
title: this.$t('blog.seoTitle'),
title: this.blogPost ? this.blogPost.title : this.$t('blog.seoTitle'),
meta: [
{
hid: 'description',
Expand Down
2 changes: 1 addition & 1 deletion pages/parks/:id/rides/:ride_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="grid md:grid-cols-2 gap-4">
<ride-card v-if="ride && park" :park="park" :ride="ride"></ride-card>

<card v-if="ride" :title="$t('general.generalInformation')">
<card v-if="ride && ride.description" :title="$t('general.generalInformation')">
<template #content>
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="ride.description"></div>
Expand Down
7 changes: 7 additions & 0 deletions pages/parks/:id/shows/:show_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
<div class="grid md:grid-cols-2 gap-4">
<show-card v-if="show" :park="park" :show="show"></show-card>

<card v-if="show && show.description" :title="$t('general.generalInformation')">
<template #content>
<!-- eslint-disable-next-line vue/no-v-html -->
<div v-html="show.description"></div>
</template>
</card>

<general-error v-if="error"></general-error>

<card
Expand Down

0 comments on commit d4edc7b

Please sign in to comment.