Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Restructured a bit, made front page cleaner, added news section as we…
Browse files Browse the repository at this point in the history
…ll as a contact page
  • Loading branch information
flexd committed May 5, 2011
1 parent c15c2a6 commit 4c69aa7
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 46 deletions.
8 changes: 6 additions & 2 deletions application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
helpers do
# add your helpers here
end

get '/news' do
haml :news
end
get '/contact' do
haml :contact
end
post '/upload' do
# Save files
@replay = Replay.new
Expand All @@ -38,7 +43,6 @@
# Redirect the user to where the replay will appear.
# TODO: Make a nice ajax loading thingy instead.
redirect "/replay/#{@replay.id}"

end
get '/stats' do
cache_control :public, :must_revalidate, :max_age => 360
Expand Down
4 changes: 2 additions & 2 deletions config/mongoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ production:
#host: 192.168.30.23
database: civ5replays_production
development:
hosts: [[192.168.30.210, 27017], [192.168.30.212, 27017]]
#host: 192.168.30.23
#hosts: [[localhost, 27017]]
host: localhost
database: civ5replays_development

11 changes: 11 additions & 0 deletions views/contact.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
%p
If you need (or want) to contact me I can be reached at the following places:

%ul
%li
%a{:href => 'http://twitter.com/flexd'} Twitter
%li
Email @ web ÆT flexd DØT net (you must decode!?)
%li
I'm also available on IRC under the nick 'flexd' on Freenode and EFnet. :-)

44 changes: 2 additions & 42 deletions views/index.haml
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
%h1
News
%p
If something breaks please go to this forum post or drop a comment in the form below!
%a{:href=>'http://forums.civfanatics.com/showthread.php?t=402101'} here.
%br

Hi there! I've noticed a bunch of jobs have started failing and i will try to take a look but i'm not sure i know how to fix this.
I also added a link to failed jobs so you can easily see when they fail, jobs that haven't been processed yet will also end up there until they are processed. Anyway, i have gotten no comments or anything like that from anyone, doesn't anybody have anything they want to improve or say?

You can leave a comment below.
%br
_________________________________________________________________________________________________
%br
%br
I have just added pagination and commenting to replays. The server is currently experiencing a yet undiagnosed hardware error i believe might be disk(s). It's a very old machine that even has IDE disks. Hoping to fix it somehow.

I might be getting a dual xeon box with 4GB ram from a friend. That'll do eh? :D
%br
I'm available on twitter,
%a{:href=> 'http://twitter.com/flexd'} here
if you want to get a hold of me. I also hang out on irc.freenode.net #evecentral
%p Simply upload a replay of a finished civilization 5 game and a HTML page will be generated for your replay :-)

%form{:action => '/upload', :enctype => 'multipart/form-data', :method => 'POST'}
%p<
Replay description/name to be identified with in links.
Expand All @@ -33,23 +12,4 @@
%input{:type => 'file',:id => 'mapfile', :name => 'mapfile'}
%p<
%input{:type => 'submit', :value => 'Upload'}
%div{:id=>"disqus_thread"}
:javascript
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'civilization5replaygenerator'; // required: replace example with your forum shortname
// The following are highly recommended additional parameters. Remove the slashes in front to use.
var disqus_identifier = '5820c87g2hjf972yhdjf8728guh2j9syhcjk928';
var disqus_url = '#{SiteConfig.url_base}';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();

%noscript
Please enable JavaScript to view the %a{:href=>"http://disqus.com/?ref_noscript"} comments powered by Disqus.
%a{:href=>"http://disqus.com", :class=>"dsq-brlink"}
blog comments powered by
%span{:class=>"logo-disqus"} Disqus
%br/
2 changes: 2 additions & 0 deletions views/layout.haml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
%a{:href => '/'}= SiteConfig.title
#content
%a{:href => '/'} Home
|
%a{:href => '/news'} News
|
%a{:href => '/replays'} Replays
|
Expand Down
28 changes: 28 additions & 0 deletions views/news.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
%p
We are now running on three fancy virtual machines, the website is heavily cached and I dare you to slow it down with normal traffic :p

%p
With some help from MouseyPounds from the Civilization Fanatics forums there will soon be a updated version of the parser that will handle
a lot more replays (and languages) without problems.
Last test run did 950 replays over night and only about 15 of them failed. :-)

%div{:id=>"disqus_thread"}
:javascript
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'civilization5replaygenerator'; // required: replace example with your forum shortname
// The following are highly recommended additional parameters. Remove the slashes in front to use.
var disqus_identifier = '5820c87g2hjf972yhdjf878guh2j9syhcjk928';
var disqus_url = '#{SiteConfig.url_base}';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();

%noscript
Please enable JavaScript to view the %a{:href=>"http://disqus.com/?ref_noscript"} comments powered by Disqus.
%a{:href=>"http://disqus.com", :class=>"dsq-brlink"}
blog comments powered by
%span{:class=>"logo-disqus"} Disqus

0 comments on commit 4c69aa7

Please sign in to comment.