mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
clarify ipfs support, add missing titles for pages
This commit is contained in:
parent
556bc9d2be
commit
a2677bb930
11 changed files with 32 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
get '/dmca' do
|
get '/dmca' do
|
||||||
|
@title = 'DMCA'
|
||||||
erb :'dmca'
|
erb :'dmca'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -8,6 +9,7 @@ get '/dmca/contact_info' do
|
||||||
end
|
end
|
||||||
|
|
||||||
post '/dmca/contact' do
|
post '/dmca/contact' do
|
||||||
|
@title = 'DMCA'
|
||||||
@errors = []
|
@errors = []
|
||||||
|
|
||||||
if params[:email].empty? || params[:subject].empty? || params[:urls].empty? || params[:body].empty?
|
if params[:email].empty? || params[:subject].empty? || params[:urls].empty? || params[:body].empty?
|
||||||
|
|
11
app/index.rb
11
app/index.rb
|
@ -84,6 +84,7 @@ end
|
||||||
get '/welcome' do
|
get '/welcome' do
|
||||||
require_login
|
require_login
|
||||||
redirect '/' if current_site.supporter?
|
redirect '/' if current_site.supporter?
|
||||||
|
@title = 'Welcome!'
|
||||||
erb :'welcome', locals: {site: current_site}
|
erb :'welcome', locals: {site: current_site}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -118,18 +119,26 @@ get '/legal/?' do
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/permanent-web' do
|
get '/permanent-web' do
|
||||||
erb :'permanent_web'
|
redirect '/distributed-web'
|
||||||
|
end
|
||||||
|
|
||||||
|
get '/distributed-web' do
|
||||||
|
@title = 'The Distributed Web'
|
||||||
|
erb :'distributed_web'
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/thankyou' do
|
get '/thankyou' do
|
||||||
|
@title = 'Thank you!'
|
||||||
erb :'thankyou'
|
erb :'thankyou'
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/cli' do
|
get '/cli' do
|
||||||
|
@title = 'Command Line Interface'
|
||||||
erb :'cli'
|
erb :'cli'
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/forgot_username' do
|
get '/forgot_username' do
|
||||||
|
@title = 'Forgot Username'
|
||||||
erb :'forgot_username'
|
erb :'forgot_username'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
get '/password_reset' do
|
get '/password_reset' do
|
||||||
|
@title = 'Password Reset'
|
||||||
redirect '/' if signed_in?
|
redirect '/' if signed_in?
|
||||||
erb :'password_reset'
|
erb :'password_reset'
|
||||||
end
|
end
|
||||||
|
@ -46,6 +47,8 @@ the Neocities Cat
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/password_reset_confirm' do
|
get '/password_reset_confirm' do
|
||||||
|
@title = 'Password Reset Confirm'
|
||||||
|
|
||||||
if params[:token].nil? || params[:token].strip.empty?
|
if params[:token].nil? || params[:token].strip.empty?
|
||||||
flash[:error] = 'Token cannot be empty.'
|
flash[:error] = 'Token cannot be empty.'
|
||||||
redirect '/'
|
redirect '/'
|
||||||
|
|
|
@ -20,6 +20,7 @@ get '/settings/:username/?' do |username|
|
||||||
pass if Site.select(:id).where(username: username).first.nil?
|
pass if Site.select(:id).where(username: username).first.nil?
|
||||||
require_login
|
require_login
|
||||||
require_ownership_for_settings
|
require_ownership_for_settings
|
||||||
|
@title = "Site settings for #{username}"
|
||||||
erb :'settings/site'
|
erb :'settings/site'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ get '/signin/restore' do
|
||||||
redirect '/' unless session[:deleted_site_id]
|
redirect '/' unless session[:deleted_site_id]
|
||||||
@site = Site[session[:deleted_site_id]]
|
@site = Site[session[:deleted_site_id]]
|
||||||
redirect '/' if @site.nil?
|
redirect '/' if @site.nil?
|
||||||
|
@title = 'Restore Deleted Site'
|
||||||
erb :'signin/restore'
|
erb :'signin/restore'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,7 @@ post '/site/:username/set_editor_theme' do
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/site/:username/follows' do |username|
|
get '/site/:username/follows' do |username|
|
||||||
|
@title = "Sites #{username} follows"
|
||||||
@site = Site[username: username]
|
@site = Site[username: username]
|
||||||
not_found if @site.nil?
|
not_found if @site.nil?
|
||||||
@sites = @site.followings.collect {|f| f.site}
|
@sites = @site.followings.collect {|f| f.site}
|
||||||
|
@ -142,6 +143,7 @@ get '/site/:username/follows' do |username|
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/site/:username/followers' do |username|
|
get '/site/:username/followers' do |username|
|
||||||
|
@title = "Sites that follow #{username}"
|
||||||
@site = Site[username: username]
|
@site = Site[username: username]
|
||||||
not_found if @site.nil?
|
not_found if @site.nil?
|
||||||
@sites = @site.follows.collect {|f| f.actioning_site}
|
@sites = @site.follows.collect {|f| f.actioning_site}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
get '/site_files/new_page' do
|
get '/site_files/new_page' do
|
||||||
require_login
|
require_login
|
||||||
|
@title = 'New Page'
|
||||||
erb :'site_files/new_page'
|
erb :'site_files/new_page'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -218,13 +219,16 @@ get %r{\/site_files\/text_editor\/(.+)} do
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/site_files/allowed_types' do
|
get '/site_files/allowed_types' do
|
||||||
|
@title = 'Allowed File Types'
|
||||||
erb :'site_files/allowed_types'
|
erb :'site_files/allowed_types'
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/site_files/hotlinking' do
|
get '/site_files/hotlinking' do
|
||||||
|
@title = 'Hotlinking Information'
|
||||||
erb :'site_files/hotlinking'
|
erb :'site_files/hotlinking'
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/site_files/mount_info' do
|
get '/site_files/mount_info' do
|
||||||
|
@title = 'Site Mount Information'
|
||||||
erb :'site_files/mount_info'
|
erb :'site_files/mount_info'
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,5 +27,11 @@
|
||||||
<p>
|
<p>
|
||||||
<code>$ ipfs pin add -r THE_IPFS_CID_FOR_YOUR_SITE</code>
|
<code>$ ipfs pin add -r THE_IPFS_CID_FOR_YOUR_SITE</code>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<% if signed_in? %>
|
||||||
|
<p>
|
||||||
|
IPFS archiving is not enabled by default for all sites. If you would like to enable IPFS for your site, please visit your site's <a href="/settings/<%= current_site.username %>">settings</a> and enable it.
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
|
@ -27,7 +27,7 @@
|
||||||
<input name="site[ipfs_archiving_enabled]" type="hidden" value="false">
|
<input name="site[ipfs_archiving_enabled]" type="hidden" value="false">
|
||||||
<input name="site[ipfs_archiving_enabled]" type="checkbox" value="true"
|
<input name="site[ipfs_archiving_enabled]" type="checkbox" value="true"
|
||||||
<% if @site.ipfs_archiving_enabled == true %>checked<% end %>
|
<% if @site.ipfs_archiving_enabled == true %>checked<% end %>
|
||||||
> Enable IPFS Archiving
|
> Enable IPFS Archiving <small>(<a href="/distributed-web">what is this?</a>)</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="header-Outro with-columns browse-page">
|
<div class="header-Outro with-columns browse-page">
|
||||||
<div class="row content">
|
<div class="row content">
|
||||||
<div class="col col-100">
|
<div class="col col-100">
|
||||||
<h1>Sites following <a href="/site/<%= @site.username %>"><%= @site.title %></a></h1>
|
<h1>Sites that follow <strong><a href="/site/<%= @site.username %>"><%= @site.title %></a></strong></h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="header-Outro with-columns browse-page">
|
<div class="header-Outro with-columns browse-page">
|
||||||
<div class="row content">
|
<div class="row content">
|
||||||
<div class="col col-100">
|
<div class="col col-100">
|
||||||
<h1>Sites <a href="/site/<%= @site.username %>"><%= @site.title %></a> follows</h1>
|
<h1>Sites that <a href="/site/<%= @site.username %>"><strong><%= @site.title %></a></strong> follows</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue