Animationen sind ganz toll und gar kein krampf :D

This commit is contained in:
2023-11-16 22:05:00 +01:00
parent 5d8d3f1f2f
commit a4e6cc4518
8 changed files with 95 additions and 7 deletions

View File

@ -1,7 +1,7 @@

@page "/"
@inject IJSRuntime JSRuntime
<div class="hero_area">
@ -69,7 +69,7 @@
<!-- about section -->
<section class="about_section layout_padding">
<section class="about_section layout_padding section-animate-left" @ref="animatedAboutSection1">
<div class="container">
<div class="row">
<div class="col-md-6">
@ -104,7 +104,7 @@
</div>
</section>
<section class="about_section layout_padding">
<section class="about_section layout_padding section-animate-right" @ref="animatedAboutSection2">
<div class="container">
<div class="row">
<div class="col-md-6">
@ -141,11 +141,22 @@
<!-- end about section -->
@code {
private ElementReference animatedAboutSection1;
private ElementReference animatedAboutSection2;
private List<ElementReference> animatedElements = new List<ElementReference>();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
animatedElements.Add(animatedAboutSection1);
animatedElements.Add(animatedAboutSection2);
await JSRuntime.InvokeVoidAsync("initScrollAnimations", animatedElements);
}
}
}