Move snapshots and docs links to the top

This commit is contained in:
Chris Done 2014-12-14 20:38:37 +01:00
parent b90bba827c
commit 8d056968d0
3 changed files with 17 additions and 32 deletions

View File

@ -53,7 +53,7 @@ getPackageR pn = do
<*> (map entityVal <$>
selectList [ModuleDocs ==. docsid] [Asc ModuleName])
return ( packages
return ( zip [0..] packages
, downloads
, recentDownloads
, nLikes

View File

@ -6,8 +6,16 @@ $newline never
#{pn} #
<span .latest-version>
#{metadataVersion metadata} #
<small>
(current)
$forall (i,(version, title, slug, hasHaddocks)) <- packages
$if i /= 0
, #
<a href=@{SnapshotR slug StackageHomeR}>#{fromMaybe title $ stripSuffix ", exclusive" title}
$if hasHaddocks
\ (
<a href=@{haddocksLink slug version}>
#{version}
)
<div .row>
<div .span12>
<div .tags>
@ -35,16 +43,6 @@ $newline never
#{nLikes}
\ likes #
<i .fa :liked:.fa-thumbs-up :not liked:.fa-thumbs-o-up #like title="#{likeTitle}">
$if downloads /= 0
<span .downloads>
$if downloads /= recentDownloads
#{formatNum downloads} downloads #
(#{formatNum recentDownloads} in the last 30 days)
$else
#{formatNum downloads} total downloads
$else
<span .downloads>
No downloads yet
<div .authorship>
<span .license>
<a href="">
@ -114,24 +112,6 @@ $newline never
#{name}
<div .bottom-gradient>
<i class="fa fa-angle-down">
$if False
<div .span6 .snapshots>
<table .table .snapshots>
<thead>
<th colspan=2>
Package
<th>
Snapshot
$forall (version, title, slug, hasHaddocks) <- packages
<tr>
<td>
$if hasHaddocks
<a href=@{haddocksLink slug version}>
Docs
<td>
#{version}
<td>
<a href=@{SnapshotR slug StackageHomeR}>#{fromMaybe title $ stripSuffix ", exclusive" title}
<div .markdown-container .readme-container>
<div .container .content>

View File

@ -30,6 +30,11 @@ h3 {
.fa-twittersquare {
color: #0088cc
}
.tags {
margin-top: 0.5em;
border-top: 1px solid #ddd;
padding-top: 0.5em;
}
.social {
margin-top: 0.5em;
border-top: 1px solid #ddd;
@ -209,5 +214,5 @@ h2.changes-title {
/* https://github.com/fpco/stackage-server/issues/39 */
div.plain-text {
white-space: pre-wrap;
white-space: pre-wrap;
}