Merge pull request #129 from ottlinger/patch-5
Add ability to reference icons in external links
This commit is contained in:
commit
dd852157f1
3 changed files with 6 additions and 2 deletions
|
|
@ -49,6 +49,10 @@ You can also use `extlink` shortcode to create a link opening in a new tab:
|
|||
```markdown
|
||||
Visit as at {{<extlink text="Instagram" href="https://www.instagram.com/yourInstagramName/">}}
|
||||
```
|
||||
Referencing and showing icons in front of the link text is possible with a new parameter `icon`:
|
||||
```markdown
|
||||
Visit as at {{<extlink icon="fa fa-instagram" text="Instagram" href="https://www.instagram.com/yourInstagramName/">}}
|
||||
```
|
||||
|
||||
### Customizing CSS
|
||||
Add a `custom_head.html`-file to your `layouts/partials`-directory. In there you may add a `<style>`-tag _or_ you may add a `<link>`-tag referencing your own `custom.css` (in case you prefer to have a separate `.css`-file). Checkout the [`custom_head.html`](https://github.com/zjedi/hugo-scroll/blob/master/exampleSite/layouts/partials/custom_head.html)-file from the `exampleSite`-directory to get started and to find more detailed instructions.
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ header_menu: true
|
|||
---
|
||||
In this section we give thanks to authors of resources used on this demo page.
|
||||

|
||||
{{<extlink text="Chef-hat icons created by Cuputo - Flaticon" href="https://www.flaticon.com/free-icons/chef-hat">}}
|
||||
{{<extlink text="Chef-hat icons created by Cuputo - Flaticon" href="https://www.flaticon.com/free-icons/chef-hat" icon="fa fa-external-link">}}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{{ with .Get "href" }}<a href="{{ . }}" target="_blank">{{ end }}{{ with .Get "text" }}{{ . }}</a>{{ end }}
|
||||
{{ with .Get "href" }}<a href="{{ . }}" target="_blank">{{ end }}{{ with .Get "icon" }}<i class="{{ . }}"></i> {{ end }}{{ with .Get "text" }}{{ . }}</a>{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue