Skip to content

Instantly share code, notes, and snippets.

@yusugomori
Created April 1, 2012 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yusugomori/2274978 to your computer and use it in GitHub Desktop.
Save yusugomori/2274978 to your computer and use it in GitHub Desktop.
iPhone Layouts
#
# 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", ->
header ->
partial "shared/header"
div class: "frame", ->
div id: "main-content", ->
div class: "page-view", ->
div class: "content", ->
div style: "position:relative;z-index:0;", ->
div class: "scrollview-host", ->
yields "body"
if hasContentFor "footer"
partial "shared/footer"
#
# app/views/shared/_meta.coffee
#
meta charset: "utf-8"
if hasContentFor "title"
title @title
else
title t("title")
meta name: "description", content: t("description")
meta name: "keywords", content: t("keywords")
meta name: "robots", content: t("robots")
meta name: "author", content: t("author")
meta name: "viewport", content: "width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
link href: "/favicon.ico", rel: "icon shortcut-icon favicon"
stylesheets "lib", "vendor", "application"
javascripts "lib", "vendor"
javascripts "application-iphone"
csrfMetaTag()
#
# app/views/shared/_header.coffee
#
ul class: "nav", ->
li ->
a href: "/", ->
i class: "ico-home"
"Home"
li ->
a href: "/profile", ->
i class: "ico-profile"
"Profile"
li ->
a href: "/skill", ->
i class: "ico-skill"
"Skill"
li ->
a href: "/works", ->
i class: "ico-works"
"Works"
li ->
a href: "http://blog.yusugomori.com", ->
i class: "ico-blog"
"Blog"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment