mirror of
https://github.com/neocities/neocities.git
synced 2025-08-04 16:51:36 +02:00
newindex mockup
This commit is contained in:
parent
7ed2839cf2
commit
1961522dd2
2 changed files with 341 additions and 0 deletions
10
app.rb
10
app.rb
|
@ -42,6 +42,16 @@ error do
|
|||
erb :'error'
|
||||
end
|
||||
|
||||
get '/newindex_mockup' do
|
||||
if SimpleCache.expired?(:sites_count)
|
||||
@sites_count = SimpleCache.store :sites_count, Site.count.roundup(100), 600 # 10 Minutes
|
||||
else
|
||||
@sites_count = SimpleCache.get :sites_count
|
||||
end
|
||||
|
||||
erb :newindex_mockup, layout: false
|
||||
end
|
||||
|
||||
get '/home_mockup' do
|
||||
erb :'home_mockup'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue