Skip to content

Commit

Permalink
Fixing explanation anchor.
Browse files Browse the repository at this point in the history
  • Loading branch information
theypsilon committed Jun 20, 2024
1 parent 4aa851d commit b31a411
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions www/src/view/landing_page/landing_template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ export class LandingTemplate {
this._root.getElementById('file')?.click()
}

private async scrollToExplanation(_: Event) {
this._root.getElementById('explanation')?.scrollIntoView({ behavior: 'smooth'})
}

private async dropOnDropZone(e: DataEvent) {
e.stopPropagation();
e.preventDefault();
Expand Down Expand Up @@ -96,7 +100,7 @@ export class LandingTemplate {
</div>
<div class="col-md-4 col-md-offset-2 col-sm-12 text-center">
<p>Don't get why this is a thing?</p>
<a class="btn btn-crt btn-green text-white" href="#explanation">Read some explanation below</a>
<a class="btn btn-crt btn-green text-white" @click="${this.scrollToExplanation.bind(this)}">Read some explanation below</a>
</div>
</div>
</header>
Expand Down Expand Up @@ -144,7 +148,7 @@ export class LandingTemplate {
</form>
</section>
<section class="container explanation">
<section class="container explanation" id="explanation">
<h3>Explanation:</h3>
<a name="explanation"></a>
<p>Old displays were designed to work with analog video signals carrying low resolution content. They used
Expand Down

0 comments on commit b31a411

Please sign in to comment.