diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae46c07 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile ~/.gitignore_global + +# Ignore bundler config +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 + +# Ignore all logfiles and tempfiles. +/log/*.log +/tmp +*.rbc +*.sassc +.sass-cache +capybara-*.html +.rspec +/.bundle +/vendor/bundle +/log/* +/tmp/* +/db/*.sqlite3 +/public/system/* +/coverage/ +/spec/tmp/* +**.orig +rerun.txt +pickle-email-*.html diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..469cb74 --- /dev/null +++ b/Gemfile @@ -0,0 +1,64 @@ +source 'http://ruby.taobao.org' + +# Bundle edge Rails instead: +# gem 'rails', :git => 'git://github.com/rails/rails.git' +gem 'rails', '3.2.3' +gem "rails_autolink", ">= 1.0.4" + +# Mongoid 辅助插件 +gem "mongoid", "2.4.3" +gem "bson_ext", "1.5.2" +gem 'mongo-rails-instrumentation','0.2.4' +gem 'mongoid_auto_increment_id', "0.4.0" +gem 'mongoid_rails_migrations', '~> 0.0.14' + +# 分页 +# 分页 +gem 'will_paginate', '3.0.2' +gem 'will_paginate_mongoid', '~> 1.0.2' +# gem 'bootstrap-will_paginate', '0.0.3' + +# Markdown 格式 +gem "redcarpet", "~> 2.0.0" +gem 'hpricot', '~> 0.8.5' +gem "pygments.rb", '~> 0.2.4' + +# YAML 配置信息 +gem "settingslogic", "~> 2.0.6" + +# 禁用 assets 日志 +gem 'quiet_assets', :git => 'git://github.com/AgilionApps/quiet_assets.git' + + +# 表单 last commit: 2011-12-03 +gem 'simple_form', :git => "git://github.com/plataformatec/simple_form.git" +gem 'bootstrap-rails', :require => 'bootstrap-rails', :git => 'git://github.com/xdite/bootstrap-rails.git' + +# Gems used only for assets and not required +# in production environments by default. +group :assets do + gem 'sass-rails', '~> 3.2.3' + gem 'coffee-rails', '~> 3.2.1' + + # See https://github.com/sstephenson/execjs#readme for more supported runtimes + # gem 'therubyracer', :platform => :ruby + + gem 'uglifier', '>= 1.0.3' +end + +gem 'jquery-rails' + +# To use ActiveModel has_secure_password +# gem 'bcrypt-ruby', '~> 3.0.0' + +# To use Jbuilder templates for JSON +# gem 'jbuilder' + +# Use unicorn as the app server +gem 'unicorn' + +# Deploy with Capistrano +# gem 'capistrano' + +# To use debugger +# gem 'ruby-debug' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..5f92b6a --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,186 @@ +GIT + remote: git://github.com/AgilionApps/quiet_assets.git + revision: c42e29264a61a5431cc09282df597242c003ebe6 + specs: + quiet_assets (0.0.1) + +GIT + remote: git://github.com/plataformatec/simple_form.git + revision: 2db82867b569824968e2131210981e868b834e62 + specs: + simple_form (2.0.2) + actionpack (~> 3.0) + activemodel (~> 3.0) + +GIT + remote: git://github.com/xdite/bootstrap-rails.git + revision: 7fe2d48ef0b01de7b16aa927465d83c768e3769e + specs: + bootstrap-rails (0.1.4) + railties (~> 3.0) + thor (~> 0.14) + +GEM + remote: http://ruby.taobao.org/ + specs: + actionmailer (3.2.3) + actionpack (= 3.2.3) + mail (~> 2.4.4) + actionpack (3.2.3) + activemodel (= 3.2.3) + activesupport (= 3.2.3) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.1) + rack (~> 1.4.0) + rack-cache (~> 1.2) + rack-test (~> 0.6.1) + sprockets (~> 2.1.2) + activemodel (3.2.3) + activesupport (= 3.2.3) + builder (~> 3.0.0) + activerecord (3.2.3) + activemodel (= 3.2.3) + activesupport (= 3.2.3) + arel (~> 3.0.2) + tzinfo (~> 0.3.29) + activeresource (3.2.3) + activemodel (= 3.2.3) + activesupport (= 3.2.3) + activesupport (3.2.3) + i18n (~> 0.6) + multi_json (~> 1.0) + arel (3.0.2) + blankslate (2.1.2.4) + bson (1.5.2) + bson_ext (1.5.2) + bson (= 1.5.2) + builder (3.0.0) + coffee-rails (3.2.2) + coffee-script (>= 2.2.0) + railties (~> 3.2.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.3.3) + erubis (2.7.0) + execjs (1.4.0) + multi_json (~> 1.0) + ffi (1.0.11) + hike (1.2.1) + hpricot (0.8.6) + i18n (0.6.0) + journey (1.0.4) + jquery-rails (2.0.2) + railties (>= 3.2.0, < 5.0) + thor (~> 0.14) + json (1.7.3) + kgio (2.6.0) + mail (2.4.4) + i18n (>= 0.4.0) + mime-types (~> 1.16) + treetop (~> 1.4.8) + mime-types (1.19) + mongo (1.5.2) + bson (= 1.5.2) + mongo-rails-instrumentation (0.2.4) + mongoid (2.4.3) + activemodel (~> 3.1) + mongo (~> 1.3) + tzinfo (~> 0.3.22) + mongoid_auto_increment_id (0.4.0) + mongoid (~> 2.4.0) + mongoid_rails_migrations (0.0.14) + activesupport (>= 3.0.0) + bundler (>= 1.0.0) + rails (>= 3.0.0) + railties (>= 3.0.0) + multi_json (1.3.6) + polyglot (0.3.3) + pygments.rb (0.2.13) + rubypython (~> 0.5.3) + rack (1.4.1) + rack-cache (1.2) + rack (>= 0.4) + rack-ssl (1.3.2) + rack + rack-test (0.6.1) + rack (>= 1.0) + rails (3.2.3) + actionmailer (= 3.2.3) + actionpack (= 3.2.3) + activerecord (= 3.2.3) + activeresource (= 3.2.3) + activesupport (= 3.2.3) + bundler (~> 1.0) + railties (= 3.2.3) + rails_autolink (1.0.4) + rails (>= 3.1.0) + railties (3.2.3) + actionpack (= 3.2.3) + activesupport (= 3.2.3) + rack-ssl (~> 1.3.2) + rake (>= 0.8.7) + rdoc (~> 3.4) + thor (~> 0.14.6) + raindrops (0.8.0) + rake (0.9.2.2) + rdoc (3.12) + json (~> 1.4) + redcarpet (2.0.1) + rubypython (0.5.3) + blankslate (>= 2.1.2.3) + ffi (~> 1.0.7) + sass (3.1.19) + sass-rails (3.2.5) + railties (~> 3.2.0) + sass (>= 3.1.10) + tilt (~> 1.3) + settingslogic (2.0.8) + sprockets (2.1.3) + hike (~> 1.2) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + thor (0.14.6) + tilt (1.3.3) + treetop (1.4.10) + polyglot + polyglot (>= 0.3.1) + tzinfo (0.3.33) + uglifier (1.2.5) + execjs (>= 0.3.0) + multi_json (~> 1.3) + unicorn (4.1.1) + kgio (~> 2.4) + rack + raindrops (~> 0.6) + will_paginate (3.0.2) + will_paginate_mongoid (1.0.5) + mongoid (~> 2.4) + will_paginate (~> 3.0.2) + +PLATFORMS + ruby + +DEPENDENCIES + bootstrap-rails! + bson_ext (= 1.5.2) + coffee-rails (~> 3.2.1) + hpricot (~> 0.8.5) + jquery-rails + mongo-rails-instrumentation (= 0.2.4) + mongoid (= 2.4.3) + mongoid_auto_increment_id (= 0.4.0) + mongoid_rails_migrations (~> 0.0.14) + pygments.rb (~> 0.2.4) + quiet_assets! + rails (= 3.2.3) + rails_autolink (>= 1.0.4) + redcarpet (~> 2.0.0) + sass-rails (~> 3.2.3) + settingslogic (~> 2.0.6) + simple_form! + uglifier (>= 1.0.3) + unicorn + will_paginate (= 3.0.2) + will_paginate_mongoid (~> 1.0.2) diff --git a/README.rdoc b/README.rdoc new file mode 100644 index 0000000..a03c661 --- /dev/null +++ b/README.rdoc @@ -0,0 +1,270 @@ +#add by iceskysl +#mongod +/opt/mongodb/current/bin/mongod --dbpath /datas/dbs/mongo/ -logpath /var/log/mongodb.log +#rvm +rvm use ruby-1.9.2-p290-patch + +rails generate mongoid:config + + +== Welcome to Rails + +Rails is a web-application framework that includes everything needed to create +database-backed web applications according to the Model-View-Control pattern. + +This pattern splits the view (also called the presentation) into "dumb" +templates that are primarily responsible for inserting pre-built data in between +HTML tags. The model contains the "smart" domain objects (such as Account, +Product, Person, Post) that holds all the business logic and knows how to +persist themselves to a database. The controller handles the incoming requests +(such as Save New Account, Update Product, Show Post) by manipulating the model +and directing data to the view. + +In Rails, the model is handled by what's called an object-relational mapping +layer entitled Active Record. This layer allows you to present the data from +database rows as objects and embellish these data objects with business logic +methods. You can read more about Active Record in +link:files/vendor/rails/activerecord/README.html. + +The controller and view are handled by the Action Pack, which handles both +layers by its two parts: Action View and Action Controller. These two layers +are bundled in a single package due to their heavy interdependence. This is +unlike the relationship between the Active Record and Action Pack that is much +more separate. Each of these packages can be used independently outside of +Rails. You can read more about Action Pack in +link:files/vendor/rails/actionpack/README.html. + + +== Getting Started + +1. At the command prompt, create a new Rails application: + rails new myapp (where myapp is the application name) + +2. Change directory to myapp and start the web server: + cd myapp; rails server (run with --help for options) + +3. Go to http://localhost:3000/ and you'll see: + "Welcome aboard: You're riding Ruby on Rails!" + +4. Follow the guidelines to start developing your application. You can find +the following resources handy: + +* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html +* Ruby on Rails Tutorial Book: http://www.railstutorial.org/ + + +== Debugging Rails + +Sometimes your application goes wrong. Fortunately there are a lot of tools that +will help you debug it and get it back on the rails. + +First area to check is the application log files. Have "tail -f" commands +running on the server.log and development.log. Rails will automatically display +debugging and runtime information to these files. Debugging info will also be +shown in the browser on requests from 127.0.0.1. + +You can also log your own messages directly into the log file from your code +using the Ruby logger class from inside your controllers. Example: + + class WeblogController < ActionController::Base + def destroy + @weblog = Weblog.find(params[:id]) + @weblog.destroy + logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") + end + end + +The result will be a message in your log file along the lines of: + + Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! + +More information on how to use the logger is at http://www.ruby-doc.org/core/ + +Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are +several books available online as well: + +* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) +* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) + +These two books will bring you up to speed on the Ruby language and also on +programming in general. + + +== Debugger + +Debugger support is available through the debugger command when you start your +Mongrel or WEBrick server with --debugger. This means that you can break out of +execution at any point in the code, investigate and change the model, and then, +resume execution! You need to install ruby-debug to run the server in debugging +mode. With gems, use sudo gem install ruby-debug. Example: + + class WeblogController < ActionController::Base + def index + @posts = Post.all + debugger + end + end + +So the controller will accept the action, run the first line, then present you +with a IRB prompt in the server window. Here you can do things like: + + >> @posts.inspect + => "[#nil, "body"=>nil, "id"=>"1"}>, + #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" + >> @posts.first.title = "hello from a debugger" + => "hello from a debugger" + +...and even better, you can examine how your runtime objects actually work: + + >> f = @posts.first + => #nil, "body"=>nil, "id"=>"1"}> + >> f. + Display all 152 possibilities? (y or n) + +Finally, when you're ready to resume execution, you can enter "cont". + + +== Console + +The console is a Ruby shell, which allows you to interact with your +application's domain model. Here you'll have all parts of the application +configured, just like it is when the application is running. You can inspect +domain models, change values, and save to the database. Starting the script +without arguments will launch it in the development environment. + +To start the console, run rails console from the application +directory. + +Options: + +* Passing the -s, --sandbox argument will rollback any modifications + made to the database. +* Passing an environment name as an argument will load the corresponding + environment. Example: rails console production. + +To reload your controllers and models after launching the console run +reload! + +More information about irb can be found at: +link:http://www.rubycentral.org/pickaxe/irb.html + + +== dbconsole + +You can go to the command line of your database directly through rails +dbconsole. You would be connected to the database with the credentials +defined in database.yml. Starting the script without arguments will connect you +to the development database. Passing an argument will connect you to a different +database, like rails dbconsole production. Currently works for MySQL, +PostgreSQL and SQLite 3. + +== Description of Contents + +The default directory structure of a generated Ruby on Rails application: + + |-- app + | |-- assets + | |-- images + | |-- javascripts + | `-- stylesheets + | |-- controllers + | |-- helpers + | |-- mailers + | |-- models + | `-- views + | `-- layouts + |-- config + | |-- environments + | |-- initializers + | `-- locales + |-- db + |-- doc + |-- lib + | `-- tasks + |-- log + |-- public + |-- script + |-- test + | |-- fixtures + | |-- functional + | |-- integration + | |-- performance + | `-- unit + |-- tmp + | |-- cache + | |-- pids + | |-- sessions + | `-- sockets + `-- vendor + |-- assets + `-- stylesheets + `-- plugins + +app + Holds all the code that's specific to this particular application. + +app/assets + Contains subdirectories for images, stylesheets, and JavaScript files. + +app/controllers + Holds controllers that should be named like weblogs_controller.rb for + automated URL mapping. All controllers should descend from + ApplicationController which itself descends from ActionController::Base. + +app/models + Holds models that should be named like post.rb. Models descend from + ActiveRecord::Base by default. + +app/views + Holds the template files for the view that should be named like + weblogs/index.html.erb for the WeblogsController#index action. All views use + eRuby syntax by default. + +app/views/layouts + Holds the template files for layouts to be used with views. This models the + common header/footer method of wrapping views. In your views, define a layout + using the layout :default and create a file named default.html.erb. + Inside default.html.erb, call <% yield %> to render the view using this + layout. + +app/helpers + Holds view helpers that should be named like weblogs_helper.rb. These are + generated for you automatically when using generators for controllers. + Helpers can be used to wrap functionality for your views into methods. + +config + Configuration files for the Rails environment, the routing map, the database, + and other dependencies. + +db + Contains the database schema in schema.rb. db/migrate contains all the + sequence of Migrations for your schema. + +doc + This directory is where your application documentation will be stored when + generated using rake doc:app + +lib + Application specific libraries. Basically, any kind of custom code that + doesn't belong under controllers, models, or helpers. This directory is in + the load path. + +public + The directory available for the web server. Also contains the dispatchers and the + default HTML files. This should be set as the DOCUMENT_ROOT of your web + server. + +script + Helper scripts for automation and generation. + +test + Unit and functional tests along with fixtures. When using the rails generate + command, template test files will be generated for you and placed in this + directory. + +vendor + External libraries that the application depends on. Also includes the plugins + subdirectory. If the app has frozen rails, those gems also go here, under + vendor/rails/. This directory is in the load path. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..92535da --- /dev/null +++ b/Rakefile @@ -0,0 +1,7 @@ +#!/usr/bin/env rake +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require File.expand_path('../config/application', __FILE__) + +Iceylog::Application.load_tasks diff --git a/app/assets/images/SynIco.png b/app/assets/images/SynIco.png new file mode 100644 index 0000000..d56ddd7 Binary files /dev/null and b/app/assets/images/SynIco.png differ diff --git a/app/assets/images/about-bkg.png b/app/assets/images/about-bkg.png new file mode 100644 index 0000000..e9cec84 Binary files /dev/null and b/app/assets/images/about-bkg.png differ diff --git a/app/assets/images/body-bkg.png b/app/assets/images/body-bkg.png new file mode 100644 index 0000000..5d06df0 Binary files /dev/null and b/app/assets/images/body-bkg.png differ diff --git a/app/assets/images/logo-symbol.png b/app/assets/images/logo-symbol.png new file mode 100644 index 0000000..71eb750 Binary files /dev/null and b/app/assets/images/logo-symbol.png differ diff --git a/app/assets/images/rails.png b/app/assets/images/rails.png new file mode 100644 index 0000000..d5edc04 Binary files /dev/null and b/app/assets/images/rails.png differ diff --git a/app/assets/images/search-bkg.png b/app/assets/images/search-bkg.png new file mode 100644 index 0000000..89ba5da Binary files /dev/null and b/app/assets/images/search-bkg.png differ diff --git a/app/assets/images/search-button.png b/app/assets/images/search-button.png new file mode 100644 index 0000000..54ababa Binary files /dev/null and b/app/assets/images/search-button.png differ diff --git a/app/assets/images/search-input.png b/app/assets/images/search-input.png new file mode 100644 index 0000000..5cd366e Binary files /dev/null and b/app/assets/images/search-input.png differ diff --git a/app/assets/images/tabs-arrow.png b/app/assets/images/tabs-arrow.png new file mode 100644 index 0000000..b849809 Binary files /dev/null and b/app/assets/images/tabs-arrow.png differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 0000000..9097d83 --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,15 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// the compiled file. +// +// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD +// GO AFTER THE REQUIRES BELOW. +// +//= require jquery +//= require jquery_ujs +//= require_tree . diff --git a/app/assets/javascripts/cpanel/application.js.coffee b/app/assets/javascripts/cpanel/application.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/cpanel/application.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/cpanel/categories.js.coffee b/app/assets/javascripts/cpanel/categories.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/cpanel/categories.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/cpanel/home.js.coffee b/app/assets/javascripts/cpanel/home.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/cpanel/home.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/cpanel/pages.js.coffee b/app/assets/javascripts/cpanel/pages.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/cpanel/pages.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/cpanel/posts.js.coffee b/app/assets/javascripts/cpanel/posts.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/cpanel/posts.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/cpanel/site_configs.js.coffee b/app/assets/javascripts/cpanel/site_configs.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/cpanel/site_configs.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/cpanel/sites.js.coffee b/app/assets/javascripts/cpanel/sites.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/cpanel/sites.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/index.js.coffee b/app/assets/javascripts/index.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/index.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/pages.js.coffee b/app/assets/javascripts/pages.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/pages.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/posts.js.coffee b/app/assets/javascripts/posts.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/posts.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/javascripts/search.js.coffee b/app/assets/javascripts/search.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/search.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css new file mode 100644 index 0000000..7261d5d --- /dev/null +++ b/app/assets/stylesheets/application.css @@ -0,0 +1,19 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the top of the + * compiled file, but it's generally better to create a new file per style scope. + * + *= require bootstrap.min + *= require style + *= require_self +*/ + + body { background: #c6e5f2 url(/images/body-bkg.png) no-repeat center top; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; padding: 0px; margin-top: 0px; color:#35383d;} + + + diff --git a/app/assets/stylesheets/bootstrap.min.css b/app/assets/stylesheets/bootstrap.min.css new file mode 100644 index 0000000..afb1ed3 --- /dev/null +++ b/app/assets/stylesheets/bootstrap.min.css @@ -0,0 +1,636 @@ +// Place all the styles related to the index controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ + +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} +audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} +audio:not([controls]){display:none;} +html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} +a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +a:hover,a:active{outline:0;} +sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} +sup{top:-0.5em;} +sub{bottom:-0.25em;} +img{max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic;} +button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} +button,input{*overflow:visible;line-height:normal;} +button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} +button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} +input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;} +input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} +textarea{overflow:auto;vertical-align:top;} +.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} +.clearfix:after{clear:both;} +body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;} +a{color:#0088cc;text-decoration:none;} +a:hover{color:#005580;text-decoration:underline;} +.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} +.row:after{clear:both;} +[class*="span"]{float:left;margin-left:20px;} +.span1{width:60px;} +.span2{width:140px;} +.span3{width:220px;} +.span4{width:300px;} +.span5{width:380px;} +.span6{width:460px;} +.span7{width:540px;} +.span8{width:620px;} +.span9{width:700px;} +.span10{width:780px;} +.span11{width:860px;} +.span12,.container{width:940px;} +.offset1{margin-left:100px;} +.offset2{margin-left:180px;} +.offset3{margin-left:260px;} +.offset4{margin-left:340px;} +.offset5{margin-left:420px;} +.offset6{margin-left:500px;} +.offset7{margin-left:580px;} +.offset8{margin-left:660px;} +.offset9{margin-left:740px;} +.offset10{margin-left:820px;} +.offset11{margin-left:900px;} +.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} +.row-fluid:after{clear:both;} +.row-fluid>[class*="span"]{float:left;margin-left:2.127659574%;} +.row-fluid>[class*="span"]:first-child{margin-left:0;} +.row-fluid>.span1{width:6.382978723%;} +.row-fluid>.span2{width:14.89361702%;} +.row-fluid>.span3{width:23.404255317%;} +.row-fluid>.span4{width:31.914893614%;} +.row-fluid>.span5{width:40.425531911%;} +.row-fluid>.span6{width:48.93617020799999%;} +.row-fluid>.span7{width:57.446808505%;} +.row-fluid>.span8{width:65.95744680199999%;} +.row-fluid>.span9{width:74.468085099%;} +.row-fluid>.span10{width:82.97872339599999%;} +.row-fluid>.span11{width:91.489361693%;} +.row-fluid>.span12{width:99.99999998999999%;} +.container{width:940px;margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";} +.container:after{clear:both;} +.container-fluid{padding-left:20px;padding-right:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";} +.container-fluid:after{clear:both;} +p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;} +.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;} +h1,h2,h3,h4,h5,h6{margin:0;font-weight:bold;color:#333333;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;} +h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;} +h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;} +h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;} +h4,h5,h6{line-height:18px;} +h4{font-size:14px;}h4 small{font-size:12px;} +h5{font-size:12px;} +h6{font-size:11px;color:#999999;text-transform:uppercase;} +.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;} +.page-header h1{line-height:1;} +ul,ol{padding:0;margin:0 0 9px 25px;} +ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} +ul{list-style:disc;} +ol{list-style:decimal;} +li{line-height:18px;} +ul.unstyled,ol.unstyled{margin-left:0;list-style:none;} +dl{margin-bottom:18px;} +dt,dd{line-height:18px;} +dt{font-weight:bold;} +dd{margin-left:9px;} +hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;} +strong{font-weight:bold;} +em{font-style:italic;} +.muted{color:#999999;} +abbr{font-size:90%;text-transform:uppercase;border-bottom:1px dotted #ddd;cursor:help;} +blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;} +blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';} +blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eeeeee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;} +q:before,q:after,blockquote:before,blockquote:after{content:"";} +address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;} +small{font-size:100%;} +cite{font-style:normal;} +code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +code{padding:3px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;} +pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;word-wrap:break-word;}pre.prettyprint{margin-bottom:18px;} +pre code{padding:0;color:inherit;background-color:transparent;border:0;} +.pre-scrollable{max-height:340px;overflow-y:scroll;} +form{margin:0 0 18px;} +fieldset{padding:0;margin:0;border:0;} +legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}legend small{font-size:13.5px;color:#999999;} +label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;} +input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;} +label{display:block;margin-bottom:5px;color:#333333;} +input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.uneditable-textarea{width:auto;height:auto;} +label input,label textarea,label select{display:block;} +input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;border:0 \9;} +input[type="image"]{border:0;} +input[type="file"]{width:auto;padding:initial;line-height:initial;border:initial;background-color:#ffffff;background-color:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;} +select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;} +input[type="file"]{line-height:18px \9;} +select{width:220px;background-color:#ffffff;} +select[multiple],select[size]{height:auto;} +input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +textarea{height:auto;} +input[type="hidden"]{display:none;} +.radio,.checkbox{padding-left:18px;} +.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;} +.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;} +.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;} +.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;} +input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;} +input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);outline:0;outline:thin dotted \9;} +input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +.input-mini{width:60px;} +.input-small{width:90px;} +.input-medium{width:150px;} +.input-large{width:210px;} +.input-xlarge{width:270px;} +.input-xxlarge{width:530px;} +input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{float:none;margin-left:0;} +input.span1,textarea.span1,.uneditable-input.span1{width:50px;} +input.span2,textarea.span2,.uneditable-input.span2{width:130px;} +input.span3,textarea.span3,.uneditable-input.span3{width:210px;} +input.span4,textarea.span4,.uneditable-input.span4{width:290px;} +input.span5,textarea.span5,.uneditable-input.span5{width:370px;} +input.span6,textarea.span6,.uneditable-input.span6{width:450px;} +input.span7,textarea.span7,.uneditable-input.span7{width:530px;} +input.span8,textarea.span8,.uneditable-input.span8{width:610px;} +input.span9,textarea.span9,.uneditable-input.span9{width:690px;} +input.span10,textarea.span10,.uneditable-input.span10{width:770px;} +input.span11,textarea.span11,.uneditable-input.span11{width:850px;} +input.span12,textarea.span12,.uneditable-input.span12{width:930px;} +input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;} +.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;} +.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;} +.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;} +.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;} +.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;} +.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;} +.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;} +.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;} +.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;} +input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} +.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;} +.uneditable-input{display:block;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;} +:-moz-placeholder{color:#999999;} +::-webkit-input-placeholder{color:#999999;} +.help-block{display:block;margin-top:5px;margin-bottom:0;color:#999999;} +.help-inline{display:inline-block;*display:inline;*zoom:1;margin-bottom:9px;vertical-align:middle;padding-left:5px;} +.input-prepend,.input-append{margin-bottom:5px;*zoom:1;}.input-prepend:before,.input-append:before,.input-prepend:after,.input-append:after{display:table;content:"";} +.input-prepend:after,.input-append:after{clear:both;} +.input-prepend input,.input-append input,.input-prepend .uneditable-input,.input-append .uneditable-input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{position:relative;z-index:2;} +.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;} +.input-prepend .add-on,.input-append .add-on{float:left;display:block;width:auto;min-width:16px;height:18px;margin-right:-1px;padding:4px 5px;font-weight:normal;line-height:18px;color:#999999;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#f5f5f5;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;} +.input-prepend .add-on{*margin-top:1px;} +.input-append input,.input-append .uneditable-input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.input-append .uneditable-input{border-left-color:#eee;border-right-color:#ccc;} +.input-append .add-on{margin-right:0;margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +.input-append input:first-child{*margin-left:-160px;}.input-append input:first-child+.add-on{*margin-left:-21px;} +.search-query{padding-left:14px;padding-right:14px;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;} +.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input{display:inline-block;margin-bottom:0;} +.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;} +.form-search label,.form-inline label,.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{display:inline-block;} +.form-search .input-append .add-on,.form-inline .input-prepend .add-on,.form-search .input-append .add-on,.form-inline .input-prepend .add-on{vertical-align:middle;} +.form-search .radio,.form-inline .radio,.form-search .checkbox,.form-inline .checkbox{margin-bottom:0;vertical-align:middle;} +.control-group{margin-bottom:9px;} +legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;} +.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";} +.form-horizontal .control-group:after{clear:both;} +.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;} +.form-horizontal .controls{margin-left:160px;} +.form-horizontal .form-actions{padding-left:160px;} +table{max-width:100%;border-collapse:collapse;border-spacing:0;} +.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #ddd;} +.table th{font-weight:bold;} +.table thead th{vertical-align:bottom;} +.table thead:first-child tr th,.table thead:first-child tr td{border-top:0;} +.table tbody+tbody{border-top:2px solid #ddd;} +.table-condensed th,.table-condensed td{padding:4px 5px;} +.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th+th,.table-bordered td+td,.table-bordered th+td,.table-bordered td+th{border-left:1px solid #ddd;} +.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} +.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;} +.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;} +.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;} +.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;} +.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} +.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;} +table .span1{float:none;width:44px;margin-left:0;} +table .span2{float:none;width:124px;margin-left:0;} +table .span3{float:none;width:204px;margin-left:0;} +table .span4{float:none;width:284px;margin-left:0;} +table .span5{float:none;width:364px;margin-left:0;} +table .span6{float:none;width:444px;margin-left:0;} +table .span7{float:none;width:524px;margin-left:0;} +table .span8{float:none;width:604px;margin-left:0;} +table .span9{float:none;width:684px;margin-left:0;} +table .span10{float:none;width:764px;margin-left:0;} +table .span11{float:none;width:844px;margin-left:0;} +table .span12{float:none;width:924px;margin-left:0;} +[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;} +.icon-white{background-image:url("../img/glyphicons-halflings-white.png");} +.icon-glass{background-position:0 0;} +.icon-music{background-position:-24px 0;} +.icon-search{background-position:-48px 0;} +.icon-envelope{background-position:-72px 0;} +.icon-heart{background-position:-96px 0;} +.icon-star{background-position:-120px 0;} +.icon-star-empty{background-position:-144px 0;} +.icon-user{background-position:-168px 0;} +.icon-film{background-position:-192px 0;} +.icon-th-large{background-position:-216px 0;} +.icon-th{background-position:-240px 0;} +.icon-th-list{background-position:-264px 0;} +.icon-ok{background-position:-288px 0;} +.icon-remove{background-position:-312px 0;} +.icon-zoom-in{background-position:-336px 0;} +.icon-zoom-out{background-position:-360px 0;} +.icon-off{background-position:-384px 0;} +.icon-signal{background-position:-408px 0;} +.icon-cog{background-position:-432px 0;} +.icon-trash{background-position:-456px 0;} +.icon-home{background-position:0 -24px;} +.icon-file{background-position:-24px -24px;} +.icon-time{background-position:-48px -24px;} +.icon-road{background-position:-72px -24px;} +.icon-download-alt{background-position:-96px -24px;} +.icon-download{background-position:-120px -24px;} +.icon-upload{background-position:-144px -24px;} +.icon-inbox{background-position:-168px -24px;} +.icon-play-circle{background-position:-192px -24px;} +.icon-repeat{background-position:-216px -24px;} +.icon-refresh{background-position:-240px -24px;} +.icon-list-alt{background-position:-264px -24px;} +.icon-lock{background-position:-287px -24px;} +.icon-flag{background-position:-312px -24px;} +.icon-headphones{background-position:-336px -24px;} +.icon-volume-off{background-position:-360px -24px;} +.icon-volume-down{background-position:-384px -24px;} +.icon-volume-up{background-position:-408px -24px;} +.icon-qrcode{background-position:-432px -24px;} +.icon-barcode{background-position:-456px -24px;} +.icon-tag{background-position:0 -48px;} +.icon-tags{background-position:-25px -48px;} +.icon-book{background-position:-48px -48px;} +.icon-bookmark{background-position:-72px -48px;} +.icon-print{background-position:-96px -48px;} +.icon-camera{background-position:-120px -48px;} +.icon-font{background-position:-144px -48px;} +.icon-bold{background-position:-167px -48px;} +.icon-italic{background-position:-192px -48px;} +.icon-text-height{background-position:-216px -48px;} +.icon-text-width{background-position:-240px -48px;} +.icon-align-left{background-position:-264px -48px;} +.icon-align-center{background-position:-288px -48px;} +.icon-align-right{background-position:-312px -48px;} +.icon-align-justify{background-position:-336px -48px;} +.icon-list{background-position:-360px -48px;} +.icon-indent-left{background-position:-384px -48px;} +.icon-indent-right{background-position:-408px -48px;} +.icon-facetime-video{background-position:-432px -48px;} +.icon-picture{background-position:-456px -48px;} +.icon-pencil{background-position:0 -72px;} +.icon-map-marker{background-position:-24px -72px;} +.icon-adjust{background-position:-48px -72px;} +.icon-tint{background-position:-72px -72px;} +.icon-edit{background-position:-96px -72px;} +.icon-share{background-position:-120px -72px;} +.icon-check{background-position:-144px -72px;} +.icon-move{background-position:-168px -72px;} +.icon-step-backward{background-position:-192px -72px;} +.icon-fast-backward{background-position:-216px -72px;} +.icon-backward{background-position:-240px -72px;} +.icon-play{background-position:-264px -72px;} +.icon-pause{background-position:-288px -72px;} +.icon-stop{background-position:-312px -72px;} +.icon-forward{background-position:-336px -72px;} +.icon-fast-forward{background-position:-360px -72px;} +.icon-step-forward{background-position:-384px -72px;} +.icon-eject{background-position:-408px -72px;} +.icon-chevron-left{background-position:-432px -72px;} +.icon-chevron-right{background-position:-456px -72px;} +.icon-plus-sign{background-position:0 -96px;} +.icon-minus-sign{background-position:-24px -96px;} +.icon-remove-sign{background-position:-48px -96px;} +.icon-ok-sign{background-position:-72px -96px;} +.icon-question-sign{background-position:-96px -96px;} +.icon-info-sign{background-position:-120px -96px;} +.icon-screenshot{background-position:-144px -96px;} +.icon-remove-circle{background-position:-168px -96px;} +.icon-ok-circle{background-position:-192px -96px;} +.icon-ban-circle{background-position:-216px -96px;} +.icon-arrow-left{background-position:-240px -96px;} +.icon-arrow-right{background-position:-264px -96px;} +.icon-arrow-up{background-position:-289px -96px;} +.icon-arrow-down{background-position:-312px -96px;} +.icon-share-alt{background-position:-336px -96px;} +.icon-resize-full{background-position:-360px -96px;} +.icon-resize-small{background-position:-384px -96px;} +.icon-plus{background-position:-408px -96px;} +.icon-minus{background-position:-433px -96px;} +.icon-asterisk{background-position:-456px -96px;} +.icon-exclamation-sign{background-position:0 -120px;} +.icon-gift{background-position:-24px -120px;} +.icon-leaf{background-position:-48px -120px;} +.icon-fire{background-position:-72px -120px;} +.icon-eye-open{background-position:-96px -120px;} +.icon-eye-close{background-position:-120px -120px;} +.icon-warning-sign{background-position:-144px -120px;} +.icon-plane{background-position:-168px -120px;} +.icon-calendar{background-position:-192px -120px;} +.icon-random{background-position:-216px -120px;} +.icon-comment{background-position:-240px -120px;} +.icon-magnet{background-position:-264px -120px;} +.icon-chevron-up{background-position:-288px -120px;} +.icon-chevron-down{background-position:-313px -119px;} +.icon-retweet{background-position:-336px -120px;} +.icon-shopping-cart{background-position:-360px -120px;} +.icon-folder-close{background-position:-384px -120px;} +.icon-folder-open{background-position:-408px -120px;} +.icon-resize-vertical{background-position:-432px -119px;} +.icon-resize-horizontal{background-position:-456px -118px;} +.dropdown{position:relative;} +.dropdown-toggle{*margin-bottom:-3px;} +.dropdown-toggle:active,.open .dropdown-toggle{outline:0;} +.caret{display:inline-block;width:0;height:0;text-indent:-99999px;*text-indent:0;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000000;opacity:0.3;filter:alpha(opacity=30);content:"\2193";} +.dropdown .caret{margin-top:8px;margin-left:2px;} +.dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100);} +.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;_width:160px;padding:4px 0;margin:0;list-style:none;background-color:#ffffff;border-color:#ccc;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;}.dropdown-menu.bottom-up{top:auto;bottom:100%;margin-bottom:2px;} +.dropdown-menu .divider{height:1px;margin:5px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;} +.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#555555;white-space:nowrap;} +.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;} +.dropdown.open{*z-index:1000;}.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);} +.dropdown.open .dropdown-menu{display:block;} +.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} +.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;} +.collapse{-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;position:relative;overflow:hidden;height:0;}.collapse.in{height:auto;} +.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;opacity:0.4;filter:alpha(opacity=40);cursor:pointer;} +.btn{display:inline-block;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(top, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);cursor:pointer;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);*margin-left:.3em;}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;} +.btn:active,.btn.active{background-color:#cccccc \9;} +.btn:first-child{*margin-left:0;} +.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;} +.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +.btn.active,.btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;outline:0;} +.btn.disabled,.btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} +.btn-large [class^="icon-"]{margin-top:1px;} +.btn-small{padding:5px 9px;font-size:11px;line-height:16px;} +.btn-small [class^="icon-"]{margin-top:-1px;} +.btn-mini{padding:2px 6px;font-size:11px;line-height:14px;} +.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);color:#ffffff;} +.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-dark.active{color:rgba(255, 255, 255, 0.75);} +.btn-primary{background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-ms-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(top, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0044cc;} +.btn-primary:active,.btn-primary.active{background-color:#003399 \9;} +.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;} +.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;} +.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;} +.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;} +.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;} +.btn-success:active,.btn-success.active{background-color:#408140 \9;} +.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;} +.btn-info:active,.btn-info.active{background-color:#24748c \9;} +.btn-inverse{background-color:#393939;background-image:-moz-linear-gradient(top, #454545, #262626);background-image:-ms-linear-gradient(top, #454545, #262626);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#454545), to(#262626));background-image:-webkit-linear-gradient(top, #454545, #262626);background-image:-o-linear-gradient(top, #454545, #262626);background-image:linear-gradient(top, #454545, #262626);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#454545', endColorstr='#262626', GradientType=0);border-color:#262626 #262626 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#262626;} +.btn-inverse:active,.btn-inverse.active{background-color:#0c0c0c \9;} +button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} +button.btn.large,input[type="submit"].btn.large{*padding-top:7px;*padding-bottom:7px;} +button.btn.small,input[type="submit"].btn.small{*padding-top:3px;*padding-bottom:3px;} +.btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";} +.btn-group:after{clear:both;} +.btn-group:first-child{*margin-left:0;} +.btn-group+.btn-group{margin-left:5px;} +.btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;} +.btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} +.btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} +.btn-group .btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} +.btn-group .btn.large:last-child,.btn-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} +.btn-group .btn:hover,.btn-group .btn:focus,.btn-group .btn:active,.btn-group .btn.active{z-index:2;} +.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;} +.btn-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);*padding-top:5px;*padding-bottom:5px;} +.btn-group.open{*z-index:1000;}.btn-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} +.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);} +.btn .caret{margin-top:7px;margin-left:0;} +.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);} +.btn-primary .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);} +.btn-small .caret{margin-top:4px;} +.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.alert,.alert-heading{color:#c09853;} +.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;} +.alert-success{background-color:#dff0d8;border-color:#d6e9c6;} +.alert-success,.alert-success .alert-heading{color:#468847;} +.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;} +.alert-danger,.alert-error,.alert-danger .alert-heading,.alert-error .alert-heading{color:#b94a48;} +.alert-info{background-color:#d9edf7;border-color:#bce8f1;} +.alert-info,.alert-info .alert-heading{color:#3a87ad;} +.alert-block{padding-top:14px;padding-bottom:14px;} +.alert-block>p,.alert-block>ul{margin-bottom:0;} +.alert-block p+p{margin-top:5px;} +.nav{margin-left:0;margin-bottom:18px;list-style:none;} +.nav>li>a{display:block;} +.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;} +.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;} +.nav li+.nav-header{margin-top:9px;} +.nav-list{padding-left:14px;padding-right:14px;margin-bottom:0;} +.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} +.nav-list>li>a{padding:3px 15px;} +.nav-list .active>a,.nav-list .active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;} +.nav-list [class^="icon-"]{margin-right:2px;} +.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";} +.nav-tabs:after,.nav-pills:after{clear:both;} +.nav-tabs>li,.nav-pills>li{float:left;} +.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;} +.nav-tabs{border-bottom:1px solid #ddd;} +.nav-tabs>li{margin-bottom:-1px;} +.nav-tabs>li>a{padding-top:9px;padding-bottom:9px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;} +.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;} +.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} +.nav-pills .active>a,.nav-pills .active>a:hover{color:#ffffff;background-color:#0088cc;} +.nav-stacked>li{float:none;} +.nav-stacked>li>a{margin-right:0;} +.nav-tabs.nav-stacked{border-bottom:0;} +.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;} +.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;} +.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;} +.nav-pills.nav-stacked>li>a{margin-bottom:3px;} +.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;} +.nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px;} +.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;margin-top:6px;} +.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;} +.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;} +.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;} +.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;} +.nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#ffffff;opacity:1;filter:alpha(opacity=100);} +.tabs-stacked .open>a:hover{border-color:#999999;} +.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";} +.tabbable:after{clear:both;} +.tab-content{overflow:hidden;} +.tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0;} +.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;} +.tab-content>.active,.pill-content>.active{display:block;} +.tabs-below .nav-tabs{border-top:1px solid #ddd;} +.tabs-below .nav-tabs>li{margin-top:-1px;margin-bottom:0;} +.tabs-below .nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below .nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;} +.tabs-below .nav-tabs .active>a,.tabs-below .nav-tabs .active>a:hover{border-color:transparent #ddd #ddd #ddd;} +.tabs-left .nav-tabs>li,.tabs-right .nav-tabs>li{float:none;} +.tabs-left .nav-tabs>li>a,.tabs-right .nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;} +.tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;} +.tabs-left .nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} +.tabs-left .nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;} +.tabs-left .nav-tabs .active>a,.tabs-left .nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;} +.tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;} +.tabs-right .nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} +.tabs-right .nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;} +.tabs-right .nav-tabs .active>a,.tabs-right .nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;} +.navbar{overflow:visible;margin-bottom:18px;} +.navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);} +.btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222222;} +.btn-navbar:active,.btn-navbar.active{background-color:#080808 \9;} +.btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);} +.btn-navbar .icon-bar+.icon-bar{margin-top:3px;} +.nav-collapse.collapse{height:auto;} +.navbar .brand:hover{text-decoration:none;} +.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;} +.navbar .navbar-text{margin-bottom:0;line-height:40px;color:#999999;}.navbar .navbar-text a:hover{color:#ffffff;background-color:transparent;} +.navbar .btn,.navbar .btn-group{margin-top:5px;} +.navbar .btn-group .btn{margin-top:0;} +.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";} +.navbar-form:after{clear:both;} +.navbar-form input,.navbar-form select{display:inline-block;margin-top:5px;margin-bottom:0;} +.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;} +.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;} +.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;} +.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;color:rgba(255, 255, 255, 0.75);background:#666;background:rgba(255, 255, 255, 0.3);border:1px solid #111;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query :-moz-placeholder{color:#eeeeee;} +.navbar-search .search-query::-webkit-input-placeholder{color:#eeeeee;} +.navbar-search .search-query:hover{color:#ffffff;background-color:#999999;background-color:rgba(255, 255, 255, 0.5);} +.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;} +.navbar-fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030;} +.navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;} +.navbar .nav.pull-right{float:right;} +.navbar .nav>li{display:block;float:left;} +.navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} +.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;} +.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;} +.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;} +.navbar .nav.pull-right{margin-left:10px;margin-right:0;} +.navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;} +.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;} +.navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ffffff;} +.navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100);} +.navbar .nav .open>.dropdown-toggle,.navbar .nav .active>.dropdown-toggle,.navbar .nav .open.active>.dropdown-toggle{background-color:transparent;} +.navbar .nav .active>.dropdown-toggle:hover{color:#ffffff;} +.navbar .nav.pull-right .dropdown-menu{left:auto;right:0;}.navbar .nav.pull-right .dropdown-menu:before{left:auto;right:12px;} +.navbar .nav.pull-right .dropdown-menu:after{left:auto;right:13px;} +.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline-block;text-shadow:0 1px 0 #ffffff;} +.breadcrumb .divider{padding:0 5px;color:#999999;} +.breadcrumb .active a{color:#333333;} +.pagination{height:36px;margin:18px 0;} +.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} +.pagination li{display:inline;} +.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;} +.pagination a:hover,.pagination .active a{background-color:#f5f5f5;} +.pagination .active a{color:#999999;cursor:default;} +.pagination .disabled a,.pagination .disabled a:hover{color:#999999;background-color:transparent;cursor:default;} +.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +.pagination-centered{text-align:center;} +.pagination-right{text-align:right;} +.pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";} +.pager:after{clear:both;} +.pager li{display:inline;} +.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} +.pager a:hover{text-decoration:none;background-color:#f5f5f5;} +.pager .next a{float:right;} +.pager .previous a{float:left;} +.modal-open .dropdown-menu{z-index:2050;} +.modal-open .dropdown.open{*z-index:2050;} +.modal-open .popover{z-index:2060;} +.modal-open .tooltip{z-index:2070;} +.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;} +.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);} +.modal{position:fixed;top:50%;left:50%;z-index:1050;max-height:500px;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;} +.modal.fade.in{top:50%;} +.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;} +.modal-body{padding:15px;} +.modal-body .modal-form{margin-bottom:0;} +.modal-footer{padding:14px 15px 15px;margin-bottom:0;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";} +.modal-footer:after{clear:both;} +.modal-footer .btn{float:right;margin-left:5px;margin-bottom:0;} +.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);} +.tooltip.top{margin-top:-2px;} +.tooltip.right{margin-left:2px;} +.tooltip.bottom{margin-top:2px;} +.tooltip.left{margin-left:-2px;} +.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} +.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} +.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} +.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.tooltip-arrow{position:absolute;width:0;height:0;} +.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;}.popover.top{margin-top:-5px;} +.popover.right{margin-left:5px;} +.popover.bottom{margin-top:5px;} +.popover.left{margin-left:-5px;} +.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} +.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} +.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} +.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.popover .arrow{position:absolute;width:0;height:0;} +.popover-inner{padding:3px;width:280px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);} +.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;} +.popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;} +.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";} +.thumbnails:after{clear:both;} +.thumbnails>li{float:left;margin:0 0 18px 20px;} +.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);} +a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} +.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;} +.thumbnail .caption{padding:9px;} +.label{padding:2px 4px 3px;font-size:11.049999999999999px;font-weight:bold;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.label:hover{color:#ffffff;text-decoration:none;} +.label-important{background-color:#b94a48;} +.label-important:hover{background-color:#953b39;} +.label-warning{background-color:#f89406;} +.label-warning:hover{background-color:#c67605;} +.label-success{background-color:#468847;} +.label-success:hover{background-color:#356635;} +.label-info{background-color:#3a87ad;} +.label-info:hover{background-color:#2d6987;} +@-webkit-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.progress .bar{width:0%;height:18px;color:#ffffff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;} +.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;} +.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;} +.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);} +.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);} +.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);} +.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.accordion{margin-bottom:18px;} +.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.accordion-heading{border-bottom:0;} +.accordion-heading .accordion-toggle{display:block;padding:8px 15px;} +.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;} +.carousel{position:relative;margin-bottom:18px;line-height:1;} +.carousel-inner{overflow:hidden;width:100%;position:relative;} +.carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;} +.carousel .item>img{display:block;line-height:1;} +.carousel .active,.carousel .next,.carousel .prev{display:block;} +.carousel .active{left:0;} +.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;} +.carousel .next{left:100%;} +.carousel .prev{left:-100%;} +.carousel .next.left,.carousel .prev.right{left:0;} +.carousel .active.left{left:-100%;} +.carousel .active.right{left:100%;} +.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;} +.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);} +.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);} +.carousel-caption h4,.carousel-caption p{color:#ffffff;} +.hero-unit{padding:60px;margin-bottom:30px;background-color:#f5f5f5;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;} +.hero-unit p{font-size:18px;font-weight:200;line-height:27px;} +.pull-right{float:right;} +.pull-left{float:left;} +.hide{display:none;} +.show{display:block;} +.invisible{visibility:hidden;} diff --git a/app/assets/stylesheets/cpanel.scss b/app/assets/stylesheets/cpanel.scss new file mode 100644 index 0000000..a5f76ce --- /dev/null +++ b/app/assets/stylesheets/cpanel.scss @@ -0,0 +1,195 @@ +/* + *= require bootstrap + *= require_self + */ +body { color: #333; } + +body, p, ol, ul, td { + font-family: verdana, arial, helvetica, sans-serif; + font-size: 13px; + line-height: 18px; +} + +pre { + background-color: #eee; + padding: 10px; + font-size: 11px; +} +.group { margin-bottom:20px; } +.group h2 { font-size:12px; margin-bottom:8px; } +.group ul { margin:0 20px;} +.pagination { clear:both; margin-top:10px; text-align: left;} + +table tr.deleted td { text-decoration: line-through; color:#999} + +html { + width: 100%; + height: 100%; + background:#eee image-url('bg.png') bottom left repeat; +} +body { background:none;} + +code { background:none; } + +.breadcrumb { color:#999;} + + +.container-fluid { padding:0; } +.container-fluid > .sidebar { + position:absolute; + left:auto; + right:0; + top:0; + width: 220px; +} + +.container-fluid > .content { + margin-left:0; + margin-right: 240px; +} + +fieldset { margin-bottom:0;} +fieldset legend { font-size:16px; font-weight:bold;} +.actions { margin-bottom:0;} +.buttons { margin-top:10px; } +form { + margin-bottom:0; + + .input { + > [class*="span"] { + float: left; + display: inline; + margin-right: 10px; + + input, textarea, select, .uneditable-input { + width: 100%; + } + input[type=checkbox], + input[type=radio], + input[type=button], + input[type=reset], + input[type=submit] { + width: auto; + } + } + } +} + +.pagination { margin:0; margin-top:10px; } + +a.label:hover { text-decoration: none; color:#FFF;} + +.popover { + h3.title { + font-size:14px; padding:5px 8px; + i { float:right; font-size:12px; color:#999; font-style: normal;} + } + .content { padding:8px; font-size:12px; color:#666; } +} + +a[rel=userpopover] { + display: inline-block; +} + +.box { + background-color: #fff; + padding:10px; + margin: 0 0 20px 0; /* negative indent the amount of the padding to maintain the grid system */ + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); + box-shadow: 0 1px 2px rgba(0,0,0,.15); + h2.title { + margin:0 -10px; padding:0 10px; + font-size:14px; color:#999; line-height:100%; + border-bottom:1px solid #ddd; padding-bottom:8px; + } +} + + +.footer { + border-top:0; + min-width: 940px; + margin-bottom:30px; + margin-top:0px; + padding:0; + text-shadow: 0 1px 0 #fff; +} +.footer p { + margin:3px 0; + color: #555; +} +#main h1 { font-size:14px; line-height:26px; font-weight:bold; text-align:right; color:#333; margin-bottom:10px; } + +.topbar { position: static; margin-bottom:20px;} + +textarea.long { width:670px;} +textarea.span16 { width:910px;} +.input-xxlarge, input.xxlarge, textarea.xxlarge, select.xxlarge { width:520px;} + +div.field, div.actions { + margin-bottom: 10px; +} +div.field .hint { font-size:12px; color:#999;} + +.field_with_errors { + display:inline; + color:#b16125; +} + +.alert-message { margin-bottom:8px;} + +.secondary-nav .notifications a { + font-weight: bold; + padding: 11px 8px 10px; +} + +.secondary-nav .notifications a:hover { + background: #444; + background: rgba(255, 255, 255, 0.05); +} + +.secondary-nav .notifications a .count { + background-color: #666; + padding: 2px 6px; + border-radius: 2px; + color: #999; + -moz-border-radius: 2px; +} + +.secondary-nav .notifications.unread a .count { + background-color: #C43C35; + color: white; +} + +.icon { display:inline-block;} + + +.simple_form { + label.required { + abbr { color:#c00;} + } +} + +/* bootstrap puts .clearfix inside form, doesn't make much sense */ +.clearfix { + margin-bottom: 18px; + zoom: 1; + &:before, &:after { + display: table; + content: ""; + zoom: 1; + } + &:after { + clear: both; + } +} + +#error_page { + padding:60px; + h1 { font-size:600%; color:#aaa; margin-bottom:100px;} + p { font-size:16px; } +} + diff --git a/app/assets/stylesheets/cpanel/categories.css.scss b/app/assets/stylesheets/cpanel/categories.css.scss new file mode 100644 index 0000000..cc04488 --- /dev/null +++ b/app/assets/stylesheets/cpanel/categories.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the cpanel::categories controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/cpanel/site_configs.css.scss b/app/assets/stylesheets/cpanel/site_configs.css.scss new file mode 100644 index 0000000..3e034dd --- /dev/null +++ b/app/assets/stylesheets/cpanel/site_configs.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the cpanel::site_configs controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/cpanel/sites.css.scss b/app/assets/stylesheets/cpanel/sites.css.scss new file mode 100644 index 0000000..e4cc794 --- /dev/null +++ b/app/assets/stylesheets/cpanel/sites.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the cpanel::sites controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/index.css.scss b/app/assets/stylesheets/index.css.scss new file mode 100644 index 0000000..e69de29 diff --git a/app/assets/stylesheets/pages.css.scss b/app/assets/stylesheets/pages.css.scss new file mode 100644 index 0000000..0d6878a --- /dev/null +++ b/app/assets/stylesheets/pages.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the pages controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/posts.css.scss b/app/assets/stylesheets/posts.css.scss new file mode 100644 index 0000000..1a7e153 --- /dev/null +++ b/app/assets/stylesheets/posts.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the posts controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/search.css.scss b/app/assets/stylesheets/search.css.scss new file mode 100644 index 0000000..22fd394 --- /dev/null +++ b/app/assets/stylesheets/search.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the search controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/style.css b/app/assets/stylesheets/style.css new file mode 100644 index 0000000..ffbc101 --- /dev/null +++ b/app/assets/stylesheets/style.css @@ -0,0 +1,217 @@ +/* Begin Typography & Colors */ +* { margin: 0; padding: 0; } +html { margin-top: 18px !important; } +* html body { margin-top: 18px !important; } + +body { background: #c6e5f2 url(/images/body-bkg.png) no-repeat center top; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; padding: 0px; margin-top: 0px; color:#35383d;} +input, button, textarea, select { font: normal 12px/12px "Verdana", sans-serif; color:#2d3538; vertical-align: middle; } +legend { display: none; } +fieldset { border: none; } +ul, ol { list-style: none; } +ol { list-style-type: decimal;} +table { border-collapse: collapse; width: 100%; } +hr { display: none; } +img { padding: 0px; margin: 0px; border: none; text-align: center;} + +a:link { text-decoration: none; color : #0099cc; border: 0px; -moz-outline-style: none;} +a:active { text-decoration: underline; color : #0099cc; border: 0px; -moz-outline-style: none;} +a:visited { text-decoration: none; color : #0099cc; border: 0px; -moz-outline-style: none;} +a:hover { text-decoration: underline; color : #025d87; border: 0px; -moz-outline-style: none;} +a:focus { outline: none;-moz-outline-style: none;} + +h1, h2, h3, h4 { font-family: Arial, Helvetica, sans-serif; } + + + +/* BG +############################################################################################################## */ +#bg { width: 980px; margin: 0 auto; margin-top: 30px;} +#bg-all { width: 980px; background: #fff; overflow: hidden;} +/**/ * html #bg-all { height: 1%;} /* */ + + +/* Container +############################################################################################################## */ + + + + +/* Logo + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ +/*.logo { overflow: hidden; border-bottom: solid 0px #e6f1f3; margin-bottom: 0px;}*/ +.logo { overflow: hidden; border-bottom: solid 4px #e6f1f3; margin-bottom: 20px;} + +/**/ * html .logo { height: 1%;} /* */ + +.logo .txt { width: 520px; padding-left: 70px; background: url(images/logo-symbol.png) no-repeat left 10px; padding-bottom: 10px; } +.logo .txt h1 { font: bold 30px/25px "Arial"; letter-spacing: -1px; text-transform: lowercase; padding-bottom: 10px;} +.logo .txt h1 a, .logo .txt h1 a:visited, .logo .txt h1 a:hover { text-decoration: none; color:#272d36;} +.logo .txt p.desc { font: 14px/14px "Arial"; letter-spacing: 0px; display: block; color:#2abada;} + +.logo .img { padding-bottom: 15px; } + + +.navbar { + margin-bottom: 0; +} +.footer { + margin-top: 20px; +} +.footer p { + text-align: center; /* center align it with the container */ +} + +/* The white background content wrapper */ +.content { + background-color: #fff; + padding: 20px; + margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */ + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); + box-shadow: 0 1px 2px rgba(0,0,0,.15); +} + + + +/* Page header tweaks */ +.page-header { + background-color: #fff; + padding: 20px 20px 0px; + margin: 0px -20px ; +} + +.topbar .btn { + border: 0; +} + + +/* tag_box ======================================================== */ + +.tag_box { + list-style:none; + margin:0; + padding:5px 0 ; + overflow:hidden; +} +.tag_box li { + line-height:28px; +} +.tag_box.inline li { + float:left; +} +.tag_box a { + padding: 3px 6px; + margin: 2px; + background: #eee; + color:#005F6B; + border-radius: 3px; + text-decoration:none; +} +.tag_box a span{ + vertical-align:super; + font-size:0.8em; +} +.tag_box a.active { + background:#57A957; + border:1px solid #4C964D; + color:#FFF; +} + + + + +.SL { width: 520px; float: left; padding-left: 60px;} + +.menu { overflow: hidden; float: left; width: 100%; background:#def1f9; width: 980px; margin: 0 auto; padding: 10px 0px 0px 100px;} +/**/ * html .menu { height: 1%;} /* */ +.menu ul { float:left; } +.menu li { display: inline; font: bold 14px/14px "Arial"; letter-spacing: -1px; float: left; height: 28px; } +.menu li ul li { font-weight: normal; letter-spacing: normal;} +.menu li a, .menu li a:visited { color:#272d36; float: left; padding: 8px 6px 8px 6px; margin-right: 5px;} +.menu li a:hover { background: #fff; color:#0099cc; text-decoration: none;} +.menu .current_page_item a, .menu .current_page_item a:visited, .menu .current_page_item a:hover { background: #272d36 url(images/menu-on-bkg.png) repeat-x bottom; color:#fff; } + +.menu .current_page_item .page_item a, .menu .current_page_item .page_item a:visited { background: #def1f9; color:#272d36;} +.menu .current_page_item .page_item a:hover { background: #fff; color:#0099cc; } + + +/* Side Right +############################################################################################################## */ +.SR { width: 300px; margin-right: 30px; padding-bottom: 30px; float: right;} + +/* Search + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ +.SR .search { background: #3d96d5 url(images/search-bkg.png) no-repeat left bottom; right: 0px; padding: 15px; overflow: hidden;} +/**/ *html .SR .search { height: 1%;} /**/ +.SR .search form { width: 245px; padding: 10px; border: 1px solid #3ac6e5; background: #2abada; } +.SR .search fieldset { overflow: hidden; height: 1%; } +/*.SR .search input { float: left; margin-right: 2px; background: url(images/search-input.png) no-repeat; border: none; padding: 5px 3px 5px 65px; width: 145px; color:#666;} +.SR .search button { float: left; background: url(images/search-button.png) no-repeat; width: 26px; height: 24px; border: none; cursor: pointer; text-indent: -1000em; } +*/ +.SR .syn ul { margin: 10px 0px;} +.SR .syn li { background: url(images/SynIco.png) no-repeat left center; margin: 0px 5px 0px 0px; padding: 3px 0px 3px 15px; list-style-type: none; color:#ffcc66; display: inline; font: bold 14px/14px 'Arial'; letter-spacing: -1px;} +.SR .syn li a {color:#fff; } +.SR .syn li a:visited {color:#fff; } +.SR .syn li a:hover {color:#fff; } + + +/* About Blog + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ +.SR .about { background: #57abe6 url(images/about-bkg.png) no-repeat left top; padding: 20px 15px 15px 15px; color:#fff;} +.SR .about h3 { font-size: 24px; letter-spacing: -1px; color:#fff;} +.SR .about p { padding: 5px 0px; margin: 0px; font-size: 12px; line-height: 19px;} + + +/* widget + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ +.SR .widget { background: #e1f3ee; padding: 15px; margin-bottom: 3px; color:#5e8a89;} +.SR .widget ul { padding-left: 0px; margin-left:0px} + +.SR .widget h3 {font: bold 15px/15px 'Arial'; letter-spacing: -1px; color:#102a30; padding-bottom: 5px; border-bottom: solid 1px #c5ded7; margin-bottom: 5px;} +.SR .widget li { background: url(images/tabs-arrow.png) no-repeat left 6px; padding: 2px 0px 2px 6px; font-size: 11px; color:#5e8a89;} +.SR .widget a, .SR .widget a:visited { color:#247682; text-decoration: underline;} +.SR .widget a:hover { color:#003333; text-decoration: underline;} + + + +/* Post Single +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ +.post, .attachment { width: 100%; position: relative;} +/**/ * html .post, .attachment { width: 99%;} /**/ + + +.p-head { padding-bottom: 2px;} +.p-head h1, .p-head h1, .p-head h1 a, .p-head h1 a:visited { color:#272d36; font: normal 19px/24px "Helvetica"; letter-spacing: -1px; } +.p-head h1 a:hover { color:#0099cc; text-decoration: none; } + +.p-head h2 { color:#272d36; font: normal 24px/24px "Helvetica"; letter-spacing: -1px; } +.p-head h2 a, .p-head h2 a:visited { color:#272d36; } +.p-head h2 a:hover { color:#0099cc; text-decoration: none; } + +.p-head h3 { color:#272d36; font: normal 20px/20px "Arial"; letter-spacing: -1px; } +.p-head h3 a, .p-head h3 a:visited { color:#272d36;} +.p-head h3 a:hover { color:#0099cc; text-decoration: none;} + +.p-cat { font: normal 11px/14px 'Arial'; text-transform: uppercase; color:#999;} +.p-cat a, .p-cat a:visited, .p-cat a:hover { text-decoration: underline; color:#999; padding-right: 5px;} + +.p-time { background: url(images/p-time-bkg.png) no-repeat right bottom; position: absolute; left: -70px; top: 5px; width: 50px; padding-bottom: 10px; } +/**/ * html .p-time { left: -70px;} /**/ +.p-time strong { float: left; text-align: center;} +.p-time .day { font: normal 20px/18px "Arial"; letter-spacing: -1px; color:#fff; width: 40px; padding: 7px 0px; background:#2abada; overflow: hidden; } +.p-time .month { background:#dedede; width: 40px; padding: 3px 0px; margin-bottom: 10px;} +.p-time .year { background: #fff; border: solid 1px #dedede; font: normal 11px/11px 'Verdana'; padding: 12px 5px; color:#bababa;} + +.p-con { border-top: solid 1px #dbdbdb;} +.p-con p { font: normal 12px/19px "Verdana"; padding: 5px 0px; margin: 5px 0px; line-height: 22px;} +.p-con ol { list-style: decimal inside; } +.p-con ol { padding: 10px 0px 10px 25px; margin: 0px; } +.p-con ol li { padding: 2px 0px 2px 0px; } +.p-con ul { padding: 10px 0px 10px 20px; margin: 0px; } +.p-con ul li { padding: 2px 0px 2px 13px; list-style-type: none; background: url("images/p-con-li.png") no-repeat left 1px; color:#666; } +.p-con blockquote { font: italic 14px/19px Georgia, "Times New Roman", Times, serif; padding: 10px 20px; margin: 10px 0px; background: #ecf6f8; } +.p-con blockquote p { font: italic 14px/19px Georgia, "Times New Roman", Times, serif; } +.p-con blockquote li { padding: 2px 0px 2px 13px; list-style-type: none; font-size: 12px; line-height: 17px;} \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb new file mode 100644 index 0000000..6c4a7c8 --- /dev/null +++ b/app/controllers/application_controller.rb @@ -0,0 +1,29 @@ +class ApplicationController < ActionController::Base + protect_from_forgery + + before_filter :init_aside + + def render_404 + render_optional_error_file(404) + end + + def render_403 + render_optional_error_file(403) + end + + def render_optional_error_file(status_code) + status = status_code.to_s + if ["404","403", "422", "500"].include?(status) + render :template => "/errors/#{status}", :format => [:html], :handler => [:erb], :status => status, :layout => "application" + else + render :template => "/errors/unknown", :format => [:html], :handler => [:erb], :status => status, :layout => "application" + end + end + + def init_aside + @aside_sites = Site.limit(15) + @aside_categories = Category.limit(15) + @aside_posts = Post.last_actived.limit(15) + end + +end diff --git a/app/controllers/cpanel/application_controller.rb b/app/controllers/cpanel/application_controller.rb new file mode 100644 index 0000000..00491c1 --- /dev/null +++ b/app/controllers/cpanel/application_controller.rb @@ -0,0 +1,21 @@ + + +# coding: utf-8 +class Cpanel::ApplicationController < ApplicationController + layout "cpanel" + # before_filter :require_admin + before_filter :require_admin + + protected + + def require_admin + authenticate_or_request_with_http_basic do |username, password| + logger.info("SiteConfig.site_author_username.to_s:#{username == SiteConfig.site_author_username.to_s}") + logger.info("SiteConfig.site_author_password.to_s:#{password == SiteConfig.site_author_password.to_s}") + username == SiteConfig.site_author_username.to_s && password == SiteConfig.site_author_password.to_s + end + end + + + +end \ No newline at end of file diff --git a/app/controllers/cpanel/categories_controller.rb b/app/controllers/cpanel/categories_controller.rb new file mode 100644 index 0000000..bcdc5bf --- /dev/null +++ b/app/controllers/cpanel/categories_controller.rb @@ -0,0 +1,50 @@ +class Cpanel::CategoriesController < Cpanel::ApplicationController + + def index + @categories = Category.all + + end + + def show + @category = Category.find(params[:id]) + + end + + def new + @category = Category.new + end + + def edit + @category = Category.find(params[:id]) + end + + def create + @category = Category.new(params[:category]) + + if @category.save + redirect_to(cpanel_categories_path, :notice => 'category was successfully created.') + else + render :action => "new" + end + end + + def update + @category = Category.find(params[:id]) + + if @category.update_attributes(params[:category]) + redirect_to(cpanel_categories_path, :notice => 'category was successfully updated.') + else + render :action => "edit" + end + end + + def destroy + @category = Category.find(params[:id]) + @category.destroy + + redirect_to(cpanel_categories_path) + end + + + +end diff --git a/app/controllers/cpanel/home_controller.rb b/app/controllers/cpanel/home_controller.rb new file mode 100644 index 0000000..97ce8a0 --- /dev/null +++ b/app/controllers/cpanel/home_controller.rb @@ -0,0 +1,6 @@ +class Cpanel::HomeController < Cpanel::ApplicationController + + def index + @recent_posts = Post.recent.limit(5) + end +end diff --git a/app/controllers/cpanel/pages_controller.rb b/app/controllers/cpanel/pages_controller.rb new file mode 100644 index 0000000..328ce5e --- /dev/null +++ b/app/controllers/cpanel/pages_controller.rb @@ -0,0 +1,49 @@ +class Cpanel::PagesController < Cpanel::ApplicationController + + def index + @pages = Page.unscoped.desc(:_id).paginate :page => params[:page], :per_page => 30 + end + + def show + @page = Page.unscoped.find(params[:id]) + end + + def new + @page = Page.new + end + + def edit + @page = Page.unscoped.find(params[:id]) + end + + def create + @page = Page.new(params[:page]) + + if @page.save + redirect_to(cpanel_pages_path, :notice => 'Page was successfully created.') + else + render :action => "new" + end + end + + def update + @page = Page.unscoped.find(params[:id]) + @page.title = params[:page][:title] + @page.body = params[:page][:body] + @page.slug = params[:page][:slug] + + if @page.save + redirect_to(cpanel_pages_path, :notice => 'Page was successfully updated.') + else + render :action => "edit" + end + end + + def destroy + @page = Page.unscoped.find(params[:id]) + @page.destroy + + redirect_to(cpanel_pages_path) + end + +end diff --git a/app/controllers/cpanel/posts_controller.rb b/app/controllers/cpanel/posts_controller.rb new file mode 100644 index 0000000..e061e3d --- /dev/null +++ b/app/controllers/cpanel/posts_controller.rb @@ -0,0 +1,55 @@ +# coding: utf-8 +class Cpanel::PostsController < Cpanel::ApplicationController + + def index + @posts = Post.unscoped.desc(:_id).includes(:user).paginate :page => params[:page], :per_page => 30 + end + + def show + @post = Post.unscoped.find(params[:id]) + + + end + + + def new + @post = Post.new + end + + def edit + @post = Post.unscoped.find(params[:id]) + @post.tag_list = @post.tags.join(", ") + + end + + def create + @post = Post.new(params[:post]) + if @post.save + redirect_to(cpanel_posts_path, :notice => 'Post was successfully created.') + else + render :action => "new" + end + end + + def update + @post = Post.unscoped.find(params[:id]) + @post.title = params[:post][:title] + @post.body = params[:post][:body] + @post.tag_list = params[:post][:tag_list] + @post.category_id = params[:post][:category_id] + @post.state = params[:post][:state] + + if @post.update_attributes(params[:post]) + redirect_to(cpanel_posts_path, :notice => 'Post was successfully updated.') + else + render :action => "edit" + end + end + + def destroy + @post = Post.unscoped.find(params[:id]) + @post.destroy + + redirect_to(cpanel_posts_path) + end +end diff --git a/app/controllers/cpanel/site_configs_controller.rb b/app/controllers/cpanel/site_configs_controller.rb new file mode 100644 index 0000000..552c6bb --- /dev/null +++ b/app/controllers/cpanel/site_configs_controller.rb @@ -0,0 +1,22 @@ +# coding: utf-8 +class Cpanel::SiteConfigsController < Cpanel::ApplicationController + + def index + @site_configs = SiteConfig.desc(:_id) + end + + def edit + @site_config = SiteConfig.find(params[:id]) + end + + def update + @site_config = SiteConfig.find(params[:id]) + + if @site_config.update_attributes(params[:site_config]) + redirect_to edit_cpanel_site_config_path(params[:id]), notice: "保存成功." + else + render action: "edit" + end + end + +end diff --git a/app/controllers/cpanel/sites_controller.rb b/app/controllers/cpanel/sites_controller.rb new file mode 100644 index 0000000..a29f2da --- /dev/null +++ b/app/controllers/cpanel/sites_controller.rb @@ -0,0 +1,73 @@ +# coding: UTF-8 +class Cpanel::SitesController < Cpanel::ApplicationController + + def index + @sites = Site.unscoped.recent.paginate(:page => params[:page], :per_page => 20) + + respond_to do |format| + format.html # index.html.erb + format.json + end + end + + def show + @site = Site.unscoped.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json + end + end + + def new + @site = Site.new + + respond_to do |format| + format.html # new.html.erb + format.json + end + end + + def edit + @site = Site.unscoped.find(params[:id]) + end + + def create + @site = Site.new(params[:site]) + + respond_to do |format| + if @site.save + format.html { redirect_to(cpanel_sites_path, :notice => 'Site 创建成功。') } + format.json + else + format.html { render :action => "new" } + format.json + end + end + end + + def update + @site = Site.unscoped.find(params[:id]) + + respond_to do |format| + if @site.update_attributes(params[:site]) + format.html { redirect_to(cpanel_sites_path, :notice => 'Site 更新成功。') } + format.json + else + format.html { render :action => "edit" } + format.json + end + end + end + + def destroy + @site = Site.unscoped.find(params[:id]) + @site.destroy + + respond_to do |format| + format.html { redirect_to(cpanel_sites_path,:notice => "删除成功。") } + format.json + end + end +end + diff --git a/app/controllers/index_controller.rb b/app/controllers/index_controller.rb new file mode 100644 index 0000000..abab666 --- /dev/null +++ b/app/controllers/index_controller.rb @@ -0,0 +1,8 @@ +class IndexController < ApplicationController + #index + def index + @posts = Post.last_actived.limit(15) + + + end +end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb new file mode 100644 index 0000000..25d78c4 --- /dev/null +++ b/app/controllers/pages_controller.rb @@ -0,0 +1,8 @@ +class PagesController < ApplicationController + + def show + @page = Page.find_by_slug(params[:id]) + render_404 if @page.nil? + end + +end diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb new file mode 100644 index 0000000..8ef5a2e --- /dev/null +++ b/app/controllers/posts_controller.rb @@ -0,0 +1,25 @@ +class PostsController < ApplicationController + + + def index + scoped_posts = Post.normal + if !params[:tag].blank? + scoped_posts = scoped_posts.by_tag(params[:tag]) + end + @posts = scoped_posts.recent.paginate :page => params[:page], :per_page => 20 + end + + def show + @post = Post.find(params[:id]) + # @post.hits.incr + end + + def category + @category = Category.find(params[:id]) + @posts = @category.posts.last_actived.paginate(:page => params[:page],:per_page => 50) + render :action => "index" #, :stream => true + end + + + +end diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb new file mode 100644 index 0000000..b69386a --- /dev/null +++ b/app/controllers/search_controller.rb @@ -0,0 +1,4 @@ +class SearchController < ApplicationController + def index + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb new file mode 100644 index 0000000..cd60380 --- /dev/null +++ b/app/helpers/application_helper.rb @@ -0,0 +1,16 @@ +module ApplicationHelper + + + def notice_message + flash_messages = [] + + flash.each do |type, message| + type = :success if type == :notice + text = content_tag(:div, link_to("x", "#", :class => "close") + message, :class => "alert-message #{type}") + flash_messages << text if message + end + + flash_messages.join("\n").html_safe + end + +end diff --git a/app/helpers/cpanel/application_helper.rb b/app/helpers/cpanel/application_helper.rb new file mode 100644 index 0000000..7c3eb85 --- /dev/null +++ b/app/helpers/cpanel/application_helper.rb @@ -0,0 +1,2 @@ +module Cpanel::ApplicationHelper +end diff --git a/app/helpers/cpanel/categories_helper.rb b/app/helpers/cpanel/categories_helper.rb new file mode 100644 index 0000000..c4a8f08 --- /dev/null +++ b/app/helpers/cpanel/categories_helper.rb @@ -0,0 +1,2 @@ +module Cpanel::CategoriesHelper +end diff --git a/app/helpers/cpanel/home_helper.rb b/app/helpers/cpanel/home_helper.rb new file mode 100644 index 0000000..f466a5d --- /dev/null +++ b/app/helpers/cpanel/home_helper.rb @@ -0,0 +1,2 @@ +module Cpanel::HomeHelper +end diff --git a/app/helpers/cpanel/pages_helper.rb b/app/helpers/cpanel/pages_helper.rb new file mode 100644 index 0000000..8a88329 --- /dev/null +++ b/app/helpers/cpanel/pages_helper.rb @@ -0,0 +1,2 @@ +module Cpanel::PagesHelper +end diff --git a/app/helpers/cpanel/posts_helper.rb b/app/helpers/cpanel/posts_helper.rb new file mode 100644 index 0000000..3b51dbb --- /dev/null +++ b/app/helpers/cpanel/posts_helper.rb @@ -0,0 +1,2 @@ +module Cpanel::PostsHelper +end diff --git a/app/helpers/cpanel/site_configs_helper.rb b/app/helpers/cpanel/site_configs_helper.rb new file mode 100644 index 0000000..d1e9092 --- /dev/null +++ b/app/helpers/cpanel/site_configs_helper.rb @@ -0,0 +1,2 @@ +module Cpanel::SiteConfigsHelper +end diff --git a/app/helpers/cpanel/sites_helper.rb b/app/helpers/cpanel/sites_helper.rb new file mode 100644 index 0000000..966bbb5 --- /dev/null +++ b/app/helpers/cpanel/sites_helper.rb @@ -0,0 +1,2 @@ +module Cpanel::SitesHelper +end diff --git a/app/helpers/index_helper.rb b/app/helpers/index_helper.rb new file mode 100644 index 0000000..cdc64c7 --- /dev/null +++ b/app/helpers/index_helper.rb @@ -0,0 +1,2 @@ +module IndexHelper +end diff --git a/app/helpers/pages_helper.rb b/app/helpers/pages_helper.rb new file mode 100644 index 0000000..2c057fd --- /dev/null +++ b/app/helpers/pages_helper.rb @@ -0,0 +1,2 @@ +module PagesHelper +end diff --git a/app/helpers/posts_helper.rb b/app/helpers/posts_helper.rb new file mode 100644 index 0000000..9feb4bc --- /dev/null +++ b/app/helpers/posts_helper.rb @@ -0,0 +1,26 @@ +# coding: utf-8 +module PostsHelper + + def post_title_tag(post, opts = {}) + return "" if post.blank? + link_to(post.title, post_path(post), :title => post.title) + end + + def post_tags_tag(post, opts = {}) + return "" if post.blank? or post.tags.blank? + limit = 5 + tags = post.tags + tags = tags[0..limit-1] if tags.count > limit + raw tags.collect { |tag| link_to(tag,posts_path(:tag => tag)) }.join(", ") + end + + + def render_post_state_s(post) + case post.state + when 0 then content_tag(:span, "草稿", :class => "label important") + else + content_tag(:span, "已审核", :class => "label success") + end + end + +end diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb new file mode 100644 index 0000000..b3ce20a --- /dev/null +++ b/app/helpers/search_helper.rb @@ -0,0 +1,2 @@ +module SearchHelper +end diff --git a/app/mailers/.gitkeep b/app/mailers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app/models/.gitkeep b/app/models/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app/models/category.rb b/app/models/category.rb new file mode 100644 index 0000000..0ddbb35 --- /dev/null +++ b/app/models/category.rb @@ -0,0 +1,21 @@ +# coding: utf-8 +class Category + include Mongoid::Document + include Mongoid::Timestamps + include Mongoid::BaseModel + + #field + field :name + field :summary + field :sort, :type => Integer, :default => 0 + field :posts_count, :type => Integer, :default => 0 + + has_many :posts + + validates_presence_of :name + validates_uniqueness_of :name + + scope :hots, desc(:posts_count) + scope :sorted, desc(:sort) + +end diff --git a/app/models/mongoid/base_model.rb b/app/models/mongoid/base_model.rb new file mode 100644 index 0000000..28e6940 --- /dev/null +++ b/app/models/mongoid/base_model.rb @@ -0,0 +1,37 @@ +# coding: utf-8 +# 基本 Model,加入一些通用功能 +module Mongoid + module BaseModel + extend ActiveSupport::Concern + + included do + scope :recent, desc(:_id) + scope :exclude_ids, Proc.new { |ids| where(:_id.nin => ids.map(&:to_i)) } + end + + module ClassMethods + # like ActiveRecord find_by_id + def find_by_id(id) + if id.is_a?(Integer) or id.is_a?(String) + where(:_id => id.to_i).first + else + nil + end + end + + def find_in_batches(opts = {}) + batch_size = opts[:batch_size] || 1000 + start = opts.delete(:start).to_i || 0 + objects = self.limit(batch_size).skip(start) + t = Time.new + while objects.any? + yield objects + start += batch_size + # Rails.logger.debug("processed #{start} records in #{Time.new - t} seconds") if Rails.logger.debug? + break if objects.size < batch_size + objects = self.limit(batch_size).skip(start) + end + end + end + end +end diff --git a/app/models/mongoid/counter_cache.rb b/app/models/mongoid/counter_cache.rb new file mode 100644 index 0000000..bd2e1c3 --- /dev/null +++ b/app/models/mongoid/counter_cache.rb @@ -0,0 +1,44 @@ +# coding: utf-8 +# +# https://gist.github.com/1033906 +# +# class Forum +# references_many :topics +# references_many :posts +# end +# +# +# class Topic +# referenced_in :forum +# include Mongoid::CounterCache +# counter_cache name: :forum, inverse_of: :posts +# end +# =================================== +module Mongoid + module CounterCache + extend ActiveSupport::Concern + + module ClassMethods + def counter_cache(metadata) + counter_name = "#{metadata[:inverse_of]}_count" + + set_callback(:create, :after) do |document| + relation = document.send(metadata[:name]) + if relation + relation.inc(counter_name.to_sym, 1) if relation.class.fields.keys.include?(counter_name) + end + end + + set_callback(:destroy, :after) do |document| + relation = document.send(metadata[:name]) + if relation && relation.class.fields.keys.include?(counter_name) + relation.inc(counter_name.to_sym, -1) + end + end + + end + + end #ClassMethods + + end #CounterCache +end #Mongoid diff --git a/app/models/mongoid/markdown_body.rb b/app/models/mongoid/markdown_body.rb new file mode 100644 index 0000000..a2be2a6 --- /dev/null +++ b/app/models/mongoid/markdown_body.rb @@ -0,0 +1,16 @@ +# coding: utf-8 +module Mongoid + module MarkdownBody + extend ActiveSupport::Concern + + included do + before_save :markdown_body + scope :without_body, without(:body) + end + + private + def markdown_body + self.body_html = MarkdownTopicConverter.format(self.body) if self.body_changed? + end + end +end \ No newline at end of file diff --git a/app/models/mongoid/soft_delete.rb b/app/models/mongoid/soft_delete.rb new file mode 100644 index 0000000..8fe1665 --- /dev/null +++ b/app/models/mongoid/soft_delete.rb @@ -0,0 +1,23 @@ +# coding: utf-8 +# 软删除 +module Mongoid + module SoftDelete + extend ActiveSupport::Concern + + included do + field :deleted_at, :type => DateTime + + default_scope where(:deleted_at => nil) + alias_method :destroy!, :destroy + end + + def destroy + if persisted? + self.update_attribute(:deleted_at,Time.now.utc) + end + + @destroyed = true + freeze + end + end +end diff --git a/app/models/page.rb b/app/models/page.rb new file mode 100644 index 0000000..8ab1b89 --- /dev/null +++ b/app/models/page.rb @@ -0,0 +1,41 @@ +# coding: utf-8 +# 单页的文档页面 +# 采用 Markdown 编写 +require "redcarpet" +class Page + include Mongoid::Document + include Mongoid::Timestamps + include Mongoid::BaseModel + include Mongoid::SoftDelete + + # 页面地址 + field :slug + field :title + # 原始 Markdown 内容 + field :body + # Markdown 格式化后的 html + field :body_html + + + attr_accessible :title, :body, :slug + + index :slug + + #validates + validates_format_of :slug, :with => /^[a-z0-9\-_]+$/ + validates_uniqueness_of :slug + + before_save :markdown_for_body_html + def markdown_for_body_html + return true if not self.body_changed? + + self.body_html = MarkdownConverter.convert(self.body) + rescue => e + Rails.logger.error("markdown_for_body_html failed: #{e}") + end + + def self.find_by_slug(slug) + where(:slug => slug).first + end + +end diff --git a/app/models/post.rb b/app/models/post.rb new file mode 100644 index 0000000..b537f0a --- /dev/null +++ b/app/models/post.rb @@ -0,0 +1,63 @@ +# coding: utf-8 +class Post + include Mongoid::Document + include Mongoid::Timestamps + include Mongoid::SoftDelete + include Mongoid::CounterCache + include Mongoid::BaseModel + + STATE = { + :draft => 0, + :normal => 1 + } + + field :title + field :body + field :body_html + field :state, :type => Integer, :default => STATE[:normal] + field :tags, :type => Array, :default => [] + field :comments_count, :type => Integer, :default => 0 + + belongs_to :category + counter_cache :name => :category, :inverse_of => :posts + + #index + index :tags + index :category_id + index :state + + # counter :hits, :default => 0 + + attr_accessible :title, :body, :tag_list,:category_id + attr_accessor :tag_list + + validates_presence_of :title, :body, :tag_list,:category_id + + # scopes + scope :normal, where(:state => STATE[:normal]) + scope :by_tag, Proc.new { |t| where(:tags => t) } + scope :last_actived, desc("updated_at").desc("created_at") + scope :fields_for_list, without(:body,:body_html) + + before_save :split_tags + def split_tags + if !self.tag_list.blank? and self.tags.blank? + self.tags = self.tag_list.split(/,|,/).collect { |tag| tag.strip }.uniq + end + end + + before_save :markdown_for_body_html + def markdown_for_body_html + return true if not self.body_changed? + + self.body_html = MarkdownConverter.convert(self.body) + rescue => e + Rails.logger.error("markdown_for_body_html failed: #{e}") + end + + # 给下拉框用 + def self.state_collection + STATE.collect { |s| [s[0], s[1]]} + end + +end diff --git a/app/models/setting.rb b/app/models/setting.rb new file mode 100644 index 0000000..7cf12b7 --- /dev/null +++ b/app/models/setting.rb @@ -0,0 +1,5 @@ +# coding: utf-8 +class Setting < Settingslogic + source "#{Rails.root}/config/config.yml" + namespace Rails.env +end \ No newline at end of file diff --git a/app/models/site.rb b/app/models/site.rb new file mode 100644 index 0000000..a68e601 --- /dev/null +++ b/app/models/site.rb @@ -0,0 +1,46 @@ +# coding: utf-8 +class Site + include Mongoid::Document + include Mongoid::BaseModel + include Mongoid::Timestamps + include Mongoid::SoftDelete + include Mongoid::CounterCache + + field :name + field :url + field :desc + field :favicon + + validates_presence_of :url, :name + + index :url + + before_validation :fix_urls, :check_uniq + def fix_urls + if self.favicon.blank? + self.favicon = self.favicon_url + else + if self.favicon.match(/:\/\//).blank? + self.favicon = "http://#{self.favicon}" + end + end + + if !self.url.blank? + url = self.url.gsub(/http[s]{0,1}:\/\//,'').split('/').join("/") + self.url = "http://#{url}" + end + end + + def check_uniq + if Site.unscoped.or(:url => url).count > 0 + self.errors.add(:url,"已经提交过了。") + return false + end + end + + def favicon_url + return "" if self.url.blank? + domain = self.url.gsub("http://","") + "http://www.google.com/profiles/c/favicons?domain=#{domain}" + end +end diff --git a/app/models/site_config.rb b/app/models/site_config.rb new file mode 100644 index 0000000..75c808a --- /dev/null +++ b/app/models/site_config.rb @@ -0,0 +1,54 @@ +# coding: utf-8 +# 在数据库中的配置信息 +# 这里有存放首页,Wiki 等页面 HTML +# 使用方法 +# SiteConfig.foo +# SiteConfig.foo = "asdkglaksdg" +class SiteConfig + include Mongoid::Document + + field :key + field :value + + index :key + + validates_presence_of :key + validates_uniqueness_of :key + + def self.method_missing(method, *args) + method_name = method.to_s + super(method, *args) + rescue NoMethodError + if method_name =~ /=$/ + var_name = method_name.gsub('=', '') + value = args.first.to_s + # save + if item = find_by_key(var_name) + item.update_attribute(:value, value) + else + SiteConfig.create(:key => var_name, :value => value) + end + else + Rails.cache.fetch("site_config:#{method}") do + if item = find_by_key(method) + item.value + else + nil + end + end + end + end + + after_save :update_cache + def update_cache + Rails.cache.write("site_config:#{self.key}", self.value) + end + + def self.find_by_key(key) + where(:key => key.to_s).first + end + + def self.save_default(key, value) + create(:key => key, :value => value.to_s) unless find_by_key(key) + end +end diff --git a/app/views/cpanel/categories/_form.html.erb b/app/views/cpanel/categories/_form.html.erb new file mode 100644 index 0000000..125acb4 --- /dev/null +++ b/app/views/cpanel/categories/_form.html.erb @@ -0,0 +1,31 @@ +<%= form_for([:cpanel,@category]) do |f| %> +
+ + <%= render 'shared/error_messages', :target => @category %> + +
+ <%= f.label :name %> +
+ <%= f.text_field :name %> +
+
+ +
+ <%= f.label :summary %> +
+ <%= f.text_field :summary %> +
+
+ +
+ <%= f.label :sort %> +
+ <%= f.text_field :sort %> +
+
+
+ <%= f.submit t("common.save"), :class => "btn primary", :disable_with => t("common.saving") %> + <%= link_to 'Back', cpanel_categories_path %> +
+
+<% end %> \ No newline at end of file diff --git a/app/views/cpanel/categories/edit.html.erb b/app/views/cpanel/categories/edit.html.erb new file mode 100644 index 0000000..a392f26 --- /dev/null +++ b/app/views/cpanel/categories/edit.html.erb @@ -0,0 +1,8 @@ +<% content_for :sitemap do %> + <%= t("cpanel.categories") %> > <%= t("common.edit") %> +<% end %> +

