diff --git a/Gemfile b/Gemfile index 74a4b86c..1dba517c 100644 --- a/Gemfile +++ b/Gemfile @@ -40,12 +40,12 @@ platform :jruby do group :development do gem 'ruby-debug', require: nil - gem 'sass', require: nil end end group :development do gem 'shotgun', require: nil + gem 'sass', require: nil end group :test do diff --git a/app.rb b/app.rb index 49f25df3..81932422 100644 --- a/app.rb +++ b/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 diff --git a/migrations/031_fix_event_site_update_id.rb b/migrations/031_fix_event_site_update_id.rb new file mode 100644 index 00000000..abc12cb5 --- /dev/null +++ b/migrations/031_fix_event_site_update_id.rb @@ -0,0 +1,9 @@ +Sequel.migration do + up { + DB.rename_column :events, :site_update_id, :site_change_id + } + + down { + DB.rename_column :events, :site_change_id, :site_update_id + } +end diff --git a/migrations/032_add_site_change_files.rb b/migrations/032_add_site_change_files.rb new file mode 100644 index 00000000..6148c22c --- /dev/null +++ b/migrations/032_add_site_change_files.rb @@ -0,0 +1,14 @@ +Sequel.migration do + up { + DB.create_table! :site_change_files do + primary_key :id + Integer :site_change_id + String :filename + DateTime :created_at + end + } + + down { + DB.drop_table :site_change_files + } +end diff --git a/models/event.rb b/models/event.rb index 214a7d89..8839fcd5 100644 --- a/models/event.rb +++ b/models/event.rb @@ -5,7 +5,7 @@ class Event < Sequel::Model many_to_one :follow one_to_one :tip one_to_one :tag - one_to_one :site_change + many_to_one :site_change many_to_one :profile_comment one_to_many :likes one_to_many :comments diff --git a/models/site.rb b/models/site.rb index 5b43ea78..942b30e4 100644 --- a/models/site.rb +++ b/models/site.rb @@ -56,7 +56,7 @@ class Site < Sequel::Model MAX_COMMENT_SIZE = 420 # Used to be the limit for Facebook.. no comment (PUN NOT INTENDED). SCREENSHOT_RESOLUTIONS = ['235x141', '105x63', '270x162', '37x37', '146x88', '302x182', '90x63', '82x62', '348x205'] - THUMBNAIL_RESOLUTIONS = ['105x63'] + THUMBNAIL_RESOLUTIONS = ['105x63', '90x63'] many_to_one :server @@ -224,6 +224,8 @@ class Site < Sequel::Model ThumbnailWorker.perform_async values[:username], filename end + SiteChange.record self, filename + self.site_changed = true self.changed_count += 1 save(validate: false) diff --git a/models/site_change.rb b/models/site_change.rb index 20b83a9a..3e11c824 100644 --- a/models/site_change.rb +++ b/models/site_change.rb @@ -1,4 +1,26 @@ class SiteChange < Sequel::Model + NEW_CHANGE_TIMEOUT = 3600 * 4 # 4 hours many_to_one :site one_to_one :event -end \ No newline at end of file + one_to_one :site_change + one_to_many :site_change_files + + def site_change_filenames(limit=4) + site_change_files[0..limit-1].collect {|f| f.filename} + end + + def self.record(site, filename) + site_change = filter(site_id: site.id).order(:created_at.desc).first + + if site_change.nil? || site_change.created_at+NEW_CHANGE_TIMEOUT < Time.now + site_change = create site: site + Event.create site_id: site.id, site_change_id: site_change.id + end + + site_change_file = site_change.site_change_files_dataset.filter(filename: filename).first + + if !site_change_file + site_change.add_site_change_file filename: filename + end + end +end diff --git a/models/site_change_file.rb b/models/site_change_file.rb new file mode 100644 index 00000000..bceaf09f --- /dev/null +++ b/models/site_change_file.rb @@ -0,0 +1,3 @@ +class SiteChangeFile < Sequel::Model + many_to_one :site_change +end diff --git a/public/assets/css/_project-sass/_project-Main.scss b/public/assets/css/_project-sass/_project-Main.scss index fb20cedb..4be5e189 100644 --- a/public/assets/css/_project-sass/_project-Main.scss +++ b/public/assets/css/_project-sass/_project-Main.scss @@ -522,8 +522,8 @@ a.tag:hover { color: #000; } .news-item .comment { - color: #999; - font-style: italic; + color: #000; + font-style: normal; font-size: .8em; } .news-item.for-me .comment { diff --git a/public/assets/css/neo.css b/public/assets/css/neo.css index 5f4e703d..91f49405 100644 --- a/public/assets/css/neo.css +++ b/public/assets/css/neo.css @@ -1763,8 +1763,8 @@ a.tag:hover { color: #000; } .news-item .comment { - color: #999; - font-style: italic; + color: #000; + font-style: normal; font-size: .8em; } .news-item.for-me .comment { diff --git a/public/assets/css/neo.min.css b/public/assets/css/neo.min.css index bb6fa9df..d67cf58f 100644 --- a/public/assets/css/neo.min.css +++ b/public/assets/css/neo.min.css @@ -12,7 +12,7 @@ .constant-Nav{margin-left:-88px;-moz-transition:all 0.35s;-ms-transition:all 0.35s;-o-transition:all 0.35s;-webkit-transition:all 0.35s;transition:all 0.35s}@media (max-device-width: 480px), screen and (max-width: 800px){.constant-Nav{margin-left:0}}.constant-Nav.in-View{margin-left:0;padding-left:70px}@media (max-device-width: 480px), screen and (max-width: 800px){.constant-Nav.in-View{padding-left:0}} .add-Stripe{border-bottom:6px solid #E93250}@media (max-device-width: 480px), screen and (max-width: 800px){.add-Stripe{border:0}} .interior .page{padding-top:22px;float:left;width:100%}.interior .signup-Form{top:0}.interior .header-Base{left:0;overflow:visible;position:fixed;top:0;width:100%;z-index:9}.int-Logo{left:0;position:absolute;top:0;width:70px;z-index:9}.interior .header-Nav{padding-left:70px}@media (max-device-width: 480px), screen and (max-width: 800px){.interior .header-Nav{width:100%}} -.interior .constant-Nav{margin:0}.content-Base{background:#f6f0e6;min-height:500px;padding-bottom:50px;padding-top:10px}.content-Base h1,.content-Base h2,.content-Base h3,.content-Base h4,.content-Base h5,.content-Base h6{color:#e93250}.content,.footer-Content,.footer-Content{padding:20px 3%}.single-Col{max-width:800px}.twitter-tweet.twitter-tweet-rendered{margin:0 auto 30px !important}.interior .header-Outro{padding-top:30px;overflow:hidden}.interior .header-Outro h1{font-size:2.5em;margin-top:15px}.site-url{font-size:18px;margin-bottom:8px}.site-url a{color:#e93250;font-weight:bold}.interior .header-Outro .subtitle{font-size:1em;margin-top:-15px}.content.wide,.wide.footer-Content{padding-left:6%;padding-right:6%}.content.misc-page,.misc-page.footer-Content{background:#FAF6F1;-moz-box-shadow:0px 1px 1px 1px rgba(0,0,0,0.1);-webkit-box-shadow:0px 1px 1px 1px rgba(0,0,0,0.1);box-shadow:0px 1px 1px 1px rgba(0,0,0,0.1);padding:1px 3% 40px 3%}.content.misc-page h3,.misc-page.footer-Content h3,.content.misc-page h4,.misc-page.footer-Content h4,.content.misc-page h5,.misc-page.footer-Content h5,.content.misc-page h6,.misc-page.footer-Content h6{margin-top:1em}.content.misc-page h2,.misc-page.footer-Content h2{font-size:1.6em;margin-top:1em}.content.misc-page h3,.misc-page.footer-Content h3,.content.misc-page h4,.misc-page.footer-Content h4,.content.misc-page h5,.misc-page.footer-Content h5{font-size:1.2em}.content.misc-page h6,.misc-page.footer-Content h6{font-size:1em}.content.misc-page h1,.misc-page.footer-Content h1{font-size:2.2em;margin-bottom:20px}.content.misc-page hr,.misc-page.footer-Content hr{margin:35px 0 25px 0}.interior .header-Outro .col.col-50.signup-Area{padding-left:0}.interior .header-Outro a{color:#E93250}.interior .header-Outro .btn-Action{color:#fff}.interior .signup-Area{min-height:164px}.interior .signup-Area img{-moz-box-shadow:1px 2px 5px 2px rgba(0,0,0,0.1);-webkit-box-shadow:1px 2px 5px 2px rgba(0,0,0,0.1);box-shadow:1px 2px 5px 2px rgba(0,0,0,0.1);border:4px solid white}.interior .signup-Area.large img{border:6px solid white}.interior .header-Outro .screenshot{width:235px;height:141px}.interior .header-Outro ul{margin:0;padding:0}.interior .header-Outro ul li{list-style:none;font-size:80%;margin-bottom:2px}.interior .signup-Form fieldset{padding:20px}.interior .header-Outro h2{margin-top:12px;font-size:1.8em}.welcome{background:#daeea5 url(../img/heartcat.png) no-repeat 20px center;background-size:77px 81px;padding:20px 20px 20px 108px;margin-bottom:30px}.welcome h4{font-size:1.2em;margin-bottom:4px}.welcome .close-button{float:right;background:url(../img/welcome-close.png) no-repeat;width:19px;height:19px}.files{float:left;background:#E4D8CB;width:100%;position:relative}.files .header{background:#5E95A1;color:#fff;float:left;width:100%;padding:10px 20px}.files .breadcrumbs{float:left;font-weight:bold;margin-top:4px}.files .actions{float:right}.files .btn-Action{margin-left:8px}.btn-Action span{background-repeat:no-repeat}.btn-Action.new-Page span{background-image:url(../img/new-page.png);background-position-y:1px;padding-left:29px}.btn-Action.new-Folder span{background-image:url(../img/new-folder.png);padding-left:26px}.btn-Action.upload span{background-image:url(../img/upload.png);padding-left:24px}.files .list{padding:20px}.files .list .upload-Boundary{float:left;border:3px dashed #F6F0E6;width:100%;margin:18px 0;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;min-height:300px}.files .list .upload-Boundary.with-instruction{background:url(../img/drag-drop.png) no-repeat center center}.files .uploading-overlay{width:100%;height:100%;position:absolute;background-color:rgba(0,0,0,0.35);z-index:100}.files .uploading{background:#fff;font-style:italic;margin-left:auto;margin-right:auto;width:400px;margin-top:14%;padding:25px 40px 28px 40px;-webkit-box-shadow:1px 1px 21px 5px rgba(50,50,50,0.5);-moz-box-shadow:1px 1px 21px 5px rgba(50,50,50,0.5);box-shadow:1px 1px 21px 5px rgba(50,50,50,0.5);border-radius:10px}.files .uploading p{margin-bottom:2px}.files .progress-bar{background:#CCCCCC;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;width:100%;position:relative;margin-top:14px;height:10px;overflow:hidden}.files .progress-bar .progress{background:#E93250;height:100%;-webkit-border-top-right-radius:0px;-webkit-border-bottom-right-radius:0px;-moz-border-radius-topright:0px;-moz-border-radius-bottomright:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;-webkit-border-top-left-radius:20px;-webkit-border-bottom-left-radius:20px;-moz-border-radius-topleft:20px;-moz-border-radius-bottomleft:20px;border-top-left-radius:20px;border-bottom-left-radius:20px;position:relative;overflow:hidden;display:block}.file{float:left;padding:5px 0px;margin-right:10px;margin-bottom:10px;width:125px;text-align:center;display:block;position:relative}.file .title{font-weight:bold;font-size:12px;color:#666;margin-top:4px;text-decoration:none;white-space:nowrap;overflow:hidden;display:block}.html-thumbnail{font-size:11px;margin-top:5px;margin-left:10px;display:block;position:relative;width:105px;height:63px}.html-thumbnail.html img{width:105px;height:63px;-webkit-box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3)}.html-thumbnail.image img{max-width:105px;max-height:63px;width:auto;height:auto}.html-thumbnail.misc{width:63px;height:63px;margin-left:auto;margin-right:auto}.misc-icon{background:url(../img/misc-file.png) no-repeat 0px 0px;width:67px;height:67px;display:block;padding-top:35px;font-size:14px;color:#bbb;font-weight:bold;margin-left:auto;margin-right:auto}.overlay a{color:white;text-decoration:none;font-size:14px;display:block}.overlay i{font-weight:bold}.overlay{position:absolute;top:0;width:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:none}.link-overlay{display:block;position:absolute;bottom:0px;left:0px;width:123px;height:30px}.file>.overlay{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;padding-top:15px;background-color:rgba(0,0,0,0.15)}.filehover:hover .overlay,.fileimagehover:hover .overlay{display:block}.html-thumbnail.misc.fileimagehover .overlay{margin:1px 0 0 2px}.site-actions{float:left;margin-top:20px;font-size:90%}.site-actions a{color:#666}@media (min-width: 1200px){.container{width:1200px}}@media (min-width: 700px) and (max-width: 1200px){.container{width:100%}}.content.misc-page.columns,.misc-page.columns.footer-Content{float:left;padding:0;position:relative;clear:both;width:100%;overflow:hidden}.col-left{float:left;width:100%;position:relative;border-right:1px solid #ddd}.right-col{background:#FAF6F1}.content.misc-page .col-33 h3,.misc-page.footer-Content .col-33 h3{font-size:1.5em}.content.misc-page .col-33 h3:nth-of-type(1),.misc-page.footer-Content .col-33 h3:nth-of-type(1){margin-top:0}.right-col .col-left{background-color:white;right:33%}.content.misc-page.columns .col,.misc-page.columns.footer-Content .col{padding:25px 30px 30px 30px;position:relative;overflow:hidden}.content.misc-page.columns .col-66,.misc-page.columns.footer-Content .col-66{width:67%;left:33%}.content.misc-page.columns .col-33,.misc-page.columns.footer-Content .col-33{width:33%;left:33%}.interior .header-Outro.with-columns{padding-top:22px}.interior .header-Outro.with-columns h3{float:left;margin-bottom:0;font-size:1.7em}.interior .header-Outro.with-columns .content,.interior .header-Outro.with-columns .footer-Content{padding:0}.interior .header-Outro.with-columns .col{padding:25px 0 8px 30px}.interior .header-Outro.with-columns .col-32{width:33%}.interior .header-Outro.with-columns .col-66{width:67%;border-right:1px solid #0B0F11}.interior .header-Outro.with-columns .col-32 .edit{margin-top:4px;float:right;margin-right:30px;color:#fff}.feed-filter{float:left;margin-top:1.4em;font-size:0.8em;margin-left:1.5em}.interior .header-Outro .feed-filter a{color:white;margin-left:13px}.site-suggestion{float:left;width:156px;margin-right:20px;margin-bottom:20px;height:160px}.stats{margin-bottom:2em;float:left;width:100%}.content.misc-page.columns .stats .col,.misc-page.columns.footer-Content .stats .col{padding:0;margin-bottom:2em}.large-portrait{border:10px solid white;-moz-box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2)}.site-portrait{border:5px solid white;-moz-box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);float:left;margin-bottom:.5em}.site-portrait img{width:146px}.site-portrait .caption{display:block;clear:both;font-size:.8em;margin-top:.2em;margin-bottom:-.2em}a.tag{font-size:.7em;text-transform:uppercase;background:#FFFFCC;color:#C1A009;float:left;padding:1px 5px;-moz-box-shadow:1px 1px 1px 0px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px 0px rgba(0,0,0,0.2);box-shadow:1px 1px 1px 0px rgba(0,0,0,0.2);margin-right:3px;margin-right:10px;margin-bottom:7px}a.tag:hover{text-decoration:none;background:#FFEE8A}.following{width:100%;float:left;margin-bottom:2em}.avatar{height:37px;width:37px;margin:0 4px 4px 0;float:left}.news-item{width:100%;float:left}.news-item.update,.news-item.tags,.news-item.comment.for-me,.news-item.tip.for-me{margin:1.8em 0}.news-item:nth-of-type(1){margin-top:0}.news-item.first{margin-top:0}.news-item .user{font-weight:bold;color:#000}.news-item .comment{color:#999;font-style:italic;font-size:.8em}.news-item.for-me .comment{color:#000;font-style:normal;margin-top:.2em;font-size:.9em;margin-bottom:-.4em}.news-item .icon{width:20px;height:20px;background:#E6E6E6;float:left;margin-right:12px}.news-item.comment .icon{background:#DAEEA5}.news-item.comment.for-me .icon,.news-item.tip.for-me .icon{background-size:62px 62px;width:82px;height:62px;background-position:right top;background-repeat:no-repeat}.news-item.update .icon{background:#E93250}.news-item.tip .icon{background:#FFCC00}.news-item.follow .icon{background:#3399CC}.news-item .title{margin-bottom:.4em;position:relative;width:100%;float:left}.news-item .date{float:right;color:#aaa;font-size:11px;margin-top:.5em}.news-item .files{background:#eee;padding:8px 10px 2px 10px;border-top:1px solid #ddd;margin-bottom:4px}.news-item .file{width:90px;margin-bottom:0;padding:0}.news-item .file a:hover{text-decoration:none}.news-item .html-thumbnail{margin-top:1px;margin-left:0px;width:auto}.news-item .site-suggestion{height:auto;margin-bottom:10px}.news-item .tag{float:none;margin-left:4px}.news-item .actions{font-size:11px}.news-item .actions a{margin-right:6px}.news-item .content,.news-item .footer-Content{padding:0 0 0 32px}.news-item .comments{margin-bottom:1.5em;margin-top:.7em}.news-item .comments .comment{font-size:.8em;clear:both}.news-item .comments .comment .user{margin-right:5px}.news-item .comments .comment .actions{margin-top:.3em}.news-item .avatar{margin-right:10px}.signup-Area.large{width:418px;height:236px}.interior .header-Outro.with-site-image{padding-top:20px}.report{margin-top:2em;float:left;width:100%;font-size:.8em}.report,.report a{color:#999}.interior .header-Outro .actions a{margin-right:6px}.interior .header-Outro .stats{margin-bottom:1.2em;float:left;width:100%;margin-top:2em}.interior .header-Outro .stats strong{font-size:1.5em;font-weight:bold;color:#DAEEA5}.interior .header-Outro .stats span{font-size:.7em;text-transform:uppercase;clear:both;display:block}.interior .header-Outro .stats .stat{float:left;width:90px;text-align:center}.interior .header-Outro .stats .stat.tips{width:60px}.btn-Action.follow span{background-image:url(../img/follow.png);padding-left:22px}.btn-Action.tip span{background-image:url(../img/tip.png);padding-left:26px;background-position-y:-1px}.btn-Action.share span{background-image:url(../img/share.png);padding-left:26px}.col-33 .stats .stat{margin-bottom:.4em}.col-33 .stats .stat span{width:10em;float:left}.archives{float:left;width:100%;margin-bottom:2em}.archives img{float:left;border:3px solid white;-webkit-box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);width:72px}.archives img{margin-right:10px}.more{float:left;clear:both;margin-top:1em;font-size:.8em}.post-comment{background:#DAEEA5;float:left;width:111%;padding:20px 0 10px 30px;margin:-25px 0 28px -30px}.post-comment input{width:84%;float:left}.post-comment .btn-Action{margin-left:10px;margin-top:4px}.supporter-badge{background:url(../img/supporter.png);width:99px;height:26px;float:left;margin-top:7px;margin-left:10px}.title-with-badge{float:left;width:100%}.title-with-badge span{float:left}.section.featured-Websites{background:#65A0AD}.section.featured-Websites h2{color:white}.section{padding:50px 10%;margin:0 auto}.section.previews{background:#f6f0e6}.section.previews h2,.section.previews p{color:#31424B}.section h2{font-size:1.6em}.section.last{background:#666666}.section.last h2,.section.last blockquote{color:white}.footer-Base{color:#5e5b56;float:left;width:100%}.footer-Base h1,.footer-Base h2,.footer-Base h3,.footer-Base h4{color:#8b9a7a}.footer-Intro{background:#daeea5;border-top:1px solid #cedbab;-moz-box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);-webkit-box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);position:relative}.footer-Content{padding-top:20px;padding-bottom:20px;padding-left:40px;padding-right:20px}@media (max-device-width: 480px), screen and (max-width: 800px){.footer-Content{padding-left:20px}} +.interior .constant-Nav{margin:0}.content-Base{background:#f6f0e6;min-height:500px;padding-bottom:50px;padding-top:10px}.content-Base h1,.content-Base h2,.content-Base h3,.content-Base h4,.content-Base h5,.content-Base h6{color:#e93250}.content,.footer-Content,.footer-Content{padding:20px 3%}.single-Col{max-width:800px}.twitter-tweet.twitter-tweet-rendered{margin:0 auto 30px !important}.interior .header-Outro{padding-top:30px;overflow:hidden}.interior .header-Outro h1{font-size:2.5em;margin-top:15px}.site-url{font-size:18px;margin-bottom:8px}.site-url a{color:#e93250;font-weight:bold}.interior .header-Outro .subtitle{font-size:1em;margin-top:-15px}.content.wide,.wide.footer-Content{padding-left:6%;padding-right:6%}.content.misc-page,.misc-page.footer-Content{background:#FAF6F1;-moz-box-shadow:0px 1px 1px 1px rgba(0,0,0,0.1);-webkit-box-shadow:0px 1px 1px 1px rgba(0,0,0,0.1);box-shadow:0px 1px 1px 1px rgba(0,0,0,0.1);padding:1px 3% 40px 3%}.content.misc-page h3,.misc-page.footer-Content h3,.content.misc-page h4,.misc-page.footer-Content h4,.content.misc-page h5,.misc-page.footer-Content h5,.content.misc-page h6,.misc-page.footer-Content h6{margin-top:1em}.content.misc-page h2,.misc-page.footer-Content h2{font-size:1.6em;margin-top:1em}.content.misc-page h3,.misc-page.footer-Content h3,.content.misc-page h4,.misc-page.footer-Content h4,.content.misc-page h5,.misc-page.footer-Content h5{font-size:1.2em}.content.misc-page h6,.misc-page.footer-Content h6{font-size:1em}.content.misc-page h1,.misc-page.footer-Content h1{font-size:2.2em;margin-bottom:20px}.content.misc-page hr,.misc-page.footer-Content hr{margin:35px 0 25px 0}.interior .header-Outro .col.col-50.signup-Area{padding-left:0}.interior .header-Outro a{color:#E93250}.interior .header-Outro .btn-Action{color:#fff}.interior .signup-Area{min-height:164px}.interior .signup-Area img{-moz-box-shadow:1px 2px 5px 2px rgba(0,0,0,0.1);-webkit-box-shadow:1px 2px 5px 2px rgba(0,0,0,0.1);box-shadow:1px 2px 5px 2px rgba(0,0,0,0.1);border:4px solid white}.interior .signup-Area.large img{border:6px solid white}.interior .header-Outro .screenshot{width:235px;height:141px}.interior .header-Outro ul{margin:0;padding:0}.interior .header-Outro ul li{list-style:none;font-size:80%;margin-bottom:2px}.interior .signup-Form fieldset{padding:20px}.interior .header-Outro h2{margin-top:12px;font-size:1.8em}.welcome{background:#daeea5 url(../img/heartcat.png) no-repeat 20px center;background-size:77px 81px;padding:20px 20px 20px 108px;margin-bottom:30px}.welcome h4{font-size:1.2em;margin-bottom:4px}.welcome .close-button{float:right;background:url(../img/welcome-close.png) no-repeat;width:19px;height:19px}.files{float:left;background:#E4D8CB;width:100%;position:relative}.files .header{background:#5E95A1;color:#fff;float:left;width:100%;padding:10px 20px}.files .breadcrumbs{float:left;font-weight:bold;margin-top:4px}.files .actions{float:right}.files .btn-Action{margin-left:8px}.btn-Action span{background-repeat:no-repeat}.btn-Action.new-Page span{background-image:url(../img/new-page.png);background-position-y:1px;padding-left:29px}.btn-Action.new-Folder span{background-image:url(../img/new-folder.png);padding-left:26px}.btn-Action.upload span{background-image:url(../img/upload.png);padding-left:24px}.files .list{padding:20px}.files .list .upload-Boundary{float:left;border:3px dashed #F6F0E6;width:100%;margin:18px 0;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;min-height:300px}.files .list .upload-Boundary.with-instruction{background:url(../img/drag-drop.png) no-repeat center center}.files .uploading-overlay{width:100%;height:100%;position:absolute;background-color:rgba(0,0,0,0.35);z-index:100}.files .uploading{background:#fff;font-style:italic;margin-left:auto;margin-right:auto;width:400px;margin-top:14%;padding:25px 40px 28px 40px;-webkit-box-shadow:1px 1px 21px 5px rgba(50,50,50,0.5);-moz-box-shadow:1px 1px 21px 5px rgba(50,50,50,0.5);box-shadow:1px 1px 21px 5px rgba(50,50,50,0.5);border-radius:10px}.files .uploading p{margin-bottom:2px}.files .progress-bar{background:#CCCCCC;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;width:100%;position:relative;margin-top:14px;height:10px;overflow:hidden}.files .progress-bar .progress{background:#E93250;height:100%;-webkit-border-top-right-radius:0px;-webkit-border-bottom-right-radius:0px;-moz-border-radius-topright:0px;-moz-border-radius-bottomright:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;-webkit-border-top-left-radius:20px;-webkit-border-bottom-left-radius:20px;-moz-border-radius-topleft:20px;-moz-border-radius-bottomleft:20px;border-top-left-radius:20px;border-bottom-left-radius:20px;position:relative;overflow:hidden;display:block}.file{float:left;padding:5px 0px;margin-right:10px;margin-bottom:10px;width:125px;text-align:center;display:block;position:relative}.file .title{font-weight:bold;font-size:12px;color:#666;margin-top:4px;text-decoration:none;white-space:nowrap;overflow:hidden;display:block}.html-thumbnail{font-size:11px;margin-top:5px;margin-left:10px;display:block;position:relative;width:105px;height:63px}.html-thumbnail.html img{width:105px;height:63px;-webkit-box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3)}.html-thumbnail.image img{max-width:105px;max-height:63px;width:auto;height:auto}.html-thumbnail.misc{width:63px;height:63px;margin-left:auto;margin-right:auto}.misc-icon{background:url(../img/misc-file.png) no-repeat 0px 0px;width:67px;height:67px;display:block;padding-top:35px;font-size:14px;color:#bbb;font-weight:bold;margin-left:auto;margin-right:auto}.overlay a{color:white;text-decoration:none;font-size:14px;display:block}.overlay i{font-weight:bold}.overlay{position:absolute;top:0;width:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:none}.link-overlay{display:block;position:absolute;bottom:0px;left:0px;width:123px;height:30px}.file>.overlay{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;padding-top:15px;background-color:rgba(0,0,0,0.15)}.filehover:hover .overlay,.fileimagehover:hover .overlay{display:block}.html-thumbnail.misc.fileimagehover .overlay{margin:1px 0 0 2px}.site-actions{float:left;margin-top:20px;font-size:90%}.site-actions a{color:#666}@media (min-width: 1200px){.container{width:1200px}}@media (min-width: 700px) and (max-width: 1200px){.container{width:100%}}.content.misc-page.columns,.misc-page.columns.footer-Content{float:left;padding:0;position:relative;clear:both;width:100%;overflow:hidden}.col-left{float:left;width:100%;position:relative;border-right:1px solid #ddd}.right-col{background:#FAF6F1}.content.misc-page .col-33 h3,.misc-page.footer-Content .col-33 h3{font-size:1.5em}.content.misc-page .col-33 h3:nth-of-type(1),.misc-page.footer-Content .col-33 h3:nth-of-type(1){margin-top:0}.right-col .col-left{background-color:white;right:33%}.content.misc-page.columns .col,.misc-page.columns.footer-Content .col{padding:25px 30px 30px 30px;position:relative;overflow:hidden}.content.misc-page.columns .col-66,.misc-page.columns.footer-Content .col-66{width:67%;left:33%}.content.misc-page.columns .col-33,.misc-page.columns.footer-Content .col-33{width:33%;left:33%}.interior .header-Outro.with-columns{padding-top:22px}.interior .header-Outro.with-columns h3{float:left;margin-bottom:0;font-size:1.7em}.interior .header-Outro.with-columns .content,.interior .header-Outro.with-columns .footer-Content{padding:0}.interior .header-Outro.with-columns .col{padding:25px 0 8px 30px}.interior .header-Outro.with-columns .col-32{width:33%}.interior .header-Outro.with-columns .col-66{width:67%;border-right:1px solid #0B0F11}.interior .header-Outro.with-columns .col-32 .edit{margin-top:4px;float:right;margin-right:30px;color:#fff}.feed-filter{float:left;margin-top:1.4em;font-size:0.8em;margin-left:1.5em}.interior .header-Outro .feed-filter a{color:white;margin-left:13px}.site-suggestion{float:left;width:156px;margin-right:20px;margin-bottom:20px;height:160px}.stats{margin-bottom:2em;float:left;width:100%}.content.misc-page.columns .stats .col,.misc-page.columns.footer-Content .stats .col{padding:0;margin-bottom:2em}.large-portrait{border:10px solid white;-moz-box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2)}.site-portrait{border:5px solid white;-moz-box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 2px 1px rgba(0,0,0,0.2);float:left;margin-bottom:.5em}.site-portrait img{width:146px}.site-portrait .caption{display:block;clear:both;font-size:.8em;margin-top:.2em;margin-bottom:-.2em}a.tag{font-size:.7em;text-transform:uppercase;background:#FFFFCC;color:#C1A009;float:left;padding:1px 5px;-moz-box-shadow:1px 1px 1px 0px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px 0px rgba(0,0,0,0.2);box-shadow:1px 1px 1px 0px rgba(0,0,0,0.2);margin-right:3px;margin-right:10px;margin-bottom:7px}a.tag:hover{text-decoration:none;background:#FFEE8A}.following{width:100%;float:left;margin-bottom:2em}.avatar{height:37px;width:37px;margin:0 4px 4px 0;float:left}.news-item{width:100%;float:left}.news-item.update,.news-item.tags,.news-item.comment.for-me,.news-item.tip.for-me{margin:1.8em 0}.news-item:nth-of-type(1){margin-top:0}.news-item.first{margin-top:0}.news-item .user{font-weight:bold;color:#000}.news-item .comment{color:#000;font-style:normal;font-size:.8em}.news-item.for-me .comment{color:#000;font-style:normal;margin-top:.2em;font-size:.9em;margin-bottom:-.4em}.news-item .icon{width:20px;height:20px;background:#E6E6E6;float:left;margin-right:12px}.news-item.comment .icon{background:#DAEEA5}.news-item.comment.for-me .icon,.news-item.tip.for-me .icon{background-size:62px 62px;width:82px;height:62px;background-position:right top;background-repeat:no-repeat}.news-item.update .icon{background:#E93250}.news-item.tip .icon{background:#FFCC00}.news-item.follow .icon{background:#3399CC}.news-item .title{margin-bottom:.4em;position:relative;width:100%;float:left}.news-item .date{float:right;color:#aaa;font-size:11px;margin-top:.5em}.news-item .files{background:#eee;padding:8px 10px 2px 10px;border-top:1px solid #ddd;margin-bottom:4px}.news-item .file{width:90px;margin-bottom:0;padding:0}.news-item .file a:hover{text-decoration:none}.news-item .html-thumbnail{margin-top:1px;margin-left:0px;width:auto}.news-item .site-suggestion{height:auto;margin-bottom:10px}.news-item .tag{float:none;margin-left:4px}.news-item .actions{font-size:11px}.news-item .actions a{margin-right:6px}.news-item .content,.news-item .footer-Content{padding:0 0 0 32px}.news-item .comments{margin-bottom:1.5em;margin-top:.7em}.news-item .comments .comment{font-size:.8em;clear:both}.news-item .comments .comment .user{margin-right:5px}.news-item .comments .comment .actions{margin-top:.3em}.news-item .avatar{margin-right:10px}.signup-Area.large{width:418px;height:236px}.interior .header-Outro.with-site-image{padding-top:20px}.report{margin-top:2em;float:left;width:100%;font-size:.8em}.report,.report a{color:#999}.interior .header-Outro .actions a{margin-right:6px}.interior .header-Outro .stats{margin-bottom:1.2em;float:left;width:100%;margin-top:2em}.interior .header-Outro .stats strong{font-size:1.5em;font-weight:bold;color:#DAEEA5}.interior .header-Outro .stats span{font-size:.7em;text-transform:uppercase;clear:both;display:block}.interior .header-Outro .stats .stat{float:left;width:90px;text-align:center}.interior .header-Outro .stats .stat.tips{width:60px}.btn-Action.follow span{background-image:url(../img/follow.png);padding-left:22px}.btn-Action.tip span{background-image:url(../img/tip.png);padding-left:26px;background-position-y:-1px}.btn-Action.share span{background-image:url(../img/share.png);padding-left:26px}.col-33 .stats .stat{margin-bottom:.4em}.col-33 .stats .stat span{width:10em;float:left}.archives{float:left;width:100%;margin-bottom:2em}.archives img{float:left;border:3px solid white;-webkit-box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);-moz-box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);box-shadow:0px 1px 4px 0px rgba(0,0,0,0.3);width:72px}.archives img{margin-right:10px}.more{float:left;clear:both;margin-top:1em;font-size:.8em}.post-comment{background:#DAEEA5;float:left;width:111%;padding:20px 0 10px 30px;margin:-25px 0 28px -30px}.post-comment input{width:84%;float:left}.post-comment .btn-Action{margin-left:10px;margin-top:4px}.supporter-badge{background:url(../img/supporter.png);width:99px;height:26px;float:left;margin-top:7px;margin-left:10px}.title-with-badge{float:left;width:100%}.title-with-badge span{float:left}.section.featured-Websites{background:#65A0AD}.section.featured-Websites h2{color:white}.section{padding:50px 10%;margin:0 auto}.section.previews{background:#f6f0e6}.section.previews h2,.section.previews p{color:#31424B}.section h2{font-size:1.6em}.section.last{background:#666666}.section.last h2,.section.last blockquote{color:white}.footer-Base{color:#5e5b56;float:left;width:100%}.footer-Base h1,.footer-Base h2,.footer-Base h3,.footer-Base h4{color:#8b9a7a}.footer-Intro{background:#daeea5;border-top:1px solid #cedbab;-moz-box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);-webkit-box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);position:relative}.footer-Content{padding-top:20px;padding-bottom:20px;padding-left:40px;padding-right:20px}@media (max-device-width: 480px), screen and (max-width: 800px){.footer-Content{padding-left:20px}} .footer-Content .row,.footer-Content .c-Row{margin-left:0}.f-Col{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;min-height:125px;padding-bottom:28px;position:relative}@media (max-device-width: 480px), screen and (max-width: 800px){.f-Col{min-height:2px;padding-left:15px !important;padding-right:100px !important}}.f-Col .action-Link{bottom:0;position:absolute;right:12px}@media (max-device-width: 480px), screen and (max-width: 800px){.f-Col .action-Link{position:static}} .footer-icon{background-repeat:no-repeat;position:absolute;right:0;top:-70px}@media (max-device-width: 480px), screen and (max-width: 800px){.footer-icon{-moz-background-size:100%;-ms-background-size:100%;-o-background-size:100%;-webkit-background-size:100%;background-size:100%;height:90px !important;top:0;width:77px !important}} .f-Col-1{padding-right:12px}.f-Col-1 .footer-icon{background-image:url(../img/support-us.png);height:104px;right:5px;width:92px}.f-Col-2{padding-left:15px;padding-right:6px;position:relative}@media (max-device-width: 480px), screen and (max-width: 800px){.f-Col-2{border-bottom:1px solid rgba(0,0,0,0.1);border-top:1px solid rgba(0,0,0,0.1);margin:20px 0;overflow:hidden;padding:20px 0}.f-Col-2 .footer-icon{top:14px}}.f-Col-2:before,.f-Col-2:after{background:url("../img/border.png") no-repeat 0 -20px;content:"";height:200px;opacity:0.2;position:absolute;top:0;width:1px}@media (max-device-width: 480px), screen and (max-width: 800px){.f-Col-2:before,.f-Col-2:after{display:none}}.f-Col-2:before{left:-14px}.f-Col-2:after{right:-14px}.f-Col-2 .footer-icon{background-image:url(../img/about-neocities.png);width:100px;height:106px}.f-Col-3{padding-left:20px}@media (max-device-width: 480px), screen and (max-width: 800px){.f-Col-3{padding-left:0}}.f-Col-3 .footer-icon{background-image:url(../img/latest-news.png);height:103px;width:134px}.footer-Outro{background:#ccdf9b;border-top:1px solid #b3c388;overflow:hidden}.footer-Outro a{color:#5e5b56}.credits{margin-bottom:0}.footer-Nav{text-transform:uppercase}.footer-Nav .h-Nav,.footer-Nav .bread{float:right}@media (max-device-width: 480px), screen and (max-width: 800px){.footer-Nav .h-Nav,.footer-Nav .bread{float:none;margin-top:15px}.footer-Nav .h-Nav li:first-child a,.footer-Nav .bread li:first-child a{padding-left:0}}.footer-Nav .h-Nav a,.footer-Nav .bread a{padding:0 8px}.footer-Nav .h-Nav li:last-child a,.footer-Nav .bread li:last-child a{padding-right:0}.alert{background-color:#F5BA00;color:#fff}.website-Gallery{list-style:none;padding:10px 0}.website-Gallery li{float:left;margin-bottom:8px}@media (max-device-width: 480px), screen and (max-width: 800px){.website-Gallery li{width:50%}}.website-Gallery a{padding:0 8px;display:block}.website-Gallery.int-Gall li{border:1px solid #ccc;margin:0 .5% 12px;width:24%}@media (max-device-width: 480px), screen and (max-width: 800px){.website-Gallery.int-Gall li{width:49%}}.website-Gallery.int-Gall li a{padding:8px}.neo-SS,.neo-Screen-Shot{background:#fff;-moz-box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);-webkit-box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);box-shadow:0 8px 8px -8px rgba(0,0,0,0.2);display:block;height:auto !important;padding:8px;position:relative;width:100%}.img-Holder{-moz-background-size:cover !important;-webkit-background-size:cover !important;background-size:cover !important;display:block}.hp-Gallery img,.neo-Screen-Shot img{width:100%} diff --git a/views/_news.erb b/views/_news.erb index 65611d8a..961e73d2 100644 --- a/views/_news.erb +++ b/views/_news.erb @@ -15,6 +15,51 @@
<%= event.actioning_site.username %> followed <%= event.site.username %>'s website<%= event.created_at.ago %> + <% elsif event.site_change_id %> +
+
+
+ <%= site.username %>.neocities.org has been updated <%= event.created_at.ago %> +
+
+ +
<% end %> <%== erb :'_news_actions', layout: false, locals: {event: event} %> diff --git a/views/dashboard.erb b/views/dashboard.erb index b4ea246d..e65ff90f 100644 --- a/views/dashboard.erb +++ b/views/dashboard.erb @@ -67,17 +67,16 @@

<%= @error %>

<% end %> - + <% if flash.keys.length > 0 %>

<% flash.keys.each do |key| %> - <%= flash[key] %> + <%== flash[key] %> <% end %>

<% end %> -