Skip to content

Instantly share code, notes, and snippets.

View varya's full-sized avatar
🏠
Working from home

Varya Stepanova varya

🏠
Working from home
View GitHub Profile
@varya
varya / index.html
Created May 17, 2018 18:39
Scrollspy & Affix ( Horizontal Menu (Navbar) )
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<div class="container-fluid" style="background-color:#F44336;color:#fff;height:200px;">
<h1>Scrollspy & Affix Example</h1>
<h3>Fixed navbar on scroll</h3>
<p>Scroll this page to see how the navbar behaves with data-spy="affix" and data-spy="scrollspy".</p>
<p>Navbar is attached to the top of the page after you have scrolled a specified amount of pixels,and the links in the navbar are automatically updated based on scroll position.</p>
</div>
<nav class="navbar navbar-inverse" data-spy="affix" data-offset-top="197">
@varya
varya / styles.js
Created February 10, 2018 11:45
Styles for Typography component, "Hands-on with Design Systems"
import styled, { injectGlobal } from 'styled-components'
injectGlobal`
@font-face {
font-family:"futura-pt-bold";
src:url("https://use.typekit.net/af/ff35f0/00000000000000003b9af1e4/27/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff2"),url("https://use.typekit.net/af/ff35f0/00000000000000003b9af1e4/27/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("woff"),url("https://use.typekit.net/af/ff35f0/00000000000000003b9af1e4/27/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n7&v=3") format("opentype");
font-style:normal;font-weight:700;
}
@font-face {
@varya
varya / rss.json
Created November 23, 2017 13:45
SC5 blog RSS
{
"rss": {
"channel": {
"title": "SC5",
"link": [
{
"_href": "http://sc5.io/feed/",
"_rel": "self",
"_type": "application/rss+xml",
"__prefix": "atom"
@varya
varya / rss.json
Created November 23, 2017 13:43
NC blog RSS
{
"rss": {
"channel": {
"title": "Tech Blog",
"link": "https://www.nordcloud.com/tech-blog",
"description": "The Nordcloud Tech Blog explores the cloud in more technical detail. Our Cloud Architects will share their thoughts on the latest releases, features, and developments in the public cloud.",
"language": [
"en-us",
{
"__prefix": "dc",
@varya
varya / world.html
Created November 9, 2016 21:05
Where I was with conferences
<html>
<head>
<title>World in SVG</title>
</head>
<body>
<object type="image/svg+xml"
data="world.svg" class="world"></object>
</body>
</html>
@varya
varya / dabblet.css
Last active July 31, 2016 09:04
Pullover
/**
* Pullover
*/
body {
--cell-size:5;
}
* {
font: 0/0 a;
import React, { Component } from 'react';
import Item from '../Item/Item.js';
export default class ItemsInList extends Component {
shouldComponentUpdate(nextProps, nextState) {
return (nextProps.items.length !== this.props.items.length);
}
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-hot-middleware/client',
'./src/index'
],
output: {
@varya
varya / with Defer
Last active December 2, 2015 14:55
// 1) validate the scheme
var validateD = Promise.defer();
// code to validate scheme
// ..
if (schemeIsValid) {
validateD.resolve();
} else {
validateD.reject();
}