Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GNU Generation
GnuPaste
Commits
d61682db
Commit
d61682db
authored
Dec 24, 2020
by
Antoine Fontaine
🎱
Browse files
Actually add CSS
parent
f76b1df9
Pipeline
#1889
failed with stages
in 46 minutes and 43 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
debian/changelog
View file @
d61682db
gnupaste (2.0.0~rc6) unstable; urgency=medium
* Update the homepage
* Add CSS for real this time
-- Antoine Fontaine <antoine.fontaine@epfl.ch> Thu, 24 Dec 2020 11:17:35 +0100
gnupaste (2.0.0~rc5) unstable; urgency=medium
* Update the homepage
...
...
@@ -13,7 +20,6 @@ gnupaste (2.0.0~rc4) unstable; urgency=medium
-- Antoine Fontaine <antoine.fontaine@epfl.ch> Tue, 22 Dec 2020 17:40:06 +0100
gnupaste (2.0.0~rc3) unstable; urgency=medium
* Add proper Content-Type support
...
...
@@ -21,14 +27,12 @@ gnupaste (2.0.0~rc3) unstable; urgency=medium
-- Antoine Fontaine <antoine.fontaine@epfl.ch> Tue, 22 Dec 2020 14:53:03 +0100
gnupaste (2.0.0~rc2) unstable; urgency=medium
* Add (hardcoded) maximum uploaded file size
-- Antoine Fontaine <antoine.fontaine@epfl.ch> Tue, 22 Dec 2020 11:03:36 +0100
gnupaste (2.0.0~rc1) unstable; urgency=medium
* Initial release
...
...
src/Paste/Homepage.hs
View file @
d61682db
...
...
@@ -36,16 +36,28 @@ homepage url = docTypeHtml $ do
h2
"Details"
p
$
do
"The "
code
"file"
" field is the only required field. It is the file that"
" will be uploaded and served. You can set the "
code
"type"
" field to force a different mime-type than the one recognized by the"
" service; and finally the "
code
"expire"
" field to change the default expiration period of one year. Valid"
" units are s(econds), h(ours), d(ays), w(eeks), m(onths)."
H
.
div
$
do
dt
$
code
"file"
dd
$
do
"The file that will be uploaded and served."
" This is the only required field."
H
.
div
$
do
dt
$
code
"type"
dd
$
do
"Force a different mime-type than the one recognized"
" by your user agent. You "
>>
em
"need"
>>
" to specify"
" that when piping to curl or you will end up with "
code
"application/octet-stream"
>>
"."
H
.
div
$
do
dt
$
code
"expire"
dd
$
do
"The desired expiration date. This field defaults to one year."
" Valid units are "
strong
"s"
>>
"(econds), "
strong
"h"
>>
"(ours), "
strong
"d"
>>
"(ays), "
strong
"w"
>>
"(eeks) and "
strong
"m"
>>
"(onths)."
H
.
small
$
do
"This service is provided with no guarantees of any kind. Please note"
" that your IP address will be stored for security purposes."
h2
"Upload form"
H
.
form
!
A
.
method
"POST"
$
do
...
...
@@ -72,6 +84,3 @@ homepage url = docTypeHtml $ do
" by J. Desroches and A. Fontaine for GNU Generation, 2018 and 2020."
p
$
do
"Built on the old paste program in Yesod by A. Angel, 2014."
p
$
do
"This service is provided with no guarantees of any kind. Please note"
" that your IP address will be stored for security purposes."
src/Paste/Styles.hs
0 → 100644
View file @
d61682db
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
module
Paste.Styles
(
stylesheet
)
where
import
Protolude
hiding
(
div
,
sym
,
Text
,
(
&
))
import
Clay
import
Data.Text.Lazy
(
Text
)
stylesheet
::
Text
stylesheet
=
render
css
css
::
Css
css
=
do
"*"
?
do
sym
margin
(
px
0
)
html
?
do
fontFamily
[
"Europa"
,
"Helvetica"
]
[
sansSerif
]
textRendering
optimizeLegibility
body
?
do
sym
padding
(
px
5
)
sym2
margin
(
px
0
)
auto
maxWidth
(
em
50
)
h2
?
do
fontSize
(
em
1.375
)
h1
?
do
fontSize
(
em
1.75
)
body
?
div
<?
do
display
flex
flexDirection
row
dt
?
do
minWidth
(
em
4
)
fontWeight
bold
textAlign
end
paddingRight
(
em
1
)
body
?
code
<?
do
display
block
whiteSpace
preWrap
body
<>
footer
?
(
p
<>
div
<>
code
<>
h1
<>
h2
)
<?
do
marginTop
(
em
1
)
a
?
do
color
"#ff0000"
form
?
do
table
?
do
"border-spacing"
-:
".25em .625em"
td
?
firstChild
&
do
textAlign
end
verticalAlign
middle
footer
?
do
marginTop
(
em
2.5
)
fontSize
(
em
(
13
/
16
))
textAlign
center
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment