Skip to content
Permalink
Browse files

Merge pull request #241 from geeksforsocialchange/feature/add-place-t…

…o-site

- Add Mossley OG image
  • Loading branch information...
kimadactyl committed Jun 5, 2019
2 parents ccece98 + 8680208 commit 2dc6f2cd588d50d2a02399098142c6aab8007ce3
2 .pryrc
@@ -1 +1 @@
Pry.config.editor = proc { |file, line| "atom +#{line} #{file}" }
Pry.config.editor = proc { |file, line| "atom --wait +#{line} #{file}" }
Binary file not shown.
@@ -79,6 +79,7 @@ def site_params
params.require(:site).permit(
:id,
:name,
:place_name,
:tagline,
:slug,
:description,
@@ -1,5 +1,6 @@
<%= simple_form_for [:admin, @site] do |f| %>
<%= f.input :name %>
<%= f.input :place_name %>
<%= f.input :tagline %>
<%= f.input :domain %>
<%= f.input :slug %>
@@ -21,17 +21,17 @@
<% end %>

<% if content_for?(:image) %>
<meta property="og:image" content="<%= image_url('og/wide.png') %>" />
<meta property="og:image:alt" content="PlaceCal logo" />
<meta property="og:image" content="<%= yield(:image) %>" />
<meta property="og:image:alt" content="<%= yield(:image_alt) %>" />
<meta name="twitter:image" content="<%= yield(:image) %>" />
<meta name="twitter:image:alt" content="<%= yield(:image_alt) %>" />
<% else %>
<meta property="og:image" content="<%= yield(:image) %>" />
<meta property="og:image:alt" content="<%= yield(:image_alt) %>" />
<meta property="og:image" content="<%= image_url('og/wide.png') %>" />
<meta property="og:image:alt" content="PlaceCal logo" />
<meta name="twitter:image" content="<%= image_url('og/wide.png') %>" />
<meta name="twitter:image:alt" content="<%= image_url('og/wide.png') %>" />
<meta property="og:image:width" content="1920" />
<meta property="og:image:height" content="1080" />
<meta name="twitter:image" content="<%= image_url('og/square.png') %>" />
<meta name="twitter:image:alt" content="PlaceCal logo" />
<% end %>

<meta property="og:type" content="website" />
@@ -7,8 +7,8 @@

<section class="region region__mission">
<div class="c c--narrow">
<h2 class="serif">PlaceCal is working to make <%= @site.name %> a better connected neighbourhood.</h2>
<p>We're working with <%= link_to 'local organisations', partners_path %> and <%= link_to 'places', places_path %> to create a great calendar of everything that's on in <%= @site.name %>.</p>
<h2 class="serif">PlaceCal is working to make <%= @site.place_name %> a better connected neighbourhood.</h2>
<p>We're working with <%= link_to 'local organisations', partners_path %> and <%= link_to 'places', places_path %> to create a great calendar of everything that's on in <%= @site.place_name %>.</p>
<%= link_to "See what's on", events_path, class: "btn btn--lg btn--alt btn--mt" %>
</div>
</section>
@@ -1,4 +1,5 @@
<% content_for :title, @site.name %>
<% content_for :image, image_url('regions/mossley/og.png') %>

<section>
<div class="hero_image hero_image--mossley">
@@ -0,0 +1,5 @@
class AddPlacenameToSite < ActiveRecord::Migration[5.1]
def change
add_column :sites, :place_name, :string
end
end
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20181127132710) do
ActiveRecord::Schema.define(version: 20190605132649) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -226,6 +226,7 @@
t.string "hero_image_credit"
t.string "footer_logo"
t.string "tagline", default: "The Community Calendar"
t.string "place_name"
t.index ["site_admin_id"], name: "index_sites_on_site_admin_id"
end

@@ -25,7 +25,7 @@ class SitesIntegrationTest < ActionDispatch::IntegrationTest
test 'basic page content shows up' do
get 'http://hulme.lvh.me'
assert_select 'h1', 'PlaceCal is a community events calendar where you can find everything near you, all in one place.'
assert_select 'h2', "PlaceCal is working to make #{@site.name} a better connected neighbourhood."
assert_select 'h2', "PlaceCal is working to make #{@site.place_name} a better connected neighbourhood."
assert_select 'p', @site.description
assert_select 'strong', @admin.full_name
assert_select 'strong', @admin.phone

0 comments on commit 2dc6f2c

Please sign in to comment.
You can’t perform that action at this time.