Editing categorie

+ +<%= render 'form' %> + + diff --git a/app/views/cpanel/categories/index.html.erb b/app/views/cpanel/categories/index.html.erb new file mode 100644 index 0000000..1119fbf --- /dev/null +++ b/app/views/cpanel/categories/index.html.erb @@ -0,0 +1,28 @@ +<% content_for :sitemap do %> + <%= t("cpanel.categories") %> +<% end %> +

Listing categories

+ + + + + + + + + +<% @categories.each do |categorie| %> + + + + + + + +<% end %> +
IdNameSort
<%= categorie.id %><%= categorie.name %><%= categorie.sort %><%= link_to '', edit_cpanel_category_path(categorie) , :class => "icon small_edit" %> + <%= link_to '', cpanel_categories_path(categorie), :confirm => 'Are you sure?', :method => :delete, :class => "icon small_delete" %>
+ +
+ +<%= link_to 'New categorie', new_cpanel_category_path %> \ No newline at end of file diff --git a/app/views/cpanel/categories/new.html.erb b/app/views/cpanel/categories/new.html.erb new file mode 100644 index 0000000..92d73b6 --- /dev/null +++ b/app/views/cpanel/categories/new.html.erb @@ -0,0 +1,6 @@ +<% content_for :sitemap do %> + ><%= t("cpanel.categories") %> > <%= t("common.create") %> +<% end %> +

