mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-11 19:58:28 +01:00
Simplify snapshot page
This commit is contained in:
parent
fa73bad0b1
commit
ff4e3457eb
@ -93,6 +93,10 @@ instance Yesod App where
|
||||
, css_bootstrap_css
|
||||
, css_bootstrap_responsive_css
|
||||
])
|
||||
$((combineScripts 'StaticR
|
||||
[ js_jquery_js
|
||||
, js_bootstrap_js
|
||||
]))
|
||||
$(widgetFile "default-layout")
|
||||
|
||||
mcurr <- getCurrentRoute
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
module Handler.StackageHome where
|
||||
|
||||
import Import
|
||||
import Data.BlobStore (storeExists)
|
||||
import Import
|
||||
|
||||
getStackageHomeR :: PackageSetIdent -> Handler Html
|
||||
getStackageHomeR ident = do
|
||||
@ -41,3 +41,5 @@ getStackageMetadataR ident = do
|
||||
, toPathPiece version
|
||||
, "\n"
|
||||
]
|
||||
|
||||
yearMonthDay = formatTime defaultTimeLocale "%Y-%m-%d"
|
||||
|
||||
2280
static/js/bootstrap.js
vendored
Normal file
2280
static/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
static/js/jquery.js
vendored
Normal file
4
static/js/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,42 +1,104 @@
|
||||
$newline never
|
||||
<div .container>
|
||||
<hgroup>
|
||||
<h1>#{stackageTitle stackage}
|
||||
<p>
|
||||
#{userDisplay user} (#{userHandle user})
|
||||
<p .date>
|
||||
#{stackageDesc stackage}
|
||||
<p .date>
|
||||
Uploaded on #{tshow $ stackageUploaded stackage}
|
||||
<hr>
|
||||
<p>To use, copy the following to your #
|
||||
<code>~/.cabal/config
|
||||
\:
|
||||
<h1>
|
||||
#{stackageTitle stackage}
|
||||
<p>
|
||||
Published on #{yearMonthDay (stackageUploaded stackage)}
|
||||
<span .separator>
|
||||
$if True
|
||||
<span>
|
||||
<a href=@{StackageMetadataR ident} title="View metadata on this snapshot, such as package versions">
|
||||
\Metadata
|
||||
<span .separator>
|
||||
<span>
|
||||
<a href=@{StackageBundleR ident} title="This is useful for making modifications to an existing snapshot">
|
||||
\Bundle
|
||||
<p>
|
||||
<pre>
|
||||
remote-repo: stackage:@{StackageHomeR ident}
|
||||
<h3>
|
||||
Setup guide #
|
||||
<small>
|
||||
(click to expand)
|
||||
<div class="accordion" id="accordion2">
|
||||
|
||||
<pre>remote-repo: stackage:@{StackageHomeR ident}
|
||||
|
||||
<small>
|
||||
<em>
|
||||
Note: Remove or comment out any existing #
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapse1">
|
||||
<span .number>1
|
||||
Copy the
|
||||
<code>remote-repo
|
||||
\ line.
|
||||
line to your Cabal configuration file
|
||||
<div id="collapse1" class="accordion-body collapse">
|
||||
<div class="accordion-inner">
|
||||
<p>
|
||||
Your #
|
||||
<code>config
|
||||
\ file for Cabal should be in your user home directory. For example:
|
||||
<ul>
|
||||
<li>Linux: #
|
||||
<code>
|
||||
/home/alonzo/.cabal/config
|
||||
<li>Windows: #
|
||||
<code>
|
||||
C:\Users\alonzo\AppData\Roaming\cabal\config
|
||||
<p>Once you have this open, find the line that says:
|
||||
<pre>
|
||||
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
|
||||
<p>
|
||||
Replace it with the #
|
||||
<code>remote-repo
|
||||
\ code sample above.
|
||||
|
||||
<p>
|
||||
Run the following to update your packages:
|
||||
<pre>
|
||||
<code>
|
||||
\$ cabal update
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse2">
|
||||
<span .number>2
|
||||
Remove any existing package config
|
||||
<div id="collapse2" class="accordion-body collapse">
|
||||
<div class="accordion-inner">
|
||||
<p>
|
||||
If you already have installed some packages from Hackage
|
||||
\ or elsewhere and you want to start from a fresh package
|
||||
\ set, you can remove your
|
||||
<code>ghc/<os>-<ghc-version>
|
||||
\ directory.
|
||||
|
||||
<p>
|
||||
For information about clearing your existing package set, or using with sandboxes,
|
||||
see
|
||||
<a href="https://github.com/fpco/stackage/wiki/Stackage-Server-FAQ">the FAQ.
|
||||
<ul>
|
||||
<li>
|
||||
In Linux, the directory is #
|
||||
<code>~/.ghc
|
||||
|
||||
$if hasBundle
|
||||
<p>
|
||||
<a href=@{StackageMetadataR ident}>View metadata on this snapshot
|
||||
, such as package versions.
|
||||
<p>
|
||||
<a href=@{StackageBundleR ident}>Download the original bundle file.
|
||||
\ #
|
||||
<i>This is useful for making modifications to an existing snapshot.
|
||||
<li>
|
||||
On Windows the #
|
||||
<code>.ghc
|
||||
\ directory, similar to the Cabal
|
||||
\ configuration, will be under something like: #
|
||||
<code>
|
||||
C:\Users\alonzo\AppData\Roaming\ghc
|
||||
|
||||
<p>
|
||||
To clear the GHC 7.2.2. environment, all the
|
||||
\ user-installed packages, you can remove the directory #
|
||||
<code>x86_64-linux-7.2.2
|
||||
.
|
||||
<em> Be careful
|
||||
\ that you are sure
|
||||
\ that you want to clear your package set (re-installing
|
||||
\ packages takes time!) and that you clear the right one.
|
||||
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion3" href="#collapse3">
|
||||
<span .number>3
|
||||
Run
|
||||
<code>
|
||||
cabal update
|
||||
<div id="collapse3" class="accordion-body collapse">
|
||||
<div class="accordion-inner">
|
||||
<p>
|
||||
This will download the package index from Stackage and
|
||||
\ update your local one.
|
||||
|
||||
<p>
|
||||
Now you're ready to install packages!
|
||||
|
||||
@ -1,5 +1,14 @@
|
||||
h1 {
|
||||
font-size: 30px !important;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h1 + p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #555 !important;
|
||||
}
|
||||
|
||||
.date {
|
||||
@ -10,3 +19,51 @@ h1 {
|
||||
hr {
|
||||
border: 1px solid #ddd
|
||||
}
|
||||
|
||||
.separator {
|
||||
width: 1px;
|
||||
height: 0.5em;
|
||||
background: #aaa;
|
||||
display: inline-block;
|
||||
margin: 0 0.5em;
|
||||
}
|
||||
|
||||
.accordion-group {
|
||||
border: 0;
|
||||
.accordion-toggle:hover {
|
||||
text-decoration: none;
|
||||
background: #f5f5f5;
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
.accordion-toggle {
|
||||
margin-left: -0.5em;
|
||||
padding-left: 0.5em;
|
||||
color: #555;
|
||||
code {
|
||||
font-size: inherit;
|
||||
border: inherit;
|
||||
margin: 0.5em;
|
||||
}
|
||||
.number {
|
||||
border-radius: 1em;
|
||||
background: #0981c3;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
padding: 0 0.5em;
|
||||
margin-right: 0.5em;
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #666 !important;
|
||||
font-weight: normal
|
||||
}
|
||||
h3 > small {
|
||||
color: #666
|
||||
}
|
||||
|
||||
p + ul {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user