mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Customise footer logo
This commit is contained in:
@@ -6,7 +6,8 @@ module Admin
|
||||
{name: 'Producer signup page', preferences: [:producer_signup_pricing_table_html, :producer_signup_case_studies_html, :producer_signup_detail_html]},
|
||||
{name: 'Hub signup page', preferences: [:hub_signup_pricing_table_html, :hub_signup_case_studies_html, :hub_signup_detail_html]},
|
||||
{name: 'Group signup page', preferences: [:group_signup_pricing_table_html, :group_signup_case_studies_html, :group_signup_detail_html]},
|
||||
{name: 'Footer', preferences: [:footer_facebook_url, :footer_twitter_url, :footer_instagram_url, :footer_linkedin_url, :footer_googleplus_url, :footer_pinterest_url,
|
||||
{name: 'Footer', preferences: [:footer_logo,
|
||||
:footer_facebook_url, :footer_twitter_url, :footer_instagram_url, :footer_linkedin_url, :footer_googleplus_url, :footer_pinterest_url,
|
||||
:footer_email, :footer_links_md, :footer_about_url]}]
|
||||
end
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
require 'open_food_network/paperclippable'
|
||||
|
||||
class ContentConfiguration < Spree::Preferences::FileConfiguration
|
||||
# Header
|
||||
include OpenFoodNetwork::Paperclippable
|
||||
|
||||
# Header
|
||||
preference :logo, :file
|
||||
preference :logo_mobile, :file
|
||||
preference :logo_mobile_svg, :file
|
||||
@@ -31,6 +32,8 @@ class ContentConfiguration < Spree::Preferences::FileConfiguration
|
||||
preference :group_signup_detail_html, :text, default: "(TODO: Detail)"
|
||||
|
||||
# Footer
|
||||
preference :footer_logo, :file
|
||||
has_attached_file :footer_logo
|
||||
preference :footer_facebook_url, :string, default: "https://www.facebook.com/OpenFoodNet"
|
||||
preference :footer_twitter_url, :string, default: "https://twitter.com/OpenFoodNet"
|
||||
preference :footer_instagram_url, :string, default: ""
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
.row
|
||||
.small-12.medium-3.medium-offset-2.columns.text-left
|
||||
%a{href: root_path}
|
||||
%img{src: "/assets/logo-color.png", srcset: "/assets/logo-color.svg", width: "220px"}
|
||||
%img{src: ContentConfig.footer_logo.url, width: "220"}
|
||||
.small-12.medium-5.columns.text-left
|
||||
%p.text-small
|
||||
Read our
|
||||
|
||||
@@ -25,6 +25,7 @@ en:
|
||||
logo_mobile_svg: "Mobile logo (SVG)"
|
||||
home_hero: "Hero image"
|
||||
home_show_stats: "Show statistics"
|
||||
footer_logo: "Logo (220x76)"
|
||||
footer_facebook_url: "Facebook URL"
|
||||
footer_twitter_url: "Twitter URL"
|
||||
footer_instagram_url: "Instagram URL"
|
||||
|
||||
Reference in New Issue
Block a user