This repository was archived by the owner on Oct 17, 2020. It is now read-only.
forked from flutter/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Clock update #6
Merged
Merged
Clock update #6
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
f32efc1
First commit
GomezMimo 35510f8
Minor change.
GomezMimo f65d253
Set styles for clock mobile version.
GomezMimo ff4e40a
Add styles for tablet and desktop breakpoints.
GomezMimo 49ee869
Add extra-large viewport for countdown.
GomezMimo 22ada6d
Add extra large viewport for countdown font-size.
GomezMimo 634dd87
Minor change in digitsHandler function.
GomezMimo f40a834
Add animations
GomezMimo 268afaf
Optimize svg files.
GomezMimo 7fc8197
Minor fix
GomezMimo ed6f94e
Remove unnecessary styles.
GomezMimo 558fac1
Change variables scope.
GomezMimo e91124d
Merge remote-tracking branch 'origin/master' into clock
1917ea2
Minor css change.
GomezMimo 5bcfdf5
Change keyframe transition.
GomezMimo 46e374c
Adjust heading height.
GomezMimo 4edaeaa
Add fixed with to digits container.
GomezMimo 71a62ba
Minor change.
GomezMimo e91f28b
Remove unnecessary styles.
GomezMimo d86f41f
Refactor geometric shapes animation.
GomezMimo 10e650f
html refactor.
GomezMimo 23c6886
Add show_footer front-matter variable
GomezMimo 3fc05eb
Javascript Refactor.
GomezMimo 32fc8f2
minor css change.
GomezMimo 8260faf
Fix 320px mobile issue.
GomezMimo c7ad56c
Undo .firebaserc changes.
GomezMimo 07183d1
Minor changes.
GomezMimo d8b6103
First commit.
GomezMimo f359e42
Merge branch 'master' into clock-update
9c04dd9
CTA changed with animation and spaces between elements modified
4cdea99
CTA changed with animation and spaces between elements modified
bf7412e
Fixes for clock script and element position
c377124
Merge branch 'master' into clock-update
e80aa33
Slide in animations delay changed for clock
1c462f7
Merge branch 'clock-update' of github.com:1Iv4N/flutter.dev-website i…
30a4f0b
CTA copy changed
53aa883
Lorem text removed from banner
d90a862
Spaces fixed for clock and event date added
2ce619f
Fix for copy in title
d57ef6f
PR comments fixed
1bf8115
More comments fixed for PR
e919009
Merge branch 'master' into clock-update
85d7976
CTA z index fixed
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| document.addEventListener('DOMContentLoaded', () => { | ||
| 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); | ||
|
OmarGM2294 marked this conversation as resolved.
|
||
| } | ||
| } | ||
|
|
||
| setTimer(); | ||
| interval = setInterval(setTimer, 1000); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 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 %} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.