diff --git a/app.rb b/app.rb index 591bd3ab..8c89430d 100644 --- a/app.rb +++ b/app.rb @@ -28,12 +28,12 @@ end get '/blog' do # expires 500, :public, :must_revalidate - return File.read File.join(DIR_ROOT, 'public', 'sites', 'blog', 'blog.html') + return File.read File.join(DIR_ROOT, 'public', 'sites', 'blog', 'index.html') end -get '/blog/:id-:name' do +get '/blog/:article' do |article| # expires 500, :public, :must_revalidate - return File.read File.join(DIR_ROOT, 'public', 'sites', 'blog', "blog-#{params[:id]}.html") + return File.read File.join(DIR_ROOT, 'public', 'sites', 'blog', "#{article}.html") end get '/new' do diff --git a/config.yml.template b/config.yml.template index 6d32a12d..c502c93f 100644 --- a/config.yml.template +++ b/config.yml.template @@ -1,6 +1,7 @@ development: database: 'postgres://localhost/neocities' + database_pool: 1 session_secret: SETSOMETHINGHERE recaptcha_public_key: ddsfsdfsdf recaptcha_private_key: fsdgfdsdfd - phantomjs_url: http://localhost:40000 \ No newline at end of file + phantomjs_url: http://localhost:40000 diff --git a/environment.rb b/environment.rb index c2792400..667e21e5 100644 --- a/environment.rb +++ b/environment.rb @@ -14,7 +14,7 @@ Bundler.require :development if ENV['RACK_ENV'] == 'development' $config = YAML.load_file(File.join(DIR_ROOT, 'config.yml'))[ENV['RACK_ENV']] -DB = Sequel.connect $config['database'], sslmode: 'disable' +DB = Sequel.connect $config['database'], sslmode: 'disable', max_connections: $config['database_pool'] Dir.glob('workers/*.rb').each {|w| require File.join(DIR_ROOT, "/#{w}") } diff --git a/files/wireframes/homepage01bg.png b/files/wireframes/homepage01bg.png new file mode 100644 index 00000000..60821bcd Binary files /dev/null and b/files/wireframes/homepage01bg.png differ diff --git a/files/wireframes/homepage01x.png b/files/wireframes/homepage01x.png new file mode 100644 index 00000000..833b7112 Binary files /dev/null and b/files/wireframes/homepage01x.png differ diff --git a/files/wireframes/index.html b/files/wireframes/index.html new file mode 100644 index 00000000..b322be24 --- /dev/null +++ b/files/wireframes/index.html @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/rainbows_config.rb b/rainbows_config.rb index 9a6cd2ca..c8e8e411 100644 --- a/rainbows_config.rb +++ b/rainbows_config.rb @@ -3,7 +3,7 @@ Rainbows! do use :ThreadPool - client_max_body_size 1*1024*1024 # 1 Megabyte + client_max_body_size 12*1024*1024 # 12 Megabytes worker_processes 6 worker_connections 32 diff --git a/views/browse.slim b/views/browse.slim index e26ce514..8bc2981d 100644 --- a/views/browse.slim +++ b/views/browse.slim @@ -14,7 +14,14 @@ .row .span1 - h5: b style="margin-left: 20px": a href="http://#{site.username}.neocities.org" target="_blank" #{site.username} + h5 + b style="margin-left: 20px" + - if site.username.length > 14 + a href="http://#{site.username}.neocities.org" target="_blank" rel="tooltip" title="#{site.username}" = site.username[0..14]+'..' + - else + a href="http://#{site.username}.neocities.org" target="_blank" = site.username + + .span3.text-right p style="margin-right: 20px; margin-top: 10px; font-size: 10pt" #{site.hits} visits, updated #{site.updated_at.ago} a href="http://#{site.username}.neocities.org" target="_blank": img src="/site_screenshots/#{ENV['RACK_ENV'] == 'development' ? 'victoria' : site.username}.jpg" @@ -30,3 +37,9 @@ - if @current_page != @page_count li: a href="/browse?current_page=#{@current_page + 1}": i.icon-arrow-right style="font-size: 12pt" + +javascript: + + $(document).ready(function () { + $("[rel='tooltip']").tooltip(); + });