This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# applicationController.coffee | |
# | |
class App.ApplicationController extends Tower.Controller | |
# @layout "application" # ここに@layoutを置くと、上書きできない。 | |
constructor: -> | |
@layout = "application" # @layoutはcontructorの中に。 | |
@userAgent = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# app/view/layouts/application-iphone.coffee | |
# | |
doctype 5 | |
html lang: "ja", "xmlns:og": "http://ogp.me/ns#", "xmlns:fb": "http://www.facebook.com/2008/fbml", -> | |
head -> | |
partial "shared/meta" | |
body class: "iphone safari", -> | |
div class: "main-header", -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Part of stylesheets/iphone.css.less | |
// | |
//========== Header ==========// | |
.main-header { | |
height: 44px; | |
overflow: hidden; | |
font-size: 10px; | |
font-weight: bold; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# javascripts/iphoneTouchScroll.coffee | |
# | |
class iPhoneTouchScroll | |
constructor: -> | |
@clientHeight = 0 | |
@dataX = 0 | |
@dataY = 0 | |
@startX = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Usage | |
# | |
# **html** | |
# <a href="#" class="elem"> | |
# hoverTrigger | |
# <div class="pop"> | |
# In the pop | |
# </div> | |
# </a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# config/application.coffee | |
# | |
everyauth = require "everyauth" | |
class App extends Tower.Application | |
@configure -> | |
@use "favicon", Tower.publicPath + "/favicon.png" | |
@use "static", Tower.publicPath, maxAge: Tower.publicCacheDuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# config/initializers/authentication.coffee | |
# | |
everyauth = require "everyauth" | |
# Facebook App ID from config/credentials.coffee | |
unless Tower.env is 'production' | |
Tower.config.credentials.facebook.key = Tower.config.credentials.facebook.development.key | |
Tower.config.credentials.facebook.secret = Tower.config.credentials.facebook.development.secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# app/models/user.coffee | |
# | |
class App.User extends Tower.Model | |
@field "id", type: "Id" | |
@field "name", type: "String," | |
@field "email", type: "String," | |
@field "userId", type: "String," | |
@timestamps() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This gist contains /app.js and /config/index.js | |
*/ | |
// My SocketStream app | |
var http = require('http') | |
, ss = require('socketstream') | |
, express = require('express') | |
, everyauth = require('everyauth'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This gist contains both server side and client side scripts. | |
# | |
# Server: | |
# /server/rpc/auth.coffee | |
# /server/rpc/models/user.coffee | |
# | |
# Client: | |
# /client/code/modules/auth.coffee | |
# /client/code/app.coffee |
OlderNewer