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

@ -16,3 +16,7 @@ body {
width: 100%;
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>
<pre>
# Upload a file
curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a>
# Upload a file
curl -F'file=@yourfile.png' <a href="{{.RootURL}}">{{.RootURL}}</a>
# Shorten a URL
curl -F'shorten=http://example.com/some/long/url' <a href="{{.RootURL}}">{{.RootURL}}</a>
# Shorten a URL
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.
#
# In the other lines, you will find other information, including
# information on how to delete the shortened object.
# The first line of the result will contain the shortened URL.
#
# In the other lines, you will find other information, including
# information on how to delete the shortened object.
# 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
# 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
</pre>
{{end}}

View File

@ -6,16 +6,16 @@ the command line.
## USAGE
# Upload a file
curl -F'file=@yourfile.png' {{.RootURL}}
# Upload a file
curl -F'file=@yourfile.png' {{.RootURL}}
# Shorten a URL
curl -F'shorten=http://example.com/some/long/url' {{.RootURL}}
# Shorten a URL
curl -F'shorten=http://example.com/some/long/url' {{.RootURL}}
# The first line of the result will contain the shortened URL.
#
# In the other lines, you will find other information, including
# information on how to delete the shortened object.
# The first line of the result will contain the shortened URL.
#
# In the other lines, you will find other information, including
# information on how to delete the shortened object.
# 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
# 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