New categorie

+ +<%= render 'form' %> diff --git a/app/views/cpanel/home/index.html.erb b/app/views/cpanel/home/index.html.erb new file mode 100644 index 0000000..d64a4f8 --- /dev/null +++ b/app/views/cpanel/home/index.html.erb @@ -0,0 +1,26 @@ + +<% content_for :sitemap do %> + <%= t("cpanel.overview") %> +<% end %> + +<% if !@recent_posts.blank? %> +
+

<%= t("cpanel.recent_topics") %>

+ +
+<% end %> + +
+

<%= t("cpanel.statics") %>

+
    +
  • <%= t("cpanel.menu.categories") %>: <%= Category.count %> 个
  • +
  • <%= t("cpanel.menu.posts") %>: <%= Post.count %> 个
  • +
  • <%= t("cpanel.menu.pages") %>: <%= Page.count %> 条
  • +
  • <%= t("cpanel.menu.sites") %>: <%= Site.count %> 条
  • +
+
+ diff --git a/app/views/cpanel/pages/_form.html.erb b/app/views/cpanel/pages/_form.html.erb new file mode 100644 index 0000000..fef5de0 --- /dev/null +++ b/app/views/cpanel/pages/_form.html.erb @@ -0,0 +1,29 @@ +<%= form_for([:cpanel,@page]) do |f| %> +
+ 页面编辑 + <%= render "shared/error_messages", :target => @page %> + +
+ <%= f.label :slug %> +
+ <%= f.text_field :slug %>
+ http://<%= Setting.domain %>/page/:slug +
+
+
+ <%= f.label :title %> +
+ <%= f.text_field :title, :class => "xxlarge" %> +
+
+
+ <%= f.label :body %> +
+ <%= f.text_area :body, :class => "long", :rows => "30" %>
+ 请使用 Markdown 格式编写。 +
+
+
+ <%= f.submit t("common.save"), :class => "btn primary", :disable_with => t("common.saving") %> +
+<% end %> \ No newline at end of file diff --git a/app/views/cpanel/pages/edit.html.erb b/app/views/cpanel/pages/edit.html.erb new file mode 100644 index 0000000..e2f0126 --- /dev/null +++ b/app/views/cpanel/pages/edit.html.erb @@ -0,0 +1,6 @@ +<% content_for :sitemap do %> + Wiki > 修改 +<% end %> +

Editing page

+ +<%= render 'form' %> \ No newline at end of file diff --git a/app/views/cpanel/pages/index.html.erb b/app/views/cpanel/pages/index.html.erb new file mode 100644 index 0000000..7204b9b --- /dev/null +++ b/app/views/cpanel/pages/index.html.erb @@ -0,0 +1,31 @@ +<% content_for :sitemap do %> + Wiki +<% end %> +

Wiki 列表

+ + + + + + + + + + +<% @pages.each do |page| %> + + + + + + + +<% end %> +
IDSlugTitleat
<%= page.id %><%= page.slug %><%= truncate(page.title,:length => 30) %><%= page.created_at %> + <%= link_to '编辑', edit_cpanel_page_path(page), :class => "icon small_edit" %> + <%= link_to '删除', cpanel_page_path(page), :confirm => 'Are you sure?', :method => :delete, :class => "icon small_delete" %>
+<%= will_paginate @pages %> + + +
+<%= link_to 'New Page', new_cpanel_page_path %> \ No newline at end of file diff --git a/app/views/cpanel/pages/new.html.erb b/app/views/cpanel/pages/new.html.erb new file mode 100644 index 0000000..c012490 --- /dev/null +++ b/app/views/cpanel/pages/new.html.erb @@ -0,0 +1,6 @@ +<% content_for :sitemap do %> + 页面 > 新建 +<% end %> +

