Make open source

This commit is contained in:
John Lees-Miller
2018-10-27 16:46:26 +01:00
commit 6e82ba528b
163 changed files with 3912 additions and 0 deletions

View File

@ -0,0 +1,3 @@
<strong>Alert</strong><br>
Qikiqtaaluk Region, Nunavut<br>
Canada<br>

View File

@ -0,0 +1,3 @@
<strong>Halley Research Station</strong><br>
Brunt Ice Shelf<br>
Antartica

View File

@ -0,0 +1,25 @@
<p><%= @guest.email_safe_salutation %></p>
<% if @guest.attending %>
<p>We look forward to seeing you!</p>
<p>The address is:</p>
<address><%= render partial: 'application/wedding_address' %></address>
<h3>Your RSVP</h3>
<p>If you would like to view or update your RSVP, you can use the following link to get back to it:</p>
<p><%= link_to guest_url(@guest), guest_url(@guest) %></p>
<h3>Sending a Card?</h3>
<p>If you need it, our mailing address is:</p>
<address><%= render partial: 'application/mailing_address' %></address>
<h3>Questions and answers</h3>
<p>Please check <%= link_to 'our wedding website', root_url %> for more information, or you can reply to this email.</p>
<% else %>
<p>We're sorry to hear you can't make it. If you change your mind, you can update your RSVP with the link below:</p>
<p><%= link_to guest_url(@guest), guest_url(@guest) %></p>
<p>We hope to see you another time!</p>
<% end %>
<p>&nbsp;</p>
<p><%= t :wedding_couple_names %></p>

View File

@ -0,0 +1,11 @@
<p><%= @guest.email_safe_salutation %></p>
<p>You recently entered your email address to RSVP on <%= ENV['CANONICAL_HOST'] %>.</p>
<p>If you would like to view or update your RSVP, you can use the following link to get back to it:</p>
<p><%= link_to guest_url(@guest), guest_url(@guest) %></p>
<p>If you have any questions, you can ask us by reply.</p>
<p>&nbsp;</p>
<p><%= t :wedding_couple_names %></p>

View File

@ -0,0 +1,9 @@
<div class="form-group row">
<div class="col-md-3">
<%= form.label :diet, 'Dietary Preferences', class: 'col-form-label' %>
</div>
<div class="col-md-9">
<%= form.text_area :diet, id: "#{id_stem}_diet", class: 'form-control' %>
<small class="form-text text-muted">For example, vegan, vegetarian, gluten free, and any allergies or intolerances.</small>
</div>
</div>

View File

@ -0,0 +1,5 @@
<div id="guests-leader" class="jumbotron text-center">
<div class="container">
<h1>RSVP</h1>
</div>
</div>

View File

@ -0,0 +1,19 @@
<div class="form-group row">
<div class="col-md-3">
<%= form.label :first_name, 'First Name', class: 'col-form-label' %>
<span class="wedding-required">*</span>
</div>
<div class="col-md-9">
<%= form.text_field :first_name, id: "#{id_stem}_first_name", class: 'form-control', autofocus: true, required: true %>
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<%= form.label :last_name, 'Last Name', class: 'col-form-label' %>
<span class="wedding-required">*</span>
</div>
<div class="col-md-9">
<%= form.text_field :last_name, id: "#{id_stem}_last_name", class: 'form-control', required: true %>
</div>
</div>

View File

@ -0,0 +1,21 @@
<nav class="guests-rsvp-nav">
<ul class="nav nav-pills nav-fill">
<li class="nav-item">
<%= link_to '1. About You', guest_path(@guest), class: ['nav-link', active == 1 ? 'active' : ''] %>
</li>
<li class="nav-item">
<% if active >= 2 %>
<%= link_to '2. Plus Ones', guest_plus_ones_path(@guest), class: ['nav-link', active == 2 ? 'active' : ''] %>
<% else %>
<a class="nav-link <%= active == 2 ? 'active' : '' %>">2. Plus Ones</a>
<% end %>
</li>
<li class="nav-item">
<% if active >= 3 %>
<%= link_to '3. Confirm', confirm_guest_path(@guest), class: ['nav-link', active == 3 ? 'active' : ''] %>
<% else %>
<a class="nav-link <%= active == 3 ? 'active' : '' %>">3. Confirm</a>
<% end %>
</li>
</ul>
</nav>

