Skip to content

Instantly share code, notes, and snippets.

View denisfl's full-sized avatar

Denis denisfl

View GitHub Profile
@denisfl
denisfl / Item.vue
Last active August 3, 2018 07:14
Vue code example: build grid like Yandex.Zen
<template>
<div class="item" :class="itemClasses" :data-id="item.id">
<div class="item-container">
<div class="item-cover">
<div class="item-cover-thumb" :style="thumbUrl"></div>
<div class="item-cover-mask"></div>
</div>
<div class="item-content">
<div class="item-title" :class="titleClasses">
<a class="item-link" :href="item.url" v-if="item.url && !fullArticle">
@denisfl
denisfl / store.js
Created August 3, 2018 07:09
Vue code exaple
import Vue from 'vue'
import Vuex from 'vuex'
import slice from 'lodash/slice'
import take from 'lodash/take'
import flattenDeep from 'lodash/flattenDeep'
import each from 'lodash/each'
Vue.use(Vuex)
const URL = '/teasers'
@denisfl
denisfl / .zshrc
Last active November 29, 2019 10:29
.zshrc config
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
@import "imports/variables.css";
:root {
--Checkbox-uncheck-border-color: #979797;
}
@component Checkbox {
position: relative;
@denisfl
denisfl / frontend-guidline.md
Last active January 16, 2016 09:55
Общие соглашения по верстке фронтенда

При разработке необходимо использовать gulp или webpack.

Структура папок

Структура может быть различной в зависимости от проекта, но выделять

  • компоненты
  • стейты
  • ресурсы (стили, скрипты, картинки), которые никак нельзя вынести в какой-то отдельный компонент
@denisfl
denisfl / .csscomb.json
Created January 16, 2016 07:49
Config fo csscomb
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"block-indent": 2,
"color-case": "upper",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"exclude": [
".git/**",
$vr-font-size: 15px !global;
$vr-line-height: 1.5 !global;
$vr-cap-height: 0.6 !global;
$vr-line-scale: 2 !global;
$vr-grid-unit: $vr-line-height * $vr-font-size / $vr-line-scale !global; // (px)
@function em($px: 0, $font-size: $vr-font-size) {
@return $px / $font-size + em;
}
@denisfl
denisfl / .bowerrc
Last active August 29, 2015 14:01
Middleman bower template
{
"directory": "bower_components"
}
@denisfl
denisfl / get-sprite.sass
Created December 11, 2012 15:30 — forked from dfadler/get-sprite.sass
A SASS mixin for generating a sprite declaration block that will work with media queries
// http://compass-style.org/reference/compass/helpers/sprites/
@mixin get-sprite($map, $sprite, $repeat: no-repeat, $height: true, $width: true)
//http://compass-style.org/reference/compass/helpers/sprites/#sprite-file
$sprite-image: sprite-file($map, $sprite)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-url
$sprite-map: sprite-url($map)
// http://compass-style.org/reference/compass/helpers/sprites/#sprite-position