Skip to content

Instantly share code, notes, and snippets.

@MuratOrs
MuratOrs / function js
Created September 9, 2018 12:55
Обрамить в span последнее слово в заголовке 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 September 8, 2018 12:32
Цикл в 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)
.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 September 4, 2018 21:10
Задача для 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 November 21, 2021 11:06
Drupal | Вставка кода Block
<?php if ($page['docs']): ?>>
<div class="docs">
<?php print render($page['docs']); ?>
</div> <!-- /#test -->
<?php endif; ?>
@MuratOrs
MuratOrs / gist:c347d56e1bef71e86c7d
Created March 11, 2016 01:48
Drupal | Системные сообщения
div.warning, .warning {
color: #840;
margin-top: 50px;
}
.messages.status {
margin: -33px 0 7px;
margin-top: 50px;
}
@MuratOrs
MuratOrs / gist:df203fe6c4b85599313f
Created March 11, 2016 01:48
Импорт стилей
@import url(reset.css);
@import url(media.css);
@import url(menu.css);
@MuratOrs
MuratOrs / gist:605c9cf4075cf860f328
Created March 11, 2016 01:47
Рястянуть background
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 March 11, 2016 01:47
Вращение логотипа
.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 March 11, 2016 01:47
Drupal | Адаптативный View slider
.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;