View File

@ -0,0 +1,12 @@
<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'leader' %>
<h2>Thanks!</h2>
<p>We've sent an email confirmation to <tt><%= @guest.email %></tt>.</p>
<p>If you don't receive the email within a few minutes, please check your spam folder, and if it's not there <%= mail_to ENV['CONTACT_EMAIL'], 'contact us' %>.</p>
<p>The email contains a link that you can use to update your RSVP later if you need to.</p>
<p><%= link_to 'Back to the Home Page', root_path %></p>
</div>
</div>
</div>

View File

@ -0,0 +1,98 @@
<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'leader' %>
<%= render partial: 'rsvp_nav', locals: { active: 3 } %>
<h2>Confirm</h2>
<%= form_with(model: @guest, url: complete_guest_path(@guest), local: true) do |form| %>
<div class="row">
<div class="col-md-12">
<%= errors_for(@guest) %>
</div>
</div>
<% if @guest.attending? %>
<h3>Your Details</h3>
<div class="card mb-3">
<h5 class="card-header"><%= @guest.name %></h5>
<div class="card-body">
<div class="row">
<div class="col-md-4">
Email
</div>
<div class="col-md-8">
<p><tt><%= @guest.email %></tt></p>
</div>
</div>
<div class="row">
<div class="col-md-4">
Dietary Preferences
</div>
<div class="col-md-8">
<% if @guest.diet.present? %>
<pre><%= @guest.diet %></pre>
<% else %>
<p>(None)</p>
<% end %>
</div>
</div>
<div class="row">
<div class="col-md-4">
Song Suggestions
</div>
<div class="col-md-8">
<% if @guest.songs.present? %>
<pre><%= @guest.songs %></pre>
<% else %>
<p>(None)</p>
<% end %>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
<%= link_to 'Edit', guest_path(@guest), class: 'card-link', data: { disable_with: 'Loading...' } %>
</div>
</div>
</div>
</div>
<h3>Plus Ones</h3>
<% if @guest.plus_ones.any? %>
<%= render @guest.plus_ones %>
<% else %>
<p>(None &mdash; just you.)</p>
<% end %>
<% else %>
<p>Sorry to hear you won't be joining us!</p>
<h3>Your Details</h3>
<div class="card mb-3">
<h5 class="card-header"><%= @guest.name %></h5>
<div class="card-body">
<div class="row">
<div class="col-md-4">
Email
</div>
<div class="col-md-8">
<p><tt><%= @guest.email %></tt></p>
</div>
</div>
</div>
</div>
<% end %>
<h3>Other Comments?</h3>
<%= form.text_area :notes, class: 'form-control' %>
<small class="form-text text-muted">Anything else you'd like to let us know?</small>
<div class="row guests-buttons">
<div class="offset-md-3 col-md-6 text-center">
<%= form.submit 'Complete RSVP', class: 'btn btn-primary', data: { disable_with: 'Sending...' } %>
</div>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -0,0 +1,30 @@
<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'leader' %>
<p>Please enter your email address to begin. We'll send you an email with important information once you have RSVP'd.</p>
<%= form_with scope: :guest, url: guests_path, local: true do |form| %>
<div class="row">
<div class="col-md-12">
<%= errors_for(@guest) %>
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<%= form.label :email, class: 'col-form-label' %>
</div>
<div class="col-md-9">
<%= form.email_field :email, id: 'guest_email', class: 'form-control', autofocus: true, required: true %>
</div>
</div>
<div class="row guests-buttons">
<div class="offset-md-3 col-md-6 text-center">
<%= invisible_recaptcha_tags text: 'Continue', class: 'btn btn-primary', data: { disable_with: 'Sending...' } %>
</div>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -0,0 +1,11 @@
<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'leader' %>
<h2>Welcome Back</h2>
<p>It looks like you've already registered your RSVP, so we've sent you an email with a link that you can use to update it.</p>
<p>Please check your <tt><%= @guest.email %></tt> email including spam folders!</p>
<p>If you don't receive the email, please <%= mail_to ENV['CONTACT_EMAIL'], 'contact us' %>.</p>
</div>
</div>
</div>

View File

