Skip to content
This repository was archived by the owner on Oct 17, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f32efc1
First commit
GomezMimo Oct 21, 2019
35510f8
Minor change.
GomezMimo Oct 21, 2019
f65d253
Set styles for clock mobile version.
GomezMimo Oct 21, 2019
ff4e40a
Add styles for tablet and desktop breakpoints.
GomezMimo Oct 21, 2019
49ee869
Add extra-large viewport for countdown.
GomezMimo Oct 21, 2019
22ada6d
Add extra large viewport for countdown font-size.
GomezMimo Oct 21, 2019
634dd87
Minor change in digitsHandler function.
GomezMimo Oct 21, 2019
f40a834
Add animations
GomezMimo Oct 22, 2019
268afaf
Optimize svg files.
GomezMimo Oct 22, 2019
7fc8197
Minor fix
GomezMimo Oct 22, 2019
ed6f94e
Remove unnecessary styles.
GomezMimo Oct 22, 2019
558fac1
Change variables scope.
GomezMimo Oct 22, 2019
e91124d
Merge remote-tracking branch 'origin/master' into clock
Oct 22, 2019
1917ea2
Minor css change.
GomezMimo Oct 22, 2019
5bcfdf5
Change keyframe transition.
GomezMimo Oct 22, 2019
46e374c
Adjust heading height.
GomezMimo Oct 22, 2019
4edaeaa
Add fixed with to digits container.
GomezMimo Oct 22, 2019
71a62ba
Minor change.
GomezMimo Oct 23, 2019
e91f28b
Remove unnecessary styles.
GomezMimo Oct 23, 2019
d86f41f
Refactor geometric shapes animation.
GomezMimo Oct 23, 2019
10e650f
html refactor.
GomezMimo Oct 23, 2019
23c6886
Add show_footer front-matter variable
GomezMimo Oct 23, 2019
3fc05eb
Javascript Refactor.
GomezMimo Oct 23, 2019
32fc8f2
minor css change.
GomezMimo Oct 24, 2019
8260faf
Fix 320px mobile issue.
GomezMimo Oct 24, 2019
c7ad56c
Undo .firebaserc changes.
GomezMimo Oct 24, 2019
07183d1
Minor changes.
GomezMimo Oct 24, 2019
d8b6103
First commit.
GomezMimo Oct 25, 2019
f359e42
Merge branch 'master' into clock-update
Oct 29, 2019
9c04dd9
CTA changed with animation and spaces between elements modified
Oct 30, 2019
4cdea99
CTA changed with animation and spaces between elements modified
Oct 30, 2019
bf7412e
Fixes for clock script and element position
Oct 30, 2019
c377124
Merge branch 'master' into clock-update
Oct 30, 2019
e80aa33
Slide in animations delay changed for clock
Oct 31, 2019
1c462f7
Merge branch 'clock-update' of github.com:1Iv4N/flutter.dev-website i…
Oct 31, 2019
30a4f0b
CTA copy changed
Oct 31, 2019
53aa883
Lorem text removed from banner
Oct 31, 2019
d90a862
Spaces fixed for clock and event date added
Oct 31, 2019
2ce619f
Fix for copy in title
Oct 31, 2019
d57ef6f
PR comments fixed
Nov 1, 2019
1bf8115
More comments fixed for PR
Nov 1, 2019
e919009
Merge branch 'master' into clock-update
Nov 1, 2019
85d7976
CTA z index fixed
Nov 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ defaults:
# below. To selectively enable a banner (say, on the homepage) add
# `show_banner: true` to the page's frontmatter.
show_banner: true
show_footer: true
- scope:
path: 'docs'
values:
Expand Down
214 changes: 214 additions & 0 deletions src/_assets/css/_clock.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
.clock {
$vertical-line-color: #384753;

background-color: $flutter-dark-blue-texture;
font-family: $site-font-family-alt;

.center {
align-items: center;
display: flex;
flex-direction: column;
height: calc(100vh - 66px);
justify-content: center;
}

.heading {
animation: clock-slide-in 1s .3s;
animation-fill-mode: both;
color: $site-color-white;
font-size: 18px;
margin: 0 0 24px;
text-align: center;
width: 100%;

@include media-breakpoint-up(md) {
font-size: 32px;
margin: 0 0 22px;
}

@include media-breakpoint-up(lg) {
font-size: 40px;
margin: 0 0 20px;
}
}

.time-number {
animation: clock-slide-in 1s;
animation-fill-mode: both;
color: $site-color-primary;
display: flex;
font-size: 52px;
justify-content: center;
margin: 0;
text-align: center;
width: 100%;
z-index: 2;

@include media-breakpoint-up(md) {
font-size: 110px;
}

@include media-breakpoint-up(lg) {
font-size: 160px;
}

@include media-breakpoint-up(xl) {
font-size: 180px;
}

@include media-breakpoint-up(xxl) {
font-size: 230px;
}
}

.digits_container {
display: inline-block;
width: 68px;

@include media-breakpoint-up(md) {
width: 142px;
}

@include media-breakpoint-up(lg) {
width: 200px;
}

@include media-breakpoint-up(xl) {
width: 248px;
}

@include media-breakpoint-up(xxl) {
width: 294px;
}
}

.animations {
animation-name: clock-geometric-small-background;
animation-duration: 1.2s;
animation-fill-mode: both;
animation-timing-function: cubic-bezier(.87, 1.15, 1, .99);
background-image: asset_url('clock/left_rectangle.svg'), asset_url('clock/right_rectangle.svg'), asset_url('clock/oval.svg');
background-repeat: no-repeat;
background-size: 181px 247px, 140px 121px, 280px 163px;
height: calc(100% - 66px);
overflow: hidden;
position: absolute;
top: 66px;
width: 100%;
z-index: -1;

@include media-breakpoint-up(md) {
animation-name: clock-geometric-medium-background;
background-size: 400px 556px, 317px 258px, auto;
}

@include media-breakpoint-up(lg) {
background-size: auto;
}
}

.vertical-line {
animation-duration: 1s;
animation-fill-mode: both;
animation-name: clock-vertical-lines;
animation-timing-function: ease;
background-color: $vertical-line-color;
position: fixed;
top: 0;
width: 1px;
z-index: -1;

&--first {
left: 4%;
}

&--second {
animation-delay: .2s;
left: 27%;
}

&--thrid {
animation-delay: .4s;
left: 50%;
}

&--fourth {
animation-delay: .6s;
left: 73%;
}

&--first, &--thrid {
display: none;

@include media-breakpoint-up(lg) {
display: block;
}
}
}

.share-twitter__paragraph {
animation: clock-slide-in 1s .6s;
animation-fill-mode: both;
color: $site-color-white;
font-size: 14px;
margin: 20px 0 0;
padding: 0 37px;
text-align: center;
width: 100%;

@include media-breakpoint-up(md) {
font-size: 16px;
margin: 22px 0 0;
}

@include media-breakpoint-up(lg) {
font-size: 20px;
margin: 24px 0 0;
}
}

.learn-more__button {
display: block;
margin: 0 auto;
width: 120px;
}
}

