-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carousel #105
Carousel #105
Changes from 3 commits
2763a33
3a1fbad
edd491c
8ca6f84
1817da4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
app.ports.begin.subscribe(function() { | ||
window.requestAnimationFrame(function() { | ||
var element = document.getElementsByClassName("makecarousel")[0]; | ||
console.log("ELEMENT", element); | ||
var flkty = new Flickity(element, { | ||
lazyLoad: true, | ||
adaptiveHeight: true, | ||
wrapAround: true, | ||
prevNextButtons: false, | ||
pageDots: true | ||
}); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,52 @@ | ||
.lh-f1 { | ||
line-height: 56px; | ||
line-height: 56px; | ||
} | ||
|
||
.lh-f2 { | ||
line-height: 36px; | ||
line-height: 36px; | ||
} | ||
|
||
.lh-f3 { | ||
line-height: 28px; | ||
line-height: 28px; | ||
} | ||
|
||
.lh-f4 { | ||
line-height: 24px; | ||
line-height: 24px; | ||
} | ||
|
||
.lh-f5 { | ||
line-height: 22px; | ||
line-height: 22px; | ||
} | ||
|
||
.lh-f6 { | ||
line-height: 18px; | ||
line-height: 18px; | ||
} | ||
|
||
.lh-f7 { | ||
line-height: 13px; | ||
line-height: 13px; | ||
} | ||
|
||
/* Carousel */ | ||
|
||
.carousel-cell { | ||
opacity: 0.2; | ||
-webkit-overflow-scrolling: touch; | ||
} | ||
|
||
.carousel-cell.is-selected { | ||
opacity: 1; | ||
} | ||
|
||
.makecarousel { | ||
-webkit-overflow-scrolling: touch; | ||
} | ||
|
||
.dot.is-selected { | ||
background: var(--green); | ||
transform: scale(1.1); | ||
transition: 1s; | ||
} | ||
|
||
.smooth { | ||
transform: translate3d(0, 0, 0); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module State exposing (..) | ||
port module State exposing (..) | ||
|
||
import Data.Log exposing (defaultLog) | ||
import Data.Stim exposing (defaultStim) | ||
|
@@ -24,13 +24,16 @@ initModel = | |
} | ||
|
||
|
||
port begin : () -> Cmd msg | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sophielevens @maxgerber Can you make this name more declarative? Also could you make a |
||
|
||
|
||
init : Navigation.Location -> ( Model, Cmd Msg ) | ||
init location = | ||
let | ||
model = | ||
viewFromUrl location initModel | ||
in | ||
model ! [] | ||
model ! [ begin () ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we name this something more descriptive? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
|
||
|
||
update : Msg -> Model -> ( Model, Cmd Msg ) | ||
|
@@ -39,5 +42,13 @@ update msg model = | |
UrlChange location -> | ||
{ model | view = getViewFromRoute location.hash } ! [ scrollToTop ] | ||
|
||
MakeCarousel -> | ||
model ! [] | ||
|
||
NoOp -> | ||
model ! [] | ||
|
||
|
||
subscriptions : Model -> Sub msg | ||
subscriptions model = | ||
Sub.none |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,3 +114,4 @@ type Feeling | |
type Msg | ||
= NoOp | ||
| UrlChange Navigation.Location | ||
| MakeCarousel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sophielevens @maxgerber Can we all use prettier with 2 space indentation? This will make code reviewing easier!