From 899e2defe35afb1c6845aba558d03e348fe106c6 Mon Sep 17 00:00:00 2001 From: Bud Parr Date: Wed, 29 Nov 2017 04:27:15 -0500 Subject: [PATCH] Add sponsor logos to home page and footer --- content/_index.md | 13 ++++ .../images}/gopher-side_color.svg | 0 static/images/sponsors/forestry-logotype.svg | 1 + themes/gohugoioTheme/layouts/index.html | 3 + .../partials/home-page-sections/sponsors.html | 31 ++++++++++ .../layouts/partials/nav-mobile.html | 6 +- .../layouts/partials/site-footer.html | 62 +++++++++++-------- 7 files changed, 86 insertions(+), 30 deletions(-) rename {themes/gohugoioTheme/layouts/partials/svg => static/images}/gopher-side_color.svg (100%) create mode 100644 static/images/sponsors/forestry-logotype.svg create mode 100644 themes/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html diff --git a/content/_index.md b/content/_index.md index ec8883c44..e6a6690be 100644 --- a/content/_index.md +++ b/content/_index.md @@ -44,6 +44,19 @@ 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. diff --git a/themes/gohugoioTheme/layouts/partials/svg/gopher-side_color.svg b/static/images/gopher-side_color.svg similarity index 100% rename from themes/gohugoioTheme/layouts/partials/svg/gopher-side_color.svg rename to static/images/gopher-side_color.svg diff --git a/static/images/sponsors/forestry-logotype.svg b/static/images/sponsors/forestry-logotype.svg new file mode 100644 index 000000000..ed28d6994 --- /dev/null +++ b/static/images/sponsors/forestry-logotype.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/gohugoioTheme/layouts/index.html b/themes/gohugoioTheme/layouts/index.html index 205524d61..5e8ebbdd4 100644 --- a/themes/gohugoioTheme/layouts/index.html +++ b/themes/gohugoioTheme/layouts/index.html @@ -14,6 +14,9 @@
{{- partial "home-page-sections/installation" . -}}
+ + {{ partial "home-page-sections/sponsors.html" (dict "cx" . ) }} +
{{- partial "home-page-sections/tweets" . -}}
diff --git a/themes/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html b/themes/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html new file mode 100644 index 000000000..606391704 --- /dev/null +++ b/themes/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html @@ -0,0 +1,31 @@ +{{$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}} +
+
  + Hugo Sponsors +
+ {{ range $sponsors.Params.sponsors }} + {{if .logo}} +
+ {{with .link -}} + + {{- end}} + Logo for {{ .name }} + {{with .link}}{{end}} + {{with .copy}} +

+ {{- . -}} +

+ {{end}} +
+ {{else}} +
+

Your Logo Here

+
+ {{end}} + {{end}} +
+
+
+{{end}} diff --git a/themes/gohugoioTheme/layouts/partials/nav-mobile.html b/themes/gohugoioTheme/layouts/partials/nav-mobile.html index 8de3d5c35..00b1a691c 100644 --- a/themes/gohugoioTheme/layouts/partials/nav-mobile.html +++ b/themes/gohugoioTheme/layouts/partials/nav-mobile.html @@ -5,8 +5,8 @@ {{ partial "nav-links-docs-mobile.html" . }} -
- +
+ - +
diff --git a/themes/gohugoioTheme/layouts/partials/site-footer.html b/themes/gohugoioTheme/layouts/partials/site-footer.html index f855bea0d..fb5b04b81 100755 --- a/themes/gohugoioTheme/layouts/partials/site-footer.html +++ b/themes/gohugoioTheme/layouts/partials/site-footer.html @@ -1,40 +1,48 @@ -