From 0ee77274618376671a2fd41b4983805eb5a5f759 Mon Sep 17 00:00:00 2001 From: Victoria Wang Date: Fri, 1 May 2015 23:22:43 -0700 Subject: [PATCH] Initial work on stats UI --- app/mockup.rb | 5 + sass/_project-sass/_project-Main.scss | 6 + views/stats_mockup.erb | 222 ++++++++++++++++++++++++++ 3 files changed, 233 insertions(+) create mode 100644 views/stats_mockup.erb diff --git a/app/mockup.rb b/app/mockup.rb index eceef7f7..3017a565 100644 --- a/app/mockup.rb +++ b/app/mockup.rb @@ -24,4 +24,9 @@ get '/welcome_mockup' do require_login erb :'welcome_mockup', locals: {site: current_site} end + +get '/stats_mockup' do + require_login + erb :'stats_mockup', locals: {site: current_site} +end # :nocov: \ No newline at end of file diff --git a/sass/_project-sass/_project-Main.scss b/sass/_project-sass/_project-Main.scss index cf076c06..bffd29bb 100644 --- a/sass/_project-sass/_project-Main.scss +++ b/sass/_project-sass/_project-Main.scss @@ -1880,4 +1880,10 @@ a.tag:hover { @media (max-device-width:480px), screen and (max-width:800px) { display: inline; } +} +table#latest-visitors { + td:nth-child(1), td:nth-child(2) { + white-space: nowrap; + text-overflow: ellipsis; + } } \ No newline at end of file diff --git a/views/stats_mockup.erb b/views/stats_mockup.erb new file mode 100644 index 00000000..accdc145 --- /dev/null +++ b/views/stats_mockup.erb @@ -0,0 +1,222 @@ + + + + + + +
+
+
+

Your Stats

+
+ <% if !@events.empty? && (site.followings_dataset.count > 0) %> + class="selected"<% end %>>All + class="selected"<% end %>>Profile Activity + <% end %> + Global Activity +
+
+
+

Your Site

+ Edit Site +
+
+
+ +
+
+
+
+
+
+

Latest Visitors

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LocationReferrerTime
San Francisco, CAneocities.org4/27/15 7:11PM
Portland, ORGoogle search4/27/15 7:15PM
New York, NYviolasong.com4/28/15 8:22PM
Seattle, WAFacebook URL4/28/15 9:22PM
Portland, ORGoogle search4/30/15 7:15PM
San Francisco, CAneocities.org4/27/15 7:11PM
Portland, ORGoogle search4/27/15 7:15PM
New York, NYviolasong.com4/28/15 8:22PM
Seattle, WATwitter URL4/28/15 9:22PM
Portland, ORGoogle search4/30/15 7:15PM
+
+
+ +
+
+

Top Referrers

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReferrerVisits
Google search22
Google search22
Google search22
Google search22
Google search22
+
+ +
+

Top Locations

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LocationsVisits
Portland130
Portland130
Portland130
Portland130
Portland130
+
+
+
+ +
+
+

<%= site.title %>

+
+
+ <% if site.updated_at %> + Last updated
<%= site.updated_at.ago %> + <% else %> + Your new website!
Start Building + <% end %> +
+
+
<%= site.views.format_large_number %> views
+ <% follows_count = site.follows_dataset.count %> +
<%= follows_count.format_large_number %> follower<%= follows_count == 1 ? '' : 's' %>
+
+
+
+ + + + + + <%== erb :'_follows', layout: false, locals: {site: site, is_current_site: site == current_site} %> + + <%== erb :'_tags', layout: false, locals: {site: site, is_current_site: site == current_site} %> +
+
+
+