Skip to content

Instantly share code, notes, and snippets.

@MuratOrs
MuratOrs / function js
Created Sep 9, 2018
Обрамить в span последнее слово в заголовке JS
View function js
$('.carousel-service-composition h3').each(function() {
var ths = $(this);
ths.html(ths.html().replace(/(\S+)\s*$/,'<span>$1</span>'));
});
@MuratOrs
MuratOrs / main.sass
Created Sep 8, 2018
Цикл в Sass для перебора цветов
View main.sass
$colors: $blue, $red, $accent
@for $i from 1 through length($colors)
.carousel-services .owl-item:nth-child(#{length($colors)}n+#{$i}),
.carousel-services-aside .owl-item:nth-child(#{length($colors)}n+#{$i})
background-color: nth($colors, $i)
View gist:ef6bf400ff12f8f0270180a92c70089e
.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
@MuratOrs
MuratOrs / Gulp
Created Sep 4, 2018
Задача для Gulp
View Gulp
gulp.task('common-js', function() {
return gulp.src([
'app/libs/jquery/dist/jquery.min.js',
'app/libs/mmenu/js/jquery.mmenu.all.min.js',
'app/js/common.min.js',
])
.pipe(concat('scripts.min.js'))
// .pipe(uglify()) // Минимизировать весь js (на выбор)
.pipe(gulp.dest('app/js'))
@MuratOrs
MuratOrs / gist:dd0b9da467d8cd90bc15
Last active Nov 21, 2021
Drupal | Вставка кода Block
View gist:dd0b9da467d8cd90bc15
<?php if ($page['docs']): ?>>
<div class="docs">
<?php print render($page['docs']); ?>
</div> <!-- /#test -->
<?php endif; ?>
@MuratOrs
MuratOrs / gist:c347d56e1bef71e86c7d
Created Mar 11, 2016
Drupal | Системные сообщения
View gist:c347d56e1bef71e86c7d
div.warning, .warning {
color: #840;
margin-top: 50px;
}
.messages.status {
margin: -33px 0 7px;
margin-top: 50px;
}
@MuratOrs
MuratOrs / gist:df203fe6c4b85599313f
Created Mar 11, 2016
Импорт стилей
View gist:df203fe6c4b85599313f
@import url(reset.css);
@import url(media.css);
@import url(menu.css);
@MuratOrs
MuratOrs / gist:605c9cf4075cf860f328
Created Mar 11, 2016
Рястянуть background
View gist:605c9cf4075cf860f328
html body #page-pages-wrapper {
background: url(../images/background/bg2.jpg) no-repeat center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height: 100%;
width: 100%;
}
@MuratOrs
MuratOrs / gist:fa81328ea90677e83df5
Created Mar 11, 2016
Вращение логотипа
View gist:fa81328ea90677e83df5
.logo img{
margin-left: 5px;
-webkit-transition:-webkit-transform .9s;
-moz-transition:-moz-transform .9s;
-o-transition:-o-transform .9s;
-ms-transition:-ms-transform .9s;
transition:transform .9s;
}
@MuratOrs
MuratOrs / gist:dc4916e65b7ba66cfccc
Created Mar 11, 2016
Drupal | Адаптативный View slider
View gist:dc4916e65b7ba66cfccc
.views_slideshow_cycle_main {
width: 100%;
}
.views_slideshow_cycle_main .views-slideshow-cycle-main-frame {
width: 100% !important;
height: auto;
}
.views_slideshow_cycle_main .views-slideshow-cycle-main-frame-row {
width: 100% !important;