mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat: enable non-rectangular widget styles
Introduces `design.clip_path` widget option. Refer to CSS docs on `clip-path` for use. E.g. to create a slanted bottom to a widget: ``` [design] clip_path = "polygon(0 0,100% 0,100% 80%,0% 100%)" [design.background] color = "navy" text_color_light = true ```
This commit is contained in:
parent
ad674e92cb
commit
c4f0317cdf
1 changed files with 6 additions and 0 deletions
|
@ -59,6 +59,12 @@
|
|||
{{ $style = print $style $style_pad }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Support for clip path (design.clip_path) */}}
|
||||
{{ with $st.Params.design.clip_path }}
|
||||
{{ $style_clip_path := printf "clip-path: %s;" . }}
|
||||
{{ $style = print $style $style_clip_path }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $st.Params.advanced.css_style }}
|
||||
{{ $style = print $style . }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue