|
| 1 | +--- |
| 2 | +layout: wide_index |
| 3 | +theme: responsive |
| 4 | +title: "<%= hoc_s(:front_title) %>" |
| 5 | +social: |
| 6 | + "og:title": "<%= hoc_s(:meta_tag_og_title) %>" |
| 7 | + "og:description": "<%= hoc_s(:meta_tag_og_description) %>" |
| 8 | + "og:image": "http://<%=request.host%>/images/code-video-thumbnail.jpg" |
| 9 | + "og:image:width": 1440 |
| 10 | + "og:image:height": 810 |
| 11 | + "og:url": "http://<%=request.host%>" |
| 12 | + |
| 13 | + "twitter:card": player |
| 14 | + "twitter:site": "@codeorg" |
| 15 | + "twitter:url": "http://<%=request.host%>" |
| 16 | + "twitter:title": "<%= hoc_s(:meta_tag_twitter_title) %>" |
| 17 | + "twitter:description": "<%= hoc_s(:meta_tag_twitter_description) %>" |
| 18 | + "twitter:image:src": "http://<%=request.host%>/images/code-video-thumbnail.jpg?456" |
| 19 | + "twitter:player": 'https://www.youtubeeducation.com/embed/FC5FbmsH4fw?iv_load_policy=3&rel=0&autohide=1&showinfo=0' |
| 20 | + "twitter:player:width": 1920 |
| 21 | + "twitter:player:height": 1080 |
| 22 | +--- |
| 23 | + |
| 24 | +-facebook = {:u=>"http://#{request.host}/us"} |
| 25 | + |
| 26 | +-twitter = {:url=>"http://hourofcode.com", :related=>'codeorg', :hashtags=>'', :text=>hoc_s(:twitter_default_text)} |
| 27 | +-twitter[:hashtags] = 'HourOfCode' unless hoc_s(:front_header_banner).include? '#HourOfCode' |
| 28 | + |
| 29 | +%script{type: "text/javascript", src: "/js/sifter.min.js"} |
| 30 | +%script{type: "text/javascript", src: "/js/microplugin.min.js"} |
| 31 | +%script{type: "text/javascript", src: "https://maps.googleapis.com/maps/api/js?client=#{CDO.google_maps_client_id}&sensor=false&libraries=places,geometry&v=3.7"} |
| 32 | +%script{type: "text/javascript", src: "/js/jquery.geocomplete.min.js"} |
| 33 | + |
| 34 | +%link{rel: "stylesheet", type: "text/css", href: "/css/selectize.bootstrap3.css"}/ |
| 35 | + |
| 36 | +/[if lt IE 9] |
| 37 | + %script{src: "/js/es5-shim.min.js"} |
| 38 | +
|
| 39 | +:css |
| 40 | + html, body, #gmap { |
| 41 | + height: 100%; |
| 42 | + margin: 0px; |
| 43 | + padding: 0px; |
| 44 | + } |
| 45 | +
|
| 46 | +- imageheight = 590 |
| 47 | +
|
| 48 | +#top{style: "position:relative; /*height: #{imageheight}px; */ width:100%; overflow:hidden"} |
| 49 | + #fullwidth0{style: "z-index: -5; position:absolute; left: 0; top: 0; background-image: url(http://github.com/'/images/the-world.jpg'); background-repeat: no-repeat; background-size: cover; width: 100%; height:100%; opacity: 1; background-position: 0% 0%"} |
| 50 | +
|
| 51 | + #fullwidth1{style: "z-index: -5; position:absolute; left:0; top: 0; background-image: url(http://github.com/'/images/girl-learning.jpg'); background-repeat: no-repeat; background-size: cover; width: 100%; height:100%; opacity: 0; background-position: 50% 50%"} |
| 52 | +
|
| 53 | + #fullwidth2{style: "z-index: -5; position:absolute; left:0; top: 0; background-image: url(http://github.com/'/images/kids-learning.jpg'); background-repeat: no-repeat; background-size: cover; width: 100%; height:100%; opacity: 0; background-position: 30% 40%"} |
| 54 | +
|
| 55 | + #fullwidth3{style: "z-index: -5; position:absolute; left: 0; top: 0; background-image: url(http://github.com/'/images/boy-certificate.jpg'); background-repeat: no-repeat; background-size: cover; width: 100%; height:100%; opacity: 0; background-position: 40% 50%"} |
| 56 | +
|
| 57 | + #fullwidth{style: "/*position:absolute; left:0; top: 0; */width: 100%; /*height:#{imageheight}px*/"} |
| 58 | + |
| 59 | + .thegap{style: "height: 1px"} |
| 60 | + |
| 61 | + |
| 62 | + = view :header |
| 63 | + |
| 64 | + .container |
| 65 | + .row |
| 66 | + .col-sm-6.col-xs-12.col-md-7 |
| 67 | + #leftbox{style: "position:relative; margin-top:50px; padding-bottom:20px; /*background-color:rgba(0,0,0,0.5);*/"} |
| 68 | +
|
| 69 | + #leftvideo{style: "/*position:absolute; left:0; top:0; */ width: 100%; /* margin-top:50px*/"} |
| 70 | + = view :index_video |
| 71 | + -#%br/ |
| 72 | + -#%br/ |
| 73 | + %div{style:"clear:both"} |
| 74 | + #leftbutton{style: "position:absolute; left:0; top:0; text-align:center; /*margin-top:100px; */ width:100%"} |
| 75 | + %h1.front-header-banner{style: "color:white; text-shadow: 0px 0px 4px rgba(31, 31, 31, 1); margin-top: 0px; margin-bottom:10px; padding:20px"}=hoc_s(:front_watch_video) |
| 76 | + %img{src: "/images/play-button.png", width: "120", onclick: "return startVideo();", style: "cursor: pointer"} |
| 77 | + .col-sm-6.col-xs-12.col-md-5 |
| 78 | + #textbacking{style: "color:white; background-color:rgba(0,0,0,0.5); margin-top:50px; padding: 20px; border-radius: 17px"} |
| 79 | + %div.front-header-banner{style: "color:white; margin-top:0px"} |
| 80 | + =I18n.t(:n_have_learned_an_hoc).gsub("#", format_integer_with_commas(fetch_hoc_metrics['started']).to_s) |
| 81 | + %h4 |
| 82 | + =I18n.t :anybody_can_learn |
| 83 | + #joinustext{style: "font-size: 18px; font-weight: 500"} |
| 84 | + %div{style: "width: 100%; text-align: center"} |
| 85 | + %a#trybutton{href: "http://#{codeorg_url()}/learn", target: "_blank", style: "text-decoration:none"} |
| 86 | + %button.btn.btn-default{style: "font-size: 18px; font-weight: 500; padding-left: 30px; padding-right: 30px; height: 40px;"} |
| 87 | + =I18n.t :get_started |
| 88 | + |
| 89 | + #remainder{style: "text-align:center; margin-top: 15px;"} |
| 90 | + %a{:href=>"http://#{codeorg_url()}/learn/beyond", :style=>'font-size: 16px; color: white'} |
| 91 | + =I18n.t :beyond_an_hour |
| 92 | + =view :share_buttons, facebook:facebook, twitter:twitter |
| 93 | + %br/ |
| 94 | + %br/ |
| 95 | + |
| 96 | + %div{style:"clear:both"} |
| 97 | + |
| 98 | + |
| 99 | +%br/ |
| 100 | +%br/ |
| 101 | + |
| 102 | +.container |
| 103 | + |
| 104 | + #description.row |
| 105 | + .col-xs-1 |
| 106 | + |
| 107 | + .col-xs-10{style: "text-align: center; font-size: 24px; line-height:30px; font-weight: 500; color: rgb(26,172,186)"} |
| 108 | + =hoc_s(:front_intro_default) |
| 109 | +
|
| 110 | + #maparea |
| 111 | + =view :map |
| 112 | +
|
| 113 | + %h2{style: 'text-align: center;'} Lianne Dalziel, Mayor of Christchurch, tried the Hour of Code |
| 114 | +
|
| 115 | + %div{style: "text-align:center"} |
| 116 | + %div{style: "width: 720px; height: 405px; margin: 0 auto;"} |
| 117 | + %div{style: "position:relative"} |
| 118 | + %img{style: "display:block; width:100%; height:auto", src: "/images/16x9.png"}/ |
| 119 | + %iframe{style: "position:absolute; top: 0; left: 0; width: 720px; height: 405px", src: "https://www.youtubeeducation.com/embed/Bixn2TM8l88?iv_load_policy=3&rel=0&autohide=1&showinfo=0", frameborder: "0", allowfullscreen: true} |
| 120 | +
|
| 121 | + .row |
| 122 | + .col-xs-12 |
| 123 | + %div{style: 'text-align: center; margin: 3em 0;'} |
| 124 | + %h2=hoc_s(:stats_hoc_2013_heading) |
| 125 | +
|
| 126 | + .row#infotop{style: "/*margin: 0 auto; width: 900px; */ font-weight: 500; font-size: 16px; color: rgb(26, 172, 186)"} |
| 127 | + .col-xs-6.col-sm-4{style: "text-align:center;"} |
| 128 | + %p=hoc_s(:stats_growth) |
| 129 | + %img{src: "/images/stats-info1.jpg", style: "width: 100%"} |
| 130 | +
|
| 131 | + .col-xs-6.col-sm-4{style: "text-align:center"} |
| 132 | + %p=hoc_s(:stats_global) |
| 133 | + %img{src: "/images/stats-info2.jpg", style: "width: 100%"} |
| 134 | +
|
| 135 | + .hidden-xs.col-sm-4{style: "text-align:center"} |
| 136 | + %p=hoc_s(:stats_girls_more) |
| 137 | + %img{src: "/images/stats-info3.jpg", style: "width: 100%"} |
| 138 | +
|
| 139 | + %p{style:"color: #ea7717;"}=hoc_s(:stats_girls_million) |
| 140 | + |
| 141 | + .row#infobottom{style: "/*margin: 0 auto; width: 800px; */ font-weight: 400; font-size: 16px; color: #ea7717;"} |
| 142 | + .col-xs-6.col-sm-4{style: "text-align:center"} |
| 143 | + %img{src: "/images/stats-kid1.jpg", style: "width: 70%"} |
| 144 | + %br/ |
| 145 | + =hoc_s(:stats_nina) |
| 146 | +
|
| 147 | + .col-xs-6.col-sm-4{style: "text-align:center"} |
| 148 | + %img{src: "/images/stats-kid2.jpg", style: "width: 70%"} |
| 149 | + %br/ |
| 150 | + =hoc_s(:stats_student) |
| 151 | +
|
| 152 | + .hidden-xs.col-sm-4{style: "text-align:center"} |
| 153 | + %img{src: "/images/stats-kid3.jpg", style: "width: 70%"} |
| 154 | + %br/ |
| 155 | + =hoc_s(:stats_michael) |
| 156 | +
|
| 157 | + -##join |
| 158 | + -# %h1=hoc_s(:front_join_us_button) |
| 159 | + -# %div |
| 160 | + -# .row |
| 161 | + -# .col-md-6 |
| 162 | + -# =view :signup_form |
| 163 | + -# .col-md-6 |
| 164 | + -# =view :join_us_description |
| 165 | + -# =view :whats_next |
| 166 | +
|
| 167 | + %a#faqs{name:'faq'} |
| 168 | + .row |
| 169 | + .col-xs-12 |
| 170 | + =view :faq |
| 171 | +
|
| 172 | + = view 'popup_window.js' |
| 173 | +
|
| 174 | +:javascript |
| 175 | +
|
| 176 | + function adjustScroll(destination) |
| 177 | + { |
| 178 | + $('html, body').animate({ |
| 179 | + scrollTop: $("#" + destination).offset().top |
| 180 | + }, 1000); |
| 181 | + } |
| 182 | + |
| 183 | + var currentImage = 0; |
| 184 | + var timerId; |
| 185 | + var videoStarted = false; |
| 186 | + |
| 187 | + function cycleImage() |
| 188 | + { |
| 189 | + var nextImage = (currentImage + 1) % 4; |
| 190 | + $("#fullwidth" + currentImage).fadeTo(2000, 0); |
| 191 | + $("#fullwidth" + nextImage ).fadeTo(2000, videoStarted ? 0.3 : 1); |
| 192 | + currentImage = nextImage; |
| 193 | + |
| 194 | + /*if (videoStarted) |
| 195 | + console.log("fading light to ", nextImage); |
| 196 | + else |
| 197 | + console.log("fading normal to ", nextImage);*/ |
| 198 | + } |
| 199 | + |
| 200 | + $.ready() |
| 201 | + { |
| 202 | + timerId = setInterval(cycleImage, 6000); |
| 203 | + |
| 204 | + //startVideo(); |
| 205 | + } |
| 206 | + |
| 207 | + function startVideo() |
| 208 | + { |
| 209 | + if (videoStarted) |
| 210 | + return; |
| 211 | + |
| 212 | + $("<iframe allowfullscreen frameborder='0' src='https://www.youtubeeducation.com/embed/FC5FbmsH4fw?iv_load_policy=3&rel=0&autohide=1&showinfo=0&autoplay=1&cc_load_policy=1' style='position:absolute; top: 0; left: 0; width: 100%; height: 100%; background-color:black;'></iframe>").appendTo("#videodiv"); |
| 213 | + |
| 214 | + $("#videodiv").fadeTo(1000, 1); |
| 215 | + $("#leftbutton").fadeTo(500, 0).remove(); |
| 216 | + |
| 217 | + $("#fullwidth" + currentImage).fadeTo(1000, 0.3); |
| 218 | + |
| 219 | + videoStarted = true; |
| 220 | + //cycleImage(); |
| 221 | + clearInterval(timerId); |
| 222 | + } |
0 commit comments