Skip to content

Commit

Permalink
Completed spin animation and added .NET Conf background image (#252)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
csharpfritz and github-actions[bot] authored Oct 19, 2023
1 parent 2624f4e commit a8b87de
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 11 deletions.
45 changes: 34 additions & 11 deletions src/TagzApp.Web/Pages/Waterfall.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,30 @@

<div class="modal fade show" id="contentModal" tabindex="-1" aria-labelledby="contentModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<img class="ProfilePicture" src="" alt="" />
<div class="author"></div>
<div class="authorUserName" title=""></div>
<i class="provider bi"></i>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="time"></div>
</div>
<div class="modal-inner">

<div class="modal-front modal-content">
<div class="modal-header">
<img class="ProfilePicture" src="" alt="" />
<div class="author"></div>
<div class="authorUserName" title=""></div>
<i class="provider bi"></i>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div class="time"></div>
</div>

<div class="modal-body">
</div>
</div>

<div class="modal-back modal-content">
<div class="modal-back-content">
The back of the modal
</div>
</div>

<div class="modal-body">
</div>
</div>

</div>
</div>

Expand All @@ -62,6 +73,8 @@
window.onload = window.Masonry.resizeAllGridItems();
window.addEventListener("resize", Masonry.resizeAllGridItems);
var mouseSpinDelay = 600;
</script>

}
Expand All @@ -71,6 +84,16 @@

<style>
@Html.Raw(Model.WaterfallHeaderCss)
.modal-back {
background-color: #190649;
background-image: url('/img/dotnetconf-back.png');
background-repeat: no-repeat;
background-size: contain;
background-position: center;
color: #eeeeee;
}
</style>

}
Expand Down
48 changes: 48 additions & 0 deletions src/TagzApp.Web/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,54 @@ span.invisible {
padding-right: 0 !important;
}

/** Modal Flip Animation */

.modal-dialog {
background-color: transparent;
perspective: 1000px;
}

.modal-inner {
position: relative;
width: 100%;
height: 100%;
/*text-align: center;*/
transition: transform 0.4s;
transform-style: preserve-3d;
}

.flip {
transform: rotateY(180deg);
}

.modal-front,
.modal-back {
width: 100%;
height: 100%;
backface-visibility: hidden;
}

.modal-back {
position: absolute;
top: 0;
}

.modal-back-content {
width: 100%;
height: 100%;
display: none;
align-items: center;
justify-content: center;
}

.modal-front {
transform: rotateY(180deg);
}

/** End Modal Flip */

/** Moderation UI ***/

#moderationAction {
position: absolute;
top: 0;
Expand Down
Binary file added src/TagzApp.Web/wwwroot/img/dotnetconf-back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/TagzApp.Web/wwwroot/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
paused = true;
FormatPauseButton();

// modal window is face down to start
document.querySelector('.modal-inner').classList.remove('flip');

// Format Modal
let modalProfilePic = document.querySelector('.modal-header img');
modalProfilePic.src = content.authorProfileImageUri;
Expand Down Expand Up @@ -201,6 +204,10 @@
//});

modalWindow.show();

window.setTimeout(() => {
document.querySelector('.modal-inner').classList.add('flip');
}, mouseSpinDelay);
});
}

Expand Down

0 comments on commit a8b87de

Please sign in to comment.