Skip to content

Remove piwik code (closes #457) + minor layout cleanup #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ module ApplicationHelper
TEXT_SUCCESS = 'text-success'.freeze
TEXT_DANGER = 'text-danger'.freeze

def page_title
current_organization || 'TimeOverflow'
end

# from gravatar
def avatar_url(user, size = 32)
gravatar_id = Digest::MD5::hexdigest(user.email).downcase
Expand Down
31 changes: 4 additions & 27 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,17 @@
<meta charset="utf-8">
<meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>
<% if content_for? :window_title %>
<%= content_for :window_title %>
<% else %>
<% if current_organization %>
<%= current_organization %> —
<% end %>
<%= yield :title %>
<% end %>
</title>
<title><%= page_title %></title>
<%= csrf_meta_tags %>
<link href="/favicon.ico" rel="shortcut icon">
<%= stylesheet_link_tag 'libs', media: 'all' %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= stylesheet_link_tag 'application', 'https://fonts.googleapis.com/css?family=Work+Sans:400,500,600,700' %>
<%= stylesheet_link_tag 'application', 'https://fonts.googleapis.com/icon?family=Material+Icons' %>
<%= stylesheet_link_tag 'https://fonts.googleapis.com/css?family=Work+Sans:400,500,600,700' %>
<%= stylesheet_link_tag 'https://fonts.googleapis.com/icon?family=Material+Icons' %>
<%= javascript_include_tag 'libs' %>
<%= javascript_include_tag 'application' %>
</head>
<body class="<%= get_body_css_class(controller.controller_name) %>" data-action="<%= params[:controller] %>-<%= params[:action] %>">
<body class="<%= get_body_css_class(controller_name) %>">
<%= render 'navbar' %>
<div class="container content">
<%= render 'layouts/messages' unless devise_controller? %>
Expand All @@ -38,19 +29,5 @@
<%= render 'application/footer' %>

<div class="back-overlay"></div>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
_paq.push(['setTrackerUrl', 'https://api-3d186b7b77a47155c00f114ddc52a2e7.fki.sandcats.io']);
_paq.push(['setSiteId', 1]);
_paq.push(['setApiToken', 'YIg1zq997dOFyvS5VTi4RZ0hnC0Ji3MkeYgHNvdky0c']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://00cwpvzw77kc4cysvzdy.fki.sandcats.io/embed.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
</body>
</html>