Animationen sind ganz toll und gar kein krampf :D
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user