From 30f4dd03449030ba3cfc36d16c87196d6d815fe6 Mon Sep 17 00:00:00 2001 From: Julio Pescador Date: Thu, 3 Mar 2016 15:46:34 -0800 Subject: Removing pre tag css and adding new shortcode 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 --- layouts/shortcodes/url-link.html | 10 ++++++++++ static/css/add-on.css | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 layouts/shortcodes/url-link.html 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 }} + + {{ .Get 0 }} +{{ 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%; } -- cgit v1.2.3