Skip to content

Commit 269f4db

Browse files
rlefevreevancz
authored andcommitted
add packages "About" page
1 parent 328ff1a commit 269f4db

File tree

5 files changed

+277
-15
lines changed

5 files changed

+277
-15
lines changed

assets/style.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,25 @@ pre {
161161
}
162162

163163

164+
165+
/* ABOUT */
166+
167+
168+
.pkg-about h1 {
169+
margin-bottom: 10px;
170+
}
171+
172+
.pkg-about ul {
173+
list-style: none;
174+
padding: 0;
175+
}
176+
177+
.pkg-constraint {
178+
white-space: nowrap;
179+
}
180+
181+
182+
164183
/* PACKAGE NAVIGATION */
165184

166185

elm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
"direct": {},
2727
"indirect": {}
2828
}
29-
}
29+
}

src/frontend/Href.elm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module Href exposing
22
( toProject
33
, toVersion
44
, toModule
5+
, toAbout
56
)
67

78

@@ -28,6 +29,11 @@ toModule author project version moduleName maybeValue =
2829
Url.custom Url.Absolute [ "packages", author, project, vsnToString version, String.replace "." "-" moduleName ] [] maybeValue
2930

3031

32+
toAbout : String -> String -> Maybe V.Version -> String
33+
toAbout author project version =
34+
Url.absolute [ "packages", author, project, vsnToString version, "about" ] []
35+
36+
3137

3238
-- HELPERS
3339

src/frontend/Main.elm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ focus_ : Parser (Docs.Focus -> a) a
266266
focus_ =
267267
oneOf
268268
[ map Docs.Readme top
269+
, map Docs.About (s "about")
269270
, map Docs.Module (moduleName_ </> fragment identity)
270271
]
271272

0 commit comments

Comments
 (0)