Skip to content

Instantly share code, notes, and snippets.

View jem-computer's full-sized avatar
🌈

Jem jem-computer

🌈
View GitHub Profile

Framer for PC & Linux users

One of the most common questions I see in the Framer Facebook group is people wondering whether you need to use a Mac to run Framer. That’s understandable — the website has a screenshot of a Mac app, a download button, and a caption saying ‘available for Mac’. Here’s the thing — you can use Framer and join this wonderful community & way of working on any platform. Let me explain…

The app you see in the screenshots on the Framer website is ‘Framer Studio’. It’s a paid app, for OSX only. The thing that powers it though—Framer.js—is open source, and available for free on GitHub.

To save you having to compile the source, Framer provide a simple .zip file to get you started - including all of the JavaScript you need, and an HTML file to open in your browser. It’s that simple to get started with Framer on Windows or Linux!

So what’s Framer Studio? Where’s tha

r = 100
generatePolygon = (sides) ->
vertex(v, sides) for v in [0...sides]
vertex = (v, sides) ->
x = r * Math.cos(2 * Math.PI * v / sides)
y = r * Math.sin(2 * Math.PI * v / sides)
new Layer
x: x + 100
// https://[my-awesome-team].slack.com/team
$('#active_members .team_list_item').map(function(i, m) {
var name = $('.member_name', m).text().split(' ')
var email = $('a[title^="Email"]', m).text()
return [name, email].join(',')
}).toArray().join('\n');
@jem-computer
jem-computer / app.coffee
Created July 30, 2014 12:32
class-based Framer prototypes
# An example with classes building components.
# This stuff is a little fiddly to get set up,
# but once it's working it's great - you can just
# add new instances of the components, and each
# components holds references to all of its
# children. You can set defaults & states for each
# component separately.
#
# (try clicking on the post author, and then on each
# of the comments on a post)
//
// IATBenHowdleViewController.m
// Visit
//
// Created by Jon Gold on 15/07/2014.
// Copyright (c) 2014 Internet & Things. All rights reserved.
//
#import "IATBenHowdleViewController.h"
#import "IATStore.h"

Keybase proof

I hereby claim:

  • I am jongd on github.
  • I am gold (https://keybase.io/gold) on keybase.
  • I have a public key whose fingerprint is AF6E B47D 5443 F36C BEFE 1061 D8DF B4C5 134C 6D44

To claim this, I am signing this object:

// Configurable variables
// ⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻⁻
// Absolute height of body text, in pixels
$base-font-size: 16px !default;
// Absolute height of one line of type, in pixels
$base-line-height: 24px !default;
// The font unit to use when returning values in rhythm functions
class Attending.EventsPosterView extends Batman.View
viewDidAppear: ->
console.log $('.poster__mega-image__image').attr('data-image')
MegaImage.setup()
setTimeout(->
console.log $('.poster__mega-image__image').attr('data-image')
MegaImage.setup()
, 50)
Batman.DOM.nodeIsEditable = (node) ->
if node.nodeName.toUpperCase() in ['INPUT', 'TEXTAREA', 'SELECT'] or node.hasAttribute('contenteditable')
return true
else return false
Batman.DOM.events.change = (node, callback, view) ->
eventNames = switch node.nodeName.toUpperCase()
when 'TEXTAREA' then ['input', 'keyup', 'change']
when 'INPUT'
if node.type.toLowerCase() in Batman.DOM.textInputTypes