diff --git a/.gitignore b/.gitignore index cb2f86bb..88734784 100755 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ key.pem _ALL_SITES/kolibrilab.it/.env.development _ALL_SITES/kolibrilab.it/.env.test _ALL_SITES/arcadei.it/.env.development +public/upload/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 7bd66e6d..125ca0db 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -19,6 +19,12 @@ "request": "launch", "type": "node-terminal" }, + { + "command": "npm run spanorefresh", + "name": "SPA no Refresh", + "request": "launch", + "type": "node-terminal" + }, { "type": "node", "request": "launch", diff --git a/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.scss b/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.scss deleted file mode 100755 index 0e32f575..00000000 --- a/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.scss +++ /dev/null @@ -1,452 +0,0 @@ - -.testo-banda { - //background: -webkit-gradient(linear, left top, left bottom, from(#3144f0), to(transparent)); - //background: linear-gradient(180deg, #3144f0, transparent); - //background: rgba(0, 0, 0, .6) -} - -$grayshadow: #555; - -$textcol: blue; -$textcol_scuro: darkblue; - -p { - margin: 0 0 1.25rem; - //text-shadow: .125rem .125rem .25rem $grayshadow; -} - -h4 { - font-size: 1.25rem; -} - -.mycard { - visibility: hidden; -} - -.landing { -} - -.landing_background { - background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed; - background-size: cover -} - -.landing > section { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - //padding: 0 16px -} - -.intro { - display: flex; - justify-content: space-between; - align-items: stretch; - /* flex-flow: row nowrap; */ - - padding: 1.25rem 0 1.25rem 0; - margin: .125rem; - - * { - width: 100%; - flex: 1; - margin-left: auto; - margin-right: auto; - } - - &__associazione { - min-width: 350px; - } - - &__comeassociarsi { - min-width: 350px; - } -} - -.subtitle { - font-weight: 600; - text-align: center; - letter-spacing: 0.125rem; - text-transform: uppercase; - font-size: 1rem; -} - -.landing > section.padding { - padding: 5.62rem 1rem; -} - -.landing > section.padding_testo { - padding-top: 1.25rem; - padding-bottom: 1rem; -} - -.landing > section.padding_gallery { - padding-top: 3.125rem; - padding-bottom: 5.625rem; -} - -.landing > section > div { - position: relative; - width: 100% -} - -.maxwidth1200 { - max-width: 1200px; -} - -.landing__toolbar { - background: -webkit-gradient(linear, left top, left bottom, from(#000), to(transparent)); - background: linear-gradient(180deg, #000, transparent); - padding: 0 !important -} - -.landing__toolbar .q-btn { - border-radius: 0 0 .315rem .315rem; - -ms-flex-item-align: stretch; - align-self: stretch -} - -.landing__hero { - min-height: 50vh -} - -.landing__header { - height: 18vh -} - -.landing__arrow { - bottom: 1.5rem; - opacity: .4 -} - -.landing__front { - background: -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(15%, rgba(0, 0, 0, .6))); - background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6) 15%) -} - -.landing__logo { - width: 9.40rem; - height: 9.40rem; - margin-top: 1.315rem; - //-webkit-animation: logo-rotate 240s linear infinite; - //animation: logo-rotate 240s linear infinite -} - -.landing__features .q-icon { - font-size: 4rem -} - -h4 { - line-height: 1.5; - text-shadow: .25rem .25rem .5rem $grayshadow; -} - -.landing__features h4, .landing__features h6 { - margin: 1rem 0 -} - -.landing__features p { - opacity: .7; - font-size: 1rem; - line-height: 1.5; -} - -.landing__footer { - //background: -webkit-gradient(linear, left top, left bottom, color-stop(65%, rgba(0, 0, 0, .1)), to(#000)); - background: linear-gradient(180deg, rgba(0, 0, 0, .8) 95%, #FFF); - padding-top: 4.5rem !important; - padding-bottom: 4.5rem !important; - padding-left: 1.25rem; - padding-right: 1.25rem; - color: #9f9f9f; -} - -.icon_contact:hover { - color: blue; - border-color: white; - border-width: .0625rem; -} - -.landing__footer .doc-link { - color: $textcol; -} - -.landing__footer .doc-link:hover { - opacity: .8 -} - -.landing__swirl-bg { - background-repeat: no-repeat !important; - background-position: top; - background-size: contain !important; - background-image: url(../../../public/images/landing_first_section.png) !important -} - -.feat-descr { - font-size: 1.15rem; -} - -.feat-descr:hover { - transition: opacity 0.5s ease-in-out; - opacity: 0.9; -} - -.q-col-gutter-sm { - padding: 3.125rem 3.125rem; - //margin-left: -48px -} - -body.mobile .landing { - //background: unset -} - -body.mobile .landing:before { - content: ""; - position: fixed; - top: 0; - height: 100vh; - left: 0; - right: 0; - bottom: 0; - z-index: -1; - //background: #000 url(../../public/images/cover.jpg) 50%; - - background-size: cover -} - -/* -@-webkit-keyframes logo-rotate { - to { - -webkit-transform: rotate(-1turn); - transform: rotate(-1turn) - } -} - -@keyframes logo-rotate { - to { - -webkit-transform: rotate(-1turn); - transform: rotate(-1turn) - } -} -*/ - -.home { - //background-color: rgb(250, 250, 250); - padding: 3.125rem; - display: flex; - //flex-wrap: nowrap; - flex-direction: column; - align-items: center; - justify-content: space-between; -} - -.btn-start { - margin: 3.125rem; -} - -.shadow { - //color: white; - text-shadow: 0.125rem 0.125rem 0.25rem $grayshadow; -} - -.text-h1, h1 { - font-size: 3rem; - font-weight: bold; - line-height: 3rem; - letter-spacing: -.01562em; - margin-bottom: 8px !important; -} - -.text-h2 { - font-size: 3.75rem; - font-weight: 300; - line-height: 3.75rem; - letter-spacing: -.00833em; -} - -.text-weight-bold { - font-weight: 700; -} - -.text-vers { - font-size: 0.75rem; - font-weight: 400; - line-height: 1.75rem; - letter-spacing: .00937em; - text-shadow: .25rem .25rem .5rem $grayshadow; -} - -.homep-cover-img-1 { - background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed; - //transition: background-image 1s ease-in-out; -} - -.homep-cover-img-2 { - background: #000 url(../../../public/images/foto2.jpg) no-repeat 50% fixed; - //transition: background-image 1s ease-in-out; -} - -.homep-cover-img-3 { - background: #000 url(../../../public/images/foto3.jpg) no-repeat 50% fixed; - //transition: background-image 1s ease-in-out; -} - -.homep-cover-img.hide-filter:before { - opacity: 0 -} - -.landing__footer-icons { - font-size: 1.75rem -} - -.landing__footer-icons a { - margin: 0 .5rem .5rem; - text-decoration: none; - outline: 0; - color: $textcol; - transition: color .28s -} - -.landing__footer-icons a:hover { - color: $textcol_scuro; -} - -.doc-img { - max-width: 100%; -} - -.mylist { - background: #3fdaff; - padding-left: 1.25rem; -} - -.clgutter { - margin-top: 1.25rem; - padding: .62rem; -} - -.carousel_img_3 { - //background-image: url(../../public/images/cibo_sano.jpg); - background-size: cover !important; - background-position: 50% center !important; - background-repeat: no-repeat !important; -} - -@media (max-width: 718px) { - // PER VERSIONE MOBILE - - .landing__hero { - text-align: center - } - .landing__header { - height: 7vh - } - .clgutter { - margin-top: 0; - padding: 0; - } - .landing__hero .text-h1, h1 { - font-size: 2rem; - line-height: 2.05rem; - margin-bottom: 1.25rem - } - - .landing > section.padding { - padding: 2.5rem 1rem; - } - - .landing > section.padding_testo { - padding-top: 1.25rem; - padding-bottom: 1rem; - } - - .landing > section.padding_gallery { - padding-top: 3.125rem; - padding-bottom: 5.625rem; - - max-width: 800px; - } - - .landing > section.padding_gallery > div { - padding-top: 3.125rem; - padding-bottom: 5.625rem; - - } - - .landing__features h4, .landing__features h6 { - margin: 1.25rem 0 - } - - h4 { - line-height: 1.4; - text-shadow: 0.25rem 0.25rem 0.5rem $grayshadow; - } - - .landing .feature-item { - text-align: center; - margin-top: 1.25rem; - } - .landing__hero-content { - padding-bottom: 11.25rem; - } - .landing__hero2-content { - padding-bottom: 7.25rem; - } - .landing__hero-btns { - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center - } - - .q-col-gutter-sm { - padding: .625rem .315rem; - } - - .text-subtitle1 { - font-size: 1.25rem; - } - .text-vers { - font-size: 0.6rem; - } - - .carousel_img_3 { - //background-image: url(../../public/images/cibo_sano.jpg); - background-size: 620px 620px !important; - background-position: 50% top !important; - background-repeat: no-repeat !important; - } - -} - -.custom-caption { - text-align: center; - padding: .75rem; - color: $textcol; - background-color: rgba(0, 0, 0, .3); -} - -.sfondo-grigio { - padding: 1rem; - color: $textcol; - background-color: rgba(0, 0, 0, .35); -} - -.mycontacts { - color: gray; - letter-spacing: 0.078rem; -} - -.mycontacts_title { - text-shadow: 0.125rem 0.125rem 0.125rem #555; - font-weight: bold; - color: #999; - letter-spacing: 0.125rem; -} - -.mycontacts_text { - color: #999; - letter-spacing: 0.093rem; -} diff --git a/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.ts b/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.ts deleted file mode 100755 index dac61fb1..00000000 --- a/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { defineComponent, ref, onMounted, watch, computed } from 'vue' - -import { useGlobalStore } from '@store/globalStore' -import { useRoute } from 'vue-router' -import { useUserStore } from '@store/UserStore' - -import { Logo } from '@/components/logo' - -import { LandingFooter } from '@/components/LandingFooter' -import { CMyPage } from '@/components/CMyPage/index' - -import { tools } from '@src/store/Modules/tools' -import { static_data } from '@src/db/static_data' -import { toolsext } from '@src/store/Modules/toolsext' -import { Screen } from 'quasar' -import { CCardCarousel, CEventsCalendar, CMyElem, COpenStreetMap } from '@components' -import MixinBase from '@src/mixins/mixin-base' -import { firstimagehome } from '@src/db/static_data' -import MixinMetaTags from '@/mixins/mixin-metatags' - -export default defineComponent({ - name: 'home_kolibrilab', - components: { Logo, LandingFooter, CMyPage, CMyElem }, - - setup() { - const userStore = useUserStore() - const globalStore = useGlobalStore() - - const { setValDb, getValDb } = MixinBase() - - function getheightgallery() { - if (tools.isMobile()) - return '400px' - else - return '600px' - } - - function created() { - // - } - - created() - - return { - tools, - toolsext, - static_data, - getheightgallery, - getValDb, - globalStore, - } - }, -}) - diff --git a/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.vue b/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.vue deleted file mode 100755 index 8a1ca328..00000000 --- a/_ALL_SITES/kolibrilab.it/root_spec/home_kolibrilab/home_kolibrilab.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/_ALL_SITES/riso.app/root_spec/home_kolibrilab/home_kolibrilab.scss b/_ALL_SITES/riso.app/root_spec/home_kolibrilab/home_kolibrilab.scss deleted file mode 100755 index e69de29b..00000000 diff --git a/_ALL_SITES/riso.app/root_spec/home_kolibrilab/home_kolibrilab.ts b/_ALL_SITES/riso.app/root_spec/home_kolibrilab/home_kolibrilab.ts deleted file mode 100755 index dac61fb1..00000000 --- a/_ALL_SITES/riso.app/root_spec/home_kolibrilab/home_kolibrilab.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { defineComponent, ref, onMounted, watch, computed } from 'vue' - -import { useGlobalStore } from '@store/globalStore' -import { useRoute } from 'vue-router' -import { useUserStore } from '@store/UserStore' - -import { Logo } from '@/components/logo' - -import { LandingFooter } from '@/components/LandingFooter' -import { CMyPage } from '@/components/CMyPage/index' - -import { tools } from '@src/store/Modules/tools' -import { static_data } from '@src/db/static_data' -import { toolsext } from '@src/store/Modules/toolsext' -import { Screen } from 'quasar' -import { CCardCarousel, CEventsCalendar, CMyElem, COpenStreetMap } from '@components' -import MixinBase from '@src/mixins/mixin-base' -import { firstimagehome } from '@src/db/static_data' -import MixinMetaTags from '@/mixins/mixin-metatags' - -export default defineComponent({ - name: 'home_kolibrilab', - components: { Logo, LandingFooter, CMyPage, CMyElem }, - - setup() { - const userStore = useUserStore() - const globalStore = useGlobalStore() - - const { setValDb, getValDb } = MixinBase() - - function getheightgallery() { - if (tools.isMobile()) - return '400px' - else - return '600px' - } - - function created() { - // - } - - created() - - return { - tools, - toolsext, - static_data, - getheightgallery, - getValDb, - globalStore, - } - }, -}) - diff --git a/_ALL_SITES/riso.app/root_spec/home_kolibrilab/home_kolibrilab.vue b/_ALL_SITES/riso.app/root_spec/home_kolibrilab/home_kolibrilab.vue deleted file mode 100755 index 4719110b..00000000 --- a/_ALL_SITES/riso.app/root_spec/home_kolibrilab/home_kolibrilab.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/package.json b/package.json index 77d235cc..40d72855 100755 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "fix": "eslint --ext .ts,.vue --ignore-path .gitignore ./ --fix > file.out.txt", "pwa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev -m pwa", "spa": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev -m spa", + "spanorefresh": "NODE_ENV=development NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev -m spa", "test": "echo \"No test specified\" && exit 0", "generate-sw": "workbox generateSW workbox-config.js" }, diff --git a/public/js/storage.js b/public/js/storage.js index 01c2051a..1900f2d5 100755 --- a/public/js/storage.js +++ b/public/js/storage.js @@ -105,7 +105,7 @@ let idbKeyval = (() => { }); return req.result; }, - async set(key, value) { + set(key, value) { let req; /*await withStore('readwrite', 'keyval', store => { req = store.put(value, key); diff --git a/quasar.conf.js b/quasar.conf.js index 4d4cffd4..b0950da4 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -149,6 +149,7 @@ module.exports = configure((ctx) => ({ https: false, port: 8090, open: false, // opens browser window automatically + // vueDevtools: true, }, // https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 4c547bab..4f1b964b 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -1206,7 +1206,7 @@ export const shared_consts = { }, { value: 35, - label: 'Immagine da Caricare', + label: 'Img da Caricare', }, { value: 40, diff --git a/src/components/CMyEditElem/CMyEditElem.ts b/src/components/CMyEditElem/CMyEditElem.ts index 82dbed2a..6b165245 100755 --- a/src/components/CMyEditElem/CMyEditElem.ts +++ b/src/components/CMyEditElem/CMyEditElem.ts @@ -2,7 +2,7 @@ import { defineComponent, onMounted, PropType, ref, toRef, watch, } from 'vue' -import { ILabelValue, IMyElem, IMyPage, IOperators } from '@src/model' +import { IImgGallery, ILabelValue, IMyCard, IMyElem, IMyPage, IOperators } from '@src/model' import { useGlobalStore } from '@store/globalStore' import { CImgTitle } from '../CImgTitle/index' @@ -26,13 +26,15 @@ import { useQuasar } from 'quasar' import { useI18n } from '@/boot/i18n' import { emitKeypressEvents } from 'readline' import { costanti } from '@costanti' - +import objectId from '@src/js/objectId' export default defineComponent({ name: 'CMyEditElem', - components: { CImgTitle, CTitle, LandingFooter, CEventsCalendar, + components: { + CImgTitle, CTitle, LandingFooter, CEventsCalendar, CCardCarousel, COpenStreetMap, CMyPage, CMyPageIntro, CMyEditor, CMyFieldRec, - CSelectColor, CSelectFontSize }, + CSelectColor, CSelectFontSize + }, emits: ['saveElem'], props: { myelem: { @@ -74,7 +76,7 @@ export default defineComponent({ const elemChanged = ref(false) const enableAdd = ref(true) - const neworder = ref(0) + const neworder = ref(0) const myel = toRef(props, 'myelem') const newtype = ref('') @@ -87,13 +89,6 @@ export default defineComponent({ return globalStore.disciplines.filter((rec: any) => rec.showinhome) } - function getheightgallery() { - if (tools.isMobile()) - return '400px' - else - return '600px' - } - function saveElem(exit?: boolean) { // Save Elem record const myelem = props.myelem @@ -165,7 +160,7 @@ export default defineComponent({ } - function modifElem(value: any) { + function modifElem() { disableSave.value = false elemChanged.value = true } @@ -174,7 +169,7 @@ export default defineComponent({ neworder.value = props.myelem.order arrPages.value = [] - arrPages.value.push({label: '[Vuoto]', path: ''}) + arrPages.value.push({ label: '[Vuoto]', path: '' }) for (const page of globalStore.mypage) { const rec = { @@ -198,8 +193,9 @@ export default defineComponent({ function addNewCard() { if (!myel.value.listcards) myel.value.listcards = [] - myel.value.listcards.push({ imagefile: '', alt: '', description: '' }) - modifElem(true) + + myel.value.listcards.push({ _id: objectId(), imagefile: '', alt: '', description: '' }) + modifElem() } function getClass() { @@ -222,13 +218,37 @@ export default defineComponent({ return false } + function delRecCard(idcard: string, myel: IMyElem) { + // + if (myel.listcards) + myel.listcards = myel.listcards.filter((card: IMyCard) => card._id !== idcard) + + } + + function saveCard(recpass: IMyCard, myval: any) { + if (props.myelem.type === shared_consts.ELEMTYPE.CARD) { + if (props.myelem.listcards) { + props.myelem.listcards.forEach((rec: IMyCard) => { + if (recpass._id === rec._id) { + rec.imagefile = myval + } + }) + } + } + modifElem() + } + + function updateElem(myvalue: any) { + myel.value = myvalue + modifElem() + } + onMounted(mounted) return { tools, shared_consts, getArrDisciplines, - getheightgallery, slide, slide2, animare, @@ -253,6 +273,9 @@ export default defineComponent({ addNewCard, arrPages, costanti, + delRecCard, + saveCard, + updateElem, } }, diff --git a/src/components/CMyEditElem/CMyEditElem.vue b/src/components/CMyEditElem/CMyEditElem.vue index 68719b10..bb40a9ca 100755 --- a/src/components/CMyEditElem/CMyEditElem.vue +++ b/src/components/CMyEditElem/CMyEditElem.vue @@ -7,14 +7,9 @@ (!myel.active ? ` clEditNotActive` : ``) " > - + - + + + + + + + + + + ({{ getnumimages() }}) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ mygallery.description }} + + + + + + {{ mygallery.imagefile }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Minimize + + + Maximize + + + Close + + + + + {{ title }} + + + + + + + + + + + + Foto {{ index + 1 }} + + + + + + + + + + {{ mygallery.description }} + + + + + + {{ mygallery.imagefile }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/CSelectImage/index.ts b/src/components/CSelectImage/index.ts new file mode 100755 index 00000000..41cc2a24 --- /dev/null +++ b/src/components/CSelectImage/index.ts @@ -0,0 +1 @@ +export {default as CSelectImage} from './CSelectImage.vue' diff --git a/src/components/CStatusReg/CStatusReg.vue b/src/components/CStatusReg/CStatusReg.vue index 833c3ab8..ca40e43a 100755 --- a/src/components/CStatusReg/CStatusReg.vue +++ b/src/components/CStatusReg/CStatusReg.vue @@ -63,7 +63,7 @@ field="username" :canEdit="false" :canModify="false" - :type="costanti.FieldType.username_chip"> + :fieldtype="costanti.FieldType.username_chip"> diff --git a/src/components/index.ts b/src/components/index.ts index 23a620ca..06a55e8c 100755 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -15,6 +15,7 @@ export * from './CMyAvatar' export * from './CMyCart' export * from './CMyFieldDb' export * from './CMyFieldRec' +export * from './CSelectImage' export * from './CMyPage' export * from './CMyPageElem' export * from './CMyPageIntro' diff --git a/src/css/app.scss b/src/css/app.scss index 27bfa9ee..0eaaefec 100755 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -295,7 +295,7 @@ $heightBtn: 100%; max-width: 400px; min-width: 250px; } - box-shadow: none; + // box-shadow: none; } .my-card-withshadow { diff --git a/src/db/static_data.ts b/src/db/static_data.ts index f3eafda1..8ea7c19e 100755 --- a/src/db/static_data.ts +++ b/src/db/static_data.ts @@ -10,8 +10,8 @@ const functionality: IFunctionality = { PWA: false, SHOW_USER_MENU: true, // Cambiare con true SHOW_PROFILE: true, - SHOW_REG_BUTTON: true, - ENABLE_REGISTRATION: true, + SHOW_REG_BUTTON: false, + ENABLE_REGISTRATION: false, ENABLE_REG_BY_BOT: false, ENABLE_REG_NEED_TELEGRAM: false, SHOW_NEWSLETTER: false, @@ -30,7 +30,7 @@ const functionality: IFunctionality = { SHOW_COMPETENZE: false, ENABLE_VIEW_GROUPS: false, ENABLE_VIEW_USERS: false, - ENABLE_VIEW_PROFILE: true, + ENABLE_VIEW_PROFILE: false, } // const SHOW_PROJINTHEMENU = false @@ -490,7 +490,7 @@ const baseroutes: IListRoutes[] = [ path: '/', materialIcon: 'home', name: 'pages.home', - component: () => import('@src/root_spec/home_kolibrilab/home_kolibrilab.vue'), + component: () => import('@src/root/home/home.vue'), reqauth: false, inmenu: true, infooter: true, diff --git a/src/js/storage.js b/src/js/storage.js index 718ec8fe..582a8371 100755 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -80,7 +80,7 @@ export let idbKeyval = (() => { let req; await withStore('readonly', table, store => { req = store.getAll(); - console.log(' req', req) + // console.log(' req', req) }); if (req) { return req.result; diff --git a/src/mixins/mixin-metatags.ts b/src/mixins/mixin-metatags.ts index 75239c88..0b56862d 100755 --- a/src/mixins/mixin-metatags.ts +++ b/src/mixins/mixin-metatags.ts @@ -6,23 +6,36 @@ import { tools } from '@store/Modules/tools' import { useQuasar } from 'quasar' import { useMeta } from 'quasar' - // You can declare a mixin as the same style as components. export default function () { function setmeta(mym: IMetaTags) { + // cancellarlo... + return true + } + + function getMeta(mym: IMetaTags, t: any) { //++Todo META TAGS! - /* - useMeta(() => { - return { - title: mym.title, - description: mym.description, - keywords: mym.keywords, - } - }) + if (!mym || !mym.title) + return + + return { + title: t('ws.sitename'), + titleTemplate: (title: any) => `${tools.getsuffisso()} ${mym.title} - ${t('ws.sitename')}`, + meta: { + keywords: { + name: 'keywords', + content: mym.keywords, + }, + description: { + name: 'description', + content: mym.description, + }, + equiv: { 'http-equiv': 'Content-Type', 'content': 'text/html; charset=UTF-8' }, + }, + } - */ } function getsrcbyimg(myimg: string) { @@ -35,5 +48,6 @@ export default function () { return { setmeta, getsrcbyimg, + getMeta, } } diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts index b694255c..7fdcf529 100755 --- a/src/model/GlobalStore.ts +++ b/src/model/GlobalStore.ts @@ -141,6 +141,7 @@ export interface IMyElem { class?: string image?: string class2?: string + class3?: string styleadd?: string list?: IImgGallery[] listcards?: IMyCard[] @@ -210,6 +211,8 @@ export interface ISites { telegram_support_chat?: string pathreg_add?: string confsite: IOption + description?: string + keywords?: string } export interface INewsToSent { @@ -357,6 +360,8 @@ export interface IGlobalState { datastat?: INotData site?: ISites, mygroups: IMyGroup[], + selElem?: IMyElem, + editOn?: boolean, } export interface IMenuList { @@ -492,9 +497,11 @@ export interface IImgGallery { } export interface IMyCard { + _id?: string imagefile?: string alt?: string description?: string + style?: string size?: string color?: string content?: string diff --git a/src/root/home/home.ts b/src/root/home/home.ts index d652a4a9..d7bd6744 100755 --- a/src/root/home/home.ts +++ b/src/root/home/home.ts @@ -1,21 +1,54 @@ +import { defineComponent, ref, onMounted, watch, computed } from 'vue' -import { - defineComponent, ref, computed, -} from 'vue' +import { useGlobalStore } from '@store/globalStore' +import { useRoute } from 'vue-router' +import { useUserStore } from '@store/UserStore' import { tools } from '@src/store/Modules/tools' -import { CSkill } from '@/components/CSkill' -import { CChartMap } from '@src/components/CChartMap' -import { CMapsEsempio } from '@src/components/CMapsEsempio' +import { static_data } from '@src/db/static_data' +import { toolsext } from '@src/store/Modules/toolsext' +import { CMyPageElem } from '@components' +import MixinBase from '@src/mixins/mixin-base' +import MixinMetaTags from '@/mixins/mixin-metatags' +import { useMeta } from 'quasar' +import { useI18n } from '@src/boot/i18n' export default defineComponent({ name: 'Home', - components: { CSkill, CChartMap, CMapsEsempio }, + components: { CMyPageElem }, setup() { + const userStore = useUserStore() + const globalStore = useGlobalStore() + const { t } = useI18n() + + const isfinishLoading = computed(() => globalStore.finishLoading) + + const { getMeta } = MixinMetaTags() + + const { setValDb, getValDb } = MixinBase() + + function inizia() { + if (globalStore.site) { + useMeta(getMeta({ + title: globalStore.site.name, + description: globalStore.site.description, + keywords: globalStore.site.keywords, + }, t)) + } + } + + inizia() + return { tools, + toolsext, + static_data, + getValDb, + globalStore, + isfinishLoading, } + }, }) diff --git a/src/root/home/home.vue b/src/root/home/home.vue index a385e5b8..fd2a8489 100755 --- a/src/root/home/home.vue +++ b/src/root/home/home.vue @@ -1,23 +1,9 @@ - - Inizio: - - - - - - - - - - + + + + diff --git a/src/root/mypage/mypage.ts b/src/root/mypage/mypage.ts index 9c9f2cd2..d361193e 100755 --- a/src/root/mypage/mypage.ts +++ b/src/root/mypage/mypage.ts @@ -19,14 +19,14 @@ export default defineComponent({ const { setmeta } = MixinMetaTags() async function created() { - rec.value = await globalStore.loadPage(route.path) + rec.value = await globalStore.loadPage(route.path, 'mypage.ts') // console.log('MyPage created', rec.value) // console.log('mounted', this.rec) } watch(path, async (to: string, from: string) => { - // console.log('watch path', path) + console.log('watch path', to, from) rec.value = await globalStore.loadPage(to) // console.log('path change', rec.value) }) diff --git a/src/root_spec/home_kolibrilab/home_kolibrilab.scss b/src/root_spec/home_kolibrilab/home_kolibrilab.scss deleted file mode 100755 index 0e32f575..00000000 --- a/src/root_spec/home_kolibrilab/home_kolibrilab.scss +++ /dev/null @@ -1,452 +0,0 @@ - -.testo-banda { - //background: -webkit-gradient(linear, left top, left bottom, from(#3144f0), to(transparent)); - //background: linear-gradient(180deg, #3144f0, transparent); - //background: rgba(0, 0, 0, .6) -} - -$grayshadow: #555; - -$textcol: blue; -$textcol_scuro: darkblue; - -p { - margin: 0 0 1.25rem; - //text-shadow: .125rem .125rem .25rem $grayshadow; -} - -h4 { - font-size: 1.25rem; -} - -.mycard { - visibility: hidden; -} - -.landing { -} - -.landing_background { - background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed; - background-size: cover -} - -.landing > section { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - //padding: 0 16px -} - -.intro { - display: flex; - justify-content: space-between; - align-items: stretch; - /* flex-flow: row nowrap; */ - - padding: 1.25rem 0 1.25rem 0; - margin: .125rem; - - * { - width: 100%; - flex: 1; - margin-left: auto; - margin-right: auto; - } - - &__associazione { - min-width: 350px; - } - - &__comeassociarsi { - min-width: 350px; - } -} - -.subtitle { - font-weight: 600; - text-align: center; - letter-spacing: 0.125rem; - text-transform: uppercase; - font-size: 1rem; -} - -.landing > section.padding { - padding: 5.62rem 1rem; -} - -.landing > section.padding_testo { - padding-top: 1.25rem; - padding-bottom: 1rem; -} - -.landing > section.padding_gallery { - padding-top: 3.125rem; - padding-bottom: 5.625rem; -} - -.landing > section > div { - position: relative; - width: 100% -} - -.maxwidth1200 { - max-width: 1200px; -} - -.landing__toolbar { - background: -webkit-gradient(linear, left top, left bottom, from(#000), to(transparent)); - background: linear-gradient(180deg, #000, transparent); - padding: 0 !important -} - -.landing__toolbar .q-btn { - border-radius: 0 0 .315rem .315rem; - -ms-flex-item-align: stretch; - align-self: stretch -} - -.landing__hero { - min-height: 50vh -} - -.landing__header { - height: 18vh -} - -.landing__arrow { - bottom: 1.5rem; - opacity: .4 -} - -.landing__front { - background: -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(15%, rgba(0, 0, 0, .6))); - background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6) 15%) -} - -.landing__logo { - width: 9.40rem; - height: 9.40rem; - margin-top: 1.315rem; - //-webkit-animation: logo-rotate 240s linear infinite; - //animation: logo-rotate 240s linear infinite -} - -.landing__features .q-icon { - font-size: 4rem -} - -h4 { - line-height: 1.5; - text-shadow: .25rem .25rem .5rem $grayshadow; -} - -.landing__features h4, .landing__features h6 { - margin: 1rem 0 -} - -.landing__features p { - opacity: .7; - font-size: 1rem; - line-height: 1.5; -} - -.landing__footer { - //background: -webkit-gradient(linear, left top, left bottom, color-stop(65%, rgba(0, 0, 0, .1)), to(#000)); - background: linear-gradient(180deg, rgba(0, 0, 0, .8) 95%, #FFF); - padding-top: 4.5rem !important; - padding-bottom: 4.5rem !important; - padding-left: 1.25rem; - padding-right: 1.25rem; - color: #9f9f9f; -} - -.icon_contact:hover { - color: blue; - border-color: white; - border-width: .0625rem; -} - -.landing__footer .doc-link { - color: $textcol; -} - -.landing__footer .doc-link:hover { - opacity: .8 -} - -.landing__swirl-bg { - background-repeat: no-repeat !important; - background-position: top; - background-size: contain !important; - background-image: url(../../../public/images/landing_first_section.png) !important -} - -.feat-descr { - font-size: 1.15rem; -} - -.feat-descr:hover { - transition: opacity 0.5s ease-in-out; - opacity: 0.9; -} - -.q-col-gutter-sm { - padding: 3.125rem 3.125rem; - //margin-left: -48px -} - -body.mobile .landing { - //background: unset -} - -body.mobile .landing:before { - content: ""; - position: fixed; - top: 0; - height: 100vh; - left: 0; - right: 0; - bottom: 0; - z-index: -1; - //background: #000 url(../../public/images/cover.jpg) 50%; - - background-size: cover -} - -/* -@-webkit-keyframes logo-rotate { - to { - -webkit-transform: rotate(-1turn); - transform: rotate(-1turn) - } -} - -@keyframes logo-rotate { - to { - -webkit-transform: rotate(-1turn); - transform: rotate(-1turn) - } -} -*/ - -.home { - //background-color: rgb(250, 250, 250); - padding: 3.125rem; - display: flex; - //flex-wrap: nowrap; - flex-direction: column; - align-items: center; - justify-content: space-between; -} - -.btn-start { - margin: 3.125rem; -} - -.shadow { - //color: white; - text-shadow: 0.125rem 0.125rem 0.25rem $grayshadow; -} - -.text-h1, h1 { - font-size: 3rem; - font-weight: bold; - line-height: 3rem; - letter-spacing: -.01562em; - margin-bottom: 8px !important; -} - -.text-h2 { - font-size: 3.75rem; - font-weight: 300; - line-height: 3.75rem; - letter-spacing: -.00833em; -} - -.text-weight-bold { - font-weight: 700; -} - -.text-vers { - font-size: 0.75rem; - font-weight: 400; - line-height: 1.75rem; - letter-spacing: .00937em; - text-shadow: .25rem .25rem .5rem $grayshadow; -} - -.homep-cover-img-1 { - background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed; - //transition: background-image 1s ease-in-out; -} - -.homep-cover-img-2 { - background: #000 url(../../../public/images/foto2.jpg) no-repeat 50% fixed; - //transition: background-image 1s ease-in-out; -} - -.homep-cover-img-3 { - background: #000 url(../../../public/images/foto3.jpg) no-repeat 50% fixed; - //transition: background-image 1s ease-in-out; -} - -.homep-cover-img.hide-filter:before { - opacity: 0 -} - -.landing__footer-icons { - font-size: 1.75rem -} - -.landing__footer-icons a { - margin: 0 .5rem .5rem; - text-decoration: none; - outline: 0; - color: $textcol; - transition: color .28s -} - -.landing__footer-icons a:hover { - color: $textcol_scuro; -} - -.doc-img { - max-width: 100%; -} - -.mylist { - background: #3fdaff; - padding-left: 1.25rem; -} - -.clgutter { - margin-top: 1.25rem; - padding: .62rem; -} - -.carousel_img_3 { - //background-image: url(../../public/images/cibo_sano.jpg); - background-size: cover !important; - background-position: 50% center !important; - background-repeat: no-repeat !important; -} - -@media (max-width: 718px) { - // PER VERSIONE MOBILE - - .landing__hero { - text-align: center - } - .landing__header { - height: 7vh - } - .clgutter { - margin-top: 0; - padding: 0; - } - .landing__hero .text-h1, h1 { - font-size: 2rem; - line-height: 2.05rem; - margin-bottom: 1.25rem - } - - .landing > section.padding { - padding: 2.5rem 1rem; - } - - .landing > section.padding_testo { - padding-top: 1.25rem; - padding-bottom: 1rem; - } - - .landing > section.padding_gallery { - padding-top: 3.125rem; - padding-bottom: 5.625rem; - - max-width: 800px; - } - - .landing > section.padding_gallery > div { - padding-top: 3.125rem; - padding-bottom: 5.625rem; - - } - - .landing__features h4, .landing__features h6 { - margin: 1.25rem 0 - } - - h4 { - line-height: 1.4; - text-shadow: 0.25rem 0.25rem 0.5rem $grayshadow; - } - - .landing .feature-item { - text-align: center; - margin-top: 1.25rem; - } - .landing__hero-content { - padding-bottom: 11.25rem; - } - .landing__hero2-content { - padding-bottom: 7.25rem; - } - .landing__hero-btns { - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center - } - - .q-col-gutter-sm { - padding: .625rem .315rem; - } - - .text-subtitle1 { - font-size: 1.25rem; - } - .text-vers { - font-size: 0.6rem; - } - - .carousel_img_3 { - //background-image: url(../../public/images/cibo_sano.jpg); - background-size: 620px 620px !important; - background-position: 50% top !important; - background-repeat: no-repeat !important; - } - -} - -.custom-caption { - text-align: center; - padding: .75rem; - color: $textcol; - background-color: rgba(0, 0, 0, .3); -} - -.sfondo-grigio { - padding: 1rem; - color: $textcol; - background-color: rgba(0, 0, 0, .35); -} - -.mycontacts { - color: gray; - letter-spacing: 0.078rem; -} - -.mycontacts_title { - text-shadow: 0.125rem 0.125rem 0.125rem #555; - font-weight: bold; - color: #999; - letter-spacing: 0.125rem; -} - -.mycontacts_text { - color: #999; - letter-spacing: 0.093rem; -} diff --git a/src/root_spec/home_kolibrilab/home_kolibrilab.ts b/src/root_spec/home_kolibrilab/home_kolibrilab.ts deleted file mode 100755 index 093425b3..00000000 --- a/src/root_spec/home_kolibrilab/home_kolibrilab.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { defineComponent, ref, onMounted, watch, computed } from 'vue' - -import { useGlobalStore } from '@store/globalStore' -import { useRoute } from 'vue-router' -import { useUserStore } from '@store/UserStore' - -import { Logo } from '@/components/logo' - -import { LandingFooter } from '@/components/LandingFooter' -import { CMyPageElem } from '@/components/CMyPageElem/index' - -import { tools } from '@src/store/Modules/tools' -import { static_data } from '@src/db/static_data' -import { toolsext } from '@src/store/Modules/toolsext' -import { Screen } from 'quasar' -import { CCardCarousel, CEventsCalendar, CMyElem, COpenStreetMap } from '@components' -import MixinBase from '@src/mixins/mixin-base' -import { firstimagehome } from '@src/db/static_data' -import MixinMetaTags from '@/mixins/mixin-metatags' - -export default defineComponent({ - name: 'home_kolibrilab', - components: { Logo, LandingFooter, CMyPageElem, CMyElem }, - - setup() { - const userStore = useUserStore() - const globalStore = useGlobalStore() - - const { setmeta } = MixinMetaTags() - - const { setValDb, getValDb } = MixinBase() - - function getheightgallery() { - if (tools.isMobile()) - return '400px' - else - return '600px' - } - - function created() { - // - } - - created() - - return { - tools, - toolsext, - static_data, - getheightgallery, - getValDb, - globalStore, - setmeta, - } - }, -}) - diff --git a/src/root_spec/home_kolibrilab/home_kolibrilab.vue b/src/root_spec/home_kolibrilab/home_kolibrilab.vue deleted file mode 100755 index e7fbefcd..00000000 --- a/src/root_spec/home_kolibrilab/home_kolibrilab.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - {{ - setmeta({ - title: '', - description: '', - keywords: '', - }) - }} - - - - - - - - diff --git a/src/rootgen/admin/confsite/confsite.vue b/src/rootgen/admin/confsite/confsite.vue index fdd8efc7..e8511311 100755 --- a/src/rootgen/admin/confsite/confsite.vue +++ b/src/rootgen/admin/confsite/confsite.vue @@ -1,17 +1,89 @@ - - + - - {{mysite.name}} + style="text-align: center" + > + {{ mysite.name }} + + + + + + + + + + + + + + + + + + + + + - + + - + - + - + - -
{{mysite.name}}
{{ mysite.name }}