This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="up-arrow"> | |
<i class="fas fa-angle-double-up"></i> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).on('scroll', function () { | |
if ($(this).scrollTop() > $(this).height()) { | |
$('.up-arrow').addClass('active'); | |
} else { | |
$('.up-arrow').removeClass('active'); | |
} | |
}) | |
$('.up-arrow').on('click', function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.up-arrow { | |
position: fixed; | |
background-color: $darkGray; | |
width: 60px; | |
height: 60px; | |
text-align: center; | |
font-size: 24px; | |
color: #fff; | |
line-height: 60px; | |
-webkit-transition: all 0.2s linear; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="preloader"> | |
<div class="loader"> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.preloader { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background-color: $darkGray; | |
z-index: 9999999999; | |
-webkit-transition: all 1s linear; | |
transition: all 1s linear; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).on('load', function () { | |
document.body.style.overflow = 'hidden'; | |
setTimeout(() => { | |
$('.preloader').addClass('done') | |
document.body.style.overflow = ''; | |
}, 1000); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('init', 'register_post_types'); | |
function register_post_types() | |
{ | |
register_post_type('portfolio', array( | |
'labels' => array( | |
'name' => 'Портфолио', // Основное название типа записи | |
'singular_name' => 'Портфолио', // отдельное название записи типа Book | |
'add_new' => 'Добавить пост к записи', | |
'add_new_item' => 'Добавления поста к записи', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
ul, | |
ol { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MongoClient.connect('mongodb://localhost:27017', { useUnifiedTopology: true }, function (err, client) { | |
if (err) { | |
return console.log(err); | |
} | |
db = client.db('artists'); | |
app.listen(3012, function () { | |
console.log("API app started"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elems = {}; | |
var scrolled = 0; | |
scrolled = $(window).scrollTop(); | |
for(var g in elems){ | |
if(scrolled > elems[g].top - $(window).height()/2 && scrolled < (elems[g].top + $(`#${g}`).height())){ | |
$(`[data-scroll]`).removeClass('active'); |
OlderNewer