From 02a915bc8306e0eb23a9d19f60ecf1851eaff369 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Sat, 27 Jul 2013 09:07:25 -0400 Subject: [PATCH] HTML / layout clean ups update to HTML of new_page.slim. remove bootstrap code in favor of bass-tacks small updates to error page html update not found page to reflect style of rest of the website dashboard clean up. remove needless twitter divs update visual of top right screenshot/web address area small clean ups to text editor. --- views/dashboard.slim | 118 ++++++++++++++---------------- views/error.slim | 5 +- views/not_found.slim | 13 ++-- views/site_files/new_page.slim | 42 +++++------ views/site_files/text_editor.slim | 16 ++-- 5 files changed, 95 insertions(+), 99 deletions(-) diff --git a/views/dashboard.slim b/views/dashboard.slim index 606b86d3..ee13f9d7 100644 --- a/views/dashboard.slim +++ b/views/dashboard.slim @@ -16,73 +16,65 @@ javascript: h1 Your Website - current_site.file_list.each do |file| - .row - .span4 - - if file.ext == 'html' || file.ext == 'htm' || file.ext == 'txt' || file.ext == 'js' || file.ext == 'css' || file.ext == 'md' - span -    #{file.filename} - - if file.filename == 'index.html' - p.tiny - This is your index file! It is the "default file" that loads when you go to #{current_site.username}.neocities.org. In effect, it's your front page. If you want to change your front page, you need to edit (or overwrite) this file. The default file is always named index.html. - - div style="margin-bottom:30px" - span - i class="icon-globe"    - - a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View
- span - i class="icon-edit"    - a href="/site_files/text_editor/#{file.filename}" Edit with text editor
- span - i class="icon-edit"    - span Edit with visual editor (coming soon)
- span - i class="icon-edit"    - span: a href="/site_files/download/#{file.filename}" Download
- span - i class="icon-trash"    - a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete - - else -    #{file.filename} - div style="margin-top: 3px; margin-bottom:10px" - | To use in an HTML file, paste this text: <img src="/#{file.filename}"> - a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View
- a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete + - if file.ext == 'html' || file.ext == 'htm' || file.ext == 'txt' || file.ext == 'js' || file.ext == 'css' || file.ext == 'md' + span +    #{file.filename} + - if file.filename == 'index.html' + p.tiny + This is your index file! It is the "default file" that loads when you go to #{current_site.username}.neocities.org. In effect, it's your front page. If you want to change your front page, you need to edit (or overwrite) this file. The default file is always named index.html. + + div style="margin-bottom:30px" + span + i class="icon-globe"    + a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View
+ span + i class="icon-edit"    + a href="/site_files/text_editor/#{file.filename}" Edit with text editor
+ span + i class="icon-edit"    + span Edit with visual editor (coming soon)
+ span + i class="icon-edit"    + span: a href="/site_files/download/#{file.filename}" Download
+ span + i class="icon-trash"    + a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete + - else +    #{file.filename} + div style="margin-top: 3px; margin-bottom:10px" + | To use in an HTML file, paste this text: <img src="/#{file.filename}"> + a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View
+ a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete .col.col-40 - - .row - .span5 - - a href="http://#{current_site.username}.neocities.org" target="_blank": img src="/site_screenshots/#{current_site.username}.jpg" alt="screen shot" - - h3 class="eps": a href="http://#{current_site.username}.neocities.org" target="_blank" http://#{current_site.username}.neocities.org - br - - .progress.progress-info.progress-striped - .bar style="width: #{(current_site.total_space / Site::MAX_SPACE.to_f) * 100}%" - - h4.base - You are currently using #{((current_site.total_space.to_f / Site::MAX_SPACE) * 100).round(1)}% (#{current_site.total_space_in_megabytes}MB) of your #{(Site::MAX_SPACE.to_f / 2**20).to_i}MB of free space. + + div.txt-Center style="border:1px solid #ccc; background:#rgba(255,255,255,.7); padding:1em; margin-bottom:20px" + a href="http://#{current_site.username}.neocities.org" style="display:block" target="_blank": img src="/site_screenshots/#{current_site.username}.jpg" alt="screen shot" + br + h3 class="base" style="line-height:1": a href="http://#{current_site.username}.neocities.org" target="_blank" http://#{current_site.username}.neocities.org + a href="/site_files/#{current_site.username}.zip" class="btn-Action" Download Entire Site - .row style="margin-top: 20px" - .span5 - div - a href="/site_files/upload" class="btn-Action" style="margin-bottom:20px" Upload New Files - div - a href="/site_files/new_page" class="btn-Action" Create New HTML Page -
+ .progress.progress-info.progress-striped + .bar style="width: #{(current_site.total_space / Site::MAX_SPACE.to_f) * 100}%" + + h4.base.txt-Center + You are currently using #{((current_site.total_space.to_f / Site::MAX_SPACE) * 100).round(1)}% (#{current_site.total_space_in_megabytes}MB) of your #{(Site::MAX_SPACE.to_f / 2**20).to_i}MB of free space. + + + div.txt-Center + a href="/site_files/upload" class="btn-Action" style="margin-bottom:20px" Upload New Files + + a href="/site_files/new_page" class="btn-Action" Create New HTML Page + + hr + + div +    Need to learn web design? + i class="icon-globe"    + a href="/tutorials" target="_blank" Web Design, HTML, CSS, JavaScript Tutorials + + - div - a href="/site_files/#{current_site.username}.zip" class="btn-Action" Download Entire Site - - .row style="margin-top: 20px" - .span5 -    Need to learn web design? - div - div - i class="icon-globe"    - a href="/tutorials" target="_blank" Web Design, HTML, CSS, JavaScript Tutorials form method="POST" action="/site_files/delete" id="deleteFilenameForm" input name="csrf_token" type="hidden" value="#{csrf_token}" diff --git a/views/error.slim b/views/error.slim index a188174d..23e2869b 100644 --- a/views/error.slim +++ b/views/error.slim @@ -1,7 +1,8 @@ .page - .content-Base.txt-Center + .content-Base.txt-Center.col-60 style="margin:0 auto" h2 Site Error p.eps There has been an error performing the requested action.
+ br h4 We have been notified of the problem. - p If you need to add any special information or if this error has not been resolved in a while, contact us and report the problem. Thank you! + p.tiny If you need to add any special information or if this error has not been resolved in a while, contact us and report the problem. Thank you! diff --git a/views/not_found.slim b/views/not_found.slim index 0743718e..676dfc10 100644 --- a/views/not_found.slim +++ b/views/not_found.slim @@ -1,7 +1,10 @@ -.row - .span8.offset2.text-center +.page + .content-Base.txt-Center.col-60 style="margin:0 auto" h2 Not Found - h4 We could not find the requested page. Our apologies. - h5 It you believe this to be in error, please contact us and report the problem. Thank you! + br + h4 Sorry but we could not find the requested page. + + p It you believe this to be in error, please contact us and report the problem. Thank you! - if request.referer - a href="#{request.referer}" Go Back \ No newline at end of file + + a class="btn-Action" href="#{request.referer}" Go Back \ No newline at end of file diff --git a/views/site_files/new_page.slim b/views/site_files/new_page.slim index a4e2177c..fdb0a4a3 100644 --- a/views/site_files/new_page.slim +++ b/views/site_files/new_page.slim @@ -1,23 +1,23 @@ .content-Base + .content - - if @errors - div.alert.alert-error - h3 There were errors, please correct: - - @errors.each do |error| - h5 = error - - h1.txt-Center Create new HTML page - -
- .txt-Center - form method="POST" action="/site_files/create_page" enctype="multipart/form-data" - input name="csrf_token" type="hidden" value="#{csrf_token}" - p.eps What's the name of your page? - p.eps: input type="text" name="pagefilename" autocapitalize="off" autocorrect="off".html - p: input.btn-Action type="submit" value="Create Page" - - .row - .span6.offset3 - p.eps Note: We will automatically scrub any characters not matching: a-z A-Z 0-9 _ - . - p.zeta Page must not already exist. - p.zeta If you want to make this the index page (and an index page doesn't exist), name it index.html. \ No newline at end of file + - if @errors + div.alert.alert-error + h3 There were errors, please correct: + - @errors.each do |error| + h5 = error + + h1.txt-Center.beta Create new HTML page + + .txt-Center + form method="POST" action="/site_files/create_page" enctype="multipart/form-data" + input name="csrf_token" type="hidden" value="#{csrf_token}" + p.eps What's the name of your page? + p.eps: input type="text" name="pagefilename" autocapitalize="off" autocorrect="off".html + p: input.btn-Action type="submit" value="Create Page" + + .row style="padding-top:30px" + .col.col-40 style="float:none; margin:0 auto;" + p.eps Note: We will automatically scrub any characters not matching: a-z A-Z 0-9 _ - . + p.zeta Page must not already exist. + p.zeta If you want to make this the index page (and an index page doesn't exist), name it index.html. \ No newline at end of file diff --git a/views/site_files/text_editor.slim b/views/site_files/text_editor.slim index 468352c5..6ddc5e0a 100644 --- a/views/site_files/text_editor.slim +++ b/views/site_files/text_editor.slim @@ -17,7 +17,7 @@ css: h2 Editing #{params[:filename]} - div.theme-Code + .theme-Code p style="display:inline-block; margin-right:10px" Theme: select id="theme" size="1" onchange="setTheme();" onkeyup="setTheme();" optgroup label="Bright" @@ -53,17 +53,17 @@ css: option value="ace/theme/twilight" Twilight option value="ace/theme/vibrant_ink" Vibrant Ink - .row - .span12 - div id="editor" style="width: 100%; height: 600px; position: relative;" - == encoding_fix @file_data + div id="editor" style="width: 100%; height: 600px; position: relative; margin-bottom:25px" + == encoding_fix @file_data .row - .col.col-33.txt-Center + .col.col-33.txt-Center style="margin-bottom:10px" a.btn-Action href="/dashboard"   Finish Without Saving - .col.col-33.txt-Center + + .col.col-33.txt-Center style="margin-bottom:10px" a.btn-Action href="#" onclick="saveTextFile(false); return false"   Save Changes + .col.col-33.txt-Center a.btn-Action href="#" onclick="saveTextFile(true); return false"   Save and Finish @@ -100,7 +100,7 @@ css: if(quit === true) { window.location = '/dashboard'; } - $('#editorUpdates span').html('  Your file has been saved.'); + $('#editorUpdates span').html('  Your file has been saved.'); setTimeout(function() { $('#editorUpdates').fadeOut(); //.addClass('hidden'); }, 2000);