mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-29 06:45:21 +03:00
Apply review fixes.
This commit is contained in:
parent
710d4fbbb2
commit
d338a01f1f
@ -16,43 +16,38 @@
|
|||||||
"dillonkearns/elm-oembed": "1.0.0",
|
"dillonkearns/elm-oembed": "1.0.0",
|
||||||
"dillonkearns/elm-rss": "1.0.1",
|
"dillonkearns/elm-rss": "1.0.1",
|
||||||
"dillonkearns/elm-sitemap": "1.0.1",
|
"dillonkearns/elm-sitemap": "1.0.1",
|
||||||
"dmy/elm-imf-date-time": "1.0.1",
|
|
||||||
"elm/browser": "1.0.2",
|
"elm/browser": "1.0.2",
|
||||||
"elm/core": "1.0.5",
|
"elm/core": "1.0.5",
|
||||||
"elm/html": "1.0.0",
|
"elm/html": "1.0.0",
|
||||||
"elm/http": "2.0.0",
|
"elm/http": "2.0.0",
|
||||||
"elm/json": "1.1.3",
|
"elm/json": "1.1.3",
|
||||||
"elm/regex": "1.0.0",
|
"elm/regex": "1.0.0",
|
||||||
"elm/svg": "1.0.1",
|
|
||||||
"elm/time": "1.0.0",
|
"elm/time": "1.0.0",
|
||||||
"elm/url": "1.0.0",
|
"elm/url": "1.0.0",
|
||||||
"elm/virtual-dom": "1.0.2",
|
|
||||||
"elm-community/dict-extra": "2.4.0",
|
"elm-community/dict-extra": "2.4.0",
|
||||||
"elm-community/list-extra": "8.3.0",
|
"elm-community/list-extra": "8.3.0",
|
||||||
"elm-community/result-extra": "2.4.0",
|
|
||||||
"elm-community/string-extra": "4.0.1",
|
|
||||||
"elm-explorations/markdown": "1.0.0",
|
|
||||||
"justinmimbs/date": "3.2.0",
|
"justinmimbs/date": "3.2.0",
|
||||||
"lukewestby/elm-string-interpolate": "1.0.4",
|
|
||||||
"matheus23/elm-default-tailwind-modules": "1.0.0",
|
"matheus23/elm-default-tailwind-modules": "1.0.0",
|
||||||
"miniBill/elm-codec": "1.2.0",
|
"miniBill/elm-codec": "1.2.0",
|
||||||
"noahzgordon/elm-color-extra": "1.0.2",
|
"noahzgordon/elm-color-extra": "1.0.2",
|
||||||
"pablohirafuji/elm-syntax-highlight": "3.3.0",
|
"pablohirafuji/elm-syntax-highlight": "3.3.0",
|
||||||
"rtfeldman/elm-css": "16.1.1",
|
"rtfeldman/elm-css": "16.1.1",
|
||||||
"rtfeldman/elm-hex": "1.0.0",
|
|
||||||
"tripokey/elm-fuzzy": "5.2.1",
|
"tripokey/elm-fuzzy": "5.2.1",
|
||||||
"zwilias/json-decode-exploration": "6.0.0"
|
"zwilias/json-decode-exploration": "6.0.0"
|
||||||
},
|
},
|
||||||
"indirect": {
|
"indirect": {
|
||||||
"billstclair/elm-xml-eeue56": "1.0.1",
|
"billstclair/elm-xml-eeue56": "1.0.1",
|
||||||
|
"dmy/elm-imf-date-time": "1.0.1",
|
||||||
"elm/bytes": "1.0.8",
|
"elm/bytes": "1.0.8",
|
||||||
"elm/file": "1.0.5",
|
"elm/file": "1.0.5",
|
||||||
"elm/parser": "1.1.0",
|
"elm/parser": "1.1.0",
|
||||||
"elm/random": "1.0.0",
|
"elm/random": "1.0.0",
|
||||||
|
"elm/virtual-dom": "1.0.2",
|
||||||
"fredcy/elm-parseint": "2.0.1",
|
"fredcy/elm-parseint": "2.0.1",
|
||||||
"justinmimbs/time-extra": "1.1.0",
|
"justinmimbs/time-extra": "1.1.0",
|
||||||
"lazamar/dict-parser": "1.0.2",
|
"lazamar/dict-parser": "1.0.2",
|
||||||
"mgold/elm-nonempty-list": "4.1.0",
|
"mgold/elm-nonempty-list": "4.1.0",
|
||||||
|
"rtfeldman/elm-hex": "1.0.0",
|
||||||
"ryannhg/date-format": "2.3.0"
|
"ryannhg/date-format": "2.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -62,4 +57,4 @@
|
|||||||
},
|
},
|
||||||
"indirect": {}
|
"indirect": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
module Page.Blog.Slug_ exposing (Data, Model, Msg, page, toRssItem)
|
module Page.Blog.Slug_ exposing (Data, Model, Msg, page)
|
||||||
|
|
||||||
import Article
|
import Article
|
||||||
import Cloudinary
|
import Cloudinary
|
||||||
import Data.Author as Author exposing (Author)
|
import Data.Author as Author exposing (Author)
|
||||||
import DataSource
|
import DataSource
|
||||||
import DataSource.File as StaticFile
|
import DataSource.File as StaticFile
|
||||||
import DataSource.Glob as Glob
|
|
||||||
import Date exposing (Date)
|
import Date exposing (Date)
|
||||||
import Head
|
import Head
|
||||||
import Head.Seo as Seo
|
import Head.Seo as Seo
|
||||||
@ -14,11 +13,10 @@ import Html.Styled.Attributes as Attr exposing (css)
|
|||||||
import Markdown.Parser
|
import Markdown.Parser
|
||||||
import Markdown.Renderer
|
import Markdown.Renderer
|
||||||
import OptimizedDecoder
|
import OptimizedDecoder
|
||||||
import Page exposing (Page, PageWithState, StaticPayload)
|
import Page exposing (Page, StaticPayload)
|
||||||
import Pages.PageUrl exposing (PageUrl)
|
import Pages.PageUrl exposing (PageUrl)
|
||||||
import Pages.Url
|
import Pages.Url
|
||||||
import Path
|
import Path
|
||||||
import Rss
|
|
||||||
import Shared
|
import Shared
|
||||||
import SiteOld
|
import SiteOld
|
||||||
import StructuredData
|
import StructuredData
|
||||||
@ -285,43 +283,3 @@ imageDecoder : OptimizedDecoder.Decoder Pages.Url.Url
|
|||||||
imageDecoder =
|
imageDecoder =
|
||||||
OptimizedDecoder.string
|
OptimizedDecoder.string
|
||||||
|> OptimizedDecoder.map (\cloudinaryAsset -> Cloudinary.url cloudinaryAsset Nothing 800)
|
|> OptimizedDecoder.map (\cloudinaryAsset -> Cloudinary.url cloudinaryAsset Nothing 800)
|
||||||
|
|
||||||
|
|
||||||
toRssItem :
|
|
||||||
ArticleMetadata
|
|
||||||
-> Maybe Rss.Item
|
|
||||||
toRssItem article =
|
|
||||||
if article.draft then
|
|
||||||
Nothing
|
|
||||||
|
|
||||||
else
|
|
||||||
Just
|
|
||||||
{ title = article.title
|
|
||||||
, description = article.description
|
|
||||||
, url = "TODO" --PagePath.toString page.path
|
|
||||||
, categories = []
|
|
||||||
, author = Author.dillon.name
|
|
||||||
, pubDate = Rss.Date article.published
|
|
||||||
, content = Nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
articlesRequest : DataSource.DataSource (List ArticleMetadata)
|
|
||||||
articlesRequest =
|
|
||||||
Glob.succeed identity
|
|
||||||
|> Glob.capture Glob.fullFilePath
|
|
||||||
|> Glob.match (Glob.literal "content/blog/")
|
|
||||||
|> Glob.match Glob.wildcard
|
|
||||||
|> Glob.match (Glob.literal ".md")
|
|
||||||
|> Glob.toDataSource
|
|
||||||
|> DataSource.andThen
|
|
||||||
(\articleFilePaths ->
|
|
||||||
articleFilePaths
|
|
||||||
|> List.filter (\filePath -> filePath |> String.contains "index" |> not)
|
|
||||||
|> List.map
|
|
||||||
(\articleFilePath ->
|
|
||||||
StaticFile.request articleFilePath
|
|
||||||
(StaticFile.frontmatter frontmatterDecoder)
|
|
||||||
)
|
|
||||||
|> DataSource.combine
|
|
||||||
)
|
|
||||||
|
@ -14,7 +14,6 @@ import Shared
|
|||||||
import Showcase
|
import Showcase
|
||||||
import Tailwind.Breakpoints as Bp
|
import Tailwind.Breakpoints as Bp
|
||||||
import Tailwind.Utilities as Tw
|
import Tailwind.Utilities as Tw
|
||||||
import Url
|
|
||||||
import View exposing (View)
|
import View exposing (View)
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import DataSource
|
|||||||
import DocsSection
|
import DocsSection
|
||||||
import Html exposing (Html)
|
import Html exposing (Html)
|
||||||
import Html.Styled
|
import Html.Styled
|
||||||
import Json.Decode
|
|
||||||
import Pages.Flags
|
import Pages.Flags
|
||||||
import Pages.PageUrl exposing (PageUrl)
|
import Pages.PageUrl exposing (PageUrl)
|
||||||
import Path exposing (Path)
|
import Path exposing (Path)
|
||||||
@ -67,17 +66,6 @@ init :
|
|||||||
}
|
}
|
||||||
-> ( Model, Cmd Msg )
|
-> ( Model, Cmd Msg )
|
||||||
init navigationKey flags maybePagePath =
|
init navigationKey flags maybePagePath =
|
||||||
let
|
|
||||||
_ =
|
|
||||||
case flags of
|
|
||||||
Pages.Flags.PreRenderFlags ->
|
|
||||||
Nothing
|
|
||||||
|
|
||||||
Pages.Flags.BrowserFlags browserFlags ->
|
|
||||||
browserFlags
|
|
||||||
|> Json.Decode.decodeValue Json.Decode.string
|
|
||||||
|> Result.toMaybe
|
|
||||||
in
|
|
||||||
( { showMobileMenu = False
|
( { showMobileMenu = False
|
||||||
, counter = 0
|
, counter = 0
|
||||||
, navigationKey = navigationKey
|
, navigationKey = navigationKey
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
module TableOfContents exposing (..)
|
module TableOfContents exposing (..)
|
||||||
|
|
||||||
import Css
|
import Css
|
||||||
import Css.Global
|
|
||||||
import DataSource exposing (DataSource)
|
import DataSource exposing (DataSource)
|
||||||
import DataSource.File
|
import DataSource.File
|
||||||
import Html.Styled exposing (..)
|
import Html.Styled exposing (..)
|
||||||
import Html.Styled.Attributes as Attr exposing (class, css)
|
import Html.Styled.Attributes as Attr exposing (css)
|
||||||
import List.Extra
|
import List.Extra
|
||||||
import Markdown.Block as Block exposing (Block, HeadingLevel(..), Inline)
|
import Markdown.Block as Block exposing (Block, Inline)
|
||||||
import Markdown.Parser
|
import Markdown.Parser
|
||||||
import OptimizedDecoder
|
import OptimizedDecoder
|
||||||
import Tailwind.Breakpoints as Bp
|
import Tailwind.Breakpoints as Bp
|
||||||
|
@ -4,7 +4,7 @@ import Css
|
|||||||
import Ellie
|
import Ellie
|
||||||
import Html.Styled as Html
|
import Html.Styled as Html
|
||||||
import Html.Styled.Attributes as Attr exposing (css)
|
import Html.Styled.Attributes as Attr exposing (css)
|
||||||
import Markdown.Block as Block exposing (ListItem(..), Task(..))
|
import Markdown.Block as Block
|
||||||
import Markdown.Html
|
import Markdown.Html
|
||||||
import Markdown.Renderer
|
import Markdown.Renderer
|
||||||
import Oembed
|
import Oembed
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
module View.CodeTab exposing (codeTabs, iconArea, view)
|
module View.CodeTab exposing (view)
|
||||||
|
|
||||||
import Css
|
import Css
|
||||||
import Dict
|
|
||||||
import Html.Styled as Html exposing (..)
|
import Html.Styled as Html exposing (..)
|
||||||
import Html.Styled.Attributes as Attr exposing (..)
|
import Html.Styled.Attributes as Attr exposing (..)
|
||||||
import Html.Styled.Events
|
|
||||||
import SyntaxHighlight
|
import SyntaxHighlight
|
||||||
import Tailwind.Breakpoints as Bp
|
|
||||||
import Tailwind.Utilities as Tw
|
import Tailwind.Utilities as Tw
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
module TableOfContentsTests exposing (..)
|
module TableOfContentsTests exposing (..)
|
||||||
|
|
||||||
import Expect exposing (Expectation)
|
import Expect
|
||||||
import Fuzz exposing (Fuzzer, int, list, string)
|
import Markdown.Block exposing (..)
|
||||||
import Markdown.Block as Block exposing (..)
|
|
||||||
import TableOfContents exposing (Entry(..))
|
import TableOfContents exposing (Entry(..))
|
||||||
import Test exposing (..)
|
import Test exposing (..)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user