Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed spin animation and added .NET Conf background image #252

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading