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 <$> <*> (map entityVal <$>
selectList [ModuleDocs ==. docsid] [Asc ModuleName]) selectList [ModuleDocs ==. docsid] [Asc ModuleName])
return ( packages return ( zip [0..] packages
, downloads , downloads
, recentDownloads , recentDownloads
, nLikes , nLikes

View File

@ -6,8 +6,16 @@ $newline never
#{pn} # #{pn} #
<span .latest-version> <span .latest-version>
#{metadataVersion metadata} # #{metadataVersion metadata} #
<small> $forall (i,(version, title, slug, hasHaddocks)) <- packages
(current) $if i /= 0
, #
<a href=@{SnapshotR slug StackageHomeR}>#{fromMaybe title $ stripSuffix ", exclusive" title}
$if hasHaddocks
\ (
<a href=@{haddocksLink slug version}>
#{version}
)
<div .row> <div .row>
<div .span12> <div .span12>
<div .tags> <div .tags>
@ -35,16 +43,6 @@ $newline never
#{nLikes} #{nLikes}
\ likes # \ likes #
<i .fa :liked:.fa-thumbs-up :not liked:.fa-thumbs-o-up #like title="#{likeTitle}"> <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> <div .authorship>
<span .license> <span .license>
<a href=""> <a href="">
@ -114,24 +112,6 @@ $newline never
#{name} #{name}
<div .bottom-gradient> <div .bottom-gradient>
<i class="fa fa-angle-down"> <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 .markdown-container .readme-container>
<div .container .content> <div .container .content>

View File

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