From 9ed707e4f33e5afedc457ec6dcc7268d67b0471b Mon Sep 17 00:00:00 2001 From: steflewandowski Date: Tue, 15 Nov 2011 22:15:12 +0000 Subject: [PATCH] admin for doors and stories --- admin/app.rb | 17 ++++ admin/controllers/doors.rb | 47 ++++++++++ admin/controllers/maps.rb | 47 ++++++++++ admin/controllers/stories.rb | 1 + admin/helpers/stories_helper.rb | 112 +++++++++++++++++++++++ admin/views/base/_sidebar.haml | 23 ++--- admin/views/base/index.haml | 19 +--- admin/views/doors/_form.haml | 48 ++++++++++ admin/views/doors/edit.haml | 15 +++ admin/views/doors/index.haml | 33 +++++++ admin/views/doors/new.haml | 14 +++ admin/views/layouts/application.haml | 15 +-- admin/views/maps/_form.haml | 22 +++++ admin/views/maps/edit.haml | 15 +++ admin/views/maps/index.haml | 31 +++++++ admin/views/maps/new.haml | 14 +++ admin/views/stories/_form.haml | 75 ++++++++++----- admin/views/stories/index.haml | 11 +-- app/controllers/maps.rb | 20 ---- app/stylesheets/admin.scss | 42 +++++++++ app/stylesheets/application.scss | 34 ++++++- app/views/layouts/application.haml | 1 + models/story.rb | 12 ++- public/images/hh_pattern.png | Bin 0 -> 1885 bytes public/images/hh_pattern_transparent.png | Bin 0 -> 1847 bytes public/javascripts/application.js | 43 ++++++--- public/stylesheets/admin.css | 47 ++++++++++ public/stylesheets/application.css | 102 +++++++++++++-------- 28 files changed, 713 insertions(+), 147 deletions(-) create mode 100644 admin/controllers/doors.rb create mode 100644 admin/controllers/maps.rb create mode 100644 admin/helpers/stories_helper.rb create mode 100644 admin/views/doors/_form.haml create mode 100644 admin/views/doors/edit.haml create mode 100644 admin/views/doors/index.haml create mode 100644 admin/views/doors/new.haml create mode 100644 admin/views/maps/_form.haml create mode 100644 admin/views/maps/edit.haml create mode 100644 admin/views/maps/index.haml create mode 100644 admin/views/maps/new.haml create mode 100644 app/stylesheets/admin.scss create mode 100644 public/images/hh_pattern.png create mode 100644 public/images/hh_pattern_transparent.png create mode 100644 public/stylesheets/admin.css diff --git a/admin/app.rb b/admin/app.rb index d56d754..ec91235 100644 --- a/admin/app.rb +++ b/admin/app.rb @@ -19,6 +19,21 @@ class Admin < Padrino::Application # disable :flash # Disables sinatra-flash (enabled by default if Sinatra::Flash is defined) # layout :my_layout # Layout can be in views/layouts/foo.ext or views/foo.ext (default :application) # + + def date_field_tag(name, options={}) + options.reverse_merge!(:name => name) + input_tag(:date, options) + end + + def time_field_tag(name, options={}) + options.reverse_merge!(:name => name) + input_tag(:time, options) + end + + def number_field_tag(name, options={}) + options.reverse_merge!(:name => name) + input_tag(:number, options) + end set :login_page, "/admin/sessions/new" @@ -31,6 +46,8 @@ class Admin < Padrino::Application end access_control.roles_for :admin do |role| + role.project_module :doors, "/doors" + role.project_module :maps, "/maps" role.project_module :stories, "/stories" role.project_module :accounts, "/accounts" end diff --git a/admin/controllers/doors.rb b/admin/controllers/doors.rb new file mode 100644 index 0000000..ba3adf4 --- /dev/null +++ b/admin/controllers/doors.rb @@ -0,0 +1,47 @@ +Admin.controllers :doors do + + get :index do + @doors = Door.all + render 'doors/index' + end + + get :new do + @door = Door.new + render 'doors/new' + end + + post :create do + @door = Door.new(params[:door]) + if @door.save + flash[:notice] = 'Door was successfully created.' + redirect url(:doors, :edit, :id => @door.id) + else + render 'doors/new' + end + end + + get :edit, :with => :id do + @door = Door.first(:id => params[:id]) + render 'doors/edit' + end + + put :update, :with => :id do + @door = Door.first(:id => params[:id]) + if @door.update(params[:door]) + flash[:notice] = 'Door was successfully updated.' + redirect url(:doors, :edit, :id => @door.id) + else + render 'doors/edit' + end + end + + delete :destroy, :with => :id do + door = Door.first(:id => params[:id]) + if door.destroy + flash[:notice] = 'Door was successfully destroyed.' + else + flash[:error] = 'Unable to destroy Door!' + end + redirect url(:doors, :index) + end +end diff --git a/admin/controllers/maps.rb b/admin/controllers/maps.rb new file mode 100644 index 0000000..a04f420 --- /dev/null +++ b/admin/controllers/maps.rb @@ -0,0 +1,47 @@ +Admin.controllers :maps do + + get :index do + @maps = Map.all + render 'maps/index' + end + + get :new do + @map = Map.new + render 'maps/new' + end + + post :create do + @map = Map.new(params[:map]) + if @map.save + flash[:notice] = 'Map was successfully created.' + redirect url(:maps, :edit, :id => @map.id) + else + render 'maps/new' + end + end + + get :edit, :with => :id do + @map = Map.get(params[:id]) + render 'maps/edit' + end + + put :update, :with => :id do + @map = Map.get(params[:id]) + if @map.update(params[:map]) + flash[:notice] = 'Map was successfully updated.' + redirect url(:maps, :edit, :id => @map.id) + else + render 'maps/edit' + end + end + + delete :destroy, :with => :id do + map = Map.get(params[:id]) + if map.destroy + flash[:notice] = 'Map was successfully destroyed.' + else + flash[:error] = 'Unable to destroy Map!' + end + redirect url(:maps, :index) + end +end diff --git a/admin/controllers/stories.rb b/admin/controllers/stories.rb index f2acd92..3e1d7fa 100644 --- a/admin/controllers/stories.rb +++ b/admin/controllers/stories.rb @@ -7,6 +7,7 @@ get :new do @story = Story.new + @story.map = Map.first render 'stories/new' end diff --git a/admin/helpers/stories_helper.rb b/admin/helpers/stories_helper.rb new file mode 100644 index 0000000..462078c --- /dev/null +++ b/admin/helpers/stories_helper.rb @@ -0,0 +1,112 @@ +class Padrino::Helpers::FormBuilder::AbstractFormBuilder + # Here we have access to a number of useful variables + # + # ** template (use this to invoke any helpers)(ex. template.hidden_field_tag(...)) + # ** object (the record for this form) (ex. object.valid?) + # ** object_name (object's underscored type) (ex. object_name => 'admin_user') + # + # We also have access to self.field_types => [:text_field, :text_area, ...] + # In addition, we have access to all the existing field tag + # helpers (text_field, hidden_field, file_field, ...) + + # f.ordering_select :color, :options => ['red', 'green'] + def ordering_select(field, options={}) + options.reverse_merge!(:id => field_id(field), :selected => field_value(field)) + options[:class] = 'ordering_select' + options.merge!(:class => field_error(field, options)) + @template.select_tag field_name(field), options + end + + # f.text_area :summary, :value => "(enter summary)", :id => 'summary' + def rich_text_area(field, options={}) + options.reverse_merge!(:value => field_value(field), :id => field_id(field)) + options[:class] = 'rich_text_editor' + options.merge!(:class => field_error(field, options)) + @template.text_area_tag field_name(field), options + end + + # f.date_field :event_date, :value=>"1985-12-31", :id=> 'date' + def date_field(field, options={}) + options.reverse_merge!(:value => field_value(field), :id => field_id(field)) + options[:class] = 'date_field' + options.merge!(:class => field_error(field, options)) + @template.date_field_tag field_name(field), options + end + + # f.time_field :event_time, :value=>"20:30", :id=> 'date' + def time_field(field, options={}) + options.reverse_merge!(:value => field_value(field) ? field_value(field).to_time.strftime("%H:%M") : nil, :id => field_id(field)) + options[:class] = 'time_field' + options.merge!(:class => field_error(field, options)) + @template.time_field_tag field_name(field), options + end + + # f.time_field :event_time, :value=>"20:30", :id=> 'date' + def number_field(field, options={}) + options.reverse_merge!(:value => field_value(field) ? field_value(field).to_i : nil, :id => field_id(field)) + options[:class] = 'number_field' + options.merge!(:class => field_error(field, options)) + @template.number_field_tag field_name(field), options + end + + # f.image_file_field :photo, :class => 'avatar' + def image_file_field(field, options={}) + options.reverse_merge!(:id => field_id(field)) + options.merge!(:class => field_error(field, options)) + html = '' + html += @template.file_field_tag field_name(field), options + if object.send(field).url + html += "#" + end + html + end + + # f.normal_file_field :photo, :class => 'avatar' + def normal_file_field(field, options={}) + options.reverse_merge!(:id => field_id(field)) + options.merge!(:class => field_error(field, options)) + html = '' + html += @template.file_field_tag field_name(field), options + if object.send(field).url + html += "File: #{object.send(field).url}" + end + html + end + + # f.audio_file_field :photo, :class => 'avatar' + def audio_file_field(field, options={}) + options.reverse_merge!(:id => field_id(field)) + options.merge!(:class => field_error(field, options)) + html = '' + html += @template.file_field_tag field_name(field), options + if object.send(field).url + html += "File: #{object.send(field).url}" + end + html + end + + def crud_fields(options = {}) + html = "" + if options[:parent] + fields = object.class.form_fields(options[:parent]) + else + fields = object.class.form_fields + end + fields.each_with_index do |f, i| + html << "

" + html << self.label(f[:label] || f[:name]) + if f[:options] + html << self.send(f[:type], f[:name], :options=>f[:options]) + elsif f[:options] && f[:include_blank] + html << self.send(f[:type], f[:name], :options=>f[:options], :include_blank=>f[:include_blank]) + else + html << self.send(f[:type], f[:name]) + end + if f[:help] + html << 'Help'+f[:help]+'' + end + html << "

\n" + end + html + end +end \ No newline at end of file diff --git a/admin/views/base/_sidebar.haml b/admin/views/base/_sidebar.haml index 60e8240..261e5b1 100644 --- a/admin/views/base/_sidebar.haml +++ b/admin/views/base/_sidebar.haml @@ -1,11 +1,12 @@ -.block - %h3 Simple Block - .content - %p - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -.block - %h3 Links - %ul.navigation - %li=link_to "Link 1" - %li=link_to "Link 2" +- if false + .block + %h3 Simple Block + .content + %p + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + .block + %h3 Links + %ul.navigation + %li=link_to "Link 1" + %li=link_to "Link 2" diff --git a/admin/views/base/index.haml b/admin/views/base/index.haml index ab2ecf1..db0ad6e 100644 --- a/admin/views/base/index.haml +++ b/admin/views/base/index.haml @@ -3,23 +3,6 @@ %h2.title Dashboard .inner %p.first - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. - %span.hightlight - Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - %p - %span.small - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore - %p - %span.gray - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore - %hr - %p - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. - Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. - %span.hightlight - Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + Using this admin area you can control the content for the Stories from an Invisible Town app. -content_for :sidebar, partial("base/sidebar") diff --git a/admin/views/doors/_form.haml b/admin/views/doors/_form.haml new file mode 100644 index 0000000..b9756e5 --- /dev/null +++ b/admin/views/doors/_form.haml @@ -0,0 +1,48 @@ +.group + =f.label :x + =f.error_message_on :x + =f.number_field :x, :class => :text_field + + =f.label :y + =f.error_message_on :y + =f.number_field :y, :class => :text_field + +.group + =f.label :from_id + =f.error_message_on :from_id + + %select{:name=>"door[from_id]", :onchange => "console.log(this); $('#map_image').attr('src', $(this).find('option:selected').data().image);"} + - maps = Map.all + - maps.each do |map| + %option{:"data-image" => "/map_images/#{map.slug}.png", :value=>map.id, :selected => @door.from_id == map.id}= map.title + +.group + =f.label :to_id + =f.error_message_on :to_id + + %select{:name=>"door[to_id]"} + - maps = Map.all + - maps.each do |map| + %option{:"data-image" => "/map_images/#{map.slug}.png", :value=>map.id, :selected => @door.to_id == map.id}= map.title + +%img#map_image{:src=>"/map_images/#{@door.from.slug}.png", :width => "800"} +#marker{:style=>"display: block; position: absolute; z-index: 2000; width: 8px; height: 8px; background-color: black;"} + +:javascript + $(function() { + var $map = $("#map_image"); + window.redrawMarker = function() { + var left = $map.offset().left + (parseInt($("#door_x").val()) * $map.width()/100.0 ); + console.log(left); + $("#marker").css("left", left); + $("#marker").css("top", $map.offset().top + (parseInt($("#door_y").val()) * $map.height()/100.0 )); + } + $("#door_x").bind("change", function() { redrawMarker(); }); + $("#door_y").bind("change", function() { redrawMarker(); }); + redrawMarker(); + var markerInterval = setInterval(redrawMarker, 500); + }); + +.group.navform.wat-cf + =f.submit pat(:save), :class => :button + =f.submit pat(:cancel), :onclick => "window.location='#{url(:doors, :index)}';return false", :class => :button diff --git a/admin/views/doors/edit.haml b/admin/views/doors/edit.haml new file mode 100644 index 0000000..39c122b --- /dev/null +++ b/admin/views/doors/edit.haml @@ -0,0 +1,15 @@ +.block + .secondary-navigation + %ul.wat-cf + %li.first=link_to pat(:list), url(:doors, :index) + %li=link_to pat(:new), url(:doors, :new) + %li.active=link_to pat(:edit), url(:doors, :edit, :id => @door.id) + .content + %h2.title + =pat(:edit) + =mt(:door) + .inner + -form_for :door, url(:doors, :update, :id => @door.id), :method => :put, :class => :form do |f| + =partial "doors/form", :locals => { :f => f } + +-content_for :sidebar, partial("base/sidebar") diff --git a/admin/views/doors/index.haml b/admin/views/doors/index.haml new file mode 100644 index 0000000..540adc4 --- /dev/null +++ b/admin/views/doors/index.haml @@ -0,0 +1,33 @@ +.block + .secondary-navigation + %ul.wat-cf + %li.first.active=link_to pat(:list), url(:doors, :index) + %li=link_to pat(:new), url(:doors, :new) + .content + %h2.title + =pat(:all) + =mt(:doors) + .inner + %table.table + %tr + %th.first=mat(:door, :id) + %th=mat(:door, :x) + %th=mat(:door, :y) + %th=mat(:door, :from_id) + %th=mat(:door, :to_id) + %th.last=" " + -@doors.each do |door| + %tr + %td.first=door.id + %td=door.x + %td=door.y + %td=door.from.slug + %td=door.to.slug + %td.last + =button_to pat(:edit), url(:doors, :edit, :id => door.id), :method => :get, :class => :button_to + ="|" + =button_to pat(:delete), url(:doors, :destroy, :id => door.id), :method => :delete, :class => :button_to, :onsubmit => "return confirm('#{pat(:confirm)}')" + .actions-bar.wat-cf + .actions=" " + +-content_for :sidebar, partial("base/sidebar") diff --git a/admin/views/doors/new.haml b/admin/views/doors/new.haml new file mode 100644 index 0000000..b52d367 --- /dev/null +++ b/admin/views/doors/new.haml @@ -0,0 +1,14 @@ +.block + .secondary-navigation + %ul.wat-cf + %li.first=link_to pat(:list), url(:doors, :index) + %li.active=link_to pat(:new), url(:doors, :new) + .content + %h2.title + =pat(:new) + =mt(:door) + .inner + -form_for :door, url(:doors, :create), :class => :form do |f| + =partial "doors/form", :locals => { :f => f } + +-content_for :sidebar, partial("base/sidebar") diff --git a/admin/views/layouts/application.haml b/admin/views/layouts/application.haml index f88d776..1c0913d 100644 --- a/admin/views/layouts/application.haml +++ b/admin/views/layouts/application.haml @@ -2,12 +2,15 @@ %html{:lang => "en", :xmlns => "http://www.w3.org/1999/xhtml"} %head %meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"} - %title Padrino Admin + %title Stories from an Invisible Town Admin =stylesheet_link_tag :base, "themes/default/style" + + + %body #container #header - %h1=link_to "Padrino Admin", url(:base_index) + %h1=link_to "Stories from an Invisible Town Admin", url(:base_index) #user-navigation %ul.wat-cf %li=link_to pat(:profile), url(:accounts, :edit, :id => current_account.id) @@ -21,11 +24,3 @@ .flash=[:error, :warning, :notice].map { |type| flash_tag(type, :class => "message #{type}") }.join #main =yield - #footer - .block - %p - Copyright © - =Time.now.year - Your Site - Powered by - =link_to "Padrino v.#{Padrino.version}", "http://padrino.github.com", :target => :_blank - #sidebar=yield_content :sidebar diff --git a/admin/views/maps/_form.haml b/admin/views/maps/_form.haml new file mode 100644 index 0000000..4014415 --- /dev/null +++ b/admin/views/maps/_form.haml @@ -0,0 +1,22 @@ +.group + =f.label :slug + =f.error_message_on :slug + =f.text_field :slug, :class => :text_field + %span.description Ex: a simple text + +.group + =f.label :title + =f.error_message_on :title + =f.text_field :title, :class => :text_field + %span.description Ex: a simple text + +.group + =f.label :image + =f.error_message_on :image + =f.text_field :image, :class => :text_field + %span.description Ex: a simple text + + +.group.navform.wat-cf + =f.submit pat(:save), :class => :button + =f.submit pat(:cancel), :onclick => "window.location='#{url(:maps, :index)}';return false", :class => :button diff --git a/admin/views/maps/edit.haml b/admin/views/maps/edit.haml new file mode 100644 index 0000000..396e566 --- /dev/null +++ b/admin/views/maps/edit.haml @@ -0,0 +1,15 @@ +.block + .secondary-navigation + %ul.wat-cf + %li.first=link_to pat(:list), url(:maps, :index) + %li=link_to pat(:new), url(:maps, :new) + %li.active=link_to pat(:edit), url(:maps, :edit, :id => @map.id) + .content + %h2.title + =pat(:edit) + =mt(:map) + .inner + -form_for :map, url(:maps, :update, :id => @map.id), :method => :put, :class => :form do |f| + =partial "maps/form", :locals => { :f => f } + +-content_for :sidebar, partial("base/sidebar") diff --git a/admin/views/maps/index.haml b/admin/views/maps/index.haml new file mode 100644 index 0000000..e98721e --- /dev/null +++ b/admin/views/maps/index.haml @@ -0,0 +1,31 @@ +.block + .secondary-navigation + %ul.wat-cf + %li.first.active=link_to pat(:list), url(:maps, :index) + %li=link_to pat(:new), url(:maps, :new) + .content + %h2.title + =pat(:all) + =mt(:maps) + .inner + %table.table + %tr + %th.first=mat(:map, :id) + %th=mat(:map, :slug) + %th=mat(:map, :title) + %th=mat(:map, :image) + %th.last=" " + -@maps.each do |map| + %tr + %td.first=map.id + %td=map.slug + %td=map.title + %td=map.image + %td.last + =button_to pat(:edit), url(:maps, :edit, :id => map.id), :method => :get, :class => :button_to + ="|" + =button_to pat(:delete), url(:maps, :destroy, :id => map.id), :method => :delete, :class => :button_to, :onsubmit => "return confirm('#{pat(:confirm)}')" + .actions-bar.wat-cf + .actions=" " + +-content_for :sidebar, partial("base/sidebar") diff --git a/admin/views/maps/new.haml b/admin/views/maps/new.haml new file mode 100644 index 0000000..97a4e6a --- /dev/null +++ b/admin/views/maps/new.haml @@ -0,0 +1,14 @@ +.block + .secondary-navigation + %ul.wat-cf + %li.first=link_to pat(:list), url(:maps, :index) + %li.active=link_to pat(:new), url(:maps, :new) + .content + %h2.title + =pat(:new) + =mt(:map) + .inner + -form_for :map, url(:maps, :create), :class => :form do |f| + =partial "maps/form", :locals => { :f => f } + +-content_for :sidebar, partial("base/sidebar") diff --git a/admin/views/stories/_form.haml b/admin/views/stories/_form.haml index d7f9daf..e70b977 100644 --- a/admin/views/stories/_form.haml +++ b/admin/views/stories/_form.haml @@ -2,39 +2,72 @@ =f.label :title =f.error_message_on :title =f.text_field :title, :class => :text_field - %span.description Ex: a simple text + %span.description The title that you would give this story -.group - =f.label :post_id - =f.error_message_on :post_id - =f.text_field :post_id, :class => :text_field - %span.description Ex: a simple text +- if 1 == 0 + .group + =f.label :post_id + =f.error_message_on :post_id + =f.text_field :post_id, :class => :text_field + %span.description Unused at the moment .group - =f.label :happened_at - =f.error_message_on :happened_at - =f.text_field :happened_at, :class => :text_field - %span.description Ex: a simple text + =f.label "Description" + =f.error_message_on :description + =f.text_field :description, :class => :text_field + %span.description Make this story have some text. Leave this blank for photo / video / audio .group - =f.label :x - =f.error_message_on :x - =f.text_field :x, :class => :text_field - %span.description Ex: a simple text + =f.label "Aframe clip ID" + =f.error_message_on :aframe_clip_id + =f.text_field :aframe_clip_id, :class => :text_field + %span.description Eg. 74bc12df-c5c1-43ce-af00-3cc0b106cbcc - you get this from the URL bar in Aframe .group - =f.label :y - =f.error_message_on :y - =f.text_field :y, :class => :text_field - %span.description Ex: a simple text + =f.label "Happened on" + =f.error_message_on :date_happened + =f.date_field :date_happened, :class => :date_field + + =f.label "at" + =f.error_message_on :time_of_day + =f.time_field :time_of_day, :class => :time_field + .group =f.label :map_id =f.error_message_on :map_id - =f.text_field :map_id, :class => :text_field - %span.description Ex: a simple text - + %select{:name=>"story[map_id]", :onchange => "console.log(this); $('#map_image').attr('src', $(this).find('option:selected').data().image);"} + - maps = Map.all + - maps.each do |map| + %option{:"data-image" => "/map_images/#{map.slug}.png", :value=>map.id, :selected => @story.map_id == map.id}= map.title + #x_y + =f.label :x + =f.error_message_on :x + =f.number_field :x, :class => :x + =f.label :y + =f.error_message_on :y + =f.number_field :y, :class => :y + + %br + %span.description Alter these values to position the story on the map + %img#map_image{:src=>"/map_images/#{@story.map.slug}.png", :width => "800"} + #marker{:style=>"display: block; position: absolute; z-index: 2000; width: 8px; height: 8px; background-color: black;"} .group.navform.wat-cf =f.submit pat(:save), :class => :button =f.submit pat(:cancel), :onclick => "window.location='#{url(:stories, :index)}';return false", :class => :button + +:javascript + $(function() { + var $map = $("#map_image"); + window.redrawMarker = function() { + var left = $map.offset().left + (parseInt($("#story_x").val()) * $map.width()/100.0 ); + console.log(left); + $("#marker").css("left", left); + $("#marker").css("top", $map.offset().top + (parseInt($("#story_y").val()) * $map.height()/100.0 )); + } + $("#story_x").bind("change", function() { redrawMarker(); }); + $("#story_y").bind("change", function() { redrawMarker(); }); + redrawMarker(); + var markerInterval = setInterval(redrawMarker, 500); + }); \ No newline at end of file diff --git a/admin/views/stories/index.haml b/admin/views/stories/index.haml index db4a276..b962ae8 100644 --- a/admin/views/stories/index.haml +++ b/admin/views/stories/index.haml @@ -12,21 +12,12 @@ %tr %th.first=mat(:story, :id) %th=mat(:story, :title) - %th=mat(:story, :post_id) - %th=mat(:story, :happened_at) - %th=mat(:story, :x) - %th=mat(:story, :y) - %th=mat(:story, :map_id) %th.last=" " -@stories.each do |story| %tr %td.first=story.id %td=story.title - %td=story.post_id - %td=story.happened_at - %td=story.x - %td=story.y - %td=story.map_id + %td.last =button_to pat(:edit), url(:stories, :edit, :id => story.id), :method => :get, :class => :button_to ="|" diff --git a/app/controllers/maps.rb b/app/controllers/maps.rb index cacb87e..bc423c4 100644 --- a/app/controllers/maps.rb +++ b/app/controllers/maps.rb @@ -8,24 +8,4 @@ Map.all_json_summary.to_json end - # get :index, :map => "/foo/bar" do - # session[:foo] = "bar" - # render 'index' - # end - - # get :sample, :map => "/sample/url", :provides => [:any, :js] do - # case content_type - # when :js then ... - # else ... - # end - - # get :foo, :with => :id do - # "Maps to url '/foo/#{params[:id]}'" - # end - - # get "/example" do - # "Hello world!" - # end - - end diff --git a/app/stylesheets/admin.scss b/app/stylesheets/admin.scss new file mode 100644 index 0000000..3e50b96 --- /dev/null +++ b/app/stylesheets/admin.scss @@ -0,0 +1,42 @@ +@import "compass/css3/box-sizing"; +@import "compass/css3/box-shadow"; +@import "compass/css3/border-radius"; + +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; +} + +#main-navigation { + background-color: darken(#2288aa, 5); + ul { + li { + background-color: darken(#2288aa, 5); + } + } +} + +body textarea { + min-height: 12em; + padding: 6px; +} + +#header { + background-color: #2288aa; +} + +.group { + margin-top: 3em; + label { + font-size: 125%; + font-weight: bold; + } +} + +.form input.text_field, .form textarea.text_area { + border: 2px solid #444; + padding: 6px; + display: block; + @include box-sizing(border-box); + font-size: 125%; +} \ No newline at end of file diff --git a/app/stylesheets/application.scss b/app/stylesheets/application.scss index efaecd3..8c6934a 100644 --- a/app/stylesheets/application.scss +++ b/app/stylesheets/application.scss @@ -1,7 +1,9 @@ @import "compass/css3"; +$yellow: #efd500; +$blue: #26b5e8; #header { - background-color: rgba(255,255,255, 0.5); + background-color: rgba(255,255,212, 0.5); position: absolute; top: 0px; left: 0px; @@ -32,7 +34,6 @@ position: absolute; top: 0; left: 0; - background-color: #ddd; #background { &:hover { background-color: white; @@ -68,7 +69,7 @@ } .door { - background-color: green; + background-color: $blue; width: 24px; height: 24px; font-size: 16px; @@ -87,7 +88,7 @@ } .story { - background-color: red; + background-color: $yellow; width: 24px; height: 24px; display: block; @@ -98,6 +99,31 @@ body { overflow: hidden; font-family: "Heletica Neue", helvetica, arial, sans-serif; + background-image: url(/images/hh_pattern_transparent.png); +} + +#story { + position: absolute; + left: 25%; + top: 64px; + z-index: 5000; + width: 50%; + background-color: #fefdfa; + @include box-shadow(rgba(10,10,0,0.5) 0px 0px 10px inset, rgba(255,255,255,1) 0px 0px 10px); + border: 1px rgba(0,0,0,0.3) solid; + padding: 1.5em; + h1 { + font-family: 'Cabin Sketch', cursive; + font-weight: normal; + } +} + +.done_button { + background-color: #ddaa11; + color: white; + font-weight: bold; + padding: 0.5em; + cursor: pointer; } /* TipTip CSS - Version 1.2 */ diff --git a/app/views/layouts/application.haml b/app/views/layouts/application.haml index 2513169..9abda13 100644 --- a/app/views/layouts/application.haml +++ b/app/views/layouts/application.haml @@ -26,6 +26,7 @@ %a#stories_title{:href=>"/"} Stories from an Invisible Town #page.container + #story #map #map_markers #map_image diff --git a/models/story.rb b/models/story.rb index 48f35b1..383f0f8 100644 --- a/models/story.rb +++ b/models/story.rb @@ -4,8 +4,11 @@ class Story # property , property :id, Serial property :title, String - property :post_id, String - property :happened_at, DateTime + property :description, Text + property :aframe_clip_id, String + property :soundcloud_track_id, String + property :date_happened, Date + property :time_of_day, Time property :x, Integer property :y, Integer belongs_to :map @@ -14,8 +17,9 @@ def json_summary { :id => self.id, :title => self.title, - :post_id => self.post_id, - :happened_at => self.happened_at, + :aframe_clip_id => self.aframe_clip_id, + :soundcloud_track_id => self.soundcloud_track_id, + :date_happened => self.date_happened, :x => self.x, :y => self.y, :map => self.map.slug diff --git a/public/images/hh_pattern.png b/public/images/hh_pattern.png new file mode 100644 index 0000000000000000000000000000000000000000..bf7c28d54653cb23866e65e9857b43c1c930e181 GIT binary patch literal 1885 zcmV-j2cr0iP)exhp~BuK_UQVB()}6^@4lYs#xleClRXKd{LrWuJ*ai~Q{`%EFE>M6lrxfy;j- z`Z-5BK+_5Uo8S><7kGNjnsl75W8|iO_->;o?`3juB@-*~L1Rq#wTArlhw1Kr1f168 zZ1xMAfD$HA$D*_gWanLA^_bN4g9?ANRGaR%`gG5q0q2WG z!`a2%9`73`S;46&yNbK{3}unB>v6|>ixg^hC4JGUHd9Ry&1~98n)tXh(Q(j~cd-iC zw3c&Vo|xZH?)LcCQro~!)$|HnuuwN7h3QnJnw=ikD{}&n&yJCbflllkHOYXREQ52$ z5va1sC~%1t3BSfTj-V`_tT4WGfq2l8Mvvv&20mKXomhI77!vx~5~7CJ`>`oW!yh^{ z4j7m(SZlhdB6GI})+oKLVY3de2V32Ya(NX};Wix}+->#Qu0>Vv92?`J9RDpe1p;K} zrER2=JbFCfcW7e^xA*6kovxcpN2(gB!!nRq0_;RPCv!*!NJ#Z;txKr2hkzGAmhQm{ zR6t1|;>p)B^X1uoSjd{c4m{M3)+qp58KYN{!{Lc|+m98qjc~-si4Y4`jWk{p*i0Az zJ`qtP)Aqti>(dGdLA*Cm8{6$RAI_+W0Vb>IdcK!_lUi}QS3A^R+rS&)8q%@EHb@6G zoV7-1EN%DP5s2ZKjU%@rJrj{EY7RM=RTZkbaPdcOVxpkNpE6rrn-p||l1^?t=x7@_ zXBMAD$)M)sX&Vqghk(wRm_>vExin?m(3q~ov{pIR>CW2-WIin#)9OqWv)_K(&52DI zllf|bb*iAV-NZKQN`Yma*F->LF-<$CNh#Zmo!eSutZY;~Y&+xKo~RNgG=32CbXCqh z2S#J+4A$CU)`_cvq!_a8G214c=g6|y$gs7G3q_-W8ytts7vZfFZ3FL8yb?EfiA~6C z>RA%}zO2*xU~`v$7=yd$x_ftvVXwA4y$py8cQGt)vHCQ8+|sj}2(6?A`E%#%~vTz0Mqp4mHGee9*+_(xV3q;ray zJ;H1W@_q|Un`_Wue1 z$st;3*??%`({py%#21Trb0!wGoJ{tg3CCZU#=okpS?NkQxqWt*!rj5u+##-`=iUd-WTE-ffaJ!#uS;&OUHMETvU=aB$ zKW!WMrY<$yrjv^91yo7-5}zrq z+6TqKkD;{Y2Pdo6oK{v(HdTlkR2DWLQl&fIZo4@2d?i0^yyEp?@|+(()%W3J6PA8uMNgdsmg0TG57n?R6E&VEC^Y!WJDHk z+Q%i@Y>qDyq6cy3P9@WCJ|euq9bEO3;*ZF}4f|Db=NssPleU55i?Yp2{{B!=K8ZBH z0J9&V%{_rM*@r#`h#vHIL_N8oQ@ygp6DiQCF@;2m4gNcoI=R`{2c zvGm_?HS|^brXx}Uu^{4V-Se_^>wboIU58(eio$g#faSCI()0hToCkg$`2X(ny8r_K X{9|98KASbC00000NkvXXu0mjfJrj)X literal 0 HcmV?d00001 diff --git a/public/images/hh_pattern_transparent.png b/public/images/hh_pattern_transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..e9b0b1cf8d10834a99bead0e4c9458b2fe674028 GIT binary patch literal 1847 zcmV-72gvw|P)$kLY-8a>c0MeGgdzk8MdAR$;zE>b#9zPx#1;Mk#3h#qaY>FykVpxK5ERKt96sdO zv4X*P7j}2n^0GTS)6>)aUQyNEvpch_A{s7Oa!a!_{rdHLzpDDxuj(xl5!{ZKg4^`E zZGoHp2LG^}KvN?O9Kd!?fC#V{Yq+;*Ams7Cwo_=Qt{86`gpApiT7t*sW4O^-gLA>3 zfT#;IdCEpBW(6o^aV0_qhIhvy`_r>d@)<{1wyq<+=_} z*8^Vn!jVroAj@h1%K4L4531mjE63$ITkiT7k2|}063x*V^d*Dd%m`?edU6#7^>YQ`!`w-(9G>akGm5kiRyQspO1T$=cV*EW> zNg&*7dw*}*beZjt)g+GYl!+hupN@XAS_`TG zb2Uvx6u|B5F1I$ldY1=K4|qeP`q!<&F$RAkRM`AzGi&{JGo$B@H~)Cwgty{&VKxF9 zM$JrmIQhzz4v0aiQ*gR<;IN7x1-JGR2fg%P!4A`C=;&OrrAz(+dH-)>l+wWiYCl1? z>E%Xksw6qhMjC(i&RRNgWh)2ETF7A3dpW0+rPlPv18Ge`DE9F+HzpPLcaw#dWlfI(6BMr>wf{`BQW=*lsG@w8{mv0dKVUnquq@ul zQ5_gHuY6C^)2^A?z*qa$m(b^o4rw=ptl@TnlTtMNH~-uKHcV?Acb7zDw2Q!D=qWMI zUY`c)&9Yq1GZl{7^uk%Pw}QREcRW>><2O?$O1Hze;kDGw&s+=DG3&^jUx=dhzMEd^ zS*8wFAdx-pc3{Y`V%OxNdX)IuJN^`?2AI~bIRahqOaR&D8|?Y^Za#dM%9&c;ZwOp= zX6rqp;Nq9r!B4vGpy0@u6DbF*H?aInb2703{Kh~MS;~tNtuG^>wea3Svi3qzd=yF& z18nxn{Q|%I7PV3`*B1WL->LwK1DxnsPD9c`!mB2NhNRr9fJj4Fq6;K<-iRB4UFIH&xuQ z?5^C6$33&90u2q>ON-&Mwo=9Fx2~O>oP0W3LNWH9tqF%41a~i=LzM;?ToH z`wPV|frlK2sxRWHgWABSJe6ldUUCv5l|4(&-)ATN9c|KYaOe=X1G#{#0weZy{Rhrl5;Xk;}hCVvjCU^~Xd%TGG)&e{mbHktj)Y=vCu2 zAA7dDd|v0<7Xj4>=e;9?+8k$Za$`tVIz)o80wiARk5pI+^gg{g>U~>IGz)3E@mf~( zv$^t58g6fydxJe?mZR-0_P<5RcO3?ugq0Ty{;?bQw38o+b@JlIK{5Xbz>iUdZt z#>R%2xZIC>(WO`*O z#>cq%LVKa?APazcdS9xr;P;z9cnhR@qMqkk^f~A9x+1$-s!&A}uW@GGYd!O6ZQv6I zx7&TX#LeME!(b3-q!wcT=QI8#X{_XY`Q9UQz zWGZNKQ(YtoVrVg(?V9G}HgZ0rtyKPq@$=C zgPNG*Mv9LlKI!08!lA#Vyv3X4Nk^9i!q6%2#D7fd$rV%)+xhRFZalmV7+2@g|8tzY l^ADjr!0!P6eqLV*FaR{;NRW0+y^R0>002ovPDHLkV1h^rpqKyv literal 0 HcmV?d00001 diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 09194c9..f65ce94 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -6,12 +6,15 @@ $(function() { var $map_image = $("#map_image"); var $map_markers = $("#map_markers"); var $map_title = $("#stories_title"); + var $story = $("#story"); function resetView() { $map.height($(window).height()); $map.width($(window).width()); } + $story.hide(); + resetView(); $.getJSON("/maps.json", function(data) { @@ -36,8 +39,8 @@ $(function() { $.each($map_markers.find("a"), function(i, e) { console.log(e); $e = $(e); - $e.css("left", ($e.data().x * ($img.width() / 100.0)) + $img.offset().left + "px") - .css("top", ($e.data().y * ($img.height() / 100.0)) + "px"); + $e.css("left", ($e.data().x * ($img.width() / 100.0)) + $img.offset().left - 12 + "px") + .css("top", ($e.data().y * ($img.height() / 100.0)) - 12 + "px"); }); } }) @@ -69,8 +72,6 @@ $(function() { $map_markers.empty().hide(); $.each(map.doors_from, function(i, e) { var $door = $(""); - console.log(e.x); - console.log((e.x * ($img.width() / 100.0)) + $img.offset().left + "px"); $door .text("+") .attr("title", "Go to the " + e.to + " map") @@ -79,8 +80,8 @@ $(function() { .data("y", e.y) .css("position", "absolute") .css("z-index", "10000") - .css("left", (e.x * ($img.width() / 100.0)) + $img.offset().left + "px") - .css("top", (e.y * ($img.height() / 100.0)) + "px") + .css("left", (e.x * ($img.width() / 100.0)) + $img.offset().left - 12 + "px") + .css("top", (e.y * ($img.height() / 100.0)) - 12 + "px") .attr("tabindex", tabindex) .hide() .fadeIn() @@ -102,41 +103,57 @@ $(function() { .data("y", e.y) .css("position", "absolute") .css("z-index", "10000") - .css("left", (e.x * ($img.width() / 100.0)) + $img.offset().left + "px") - .css("top", (e.y * ($img.height() / 100.0)) + "px") + .css("left", (e.x * ($img.width() / 100.0)) - 12 + $img.offset().left + "px") + .css("top", (e.y * ($img.height() / 100.0)) - 12 + "px") .hide() .fadeIn() .attr("tabindex", tabindex) - .click(function() { showStory($(this).data.story); }); + .click(function() { showStory($(this).data().story); }); $map_markers.append($story); tabindex = tabindex + 1; }); + $(".tip").tipTip(); $(".story, .door").mouseover(function(){ - console.log("OVER"); $(this).stop().animate({ marginTop: '-10px', marginLeft: '-10px', width: '44px', - height: '44px' + height: '44px', + fontSize: '32px' }) }); $(".story, .door").mouseout(function(){ - console.log("LEAVE"); $(this).stop().animate({ marginTop: '0px', marginLeft: '0px', width: '24px', - height: '24px' + height: '24px', + fontSize: '16px' }) }); }); } function showStory(story) { + $("#tiptip_holder").fadeOut(); + $story.slideUp(function(){ + $story.empty(); + var $title = $("

").text(story.title); + var $done_button = $("Done"); + $done_button.click(function(){ hideStory(); }); + $story + .append($title) + .append($done_button) + .slideDown(); + }); + } + + function hideStory() { + $story.slideUp(); } function goBack() { diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css new file mode 100644 index 0000000..0a1e3a9 --- /dev/null +++ b/public/stylesheets/admin.css @@ -0,0 +1,47 @@ +/* line 5, ../../app/stylesheets/admin.scss */ +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; +} + +/* line 10, ../../app/stylesheets/admin.scss */ +#main-navigation { + background-color: #1e7795; +} +/* line 13, ../../app/stylesheets/admin.scss */ +#main-navigation ul li { + background-color: #1e7795; +} + +/* line 19, ../../app/stylesheets/admin.scss */ +body textarea { + min-height: 12em; + padding: 6px; +} + +/* line 24, ../../app/stylesheets/admin.scss */ +#header { + background-color: #2288aa; +} + +/* line 28, ../../app/stylesheets/admin.scss */ +.group { + margin-top: 3em; +} +/* line 30, ../../app/stylesheets/admin.scss */ +.group label { + font-size: 125%; + font-weight: bold; +} + +/* line 36, ../../app/stylesheets/admin.scss */ +.form input.text_field, .form textarea.text_area { + border: 2px solid #444; + padding: 6px; + display: block; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + font-size: 125%; +} diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 82fe44a..7869464 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1,6 +1,6 @@ -/* line 3, ../../app/stylesheets/application.scss */ +/* line 5, ../../app/stylesheets/application.scss */ #header { - background-color: rgba(255, 255, 255, 0.5); + background-color: rgba(255, 255, 212, 0.5); position: absolute; top: 0px; left: 0px; @@ -8,7 +8,7 @@ height: 3em; z-index: 2000; } -/* line 11, ../../app/stylesheets/application.scss */ +/* line 13, ../../app/stylesheets/application.scss */ #header h1 { color: #333; text-align: center; @@ -17,17 +17,17 @@ font-weight: normal; text-shadow: white 0px 1px 0px; } -/* line 18, ../../app/stylesheets/application.scss */ +/* line 20, ../../app/stylesheets/application.scss */ #header h1 a { color: #333; text-decoration: none; } -/* line 21, ../../app/stylesheets/application.scss */ +/* line 23, ../../app/stylesheets/application.scss */ #header h1 a:hover { color: #464; } -/* line 28, ../../app/stylesheets/application.scss */ +/* line 30, ../../app/stylesheets/application.scss */ #map { -moz-box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 40px inset; -webkit-box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 40px inset; @@ -38,9 +38,8 @@ position: absolute; top: 0; left: 0; - background-color: #ddd; } -/* line 36, ../../app/stylesheets/application.scss */ +/* line 37, ../../app/stylesheets/application.scss */ #map #background { width: 100%; height: 100%; @@ -48,12 +47,12 @@ top: 0; left: 0; } -/* line 37, ../../app/stylesheets/application.scss */ +/* line 38, ../../app/stylesheets/application.scss */ #map #background:hover { background-color: white; cursor: pointer; } -/* line 47, ../../app/stylesheets/application.scss */ +/* line 48, ../../app/stylesheets/application.scss */ #map #map_markers { position: absolute; height: 100%; @@ -64,11 +63,11 @@ margin: auto; display: block; } -/* line 56, ../../app/stylesheets/application.scss */ +/* line 57, ../../app/stylesheets/application.scss */ #map #map_markers a { cursor: pointer; } -/* line 60, ../../app/stylesheets/application.scss */ +/* line 61, ../../app/stylesheets/application.scss */ #map #map_image { z-index: 5; position: absolute; @@ -78,9 +77,9 @@ display: block; } -/* line 70, ../../app/stylesheets/application.scss */ +/* line 71, ../../app/stylesheets/application.scss */ .door { - background-color: green; + background-color: #26b5e8; width: 24px; height: 24px; font-size: 16px; @@ -102,14 +101,14 @@ -o-box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px inset, white 0px 0px 10px; box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px inset, white 0px 0px 10px; } -/* line 84, ../../app/stylesheets/application.scss */ +/* line 85, ../../app/stylesheets/application.scss */ .door a { cursor: pointer; } -/* line 89, ../../app/stylesheets/application.scss */ +/* line 90, ../../app/stylesheets/application.scss */ .story { - background-color: red; + background-color: #efd500; width: 24px; height: 24px; display: block; @@ -125,14 +124,45 @@ box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px inset, white 0px 0px 10px; } -/* line 98, ../../app/stylesheets/application.scss */ +/* line 99, ../../app/stylesheets/application.scss */ body { overflow: hidden; font-family: "Heletica Neue", helvetica, arial, sans-serif; + background-image: url(/images/hh_pattern_transparent.png); } -/* TipTip CSS - Version 1.2 */ /* line 105, ../../app/stylesheets/application.scss */ +#story { + position: absolute; + left: 25%; + top: 64px; + z-index: 5000; + width: 50%; + background-color: #fefdfa; + -moz-box-shadow: rgba(10, 10, 0, 0.5) 0px 0px 10px inset, white 0px 0px 10px; + -webkit-box-shadow: rgba(10, 10, 0, 0.5) 0px 0px 10px inset, white 0px 0px 10px; + -o-box-shadow: rgba(10, 10, 0, 0.5) 0px 0px 10px inset, white 0px 0px 10px; + box-shadow: rgba(10, 10, 0, 0.5) 0px 0px 10px inset, white 0px 0px 10px; + border: 1px rgba(0, 0, 0, 0.3) solid; + padding: 1.5em; +} +/* line 115, ../../app/stylesheets/application.scss */ +#story h1 { + font-family: 'Cabin Sketch', cursive; + font-weight: normal; +} + +/* line 121, ../../app/stylesheets/application.scss */ +.done_button { + background-color: #ddaa11; + color: white; + font-weight: bold; + padding: 0.5em; + cursor: pointer; +} + +/* TipTip CSS - Version 1.2 */ +/* line 131, ../../app/stylesheets/application.scss */ #tiptip_holder { font-family: 'Cabin Sketch', cursive; display: none; @@ -142,27 +172,27 @@ body { z-index: 99999; } -/* line 114, ../../app/stylesheets/application.scss */ +/* line 140, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_top { padding-bottom: 5px; } -/* line 118, ../../app/stylesheets/application.scss */ +/* line 144, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_bottom { padding-top: 5px; } -/* line 122, ../../app/stylesheets/application.scss */ +/* line 148, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_right { padding-left: 5px; } -/* line 126, ../../app/stylesheets/application.scss */ +/* line 152, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_left { padding-right: 5px; } -/* line 130, ../../app/stylesheets/application.scss */ +/* line 156, ../../app/stylesheets/application.scss */ #tiptip_content { font-size: 125%; color: #000; @@ -180,7 +210,7 @@ body { -moz-box-shadow: 0 0 3px #555; } -/* line 147, ../../app/stylesheets/application.scss */ +/* line 173, ../../app/stylesheets/application.scss */ #tiptip_arrow, #tiptip_arrow_inner { position: absolute; border-color: transparent; @@ -190,31 +220,31 @@ body { width: 0; } -/* line 156, ../../app/stylesheets/application.scss */ +/* line 182, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_top #tiptip_arrow { border-top-color: #222; border-top-color: rgba(255, 255, 255, 0.35); } -/* line 161, ../../app/stylesheets/application.scss */ +/* line 187, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_bottom #tiptip_arrow { border-bottom-color: #222; border-bottom-color: rgba(255, 255, 255, 0.35); } -/* line 166, ../../app/stylesheets/application.scss */ +/* line 192, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_right #tiptip_arrow { border-right-color: #222; border-right-color: rgba(255, 255, 255, 0.35); } -/* line 171, ../../app/stylesheets/application.scss */ +/* line 197, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_left #tiptip_arrow { border-left-color: #222; border-left-color: rgba(255, 255, 255, 0.35); } -/* line 176, ../../app/stylesheets/application.scss */ +/* line 202, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_top #tiptip_arrow_inner { margin-top: -7px; margin-left: -6px; @@ -222,7 +252,7 @@ body { border-top-color: rgba(225, 225, 225, 0.92); } -/* line 183, ../../app/stylesheets/application.scss */ +/* line 209, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_bottom #tiptip_arrow_inner { margin-top: -5px; margin-left: -6px; @@ -230,7 +260,7 @@ body { border-bottom-color: rgba(225, 225, 225, 0.92); } -/* line 190, ../../app/stylesheets/application.scss */ +/* line 216, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_right #tiptip_arrow_inner { margin-top: -6px; margin-left: -5px; @@ -238,7 +268,7 @@ body { border-right-color: rgba(225, 225, 225, 0.92); } -/* line 197, ../../app/stylesheets/application.scss */ +/* line 223, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_left #tiptip_arrow_inner { margin-top: -6px; margin-left: -7px; @@ -248,18 +278,18 @@ body { /* Webkit Hacks */ @media screen and (-webkit-min-device-pixel-ratio:0) { - /* line 206, ../../app/stylesheets/application.scss */ + /* line 232, ../../app/stylesheets/application.scss */ #tiptip_content { padding: 4px 8px 5px 8px; background-color: rgba(245, 245, 245, 0.88); } - /* line 210, ../../app/stylesheets/application.scss */ + /* line 236, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_bottom #tiptip_arrow_inner { border-bottom-color: rgba(245, 245, 245, 0.88); } - /* line 213, ../../app/stylesheets/application.scss */ + /* line 239, ../../app/stylesheets/application.scss */ #tiptip_holder.tip_top #tiptip_arrow_inner { border-top-color: rgba(220, 220, 220, 0.92); }