You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/09/06 16:51:03 UTC
[whimsy] 02/05: timestamp css file
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
commit 18b685f74be4caba9f97abd661643af0eb49a05d
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sun Sep 4 15:14:31 2016 -0400
timestamp css file
---
www/secmail/server.rb | 2 ++
www/secmail/views/index.html.rb | 2 +-
www/secmail/views/parts.html.rb | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/www/secmail/server.rb b/www/secmail/server.rb
index 198c5a4..4dbec18 100644
--- a/www/secmail/server.rb
+++ b/www/secmail/server.rb
@@ -19,6 +19,7 @@ get '/' do
# determine latest month for which there are messages
archives = Dir["#{ARCHIVE}/*.yml"].select {|name| name =~ %r{/\d{6}\.yml$}}
@mbox = archives.empty? ? nil : File.basename(archives.sort.last, '.yml')
+ @cssmtime = File.mtime('public/secmail.css').to_i
_html :index
end
@@ -91,6 +92,7 @@ get %r{^/(\d{6})/(\w+)/_index_$} do |month, hash|
@attachments = message.attachments
@headers = message.headers.dup
@headers.delete :attachments
+ @cssmtime = File.mtime('public/secmail.css').to_i
_html :parts
end
diff --git a/www/secmail/views/index.html.rb b/www/secmail/views/index.html.rb
index 51ecb2f..f2cfc9d 100644
--- a/www/secmail/views/index.html.rb
+++ b/www/secmail/views/index.html.rb
@@ -1,5 +1,5 @@
_html do
- _link rel: 'stylesheet', type: 'text/css', href: 'secmail.css'
+ _link rel: 'stylesheet', type: 'text/css', href: "secmail.css?#{@cssmtime}"
_div.index!
diff --git a/www/secmail/views/parts.html.rb b/www/secmail/views/parts.html.rb
index 47379bf..60c7551 100644
--- a/www/secmail/views/parts.html.rb
+++ b/www/secmail/views/parts.html.rb
@@ -3,7 +3,8 @@
#
_html do
- _link rel: 'stylesheet', type: 'text/css', href: '../../secmail.css'
+ _link rel: 'stylesheet', type: 'text/css',
+ href: "../../secmail.css?#{@cssmtime}"
_ul_ do
_li! {_a 'text', href: '_body_', target: 'content'}
--
To stop receiving notification emails like this one, please contact
"commits@whimsical.apache.org" <co...@whimsical.apache.org>.