mirror of
https://github.com/neocities/neocities.git
synced 2025-08-05 17:18:02 +02:00
site change and file recording, better share support
This commit is contained in:
parent
9275b92d9f
commit
da9d1e4eb3
15 changed files with 125 additions and 65 deletions
8
app.rb
8
app.rb
|
@ -11,6 +11,14 @@ use Rack::Session::Cookie, key: 'neocities',
|
|||
use Rack::Recaptcha, public_key: $config['recaptcha_public_key'], private_key: $config['recaptcha_private_key']
|
||||
helpers Rack::Recaptcha::Helpers
|
||||
|
||||
helpers do
|
||||
def site_change_file_display_class(filename)
|
||||
return 'html' if filename.match(Site::HTML_REGEX)
|
||||
return 'image' if filename.match(Site::IMAGE_REGEX)
|
||||
'misc'
|
||||
end
|
||||
end
|
||||
|
||||
before do
|
||||
if request.path.match /^\/api\//i
|
||||
@api = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue