Skip to content

Commit

Permalink
fix: πŸ› AppVeryOldArticle and CSS lost sometimes?? WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
renoirb committed Oct 15, 2024
1 parent 038d7a5 commit e6c576c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
5 changes: 3 additions & 2 deletions components/global/AppAlertBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
v-if="messageTextContent !== ''"
v-html="abbreviatize(messageTextContent)"
/>
<slot class="addemdum" />
<slot />
</rb-notice-box>
</template>

Expand Down Expand Up @@ -64,11 +64,12 @@
data() {
const messageTextContent = this.message || ''
const titleTextContent = this.title || ''
return {
const out = {
messageTextContent,
titleTextContent,
shouldBeVisible: true,
}
return out
},
methods: {
abbreviatize,
Expand Down
12 changes: 8 additions & 4 deletions components/global/AppVeryOldArticle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@
return candidate
},
isOldEnough(): boolean {
return YEAR_CONSIDERED_OLD > this.year
const out = YEAR_CONSIDERED_OLD > this.year
return out
},
},
created() {
async beforeMount() {
await this.$nextTick()
this.shouldBeVisible = this.isOldEnough
},
beforeMount() {
if (this.preamble && this.preamble.disable === true) {
this.shouldBeVisible = false
}
Expand All @@ -116,6 +116,10 @@
if (typeof titleTextContentMaybe === 'string') {
this.titleTextContent = titleTextContentMaybe
}
// I'm probably doing this wrong.
// That's 5 years old now and I can't remember if this was done when I
// fully understood Vue’s internals. Or before.
await this.$nextTick()
},
})
</script>
1 change: 1 addition & 0 deletions pages/blog/_year/_month/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:date="content.created"
class="my-4"
alert-type="warn"
role="alert"
>
<nuxt-content
v-if="content.preamble && content.preamble.document !== null"
Expand Down
1 change: 1 addition & 0 deletions pages/blog/_year/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div class="pages__blog__year--index">
<div class="document document--collection">
<!--#TODO Reminder v-memo is only in Vue 3, that's probably doing nothing-->
<div
v-memo="[contents]"
class="body"
Expand Down
1 change: 1 addition & 0 deletions pages/blog/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div class="pages-blog--index">
<div class="document document--item z-30">
<!--#TODO Reminder v-memo is only in Vue 3, that's probably doing nothing-->
<div
v-memo="[contents]"
class="body"
Expand Down

0 comments on commit e6c576c

Please sign in to comment.