Editing page

+ +<%= render 'form' %> \ No newline at end of file diff --git a/app/views/cpanel/posts/_form.html.erb b/app/views/cpanel/posts/_form.html.erb new file mode 100644 index 0000000..61ce100 --- /dev/null +++ b/app/views/cpanel/posts/_form.html.erb @@ -0,0 +1,43 @@ +<%= form_for([:cpanel,@post]) do |f| %> +
+ + <%= render 'shared/error_messages', :target => @post %> + +
+ <%= f.label :title %> +
+ <%= f.text_field :title, :class => "span10" %> +
+
+
+ <%= f.label :category_id %> +
+ <%= f.select :category_id, Category.all.collect { |s| [s.name,s.id] } %>
+
+ +
+ <%= f.label :body %> +
+ <%= f.text_area :body, :class => "span13", :style => "height:400px" %> +
+
+
+ <%= f.label :tag_list %> +
+ <%= f.text_field :tag_list, :class => "xxlarge" %> +
+
+ +
+ <%= f.label :state %> +
+ <%= f.select :state, Post.state_collection %> +
+
+ +
+ <%= f.submit "发布", :class => "btn primary", :disable_with => "发布中" %> + or + <%= link_to 'Back', cpanel_posts_path %> +
+<% end %> diff --git a/app/views/cpanel/posts/edit.html.erb b/app/views/cpanel/posts/edit.html.erb new file mode 100644 index 0000000..b4666e6 --- /dev/null +++ b/app/views/cpanel/posts/edit.html.erb @@ -0,0 +1,6 @@ +<% content_for :sitemap do %> + 帖子 > <%= t("common.edit") %> +<% end %> +

