From f2805be6479376db6ee97a5c1244d2b3842d4eef Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Sun, 23 Apr 2017 15:27:43 +0200 Subject: [PATCH] scripts at end of body --- Gemfile | 4 ++-- Gemfile.lock | 2 +- Rules | 5 +++++ content/index.erb | 21 ++++----------------- layouts/default.erb | 11 ++++++----- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/Gemfile b/Gemfile index 82c4ae3..feb18d3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ # frozen_string_literal: true source 'https://rubygems.org' -gem 'nanoc', '4.7.7' +gem 'nanoc' # General filtering gem 'coffee-script' @@ -22,8 +22,8 @@ gem 'words_counted' group :development do gem 'adsf' gem 'highline' - gem 'terminal-notifier-guard' gem 'terminal-notifier' + gem 'terminal-notifier-guard' end group :production do diff --git a/Gemfile.lock b/Gemfile.lock index 6b96971..a603def 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -111,7 +111,7 @@ DEPENDENCIES html_press icalendar kramdown - nanoc (= 4.7.7) + nanoc sass terminal-notifier terminal-notifier-guard diff --git a/Rules b/Rules index 184c47f..ba81269 100644 --- a/Rules +++ b/Rules @@ -110,9 +110,14 @@ end # compile '/assets/scripts/**/*.coffee' do filter :coffeescript + filter :uglify_js write ext: 'js' end +compile '/assets/scripts/**/*.js' do + filter :uglify_js +end + ignore '/assets/stylesheets/includes/**/*' compile '/assets/stylesheets/**/*.scss' do diff --git a/content/index.erb b/content/index.erb index a50da53..dd8a1c3 100644 --- a/content/index.erb +++ b/content/index.erb @@ -4,6 +4,10 @@ <% end %> +<% content_for :scripts do %> +<%= asset :js, :gamification %> +<% end %> +
<%= if studytime? then render '/tiles/blokmap.*'end %> @@ -57,20 +61,3 @@
-<%= asset :js, :gamification %> - - diff --git a/layouts/default.erb b/layouts/default.erb index b351c5f..76e17b6 100644 --- a/layouts/default.erb +++ b/layouts/default.erb @@ -11,8 +11,6 @@ - - @@ -21,9 +19,6 @@ - - <%= asset :js, :tipuesearch %> - <%= asset :js, :search %> + + <%= asset :js, :tipuesearch %> + <%= asset :js, :search %> + <%= content_for(@item, :scripts) %>