mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Merge branch 'master' of https://github.com/kyledrake/neocities-web
This commit is contained in:
commit
203ac21f47
8 changed files with 30 additions and 7 deletions
6
app.rb
6
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
|
||||
|
|
|
@ -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
|
||||
phantomjs_url: http://localhost:40000
|
||||
|
|
|
@ -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}") }
|
||||
|
||||
|
|
BIN
files/wireframes/homepage01bg.png
Normal file
BIN
files/wireframes/homepage01bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
files/wireframes/homepage01x.png
Normal file
BIN
files/wireframes/homepage01x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 476 KiB |
9
files/wireframes/index.html
Normal file
9
files/wireframes/index.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body style="background:#E9E0D5 url(homepage01bg.png) repeat-x;text-align:center; margin:0;padding:0">
|
||||
<img src="homepage01x.png">
|
||||
</body>
|
||||
</html>
|
|
@ -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
|
||||
|
|
|
@ -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" <strong>#{site.hits} visits</strong>, 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();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue