Skip to content

Instantly share code, notes, and snippets.

Tim Holt astrotim

  • ABC
  • Brisbane
Block or report user

Report or block astrotim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@astrotim
astrotim / SassMeister-input.scss
Created Apr 30, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// Toolkit (v2.9.0)
// ----
@import "toolkit";
$Placeholder-Selectors: ();
View store-locator-panel.js
// Copyright 2012 Google Inc.
/**
* @author Chris Broadfoot (Google)
* @fileoverview
* An info panel, which complements the map view of the Store Locator.
* Provides a list of stores, location search, feature filter, and directions.
*/
/**
View store-locator-init.js
var stores = [],
store,
latLng,
features = null,
i, s;
for (i = 0; i < crtStores.stores.length; i++) {
s = crtStores.stores[i];
@astrotim
astrotim / webpack2.css-modules.config.js
Created Mar 7, 2017
Working CSS Modules Webpack config
View webpack2.css-modules.config.js
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: [
path.resolve(__dirname, 'src')
],
@astrotim
astrotim / webpack.dev.config.js
Created Jul 25, 2017
Builds site as client side app and runs with Webpack dev server
View webpack.dev.config.js
const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
bundle: path.resolve(__dirname, 'src', 'client.js'),
scripts: path.resolve(__dirname, 'src', 'scripts.js')
},
@astrotim
astrotim / webpack.prod.config.js
Created Jul 25, 2017
Builds site as static files using StaticSiteGeneratorPlugin
View webpack.prod.config.js
const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin');
module.exports = {
entry: [path.resolve(__dirname, 'src')],
output: {
@astrotim
astrotim / index.js
Created Jul 25, 2017
The application file used by the Webpack production build
View index.js
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import { StaticRouter as Router } from 'react-router-dom';
import App from './App';
import HTML from './HTML';
// static site generator
export default function render(locals, callback) {
const context = {};
@astrotim
astrotim / client.js
Created Jul 25, 2017
The application file used by the development Webpack build
View client.js
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import App from './App';
const root = document.getElementById('root');
ReactDOM.render(<BrowserRouter><App /></BrowserRouter>, root);
@astrotim
astrotim / grid-not-supported.sass
Last active Aug 23, 2017
CSS Grid feature detection
View grid-not-supported.sass
@mixin grid-not-supported {
// fallback with native feature detection
@supports not (display: grid) {
@content;
}
// fallback with Modernizr feature detection (IE)
.no-supports & {
@content;
}
View display-grid.sass
@mixin display-grid {
// single column by default at XS size
@include screen-from($bp-sm-min) {
display: grid;
@include grid-not-supported {
display: flex;
flex-wrap: wrap;
};
You can’t perform that action at this time.