mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 10:14:47 -04:00
Move sponsor data to theme data
So it can be reused
This commit is contained in:
parent
41fe75254b
commit
de94b49421
@ -44,19 +44,6 @@ sections:
|
||||
color_classes: bg-primary-color-light black
|
||||
image: /images/home-page-templating-example.png
|
||||
copy: "Hugo's Go-based templating provides just the right amount of logic to build anything from the simple to complex. If you prefer Jade/Pug-like syntax, you can also use Amber, Ace, or any combination of the three."
|
||||
sponsors:
|
||||
- name: "Forestry.io"
|
||||
link: https://forestry.io/
|
||||
logo: /images/sponsors/forestry-logotype.svg
|
||||
copy:
|
||||
- name:
|
||||
link:
|
||||
logo:
|
||||
copy:
|
||||
- name:
|
||||
link:
|
||||
logo:
|
||||
copy:
|
||||
---
|
||||
|
||||
Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.
|
||||
|
17
themes/gohugoioTheme/data/sponsors.toml
Normal file
17
themes/gohugoioTheme/data/sponsors.toml
Normal file
@ -0,0 +1,17 @@
|
||||
[[banners]]
|
||||
name = "Forestry.io"
|
||||
link = "https://forestry.io/"
|
||||
logo = "/images/sponsors/forestry-logotype.svg"
|
||||
copy = ""
|
||||
|
||||
[[banners]]
|
||||
name = ""
|
||||
link = ""
|
||||
logo = ""
|
||||
copy = ""
|
||||
|
||||
[[banners]]
|
||||
name = ""
|
||||
link = ""
|
||||
logo = ""
|
||||
copy = ""
|
@ -1,11 +1,10 @@
|
||||
{{$sponsors := .cx.Site.GetPage "home"}}
|
||||
{{$classes_box := "ba b--light-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l "}}
|
||||
{{if $sponsors.Params.sponsors}}
|
||||
<section class="{{.classes_section | default "bg-primary-color-dark b--light-gray bb bt ph5 pv4 w-100"}}">
|
||||
{{ with .cx.Site.Data.sponsors }}
|
||||
<section class="{{ $.classes_section | default "bg-primary-color-dark b--light-gray bb bt ph5 pv4 w-100"}}">
|
||||
<div class="center mw9">
|
||||
<f3 class="b f3 light-gray">Hugo Sponsors</f3>
|
||||
<div class="flex-ns flex-wrap center justify-between pt3">
|
||||
{{ range $sponsors.Params.sponsors }}
|
||||
{{ range .banners }}
|
||||
{{if .logo}}
|
||||
<div class="{{$classes_box}} o-100">
|
||||
{{with .link -}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user