SlideShare a Scribd company logo
Front-end Framework 
& 
Template 
Foundation, Gumby, HTML5 Boilerplate 
SSS(G) hiro345
自己紹介 
twitter: 
@hiro345 
執筆活動: 
日経Linux、@IT 
興味のある分野: 
Raspberry Pi、Java、Dart、 
Linux、Web技術一般 
blog: 
http://www.sssg.org/blogs/hiro345/
紹介するもの 
• Foundation | The Most Advanced Responsive Front-end 
Framework from ZURB 
http://foundation.zurb.com/ 
• Gumby - A Flexible, Responsive CSS Framework - 
Powered by Sass 
http://gumbyframework.com/ 
• HTML5 Boilerplate: The web’s most popular front-end 
template 
http://html5boilerplate.com/
Foundation 
• MITライセンス 
• index.html が参考になる 
• ダウンロードをして展開をする。下記のようにす 
ると、founcationに展開される。 
• $ wget http://foundation.zurb.com/develop/download.html 
$ mkdir foundation 
$ cd foundation 
$ unzip ../foundation-5.4.0.zip
Foundationで紹介する機能 
• グリッドシステム 
http://foundation.zurb.com/docs/components/grid.html 
• パネル 
http://foundation.zurb.com/docs/components/panels.html 
• ボタン 
http://foundation.zurb.com/docs/components/buttons.html 
• ナビゲーション(トップバー) 
http://foundation.zurb.com/docs/components/topbar.html
Foundation 基本コード 
<!doctype html> 
<html class="no-js" lang="ja"> 
<head> 
<meta charset="utf-8" /> 
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> 
<title>タイトル</title> 
<link rel="stylesheet" href="css/foundation.css" /> 
<script src="js/vendor/modernizr.js"></script> 
</head> 
<body> 
<script src="js/vendor/jquery.js"></script> 
<script src="js/foundation.min.js"></script> 
<script> 
$(document).foundation(); 
</script> 
</body> 
</html>
Foundationのグリッドシステム 
<div class="row"> 
<div class="small-2 large-4 columns"><div class="panel">s2 l4 columns</div></div> 
<div class="small-4 large-4 columns"><div class="panel">s4 l4</div></div> 
<div class="small-6 large-4 columns"><div class="panel">s6 l4</div></div> 
</div> 
<div class="row"> 
<div class="large-3 columns"><div class="panel">large-3</div></div> 
<div class="large-6 columns"><div class="panel">large-6</div></div> 
<div class="large-3 columns"><div class="panel">large-3</div></div> 
</div> 
<div class="row"> 
<div class="small-6 large-2 columns"><div class="panel">s6 l2</div></div> 
<div class="small-6 large-8 columns"><div class="panel">s6 l8</div></div> 
<div class="small-12 large-2 columns"><div class="panel">s12 l2</div></div> 
</div> 
<div class="row"> 
<div class="small-3 columns"><div class="panel">s3</div></div> 
<div class="small-9 columns"><div class="panel">s9</div></div> 
</div> 
<div class="row"> 
<div class="large-4 columns"><div class="panel">l4</div></div> 
<div class="large-8 columns"><div class="panel">l8</div></div> 
</div> 
<div class="row"> 
<div class="small-6 large-5 columns"><div class="panel">s6 l5</div></div> 
<div class="small-6 large-7 columns"><div class="panel">s6 l7</div></div> 
</div> 
<div class="row"> 
<div class="large-6 columns"><div class="panel">l6</div></div> 
<div class="large-6 columns"><div class="panel">l6</div></div> 
</div> 
*サンプルにパネルを追加して表示を見やすくしました
largeとsmallの違い 
画面が広いとき画面が狭いとき
Foundationでのパネル 
<div class="row"> 
<div class="large-3 columns"> 
<div class="panel">regular panel</div> 
</div> 
<div class="large-3 columns"> 
<div class="panel callout">callout panel</div> 
</div> 
<div class="large-3 columns"> 
<div class="panel radius">panel radius</div> 
</div> 
<div class="large-3 columns"> 
<div class="panel callout radius">panel callout radius</div> 
</div> 
</div> 
*callout は目立たせたいときに使う 
*radiusは角がちょっと丸くなる
パネルの表示
Foundationボタン 
<a href="#" class="tiny button">Tiny Button</a><br/> 
<a href="#" class="small button">Small Button</a><br/> 
<a href="#" class="medium button">Medium Button</a><br/> 
<a href="#" class="large button">Large Button</a><br/> 
<a href="#" class="small radius button">Small Radius Button</a><br/> 
<a href="#" class="small round button">Small Round Button</a><br/> 
<a href="#" class="medium success button">Medium Success</a><br/> 
<a href="#" class="medium alert button">Medium Alert Button</a><br/> 
<a href="#" class="medium secondary button">Secondary Button</a></p> 
<a href="#" class="medium button disabled">Medium Disabled Button</a></p> 
<a href="#" class="medium button expand">Medium Expanded Button</a></p> 
*サイズはtiny, small, medium, large 
*色をつけるにはsuccess, alert, secondary 
*角を丸めるにはradius, round 
*無効ボタンはdisabled 
*画面いっぱい使うボタンにはexpand
Foundationでのトップバー 
<nav class="top-bar" data-topbar role="navigation"> 
<ul class="title-area"> 
<li class="name"> 
<h1><a href="#">Foundationサンプル</a></h1> 
</li> 
<li class="toggle-topbar menu-icon"><a href="#"><span>メニュー</span></a></li> 
</ul> 
<section class="top-bar-section"> 
<!-- 右側のナビ--> 
<ul class="right"> 
<li class="active"><a href="sample_buttons.html">sample_buttons.html(Active)</a></li> 
<li class="has-dropdown"> 
<a href="#">ドロップボタン</a> 
<ul class="dropdown"> 
<li><a href="sample_grid.html">sample_grid.html</a></li> 
<li class="active"><a href="sample_panels.html">sample_panels.html(Active)</a></li> 
</ul> 
</li> 
</ul> 
<!-- 左側のナビ--> 
<ul class="left"> 
<li><a href="#">左側のボタン</a></li> 
</ul> 
</section> 
</nav>
トップバーの表示
Gumby 
• MITライセンス 
• ダウンロードしたアーカイブファイルに含まれるdemo.html, ui.html が参 
考になる 
• カスタムダウンロード可能 
http://gumbyframework.com/customize 
• コードはGitHubからダウンロード可能。下記の手順だと、Gumby-2.6.3に 
展開される。 
$ wget -O Gumby-2.6.3.zip  
https://github.com/GumbyFramework/Gumby/archive/2.6.3.zip 
$ unzip ~/Gumby-2.6.3.zip
*ui.htmlより
*ui.htmlより
*ui.htmlより
Sass 
• Sassを使うならツールが必要。下記ではCentOSでrbenvの環境を用意し、Gemパッケージの 
compass、sass、modular-scaleをインストール 
• compass compileはGumby-2.6.3ディレクトリをカレントにして実行 
• compass watchを実行しておくと、sassファイルの更新を監視して自動でCSS生成 
• カスタマイズは、Gumby-2.6.3/sass/_custom.scss に記述すること 
$ sudo yum -y install git 
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv 
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile 
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile 
$ exec $SHELL -l 
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build 
$ rbenv install 2.1.2 
$ rbenv global 2.1.2 
$ gem install compass modular-scale sass 
$ compass compile 
$ compass watch
HTML5 Boilerplate 
• MITライセンス 
• シンプルでわかりやすい 
• カスタマイズ可能 
http://initializr.com/ 
• コードはGitHubからダウンロード可能。下記で用意すると 
、html5-boilerplate-4.3.0というディレクトリに展開される 
$ wget -O html5-boilerplate-4.3.0.zip  
https://github.com/h5bp/html5-boilerplate/archive/v4.3.0.zip 
$ unzip ../html5-boilerplate-4.3.0.zip
HTML5 Boilerplate 特長 
•HTML5対応 
•主要ブラウザ対応 
Chrome, Opera, Safari, Firefox 3.6+, IE6+ 
•CSSを標準化するNormalize.css を同梱 
http://necolas.github.com/normalize.css/ 
•最新のjQueryのCDN版を利用可能。 
*ローカル用も同梱(4.3.0ではjquery-1.10.2.min.js) 
http://jquery.com/ 
•最新のModernizr(4.3.0ではmodernizr-2.6.2.min.js)を採用 
http://modernizr.com/
HTML5 Boilerplateの 
ファイル基本構成 
. 
├── css 
│ ├── main.css 
│ └── normalize.css 
├── doc 
├── img 
├── js 
│ ├── main.js 
│ ├── plugins.js 
│ └── vendor 
│ ├── jquery.min.js 
│ └── modernizr.min.js 
├── .htaccess 
├── 404.html 
├── apple-touch-icon-precomposed.png 
├── index.html 
├── humans.txt 
├── robots.txt 
├── crossdomain.xml 
└── favicon.ico 
index.html 
404.html
HTML5 Boilerplate 
基本コード 
<!DOCTYPE html> 
<head> 
<meta charset="utf-8"> 
<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
<title>サンプル</title> 
<meta name="description" content=""> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<link rel="stylesheet" href="css/normalize.css"> 
<link rel="stylesheet" href="css/main.css"> 
<script src="js/vendor/modernizr-2.6.2.min.js"></script> 
</head> 
<body> 
<p>Hello world! This is HTML5 Boilerplate.</p> 
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
<script> 
window.jQuery || 
document.write('<script src=“js/vendor/jquery-1.10.2.min.js”></script>') 
</script> 
<script src="js/plugins.js"></script> 
<script src="js/main.js"></script> 
</body> 
</html>
同梱のindex.htmlに記述されて 
いるその他のコード 
<!DOCTYPE html> 
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> 
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> 
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> 
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> 
<head> 
<meta charset=“utf-8"> 
(略) 
</head> 
<body> 
<!--[if lt IE 7]> 
<p class="browsehappy">You are using an <strong>outdated</strong> browser. 
Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> 
<![endif]--> 
<p>Hello world! This is HTML5 Boilerplate.</p> 
(略) 
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> 
<script> 
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= 
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; 
e=o.createElement(i);r=o.getElementsByTagName(i)[0]; 
e.src='//www.google-analytics.com/analytics.js'; 
r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); 
ga('create','UA-XXXXX-X');ga('send','pageview'); 
</script> 
</body> 
</html>
まとめ 
• 用途に応じてフレームワークを選択しよう 
• HTML5 Boilerplateのようなものも利用すると最新動向をチェックしなくて 
作り始めることができるので、短納期・短期間公開のWebページ(イベン 
ト告知ページなど)には便利 
• フロントエンドのフレームワークをカスタマイズするにはSassなどが必須 
• ツールはYEOMANを使うのがいいかもしれない。 
検索すると下記がある模様 
yeoman-foundation 
generator-gumby 
generator-h5bp 
*The web's scaffolding tool for modern webapps | Yeoman: 
http://yeoman.io/

More Related Content

Viewers also liked

Architecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web AppsArchitecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web Apps
Rasheed Waraich
 
Presentation 1112 for blog 2
Presentation 1112 for blog 2Presentation 1112 for blog 2
Presentation 1112 for blog 2
katie_higson
 
Jeremy thake introducing alm to share point development implementations (ap...
Jeremy thake   introducing alm to share point development implementations (ap...Jeremy thake   introducing alm to share point development implementations (ap...
Jeremy thake introducing alm to share point development implementations (ap...
Jeremy Thake
 
Nvidia GTC 2014 Talk
Nvidia GTC 2014 TalkNvidia GTC 2014 Talk
Nvidia GTC 2014 Talk
William Brouwer
 
Martin Nerstad - VG
Martin Nerstad - VGMartin Nerstad - VG
Martin Nerstad - VGMobile Oslo
 
Letter s presentatie
Letter s presentatieLetter s presentatie
Letter s presentatie
cmagarry
 
Shepherd Elementary School Community Meeting Flyer
Shepherd Elementary School Community Meeting FlyerShepherd Elementary School Community Meeting Flyer
Shepherd Elementary School Community Meeting Flyer
DC Department of General Services
 
Privacy-Aware Data Management in Information Networks - SIGMOD 2011 Tutorial
Privacy-Aware Data Management in Information Networks - SIGMOD 2011 TutorialPrivacy-Aware Data Management in Information Networks - SIGMOD 2011 Tutorial
Privacy-Aware Data Management in Information Networks - SIGMOD 2011 Tutorial
Kun Liu
 
Funcionario, ¿qué le pides tú a la administración electrónica?
Funcionario, ¿qué le pides tú a la administración electrónica?Funcionario, ¿qué le pides tú a la administración electrónica?
Funcionario, ¿qué le pides tú a la administración electrónica?
Alberto Ortiz de Zarate
 
CloudSurance - We backup web application data
CloudSurance - We backup web application dataCloudSurance - We backup web application data
CloudSurance - We backup web application data
Sam Bowen
 
Márkaépítés a fogyasztói kontroll korában 2.0
Márkaépítés a fogyasztói kontroll korában 2.0Márkaépítés a fogyasztói kontroll korában 2.0
Márkaépítés a fogyasztói kontroll korában 2.0
Isobar Budapest
 
Kauno miesto savivaldybės 100 dienų ataskaita
Kauno miesto savivaldybės 100 dienų ataskaitaKauno miesto savivaldybės 100 dienų ataskaita
Kauno miesto savivaldybės 100 dienų ataskaita
Kauno_miesto_savivaldybe
 
Enquête Doctipharma : Les français et la vente de médicaments sur internet
Enquête Doctipharma : Les français et la vente de médicaments sur internet Enquête Doctipharma : Les français et la vente de médicaments sur internet
Enquête Doctipharma : Les français et la vente de médicaments sur internet
Doctipharma
 
Depurando Aplicacoes PHP com XDebug e FirePHP II
Depurando Aplicacoes PHP com XDebug e FirePHP IIDepurando Aplicacoes PHP com XDebug e FirePHP II
Depurando Aplicacoes PHP com XDebug e FirePHP II
Jefferson Girão
 
Videómarketing szállodáknak
Videómarketing szállodáknakVideómarketing szállodáknak
Videómarketing szállodáknak
Tamás A.
 
Tesla Croatia
Tesla CroatiaTesla Croatia
Tesla Croatia
Teslacroatia
 
Subsidio i.1 demanda actual
Subsidio i.1 demanda actualSubsidio i.1 demanda actual
Subsidio i.1 demanda actual
Upaep Online
 
DALLA DELUSIONE ALLA SPERANZA
DALLA DELUSIONE ALLA SPERANZADALLA DELUSIONE ALLA SPERANZA
DALLA DELUSIONE ALLA SPERANZA
Simone Tranquilli
 

Viewers also liked (18)

Architecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web AppsArchitecture & Workflow of Modern Web Apps
Architecture & Workflow of Modern Web Apps
 
Presentation 1112 for blog 2
Presentation 1112 for blog 2Presentation 1112 for blog 2
Presentation 1112 for blog 2
 
Jeremy thake introducing alm to share point development implementations (ap...
Jeremy thake   introducing alm to share point development implementations (ap...Jeremy thake   introducing alm to share point development implementations (ap...
Jeremy thake introducing alm to share point development implementations (ap...
 
Nvidia GTC 2014 Talk
Nvidia GTC 2014 TalkNvidia GTC 2014 Talk
Nvidia GTC 2014 Talk
 
Martin Nerstad - VG
Martin Nerstad - VGMartin Nerstad - VG
Martin Nerstad - VG
 
Letter s presentatie
Letter s presentatieLetter s presentatie
Letter s presentatie
 
Shepherd Elementary School Community Meeting Flyer
Shepherd Elementary School Community Meeting FlyerShepherd Elementary School Community Meeting Flyer
Shepherd Elementary School Community Meeting Flyer
 
Privacy-Aware Data Management in Information Networks - SIGMOD 2011 Tutorial
Privacy-Aware Data Management in Information Networks - SIGMOD 2011 TutorialPrivacy-Aware Data Management in Information Networks - SIGMOD 2011 Tutorial
Privacy-Aware Data Management in Information Networks - SIGMOD 2011 Tutorial
 
Funcionario, ¿qué le pides tú a la administración electrónica?
Funcionario, ¿qué le pides tú a la administración electrónica?Funcionario, ¿qué le pides tú a la administración electrónica?
Funcionario, ¿qué le pides tú a la administración electrónica?
 
CloudSurance - We backup web application data
CloudSurance - We backup web application dataCloudSurance - We backup web application data
CloudSurance - We backup web application data
 
Márkaépítés a fogyasztói kontroll korában 2.0
Márkaépítés a fogyasztói kontroll korában 2.0Márkaépítés a fogyasztói kontroll korában 2.0
Márkaépítés a fogyasztói kontroll korában 2.0
 
Kauno miesto savivaldybės 100 dienų ataskaita
Kauno miesto savivaldybės 100 dienų ataskaitaKauno miesto savivaldybės 100 dienų ataskaita
Kauno miesto savivaldybės 100 dienų ataskaita
 
Enquête Doctipharma : Les français et la vente de médicaments sur internet
Enquête Doctipharma : Les français et la vente de médicaments sur internet Enquête Doctipharma : Les français et la vente de médicaments sur internet
Enquête Doctipharma : Les français et la vente de médicaments sur internet
 
Depurando Aplicacoes PHP com XDebug e FirePHP II
Depurando Aplicacoes PHP com XDebug e FirePHP IIDepurando Aplicacoes PHP com XDebug e FirePHP II
Depurando Aplicacoes PHP com XDebug e FirePHP II
 
Videómarketing szállodáknak
Videómarketing szállodáknakVideómarketing szállodáknak
Videómarketing szállodáknak
 
Tesla Croatia
Tesla CroatiaTesla Croatia
Tesla Croatia
 
Subsidio i.1 demanda actual
Subsidio i.1 demanda actualSubsidio i.1 demanda actual
Subsidio i.1 demanda actual
 
DALLA DELUSIONE ALLA SPERANZA
DALLA DELUSIONE ALLA SPERANZADALLA DELUSIONE ALLA SPERANZA
DALLA DELUSIONE ALLA SPERANZA
 

Similar to Frontend framework and Template

明日から使えるコーディングツール
明日から使えるコーディングツール明日から使えるコーディングツール
明日から使えるコーディングツール
Tomokazu Kiyohara
 
Firefox with HTML+CSS
Firefox with HTML+CSSFirefox with HTML+CSS
Firefox with HTML+CSS
dynamis
 
Web Technology features with Firefox 3.6 / Gecko 1.9.2 and later
Web Technology features with Firefox 3.6 / Gecko 1.9.2 and laterWeb Technology features with Firefox 3.6 / Gecko 1.9.2 and later
Web Technology features with Firefox 3.6 / Gecko 1.9.2 and later
Makoto Kato
 
「html5 boilerplate」から考える、これからのマークアップ
「html5 boilerplate」から考える、これからのマークアップ「html5 boilerplate」から考える、これからのマークアップ
「html5 boilerplate」から考える、これからのマークアップ
Yasuhito Yabe
 
Dockerのディスクについて ~ファイルシステム・マウント方法など~
Dockerのディスクについて ~ファイルシステム・マウント方法など~Dockerのディスクについて ~ファイルシステム・マウント方法など~
Dockerのディスクについて ~ファイルシステム・マウント方法など~
HommasSlide
 
Twitterbootstrapでモック開発
Twitterbootstrapでモック開発Twitterbootstrapでモック開発
Twitterbootstrapでモック開発
Sosuke Kimura
 
JavaScript on GitHub (#kyotojs)
JavaScript on GitHub  (#kyotojs)JavaScript on GitHub  (#kyotojs)
JavaScript on GitHub (#kyotojs)y_uuki
 
20141101 handson
20141101 handson20141101 handson
20141101 handson
Six Apart
 
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC WebアプリケーションPlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
Kazuhiro Hara
 
CSS Design and Programming
CSS Design and ProgrammingCSS Design and Programming
CSS Design and ProgrammingTaku AMANO
 
20141206 handson
20141206 handson20141206 handson
20141206 handson
Six Apart
 
Oktopartial Introduction
Oktopartial IntroductionOktopartial Introduction
Oktopartial Introduction
Takeshi AKIMA
 
なんでCSSすぐ死んでしまうん
なんでCSSすぐ死んでしまうんなんでCSSすぐ死んでしまうん
なんでCSSすぐ死んでしまうん
Hayato Mizuno
 
dodaiのProvisioning周辺探訪 - dodai勉強会 #4
dodaiのProvisioning周辺探訪 - dodai勉強会 #4dodaiのProvisioning周辺探訪 - dodai勉強会 #4
dodaiのProvisioning周辺探訪 - dodai勉強会 #4
Satoshi Yazawa
 
Web Basics 2013-01-10
Web Basics 2013-01-10Web Basics 2013-01-10
Web Basics 2013-01-10
kmiyako
 
Firefox5+HTML5×5
Firefox5+HTML5×5Firefox5+HTML5×5
Firefox5+HTML5×5
dynamis
 
Firefoxの開発プロセス
Firefoxの開発プロセスFirefoxの開発プロセス
Firefoxの開発プロセスMakoto Kato
 
jQuery Mobile(開発編)勉強会資料
jQuery Mobile(開発編)勉強会資料jQuery Mobile(開発編)勉強会資料
jQuery Mobile(開発編)勉強会資料
Nobumasa Ura
 

Similar to Frontend framework and Template (20)

明日から使えるコーディングツール
明日から使えるコーディングツール明日から使えるコーディングツール
明日から使えるコーディングツール
 
Firefox with HTML+CSS
Firefox with HTML+CSSFirefox with HTML+CSS
Firefox with HTML+CSS
 
Web Technology features with Firefox 3.6 / Gecko 1.9.2 and later
Web Technology features with Firefox 3.6 / Gecko 1.9.2 and laterWeb Technology features with Firefox 3.6 / Gecko 1.9.2 and later
Web Technology features with Firefox 3.6 / Gecko 1.9.2 and later
 
「html5 boilerplate」から考える、これからのマークアップ
「html5 boilerplate」から考える、これからのマークアップ「html5 boilerplate」から考える、これからのマークアップ
「html5 boilerplate」から考える、これからのマークアップ
 
Dockerのディスクについて ~ファイルシステム・マウント方法など~
Dockerのディスクについて ~ファイルシステム・マウント方法など~Dockerのディスクについて ~ファイルシステム・マウント方法など~
Dockerのディスクについて ~ファイルシステム・マウント方法など~
 
Twitterbootstrapでモック開発
Twitterbootstrapでモック開発Twitterbootstrapでモック開発
Twitterbootstrapでモック開発
 
Wp html5
Wp html5Wp html5
Wp html5
 
JavaScript on GitHub (#kyotojs)
JavaScript on GitHub  (#kyotojs)JavaScript on GitHub  (#kyotojs)
JavaScript on GitHub (#kyotojs)
 
20141101 handson
20141101 handson20141101 handson
20141101 handson
 
Git (運用編)
Git (運用編)Git (運用編)
Git (運用編)
 
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC WebアプリケーションPlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
PlayFramework 2.0 Javaと WebSocketでつくる リアルタイムMVC Webアプリケーション
 
CSS Design and Programming
CSS Design and ProgrammingCSS Design and Programming
CSS Design and Programming
 
20141206 handson
20141206 handson20141206 handson
20141206 handson
 
Oktopartial Introduction
Oktopartial IntroductionOktopartial Introduction
Oktopartial Introduction
 
なんでCSSすぐ死んでしまうん
なんでCSSすぐ死んでしまうんなんでCSSすぐ死んでしまうん
なんでCSSすぐ死んでしまうん
 
dodaiのProvisioning周辺探訪 - dodai勉強会 #4
dodaiのProvisioning周辺探訪 - dodai勉強会 #4dodaiのProvisioning周辺探訪 - dodai勉強会 #4
dodaiのProvisioning周辺探訪 - dodai勉強会 #4
 
Web Basics 2013-01-10
Web Basics 2013-01-10Web Basics 2013-01-10
Web Basics 2013-01-10
 
Firefox5+HTML5×5
Firefox5+HTML5×5Firefox5+HTML5×5
Firefox5+HTML5×5
 
Firefoxの開発プロセス
Firefoxの開発プロセスFirefoxの開発プロセス
Firefoxの開発プロセス
 
jQuery Mobile(開発編)勉強会資料
jQuery Mobile(開発編)勉強会資料jQuery Mobile(開発編)勉強会資料
jQuery Mobile(開発編)勉強会資料
 

More from hiro345

手軽に使ってみようIoTデバイス
手軽に使ってみようIoTデバイス手軽に使ってみようIoTデバイス
手軽に使ってみようIoTデバイス
hiro345
 
Raspberry Pi を楽しもう
Raspberry Pi を楽しもうRaspberry Pi を楽しもう
Raspberry Pi を楽しもう
hiro345
 
リーダブルパスワード - SQLアンチパターンより抜粋 -
リーダブルパスワード - SQLアンチパターンより抜粋 -リーダブルパスワード - SQLアンチパターンより抜粋 -
リーダブルパスワード - SQLアンチパターンより抜粋 -
hiro345
 
Raspberry Pi and WebIOPi
Raspberry Pi and WebIOPiRaspberry Pi and WebIOPi
Raspberry Pi and WebIOPi
hiro345
 
WordPress安全運用の基礎
WordPress安全運用の基礎WordPress安全運用の基礎
WordPress安全運用の基礎
hiro345
 
Arduino、Raspberry Pi、PIC 入門以前(NSEG 2014-04-19)
Arduino、Raspberry Pi、PIC 入門以前(NSEG 2014-04-19)Arduino、Raspberry Pi、PIC 入門以前(NSEG 2014-04-19)
Arduino、Raspberry Pi、PIC 入門以前(NSEG 2014-04-19)
hiro345
 
5分でわかる! SqljockyでDart+MySQL
5分でわかる! SqljockyでDart+MySQL5分でわかる! SqljockyでDart+MySQL
5分でわかる! SqljockyでDart+MySQL
hiro345
 
15分でCakePHPを始める方法(Nseg 2013-11-09 )
15分でCakePHPを始める方法(Nseg 2013-11-09 )15分でCakePHPを始める方法(Nseg 2013-11-09 )
15分でCakePHPを始める方法(Nseg 2013-11-09 )
hiro345
 
15分で知るVagrant (NSEG 2013-08-24)
15分で知るVagrant (NSEG 2013-08-24)15分で知るVagrant (NSEG 2013-08-24)
15分で知るVagrant (NSEG 2013-08-24)
hiro345
 
Nseg20120929
Nseg20120929Nseg20120929
Nseg20120929hiro345
 
Nseg20120825
Nseg20120825Nseg20120825
Nseg20120825hiro345
 

More from hiro345 (11)

手軽に使ってみようIoTデバイス
手軽に使ってみようIoTデバイス手軽に使ってみようIoTデバイス
手軽に使ってみようIoTデバイス
 
Raspberry Pi を楽しもう
Raspberry Pi を楽しもうRaspberry Pi を楽しもう
Raspberry Pi を楽しもう
 
リーダブルパスワード - SQLアンチパターンより抜粋 -
リーダブルパスワード - SQLアンチパターンより抜粋 -リーダブルパスワード - SQLアンチパターンより抜粋 -
リーダブルパスワード - SQLアンチパターンより抜粋 -
 
Raspberry Pi and WebIOPi
Raspberry Pi and WebIOPiRaspberry Pi and WebIOPi
Raspberry Pi and WebIOPi
 
WordPress安全運用の基礎
WordPress安全運用の基礎WordPress安全運用の基礎
WordPress安全運用の基礎
 
Arduino、Raspberry Pi、PIC 入門以前(NSEG 2014-04-19)
Arduino、Raspberry Pi、PIC 入門以前(NSEG 2014-04-19)Arduino、Raspberry Pi、PIC 入門以前(NSEG 2014-04-19)
Arduino、Raspberry Pi、PIC 入門以前(NSEG 2014-04-19)
 
5分でわかる! SqljockyでDart+MySQL
5分でわかる! SqljockyでDart+MySQL5分でわかる! SqljockyでDart+MySQL
5分でわかる! SqljockyでDart+MySQL
 
15分でCakePHPを始める方法(Nseg 2013-11-09 )
15分でCakePHPを始める方法(Nseg 2013-11-09 )15分でCakePHPを始める方法(Nseg 2013-11-09 )
15分でCakePHPを始める方法(Nseg 2013-11-09 )
 
15分で知るVagrant (NSEG 2013-08-24)
15分で知るVagrant (NSEG 2013-08-24)15分で知るVagrant (NSEG 2013-08-24)
15分で知るVagrant (NSEG 2013-08-24)
 
Nseg20120929
Nseg20120929Nseg20120929
Nseg20120929
 
Nseg20120825
Nseg20120825Nseg20120825
Nseg20120825
 

Recently uploaded

遺伝的アルゴリズムと知識蒸留による大規模言語モデル(LLM)の学習とハイパーパラメータ最適化
遺伝的アルゴリズムと知識蒸留による大規模言語モデル(LLM)の学習とハイパーパラメータ最適化遺伝的アルゴリズムと知識蒸留による大規模言語モデル(LLM)の学習とハイパーパラメータ最適化
遺伝的アルゴリズムと知識蒸留による大規模言語モデル(LLM)の学習とハイパーパラメータ最適化
t m
 
キンドリル ネットワークアセスメントサービスご紹介 今のネットワーク環境は大丈夫? 調査〜対策までご支援します
キンドリル ネットワークアセスメントサービスご紹介 今のネットワーク環境は大丈夫? 調査〜対策までご支援しますキンドリル ネットワークアセスメントサービスご紹介 今のネットワーク環境は大丈夫? 調査〜対策までご支援します
キンドリル ネットワークアセスメントサービスご紹介 今のネットワーク環境は大丈夫? 調査〜対策までご支援します
Takayuki Nakayama
 
JSAI_類似画像マッチングによる器への印象付与手法の妥当性検証_ver.3_高橋りさ
JSAI_類似画像マッチングによる器への印象付与手法の妥当性検証_ver.3_高橋りさJSAI_類似画像マッチングによる器への印象付与手法の妥当性検証_ver.3_高橋りさ
JSAI_類似画像マッチングによる器への印象付与手法の妥当性検証_ver.3_高橋りさ
0207sukipio
 
Generating Automatic Feedback on UI Mockups with Large Language Models
Generating Automatic Feedback on UI Mockups with Large Language ModelsGenerating Automatic Feedback on UI Mockups with Large Language Models
Generating Automatic Feedback on UI Mockups with Large Language Models
harmonylab
 
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアルLoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
CRI Japan, Inc.
 
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
Toru Tamaki
 
This is the company presentation material of RIZAP Technologies, Inc.
This is the company presentation material of RIZAP Technologies, Inc.This is the company presentation material of RIZAP Technologies, Inc.
This is the company presentation material of RIZAP Technologies, Inc.
chiefujita1
 
ReonHata_便利の副作用に気づかせるための発想支援手法の評価---行為の増減の提示による気づきへの影響---
ReonHata_便利の副作用に気づかせるための発想支援手法の評価---行為の増減の提示による気づきへの影響---ReonHata_便利の副作用に気づかせるための発想支援手法の評価---行為の増減の提示による気づきへの影響---
ReonHata_便利の副作用に気づかせるための発想支援手法の評価---行為の増減の提示による気づきへの影響---
Matsushita Laboratory
 

Recently uploaded (8)

遺伝的アルゴリズムと知識蒸留による大規模言語モデル(LLM)の学習とハイパーパラメータ最適化
遺伝的アルゴリズムと知識蒸留による大規模言語モデル(LLM)の学習とハイパーパラメータ最適化遺伝的アルゴリズムと知識蒸留による大規模言語モデル(LLM)の学習とハイパーパラメータ最適化
遺伝的アルゴリズムと知識蒸留による大規模言語モデル(LLM)の学習とハイパーパラメータ最適化
 
キンドリル ネットワークアセスメントサービスご紹介 今のネットワーク環境は大丈夫? 調査〜対策までご支援します
キンドリル ネットワークアセスメントサービスご紹介 今のネットワーク環境は大丈夫? 調査〜対策までご支援しますキンドリル ネットワークアセスメントサービスご紹介 今のネットワーク環境は大丈夫? 調査〜対策までご支援します
キンドリル ネットワークアセスメントサービスご紹介 今のネットワーク環境は大丈夫? 調査〜対策までご支援します
 
JSAI_類似画像マッチングによる器への印象付与手法の妥当性検証_ver.3_高橋りさ
JSAI_類似画像マッチングによる器への印象付与手法の妥当性検証_ver.3_高橋りさJSAI_類似画像マッチングによる器への印象付与手法の妥当性検証_ver.3_高橋りさ
JSAI_類似画像マッチングによる器への印象付与手法の妥当性検証_ver.3_高橋りさ
 
Generating Automatic Feedback on UI Mockups with Large Language Models
Generating Automatic Feedback on UI Mockups with Large Language ModelsGenerating Automatic Feedback on UI Mockups with Large Language Models
Generating Automatic Feedback on UI Mockups with Large Language Models
 
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアルLoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
 
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
論文紹介:Deep Learning-Based Human Pose Estimation: A Survey
 
This is the company presentation material of RIZAP Technologies, Inc.
This is the company presentation material of RIZAP Technologies, Inc.This is the company presentation material of RIZAP Technologies, Inc.
This is the company presentation material of RIZAP Technologies, Inc.
 
ReonHata_便利の副作用に気づかせるための発想支援手法の評価---行為の増減の提示による気づきへの影響---
ReonHata_便利の副作用に気づかせるための発想支援手法の評価---行為の増減の提示による気づきへの影響---ReonHata_便利の副作用に気づかせるための発想支援手法の評価---行為の増減の提示による気づきへの影響---
ReonHata_便利の副作用に気づかせるための発想支援手法の評価---行為の増減の提示による気づきへの影響---
 

Frontend framework and Template

  • 1. Front-end Framework & Template Foundation, Gumby, HTML5 Boilerplate SSS(G) hiro345
  • 2. 自己紹介 twitter: @hiro345 執筆活動: 日経Linux、@IT 興味のある分野: Raspberry Pi、Java、Dart、 Linux、Web技術一般 blog: http://www.sssg.org/blogs/hiro345/
  • 3. 紹介するもの • Foundation | The Most Advanced Responsive Front-end Framework from ZURB http://foundation.zurb.com/ • Gumby - A Flexible, Responsive CSS Framework - Powered by Sass http://gumbyframework.com/ • HTML5 Boilerplate: The web’s most popular front-end template http://html5boilerplate.com/
  • 4. Foundation • MITライセンス • index.html が参考になる • ダウンロードをして展開をする。下記のようにす ると、founcationに展開される。 • $ wget http://foundation.zurb.com/develop/download.html $ mkdir foundation $ cd foundation $ unzip ../foundation-5.4.0.zip
  • 5. Foundationで紹介する機能 • グリッドシステム http://foundation.zurb.com/docs/components/grid.html • パネル http://foundation.zurb.com/docs/components/panels.html • ボタン http://foundation.zurb.com/docs/components/buttons.html • ナビゲーション(トップバー) http://foundation.zurb.com/docs/components/topbar.html
  • 6. Foundation 基本コード <!doctype html> <html class="no-js" lang="ja"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>タイトル</title> <link rel="stylesheet" href="css/foundation.css" /> <script src="js/vendor/modernizr.js"></script> </head> <body> <script src="js/vendor/jquery.js"></script> <script src="js/foundation.min.js"></script> <script> $(document).foundation(); </script> </body> </html>
  • 7. Foundationのグリッドシステム <div class="row"> <div class="small-2 large-4 columns"><div class="panel">s2 l4 columns</div></div> <div class="small-4 large-4 columns"><div class="panel">s4 l4</div></div> <div class="small-6 large-4 columns"><div class="panel">s6 l4</div></div> </div> <div class="row"> <div class="large-3 columns"><div class="panel">large-3</div></div> <div class="large-6 columns"><div class="panel">large-6</div></div> <div class="large-3 columns"><div class="panel">large-3</div></div> </div> <div class="row"> <div class="small-6 large-2 columns"><div class="panel">s6 l2</div></div> <div class="small-6 large-8 columns"><div class="panel">s6 l8</div></div> <div class="small-12 large-2 columns"><div class="panel">s12 l2</div></div> </div> <div class="row"> <div class="small-3 columns"><div class="panel">s3</div></div> <div class="small-9 columns"><div class="panel">s9</div></div> </div> <div class="row"> <div class="large-4 columns"><div class="panel">l4</div></div> <div class="large-8 columns"><div class="panel">l8</div></div> </div> <div class="row"> <div class="small-6 large-5 columns"><div class="panel">s6 l5</div></div> <div class="small-6 large-7 columns"><div class="panel">s6 l7</div></div> </div> <div class="row"> <div class="large-6 columns"><div class="panel">l6</div></div> <div class="large-6 columns"><div class="panel">l6</div></div> </div> *サンプルにパネルを追加して表示を見やすくしました
  • 9. Foundationでのパネル <div class="row"> <div class="large-3 columns"> <div class="panel">regular panel</div> </div> <div class="large-3 columns"> <div class="panel callout">callout panel</div> </div> <div class="large-3 columns"> <div class="panel radius">panel radius</div> </div> <div class="large-3 columns"> <div class="panel callout radius">panel callout radius</div> </div> </div> *callout は目立たせたいときに使う *radiusは角がちょっと丸くなる
  • 11. Foundationボタン <a href="#" class="tiny button">Tiny Button</a><br/> <a href="#" class="small button">Small Button</a><br/> <a href="#" class="medium button">Medium Button</a><br/> <a href="#" class="large button">Large Button</a><br/> <a href="#" class="small radius button">Small Radius Button</a><br/> <a href="#" class="small round button">Small Round Button</a><br/> <a href="#" class="medium success button">Medium Success</a><br/> <a href="#" class="medium alert button">Medium Alert Button</a><br/> <a href="#" class="medium secondary button">Secondary Button</a></p> <a href="#" class="medium button disabled">Medium Disabled Button</a></p> <a href="#" class="medium button expand">Medium Expanded Button</a></p> *サイズはtiny, small, medium, large *色をつけるにはsuccess, alert, secondary *角を丸めるにはradius, round *無効ボタンはdisabled *画面いっぱい使うボタンにはexpand
  • 12.
  • 13. Foundationでのトップバー <nav class="top-bar" data-topbar role="navigation"> <ul class="title-area"> <li class="name"> <h1><a href="#">Foundationサンプル</a></h1> </li> <li class="toggle-topbar menu-icon"><a href="#"><span>メニュー</span></a></li> </ul> <section class="top-bar-section"> <!-- 右側のナビ--> <ul class="right"> <li class="active"><a href="sample_buttons.html">sample_buttons.html(Active)</a></li> <li class="has-dropdown"> <a href="#">ドロップボタン</a> <ul class="dropdown"> <li><a href="sample_grid.html">sample_grid.html</a></li> <li class="active"><a href="sample_panels.html">sample_panels.html(Active)</a></li> </ul> </li> </ul> <!-- 左側のナビ--> <ul class="left"> <li><a href="#">左側のボタン</a></li> </ul> </section> </nav>
  • 15. Gumby • MITライセンス • ダウンロードしたアーカイブファイルに含まれるdemo.html, ui.html が参 考になる • カスタムダウンロード可能 http://gumbyframework.com/customize • コードはGitHubからダウンロード可能。下記の手順だと、Gumby-2.6.3に 展開される。 $ wget -O Gumby-2.6.3.zip https://github.com/GumbyFramework/Gumby/archive/2.6.3.zip $ unzip ~/Gumby-2.6.3.zip
  • 19. Sass • Sassを使うならツールが必要。下記ではCentOSでrbenvの環境を用意し、Gemパッケージの compass、sass、modular-scaleをインストール • compass compileはGumby-2.6.3ディレクトリをカレントにして実行 • compass watchを実行しておくと、sassファイルの更新を監視して自動でCSS生成 • カスタマイズは、Gumby-2.6.3/sass/_custom.scss に記述すること $ sudo yum -y install git $ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile $ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile $ exec $SHELL -l $ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build $ rbenv install 2.1.2 $ rbenv global 2.1.2 $ gem install compass modular-scale sass $ compass compile $ compass watch
  • 20. HTML5 Boilerplate • MITライセンス • シンプルでわかりやすい • カスタマイズ可能 http://initializr.com/ • コードはGitHubからダウンロード可能。下記で用意すると 、html5-boilerplate-4.3.0というディレクトリに展開される $ wget -O html5-boilerplate-4.3.0.zip https://github.com/h5bp/html5-boilerplate/archive/v4.3.0.zip $ unzip ../html5-boilerplate-4.3.0.zip
  • 21. HTML5 Boilerplate 特長 •HTML5対応 •主要ブラウザ対応 Chrome, Opera, Safari, Firefox 3.6+, IE6+ •CSSを標準化するNormalize.css を同梱 http://necolas.github.com/normalize.css/ •最新のjQueryのCDN版を利用可能。 *ローカル用も同梱(4.3.0ではjquery-1.10.2.min.js) http://jquery.com/ •最新のModernizr(4.3.0ではmodernizr-2.6.2.min.js)を採用 http://modernizr.com/
  • 22. HTML5 Boilerplateの ファイル基本構成 . ├── css │ ├── main.css │ └── normalize.css ├── doc ├── img ├── js │ ├── main.js │ ├── plugins.js │ └── vendor │ ├── jquery.min.js │ └── modernizr.min.js ├── .htaccess ├── 404.html ├── apple-touch-icon-precomposed.png ├── index.html ├── humans.txt ├── robots.txt ├── crossdomain.xml └── favicon.ico index.html 404.html
  • 23. HTML5 Boilerplate 基本コード <!DOCTYPE html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>サンプル</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <script src="js/vendor/modernizr-2.6.2.min.js"></script> </head> <body> <p>Hello world! This is HTML5 Boilerplate.</p> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script> window.jQuery || document.write('<script src=“js/vendor/jquery-1.10.2.min.js”></script>') </script> <script src="js/plugins.js"></script> <script src="js/main.js"></script> </body> </html>
  • 24. 同梱のindex.htmlに記述されて いるその他のコード <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset=“utf-8"> (略) </head> <body> <!--[if lt IE 7]> <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <![endif]--> <p>Hello world! This is HTML5 Boilerplate.</p> (略) <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> <script> (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); ga('create','UA-XXXXX-X');ga('send','pageview'); </script> </body> </html>
  • 25. まとめ • 用途に応じてフレームワークを選択しよう • HTML5 Boilerplateのようなものも利用すると最新動向をチェックしなくて 作り始めることができるので、短納期・短期間公開のWebページ(イベン ト告知ページなど)には便利 • フロントエンドのフレームワークをカスタマイズするにはSassなどが必須 • ツールはYEOMANを使うのがいいかもしれない。 検索すると下記がある模様 yeoman-foundation generator-gumby generator-h5bp *The web's scaffolding tool for modern webapps | Yeoman: http://yeoman.io/