mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-25 09:21:57 +03:00
Apply elm-review fixes.
This commit is contained in:
parent
e30b8d3335
commit
3eef5a6feb
@ -11,7 +11,6 @@
|
||||
"direct": {
|
||||
"ThinkAlexandria/elm-html-in-elm": "1.0.1",
|
||||
"avh4/elm-color": "1.0.0",
|
||||
"billstclair/elm-xml-eeue56": "1.0.1",
|
||||
"danyx23/elm-mimetype": "4.0.1",
|
||||
"dillonkearns/elm-bcp47-language-tag": "1.0.1",
|
||||
"dillonkearns/elm-markdown": "6.0.1",
|
||||
@ -46,6 +45,7 @@
|
||||
"zwilias/json-decode-exploration": "6.0.0"
|
||||
},
|
||||
"indirect": {
|
||||
"billstclair/elm-xml-eeue56": "1.0.1",
|
||||
"elm/bytes": "1.0.8",
|
||||
"elm/file": "1.0.5",
|
||||
"elm/parser": "1.1.0",
|
||||
|
@ -2,9 +2,7 @@ module DocSidebar exposing (view)
|
||||
|
||||
import Element exposing (Element)
|
||||
import Element.Border as Border
|
||||
import Element.Font
|
||||
import Pages.PagePath as PagePath exposing (PagePath)
|
||||
import Palette
|
||||
import Pages.PagePath exposing (PagePath)
|
||||
|
||||
|
||||
view :
|
||||
@ -34,38 +32,3 @@ view currentPage =
|
||||
-- )
|
||||
-- |> List.map postSummary
|
||||
--)
|
||||
|
||||
|
||||
postSummary :
|
||||
( Bool, PagePath, { title : String } )
|
||||
-> Element msg
|
||||
postSummary ( isCurrentPage, postPath, post ) =
|
||||
[ Element.text post.title ]
|
||||
|> Element.paragraph
|
||||
([ Element.Font.size 18
|
||||
, Element.Font.family [ Element.Font.typeface "Roboto" ]
|
||||
, Element.Font.semiBold
|
||||
, Element.padding 16
|
||||
]
|
||||
++ (if isCurrentPage then
|
||||
[ Element.Font.underline
|
||||
, Element.Font.color Palette.color.primary
|
||||
]
|
||||
|
||||
else
|
||||
[]
|
||||
)
|
||||
)
|
||||
|> linkToPost postPath
|
||||
|
||||
|
||||
linkToPost : PagePath -> Element msg -> Element msg
|
||||
linkToPost postPath content =
|
||||
Element.link [ Element.width Element.fill ]
|
||||
{ url = PagePath.toString postPath, label = content }
|
||||
|
||||
|
||||
docUrl : List String -> String
|
||||
docUrl postPath =
|
||||
"/"
|
||||
++ String.join "/" postPath
|
||||
|
@ -6,7 +6,6 @@ import Date
|
||||
import Element exposing (Element)
|
||||
import Element.Border
|
||||
import Element.Font
|
||||
import Pages
|
||||
import Pages.ImagePath as ImagePath
|
||||
import Pages.PagePath as PagePath exposing (PagePath)
|
||||
|
||||
|
@ -196,10 +196,6 @@ head staticPayload =
|
||||
|
||||
blogCard : ( PagePath, Article.ArticleMetadata ) -> Html msg
|
||||
blogCard ( path, info ) =
|
||||
let
|
||||
author =
|
||||
Data.Author.dillon
|
||||
in
|
||||
a
|
||||
[ Attr.href (PagePath.toString path)
|
||||
, css
|
||||
|
@ -31,7 +31,6 @@ type Msg
|
||||
, fragment : Maybe String
|
||||
}
|
||||
| ToggleMobileMenu
|
||||
| Increment
|
||||
| SharedMsg SharedMsg
|
||||
|
||||
|
||||
@ -80,9 +79,6 @@ update msg model =
|
||||
ToggleMobileMenu ->
|
||||
( { model | showMobileMenu = not model.showMobileMenu }, Cmd.none )
|
||||
|
||||
Increment ->
|
||||
( { model | counter = model.counter + 1 }, Cmd.none )
|
||||
|
||||
SharedMsg globalMsg ->
|
||||
case globalMsg of
|
||||
IncrementFromChild ->
|
||||
|
@ -1,7 +1,7 @@
|
||||
module HtmlPrinter exposing (htmlToString)
|
||||
|
||||
import ElmHtml.InternalTypes exposing (decodeElmHtml)
|
||||
import ElmHtml.ToString exposing (FormatOptions, defaultFormatOptions, nodeToStringWithOptions)
|
||||
import ElmHtml.ToString exposing (defaultFormatOptions, nodeToStringWithOptions)
|
||||
import Html exposing (Html)
|
||||
import Json.Decode as Decode
|
||||
import Json.Encode
|
||||
|
@ -598,14 +598,3 @@ application config =
|
||||
, onUrlChange = UrlChanged
|
||||
, onUrlRequest = LinkClicked
|
||||
}
|
||||
|
||||
|
||||
pathToUrl : PagePath -> Url
|
||||
pathToUrl path =
|
||||
{ protocol = Url.Https
|
||||
, host = "TODO"
|
||||
, port_ = Nothing
|
||||
, path = path |> PagePath.toString
|
||||
, query = Nothing
|
||||
, fragment = Nothing
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
module Pages.SiteConfig exposing (SiteConfig)
|
||||
|
||||
import ApiRoute
|
||||
import DataSource exposing (DataSource)
|
||||
import Head
|
||||
import Pages.Manifest
|
||||
|
@ -1,7 +1,7 @@
|
||||
module RenderRequest exposing (..)
|
||||
|
||||
import ApiRoute
|
||||
import DataSource exposing (DataSource)
|
||||
import DataSource
|
||||
import HtmlPrinter
|
||||
import Json.Decode as Decode
|
||||
import Json.Encode
|
||||
@ -43,7 +43,6 @@ type IncludeHtml
|
||||
|
||||
type ServerOrBuild
|
||||
= Server
|
||||
| Build
|
||||
|
||||
|
||||
decoder :
|
||||
|
@ -2,7 +2,6 @@ module ServerRequest exposing (ServerRequest, expectHeader, init, optionalHeader
|
||||
|
||||
import DataSource
|
||||
import DataSource.Http
|
||||
import Internal.OptimizedDecoder exposing (OptimizedDecoder)
|
||||
import OptimizedDecoder
|
||||
import Secrets
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user