Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AMP開発におけるデザイナーとエンジニアの役割

 AMP開発におけるデザイナーとエンジニアの役割

AMP Roadshow Tokyo にて
一休のAMP初出しセッション

https://events.withgoogle.com/amp-roadshow-tokyo/

Avatar for yakisoba

yakisoba

April 27, 2018

More Decks by yakisoba

Other Decks in Programming

Transcript

  1. 一休レストラン x AMP
 本題に入る前に... ◢ レストランガイドページをAMP化
 ◢ Rich Card x

    AMP
 ◢ <amp-iframe>でプラン情報を取得
 ◢ amp web クロスドメイントラッキング
 
 
 amp-iframeでの表示

  2. 一休トラベル x Full AMP
 本題に入る前に... ◢ Canonical / Responsive AMP


    ◢ amp-toolbox-optimizerを使っての高速化
 ◢ UX向上のため画像表示待ちを工夫
 ◢ まだまだ試験的なページ
 画像表示待ちの工夫
 srcset使ってますw
 before
 after
 optimizer

  3. 一休トラベル x AMP Stories
 本題に入る前に... ◢ 実験的に公開中
 ◢ ampstory内のリンク要素を提案
   <amp-story-cta-layer>


    ◢ 高級宿の素材を生かせるページができる
 ◢ AMPとしての表示はまだ出来てない
 ◢ 日本への展開期待
 
 Ampstory内のリンク要素 
 thanks Lisa!!
 thanks Yusuke!!
 

  4. <amp-carousel width="1024" height="480" layout="responsive" type="slides" autoplay> <amp-img src="spot1.jpg" layout="fill"></amp-img> <amp-img

    src="spot2.jpg" layout="fill"></amp-img> <!-- この形式で画像をどんどん追加 --> </amp-carousel> Q1.カルーセル デザイナー
  5. <amp-video controls loop width="1" height="0.6" layout="responsive" poster="<!-- img -->" >

    <source type="video/mp4" src="<!-- video -->" /> </amp-carousel> Q2.ビデオ デザイナー
  6. <amp-animation id="fuwatto" layout="nodisplay"> <script type="application/json"> </script> <!-- アニメーションの設定 --> selector=".fuwatto-target"

    <!-- アニメーションの設定 --> </amp-animation> <amp-position-observer on="scroll:fuwatto.start" intersection-ratios="0.01" layout="nodisplay" > </amp-position-observer> <ul> <li class="fuwatto-target"><!-- element --></li> <li class="fuwatto-target"><!-- element --></li> </ul> Q3.ふわっと感 デザイナー
  7. <amp-list template="list" item="Suggest" layout="flex-item" src="/suggest?q=" [src]="'/suggest?q=' + (autosuggest || '')"

    hidden [hidden]="!search_active" > <template type="amp-mustache"> <a href="/search?kwd={{Name}}"> {{Name}} </a> </template> </amp-list> Q4.検索 エンジニア
  8. <amp-carousel controls loop height="254" layout="fixed-height" type="slides"> <div> <amp-img src="画像1枚目" layout="fill"></amp-img>

    <amp-img src="画像2枚目" layout="fill"></amp-img> <amp-img src="画像3枚目" layout="fill"></amp-img> <amp-img src="画像4枚目" layout="fill"></amp-img> <amp-img src="画像5枚目" layout="fill"></amp-img> <amp-img src="画像6枚目" layout="fill"></amp-img> </div> </amp-carousel> Q1.スライダーを動的にしたい
  9. Q1.スライダーを動的にしたい <amp-list src="フォトギャラリーAPI" height=”254” layout=”fixed-height” single-item> <template type="amp-mustache"> <!-- amp-carousel

    --> </template> </amp-list> <amp-carousel controls loop height="254" layout="fixed-height" type="slides"> {{#photos}} <div> <amp-img src="{{ImageUrl}}" layout="fill" alt="{{ImageAlt}}"></amp-img> </div> {{/photos}} </amp-carousel> amp-carousel
  10. <amp-carousel controls loop height="254" layout="fixed-height" type="slides" on="slideChange:AMP.setState({ GuideState: { header:

    { selectedSlide:event.index, Is_slide:true } }}) > ~略~ </amp-carousel> Q2.スライダーに画像の枚数を表示させたい
  11. Q2.スライダーに画像の枚数を表示させたい <amp-state id="GuideTopPhotoUrl" src="フォトギャラリーAPI"></amp-state> <!-- amp-carousel --> <div> <span [text]="!GuideState.header.is_slide

    ? '' : (GuideState.header.selectedSlide + 1) + '/' + (GuideTopPhotoUrl.items.photos.length + 1) "> </span> </div> 取得した位置/amp-stateで取得した件数 = リストで枚数表示を作る
  12. Q3.料金は最新の情報が欲しい <amp-list class=”roomList” src="部屋取得API” layout="flex-item" Single-item> <template type="amp-mustache"> {{#GuideRoom} <div>

    {{AccommodationName}} {{Amount}}円 </div> {{/GuideRoom}} </template> </amp-list> amp-list.roomList { min-height: 100px; } CSS