mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
collection feed design
This commit is contained in:
parent
8c8b82db63
commit
264eec42fd
@ -24,16 +24,40 @@
|
||||
<div class="-mt-16 flex flex-row space-x-4 mx-auto max-w-7xl">
|
||||
<div class="flex-1">
|
||||
<div class="bg-white p-10 relative rounded-md shadow">
|
||||
<div class="md:space-y-6 space-y-5 text-gray-500 md:text-base">
|
||||
<div class="font-semibold text-lg text-gray-700 text-center">About this Collection</div>
|
||||
<div class="md:leading-8">
|
||||
<%= simple_format @page_collection.description %>
|
||||
<div class="text-gray-500 md:text-base">
|
||||
<div class="font-semibold text-lg text-gray-700 text-center mb-4">About this Collection</div>
|
||||
<div class="md:leading-8 md:space-y-6 space-y-5">
|
||||
<%= simple_format @page_collection.description.presence || "No description" %>
|
||||
</div>
|
||||
<% if @page_collection.user == current_user %>
|
||||
<div class="-mt-2">
|
||||
<%= link_to 'Edit collection', edit_page_collection_path(@page_collection), class: 'text-notebook-blue text-sm' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex-1">
|
||||
<div class="bg-white p-8 relative rounded-md shadow mb-4">
|
||||
<div class="md:space-y-6 space-y-5 text-gray-500 md:text-base">
|
||||
<div class="overflow-hidden">
|
||||
<div class="font-semibold text-lg text-gray-700 text-center mb-4">Accepting submissions</div>
|
||||
<div class="md:leading-8 md:space-y-6 space-y-5">
|
||||
This Collection is currently accepting submissions of your
|
||||
<%= @page_collection.page_types.to_sentence %>.
|
||||
|
||||
<% if @page_collection.auto_accept? %>
|
||||
Pages submitted at this time will be automatically accepted.
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Submit a page', '#', class: "#{PageCollection.color} hover:bg-brown-500 hover:shadow transition text-white text-center block mt-4 py-2 rounded" %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-8 mt-1 relative rounded-md shadow">
|
||||
<div class="md:space-y-6 space-y-5 text-gray-500 md:text-base">
|
||||
<div class="overflow-hidden">
|
||||
@ -87,349 +111,146 @@
|
||||
|
||||
<div class="flex mt-8 space-x-8">
|
||||
<p class="text-sm text-gray-700 flex-1">
|
||||
Follow this Collection to get a site notification each time something new is published!
|
||||
Follow this Collection to get a site notification each time something new is published or when submissions open.
|
||||
</p>
|
||||
<div>
|
||||
<%= link_to 'Follow', '#', class: "text-white #{PageCollection.color} py-2 px-4 rounded hover:shadow hover:bg-brown-500 transition" %>
|
||||
<% if @page_collection.followed_by?(current_user) %>
|
||||
<%= link_to 'Unfollow', '#', class: "text-white #{PageCollection.color} py-2 px-8 rounded hover:shadow hover:bg-brown-500 transition" %>
|
||||
<% else %>
|
||||
<%= link_to 'Follow', '#', class: "text-white #{PageCollection.color} py-2 px-8 rounded hover:shadow hover:bg-brown-500 transition" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="flow-root max-w-4xl mx-auto">
|
||||
<h2 class="text-gray-400 font-bold text-sm my-4">Published content</h2>
|
||||
<ul role="list" class="-mb-8">
|
||||
<li>
|
||||
<div class="relative pb-8">
|
||||
<span class="absolute top-5 left-5 -ml-px h-full w-0.5 bg-gray-200" aria-hidden="true"></span>
|
||||
<div class="relative flex items-start space-x-3">
|
||||
<div class="relative">
|
||||
<img class="h-10 w-10 rounded-full bg-gray-400 flex items-center justify-center ring-8 ring-white" src="https://images.unsplash.com/photo-1520785643438-5bf77931f493?ixlib=rb-=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=8&w=256&h=256&q=80" alt="">
|
||||
<% if @pages.any? %>
|
||||
<h2 class="text-gray-400 font-bold text-sm mt-8 mb-4">
|
||||
<span class="float-right">Sort</span>
|
||||
Published content
|
||||
</h2>
|
||||
|
||||
<span class="absolute -bottom-2 -right-1.5 bg-white rounded-tl px-0.5">
|
||||
<i class="material-icons <%= Creature.text_color %> text-base"><%= Creature.icon %></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="min-w-0 flex-1">
|
||||
<div>
|
||||
<div class="text-sm text-gray-500">
|
||||
<a href="#" class="font-medium text-gray-900">Andrew Brown</a>
|
||||
<span class="mt-0.5">published a <strong>Creature</strong> from</span>
|
||||
<a href="#" class="font-medium text-gray-900">Cool Test Guy</a>
|
||||
<span class="px-1">·</span>
|
||||
<span class="">6h ago</span>
|
||||
</div>
|
||||
<p class="mb-4">
|
||||
<span class="text-3xl <%= PageCollection.text_color %>">“</span>
|
||||
Oh, you know, just testing submitting stuff and whatnot. Disregard this.
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-2 text-sm text-gray-700">
|
||||
<%= link_to '#', class: '' do %>
|
||||
<div class="grid grid-cols-3 bg-white rounded hover:shadow-lg">
|
||||
<div class="col-span-1">
|
||||
<%= image_tag Character.last.random_image_including_private, class: 'w-full h-full rounded-l' %>
|
||||
</div>
|
||||
<div class="col-span-2 pl-4 pt-4 border-l-4 border-brown-500">
|
||||
<h3 class="text-lg mb-4 font-bold">
|
||||
<i class="material-icons <%= Creature.text_color %> float-left mr-2"><%= Creature.icon %></i>
|
||||
Spooky Ghost Boi
|
||||
</h3>
|
||||
The spookiest in all the lands
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="relative pb-8">
|
||||
<span class="absolute top-5 left-5 -ml-px h-full w-0.5 bg-gray-200" aria-hidden="true"></span>
|
||||
<div class="relative flex items-start space-x-3">
|
||||
<div>
|
||||
<div class="relative px-1">
|
||||
<ul role="list" class="-mb-8">
|
||||
<% @pages.each do |submission| %>
|
||||
<li>
|
||||
<div class="relative pb-16">
|
||||
<span class="absolute top-5 left-5 -ml-px h-full w-0.5 bg-gray-200" aria-hidden="true"></span>
|
||||
<div class="relative flex items-start space-x-3">
|
||||
<div class="relative">
|
||||
<img class="h-10 w-10 rounded-full bg-gray-400 flex items-center justify-center ring-8 ring-white" src="https://images.unsplash.com/photo-1520785643438-5bf77931f493?ixlib=rb-=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=8&w=256&h=256&q=80" alt="">
|
||||
<%= link_to submission.user do %>
|
||||
<%= image_tag submission.user.image_url(40), class: "h-10 w-10 rounded-full #{User.color} flex items-center justify-center ring-4 ring-white", alt: "" %>
|
||||
<% end %>
|
||||
|
||||
<span class="absolute -bottom-2 -right-1.5 bg-white rounded-tl px-0.5">
|
||||
<i class="material-icons <%= User.text_color %> text-base"><%= User.icon %></i>
|
||||
<i class="material-icons <%= content_class_from_name(submission.content_type).text_color %> text-base">
|
||||
<%= content_class_from_name(submission.content_type).icon %>
|
||||
</i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="min-w-0 flex-1 py-1.5">
|
||||
<div class="text-sm text-gray-500">
|
||||
<a href="#" class="font-medium text-gray-900">Dr. Evil</a>
|
||||
followed
|
||||
<a href="#" class="font-medium text-gray-900">Bob "Bob" Bobson</a>
|
||||
<span class="px-1">·</span>
|
||||
<span class="text-sm text-gray-500">2d ago</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="relative pb-8">
|
||||
<span class="absolute top-5 left-5 -ml-px h-full w-0.5 bg-gray-200" aria-hidden="true"></span>
|
||||
<div class="relative flex items-start space-x-3">
|
||||
<div>
|
||||
<div class="relative px-1">
|
||||
<div class="relative">
|
||||
<img class="h-10 w-10 rounded-full bg-gray-400 flex items-center justify-center ring-8 ring-white" src="https://images.unsplash.com/photo-1520785643438-5bf77931f493?ixlib=rb-=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=8&w=256&h=256&q=80" alt="">
|
||||
|
||||
<span class="absolute -bottom-2 -right-1.5 bg-white rounded-tl px-0.5">
|
||||
<i class="material-icons text-blue-500 text-base">forum</i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="min-w-0 flex-1 py-0">
|
||||
<div class="text-sm leading-8 text-gray-500">
|
||||
<span class="mr-0.5">
|
||||
<a href="#" class="font-medium text-gray-900">Dr. Evil</a>
|
||||
started a forum discussion
|
||||
</span>
|
||||
<span class="px-1">·</span>
|
||||
<span class="text-sm text-gray-500">2d ago</span>
|
||||
<div class="ml-1">
|
||||
<a href="#" class="relative inline-flex items-center rounded-full border border-gray-300 px-3 py-1 text-sm bg-blue-500 hover:bg-blue-400 hover:shadow-lg">
|
||||
<i class="material-icons float-left text-white">forum</i>
|
||||
<span class="ml-3.5 font-medium text-white">What is the name of that guy who did the thing?</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="relative pb-8">
|
||||
<div class="relative flex items-start space-x-3">
|
||||
<div class="relative">
|
||||
<img class="h-10 w-10 rounded-full bg-gray-400 flex items-center justify-center ring-8 ring-white" src="https://images.unsplash.com/photo-1531427186611-ecfd6d936c79?ixlib=rb-=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=8&w=256&h=256&q=80" alt="">
|
||||
|
||||
<span class="absolute -bottom-2 -right-1.5 bg-white rounded-tl px-0.5">
|
||||
<i class="material-icons <%= Document.text_color %> text-base"><%= Document.icon %></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="min-w-0 flex-1">
|
||||
<div class="text-sm">
|
||||
<a href="#" class="font-medium text-gray-900">Jason Meyers</a>
|
||||
<span class="text-gray-500">shared a <strong>Document</strong></span>
|
||||
<span class="px-1">·</span>
|
||||
<span class="text-sm text-gray-500">5d ago</span>
|
||||
</div>
|
||||
<div class="mt-2 text-sm text-gray-700">
|
||||
<%= link_to '#', class: '' do %>
|
||||
<div class="grid grid-cols-3 bg-white rounded hover:shadow-lg">
|
||||
<div class="col-span-1">
|
||||
<%= image_tag Character.last.random_image_including_private, class: 'w-full h-full rounded-l' %>
|
||||
</div>
|
||||
<div class="col-span-2 pl-4 pt-4 border-l-4 border-teal-500">
|
||||
<h3 class="text-lg mb-4 font-bold">
|
||||
<i class="material-icons <%= Document.text_color %> float-left mr-2"><%= Document.icon %></i>
|
||||
Document name
|
||||
</h3>
|
||||
Details or description here
|
||||
<div class="min-w-0 flex-1">
|
||||
<div>
|
||||
<div class="text-sm text-gray-500">
|
||||
<%= link_to @page_collection.user.display_name, @page_collection.user, class: 'font-medium text-gray-900' %>
|
||||
<span class="mt-0.5">published a <strong><%= submission.content_type %></strong> by</span>
|
||||
<%= link_to submission.user.display_name, submission.user, class: 'font-medium text-gray-900' %>
|
||||
<span class="px-1">·</span>
|
||||
<span class=""><%= time_ago_in_words submission.accepted_at %> ago</span>
|
||||
</div>
|
||||
<% if submission.explanation? %>
|
||||
<p class="mb-4">
|
||||
<span class="text-3xl <%= content_class_from_name(submission.content_type).text_color %>">“</span>
|
||||
<%= submission.explanation %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="mt-2 text-sm text-gray-700">
|
||||
<%= link_to submission.content, class: '' do %>
|
||||
<div class="grid grid-cols-3 bg-white rounded hover:shadow-lg">
|
||||
<div class="col-span-1">
|
||||
<%= image_tag submission.content.random_image_including_private, class: 'w-full h-full rounded-l' %>
|
||||
</div>
|
||||
<div class="col-span-2 px-4 pt-4 border-l-4 border-brown-500">
|
||||
<h3 class="text-lg mb-4 pb-2 border-b-2 border-gray-100">
|
||||
<i class="material-icons <%= content_class_from_name(submission.content_type).text_color %> text-5xl float-left mr-2">
|
||||
<%= content_class_from_name(submission.content_type).icon %>
|
||||
</i>
|
||||
<div class="-pt-4 font-bold"><%= submission.cached_content_name %></div>
|
||||
<% if submission.content.universe %>
|
||||
<div class="text-xs font-base">
|
||||
from <%= link_to submission.content.universe.name, submission.content.universe, class: Universe.text_color %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="text-xs font-base">
|
||||
by <%= link_to submission.user.display_name, submission.user, class: User.text_color %>
|
||||
</div>
|
||||
<% end %>
|
||||
</h3>
|
||||
|
||||
<p class="clear-both">
|
||||
<%= submission.content.description %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<% else %>
|
||||
<div class="max-w-md mx-auto sm:max-w-3xl mt-16">
|
||||
<div>
|
||||
<div class="text-center">
|
||||
<i class="material-icons mx-auto text-5xl text-gray-300"><%= PageCollection.icon %></i>
|
||||
<h2 class="mt-2 text-lg font-medium text-gray-900">
|
||||
Nothing published here yet
|
||||
</h2>
|
||||
<p class="mt-1 text-sm text-gray-500">
|
||||
...but submissions are open!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<!--
|
||||
<div class="my-10">
|
||||
<h3 class="text-xs font-semibold text-gray-500 uppercase tracking-wide">
|
||||
Ready to submit a page to this collection?
|
||||
</h3>
|
||||
<ul role="list" class="mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<% @submittable_content.each do |content_type, content_list| %>
|
||||
<li>
|
||||
<button type="button" class="group p-2 w-full flex items-center justify-between rounded-full border border-gray-300 shadow-sm space-x-3 text-left hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
|
||||
<span class="min-w-0 flex-1 flex items-center space-x-3">
|
||||
<span class="block flex-shrink-0">
|
||||
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1517841905240-472988babdf9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
||||
</span>
|
||||
<span class="block min-w-0 flex-1">
|
||||
<span class="block text-sm font-medium text-gray-900 truncate">Lindsay Walton</span>
|
||||
<span class="block text-sm font-medium text-gray-500 truncate">Front-end Developer</span>
|
||||
</span>
|
||||
</span>
|
||||
<span class="flex-shrink-0 h-10 w-10 inline-flex items-center justify-center">
|
||||
<svg class="h-5 w-5 text-gray-400 group-hover:text-gray-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%= content_for :full_width_page_header do %>
|
||||
<%= render partial: 'content/components/collection_header', locals: { collection: @page_collection } %>
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12 m12 l7">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-title">
|
||||
<% if user_signed_in? %>
|
||||
<% if current_user != @page_collection.user %>
|
||||
<% if @page_collection.followed_by?(current_user) %>
|
||||
<%= link_to unfollow_page_collection_path(@page_collection), class: "btn #{PageCollection.color} lighten-2 right" do %>
|
||||
<i class="material-icons left"><%= PageCollection.icon %></i>
|
||||
Unfollow
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
<%= link_to follow_page_collection_path(@page_collection), class: "btn #{PageCollection.color} right" do %>
|
||||
<i class="material-icons left"><%= PageCollection.icon %></i>
|
||||
Follow for updates
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to 'Edit collection', edit_page_collection_path(@page_collection), class: 'btn btn-flat right' %>
|
||||
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to '#', class: "btn #{PageCollection.color} lighten-2 right disabled" do %>
|
||||
<i class="material-icons left"><%= PageCollection.icon %></i>
|
||||
Follow
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
About this collection
|
||||
</div>
|
||||
<br />
|
||||
<% if user_signed_in? && @page_collection.user == current_user %>
|
||||
<%= form_for @page_collection do |f| %>
|
||||
<div class="input-field">
|
||||
<%= f.text_area :description, class: 'materialize-textarea' %>
|
||||
<%= f.label :description, 'Collection Description' %>
|
||||
<div class="help-text">You can add details for this collection to explain what kinds of pages you'd like it to contain.</div>
|
||||
</div>
|
||||
<%= f.submit 'Save changes', class: 'btn right blue white-text' %>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if @page_collection.description? %>
|
||||
<div class="spaced-paragraphs">
|
||||
<%= simple_format @page_collection.description %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 m12 l5">
|
||||
|
||||
<% if user_signed_in? && @page_collection.user_id == current_user.id %>
|
||||
<% if @page_collection.pending_submissions.count > 0 %>
|
||||
<%=
|
||||
link_to page_collection_pending_submissions_path(page_collection_id: @page_collection.id),
|
||||
class: "#{PageCollection.color} white-text btn btn-large",
|
||||
style: "width: 100%" do
|
||||
%>
|
||||
<i class="material-icons left">notifications_active</i>
|
||||
<div class="left">
|
||||
<%= pluralize(@page_collection.pending_submissions.count, 'pending submission') %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%# render partial: 'page_collections/quick_add' %>
|
||||
<% if user_signed_in? %>
|
||||
<a class="waves-effect hoverable waves-light btn btn-large modal-trigger blue" href="#share-page-modal" style="width: 100%; margin-top: 0.5em;">
|
||||
<% else %>
|
||||
<a class="waves-effect hoverable waves-light btn btn-large modal-trigger blue" href="https://www.notebook.ai/users/sign_in" style="width: 100%; margin-top: 0.5em;">
|
||||
<% end %>
|
||||
<i class="material-icons <%= PageCollection.text_color %> text-darken-2 left"><%= PageCollection.icon %></i>
|
||||
<div class="left">
|
||||
<%= 'Sign in to' unless user_signed_in? %>
|
||||
<%= @page_collection.user == current_user ? 'Add' : 'Submit' %> a page
|
||||
<span class="hide-on-small-only">
|
||||
to this Collection
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
<br /><br />
|
||||
|
||||
<div class="grey-text uppercase">Published pages</div>
|
||||
|
||||
<div class="collection">
|
||||
<% @page_collection.page_types.each do |pt| %>
|
||||
<% klass = content_class_from_name(pt) %>
|
||||
<%= link_to(send(pt.downcase.pluralize + '_page_collection_path', @page_collection), class: "collection-item #{klass.color} white-text") do %>
|
||||
<i class="material-icons left"><%= klass.icon %></i>
|
||||
<%= pt.pluralize %>
|
||||
<span class="badge white-text"><%= @page_collection.accepted_submissions.where(content_type: pt).count %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @page_collection.page_types.count > 1 %>
|
||||
<%= link_to @page_collection, class: "collection-item #{PageCollection.text_color}" do %>
|
||||
<i class="material-icons left"><%= PageCollection.icon %></i>
|
||||
All Pages
|
||||
<span class="badge brown-text"><%= @page_collection.accepted_submissions.count %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="grey-text uppercase">Curator</div>
|
||||
<div>
|
||||
<%= link_to @page_collection.user, class: "#{User.text_color}" do %>
|
||||
<%= image_tag @page_collection.user.image_url(size=20), class: 'left circle', style: 'margin-right: 8px;' %>
|
||||
<%= @page_collection.user.display_name %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if @page_collection.contributors.any? %>
|
||||
<br />
|
||||
<div class="grey-text uppercase">Contributors</div>
|
||||
<% @page_collection.contributors.each do |user| %>
|
||||
<div class="col s12 m6 l3">
|
||||
<%= link_to user, class: "#{User.text_color}" do %>
|
||||
<%= image_tag user.image_url(size=20), class: 'left circle', style: 'margin-right: 8px;' %>
|
||||
<%= user.display_name %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<br />
|
||||
<% end %>
|
||||
|
||||
<!--
|
||||
<div class="col s12 m6 l6">
|
||||
<br />
|
||||
<div class="grey-text uppercase">
|
||||
Share collection to...
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to [
|
||||
'http://twitter.com/share?',
|
||||
'url=' + URI::escape(page_collection_url(@page_collection)),
|
||||
'&text=' + URI::escape("I'm building a collection of fictional " + @page_collection.page_types.map(&:pluralize).map(&:downcase).to_sentence + " on Notebook.ai. Check it out!")
|
||||
].join, class: 'blue-text', target: '_blank' do %>
|
||||
<i class="material-icons tiny left" style="margin-top: 4px;">share</i>
|
||||
Twitter
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%=
|
||||
link_to "https://www.facebook.com/sharer/sharer.php?app_id=1523926344336934&u=#{URI::escape(page_collection_url(@page_collection))}&display=popup&ref=plugin&src=share_button",
|
||||
class: 'blue-text',
|
||||
onclick: "return !window.open(this.href, 'Facebook', 'width=640,height=580')" do
|
||||
%>
|
||||
<i class="material-icons tiny left" style="margin-top: 4px">share</i>
|
||||
Facebook
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if @pages.empty? %>
|
||||
<div class="row">
|
||||
<div class="col s12 m10 offset-m1 l8 offset-l2">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user