WebTecNote
[HTML] パンくずリンクについてのまとめと考察
- 2010-12-28 (火)
- HTML&XHTML
パンくずリンク|パンくずリスト(breadcrumb navigation)はどうコーディングするのが今風なんだろう。
ふとそんなことを思い立ってしまったので、名を知られたサイトのソースを覗き見して考えることにした。
パンくずリンクのデザインについてまとめられたBreadcrumbs In Web Design: Examples And Best Practicesという記事によれば、
よくあるデザインパターンは次の通りである。
- 1行テキスト
テキストを横並びにしただけの伝統的なパンくず。各ページリンクの間に区切り文字が入る。- ページタイトルを > で繋いだもの
- ページタイトルを > 以外の文字で繋いだもの
- シンプルなリンクの羅列
区切り文字を入れずに画像やCSSで階層を表現する。 - マルチステップ
開始から完了までの行程を表示する。 - サブナビゲーションつき
各ページリンクに属するページをマウスオーバーで表示する。 - インタラクティブなアクションつき
deliciousのパンくずリンクは階層表示とタグの絞込みを兼ねている - 実験的なもの
Booreilandはナビゲーションがパンくずリンクっぽい。
割合についてはWeb Design PracticesのBreadcrumb Navigationという記事が参考になるかも。
圧倒的に水平+右矢印のデザインが多い。
- Comments: 0
- Trackbacks: 0
[Google Analytics] 3年分のブラウザシェア推移を出してみた
- 2010-12-28 (火)
- Memo
まとりさんがTwitterで晒してた統計に便乗して自分のブログのをみてみたら、
なかなか面白かったのでもうちょっと細かく晒しておこうと思いますー。
データは直近1か月(11/26-12-26)が3年分です。
- Comments: 0
- Trackbacks: 0
[CSS3] Xmas Gift Box
- 2010-12-22 (水)
- CSS
去年イラレでクリスマス用のプレゼントボックスを描いたので、
じゃあ今年はCSSで描こうと思って実践してみたのがこれです。
CSS3 Xmas Gift Box - jsdo.it - share JavaScript, HTML5 and CSS
CSS3で立方体を表現するので有名なのはtransformによる3D Cubeですが
クォータービューより正面から見た立体の方が好きかな~と思ったので、台形で立体っぽくすべく
背景色と同じ色の:before、:after擬似要素を次のように被せて削ってます。

