- ©2024 •
+
+ SeoTopper ©2024 •
Gustavo QuinalhaJapaUserJapa
— All rights reserved.
diff --git a/src/app/components/menu/menu.component.html b/src/app/components/menu/menu.component.html
index d07c673..daf5845 100644
--- a/src/app/components/menu/menu.component.html
+++ b/src/app/components/menu/menu.component.html
@@ -3,12 +3,12 @@
id="menu"
>
@@ -18,7 +18,7 @@
name="urlfetch"
[(ngModel)]="url"
(keydown.enter)="fetchMetadata()"
- placeholder="https://gus.vision"
+ placeholder="Enter your URL"
class="w-full pr-14 h-8 text-xs bg-zinc-900 rounded border border-zinc-800 focus:border-white focus:ring-2 focus:ring-white outline-none text-white py-1 px-3 leading-8 transition-colors duration-200 ease-in-out"
/>
@@ -173,8 +173,8 @@
class="w-5 min-w-5 h-5 rounded-full bg-zinc-800 border border-zinc-800 overflow-hidden"
>
{
- let service: MetadataService;
-
- beforeEach(() => {
- TestBed.configureTestingModule({});
- service = TestBed.inject(MetadataService);
- });
-
- it('should be created', () => {
- expect(service).toBeTruthy();
- });
-});
diff --git a/src/app/pages/create/create.component.html b/src/app/pages/create/create.component.html
new file mode 100644
index 0000000..7316034
--- /dev/null
+++ b/src/app/pages/create/create.component.html
@@ -0,0 +1,99 @@
+
+
+
diff --git a/src/app/pages/create/create.component.scss b/src/app/pages/create/create.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/create/create.component.spec.ts b/src/app/pages/create/create.component.spec.ts
new file mode 100644
index 0000000..3241da8
--- /dev/null
+++ b/src/app/pages/create/create.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CreateComponent } from './create.component';
+
+describe('CreateComponent', () => {
+ let component: CreateComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [CreateComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(CreateComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/create/create.component.ts b/src/app/pages/create/create.component.ts
new file mode 100644
index 0000000..6181905
--- /dev/null
+++ b/src/app/pages/create/create.component.ts
@@ -0,0 +1,132 @@
+import { Component } from '@angular/core';
+import { FormBuilder, FormGroup } from '@angular/forms';
+import { returnCode } from '../../utils/code';
+
+
+@Component({
+ selector: 'app-create',
+ templateUrl: './create.component.html',
+ styleUrl: './create.component.scss'
+})
+export class CreateComponent {
+ metatagsList = [
+ {
+ name: 'charset', type: 'select', description: 'Specifies the character encoding for the HTML document, ensuring proper display of text.', label: 'Charset', options: [
+ { value: "UTF-8", },
+ { value: "ISO-8859-1", },
+ { value: "ISO-8859-2", },
+ { value: "ISO-8859-3", },
+ { value: "ISO-8859-4", },
+ { value: "ISO-8859-5", },
+ { value: "ISO-8859-6", },
+ { value: "ISO-8859-7", },
+ { value: "ISO-8859-8", },
+ { value: "ISO-8859-9", },
+ { value: "ISO-8859-10", },
+ { value: "ISO-8859-11", },
+ { value: "ISO-8859-13", },
+ { value: "ISO-8859-14", },
+ { value: "ISO-8859-15", },
+ { value: "ISO-8859-16", },
+ { value: "Windows-1250", },
+ { value: "Windows-1251", },
+ { value: "Windows-1252", },
+ { value: "Windows-1253", },
+ { value: "Windows-1254", },
+ { value: "Windows-1255", },
+ { value: "Windows-1256", },
+ { value: "Windows-1257", },
+ { value: "Windows-1258", },
+ { value: "KOI8-R", },
+ { value: "KOI8-U", },
+ { value: "GB18030", },
+ { value: "Big5", },
+ { value: "Shift_JIS", },
+ { value: "EUC-JP", },
+ { value: "EUC-KR", },
+ ],
+ },
+ { name: 'viewport', type: 'text', description: 'Controls the layout and scaling of a webpage on different devices, improving responsiveness and user experience.', label: 'Viewport' },
+ { name: 'name', type: 'text', description: 'Defines the name of the page.', label: 'Site name' },
+ { name: 'title', type: 'text', description: 'Defines the title of the HTML document, displaying text in the browser tab and aiding in search engine optimization (SEO).', label: 'Title' },
+ { name: 'description', type: 'text', description: 'Provides a concise summary of the webpages content, often used by search engines to display in search results, enhancing click-through rates.', label: 'Description' },
+ { name: 'canonical', type: 'text', description: 'Specifies the preferred URL for a webpage, consolidating search engine ranking signals and avoiding duplicate content issues.', label: 'Canonical URL' },
+ { name: 'image', type: 'text', description: `Specifies the image displayed when sharing the webpage on platforms like Facebook, enhancing visual appeal. Og:images should have an aspect ratio of 1.91:1. This means that the width should be 1.9 X the height to avoid cropping issues. Your image shouldn't be larger than 8MB. Image size should be 1200 X 630 pixels (px).`, label: 'Image URL' },
+ { name: 'imageAlt', type: 'text', description: 'Provides alternative text for the image specified in og:image, improving accessibility and SEO when shared on platforms supporting Open Graph.', label: 'Image alt text' },
+ { name: 'favicon', type: 'text', description: 'Specifies the favicon, enhancing website recognition in browsers and bookmarks.', label: 'Favicon' },
+ { name: 'color', type: 'text', description: 'Defines the color theme for the browsers UI elements when a webpage is viewed on mobile devices, enhancing user experience and brand consistency.', label: 'Theme color' },
+ { name: 'author', type: 'text', description: 'Specifies the author of the webpage, providing attribution for content creation and ownership.', label: 'Author' },
+ {
+ name: 'robots', type: 'select', description: 'Controls how search engines index and display content, influencing webpage visibility and accessibility in search results.', label: 'Robots', options: [
+ { value: 'index, follow' },
+ { value: 'index, nofollow' },
+ { value: 'noindex, follow' },
+ { value: 'noindex, nofollow' },
+ ]
+ },
+ {
+ name: 'googlebot', type: 'select', description: 'Controls how search engines index and display content, influencing webpage visibility and accessibility in search results.', label: 'Googlebot', options: [
+ { value: 'index, follow' },
+ { value: 'index, nofollow' },
+ { value: 'noindex, follow' },
+ { value: 'noindex, nofollow' },
+ ]
+ },
+ { name: 'sitemap', type: 'text', description: '', label: 'URL site map' },
+ { name: 'locale', type: 'text', description: 'Defines the language and region of a webpage, aiding in content and regional settings adaptation.', label: 'Locale' },
+ { name: 'site', type: 'text', description: 'The Twitter “@username” the card should be attributed to.', label: 'Site' },
+ ];
+
+ code? = returnCode(null);
+
+ form: FormGroup;
+
+ constructor(private fb: FormBuilder) {
+ this.form = this.fb.group({});
+ this.metatagsList.forEach(field => {
+ if (field.type === 'select' && field.options) {
+ this.form.addControl(field.name, this.fb.control(field.options[0].value));
+ } else if (field.name === 'viewport') {
+ this.form.addControl(field.name, this.fb.control('width=device-width, initial-scale=1'));
+ } else {
+ this.form.addControl(field.name, this.fb.control(''));
+ }
+ });
+
+ this.onChanges();
+ }
+
+ onChanges(): void {
+ this.form.valueChanges.subscribe(_val => {
+ console.log('this.form.value', this.form.value);
+ this.code = returnCode(this.form.value);
+ });
+ }
+
+ setFetchValue(data: any) {
+ this.form.patchValue({
+ charset: data.charset ?? '',
+ viewport: data.viewport ?? '',
+ name: data.name ?? '',
+ title: data.title ?? '',
+ description: data.description ?? '',
+ canonical: data.canonicalURL ?? '',
+ image: data.imageURL ?? '',
+ imageAlt: data.imageAltText ?? '',
+ favicon: data.favicon ?? '',
+ color: data.themeColor ?? '',
+ author: data.pageAuthor ?? '',
+ robots: data.robots ?? '',
+ googlebot: data.googlebot ?? '',
+ sitemap: data.sitemap ?? '',
+ locale: data.locale ?? '',
+ site: data.pageSite ?? '',
+ });
+ }
+
+ changeColor(value: any) {
+ this.form.patchValue({
+ color: value.target.value
+ })
+ }
+}
diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html
new file mode 100644
index 0000000..bd6b6aa
--- /dev/null
+++ b/src/app/pages/home/home.component.html
@@ -0,0 +1,257 @@
+
+
+
+
+
SeoTopper
+
+
+ Just type the data and generate the meta tags for your website.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ content?.name || content?.name
+ }}
+ {{
+ content?.canonical || "https://pageurl.com"
+ }}
+
+
+
+
+ {{ content?.title || "Page title" }}
+
+
+ {{ content?.description || "Page description" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ content?.canonical || "https://pageurl.com" }}
+
+
+
+ {{ content?.title || "Page title" }}
+
+
+ {{ content?.description || "Page description" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ content?.title || "Page title" }}
+
+
+ {{ content?.description || "Page description" }}
+
+
+ {{ content?.canonical || "https://pageurl.com" }}
+
+
+
+
+
+
+
+
+
+
+ {{ content?.canonical || "https://pageurl.com" }}
+
+
+ {{ content?.title || "Page title" }}
+
+
+ {{ content?.description || "Page description" }}
+
+
+
+
+
+
+
+
+
+
+ {{ content?.title || "Page title" }}
+
+
+ {{ content?.canonical || "https://pageurl.com" }}
+
+
+
+
+
+
+
+ {{ content?.title || "Page title" }}
+
+
+ {{ content?.description || "Page description" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ content?.title || "Page title" }}
+
+
+
+
+
+
+
diff --git a/src/app/pages/home/home.component.scss b/src/app/pages/home/home.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/home/home.component.spec.ts b/src/app/pages/home/home.component.spec.ts
new file mode 100644
index 0000000..6a570bb
--- /dev/null
+++ b/src/app/pages/home/home.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HomeComponent } from './home.component';
+
+describe('HomeComponent', () => {
+ let component: HomeComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [HomeComponent]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(HomeComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts
new file mode 100644
index 0000000..aee28c3
--- /dev/null
+++ b/src/app/pages/home/home.component.ts
@@ -0,0 +1,19 @@
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-home',
+ templateUrl: './home.component.html',
+ styleUrl: './home.component.scss'
+})
+export class HomeComponent {
+ url?: string = '';
+ content? = {
+ favicon : 'https://seotopper.netlify.app/favicon.ico',
+ name : 'SeoTopper',
+ canonical : 'https://seotopper.netlify.app/',
+ description : `Optimize your website's online presence with our intuitive and efficient tool. You can generate custom meta tags in seconds, ensuring your content is properly indexed and gains visibility in search engines.`,
+ title : 'SeoTopper - Preview and generate meta tags',
+ image : 'https://seotopper.netlify.app/assets/intro.webp',
+ imageAlt : 'SeoTopper OG:Image',
+ }
+}
diff --git a/src/app/metadata.service.ts b/src/app/services/metadata.service.ts
similarity index 100%
rename from src/app/metadata.service.ts
rename to src/app/services/metadata.service.ts
diff --git a/src/styles.scss b/src/styles.scss
index b0751d7..1bba8d3 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -30,27 +30,43 @@ html {
height: 0;
}
-.hljs-comment,
-.hljs-quote,
-.hljs-deletion {
- @apply text-zinc-700;
-}
-
-.hljs-string,
-.hljs-meta,
-.hljs-name,
-.hljs-type,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable {
- @apply text-white;
-}
-
-.hljs-title,
-.hljs-attr,
-.hljs-meta-keyword {
- @apply text-zinc-500;
+::-webkit-scrollbar {
+ @apply w-2 h-2;
}
+
+::-webkit-scrollbar-track {
+ @apply bg-zinc-950;
+}
+
+::-webkit-scrollbar-thumb {
+ @apply bg-zinc-700 rounded;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ @apply bg-zinc-600;
+}
+
+// .hljs-comment,
+// .hljs-quote,
+// .hljs-deletion {
+// @apply text-zinc-700;
+// }
+
+// .hljs-string,
+// .hljs-meta,
+// .hljs-name,
+// .hljs-type,
+// .hljs-symbol,
+// .hljs-bullet,
+// .hljs-addition,
+// .hljs-variable,
+// .hljs-template-tag,
+// .hljs-template-variable {
+// @apply text-white;
+// }
+
+// .hljs-title,
+// .hljs-attr,
+// .hljs-meta-keyword {
+// @apply text-zinc-500;
+// }