An experiment in vector image (SVG) ('-' * 35)
Forked from Omer Amsel's Pen NqxZjL.
A Pen by Yishai Burt on CodePen.
| /** | |
| * Solar panel background | |
| */ | |
| background-color: #3eb2e7; | |
| background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px); | |
| background-size: 7px 7px, 7px 7px; |
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| .arrow-up { | |
| width: 0; | |
| height: 0; | |
| border-left: 5px solid transparent; | |
| border-right: 5px solid transparent; | |
| /** | |
| * CSS Triangles | |
| */ | |
| .arrow-up { | |
| width: 0; | |
| height: 0; | |
| border-left: 5px solid transparent; | |
| border-right: 5px solid transparent; | |
| /** | |
| * zig-zag background (SO) | |
| * CSS Zigzag Border with a Textured Background | |
| */ | |
| background: linear-gradient(#BCED91 49%, transparent 49%), | |
| linear-gradient(-45deg, white 33%, transparent 33%) 0 50%, | |
| white linear-gradient(45deg, white 33%, #BCED91 33%) 0 50%; | |
| background-repeat: repeat-x; | |
| background-size: 1px 100%, 40px 40px, 40px 40px; |
| define [ | |
| 'jquery', | |
| 'underscore', | |
| 'backbone', | |
| 'backbone-pageable' | |
| ], ($, _, Backbone) -> | |
| ### | |
| An extension of Backbone.PageableCollection to parse server responses created by Django Rest Framework. | |
| The response structure is expected to match that provided by django-rest-framework's Pagination mechanism |
| chart_options: (data)-> | |
| min = Math.min 0,data... | |
| max = Math.max data... | |
| num_of_y_ticks = 5 | |
| scale_minmax_rounding_factor = if max > 10000 then 1000 else 500 | |
| y_scale_rounding_factor = if max > 10000 then 5000 else 1000 | |
| scale_max = scale_minmax_rounding_factor * Math.round(max/scale_minmax_rounding_factor) | |
| scale_min = scale_minmax_rounding_factor * Math.round(min/scale_minmax_rounding_factor) | |
| y_scale_step_size = (scale_max - scale_min) / (num_of_y_ticks) | |
| y_scale_step_rounded = y_scale_rounding_factor * Math.round(y_scale_step_size / y_scale_rounding_factor) |
| define [ | |
| 'hbs/handlebars' | |
| 'underscore' | |
| ], (Handlebars, _) -> | |
| """ | |
| Breaks down an array into a comma-delimited list and 'and' before the last item. | |
| Options: | |
| total_count - If this is a number greater than the length of array, the difference will be added as 'and x others'. | |
| first_item - this item will be inserted at the beginning of the array. | |
| Examples: |
An experiment in vector image (SVG) ('-' * 35)
Forked from Omer Amsel's Pen NqxZjL.
A Pen by Yishai Burt on CodePen.
| #set( $lowerCaseName = "$NAME" ) | |
| #set( $newName = "" ) | |
| #foreach( $part in $NAME.split("-") ) | |
| #set( $newName = "$newName$part.substring(0,1).toUpperCase()$part.substring(1)") | |
| #end |