-
-
- {{ store.prefix }}
-
-
-
.
-
{{ store.suffix }}
+
+
+
+ {{ store.prefix }}
+
+
+ .
+ {{ store.suffix }}
+
+
+
+
+
+
+
+
+
+ Font Size: {{ fontSize }}px
+
+
-
-
-
-
-
- Font Size: {{ fontSize }}px
-
-
+
+ Transparent Background:
-
- Transparent Background:
-
-
-
-
-
- Tweet
-
-
+
+
diff --git a/src/components/generator/Pornhub.vue b/src/components/generator/Pornhub.vue
index b8923ea0..0b926024 100644
--- a/src/components/generator/Pornhub.vue
+++ b/src/components/generator/Pornhub.vue
@@ -1,112 +1,64 @@
-
-
-
-
-
-
-
- {{ store.prefix }}
-
-
- .
- {{ store.suffix }}
-
-
- {{ store.prefix }}
-
- {{ store.suffix }}
-
-
-
-
+
+
+
+
+ {{ store.prefix }}
+
+
+ .
+ {{ store.suffix }}
-
-
-
+
+ {{ store.prefix }}
+
+ {{ store.suffix }}
+
+
+
+
+
-
- Prefix Text Color:
-
-
-
-
-
-
-
-
- Suffix Text Color:
-
-
-
-
-
-
-
-
- Suffix Background Color:
-
-
-
-
-
-
-
+
+
+
- Transparent Background:
+ Transparent Background:
-
+
+
+
Font Size: {{ fontSize }}px
@@ -117,136 +69,47 @@
max="200"
step="1"
color="#f90"
- v-model="fontSize"
+ :model-value="fontSize"
+ @update:model-value="updateFontSize"
>
- Reverse Highlight:
+ Reverse Highlight:
-
-
-
-
- Tweet
-
-
+
+
diff --git a/src/components/generator/VerticalPornHub.vue b/src/components/generator/VerticalPornHub.vue
index 4f027774..f8d99136 100644
--- a/src/components/generator/VerticalPornHub.vue
+++ b/src/components/generator/VerticalPornHub.vue
@@ -1,108 +1,60 @@
-
-
-
-
-
-
-
- {{ store.prefix }}
-
-
- {{ store.suffix }}
-
-
-
-
- {{ store.prefix }}
-
-
- {{ store.suffix }}
-
-
-
-
+
+
+
+
+ {{ store.prefix }}
+
+
+ {{ store.suffix }}
+
-
-
-
+
+
+ {{ store.prefix }}
+
+
+ {{ store.suffix }}
+
+
+
+
+
-
- Prefix Text Color:
-
-
-
-
-
-
-
-
- Suffix Text Color:
-
-
-
-
-
-
-
-
- Suffix Background Color:
-
-
-
-
-
-
-
+
+
+
- Transparent Background:
+ Transparent Background:
-
+
+
+
Font Size: {{ fontSize }}px
@@ -113,130 +65,46 @@
max="200"
step="1"
color="#f90"
- v-model="fontSize"
+ :model-value="fontSize"
+ @update:model-value="updateFontSize"
>
- Reverse Highlight:
+ Reverse Highlight:
-
-
-
-
- Tweet
-
-
+
+
diff --git a/src/composables/useLogoGenerator.js b/src/composables/useLogoGenerator.js
new file mode 100644
index 00000000..6bc47f0f
--- /dev/null
+++ b/src/composables/useLogoGenerator.js
@@ -0,0 +1,53 @@
+import { computed, ref } from 'vue';
+import { useStore } from '@/stores/store';
+
+export function useLogoGenerator(defaultColors = {}) {
+ const prefixColor = ref(defaultColors.prefix || '#ffffff');
+ const suffixColor = ref(defaultColors.suffix || '#000000');
+ const postfixBgColor = ref(defaultColors.background || '#ff9900');
+ const fontSize = ref(60);
+ const transparentBg = ref(false);
+ const reverseHighlight = ref(false);
+
+ const store = useStore();
+
+ const updatePrefix = (e) => {
+ if (!navigator.userAgent.toLowerCase().includes('firefox')) {
+ store.updatePrefix(e.target.childNodes[0].nodeValue);
+ }
+ };
+
+ const updateSuffix = (e) => {
+ if (!navigator.userAgent.toLowerCase().includes('firefox')) {
+ store.updateSuffix(e.target.childNodes[0].nodeValue);
+ }
+ };
+
+ const twitter = () => {
+ let url = 'https://logoly.pro';
+ let text = encodeURIComponent(`Built with #LogolyPro, by @xiqingongzi ${url}`);
+ window.open(`https://twitter.com/intent/tweet?text=${text}`);
+ };
+
+ const transparentBgColor = computed(() => {
+ if (transparentBg.value) {
+ return 'transparent';
+ } else {
+ return '#000000';
+ }
+ });
+
+ return {
+ prefixColor,
+ suffixColor,
+ postfixBgColor,
+ fontSize,
+ transparentBg,
+ reverseHighlight,
+ store,
+ updatePrefix,
+ updateSuffix,
+ twitter,
+ transparentBgColor
+ };
+}
\ No newline at end of file