From 56f74964ed326910a2a462075e8463ae4dc39a60 Mon Sep 17 00:00:00 2001 From: James Collins Date: Fri, 7 Jul 2023 07:21:14 +1000 Subject: [PATCH] removed mdpreview and added SMHTML --- resources/js/components/SMHTML.vue | 79 ++++++++++++++++++++++++++++++ resources/js/views/Article.vue | 8 +-- resources/js/views/Event.vue | 20 ++++---- 3 files changed, 92 insertions(+), 15 deletions(-) create mode 100644 resources/js/components/SMHTML.vue diff --git a/resources/js/components/SMHTML.vue b/resources/js/components/SMHTML.vue new file mode 100644 index 0000000..5362421 --- /dev/null +++ b/resources/js/components/SMHTML.vue @@ -0,0 +1,79 @@ + + + diff --git a/resources/js/views/Article.vue b/resources/js/views/Article.vue index bf76dbb..f701d37 100644 --- a/resources/js/views/Article.vue +++ b/resources/js/views/Article.vue @@ -35,7 +35,7 @@ >Edit Article - + @@ -53,7 +53,7 @@ import { mediaGetVariantUrl } from "../helpers/media"; import { userHasPermission } from "../helpers/utils"; import SMLoading from "../components/SMLoading.vue"; import SMPageStatus from "../components/SMPageStatus.vue"; -import { MdPreview } from "md-editor-v3"; +import SMHTML from "../components/SMHTML.vue"; const applicationStore = useApplicationStore(); @@ -112,12 +112,12 @@ const handleLoad = async () => { { format: "ymd", utc: true, - } + }, ).format("yyyy/MM/dd HH:mm:ss"); backgroundImageUrl.value = mediaGetVariantUrl( article.value.hero, - "large" + "large", ); applicationStore.setDynamicTitle(article.value.title); } else { diff --git a/resources/js/views/Event.vue b/resources/js/views/Event.vue index be2eb94..5bb5c98 100644 --- a/resources/js/views/Event.vue +++ b/resources/js/views/Event.vue @@ -11,7 +11,7 @@ :style="{ backgroundImage: `url('${mediaGetVariantUrl( event.hero, - 'large' + 'large', )}')`, }">

{{ event.title }}

- +
@@ -181,7 +179,7 @@ import { mediaGetVariantUrl } from "../helpers/media"; import { userHasPermission } from "../helpers/utils"; import SMLoading from "../components/SMLoading.vue"; import SMPageStatus from "../components/SMPageStatus.vue"; -import { MdPreview } from "md-editor-v3"; +import SMHTML from "../components/SMHTML.vue"; const applicationStore = useApplicationStore(); @@ -206,13 +204,13 @@ const workshopDate = computed(() => { event.value.end_at.length > 0 && event.value.start_at.substring( 0, - event.value.start_at.indexOf(" ") + event.value.start_at.indexOf(" "), ) != event.value.end_at.substring(0, event.value.end_at.indexOf(" ")) ) { str = [ new SMDate(event.value.start_at, { format: "ymd" }).format( - "dd/MM/yyyy" + "dd/MM/yyyy", ), ]; if (event.value.end_at.length > 0) { @@ -220,20 +218,20 @@ const workshopDate = computed(() => { str[0] + " - " + new SMDate(event.value.end_at, { format: "ymd" }).format( - "dd/MM/yyyy" + "dd/MM/yyyy", ); } } else { str = [ new SMDate(event.value.start_at, { format: "ymd" }).format( - "EEEE dd MMM yyyy" + "EEEE dd MMM yyyy", ), new SMDate(event.value.start_at, { format: "ymd" }).format( - "h:mm aa" + "h:mm aa", ) + " - " + new SMDate(event.value.end_at, { format: "ymd" }).format( - "h:mm aa" + "h:mm aa", ), ]; }