Editing post

+ +<%= render 'form' %> diff --git a/app/views/cpanel/posts/index.html.erb b/app/views/cpanel/posts/index.html.erb new file mode 100644 index 0000000..f5b4b6f --- /dev/null +++ b/app/views/cpanel/posts/index.html.erb @@ -0,0 +1,29 @@ +<% content_for :sitemap do %> + 文章 +<% end %> +

文章列表

+ + + + + + + + + + +<% @posts.each do |post| %> + "> + + + + + + +<% end %> +
IDTitleatState
<%= post.id %><%= truncate(post.title,:length => 30) %><%= post.created_at %><%= render_post_state_s(post) %><%= link_to '编辑', edit_cpanel_post_path(post), :class => "icon small_edit" %> + <%= link_to '删除', cpanel_post_path(post), :confirm => "Are you sure?", :method => :delete , :class => "icon small_delete"%>
+<%= will_paginate @posts %> + +
+<%= link_to 'New post', new_cpanel_post_path %> \ No newline at end of file diff --git a/app/views/cpanel/posts/new.html.erb b/app/views/cpanel/posts/new.html.erb new file mode 100644 index 0000000..2f8c23e --- /dev/null +++ b/app/views/cpanel/posts/new.html.erb @@ -0,0 +1,6 @@ +<% content_for :sitemap do %> + 文章 > <%= t("common.create") %> +<% end %> +

New post

+ +<%= render 'form' %> \ No newline at end of file diff --git a/app/views/cpanel/site_configs/_form.html.erb b/app/views/cpanel/site_configs/_form.html.erb new file mode 100644 index 0000000..2b04427 --- /dev/null +++ b/app/views/cpanel/site_configs/_form.html.erb @@ -0,0 +1,24 @@ +<%= form_for([:cpanel,@site_config]) do |f| %> +
+ + <%= render 'shared/error_messages', :target => @site_config %> +
+ <%= f.label :key %> +
+ <%= f.text_field :key, :class => "disabled", :disabled => "disabled" %> + <%= t("cpanel.site_configs.please_do_not_modify_key")%> +
+
+
+ <%= f.label :value %> +
+ <%= f.text_area :value, :class => "long", :rows => "20" %> + +
+
+
+ <%= f.submit t("common.save"), :class => "btn primary", :disable_with => t("common.saving") %> + <%= t("common.cancel") %> +
+
+<% end %> \ No newline at end of file diff --git a/app/views/cpanel/site_configs/edit.html.erb b/app/views/cpanel/site_configs/edit.html.erb new file mode 100644 index 0000000..15b0cff --- /dev/null +++ b/app/views/cpanel/site_configs/edit.html.erb @@ -0,0 +1,3 @@ +

<%= t("cpanel.site_configs.edit_setting")%>

+ +<%= render 'form' %> diff --git a/app/views/cpanel/site_configs/index.html.erb b/app/views/cpanel/site_configs/index.html.erb new file mode 100644 index 0000000..af948e6 --- /dev/null +++ b/app/views/cpanel/site_configs/index.html.erb @@ -0,0 +1,15 @@ +

<%= t("cpanel.site_configs.settings") %>

+ + + + + + + +<% @site_configs.each do |site_config| %> + + + + +<% end %> +
key
<%= site_config.key %><%= link_to 'edit', edit_cpanel_site_config_path(site_config), :class => "icon small_edit" %>
diff --git a/app/views/cpanel/sites/_base.html.erb b/app/views/cpanel/sites/_base.html.erb new file mode 100644 index 0000000..5b862ec --- /dev/null +++ b/app/views/cpanel/sites/_base.html.erb @@ -0,0 +1,2 @@ +<%= content_for :styles do %> +<% end %> \ No newline at end of file diff --git a/app/views/cpanel/sites/_form.html.erb b/app/views/cpanel/sites/_form.html.erb new file mode 100644 index 0000000..00c91ab --- /dev/null +++ b/app/views/cpanel/sites/_form.html.erb @@ -0,0 +1,43 @@ + + +<%= form_for([:cpanel,@site]) do |f| %> +
+ + <%= render 'shared/error_messages', :target => @site %> + +
+ <%= f.label :name %> +
+ <%= f.text_field :name %> +
+
+ +
+ <%= f.label :url %> +
+ <%= f.text_field :url %> +
+ +
+
+ <%= f.label :favicon %> +
+ <%= f.text_field :favicon %> +
+
+ +
+ <%= f.label :desc %> +
+ <%= f.text_area :desc, :class => "span13", :style => "height:100px" %> +
+
+ + + +
+ <%= f.submit t("common.save"), :class => "btn primary", :disable_with => t("common.saving") %> + <%= link_to 'Back', cpanel_sites_path %> +
+
+<% end %> \ No newline at end of file diff --git a/app/views/cpanel/sites/edit.html.erb b/app/views/cpanel/sites/edit.html.erb new file mode 100644 index 0000000..b268fd4 --- /dev/null +++ b/app/views/cpanel/sites/edit.html.erb @@ -0,0 +1,3 @@ +<%= render 'base' %> +<%= render 'form' %> + diff --git a/app/views/cpanel/sites/index.html.erb b/app/views/cpanel/sites/index.html.erb new file mode 100644 index 0000000..28a87aa --- /dev/null +++ b/app/views/cpanel/sites/index.html.erb @@ -0,0 +1,31 @@ +<%= render 'base' %> +

<%= t("mongoid.models.site") %>

+
+ + + + + + + + + + <% @sites.each do |item| %> + <%= ' deleted' if !item.deleted_at.blank? %>"> + + + + + + + + <% end %> +
编号<%= t("mongoid.attributes.site.name") %><%= t("mongoid.attributes.site.url") %><%= t("mongoid.attributes.site.desc") %>At
<%= item.id %><%= item.name %><%= item.url %><%= item.desc %><%= item.created_at %> + <%= link_to "", edit_cpanel_site_path(item.id), :class => "icon small_edit" %> + <%= link_to "", cpanel_site_path(item.id), :method => :delete, :confirm => '确定要删除吗?', :class => "icon small_delete" %> +
+ <%= will_paginate @sites %> +
+ +
+<%= link_to 'New sites', new_cpanel_site_path %> \ No newline at end of file diff --git a/app/views/cpanel/sites/new.html.erb b/app/views/cpanel/sites/new.html.erb new file mode 100644 index 0000000..c101857 --- /dev/null +++ b/app/views/cpanel/sites/new.html.erb @@ -0,0 +1,7 @@ + + +<% content_for :sitemap do %> + ><%= t("cpanel.sites") %> > <%= t("common.create") %> +<% end %> + +<%= render 'form' %> diff --git a/app/views/cpanel/sites/show.html.erb b/app/views/cpanel/sites/show.html.erb new file mode 100644 index 0000000..06a073a --- /dev/null +++ b/app/views/cpanel/sites/show.html.erb @@ -0,0 +1,23 @@ +<%= render 'base' %> +
+ <%= link_to '修改', edit_cpanel_site_path(@site), :class => "btn small success" %> + <%= link_to '返回', cpanel_sites_path, :class => "btn small" %> +
+
+

+ Name: + <%= @site.name %> +

+

+ Url: + <%= @site.url %> +

+

+ Desc: + <%= @site.desc %> +

+

+ Site node: + <%= @site.site_node %> +

+
\ No newline at end of file diff --git a/app/views/errors/403.html.erb b/app/views/errors/403.html.erb new file mode 100644 index 0000000..d5539c4 --- /dev/null +++ b/app/views/errors/403.html.erb @@ -0,0 +1,10 @@ +<% content_for :sitemap do %>404<% end %> +
+

403 没有权限

+

+ 抱歉,你没有做此操作的权限,如有问题,请到社区发帖询问。 +

+

+ 返回首页 +

+
\ No newline at end of file diff --git a/app/views/errors/404.html.erb b/app/views/errors/404.html.erb new file mode 100644 index 0000000..cf32d98 --- /dev/null +++ b/app/views/errors/404.html.erb @@ -0,0 +1,6 @@ +
+

Ops, 404

+

+ 似乎没有这个页面哦!大哥,回去看看别的吧。 +

+
\ No newline at end of file diff --git a/app/views/index/index.html.erb b/app/views/index/index.html.erb new file mode 100644 index 0000000..1d43b6c --- /dev/null +++ b/app/views/index/index.html.erb @@ -0,0 +1,37 @@ +
+ + + <%@posts.each do |post|%> +
+
+

<%=link_to post.title,post_path(post)%>

+

In: <%= link_to(post.category.name, category_posts_path(post.category), :title => post.category.name )%> Tags:<%=post.tags%>

+ + 24 + Jun + 2012 + +
+
+ <%=raw post.body_html%> +
+
+ <%end%> + + + + +
+ + + + + + + + + + + + + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb new file mode 100644 index 0000000..56bfb80 --- /dev/null +++ b/app/views/layouts/application.html.erb @@ -0,0 +1,40 @@ + + + + <%= raw SiteConfig.site_title_html %> - Powered by Icelog(v0.1.0) + <%= stylesheet_link_tag "application", :media => "all" %> + <%= javascript_include_tag "application" %> + <%= csrf_meta_tags %> + + +
+
+ +
+ +
+
+
+ <%= yield %> + <%= render "shared/aside" %> +
+ + +
+
+
+ +<%= render :partial => "shared/google_analytics"%> + + diff --git a/app/views/layouts/cpanel.html.erb b/app/views/layouts/cpanel.html.erb new file mode 100644 index 0000000..54461c7 --- /dev/null +++ b/app/views/layouts/cpanel.html.erb @@ -0,0 +1,49 @@ + + + + Icelog - Control Panel + <%= stylesheet_link_tag "cpanel" %> + <%= csrf_meta_tag %> + + +
+
+
+ <%= link_to("控制台", cpanel_root_path, :class => "brand")%> + <%= render_list :class => "nav" do |li| + li << link_to(t("cpanel.menu.root_path"), cpanel_root_path) + li << link_to(t("cpanel.menu.sections"), cpanel_categories_path ) + li << link_to(t("cpanel.menu.posts"),cpanel_posts_path ) + li << link_to(t("cpanel.menu.pages"),cpanel_pages_path ) + li << link_to(t("cpanel.menu.sites"),cpanel_sites_path ) + li << link_to(t("cpanel.menu.site_configs"), cpanel_site_configs_path ) + end %> + + +
+
+
+
+ +
+ <%= notice_message %> + <%= yield %> +
+
+
+
+

使用 FirefoxChrome 浏览访问本站将会获得更佳的视觉体验.

+
+
+ + diff --git a/app/views/pages/show.html.erb b/app/views/pages/show.html.erb new file mode 100644 index 0000000..f0d7883 --- /dev/null +++ b/app/views/pages/show.html.erb @@ -0,0 +1,11 @@ + +
+
+
+

<%=@page.title %>

+
+
+<%= raw @page.body %> +
+
+
\ No newline at end of file diff --git a/app/views/posts/index.html.erb b/app/views/posts/index.html.erb new file mode 100644 index 0000000..18a155f --- /dev/null +++ b/app/views/posts/index.html.erb @@ -0,0 +1,24 @@ +
+ + + <%@posts.each do |post|%> +
+
+

<%=link_to post.title,post_path(post)%>

+

In: <%=post.category.name%> Tag:<%=post.tags%>

+ + 24 + Jun + 2012 + +
+
+ <%=raw post.body_html%> +
+
+ <%end%> + + + <%= will_paginate @posts %> + +
\ No newline at end of file diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb new file mode 100644 index 0000000..266d938 --- /dev/null +++ b/app/views/posts/show.html.erb @@ -0,0 +1,10 @@ +
+
+
+

<%=@post.title %>

+
+
+ <%= raw @post.body_html %> +
+
+
\ No newline at end of file diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb new file mode 100644 index 0000000..ac07f92 --- /dev/null +++ b/app/views/search/index.html.erb @@ -0,0 +1,33 @@ +
+ +
Loading
+ + + +
\ No newline at end of file diff --git a/app/views/shared/_aside.html.erb b/app/views/shared/_aside.html.erb new file mode 100644 index 0000000..bc27da4 --- /dev/null +++ b/app/views/shared/_aside.html.erb @@ -0,0 +1,54 @@ +
+ + + + + + +
+ <%= raw SiteConfig.about_me_html %> +
+ + +
+

近期文章

+
    + <%@aside_posts.each do |post|%> +
  • <%=link_to post.title,post_path(post)%>
  • + <%end%> +
+
+ +
+

分类目录

+
    + <%@aside_categories.each do |category|%> +
  • <%= link_to(category.name, category_posts_path(category), :title => category.name )%>
  • + <%end%> +
+
+ +
+

友情链接

+
    + <%@aside_sites.each do |site|%> +
  • <%=link_to site.name, site.url%>
  • + <%end%> +
+
+ +
diff --git a/app/views/shared/_error_messages.html.erb b/app/views/shared/_error_messages.html.erb new file mode 100644 index 0000000..6cd6718 --- /dev/null +++ b/app/views/shared/_error_messages.html.erb @@ -0,0 +1,11 @@ +<% if target.errors.any? %> +
+ × +

有 <%= target.errors.count %> 处问题导至无法提交:

+
    + <% target.errors.full_messages.each do |msg| %> +
  • <%= msg %>
  • + <% end %> +
