import { Component, ChangeDetectionStrategy, ViewEncapsulation, inject } from '@angular/core'; import { Router } from '@angular/router'; import { normalizeRouteKey } from '../seo/seo.types'; import { FeedbackLinkComponent } from '../feedback/feedback-link.component'; import { RecentChangesComponent } from '../whats-new/recent-changes.component'; import { RelatedToolsComponent } from '../related-tools/related-tools.component'; import { chromeLang } from '../shared/chrome-lang'; /** * The frame for a tool's explanatory copy: About, What you can do, How to and * Questions, written as plain HTML at the end of each tool's own template. * * The copy lives with its tool, so a page downloads only its own notes, and the * prerendered HTML is the one source for both the reader and the structured data * (finalize-seo.mjs reads the questions and features back out of it). This * component holds only the shared structure and styling, so a layout change is * still one edit. * * Encapsulation is off because the content is projected from each tool's * template, which an encapsulated stylesheet would not reach. Every rule is * scoped under .tool-notes instead. * * This is real page content, not a hidden SEO block: it renders for the reader * as well as the crawler. Text hidden from people is what Google treats as spam. */ @Component({ selector: 'app-notes', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [FeedbackLinkComponent, RecentChangesComponent, RelatedToolsComponent], template: `
`, styleUrl: './notes.component.scss', }) export class NotesComponent { /** This tool's path, such as "video-cutter": for its Recent changes and the feedback form. */ protected readonly tool = normalizeRouteKey(inject(Router).url); protected readonly lang = chromeLang(); }