Skip to content

Instantly share code, notes, and snippets.

@agragregra
agragregra / button.sass
Last active April 2, 2024 12:36
Button Sass Styles (Universal Starter)
.button
display: inline-block
border: none
color: #fff
text-decoration: none
background-color: $accent
padding: 15px 45px
font-size: 13px
text-transform: uppercase
font-weight: 600
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<?php endwhile; endif; wp_reset_query(); ?>
JS:
$(".accordeon dd").hide().prev().click(function() {
$(this).parents(".accordeon").find("dd").not(this).slideUp().prev().removeClass("active");
$(this).next().not(":visible").slideDown().prev().addClass("active");
});
CSS:
.accordeon .active { color: red }
HTML:
/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
.animated {
/*CSS transitions*/
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
-webkit-transition-property: none !important;
transition-property: none !important;
/*CSS transforms*/
@agragregra
agragregra / Main.css
Last active August 21, 2023 10:36
How to Change Safari Web Inspector Font
/*
1. Reboot & hold Cmd+R at the chimes
2. Open Terminal Utility
3. Type csrutil disable; reboot
4. Add lines to end of file: /System/Library/PrivateFrameworks/WebInspectorUI.framework/Versions/Current/Resources/Main.css
*/
.tree-outline.dom li.parent{line-height:21px}
@agragregra
agragregra / mfp-blurred.css
Last active July 4, 2023 22:22
Magnific-Popup Blurred Background
CSS:
* {
transition: filter .25s ease;
}
.mfp-wrap ~ * {
filter: blur(1px);
}
Sass:
*
@agragregra
agragregra / jQuery HTML Loader
Last active June 14, 2023 16:36
jQuery HTML Loader (Development feature)
$('.loader').each(function() {
let loadContent = `parts/${ $(this).text() }`
$(this).load(loadContent)
})
<div class="loader">part.html</div>
@agragregra
agragregra / nodejs-gulp-install.txt
Last active May 18, 2023 08:47
Node.js + Gulp installation (Ubuntu) one line command
1. Simple (Node.js LTS, Gulp, rimraf, NCU):
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
2. Advanced (Node.js LTS, Gulp, rimraf, NCU, Ruby, Jekyll, Jekyll paginate)
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl ruby2.5 ruby2.5-dev gcc make g++ libffi-dev; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo gem i jekyll; sudo gem i jekyll-paginate-v2; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config
3. Длинна командной строки (добавить PROMPT_DIRTRIM=3 в конец и сохранить файл):
sudo nano ~/.bashrc
PROMPT_DIRTRIM=3