@ -0,0 +1,67 @@
<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'leader' %>
<%= render partial: 'rsvp_nav', locals: { active: 1 } %>
<h2>About You</h2>
<%= form_with(model: @guest, method: :patch, local: true, id: 'guest-edit-form') do |form| %>
<div class="row">
<div class="col-md-12">
<%= errors_for(@guest) %>
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<%= form.label :email, class: 'col-form-label' %>
<span class="wedding-required">*</span>
</div>
<div class="col-md-9">
<%= form.email_field :email, id: 'guest_email', class: 'form-control', required: true %>
</div>
</div>
<%= render partial: 'name', locals: { form: form, id_stem: 'guest' } %>
<div class="form-group row">
<div class="offset-md-3 col-md-9">
<p><strong>Will you be joining us?</strong></p>
<div class="form-check form-check-inline">
<%= form.radio_button :attending, 'true', checked: true, id: 'guest_attending_true', class: 'form-check-input' %>
<%= form.label :attending, 'Yes', value: 'true', class: 'form-check-label' %>
</div>
<div class="form-check form-check-inline">
<%= form.radio_button :attending, 'false', id: 'guest_attending_false', class: 'form-check-input' %>
<%= form.label :attending, 'No', value: 'false', class: 'form-check-label' %>
</div>
</div>
</div>
<div class="guest-attending-only">
<%= render partial: 'dietary_preferences', locals: { form: form, id_stem: 'guest' } %>
<div class="form-group row">
<div class="col-md-3">
<%= form.label :songs, 'Song Suggestions', class: 'col-form-label' %>
</div>
<div class="col-md-9">
<%= form.text_area :songs, id: 'guest_songs', class: 'form-control' %>
<small class="form-text text-muted">We're crowd sourcing our playlist! Choose some songs you'd like to hear.</small>
</div>
</div>
</div>
<div class="row guests-buttons">
<div class="col-md-3">
<span class="wedding-required">* Required</span>
</div>
<div class="col-md-6 text-center">
<%= form.submit 'Continue', class: 'btn btn-primary', data: { disable_with: 'Sending...' } %>
</div>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title><%= t :wedding_name %></title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
</head>
<body>
<% flash.each do |key, value| %>
<%= content_tag(:div, class: flash_class(key)) do -%>
<%= value %>
<% end -%>
<% end %>
<%= yield %>
</body>
</html>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<%= yield %>
</body>
</html>

View File

@ -0,0 +1 @@
<%= yield %>

View File

@ -0,0 +1,32 @@
<%= form_with(model: [@guest, @plus_one], local: true) do |form| %>
<div class="row">
<div class="col-md-12">
<%= errors_for(@plus_one) %>
</div>
</div>
<%= render partial: 'guests/name', locals: { form: form, id_stem: 'plus_one' } %>
<%= render partial: 'guests/dietary_preferences', locals: { form: form, id_stem: 'plus_one' } %>
<div class="form-group row">
<div class="offset-md-3 col-md-9">
<div class="form-check form-check-inline">
<%= form.check_box :child, id: 'plus_one_child', class: 'form-check-input' %>
<%= form.label :child, 'Child (12 or under)', class: 'form-check-label' %>
</div>
</div>
</div>
<div class="row guests-buttons">
<div class="col-md-3">
<span class="wedding-required">* Required</span>
</div>
<div class="col-md-6 text-center">
<%= form.submit submit_action, class: 'btn btn-primary', data: { disable_with: 'Sending...' } %>
</div>
<div class="col-md-3 text-right">
<%= link_to 'Cancel', guest_plus_ones_path(@guest), class: 'btn btn-secondary' %>
</div>
</div>
<% end %>

View File

@ -0,0 +1,31 @@
<div class="card mb-3">
<h5 class="card-header"><%= plus_one.name %></h5>
<div class="card-body">
<div class="row">
<div class="col-md-4">
Dietary Preferences
</div>
<div class="col-md-8">
<% if plus_one.diet.present? %>
<pre><%= plus_one.diet %></pre>
<% else %>
<p>(None)</p>
<% end %>
</div>
</div>
<div class="row">
<div class="col-md-4">
Child
</div>
<div class="col-md-8">
<p><%= plus_one.child ? 'Yes' : 'No' %></p>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
<%= link_to 'Edit', edit_guest_plus_one_path(plus_one.guest, plus_one), class: 'card-link', data: { disable_with: 'Loading...' } %>
<%= link_to 'Remove', guest_plus_one_path(plus_one.guest, plus_one), method: :delete, class: 'card-link', data: { disable_with: 'Removing...', confirm: 'Are you sure?' } %>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,11 @@
<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'guests/leader' %>
<%= render partial: 'guests/rsvp_nav', locals: { active: 2 } %>
<h2>Edit Plus One</h2>
<%= render partial: 'form', locals: { submit_action: 'Save Plus One' } %>
</div>
</div>
</div>

