Skip to content

Instantly share code, notes, and snippets.

View alexvas123's full-sized avatar

Alexander Vassiliev alexvas123

View GitHub Profile
@alexvas123
alexvas123 / Slide Content
Last active June 9, 2016 09:38
Slide Content
// SLIDE CONTENT
$('.buttons > img').on('click', function() {
var title = $(this).attr('data-title');
var name = $(this).attr('data-show');
var file = name + '.html';
$('.screen').children().fadeOut(300, function() {
$('.screen').load(file);
$('.serial-title').empty().removeClass('abfab downton blackbooks blackadder office fools').append(title).addClass(name);
});
@alexvas123
alexvas123 / full-height-resize
Last active July 9, 2016 09:44
full-height-resize
function heightDetect() {
$('.main-head').css('height', $(window).height());
}
heightDetect();
$(window).resize(function () {
heightDetect();
});
// HTML
@alexvas123
alexvas123 / Tabs SASS
Last active September 11, 2023 11:12
Tabs SASS
// HTML //
<article class="text">
<div class="tabs">
<div class="tab">
<input type="radio" name="css-tabs" id="tab-1" checked class="tab-switch">
<label for="tab-1" class="tab-label">Рекорд</label>
<div class="tab-content">
<img src="img/album6.jpg" alt="альбом By the Way">
<p>Альбом By the Way был выпущен в июле 2002 г. Он вышел на первое место в хит-парадах Британии, Швейцарии, Австрии, Швеции и Новой Зеландии, на второе &#8211; в США и во Франции.</p>
@alexvas123
alexvas123 / Mixins
Last active May 29, 2016 09:26
Mixins
@mixin video
.videoWrapper
position: relative
padding-bottom: 56.25% /* 16:9 */
padding-top: 25px
height: 0
iframe
position: absolute
top: 0
@alexvas123
alexvas123 / Fonts Bourbon
Created May 25, 2016 12:17
Fonts Bourbon
+font-face('Roboto', "../fonts/Roboto/Roboto-Regular", $file-formats: eot woff ttf)
@alexvas123
alexvas123 / Media Queries
Last active September 23, 2016 20:12
Media Queries
// Breakpoints
$bp-xxsmall: rem(280);
$bp-xsmall: rem(375);
$bp-small: rem(425);
$bp-medium: rem(768);
$bp-large: rem(1024);
$bp-xlarge: rem(1440);
$bp-xxlarge: rem(2560);
// Media Queries
@alexvas123
alexvas123 / .htaccess
Created May 25, 2016 12:21
.htaccess
<ifModule mod_expires.c>
# Add correct content-type for fonts
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
AddType image/svg+xml .svg
# Compress compressible fonts
@alexvas123
alexvas123 / AJAX Switch Case
Created May 25, 2016 12:24
AJAX Switch Case
//AJAX BEGINS
$('.buttonsContainer').find('a').on('click', function (e) {
e.preventDefault();
cache: false;
$('.jumbo').fadeOut();
var attrValue = $(this).attr('href');
switch (attrValue) {
@alexvas123
alexvas123 / Textilate FitText
Created May 25, 2016 12:25
Textilate FitText
// TITLE BEGINS
$("h1").textillate({ in : {
effect: 'flipInY',
callback: function () {
$(".char2").addClass('rotate');
}
},
initialDelay: 300
});