+
+<% end %> \ No newline at end of file diff --git a/app/views/shared/_google_analytics.html.erb b/app/views/shared/_google_analytics.html.erb new file mode 100644 index 0000000..3877882 --- /dev/null +++ b/app/views/shared/_google_analytics.html.erb @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..9d20c20 --- /dev/null +++ b/config.ru @@ -0,0 +1,4 @@ +# This file is used by Rack-based servers to start the application. + +require ::File.expand_path('../config/environment', __FILE__) +run Iceylog::Application diff --git a/config/application.rb b/config/application.rb new file mode 100644 index 0000000..571dcf5 --- /dev/null +++ b/config/application.rb @@ -0,0 +1,72 @@ +require File.expand_path('../boot', __FILE__) +APP_VERSION = '0.1.0' + +# Pick the frameworks you want: +# require "active_record/railtie" +require "action_controller/railtie" +require "action_mailer/railtie" +require "active_resource/railtie" +require "sprockets/railtie" +require "rails/test_unit/railtie" + +if defined?(Bundler) + # If you precompile assets before deploying to production, use this line + Bundler.require(*Rails.groups(:assets => %w(development test))) + # If you want your assets lazily compiled in production, use this line + # Bundler.require(:default, :assets, Rails.env) +end + +module Iceylog + class Application < Rails::Application + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + + # Custom directories with classes and modules you want to be autoloadable. + # config.autoload_paths += %W(#{config.root}/extras) + + # Only load the plugins named here, in the order given (default is alphabetical). + # :all can be used as a placeholder for all plugins not explicitly named. + # config.plugins = [ :exception_notification, :ssl_requirement, :all ] + + # Activate observers that should always be running. + # config.active_record.observers = :cacher, :garbage_collector, :forum_observer + + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. + # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. + # config.time_zone = 'Central Time (US & Canada)' + config.time_zone = 'Beijing' + + # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. + # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + # config.i18n.default_locale = :de + config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + config.i18n.default_locale = "zh-CN" + + # Configure the default encoding used in templates for Ruby 1.9. + config.encoding = "utf-8" + + # Configure sensitive parameters which will be filtered from the log file. + config.filter_parameters += [:password] + + # Use SQL instead of Active Record's schema dumper when creating the database. + # This is necessary if your schema can't be completely dumped by the schema dumper, + # like if you have constraints or database-specific column types + # config.active_record.schema_format = :sql + config.generators do |g| + g.orm :mongoid + end + + # Enforce whitelist mode for mass assignment. + # This will create an empty whitelist of attributes available for mass-assignment for all models + # in your app. As such, your models will need to explicitly whitelist or blacklist accessible + # parameters by using an attr_accessible or attr_protected declaration. + # config.active_record.whitelist_attributes = true + + # Enable the asset pipeline + config.assets.enabled = true + + # Version of your assets, change this if you want to expire all your assets + config.assets.version = '1.0' + end +end diff --git a/config/boot.rb b/config/boot.rb new file mode 100644 index 0000000..4489e58 --- /dev/null +++ b/config/boot.rb @@ -0,0 +1,6 @@ +require 'rubygems' + +# Set up gems listed in the Gemfile. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) + +require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) diff --git a/config/config.yml b/config/config.yml new file mode 100644 index 0000000..eb79fc0 --- /dev/null +++ b/config/config.yml @@ -0,0 +1,16 @@ +defaults: &defaults + app_name: "Iceylog" + foot_html: "© Iceylog." + domain: "127.0.0.1:3000" + google_analytics_key: "" + email_sender: 'no-reply@iceskysl.com' + twitter_id: "iceskysl" + +development: + <<: *defaults + +test: + <<: *defaults + +production: + <<: *defaults \ No newline at end of file diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 0000000..a29c186 --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,5 @@ +# Load the rails application +require File.expand_path('../application', __FILE__) + +# Initialize the rails application +Iceylog::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb new file mode 100644 index 0000000..9ebf1f7 --- /dev/null +++ b/config/environments/development.rb @@ -0,0 +1,31 @@ +Iceylog::Application.configure do + # Settings specified here will take precedence over those in config/application.rb + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Log error messages when you accidentally call methods on nil. + config.whiny_nils = true + + # Show full error reports and disable caching + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Don't care if the mailer can't send + config.action_mailer.raise_delivery_errors = false + + # Print deprecation notices to the Rails logger + config.active_support.deprecation = :log + + # Only use best-standards-support built into browsers + config.action_dispatch.best_standards_support = :builtin + + + # Do not compress assets + config.assets.compress = false + + # Expands the lines which load the assets + config.assets.debug = true +end diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 0000000..102bb54 --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,64 @@ +Iceylog::Application.configure do + # Settings specified here will take precedence over those in config/application.rb + + # Code is not reloaded between requests + config.cache_classes = true + + # Full error reports are disabled and caching is turned on + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Disable Rails's static asset server (Apache or nginx will already do this) + config.serve_static_assets = false + + # Compress JavaScripts and CSS + config.assets.compress = true + + # Don't fallback to assets pipeline if a precompiled asset is missed + config.assets.compile = false + + # Generate digests for assets URLs + config.assets.digest = true + + # Defaults to Rails.root.join("public/assets") + # config.assets.manifest = YOUR_PATH + + # Specifies the header that your server uses for sending files + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # See everything in the log (default is :info) + # config.log_level = :debug + + # Prepend all log lines with the following tags + # config.log_tags = [ :subdomain, :uuid ] + + # Use a different logger for distributed setups + # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + + # Use a different cache store in production + # config.cache_store = :mem_cache_store + + # Enable serving of images, stylesheets, and JavaScripts from an asset server + # config.action_controller.asset_host = "http://assets.example.com" + + # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) + # config.assets.precompile += %w( search.js ) + + # Disable delivery errors, bad email addresses will be ignored + # config.action_mailer.raise_delivery_errors = false + + # Enable threaded mode + # config.threadsafe! + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation can not be found) + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners + config.active_support.deprecation = :notify + +end diff --git a/config/environments/test.rb b/config/environments/test.rb new file mode 100644 index 0000000..c36da1d --- /dev/null +++ b/config/environments/test.rb @@ -0,0 +1,35 @@ +Iceylog::Application.configure do + # Settings specified here will take precedence over those in config/application.rb + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Configure static asset server for tests with Cache-Control for performance + config.serve_static_assets = true + config.static_cache_control = "public, max-age=3600" + + # Log error messages when you accidentally call methods on nil + config.whiny_nils = true + + # Show full error reports and disable caching + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment + config.action_controller.allow_forgery_protection = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + + # Print deprecation notices to the stderr + config.active_support.deprecation = :stderr +end diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000..59385cd --- /dev/null +++ b/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 0000000..5d8d9be --- /dev/null +++ b/config/initializers/inflections.rb @@ -0,0 +1,15 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format +# (all these examples are active by default): +# ActiveSupport::Inflector.inflections do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end +# +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/config/initializers/markdown.rb b/config/initializers/markdown.rb new file mode 100644 index 0000000..23ecfb6 --- /dev/null +++ b/config/initializers/markdown.rb @@ -0,0 +1,128 @@ +# coding: utf-8 +require 'rails_autolink' +require 'iconv' +module Redcarpet + module Render + class HTMLwithSyntaxHighlight < HTML + def initialize(extensions={}) + super(extensions.merge(:xhtml => true, + :no_styles => true, + :filter_html => true, + :hard_wrap => true)) + end + + def block_code(code, language) + language = 'text' if language.blank? + begin + Pygments.highlight(code, :lexer => language, :formatter => 'html', :options => {:encoding => 'utf-8'}) + rescue + Pygments.highlight(code, :lexer => 'text', :formatter => 'html', :options => {:encoding => 'utf-8'}) + end + end + + def autolink(link, link_type) + # return link + if link_type.to_s == "email" + link + else + begin + # 防止 C 的 autolink 出来的内容有编码错误,万一有就直接跳过转换 + # 比如这句: + # 此版本并非线上的http://yavaeye.com的源码. + link.match(/.+?/) + rescue + return link + end + # Fix Chinese neer the URL + bad_text = link.to_s.match(/[^\w\d:\/\-\,\$\!\_\.=\?&#+\|\%]+/im).to_s + link = link.to_s.gsub(bad_text, '') + "#{link}#{bad_text}" + end + end + end + + class HTMLwithTopic < HTMLwithSyntaxHighlight + # Topic 里面,所有的 head 改为 h4 显示 + def header(text, header_level) + "

#{text}

" + end + end + end +end + +class MarkdownConverter + include Singleton + + def self.convert(text) + self.instance.convert(text) + end + + def convert(text) + @converter.render(text) + end + + private + def initialize + @converter = Redcarpet::Markdown.new(Redcarpet::Render::HTMLwithSyntaxHighlight.new, { + :autolink => true, + :fenced_code_blocks => true, + :no_intra_emphasis => true + }) + end +end + +class MarkdownTopicConverter < MarkdownConverter + def self.format(text) + return '' if text.blank? + + self.convert_bbcode_img(text) + + # 如果 ``` 在刚刚换行的时候 Redcapter 无法生成正确,需要两个换行 + text.gsub!("\n```","\n\n```") + + result = self.convert(text) + + self.link_mention_floor(result) + self.link_mention_user(result) + + return result.strip + rescue => e + puts "MarkdownTopicConverter.format ERROR: #{e}" + return text + end + + private + # convert bbcode-style image tag [img]url[/img] to markdown syntax ![alt](url) + def self.convert_bbcode_img(text) + text.gsub!(/\[img\](.+?)\[\/img\]/i) {"![#{self.image_alt $1}](#{$1})"} + end + + def self.image_alt(src) + File.basename(src, '.*').capitalize + end + + # convert '#N楼' to link + def self.link_mention_floor(text) + text.gsub!(/#(\d+)([楼樓Ff])/) { + %(##{$1}#{$2}) + } + end + + # convert '@user' to link + # match any user even not exist. + def self.link_mention_user(text) + text.gsub!(/(^|[^a-zA-Z0-9_!#\$%&*@@])@([a-zA-Z0-9_]{1,20})/io) { + %(#{$1}@#{$2}) + } + end + + def initialize + @converter = Redcarpet::Markdown.new(Redcarpet::Render::HTMLwithTopic.new, { + :autolink => true, + :fenced_code_blocks => true, + :strikethrough => true, + :space_after_headers => true, + :no_intra_emphasis => true + }) + end +end diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb new file mode 100644 index 0000000..72aca7e --- /dev/null +++ b/config/initializers/mime_types.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf +# Mime::Type.register_alias "text/html", :iphone diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb new file mode 100644 index 0000000..3f8eb09 --- /dev/null +++ b/config/initializers/secret_token.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +Iceylog::Application.config.secret_token = '1bda01ec74b756a628f89cd286cdb275af0e6083ec581bffe598a16a4707d5ec0814e06ef49d40a34aa85a6a35776c866a8d94a1bc24ec8e8b95f07359e1a646' diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb new file mode 100644 index 0000000..b9771b1 --- /dev/null +++ b/config/initializers/session_store.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +Iceylog::Application.config.session_store :cookie_store, :key => '_iceylog_session' + +# Use the database for sessions instead of the cookie-based default, +# which shouldn't be used to store highly confidential information +# (create the session table with "rails generate session_migration") +# Iceylog::Application.config.session_store :active_record_store diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb new file mode 100644 index 0000000..5fe232e --- /dev/null +++ b/config/initializers/wrap_parameters.rb @@ -0,0 +1,10 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters :format => [:json] +end + diff --git a/config/locales/cpanel.zh-CN.yml b/config/locales/cpanel.zh-CN.yml new file mode 100644 index 0000000..27d277f --- /dev/null +++ b/config/locales/cpanel.zh-CN.yml @@ -0,0 +1,25 @@ +"zh-CN": + cpanel: + menu: + root_path: "概况" + site_configs: "设置" + users: "用户" + sections: "分类" + posts: "文章" + pages: "页面" + photos: "图片" + notes: "记事本" + comments: "评论" + sites: "友情链接" + locations: "城市" + overview: "概览" + recent_topics: "最近帖子" + statics: "统计信息" + site_configs: + settings: "设置项" + please_do_not_modify_key: "请勿修改 key" + edit_setting: "修改设置" + users: + trust_user_can_modify_wiki: "信任用户将可以修改 Wiki" + topic_list: "话题列表" + check_photo: "瀏覽圖片" \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..179c14c --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,5 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + hello: "Hello world" diff --git a/config/locales/menu.en.yml b/config/locales/menu.en.yml new file mode 100644 index 0000000..7f62382 --- /dev/null +++ b/config/locales/menu.en.yml @@ -0,0 +1,104 @@ +"en": + common: + justnow: 'Just Now' + hour: 'Hour' + minute: 'Minute' + edit: "Edit" + create: "Create" + avatar: "Avatar" + save: "Save" + saving: "Saving" + submitting: "Submitting" + delete: "Delete" + undelete: "Revert" + place_top: "Stick Top" + un_top: "Un-Stick Top" + upload: "Upload" + uploading: "Uploading" + published_at: "Published At" + register: "Register" + login: "Sign In" + logining: "Sign In..." + logout: "Sign Out" + remember_me: "Remember Me" + cancel: "Cancel" + created_at: "Created at %{time}" + until: "until" + last_by: "Last by" + floor: "Floor" + reply_at: "Reply at %{time}" + create_item: "Create Item" + read_times: "hits" + confirm_delete: "Are you sure you want to delete?" + search: "Search" + public: "Public" + create_success: "Created successfully." + delete_success: "Deleted successfully." + update_success: "Updated successfully." + mark_all_as_read: "Mark all as read" + last_modified_at: "Last modified at" + index: "Index" + you_may_like: "You may also like" + read: "read" + admin_user: "Admin" + wiki_admin: "Wiki Admin" + normal_user: "Normal User" + limit_user: "Restricted User" + title: "Title" + reply_count: "Reply count" + last_reply_time: "Last replied at" + reply: "Reply" + index_node_navigation: "Node Navigation" + highlight_topic: "Sticky Topic" + statics: "Statistics" + comments: "Comments" + no_search_result: "No search result" + access_denied: "Access denied, Please sign in and make sure you have proper permission." + editor_toolbar_edit: "Edit" + editor_toolbar_preview: "Preview" + by: "by" + at: "on" + hot_topics: "Hot topics" + posts: + recent_publish_post: "Recent Published Post" + post_source: "Post source" + published_at: "Published at" + tag: "tag" + post_submitter: "Post Submitter" + submit_success: "successfully submitted,will be added to list after approval." + reply: + edit_reply: "Edit Reply" + delete_reply_success: 'Delete successfully.' + topic_location: 'Replied to' + photos: + upload_and_insert_code: "Upload and insert code" + uploading: "Uploading" + sites: + create: Submit a site + menu: + topics: "Discussion" + wiki: "Wiki" + posts: "Posts" + users: "Users" + cpanel: "Control Panel" + notes: "Notes" + nodes: "Nodes" + sites: "Sites" + my_home_page: "My home page" + edit_account_path: "Account Profile" + likes: "Favorites" + comments: + create_comment: "Comment" + no_comment: "No Comment at the moment" + mail: + login_from: "Sign in from" + this_is_a_notification_mail_please_do_not_reply: "This is an email notification. Please do not reply." + welcome_subject: "Welcome to %{app_name} community" + welcome_title: "Welcome to %{app_name}" + you_have_successfully: "You have successfully registered an account in" + registered_an_account: "." + rss: + recent_topics_description: "Recent Topics in %{name} Forum." + recent_topics_title: "%{name} Forum" + recent_node_topics_description: "Recent Topic in %{node_name} of %{name} Forum." + recent_node_topics_title: "%{node_name} node of %{name} Forum" diff --git a/config/locales/menu.zh-CN.yml b/config/locales/menu.zh-CN.yml new file mode 100644 index 0000000..499fbba --- /dev/null +++ b/config/locales/menu.zh-CN.yml @@ -0,0 +1,106 @@ +"zh-CN": + common: + justnow: '刚刚' + hour: '小时' + minute: '分钟' + edit: "修改" + create: "新建" + avatar: "头像" + save: "保存" + saving: "正在保存" + submitting: "正在提交" + delete: "删除" + undelete: "恢复" + place_top: "置顶" + un_top: "去置顶" + upload: "上传" + uploading: "正在上传" + published_at: "发表于" + register: "注册" + login: "登录" + logining: "正在登录" + logout: "退出" + remember_me: "记住登录状态" + cancel: "取消" + created_at: "于%{time}发布" + until: "截止" + last_by: "最后由" + floor: "楼" + reply_at: "于%{time}回复" + create_item: "中发起" + read_times: "次阅读" + confirm_delete: "确定要删除么?" + search: "搜索" + public: "公开" + create_success: "创建成功." + delete_success: "删除成功." + update_success: "修改成功." + mark_all_as_read: "标记所有为已读" + last_modified_at: "最后更新于" + index: "目录" + you_may_like: "你可能也喜欢" + read: "阅读" + admin_user: "管理員" + wiki_admin: "Wiki 管理" + normal_user: "普通用户" + limit_user: "受限会员" + title: "标题" + reply_count: "回复数" + last_reply_time: "最后回复时间" + reply: "回复" + index_node_navigation: "讨论节点分类导航" + highlight_topic: "置顶话题" + statics: "统计信息" + comments: "条评论" + no_search_result: "没有搜索到相关内容。" + access_denied: "访问被拒绝,你可能没有权限或未登录。" + editor_toolbar_edit: "编辑" + editor_toolbar_preview: "预览" + by: "由" + at: "在" + hot_topics: "热门讨论" + hot_locations: "热门城市" + replied_at: 回复于 + posts: + recent_publish_post: "最近发布的文章" + post_source: "文章來源" + published_at: "投稿于" + tag: "标签" + post_submitter: "提交者" + submit_success: "投稿成功,需等待审核通过以后才能显示到文章列表。" + reply: + edit_reply: "修改回帖" + delete_reply_success: '回帖删除成功.' + topic_location: '回帖所在文章' + photos: + upload_and_insert_code: "上传并插入代码" + uploading: "正在上传" + sites: + create: 提交网站 + menu: + topics: "社区" + wiki: "Wiki" + posts: "文章" + users: "会员" + cpanel: "后台" + notes: "记事本" + nodes: "节点" + sites: "酷站" + my_home_page: "我的主页" + edit_account_path: "个人资料设置" + likes: "我的收藏" + comments: + create_comment: "发表评论" + no_comment: "暂无评论" + mail: + login_from: "登录页面地址" + this_is_a_notification_mail_please_do_not_reply: "这是一封提醒邮件,请勿直接通过邮件回复." + welcome_subject: "欢迎加入 %{app_name} 社区" + welcome_title: "欢迎加入 %{app_name}" + you_have_successfully: "你已经成功在" + registered_an_account: "注册了账号。" + rss: + recent_topics_description: "%{name}社区最新发贴." + recent_topics_title: "%{name}社区" + recent_node_topics_description: "%{name} 社区 %{node_name} 节点最新发贴." + recent_node_topics_title: "%{name} 社区 %{node_name} 节点" diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml new file mode 100644 index 0000000..1680485 --- /dev/null +++ b/config/locales/zh-CN.yml @@ -0,0 +1,103 @@ +"zh-CN": + mongoid: + models: + user: "用户" + topic: "话题" + post: 文章 + page: Wiki + attributes: + user: + name: "名字" + login: "用户名" + email: "Email" + avatar: "头像" + location: "城市" + bio: "个人介绍" + password: "密码" + password_confirmation: "确认密码" + website: "个人主页" + last_logined_at: "上次登录时间" + tagline: "签名" + state: "状态" + verified: "信任用户" + remember_me: 记住登陆状态 + current_password: 旧密码 + topic: + title: "标题" + user_id: "用户" + node_id: "节点" + body: "正文" + reply: + body: "回复内容" + post: + title: 标题 + body: 正文 + tag_list: 标签 + source: 来源 + source_url: 来源地址 + page: + slug: Slug + title: 页面标题 + body: 内容 + locked: 锁定开关 + change_desc: 变更描述 + site: + name: 网站名称 + url: 地址 + desc: 简单介绍 + site_node_id: 分类 + errors: + models: + user: 用户 + messages: + inclusion: "不包含于列表中" + exclusion: "是保留关键字" + invalid: "是无效的" + confirmation: "与确认值不匹配" + accepted: "必须是可被接受的" + empty: "不能留空" + blank: "不能为空字符" + too_long: "过长(最长为 %{count} 个字符)" + too_short: "过短(最短为 %{count} 个字符)" + wrong_length: "长度非法(必须为 %{count} 个字符)" + taken: "已经被使用" + not_a_number: "不是数字" + not_an_integer: "必须是整数" + greater_than: "必须大于 %{count}" + greater_than_or_equal_to: "必须大于或等于 %{count}" + equal_to: "必须等于 %{count}" + less_than: "必须小于 %{count}" + less_than_or_equal_to: "必须小于或等于 %{count}" + odd: "必须为单数" + even: "必须为双数" + record_invalid: "校验失败: %{errors}" + taken: + 已占用 + document_not_found: + 没有发现类是 %{klass} ID 是 %{identifiers} 的文档 + invalid_database: + 数据库应该是Mongo::DB,而不是%{name}. + invalid_type: + 在类%{klass}中定义了字段,实际值是%{value}的%{other}. + unsupported_version: + MongoDB %{version} 版本已过期,请升级到 %{mongo_version}. + validations: + 校验失败 - %{errors}. + invalid_collection: + 不允许直接访问嵌入式的集合%{klass} , 请从文档的根访问集合. + invalid_field: + 字段的名字不允许为 %{name}. 你不应该定义跟Mongoid内部属性或者方法相同的名字,详细请看Use Document#instance_methods. + too_many_nested_attribute_records: + 被关联的%{association} 嵌入式属性不能超过 %{limit}. + embedded_in_must_have_inverse_of: + embedded_in的关联属性必须包含inverse_of. + dependent_only_references_one_or_many: + dependent => destroy|delete 选项只有在references_one或者references_many时候有效. + association_cant_have_inverse_of: + 在当前的关联中,不允许定义inverse_of去,其只有在embedded_in或者references_many是数组的情况下使用 + unsaved_document: + You cannot call create or create! through a relational association + relation (%{document}) who's parent (%{base}) is not already saved. + + + diff --git a/config/mongo.yml b/config/mongo.yml new file mode 100644 index 0000000..dd73076 --- /dev/null +++ b/config/mongo.yml @@ -0,0 +1,20 @@ +# config/mongo.yml + +defaults: &defaults + host: 127.0.0.1 + port: 27017 + +development: + <<: *defaults + database: iceylog-dev + +test: + <<: *defaults + database: iceylog-test + +# set these environment variables on your prod server +production: + <<: *defaults + database: iceylog-pro + # username: + # password: diff --git a/config/mongoid.yml b/config/mongoid.yml new file mode 100644 index 0000000..6f83976 --- /dev/null +++ b/config/mongoid.yml @@ -0,0 +1,20 @@ +development: + host: localhost + database: iceylog_development + +test: + host: localhost + database: iceylog_test + +# set these environment variables on your prod server +production: + host: <%= ENV['MONGOID_HOST'] %> + port: <%= ENV['MONGOID_PORT'] %> + username: <%= ENV['MONGOID_USERNAME'] %> + password: <%= ENV['MONGOID_PASSWORD'] %> + database: <%= ENV['MONGOID_DATABASE'] %> + # slaves: + # - host: slave1.local + # port: 27018 + # - host: slave2.local + # port: 27019 diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 0000000..3ecf486 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,82 @@ +Iceylog::Application.routes.draw do + + get "search/index" + + root :to => "index#index" + + resources :posts + match "posts/category/:id" => "posts#category", :as => :category_posts + + resources :pages, :path => "page" do + collection do + get :recent + end + end + + match "/search" => "search#index", :as => :search + + namespace :cpanel do + root :to => "home#index" + resources :site_configs + resources :posts + resources :pages + resources :categories + resources :sites + end + # The priority is based upon order of creation: + # first created -> highest priority. + + # Sample of regular route: + # match 'products/:id' => 'catalog#view' + # Keep in mind you can assign values other than :controller and :action + + # Sample of named route: + # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase + # This route can be invoked with purchase_url(:id => product.id) + + # Sample resource route (maps HTTP verbs to controller actions automatically): + # resources :products + + # Sample resource route with options: + # resources :products do + # member do + # get 'short' + # post 'toggle' + # end + # + # collection do + # get 'sold' + # end + # end + + # Sample resource route with sub-resources: + # resources :products do + # resources :comments, :sales + # resource :seller + # end + + # Sample resource route with more complex sub-resources + # resources :products do + # resources :comments + # resources :sales do + # get 'recent', :on => :collection + # end + # end + + # Sample resource route within a namespace: + # namespace :admin do + # # Directs /admin/products/* to Admin::ProductsController + # # (app/controllers/admin/products_controller.rb) + # resources :products + # end + + # You can have the root of your site routed with "root" + # just remember to delete public/index.html. + # root :to => 'welcome#index' + + # See how all your routes lay out with "rake routes" + + # This is a legacy wild controller route that's not recommended for RESTful applications. + # Note: This route will make all actions in every controller accessible via GET requests. + # match ':controller(/:action(/:id))(.:format)' +end diff --git a/db/seeds.rb b/db/seeds.rb new file mode 100644 index 0000000..cfcd195 --- /dev/null +++ b/db/seeds.rb @@ -0,0 +1,66 @@ +# coding: utf-8 + +# 默认配置项 +# 如需新增设置项,请在这里初始化默认值,然后到后台修改 + + +# site title ,slogan and author HTML +SiteConfig.save_default("site_title","Iceylog") +SiteConfig.save_default("site_slogan","Focus on Android,iPhone,Web,Business,Architecture,Agile,Technic and beyond…") +SiteConfig.save_default("site_author","Icey") +SiteConfig.save_default("site_author_username","iceylog") +SiteConfig.save_default("site_author_password","password") + +# Footer HTML +SiteConfig.save_default("about_me_html",<<-eos +
+