View File

@ -0,0 +1,26 @@
<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'guests/leader' %>
<%= render partial: 'guests/rsvp_nav', locals: { active: 2 } %>
<h2>Plus Ones</h2>
<p>Please let us know below if you're bringing someone else to the wedding. Children are also very welcome.
<p>&nbsp;</p>
<% if @plus_ones.any? %>
<%= render @plus_ones %>
<% else %>
<p>No plus ones added yet. Flying solo.</p>
<% end %>
<p>
<%= link_to 'Add Plus One', new_guest_plus_one_path(@guest), class: 'btn btn-primary', data: { disable_with: 'Loading...' } %>
</p>
<p>&nbsp;</p>
<p class="guests-buttons">
<%= link_to 'Continue', confirm_guest_path(@guest), class: 'btn btn-primary' %>
</p>
</div>
</div>
</div>

View File

@ -0,0 +1,11 @@
<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'guests/leader' %>
<%= render partial: 'guests/rsvp_nav', locals: { active: 2 } %>
<h2>Add Plus One</h2>
<%= render partial: 'form', locals: { submit_action: 'Add Plus One' } %>
</div>
</div>
</div>

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 8 8">
<path d="M0 0v2h7v-2h-7zm0 3v4.91c0 .05.04.09.09.09h6.81c.05 0 .09-.04.09-.09v-4.91h-7zm1 1h1v1h-1v-1zm2 0h1v1h-1v-1zm2 0h1v1h-1v-1zm-4 2h1v1h-1v-1zm2 0h1v1h-1v-1z" />
</svg>

After

Width:  |  Height:  |  Size: 263 B

View File

@ -0,0 +1,14 @@
<footer id="welcome-index-footer" class="page-footer">
<div class="container-fluid">
<div class="row">
<div id="welcome-index-footer-cta" class="col-md-12 text-center">
<%= link_to 'RSVP TODAY!', new_guest_path, class: 'btn btn-primary wedding-cta-btn' %>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center" id="welcome-index-footer-credits">
<small><% t :photo_credits %></small>
</div>
</div>
</div>
</footer>

View File

@ -0,0 +1,11 @@
<section id="welcome-index-leader" class="jumbotron text-center">
<div class="container">
<h1 class="jumbotron-heading"><%= t :wedding_couple_names %></h1>
<p class="leader-date">
<%= t :wedding_date %>, <%= t :wedding_location %>
</p>
<p>
<%= link_to 'RSVP TODAY!', new_guest_path, class: 'btn btn-primary wedding-cta-btn' %>
</p>
</div>
</section>

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 8 8">
<path d="M3 0c-1.66 0-3 1.34-3 3 0 2 3 5 3 5s3-3 3-5c0-1.66-1.34-3-3-3zm0 1c1.11 0 2 .9 2 2 0 1.11-.89 2-2 2-1.1 0-2-.89-2-2 0-1.1.9-2 2-2z" transform="translate(1)" />
</svg>

After

Width:  |  Height:  |  Size: 264 B

View File

