Permalink
Browse files

option for setting the page_title

  • Loading branch information...
1 parent 415b667 commit 5de6ba4eabacc8f111d3242e349e13b3b2c6b08a @zlorfi committed Apr 4, 2013
Showing with 10 additions and 6 deletions.
  1. +1 −0 README.md
  2. +5 −0 app.rb
  3. +1 −0 public/javascripts/app.js
  4. +0 −2 views/index.haml
  5. +1 −1 views/layout.haml
  6. +1 −1 views/top_nav.haml
  7. +1 −1 views/top_nav_alt.haml
  8. +0 −1 views/upload.haml
View
@@ -21,6 +21,7 @@
- install `memcached` for production caching
- `bundle exec shotgun config.ru` for development (a bit of a warning, `rack_flash` doesn't seem to work with `shotgun`)
- `bundle exec puma config.ru` for production
+- change the setting of `title`, `username` and `password` and most important `token`
## TODO
- image handler exception
View
5 app.rb
@@ -49,6 +49,7 @@ class App < Sinatra::Base
#necessary for the DELETE route
use Rack::MethodOverride
+ set :title, 'Sinatra Gallery'
set :username,'gallery'
set :password,'gallery'
# make this a huge random number
@@ -104,6 +105,10 @@ def raw(text)
Rack::Utils.escape_html(text)
end
+ def page_title
+ settings.title
+ end
+
end
get "/stylesheets/*.css" do |path|
@@ -2,4 +2,5 @@ $(document).ready(function() {
$('.alert-box.success').delay(5000).fadeOut(500);
$('.alert-box.notice').delay(5000).fadeOut(500);
$('.alert-box.alert').delay(9000).fadeOut(500);
+ $('#progress_bar').hide();
});
View
@@ -30,8 +30,6 @@
:javascript
$(document).ready(function() {
- //$('#gallery img').addClass('animated flipInY');
-
//$("select#customDropdown").change(function(){
// /* get new nº of items per page */
// if ($.isNumeric(parseInt( $(this).val() ))) {
View
@@ -10,7 +10,7 @@
%meta{:charset => "utf-8"}/
/ Set the viewport width to device width for mobile
%meta{:content => "width=device-width", :name => "viewport"}/
- %title Sinatra Gallery
+ %title= page_title
/ Included CSS Files
%link{:href => asset_stylesheet('app'), :rel => "stylesheet"}
View
@@ -2,7 +2,7 @@
%h3.subheader
%i.icon-camera-retro.icon-large
%a.title{:href => "/"}
- Sinatra Gallery
+ = page_title
.large-6.columns
%ul.inline-list.right
View
@@ -5,7 +5,7 @@
%h1.subheader
%a{:href => "/"}
%i.icon-camera-retro.icon-large
- Sinatra Gallery
+ = page_title
/ Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone
%li.toggle-topbar.menu-icon
%a{:href => "/"}
View
@@ -22,7 +22,6 @@
%script{:src => asset_javascript('jquery.fileupload'), :type => "text/javascript"}
:javascript
$(document).ready(function() {
- $('#progress_bar').hide();
$('#file_upload').fileupload({
autoUpload: true,

0 comments on commit 5de6ba4

Please sign in to comment.