mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
DRY up flash display code, fix colors for success/error
This commit is contained in:
parent
019ceff01c
commit
ae1f3a81e3
11 changed files with 15 additions and 87 deletions
|
@ -110,3 +110,7 @@ end
|
||||||
def sanitize_comment(text)
|
def sanitize_comment(text)
|
||||||
Rinku.auto_link Sanitize.fragment(text), :all, 'target="_blank" rel="nofollow"'
|
Rinku.auto_link Sanitize.fragment(text), :all, 'target="_blank" rel="nofollow"'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def flash_display(opts={})
|
||||||
|
erb :'_flash', layout: false, locals: {opts: opts}
|
||||||
|
end
|
||||||
|
|
|
@ -14,13 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if flash.keys.length > 0 %>
|
<%== flash_display %>
|
||||||
<div class="alert alert-error alert-block">
|
|
||||||
<% flash.keys.each do |key| %>
|
|
||||||
<%== flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-50">
|
<div class="col col-50">
|
||||||
|
|
|
@ -7,13 +7,7 @@
|
||||||
|
|
||||||
<div class="content misc-page single-Col txt-Center" style="padding-top: 20px;">
|
<div class="content misc-page single-Col txt-Center" style="padding-top: 20px;">
|
||||||
|
|
||||||
<% if flash.keys.length > 0 %>
|
<%== flash_display %>
|
||||||
<div class="alert alert-error alert-block">
|
|
||||||
<% flash.keys.each do |key| %>
|
|
||||||
<%== flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-100">
|
<div class="col col-100">
|
||||||
|
|
|
@ -58,21 +58,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @error %>
|
<%== flash_display %>
|
||||||
<div class="alert alert-block alert-error">
|
|
||||||
<p><%== @error %></p>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if flash.keys.length > 0 %>
|
|
||||||
<div class="alert alert-block">
|
|
||||||
<p>
|
|
||||||
<% flash.keys.each do |key| %>
|
|
||||||
<%== flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div id="filesDisplay" class="files">
|
<div id="filesDisplay" class="files">
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -32,13 +32,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<% if flash.keys.length > 0 %>
|
<%== flash_display centered: true %>
|
||||||
<div class="alert alert-block txt-Center">
|
|
||||||
<% flash.keys.each do |key| %>
|
|
||||||
<%== flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="int-Logo hp-Logo">
|
<div class="int-Logo hp-Logo">
|
||||||
<a href="/" title="back to home">
|
<a href="/" title="back to home">
|
||||||
|
|
|
@ -6,15 +6,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content txt-Center single-Col misc-page">
|
<div class="content txt-Center single-Col misc-page">
|
||||||
<% if flash.keys.length > 0 %>
|
<%== flash_display %>
|
||||||
<div class="alert alert-block">
|
|
||||||
<p>
|
|
||||||
<% flash.keys.select {|s| s == :error}.each do |key| %>
|
|
||||||
<%= flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<p>If you forgot your sitename (AKA username), you can have it emailed to you here.</p>
|
<p>If you forgot your sitename (AKA username), you can have it emailed to you here.</p>
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<% if flash.keys.length > 0 %>
|
<%== flash_display centered: true %>
|
||||||
<div class="alert alert-block txt-Center">
|
|
||||||
<% flash.keys.each do |key| %>
|
|
||||||
<%== flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="int-Logo hp-Logo">
|
<div class="int-Logo hp-Logo">
|
||||||
<a href="/" title="back to home">
|
<a href="/" title="back to home">
|
||||||
|
|
|
@ -6,17 +6,7 @@
|
||||||
|
|
||||||
<div class="content single-Col misc-page">
|
<div class="content single-Col misc-page">
|
||||||
|
|
||||||
<% if flash.keys.length > 0 %>
|
<%== flash_display centered: true %>
|
||||||
<div class="alert alert-block txt-Center">
|
|
||||||
<% flash.keys.each do |key| %>
|
|
||||||
<%== flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Note: If you provided your e-mail, you can reset your password. If you didn't, you will not be able to reset your password, and instead should create a new account. We cannot change a password without an entered email for security reasons.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<form method="post" action="/send_password_reset" class="content">
|
<form method="post" action="/send_password_reset" class="content">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
<h2>Custom Domain</h2>
|
<h2>Custom Domain</h2>
|
||||||
<h3 class="subtitle">Add your own domain name to your Neocities site</h3>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Adding a custom domain allows you to have a domain name attached to your web site. So if you had a domain like <strong>catsknitting.com</strong>, you could have it point to your Neocities site.
|
Adding a custom domain allows you to have a domain name attached to your web site. So if you had a domain like <strong>catsknitting.com</strong>, you could have it point to your Neocities site. If you don't have the domain yet, you will have to purchase a domain name from a registrar like <a href="http://www.namecheap.com/?aff=87835" target="_blank">Namecheap</a> first.
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You will have to purchase a domain name from a registrar like <a href="http://www.namecheap.com/?aff=87835" target="_blank">Namecheap</a> first. We are working on providing domain purchasing from Neocities in the future, but in general it is best if you own the domain, because then you control your site.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% if current_site.custom_domain_available? %>
|
<% if current_site.custom_domain_available? %>
|
||||||
|
@ -14,7 +9,6 @@
|
||||||
We will be using <strong>catsknitting.com</strong> for the examples below.
|
We will be using <strong>catsknitting.com</strong> for the examples below.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h3>Step 1</h3>
|
<h3>Step 1</h3>
|
||||||
<p>
|
<p>
|
||||||
First, you need to add an "A record" to point your root domain (sometimes shown with an @ symbol) (catsknitting.com) to the following IP address:
|
First, you need to add an "A record" to point your root domain (sometimes shown with an @ symbol) (catsknitting.com) to the following IP address:
|
||||||
|
|
|
@ -6,15 +6,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content txt-Center single-Col misc-page">
|
<div class="content txt-Center single-Col misc-page">
|
||||||
<% if flash.keys.length > 0 %>
|
<%== flash_display %>
|
||||||
<div class="alert alert-block">
|
|
||||||
<p>
|
|
||||||
<% flash.keys.select {|s| s == :error}.each do |key| %>
|
|
||||||
<%= flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<form method="POST" action="/signin" class="content">
|
<form method="POST" action="/signin" class="content">
|
||||||
<input name="csrf_token" type="hidden" value="<%= csrf_token %>">
|
<input name="csrf_token" type="hidden" value="<%= csrf_token %>">
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
<section class="section plans welcome">
|
<section class="section plans welcome">
|
||||||
<% if flash.keys.length > 0 %>
|
<%== flash_display centered: true %>
|
||||||
<div class="alert alert-block txt-Center">
|
|
||||||
<% flash.keys.each do |key| %>
|
|
||||||
<%== flash[key] %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if request.path == '/welcome' %>
|
<% if request.path == '/welcome' %>
|
||||||
<h2>Welcome to Neocities, <%= current_site.username %>!</h2>
|
<h2>Welcome to Neocities, <%= current_site.username %>!</h2>
|
||||||
|
|
Loading…
Add table
Reference in a new issue