IceskYsl, 简称Ice, 80后, 典型巨蟹男, 移动互联网创业者; Google产品重度依赖者, Mac, Android, iPhone, BB 非典型用户;关注创新,技术,产品和一切新奇的玩意儿;
求学武汉, 毕业南下深圳, 尔后北漂在京, 至今数年有余; 追寻内心的想法, 不随波逐流, 爱折腾, 爱旅行, 孩子气, 享受工作, 安静的做喜欢的事情...

+
+eos +) + +# menu HTML +SiteConfig.save_default("menu_html",<<-eos + +eos +) + +# Footer HTML +SiteConfig.save_default("footer_html",<<-eos +

Copyright ©2007-2012 - Lovingly authored by IceskYsl - All my work is MIT licensed, Open and Free.

+

+ Powered by Iceylog - Theme by IceskYsl@1.s.t + - Build by Markdown, + GitHub, + Disqus +

+eos +) + + +#some default seeds +c = Category.create(:name => "默认分类") + +#pages +Page.create(:slug=>"about", :title => "About") +Page.create(:slug=>"book", :title => "Book") +Page.create(:slug=>"movie", :title => "Movie") +Page.create(:slug=>"music", :title => "Music") +Page.create(:slug=>"team", :title => "Team") +Page.create(:slug=>"travel", :title => "travel") +Page.create(:slug=>"toolkit", :title => "Toolkit") + +#Post +Post.create(:category_id => c.id, :title => "blog post title", :body => "This is a new post body,support **Markdown** format..",:tag_list => "demo,tag") + +#Site +Site.create(:name => "Iceskysl Blog",:url => "http://www.iceskysl.com") diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP new file mode 100644 index 0000000..fe41f5c --- /dev/null +++ b/doc/README_FOR_APP @@ -0,0 +1,2 @@ +Use this README file to introduce your application and point to useful places in the API for learning more. +Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. diff --git a/lib/assets/.gitkeep b/lib/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/lib/tasks/.gitkeep b/lib/tasks/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..9a48320 --- /dev/null +++ b/public/404.html @@ -0,0 +1,26 @@ + + + + The page you were looking for doesn't exist (404) + + + + + +
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+ + diff --git a/public/422.html b/public/422.html new file mode 100644 index 0000000..83660ab --- /dev/null +++ b/public/422.html @@ -0,0 +1,26 @@ + + + + The change you wanted was rejected (422) + + + + + +
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+ + diff --git a/public/500.html b/public/500.html new file mode 100644 index 0000000..f3648a0 --- /dev/null +++ b/public/500.html @@ -0,0 +1,25 @@ + + + + We're sorry, but something went wrong (500) + + + + + +
+

We're sorry, but something went wrong.

+
+ + diff --git a/public/assets b/public/assets new file mode 120000 index 0000000..67e5388 --- /dev/null +++ b/public/assets @@ -0,0 +1 @@ +../app/assets \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/images/SynIco.png b/public/images/SynIco.png new file mode 100644 index 0000000..d56ddd7 Binary files /dev/null and b/public/images/SynIco.png differ diff --git a/public/images/about-bkg.png b/public/images/about-bkg.png new file mode 100644 index 0000000..e9cec84 Binary files /dev/null and b/public/images/about-bkg.png differ diff --git a/public/images/body-bkg.png b/public/images/body-bkg.png new file mode 100644 index 0000000..5d06df0 Binary files /dev/null and b/public/images/body-bkg.png differ diff --git a/public/images/logo-symbol.png b/public/images/logo-symbol.png new file mode 100644 index 0000000..71eb750 Binary files /dev/null and b/public/images/logo-symbol.png differ diff --git a/public/images/rails.png b/public/images/rails.png new file mode 100644 index 0000000..d5edc04 Binary files /dev/null and b/public/images/rails.png differ diff --git a/public/images/search-bkg.png b/public/images/search-bkg.png new file mode 100644 index 0000000..89ba5da Binary files /dev/null and b/public/images/search-bkg.png differ diff --git a/public/images/search-button.png b/public/images/search-button.png new file mode 100644 index 0000000..54ababa Binary files /dev/null and b/public/images/search-button.png differ diff --git a/public/images/search-input.png b/public/images/search-input.png new file mode 100644 index 0000000..5cd366e Binary files /dev/null and b/public/images/search-input.png differ diff --git a/public/images/tabs-arrow.png b/public/images/tabs-arrow.png new file mode 100644 index 0000000..b849809 Binary files /dev/null and b/public/images/tabs-arrow.png differ diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..085187f --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,5 @@ +# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-Agent: * +# Disallow: / diff --git a/script/rails b/script/rails new file mode 100755 index 0000000..f8da2cf --- /dev/null +++ b/script/rails @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) +require 'rails/commands' diff --git a/test/fixtures/.gitkeep b/test/fixtures/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/fixtures/categories.yml b/test/fixtures/categories.yml new file mode 100644 index 0000000..c63aac0 --- /dev/null +++ b/test/fixtures/categories.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/fixtures/pages.yml b/test/fixtures/pages.yml new file mode 100644 index 0000000..1f0362f --- /dev/null +++ b/test/fixtures/pages.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + title: MyString + +two: + title: MyString diff --git a/test/fixtures/posts.yml b/test/fixtures/posts.yml new file mode 100644 index 0000000..1f0362f --- /dev/null +++ b/test/fixtures/posts.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +one: + title: MyString + +two: + title: MyString diff --git a/test/fixtures/settings.yml b/test/fixtures/settings.yml new file mode 100644 index 0000000..c63aac0 --- /dev/null +++ b/test/fixtures/settings.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/test/functional/.gitkeep b/test/functional/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/functional/cpanel/application_controller_test.rb b/test/functional/cpanel/application_controller_test.rb new file mode 100644 index 0000000..1af909f --- /dev/null +++ b/test/functional/cpanel/application_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class Cpanel::ApplicationControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/cpanel/categories_controller_test.rb b/test/functional/cpanel/categories_controller_test.rb new file mode 100644 index 0000000..faee066 --- /dev/null +++ b/test/functional/cpanel/categories_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class Cpanel::CategoriesControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/cpanel/home_controller_test.rb b/test/functional/cpanel/home_controller_test.rb new file mode 100644 index 0000000..a2c635b --- /dev/null +++ b/test/functional/cpanel/home_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class Cpanel::HomeControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/cpanel/pages_controller_test.rb b/test/functional/cpanel/pages_controller_test.rb new file mode 100644 index 0000000..63d4ba0 --- /dev/null +++ b/test/functional/cpanel/pages_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class Cpanel::PagesControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/cpanel/posts_controller_test.rb b/test/functional/cpanel/posts_controller_test.rb new file mode 100644 index 0000000..d72486a --- /dev/null +++ b/test/functional/cpanel/posts_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class Cpanel::PostsControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/cpanel/site_configs_controller_test.rb b/test/functional/cpanel/site_configs_controller_test.rb new file mode 100644 index 0000000..eb184b6 --- /dev/null +++ b/test/functional/cpanel/site_configs_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class Cpanel::SiteConfigsControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/cpanel/sites_controller_test.rb b/test/functional/cpanel/sites_controller_test.rb new file mode 100644 index 0000000..0da9434 --- /dev/null +++ b/test/functional/cpanel/sites_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class Cpanel::SitesControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/index_controller_test.rb b/test/functional/index_controller_test.rb new file mode 100644 index 0000000..708f66c --- /dev/null +++ b/test/functional/index_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class IndexControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/pages_controller_test.rb b/test/functional/pages_controller_test.rb new file mode 100644 index 0000000..bb84322 --- /dev/null +++ b/test/functional/pages_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PagesControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/posts_controller_test.rb b/test/functional/posts_controller_test.rb new file mode 100644 index 0000000..7a6ee4f --- /dev/null +++ b/test/functional/posts_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PostsControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb new file mode 100644 index 0000000..0ded3e5 --- /dev/null +++ b/test/functional/search_controller_test.rb @@ -0,0 +1,9 @@ +require 'test_helper' + +class SearchControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + end + +end diff --git a/test/integration/.gitkeep b/test/integration/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/performance/browsing_test.rb b/test/performance/browsing_test.rb new file mode 100644 index 0000000..3fea27b --- /dev/null +++ b/test/performance/browsing_test.rb @@ -0,0 +1,12 @@ +require 'test_helper' +require 'rails/performance_test_help' + +class BrowsingTest < ActionDispatch::PerformanceTest + # Refer to the documentation for all available options + # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory] + # :output => 'tmp/performance', :formats => [:flat] } + + def test_homepage + get '/' + end +end diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 0000000..8298517 --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,7 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path('../../config/environment', __FILE__) +require 'rails/test_help' + +class ActiveSupport::TestCase + # Add more helper methods to be used by all tests here... +end diff --git a/test/unit/.gitkeep b/test/unit/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/unit/category_test.rb b/test/unit/category_test.rb new file mode 100644 index 0000000..4733541 --- /dev/null +++ b/test/unit/category_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CategoryTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/helpers/cpanel/application_helper_test.rb b/test/unit/helpers/cpanel/application_helper_test.rb new file mode 100644 index 0000000..61684f5 --- /dev/null +++ b/test/unit/helpers/cpanel/application_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Cpanel::ApplicationHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/cpanel/categories_helper_test.rb b/test/unit/helpers/cpanel/categories_helper_test.rb new file mode 100644 index 0000000..11a433c --- /dev/null +++ b/test/unit/helpers/cpanel/categories_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Cpanel::CategoriesHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/cpanel/home_helper_test.rb b/test/unit/helpers/cpanel/home_helper_test.rb new file mode 100644 index 0000000..02ef553 --- /dev/null +++ b/test/unit/helpers/cpanel/home_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Cpanel::HomeHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/cpanel/pages_helper_test.rb b/test/unit/helpers/cpanel/pages_helper_test.rb new file mode 100644 index 0000000..fed76e7 --- /dev/null +++ b/test/unit/helpers/cpanel/pages_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Cpanel::PagesHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/cpanel/posts_helper_test.rb b/test/unit/helpers/cpanel/posts_helper_test.rb new file mode 100644 index 0000000..a8bdd48 --- /dev/null +++ b/test/unit/helpers/cpanel/posts_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Cpanel::PostsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/cpanel/site_configs_helper_test.rb b/test/unit/helpers/cpanel/site_configs_helper_test.rb new file mode 100644 index 0000000..beeebbc --- /dev/null +++ b/test/unit/helpers/cpanel/site_configs_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Cpanel::SiteConfigsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/cpanel/sites_helper_test.rb b/test/unit/helpers/cpanel/sites_helper_test.rb new file mode 100644 index 0000000..817bc57 --- /dev/null +++ b/test/unit/helpers/cpanel/sites_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Cpanel::SitesHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/index_helper_test.rb b/test/unit/helpers/index_helper_test.rb new file mode 100644 index 0000000..104f529 --- /dev/null +++ b/test/unit/helpers/index_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class IndexHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/pages_helper_test.rb b/test/unit/helpers/pages_helper_test.rb new file mode 100644 index 0000000..535dfe1 --- /dev/null +++ b/test/unit/helpers/pages_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class PagesHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/posts_helper_test.rb b/test/unit/helpers/posts_helper_test.rb new file mode 100644 index 0000000..48549c2 --- /dev/null +++ b/test/unit/helpers/posts_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class PostsHelperTest < ActionView::TestCase +end diff --git a/test/unit/helpers/search_helper_test.rb b/test/unit/helpers/search_helper_test.rb new file mode 100644 index 0000000..3034163 --- /dev/null +++ b/test/unit/helpers/search_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class SearchHelperTest < ActionView::TestCase +end diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb new file mode 100644 index 0000000..e7400b9 --- /dev/null +++ b/test/unit/page_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PageTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb new file mode 100644 index 0000000..6d9d463 --- /dev/null +++ b/test/unit/post_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PostTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/setting_test.rb b/test/unit/setting_test.rb new file mode 100644 index 0000000..2d91c71 --- /dev/null +++ b/test/unit/setting_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class SettingTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/vendor/assets/javascripts/.gitkeep b/vendor/assets/javascripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/vendor/assets/stylesheets/.gitkeep b/vendor/assets/stylesheets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/vendor/plugins/.gitkeep b/vendor/plugins/.gitkeep new file mode 100644 index 0000000..e69de29