Skip to content

Instantly share code, notes, and snippets.

View josepmartins's full-sized avatar

Josep Martins josepmartins

View GitHub Profile

At which phase do we consider patterns to be ready for product designers to design with?

For example1 : List of items:

  • Item 1
  • Item 2
  • Item 3

Footnotes

  1. This is just an example, not by any means an official recommendation

@josepmartins
josepmartins / image_footnote.md
Last active July 27, 2022 08:06
Markdown - Image with footnote
Unsplash image
example of a wall texture picture
A picture of a wall in Barcelona, artwork from @josepmartins
@josepmartins
josepmartins / cubic-bezier-transitions.css
Last active October 13, 2021 09:15
CSS Cubic Bezier transitions
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.55, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
--ease-out-quart: cubic-bezier(.165, .84, .44, 1);
--ease-out-quint: cubic-bezier(.23, 1, .32, 1);
// Read parameter from widget
let parameter = args.widgetParameter
var parameters = "";
if (parameter) parameters = parameter.split(";")
else
{
// If no parameters were found, ask the user to put them
let w = new ListWidget()
error = w.addText("Introduce tu cuenta y token de IndexaCapital separados por un ; en la configuración del Widget")
error.font = new Font("Courier-Bold", 12)
@josepmartins
josepmartins / dynamicBinding.js
Created February 7, 2017 12:17
Dynamic binding of new elements in a list
//Dynamic binding of new elements in a list
// HTML code in using .pug template
//ul.items
// li Static Item
//button#addItem Add Item
const items = document.querySelector( ".items" );
let counter = 0;
@josepmartins
josepmartins / inline_svg_helpers.rb
Last active January 29, 2023 18:19
SVG inline helpers for Rails
# Inline svg from @tomeara https://gist.github.com/tomeara/6515860
def inline_svg(path)
file = File.open("app/assets/images/#{path}", "rb")
raw file.read
end
# Use SVG internal link
def use_svg(clazz)
content_tag(:svg, content_tag(:use, "", { "xlink:href" => '#icon-' + clazz }), class: "icon icon-#{clazz}")
end