Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulio Pescador <jpescador@users.noreply.github.com>2016-03-04 02:46:34 +0300
committerJulio Pescador <jpescador@users.noreply.github.com>2016-03-04 02:54:08 +0300
commit30f4dd03449030ba3cfc36d16c87196d6d815fe6 (patch)
tree3c399a5b3180477187d4ea399cccb491ebd11632
parentcfa9f6f73141ceb870ea596c6f8b04e38584ebb4 (diff)
Removing pre tag css and adding new shortcodev0.165
The custom css that wraps the pre tag text has been removed. Instead, make sure the line of code does not exceed 80 characters. If it does, then continue on the next line. The reason why is because exceeding the limit conflicts with the css in the overall look of the website. Creating new shortcode called url-link which is a positional 2 or 3 parameter shortcode. position 0: Name of the link position 1: URL of the link position 2: (optional) the target of the URL. Default value is _blank
-rw-r--r--layouts/shortcodes/url-link.html10
-rw-r--r--static/css/add-on.css11
2 files changed, 10 insertions, 11 deletions
diff --git a/layouts/shortcodes/url-link.html b/layouts/shortcodes/url-link.html
new file mode 100644
index 0000000..419c098
--- /dev/null
+++ b/layouts/shortcodes/url-link.html
@@ -0,0 +1,10 @@
+{{ $numOfParams := len .Params }}
+{{ if and (ge $numOfParams 2) (le $numOfParams 3) }}
+ {{ if eq $numOfParams 3 }}
+ {{ $.Scratch.Set "target" (.Get 2) }}
+ {{ else }}
+ {{ $.Scratch.Set "target" "_blank" }}
+ {{ end }}
+
+ <a href="{{ .Get 1 }}" target='{{ $.Scratch.Get "target"}}'>{{ .Get 0 }}</a>
+{{ end }}
diff --git a/static/css/add-on.css b/static/css/add-on.css
index 8c0044c..3353772 100644
--- a/static/css/add-on.css
+++ b/static/css/add-on.css
@@ -134,17 +134,6 @@ article.post footer .stats {
}
}
-pre {
- white-space: pre-wrap; /* css-3 */
- white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
-}
- pre code {
- font-size: inherit;
- }
-
.image.center-image {
max-width: 50%;
}