whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: force reload of stylesheet on change
Date Fri, 22 Apr 2016 07:31:41 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  5c77bec   force reload of stylesheet on change
5c77bec is described below

commit 5c77bec4c946bebeab0faf501ac6887aab9fb2f4
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Fri Apr 22 03:31:23 2016 -0400

    force reload of stylesheet on change
---
 www/board/agenda/routes.rb          | 2 ++
 www/board/agenda/views/main.html.rb | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 0cce25e..aa83043 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -112,6 +112,8 @@ get %r{/(\d\d\d\d-\d\d-\d\d)/(.*)} do |date, path|
     agenda.sub('agenda', 'minutes').sub('.txt', '.yml')
   @page[:minutes] = YAML.load(File.read(minutes)) if File.exist? minutes
 
+  @cssmtime = File.mtime('public/stylesheets/app.css').to_i
+
   _html :'main'
 end
 
diff --git a/www/board/agenda/views/main.html.rb b/www/board/agenda/views/main.html.rb
index a70d0b8..3547674 100644
--- a/www/board/agenda/views/main.html.rb
+++ b/www/board/agenda/views/main.html.rb
@@ -5,7 +5,7 @@
 _html do
   _base href: @base
   _title 'ASF Board Agenda'
-  _link rel: 'stylesheet', href: '../stylesheets/app.css'
+  _link rel: 'stylesheet', href: "../stylesheets/app.css?#{@cssmtime}"
 
   _div_.main!
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message