// animations
@keyframes clock-vertical-lines {
from {
height: 0;
}
to {
height: 100%;
}
}

@keyframes clock-slide-in {
from {
transform: translateY(50px);
opacity: 0;
}
to {
transform: none;
opacity: 1;
}
}

@keyframes clock-geometric-medium-background {
from {
background-position: top 150px left -270px, top right -488px, bottom -348px left -140px;
}
to {
background-position: top 150px left, top right, bottom left;
}
}

@keyframes clock-geometric-small-background {
from {
background-position: bottom 90px left -144px, top right -140px, bottom -164px left -100px;
}
to {
background-position: bottom 90px left, top right, bottom left;
}
}
5 changes: 2 additions & 3 deletions src/_assets/css/_showcase.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.showcase {
background-color: $site-color-codeblock-bg;
font-family: "Google Sans", "Roboto", sans-serif;
font-family: $site-font-family-alt;
$site-color-paragraph: #555;
$site-color-title: #212C34;

Expand Down Expand Up @@ -221,13 +221,12 @@
$image_height_lg: 350px;
$image_height_md: 280px;
$image_height_sm: 200px;
$texture-bg-color: #232C33;
$author-copy-color: #5bc8f8;
color: $site-color-white;
position: relative;

&__texture {
background: $texture-bg-color none no-repeat center;
background: $flutter-dark-blue-texture none no-repeat center;
height: 100%;
margin-left: calc(50% - 50vw);
position: absolute;
Expand Down
1 change: 1 addition & 0 deletions src/_assets/css/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ $flutter-color-blue-500: #1389FD;
$flutter-color-dark-blue: #075b9a;
$flutter-color-fuchsia: #FF2B5B;
$flutter-color-light-blue: #E7F8FF;
$flutter-dark-blue-texture: #232C33;
$site-color-black: #000;
$site-color-white: #FFF;
$site-color-codeblock-bg: #F8F9FA;
Expand Down
1 change: 1 addition & 0 deletions src/_assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
@import '_landing-page';
@import '_homepage';
@import '_showcase';
@import '_clock';
@import '_community';
@import '_create';
@import '_books';
Expand Down
1 change: 1 addition & 0 deletions src/_assets/image/clock/left_rectangle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/_assets/image/clock/oval.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/_assets/image/clock/right_rectangle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions src/_assets/js/countdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
document.addEventListener('DOMContentLoaded', () => {
Comment thread
1Iv4N marked this conversation as resolved.
const daysContainer = document.querySelector('.days-digits_container');
const hoursContainer = document.querySelector('.hours-digits_container');
const minutesContainer = document.querySelector('.minutes-digits_container');
const secondsContainer = document.querySelector('.seconds-digits_container');
const eventTime = new Date(Date.UTC(2019, 10, 18, 17, 0, 0));

let interval;

// Returns remaining time in days, hours, minutes and seconds.
function getTimeRemaining() {
const t = Date.parse(eventTime) - Date.parse(new Date());
const seconds = Math.floor( (t/1000) % 60 );
const minutes = Math.floor( (t/1000/60) % 60 );
const hours = Math.floor( (t/(1000*60*60)) % 24 );
const days = Math.floor( t/(1000*60*60*24) );
return {
'total': t,
'days': days,
'hours': hours,
'minutes': minutes,
'seconds': seconds,
};
}

// Adds a zero number if there's just one digit
function digitsHandler(number) {
return number > 9 ? number : `0${number}`;
}

function setTimer() {
const remainingTime = getTimeRemaining();

if (remainingTime.total > 0) {
const days = digitsHandler(remainingTime.days);
const hours = digitsHandler(remainingTime.hours);
const minutes = digitsHandler(remainingTime.minutes);
const seconds = digitsHandler(remainingTime.seconds);

daysContainer.innerText = `${days}`;
hoursContainer.innerText = `${hours}`;
minutesContainer.innerText = `${minutes}`;
secondsContainer.innerText = `${seconds}`;
} else {
daysContainer.innerText = '00';
hoursContainer.innerText = '00';
minutesContainer.innerText = '00';
secondsContainer.innerText = '00';
clearInterval(interval);
Comment thread
OmarGM2294 marked this conversation as resolved.
}
}

setTimer();
interval = setInterval(setTimer, 1000);
});
5 changes: 3 additions & 2 deletions src/_layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

{{ content }}

{%- include footer.html %}

{% if page.show_footer -%}
{%- include footer.html %}
{% endif %}
<script async="" defer="" src="//survey.g.doubleclick.net/async_survey?site=at3ul57xpub2vk3oxt2ytw365i"></script>
</body>
</html>
31 changes: 31 additions & 0 deletions src/clock/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Clock
layout: base
show_banner: False
show_footer: False
body_class: clock
---

<div class="center">
<h1 class="heading">Timing is everything. Stay tuned.</h1>
<div class="time-number">
<span class="digits_container days-digits_container">00</span>
<span>:</span>
<span class="digits_container hours-digits_container">00</span>
<span>:</span>
<span class="digits_container minutes-digits_container">00</span>
<span>:</span>
<span class="digits_container seconds-digits_container">00</span>
</div>
<p class="share-twitter__paragraph">
While you wait, <a href="https://g.co/FlutterInteract" target="_blank">click here</a> to learn about our worldwide event: Flutter&nbsp;Interact.
</p>
</div>
<div class="animations">
<div class="vertical-line vertical-line--first"></div>
<div class="vertical-line vertical-line--second"></div>
<div class="vertical-line vertical-line--thrid"></div>
<div class="vertical-line vertical-line--fourth"></div>
</div>

{% asset countdown %}