|
@@ -1,5 +1,5 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { ref, onBeforeMount, computed } from "vue"; |
|
|
|
|
|
|
|
|
import { ref, onBeforeMount } from "vue"; |
|
|
import { get } from "../../../utils/apifree"; |
|
|
import { get } from "../../../utils/apifree"; |
|
|
import { useRoute } from "vue-router"; |
|
|
import { useRoute } from "vue-router"; |
|
|
import "../../vendor/css/bundle.min.css"; |
|
|
import "../../vendor/css/bundle.min.css"; |
|
@@ -33,9 +33,7 @@ const site_id = ref<any>(); |
|
|
const site_logo = ref<any>(); |
|
|
const site_logo = ref<any>(); |
|
|
const site_name = ref<any>(); |
|
|
const site_name = ref<any>(); |
|
|
const pages = ref<any>([]); |
|
|
const pages = ref<any>([]); |
|
|
const pallete_id = ref<any>(); |
|
|
|
|
|
const home_id = ref<any>(); |
|
|
const home_id = ref<any>(); |
|
|
const pallete = ref<any>([]); |
|
|
|
|
|
const loading = ref<boolean>(true); |
|
|
const loading = ref<boolean>(true); |
|
|
onBeforeMount(() => { |
|
|
onBeforeMount(() => { |
|
|
console.log(id); |
|
|
console.log(id); |
|
@@ -46,13 +44,15 @@ async function initialize() { |
|
|
layout.value = "left"; |
|
|
layout.value = "left"; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
(await get)<any>(`/create_site/sites/show/${name}`).then((res) => { |
|
|
|
|
|
|
|
|
(await get)<any>(`/site/name/${name}`).then((res) => { |
|
|
console.log(res.data); |
|
|
console.log(res.data); |
|
|
id.value = res.data.id; |
|
|
id.value = res.data.id; |
|
|
|
|
|
layout.value = res.data.layout; |
|
|
|
|
|
site_logo.value = res.data.logo_path; |
|
|
|
|
|
site_name.value = res.data.site_name; |
|
|
|
|
|
home_id.value = res.data.home_id; |
|
|
console.log(id.value); |
|
|
console.log(id.value); |
|
|
getPages(); |
|
|
getPages(); |
|
|
|
|
|
|
|
|
getLayout(); |
|
|
|
|
|
console.log(res.data); |
|
|
console.log(res.data); |
|
|
}); |
|
|
}); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
@@ -63,66 +63,32 @@ async function initialize() { |
|
|
|
|
|
|
|
|
async function getHomePage() { |
|
|
async function getHomePage() { |
|
|
console.log("Home page", home_id.value); |
|
|
console.log("Home page", home_id.value); |
|
|
get<any>(`/create_site/pages/${home_id.value}`).then((res) => { |
|
|
|
|
|
|
|
|
get<any>(`/sitePages/${home_id.value}`).then((res) => { |
|
|
console.log(res.data); |
|
|
console.log(res.data); |
|
|
page_title.value = res.data.page_name; |
|
|
page_title.value = res.data.page_name; |
|
|
page_content.value = res.data.content; |
|
|
page_content.value = res.data.content; |
|
|
site_id.value = res.data.site; |
|
|
site_id.value = res.data.site; |
|
|
images.value = res.data.image; |
|
|
images.value = res.data.image; |
|
|
|
|
|
loading.value=false; |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function getPages() { |
|
|
async function getPages() { |
|
|
console.log(id.value); |
|
|
console.log(id.value); |
|
|
(await get)<any>("/create_site/pages/", { site: id.value }).then((res) => { |
|
|
|
|
|
|
|
|
(await get)<any>("/pages/site/", { site: id.value }).then((res) => { |
|
|
|
|
|
console.log("Pages: "); |
|
|
console.log(res.data); |
|
|
console.log(res.data); |
|
|
res.data.forEach((element: any) => { |
|
|
|
|
|
if (element.site == id.value) { |
|
|
|
|
|
pages.value.push(element); |
|
|
|
|
|
if (element.page_name == "Home") { |
|
|
|
|
|
home_id.value = element.id; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
pages.value=res.data; |
|
|
pages.value = pages.value.reverse(); |
|
|
pages.value = pages.value.reverse(); |
|
|
console.log(pages.value); |
|
|
console.log(pages.value); |
|
|
|
|
|
|
|
|
getHomePage(); |
|
|
getHomePage(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
async function getLayout() { |
|
|
|
|
|
(await get)<any>(`/create_site/sites/${parseInt(id.value)}`).then((res) => { |
|
|
|
|
|
console.log(res.data); |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
layout.value = res.data.layout; |
|
|
|
|
|
site_logo.value = res.data.logo_path; |
|
|
|
|
|
site_name.value = res.data.site_name; |
|
|
|
|
|
pallete_id.value = res.data.color_swatch; |
|
|
|
|
|
get<any>(`/create_site/company/${res.data.company}`).then((res) => { |
|
|
|
|
|
console.log(res.data); |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
site_logo.value = res.data.logo_path; |
|
|
|
|
|
get<any>(`/color_swatches/`).then((res) => { |
|
|
|
|
|
res.data.forEach((element: any) => { |
|
|
|
|
|
if (element.id == pallete_id.value) { |
|
|
|
|
|
loading.value = false; |
|
|
|
|
|
pallete.value = element; |
|
|
|
|
|
console.log(pallete.value); |
|
|
|
|
|
loading.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const unescapedPageContent = computed(() => { |
|
|
|
|
|
const parser = new DOMParser(); |
|
|
|
|
|
const doc = parser.parseFromString(page_content.value, "text/html"); |
|
|
|
|
|
return doc.body.innerHTML; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
<template :key="route.params.id"> |
|
|
<template :key="route.params.id"> |
|
|
<template v-if="loading"> |
|
|
<template v-if="loading"> |
|
@@ -139,7 +105,7 @@ const unescapedPageContent = computed(() => { |
|
|
<nav class="navbar navbar-expand-lg fixed-top navbar-fixed-top"> |
|
|
<nav class="navbar navbar-expand-lg fixed-top navbar-fixed-top"> |
|
|
<a class="navbar-brand scroll" href="index-celebrity.html#home"> |
|
|
<a class="navbar-brand scroll" href="index-celebrity.html#home"> |
|
|
<img |
|
|
<img |
|
|
:src="`https://api.drawise.net${site_logo}`" |
|
|
|
|
|
|
|
|
:src="`${site_logo}`" |
|
|
width="80" |
|
|
width="80" |
|
|
alt="logo" |
|
|
alt="logo" |
|
|
/> |
|
|
/> |
|
@@ -166,7 +132,7 @@ const unescapedPageContent = computed(() => { |
|
|
<div class="inner-wrapper"> |
|
|
<div class="inner-wrapper"> |
|
|
<div class="sidemenu-image"> |
|
|
<div class="sidemenu-image"> |
|
|
<a class="scroll" href="index-celebrity.html#home"> |
|
|
<a class="scroll" href="index-celebrity.html#home"> |
|
|
<img :src="`https://api.drawise.net${site_logo}`" alt="image" |
|
|
|
|
|
|
|
|
<img :src="`${site_logo}`" alt="image" |
|
|
/></a> |
|
|
/></a> |
|
|
</div> |
|
|
</div> |
|
|
<span class="btn-close" id="btn_sideNavClose"><i></i><i></i></span> |
|
|
<span class="btn-close" id="btn_sideNavClose"><i></i><i></i></span> |
|
@@ -249,7 +215,7 @@ const unescapedPageContent = computed(() => { |
|
|
<section |
|
|
<section |
|
|
class="banner-section" |
|
|
class="banner-section" |
|
|
id="home" |
|
|
id="home" |
|
|
:style="`background-image:url(https://api.drawise.net${images[0].image}) ;`" |
|
|
|
|
|
|
|
|
:style="`background-image:url(${images[0]}) ;`" |
|
|
> |
|
|
> |
|
|
<div class="container"> |
|
|
<div class="container"> |
|
|
<div class="rectangle wow slideInDown" data-wow-delay="1500ms"> |
|
|
<div class="rectangle wow slideInDown" data-wow-delay="1500ms"> |
|
@@ -298,37 +264,7 @@ const unescapedPageContent = computed(() => { |
|
|
</section> |
|
|
</section> |
|
|
<!-- End Banner --> |
|
|
<!-- End Banner --> |
|
|
|
|
|
|
|
|
<!-- Start About --> |
|
|
|
|
|
<section class="about-section" id="about"> |
|
|
|
|
|
<div class="container"> |
|
|
|
|
|
<div class="row no-gutters"> |
|
|
|
|
|
<div |
|
|
|
|
|
class="col-lg-12 col-md-12 col-sm-12 wow fadeInDown" |
|
|
|
|
|
data-wow-delay="300ms" |
|
|
|
|
|
> |
|
|
|
|
|
<h2 class="heading font">{{ page_title }}</h2> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="row no-gutters"> |
|
|
|
|
|
<div |
|
|
|
|
|
class="col-lg-6 col-md-12 col-sm-12 text-section wow fadeInLeft" |
|
|
|
|
|
data-wow-delay="300ms" |
|
|
|
|
|
> |
|
|
|
|
|
<div v-html="unescapedPageContent"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="col-lg-6 col-md-12 col-sm-12 img-section"> |
|
|
|
|
|
<img |
|
|
|
|
|
:src="`https://api.drawise.net${images[1].image}`" |
|
|
|
|
|
alt="img" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="rectangle"></div> |
|
|
|
|
|
</section> |
|
|
|
|
|
<!-- End About --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Footer starts --> |
|
|
<!-- Footer starts --> |
|
|
<footer class="p-half bg-white"> |
|
|
<footer class="p-half bg-white"> |
|
@@ -387,7 +323,7 @@ const unescapedPageContent = computed(() => { |
|
|
<div class="container radius nav-box-shadow"> |
|
|
<div class="container radius nav-box-shadow"> |
|
|
<a class="logo link" href="javascript:void(0)"> |
|
|
<a class="logo link" href="javascript:void(0)"> |
|
|
<img |
|
|
<img |
|
|
:src="`https://api.drawise.net${site_logo}`" |
|
|
|
|
|
|
|
|
:src="`${site_logo}`" |
|
|
width="50" |
|
|
width="50" |
|
|
alt="logo" |
|
|
alt="logo" |
|
|
title="Logo" |
|
|
title="Logo" |
|
@@ -416,7 +352,7 @@ const unescapedPageContent = computed(() => { |
|
|
<div |
|
|
<div |
|
|
id="particles-js" |
|
|
id="particles-js" |
|
|
class="particle2 parallax-setting bg-img-1 bg-img-setting not-full" |
|
|
class="particle2 parallax-setting bg-img-1 bg-img-setting not-full" |
|
|
:style="`background-image:linear-gradient(60deg, rgba(220, 207, 53, 0.76) 0%, rgba(220, 53, 69, 0.67) 70%), url(https://api.drawise.net${images[0].image}) ;`" |
|
|
|
|
|
|
|
|
:style="`background-image:linear-gradient(60deg, rgba(220, 207, 53, 0.76) 0%, rgba(220, 53, 69, 0.67) 70%), url(${images[0]}) ;`" |
|
|
> |
|
|
> |
|
|
<div class="bg-overlay bg-gradient"></div> |
|
|
<div class="bg-overlay bg-gradient"></div> |
|
|
<div class="not-fullscreen"> |
|
|
<div class="not-fullscreen"> |
|
@@ -424,7 +360,7 @@ const unescapedPageContent = computed(() => { |
|
|
<div class="personal-box"> |
|
|
<div class="personal-box"> |
|
|
<div class="myphoto"> |
|
|
<div class="myphoto"> |
|
|
<img |
|
|
<img |
|
|
:src="`https://api.drawise.net${images[1].image}`" |
|
|
|
|
|
|
|
|
:src="`${images[1]}`" |
|
|
alt="image" |
|
|
alt="image" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
@@ -438,36 +374,6 @@ const unescapedPageContent = computed(() => { |
|
|
</section> |
|
|
</section> |
|
|
<!-- Main Section end --> |
|
|
<!-- Main Section end --> |
|
|
|
|
|
|
|
|
<!-- About start --> |
|
|
|
|
|
<section class="half-section p-0"> |
|
|
|
|
|
<h2 class="d-none">heading</h2> |
|
|
|
|
|
<div class="container-fluid"> |
|
|
|
|
|
<div class="row align-items-center"> |
|
|
|
|
|
<div class="col-lg-6 col-md-12 p-0 order-lg-2"> |
|
|
|
|
|
<div class="hover-effect"> |
|
|
|
|
|
<img |
|
|
|
|
|
alt="about" |
|
|
|
|
|
:src="`https://api.drawise.net${images[2].image}`" |
|
|
|
|
|
class="about-img w-100" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="col-lg-6 col-md-12 pt-5"> |
|
|
|
|
|
<div class="skill-box"> |
|
|
|
|
|
<div |
|
|
|
|
|
class="main-title mb-5 text-md-left wow fadeIn" |
|
|
|
|
|
data-wow-delay="300ms" |
|
|
|
|
|
> |
|
|
|
|
|
<h2>{{ page_title }}</h2> |
|
|
|
|
|
<div v-html="unescapedPageContent"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</section> |
|
|
|
|
|
<!-- About ends --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Footer starts --> |
|
|
<!-- Footer starts --> |
|
|
<footer class="p-half bg-white"> |
|
|
<footer class="p-half bg-white"> |
|
@@ -528,13 +434,13 @@ const unescapedPageContent = computed(() => { |
|
|
<a href="index-cycling.html#home" title="Logo" class="logo scroll"> |
|
|
<a href="index-cycling.html#home" title="Logo" class="logo scroll"> |
|
|
<!--Logo Default--> |
|
|
<!--Logo Default--> |
|
|
<img |
|
|
<img |
|
|
:src="`https://api.drawise.net${site_logo}`" |
|
|
|
|
|
|
|
|
:src="`${site_logo}`" |
|
|
alt="logo" |
|
|
alt="logo" |
|
|
width="60" |
|
|
width="60" |
|
|
class="m-0 logo-img" |
|
|
class="m-0 logo-img" |
|
|
/> |
|
|
/> |
|
|
<img |
|
|
<img |
|
|
:src="`https://api.drawise.net${site_logo}`" |
|
|
|
|
|
|
|
|
:src="`${site_logo}`" |
|
|
alt="logo" |
|
|
alt="logo" |
|
|
class="m-0 logo-dark" |
|
|
class="m-0 logo-dark" |
|
|
/> |
|
|
/> |
|
@@ -567,12 +473,7 @@ const unescapedPageContent = computed(() => { |
|
|
<a class="nav-link scroll" href="index-cycling.html#home" |
|
|
<a class="nav-link scroll" href="index-cycling.html#home" |
|
|
>Home</a |
|
|
>Home</a |
|
|
> |
|
|
> |
|
|
</li> |
|
|
|
|
|
<li class="nav-item"> |
|
|
|
|
|
<a class="nav-link scroll" href="index-cycling.html#about" |
|
|
|
|
|
>About Us</a |
|
|
|
|
|
> |
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
|
</li> |
|
|
<li class="nav-item"> |
|
|
<li class="nav-item"> |
|
|
<a |
|
|
<a |
|
|
class="nav-link scroll" |
|
|
class="nav-link scroll" |
|
@@ -628,7 +529,7 @@ const unescapedPageContent = computed(() => { |
|
|
<!-- Header end --> |
|
|
<!-- Header end --> |
|
|
|
|
|
|
|
|
<!-- banner start --> |
|
|
<!-- banner start --> |
|
|
<section class="banner-see bg-banner" id="banner" :style="`background-image:url(https://api.drawise.net${images[1].image});`"> |
|
|
|
|
|
|
|
|
<section class="banner-see bg-banner" id="banner" :style="`background-image:url(${images[1]});`"> |
|
|
<div class="container"> |
|
|
<div class="container"> |
|
|
<div class="row height"> |
|
|
<div class="row height"> |
|
|
<div class="col-lg-6 d-flex align-items-center"> |
|
|
<div class="col-lg-6 d-flex align-items-center"> |
|
@@ -640,23 +541,7 @@ const unescapedPageContent = computed(() => { |
|
|
</div> |
|
|
</div> |
|
|
</section> |
|
|
</section> |
|
|
<!-- banner end --> |
|
|
<!-- banner end --> |
|
|
|
|
|
|
|
|
<!-- about-feature start --> |
|
|
|
|
|
<section class="about-feature bg-orange"> |
|
|
|
|
|
<div class="container"> |
|
|
|
|
|
<div class="row"> |
|
|
|
|
|
<div class=" col-sm-12 col-md-12 col-lg-6 img-sec wow fadeInLeft" data-wow-duration="1s" data-wow-delay=".5s"> |
|
|
|
|
|
<div class="about_img margin_aboutimg"> |
|
|
|
|
|
<img :src="`https://api.drawise.net${images[0].image}`" alt="about"> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="col-sm-12 col-md-12 col-lg-6"> |
|
|
|
|
|
<div v-html="unescapedPageContent"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</section> |
|
|
|
|
|
<!-- about-feature ends --> |
|
|
|
|
|
|
|
|
|
|
|
<!--Footer Start--> |
|
|
<!--Footer Start--> |
|
|
<footer class="footer-sec bg-blue text-center"> |
|
|
<footer class="footer-sec bg-blue text-center"> |
|
|
<div class="container"> |
|
|
<div class="container"> |
|
|