Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudstitch-services committed Sep 14, 2016
1 parent 577c220 commit 633c422
Show file tree
Hide file tree
Showing 51 changed files with 1,253 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Cloudstitch Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 18 additions & 0 deletions README.md
@@ -1 +1,19 @@
# framer.module.cloudstitch

framer.module.cloudstitch lets you load data from Google Spreadsheets and Microsoft Excel.

## Installation
Add ```cloudstitch.coffee``` to the /modules folder of your project.

## Usage
To include the module within your project, add the following:

``` coffeescript
cloudstitch = require "cloudstitch"
```

Then get data from your spreadsheet by providing the Cloudstitch username and appname of your project:

``` coffeescript
cloudstitch.get(username, appname, (response) -> callback(response))
```
40 changes: 40 additions & 0 deletions cloudstitch.framer/.viewer.html
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">

<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

<script type="text/javascript">
// This automatically sets the right viewport scale on mobile devices
(function() {
var scale = 1 / window.devicePixelRatio
var viewport = "width=device-width, height=device-height, initial-scale=" + scale + ", maximum-scale=" + scale + ", user-scalable=no"
var iOS = /iPad|iPhone|iPod/.test(navigator.platform)
if (iOS) { viewport += ", shrink-to-fit=no" }
document.write("<meta name=\"viewport\" content=\"" + viewport + "\">")
})()
</script>

<link rel="apple-touch-icon" href="framer/images/icon-120.png">
<link rel="apple-touch-icon" href="framer/images/icon-76.png" sizes="76x76">
<link rel="apple-touch-icon" href="framer/images/icon-120.png" sizes="120x120">
<link rel="apple-touch-icon" href="framer/images/icon-152.png" sizes="152x152">
<link rel="apple-touch-icon" href="framer/images/icon-180.png" sizes="180x180">
<link rel="apple-touch-icon" href="framer/images/icon-192.png" sizes="192x192">

<link rel="stylesheet" type="text/css" href="framer/style.css?nocache=6d40bc53861208d298f85019e08849ff">

<script src="framer/coffee-script.js"></script>
<script src="framer/framer.js?nocache=9d4afbd0b29b5a54c5b341398a73e99a"></script>
<script src="framer/framer.generated.js?nocache=a5287db4f745db84c38f451264ea8444"></script>
<script src="framer/framer.modules.js?nocache=75c25c91f25d88b6c1ea0aa5ea3a761f"></script>
<script src="framer/framer.init.js"></script>

</head>
<body>
</body>
</html>
<script src='/_server/resources/FramerStudioViewer/build/FramerStudioViewer.js'></script>
Empty file added cloudstitch.framer/Icon
Empty file.
40 changes: 40 additions & 0 deletions cloudstitch.framer/app.coffee
@@ -0,0 +1,40 @@
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info

Framer.Info =
title: ""
author: "Edward Benson"
twitter: ""
description: ""

# Set background color
Screen.backgroundColor = "#AAEEFF"

# Some constants to help us lay out the grid
COLS = 3
SPACE = 20
SIDE = (Screen.size.width - (SPACE * (COLS - 2))) / COLS
COLS = parseInt(Screen.size.height / (SIDE + SPACE))

# Load data from the spreadsheet.
cloudstitch = require "cloudstitch"

# The `get` method takes your Cloudstitch username and appname, and
# it returns the contents of your spreadsheet as a JSON object.
cloudstitch.get('project-templates', 'framer-module-demo', (data) ->
listLogo(company, i) for company, i in data.Companies
)

listLogo = (company, i) ->
x = SIDE * (i % COLS) + ((i % COLS)-1)*SPACE
y = parseInt(i / COLS) * SIDE + (parseInt(i / COLS) * SPACE)

logo = new Layer(
height: SIDE
width: SIDE
x: x
y: y
image: company.URL
html: "<p align='center' style='background-color: black'>" + company.Name + "</p>"
)
1 change: 1 addition & 0 deletions cloudstitch.framer/framer/.framer.modules.js.hash
@@ -0,0 +1 @@
2c587dbfafdd48dd6c23007c4dac5433:/Users/eob/Code/framer.module.cloudstitch/cloudstitch.framer/modules/cloudstitch.coffee
@@ -0,0 +1,34 @@
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info

Framer.Info =
title: ""
author: "Edward Benson"
twitter: ""
description: ""

# Set background color
Screen.backgroundColor = "#AAEEFF"
SIDE = 200