@ -0,0 +1,40 @@
<section id="welcome-index-wedding-plan-leader" class="jumbotron text-center">
<div class="container">
<h1>The Plan</h1>
</div>
</section>
<section id="welcome-index-wedding-plan">
<div class="container">
<div class="row">
<div class="offset-md-3 col-md-6">
<h2>Order of the Day</h2>
<p><strong>12:30pm</strong> &mdash; Guests arrive</p>
<p><strong>1pm</strong> &mdash; Wedding service</p>
<p><strong>1:30pm</strong> &mdash; Cocktails, photos, confetti and canapes</p>
<p><strong>3pm-6pm</strong> &mdash; Food and drink</p>
<p><strong>7pm</strong> &mdash; Cutting of the cake! Drinking, dancing!</p>
<p><strong>12am</strong> &mdash; Bar closes</p>
<p>There will be a tab for the evening, followed by a cash bar.</p>
<p><strong>Dress code</strong> is warm.</p>
<h2>Gifts &amp; Cards</h2>
<p>We'd be pleased if you made a donation to charity rather than bringing a gift. Our goal is to raise £1,000 for <%= link_to 'Cool Earth', @cool_earth_url %>, the non-profit that works alongside rainforest communities to halt deforestation and climate change.</p>
<p class="text-center"><%= link_to 'Donate to Cool Earth', @cool_earth_url, class: 'btn btn-primary wedding-cta-btn' %></p>
<p>If you'd like to send us a card, we'll send you our mailing address by email once you RSVP.</p>
<h2>Menu</h2>
<p><strong>Starter</strong> &mdash; Home Cured Salmon Gravadlax with Horseradish Cream &amp; Beetroot Tart <sup>*</sup> &dagger;</p>
<p><strong>Main</strong> &mdash; Fricassee of Chicken with Lyonnaise Potato &ddagger;</p>
<p><strong>Dessert</strong> &mdash; Choux Swan with Chocolate & Brandy Sauce <sup>&sect;</sup></p>
<p><strong>Children's Menu</strong>: Garlic bread, chicken goujons and chips, ice cream.</p>
<ul class="list-unstyled">
<li><small><sup>*</sup> Gluten free &amp; vegan starter: Tomato soup</small></li>
<li><small>&dagger; Gluten free &amp; dairy free starter: Gravadlax served without tart</small></li>
<li><small>&ddagger; Main is gluten free. Vegan main: Aubergine &amp; Black Bean Chilli with Cumin Rice</small></li>
<li><small><sup>&sect;</sup> Vegan, gluten free &amp; dairy free dessert: Fruit platter</small></li>
</ul>
<p>The venue is making every effort to cater for vegan, vegetarian, gluten free, allergies and other dietary preferences, as indicated in your RSVPs.</p>
<h2>RSVPs</h2>
<p>Please RSVP as soon as possible, so we know who is coming and can make sure we keep a seat and a piece of cake for you if you can come! If it turns out you cant make it, please let us know as soon as you can.</p>
</div>
</div>
</div>
</section>

View File

@ -0,0 +1,19 @@
<section id="welcome-index-venue-leader" class="jumbotron text-center">
<div class="container">
<h1>The Venue</h1>
</div>
</section>
<section id="welcome-index-venue">
<div class="container">
<div class="row">
<div class="offset-md-3 col-md-6">
<h2>How do I get there?</h2>
<p>Ships sail regularly from Ushuaia, Argentina. Allow two days.</p>
<p>There is ample snow mobile parking. Watch out for penguins.</p>
<h2>Coming from out of town?</h2>
<p>The station has a number of rooms that you can get at the <strong>discounted wedding rate</strong>.</p>
<p>Check in is from 3pm, so you may not be able to get ready in your room if you book it just for the night of the wedding.</p>
</div>
</div>
</div>
</section>

View File

@ -0,0 +1,33 @@
<section id="welcome-index-when-where">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<h1>When &amp; Where</h1>
</div>
</div>
<div class="row">
<div class="col-md-6 text-center">
<h2><%= link_to 'wedding.ics' do -%>
<%= render partial: 'calendar_svg' %>
<%- end %></h2>
<p>
<strong>12:30pm &ndash; late</strong><br>
<%= t :wedding_date %><br>
&nbsp;<br>
</p>
<p><%= link_to 'Add to Calendar', 'wedding.ics' %></p>
</div>
<div class="col-md-6 text-center">
<h2><%= link_to @google_maps_url do -%>
<%= render partial: 'map_marker_svg' %>
<%- end %></h2>
<p>
<%= render partial: 'wedding_address' %>
</p>
<p>
<%= link_to 'Google Maps', @google_maps_url %>
</p>
</div>
</div>
</div>
</section>

View File

@ -0,0 +1,7 @@
<main role="main">
<%= render partial: 'jumbo' %>
<%= render partial: 'when_where' %>
<%= render partial: 'venue' %>
<%= render partial: 'plan' %>
</main>
<%= render partial: 'footer' %>