Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="jquery.are-you-sure.js"></script>
</head>
<body>
<form action="." class="form-checked">
@tBaxter
tBaxter / gist:0f8c44b5bb70d1e4bb70
Last active August 29, 2015 14:01
treemap array problem
Could use some input here:
Our current list view allows you to set the visibility on table headers (category)
and cells (individual metrics) for supporting_stat_labels.
When a category has been disabled, an individual cell may attempt to render cells
under a category where a corresponding <TH> does not exist.
The result is a table with a longer row attempting to cover items where a category has been disabled.
Conversely, when a supporting_stat_label has been enabled and a particular cell
has the same supporting_stat_label as disabled the table will render with gaps.
.callout-grid.divided{data: {columns:4}}
a href{detail_path}
name stuff
a href{case list}
case list stuff
etc
import requests
from bs4 import BeautifulSoup
archive_guitar_url = 'http://web.archive.org/web/20140625050804id_/http://gretschpages.com/guitars/'
r = requests.get(archive_guitar_url)
soup = BeautifulSoup(r.text)
guitar_grid = soup.find("section", {"id":"grid"})
guitar_grid_children = guitar_grid.find_all('div')
... extracted the guitar families, now looking at the first of guitar_grid_children to extract models:
<nav>
<ul role="tablist" class="tab-type"> <!-- we can use the role tablist rather than data-tabs -->
<li><!-- see note 1 -->
<a href="#panel1" role="tab" aria-controls="panel1" aria-selected="true">Tab 1< /a><!--see notes 2, 3 and 4 -->
</li>
<li><a href="#panel2" role="tab" aria-controls="panel2" aria-selected="false">Tab 2< /a></li><!-- see note 5 -->
</ul>
</nav>
...
<section id="panel1" role="tabpanel">
@tBaxter
tBaxter / gist:4646085
Created January 27, 2013 03:25
Simple Django form.as_p styling I use
.boxedform {
border:1px solid $base_alt2;
margin-bottom:1em;
@include radius(.5em);
> h2 {padding:.5em 10px 0; color:$accent_alt; font-weight:bold; text-transform: uppercase}
p {
border-bottom:1px dotted $base_alt2;
padding:.5em 0;
margin-bottom:0;
@tBaxter
tBaxter / gist:5556564
Last active December 17, 2015 05:18
Connecting SASS @content named media queries to JS.
body {
&:after { display: none; }
@include breakpoint(s) { &:after { content: 'small'; } };
@include breakpoint(m) { &:after { content: 'medium'; } };
@include breakpoint(l) { &:after { content: 'large'; } };
}
class PageSection(models.Model):
columns = models.IntegerField(
default=1,
help_text="On a full-size display, how many columns would you like?"
)
section_title = models.CharField(
max_length=255,
blank=True,
null=True,
help_text="Allows you to created a headline above your blocks of content (optional)."
from datetime import date
from django.db import models
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponse
from django import forms
from wagtail.wagtailcore.models import Page, Orderable
from wagtail.wagtailcore.fields import RichTextField, StreamField
from wagtail.wagtailadmin.edit_handlers import FieldPanel, FieldRowPanel, MultiFieldPanel, \
// VARIABLES
// --------------------------------------------------
// 1. Fonts
// 2. Typography
// 3. Layout Structure, Sizes & Spacing
// - Breakpoints
// - Media Queries
// - Z-Index Scale
// 4. Elements and Components