web: Indent <pre> with padding-left (no spaces)

Fixes #34
This commit is contained in:
Daan Sprenkels 2019-12-17 23:11:06 +05:30
parent ffeb9a3362
commit 8dce4e8483
3 changed files with 24 additions and 20 deletions

View File

@ -15,4 +15,8 @@ body {
transition: visibility 175ms, opacity 175ms; transition: visibility 175ms, opacity 175ms;
width: 100%; width: 100%;
z-index: 999; z-index: 999;
}
pre {
padding-left: 4ex; /* approx 4 monospaced spaces */
} }

View File

@ -27,18 +27,18 @@ the command line.
<h2>Command line API</h2> <h2>Command line API</h2>
<pre> <pre>
# Upload a file # Upload a file
curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a> curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a>
# Shorten a URL # Shorten a URL
curl -F'shorten=http://example.com/some/long/url' <a href="{{.RootURL}}">{{.RootURL}}</a> curl -F'shorten=http://example.com/some/long/url' <a href="{{.RootURL}}">{{.RootURL}}</a>
# The first line of the result will contain the shortened URL. # The first line of the result will contain the shortened URL.
# #
# In the other lines, you will find other information, including # In the other lines, you will find other information, including
# information on how to delete the shortened object. # information on how to delete the shortened object.
# To upload a file and only extract the shortened URL (i.e. throw away the rest) # To upload a file and only extract the shortened URL (i.e. throw away the rest)
curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a> | head -n 1 curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a> | head -n 1
</pre> </pre>
{{end}} {{end}}

View File

@ -6,16 +6,16 @@ the command line.
## USAGE ## USAGE
# Upload a file # Upload a file
curl -F'file=@yourfile.png' {{.RootURL}} curl -F'file=@yourfile.png' {{.RootURL}}
# Shorten a URL # Shorten a URL
curl -F'shorten=http://example.com/some/long/url' {{.RootURL}} curl -F'shorten=http://example.com/some/long/url' {{.RootURL}}
# The first line of the result will contain the shortened URL. # The first line of the result will contain the shortened URL.
# #
# In the other lines, you will find other information, including # In the other lines, you will find other information, including
# information on how to delete the shortened object. # information on how to delete the shortened object.
# To upload a file and only extract the shortened URL (i.e. throw away the rest) # To upload a file and only extract the shortened URL (i.e. throw away the rest)
curl -F'file=@yourfile.png' {{.RootURL}} | head -n 1 curl -F'file=@yourfile.png' {{.RootURL}} | head -n 1