もっとごちゃごちゃとDivを使ったりJavaScriptを使ったりすればよりリアルな表現が出来そうだけど、
あんまりソースがスパゲッティになると美しくないので最低限必要なものだけにしといた。
アニメーションは当初フタが右方向に回転しながらパカッと開くのを想定してました。(ヘーベルハウスのハーイ!みたいな感じ)
これが実際やってみると擬似クラス要素にtransitionが効かないし、元々rotateしてある要素を改めて回転させるのが面倒だったので上方向にパカッとするので落ち着いた次第。
- Comments: 0
- Trackbacks: 0
[ZF] Zend_Form : Remove the submit-button value from url parameters
- 2010-11-26 (金)
- Zend Framework
Zend_Formでフォームエレメントを作る場合にはnameが必須なんだけど、
GET送信するとnameがあるばかりにボタンまでURLに含まれてしまうので
Redirectorによる回避策を試してみた。
検索のフォーム。methodをpostにする。
-
class Application_Form_Search extends Zend_Form
-
{
-
functions init(){
-
$this->setMethod('post')
-
->clearDecorators()
-
->addDecorator('FormElements')
-
->addDecorator('Form');
-
-
'label' => 'Keyword',
-
'required' => true
-
));
-
-
$this->addElement('submit',
-
'submit',
-
'label' => 'Search',
-
'required' => false,
-
'ignore' => true
-
)
-
);
-
}
-
}
検索する場所は仮にindexとして、index.phtmlには検索フォームを表示しておく。
getRequest()->isPost()で送信された値があり、バリーデーションもtrueなら
送信された値($params)からボタンを削除(unset)する。
アクションヘルパーのRedirectorに$paramsを渡してsearchActionにリダイレクトする。
-
public function indexAction()
-
{
-
$this->view->searchForm = $this->_searchForm;
-
-
$request = $this->getRequest();
-
$params = $request->getPost();
-
-
if($request->isPost() && $this->_searchForm->isValid($params)){
-
$this->_helper->Redirector->setGotoSimple('search', null, null, $params);
-
}else{
-
$this->view->data = $this->_mapper->fetchAll();
-
}
-
}
※$this->_searchForm ---> instance of Application_Form_Search
※$this->_mapper ---> instance of DataMapper
searchActionに飛ばされた時、検索キーはZendライクなGETパラメーター(/key/value/のパターン)になっているので、
getRequest()->getParams()でキーワードとかを取り出して使う。
-
public function searchAction()
-
{
-
$request = $this->getRequest();
-
$params = $request->getParams();
-
-
$this->view->data = $this->_mapper->search($params);
-
$this->view->searchForm = $this->_searchForm->populate($params);
-
-
$this->render('index');
-
-
}
- Comments: 0
- Trackbacks: 0
[ZF] Zend_View HeadTitle method tips
- 2010-11-24 (水)
- Zend Framework
ページタイトルの設定をするビューヘルパーのHeadTitleについていろいろ。
基本
headTitleでページタイトルを設定。
controller:
-
$this->view->headTitle('Site Name');
Output:
-
<title>Site Name</title>
- Comments: 0
- Trackbacks: 0
-
- まとめ
- ホームページビルダー
- 初音ミク
- 擬似クラス
- 楽天
- 1Column
- 2BOX
- 2ch
- 2column
- 2Helvs
- 3column
- 5BOX
- Actionscript
- Ajax
- Android
- Animation
- AntiSpam
- API
- apple
- Aptana
- Aqua
- ASCII
- Assets
- Audio
- AutoExternalLink
- backbone.js
- background
- backup
- BETA
- Blog Status
- breadcrumb
- Bubble
- bug
- Button
- calendar
- Calendarizm
- canvas
- Center
- Chain
- Chrome
- Class
- Click Event
- CMS
- ColorMeShopPro
- Compass
- ContactForm
- contest
- Control
- Cookie
- CSS
- CSS3
- CSV
- Custom
- date()
- Demo
- Dojo
- domain
- Download
- Drag&Drop
- Dreamweaver
- dropdown
- Dummy Text
- Effect
- Elastic
- Error
- File API
- Filter
- filter.html
- FireFox
- Fixed
- Flash
- Floating
- foglio
- Form
- free material
- free script
- Function Reference
- Fx.Morph
- Fx.Scroll
- Fx.Slide
- Fx.Tween
- Game
- gettext
- get_posts
- GMarker
- Go-To-Top
- GoogleChart
- GoogleEarth
- GoogleMap
- GoogleSearch
- GoogleSpredsheet
- Hack
- Halves
- Highlight
- Horizontal
- HTML&XHTML
- HTML5
- HTML5API
- Icon
- IE
- illustrator
- infowindow
- iphone
- iScroll
- Javascript
- jQuery
- jQuery.plugin
- jsdo.it
- KML
- LeftMenu
- liquid
- ListMenu
- Localization
- login-system
- Magpie RSS
- Mobile
- mooFollow
- MooTools
- mooTyping
- number format()
- OnlineGame
- OOP
- OpenPNE
- Pagenation
- permalink
- Photoshop
- PHP
- ping
- plugin
- poedit
- Polyline
- prototype.js
- Regular Expression
- RightMenu
- rollover
- RPC
- RSS
- Safari
- Sample
- Sass
- script.aculo.us
- scrollbar
- selection
- selectors
- SEO
- session
- Shortcode
- Sidebar Widgets
- slimbbs
- Smarty
- SmoothScroll
- strtotime()
- Symphony-CMS
- Tableless
- Tab Menu
- Tar
- Template
- Template Engine
- Template Tags
- time()
- TinyMCE
- token
- Tooltip
- Transparent
- Tutorial
- Tutoriarl
- underscore.js
- userAgent
- Valid
- Validator
- vertical-align
- Video
- Web Browser
- Web Site
- Wiki
- window.open
- wordpress
- wp-custom
- wp-function
- wp-plugin
- wp-themes
- xampp
- XHTML
- XML
- Xserver
- YouTube
- YUI
- Zend Framework
- Zend_Form
- Zend_View
- zeromail