Compare commits

..

No commits in common. '7eece79b0ea019c870488a29781cba5be80953e0' and '30615ddb5f06f802e327b9ac7c0651d4a24500a2' have entirely different histories.

  1. 2
      .gitignore
  2. 11
      src/ServicesTable.elm
  3. 6379
      src/main.js
  4. 7
      ssg/src/Main.hs

2
.gitignore vendored

@ -1,7 +1,5 @@
.direnv
ssg/dist-newstyle ssg/dist-newstyle
src/_cache src/_cache
src/_site src/_site
src/elm-stuff src/elm-stuff
src/_elm
result result

11
src/ServicesTable.elm

@ -4,14 +4,12 @@ module ServicesTable exposing (main)
import List import List
import String exposing (fromInt) import String exposing (fromInt)
import Browser import Browser
import Html exposing (Html, div, span, text, a, table, thead, tbody, tr, th, td) import Html exposing (Html, div, span, text, table, thead, tbody, tr, th, td)
import Html.Attributes exposing (class, href) import Html.Attributes exposing (class)
import Http import Http
import Dict exposing (Dict) import Dict exposing (Dict)
import Json.Decode exposing (Decoder, map, map3, field, list, string, dict, keyValuePairs) import Json.Decode exposing (Decoder, map, map3, field, list, string, dict, keyValuePairs)
pinnedCommit = "2a5f9fcde65629554f39d683db02a98a6c054756"
type alias ServiceInfo = type alias ServiceInfo =
{ fields : List String { fields : List String
, tests : List String , tests : List String
@ -100,12 +98,9 @@ renderTable info = table [ class "services-table", class "table-header-rotated"
[ thead [ class "info-thead" ] [ headers ] [ thead [ class "info-thead" ] [ headers ]
, tbody [] (List.indexedMap renderLine info) ] , tbody [] (List.indexedMap renderLine info) ]
mkSourceLink : String -> Html Msg
mkSourceLink mod = a [ href <| "https://github.com/NixOS/nixpkgs/blob/" ++ pinnedCommit ++ String.dropLeft 7 mod ] [ text mod ]
renderLine : Int -> { name : String, fields : List String, tests : List String, mod : String } -> Html Msg renderLine : Int -> { name : String, fields : List String, tests : List String, mod : String } -> Html Msg
renderLine i {name, fields, tests, mod} = tr [] renderLine i {name, fields, tests, mod} = tr []
<| [ th [] [ mkSourceLink mod ], th [] [ text <| fromInt i ], th [] [ text name ] ] <| [ th [] [ text mod ], th [] [ text <| fromInt i ], th [] [ text name ] ]
++ (List.map (\b -> td [class (if b then "cell-good" else "cell-bad")] [text (if b then "" else "")]) ++ (List.map (\b -> td [class (if b then "cell-good" else "cell-bad")] [text (if b then "" else "")])
<| List.map (\field -> not <| List.member field fields) watchedFields) <| List.map (\field -> not <| List.member field fields) watchedFields)

6379
src/main.js

File diff suppressed because it is too large Load Diff

7
ssg/src/Main.hs

@ -27,10 +27,5 @@ main = do
match "*.elm" $ do match "*.elm" $ do
route $ setExtension "js" route $ setExtension "js"
compile $ execCompilerWith (execName "elm") compile $ execCompilerWith (execName "elm") [ProcArg "make", HakFilePath, ProcArg "--output=main.js"] (COutFile $ SpecificPath "main.js")
[ ProcArg "make"
, HakFilePath
, ProcArg "--optimize"
, ProcArg "--output=_elm/main.js" ]
(COutFile $ SpecificPath "_elm/main.js")

Loading…
Cancel
Save