# Load data from the spreadsheet
cloudstitch = require "cloudstitch"
cloudstitch.get('ted', 'polymer-jobs', (data) ->
listLogo(company, i) for company, i in data.jobs

#

listLogos = (data) ->


listLogo = (company, i) ->


logo = new Layer(
height: 200
width: 200
x: Align.center(210 * i)
y: Align.center
image: company.LogoUrl
)
@@ -0,0 +1,34 @@
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info

Framer.Info =
title: ""
author: "Edward Benson"
twitter: ""
description: ""

# Set background color
Screen.backgroundColor = "#AAEEFF"
SIDE = 200
SPACE = 20

# Load data from the spreadsheet
cloudstitch = require "cloudstitch"
cloudstitch.get('ted', 'polymer-jobs', (data) ->
listLogo(company, i) for company, i in data.jobs
)

listLogos = (data) ->


listLogo = (company, i) ->
var x = ((SIDE + SPACE) * i) % Screen.size.width

logo = new Layer(
height: 200
width: 200
x: Align.center(210 * i)
y: Align.center
image: company.LogoUrl
)
@@ -0,0 +1,35 @@
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info

Framer.Info =
title: ""
author: "Edward Benson"
twitter: ""
description: ""

# Set background color
Screen.backgroundColor = "#AAEEFF"
SIDE = 200
SPACE = 20

# Load data from the spreadsheet
cloudstitch = require "cloudstitch"
cloudstitch.get('ted', 'polymer-jobs', (data) ->
listLogo(company, i) for company, i in data.jobs
)

listLogos = (data) ->


listLogo = (company, i) ->
x = ((SIDE + SPACE) * i) % Screen.size.width
y = ((SIDE + SPACE) * i) % Screen.size.height

logo = new Layer(
height: SIDE
width: SIDE
x: x
y: y
image: company.LogoUrl
)
@@ -0,0 +1,38 @@
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info

Framer.Info =
title: ""
author: "Edward Benson"
twitter: ""
description: ""

# Set background color
Screen.backgroundColor = "#AAEEFF"
SIDE = 200
SPACE = 20
COLS = Screen.size.height / (SIDE + SPACE)

# Load data from the spreadsheet
cloudstitch = require "cloudstitch"
cloudstitch.get('ted', 'polymer-jobs', (data) ->
listLogo(company, i) for company, i in data.jobs
)

listLogos = (data) ->


listLogo = (company, i) ->
x = ((SIDE + SPACE) * i) % Screen.size.width
y = i / COLS

((SIDE + SPACE) * i) % Screen.size.height

logo = new Layer(
height: SIDE
width: SIDE
x: x
y: y
image: company.LogoUrl
)
@@ -0,0 +1,36 @@
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info

Framer.Info =
title: ""
author: "Edward Benson"
twitter: ""
description: ""

# Set background color
Screen.backgroundColor = "#AAEEFF"
SIDE = 200
SPACE = 20
COLS = Screen.size.height / (SIDE + SPACE)

# Load data from the spreadsheet
cloudstitch = require "cloudstitch"
cloudstitch.get('ted', 'polymer-jobs', (data) ->
listLogo(company, i) for company, i in data.jobs
)

listLogos = (data) ->


listLogo = (company, i) ->
x = ((SIDE + SPACE) * i) % Screen.size.width
y = ((SIDE + SPACE) * (i /cols))

logo = new Layer(
height: SIDE
width: SIDE
x: x
y: y
image: company.LogoUrl
)
@@ -0,0 +1,36 @@
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info

Framer.Info =
title: ""
author: "Edward Benson"
twitter: ""
description: ""

# Set background color
Screen.backgroundColor = "#AAEEFF"
SIDE = 200
SPACE = 20
COLS = Screen.size.height / (SIDE + SPACE)

# Load data from the spreadsheet
cloudstitch = require "cloudstitch"
cloudstitch.get('ted', 'polymer-jobs', (data) ->
listLogo(company, i) for company, i in data.jobs
)

listLogos = (data) ->
console.

listLogo = (company, i) ->
x = ((SIDE + SPACE) * i) % Screen.size.width
y = ((SIDE + SPACE) * (i / COLS))

logo = new Layer(
height: SIDE
width: SIDE
x: x
y: y
image: company.LogoUrl
)
@@ -0,0 +1,35 @@
# Project Info
# This info is presented in a widget when you share.
# http://framerjs.com/docs/#info.info

Framer.Info =
title: ""
author: "Edward Benson"
twitter: ""
description: ""

# Set background color
Screen.backgroundColor = "#AAEEFF"
SIDE = 200
SPACE = 20
COLS = parseInt(Screen.size.height / (SIDE + SPACE))

# Load data from the spreadsheet
cloudstitch = require "cloudstitch"
cloudstitch.get('ted', 'polymer-jobs', (data) ->
listLogo(company, i) for company, i in data.jobs
)

listLogos = (data) ->

listLogo = (company, i) ->
x = ((SIDE + SPACE) * i) % Screen.size.width
y = ((SIDE + SPACE) * (i / COLS))

logo = new Layer(
height: SIDE
width: SIDE
x: x
y: y
image: company.LogoUrl
)

0 comments on commit 633c422

Please sign in to comment.