├── .env
├── .env.test
├── .gitignore
├── .rspec
├── .travis.yml
├── Gemfile
├── Gemfile.lock
├── Guardfile
├── Procfile
├── README.md
├── Rakefile
├── Vagrantfile
├── app
├── assets
│ ├── images
│ │ ├── auth
│ │ │ ├── facebook_active.png
│ │ │ ├── facebook_pressed.png
│ │ │ ├── google_active.png
│ │ │ ├── google_hover.png
│ │ │ └── google_pressed.png
│ │ ├── blogs
│ │ │ ├── backpageblogs-banner.jpg
│ │ │ ├── backpageblogs-logo.jpg
│ │ │ ├── bigblog-banner.jpg
│ │ │ ├── bigblog-logo.jpg
│ │ │ ├── bluezone-banner.jpg
│ │ │ ├── bluezone-logo.jpg
│ │ │ ├── newsblog-banner.jpg
│ │ │ ├── playground-banner.jpg
│ │ │ ├── playground-logo.jpg
│ │ │ └── sportsblog-banner.jpg
│ │ ├── chapel.svg
│ │ ├── gfx
│ │ │ ├── arrow-down-small.png
│ │ │ ├── arrow-down.png
│ │ │ ├── arrow-left-small.png
│ │ │ ├── arrow-left.png
│ │ │ ├── arrow-right-small.png
│ │ │ ├── arrow-right.png
│ │ │ ├── arrow-up-small.png
│ │ │ └── arrow-up.png
│ │ ├── icons
│ │ │ ├── camera.png
│ │ │ ├── comment.png
│ │ │ ├── currents.png
│ │ │ ├── email.png
│ │ │ ├── facebook.png
│ │ │ ├── google.png
│ │ │ ├── print.png
│ │ │ ├── read.png
│ │ │ ├── rss.png
│ │ │ ├── search.png
│ │ │ ├── twitter.png
│ │ │ └── youtube.png
│ │ ├── logo
│ │ │ ├── 114x114.png
│ │ │ ├── 128x128.png
│ │ │ ├── 144x144.png
│ │ │ ├── 16x16.ico
│ │ │ ├── 16x16.png
│ │ │ ├── 300x300.png
│ │ │ ├── 32x32.png
│ │ │ ├── 57x57.png
│ │ │ ├── 64x64.png
│ │ │ ├── 72x72.png
│ │ │ ├── 75x75.png
│ │ │ ├── 96x96.png
│ │ │ └── round.png
│ │ ├── mobile
│ │ │ ├── ajax-loader.gif
│ │ │ ├── icons-18-black.png
│ │ │ ├── icons-18-white.png
│ │ │ ├── icons-36-black.png
│ │ │ └── icons-36-white.png
│ │ ├── newsletter
│ │ │ ├── alert_header.png
│ │ │ └── daily_header.png
│ │ └── social-media
│ │ │ ├── facebook.png
│ │ │ └── twitter.png
│ ├── javascripts
│ │ ├── admin.js
│ │ ├── admin
│ │ │ ├── article-picker.js.coffee
│ │ │ ├── crop.js.coffee
│ │ │ ├── form-field.js.coffee
│ │ │ ├── image-picker.js.coffee
│ │ │ ├── image-selector.js.coffee
│ │ │ ├── image.js.coffee
│ │ │ ├── newsletter.js.coffee
│ │ │ ├── page-layout.js.coffee
│ │ │ ├── staff-picker.js.coffee
│ │ │ ├── taxonomy-select.js.coffee
│ │ │ ├── upload.js.coffee
│ │ │ ├── widgets.js.coffee
│ │ │ ├── widgets
│ │ │ │ ├── image.js.coffee
│ │ │ │ ├── oembed.js.coffee
│ │ │ │ └── poll.js.coffee
│ │ │ └── wysiwyg.js.coffee
│ │ ├── beta.js
│ │ ├── beta
│ │ │ ├── admin-panel.js.coffee
│ │ │ ├── align.js.coffee
│ │ │ ├── author-box.js.coffee
│ │ │ ├── collection-views
│ │ │ │ └── topic-response.js.coffee
│ │ │ ├── collections
│ │ │ │ ├── game.js.coffee
│ │ │ │ └── topic-response.js.coffee
│ │ │ ├── dboard.js.coffee
│ │ │ ├── disqus.js.coffee
│ │ │ ├── facebook.js.coffee
│ │ │ ├── featured-selectable.js.coffee
│ │ │ ├── gallery.js.coffee.erb
│ │ │ ├── item-views
│ │ │ │ ├── poll.js.coffee
│ │ │ │ └── topic-response.js.coffee
│ │ │ ├── masonry.js.coffee
│ │ │ ├── models
│ │ │ │ ├── bracket.js.coffee
│ │ │ │ ├── game.js.coffee
│ │ │ │ ├── poll.js.coffee
│ │ │ │ ├── team.js.coffee
│ │ │ │ ├── topic-response.js.coffee
│ │ │ │ └── tournament.js.coffee
│ │ │ ├── navscroll.js.coffee
│ │ │ ├── poll.js.coffee
│ │ │ ├── slideshow.js.coffee.erb
│ │ │ ├── sports-event-info.js.coffee
│ │ │ ├── templates
│ │ │ │ ├── bracket-game.jst.jade
│ │ │ │ ├── bracket.jst.jade
│ │ │ │ ├── game-preview.jst.jade
│ │ │ │ ├── game.jst.jade
│ │ │ │ ├── poll-form.jst.jade
│ │ │ │ ├── poll-results.jst.jade
│ │ │ │ ├── social-share.jst.jade
│ │ │ │ └── topic-response.jst.jade
│ │ │ ├── tournaments.js.coffee
│ │ │ ├── views
│ │ │ │ ├── bracket-game.js.coffee
│ │ │ │ ├── bracket-lines.js.coffee
│ │ │ │ ├── bracket.js.coffee
│ │ │ │ └── game.js.coffee
│ │ │ └── widgets.js
│ │ ├── common
│ │ │ ├── analytics.js.coffee.erb
│ │ │ ├── local-time.js.coffee
│ │ │ └── social-media.js.coffee
│ │ ├── galleria
│ │ │ └── themes
│ │ │ │ ├── chronicle
│ │ │ │ ├── circ.png
│ │ │ │ ├── classic-demo.html
│ │ │ │ ├── classic-loader.gif
│ │ │ │ ├── classic-map.png
│ │ │ │ ├── dots.png
│ │ │ │ ├── galleria.chronicle.css
│ │ │ │ └── galleria.chronicle.js.erb
│ │ │ │ ├── gallery
│ │ │ │ ├── circ.png
│ │ │ │ ├── classic-demo.html
│ │ │ │ ├── classic-loader.gif
│ │ │ │ ├── classic-map.png
│ │ │ │ ├── dots.png
│ │ │ │ ├── galleria.gallery.css
│ │ │ │ └── galleria.gallery.js.erb
│ │ │ │ └── miniml
│ │ │ │ ├── bg.png
│ │ │ │ ├── bye.png
│ │ │ │ ├── circ.png
│ │ │ │ ├── exit.png
│ │ │ │ ├── fs.png
│ │ │ │ ├── info.png
│ │ │ │ ├── loader.gif
│ │ │ │ └── thumb.png
│ │ ├── initialize.js.coffee
│ │ ├── mobile.js
│ │ ├── mobile
│ │ │ ├── full-site.js.coffee
│ │ │ └── section.js.coffee
│ │ ├── site.js
│ │ ├── site
│ │ │ ├── author-box.js.coffee
│ │ │ ├── collection-views
│ │ │ │ └── topic-response.js.coffee
│ │ │ ├── collections
│ │ │ │ ├── game.js.coffee
│ │ │ │ └── topic-response.js.coffee
│ │ │ ├── dboard.js.coffee
│ │ │ ├── disqus.js.coffee
│ │ │ ├── item-views
│ │ │ │ ├── poll.js.coffee
│ │ │ │ └── topic-response.js.coffee
│ │ │ ├── masonry.js.coffee
│ │ │ ├── models
│ │ │ │ ├── bracket.js.coffee
│ │ │ │ ├── game.js.coffee
│ │ │ │ ├── poll.js.coffee
│ │ │ │ ├── team.js.coffee
│ │ │ │ ├── topic-response.js.coffee
│ │ │ │ └── tournament.js.coffee
│ │ │ ├── poll.js.coffee
│ │ │ ├── templates
│ │ │ │ ├── bracket-game.jst.jade
│ │ │ │ ├── bracket.jst.jade
│ │ │ │ ├── game-preview.jst.jade
│ │ │ │ ├── game.jst.jade
│ │ │ │ ├── poll-form.jst.jade
│ │ │ │ ├── poll-results.jst.jade
│ │ │ │ └── topic-response.jst.jade
│ │ │ ├── tournaments.js.coffee
│ │ │ └── views
│ │ │ │ ├── bracket-game.js.coffee
│ │ │ │ ├── bracket-lines.js.coffee
│ │ │ │ ├── bracket.js.coffee
│ │ │ │ └── game.js.coffee
│ │ └── util.js.coffee
│ └── stylesheets
│ │ ├── 404.css.sass
│ │ ├── admin.css.sass
│ │ ├── admin
│ │ ├── articles.css.scss
│ │ ├── image-picker.css.sass
│ │ ├── main.css.scss
│ │ └── staff.css.scss
│ │ ├── beta.css.sass
│ │ ├── beta
│ │ ├── admin-panel.css.sass
│ │ ├── advertisement.css.sass
│ │ ├── article.css.sass
│ │ ├── blog-post.css.sass
│ │ ├── blog.css.sass
│ │ ├── brackets.css.sass
│ │ ├── buttons.css.sass
│ │ ├── coach-k.css.sass
│ │ ├── container.css.sass
│ │ ├── containers
│ │ │ ├── article-box.css.sass
│ │ │ ├── article-list.css.sass
│ │ │ ├── article-row.css.sass
│ │ │ ├── block.css.sass
│ │ │ ├── blog-info.css.sass
│ │ │ ├── facebook-recommended.css.sass
│ │ │ ├── multimedia-row.css.sass
│ │ │ ├── multiplexer.css.sass
│ │ │ ├── opinion.css.sass
│ │ │ └── sports-event-info.css.sass
│ │ ├── embedded-media.css.sass
│ │ ├── featured-selectable.css.sass
│ │ ├── footer.css.sass
│ │ ├── form.css.sass
│ │ ├── gallery.css.sass
│ │ ├── game-preview.css.sass
│ │ ├── games.css.sass
│ │ ├── glyphicon.css.scss
│ │ ├── header.css.sass
│ │ ├── large-embed.css.sass
│ │ ├── layout.css.sass
│ │ ├── mixins.sass
│ │ ├── pagination.css.sass
│ │ ├── partials
│ │ │ ├── _base.css.scss
│ │ │ └── _facebook-social-share.css.sass
│ │ ├── poll.css.sass
│ │ ├── search.css.sass
│ │ ├── staff.css.sass
│ │ ├── topic.css.sass
│ │ ├── topic_responses.css.sass
│ │ ├── tournaments.css.sass
│ │ └── video-player.css.sass
│ │ ├── error.css.scss
│ │ ├── ie.css.sass
│ │ ├── mobile.css.sass
│ │ ├── mobile
│ │ ├── advertisement.css.sass
│ │ ├── articles.css.sass
│ │ ├── blog-post.css.sass
│ │ ├── chapel.css.sass
│ │ ├── header.css.sass
│ │ ├── images.css.sass
│ │ └── themes
│ │ │ └── chronline.css.erb
│ │ ├── print.css.sass
│ │ ├── site.css.sass
│ │ ├── site
│ │ ├── admin-panel.css.sass
│ │ ├── advertisement.css.sass
│ │ ├── article.css.sass
│ │ ├── blog.css.sass
│ │ ├── brackets.css.sass
│ │ ├── coach_k.css.sass
│ │ ├── containers
│ │ │ ├── article-list.css.sass
│ │ │ ├── article-row.css.sass
│ │ │ ├── sports-event-info.css.sass
│ │ │ └── sports-standings.css.sass
│ │ ├── embedded-media.css.sass
│ │ ├── footer.css.sass
│ │ ├── form.css.sass
│ │ ├── game-preview.css.sass
│ │ ├── games.css.sass
│ │ ├── header.css.sass
│ │ ├── layout.css.sass
│ │ ├── mobile
│ │ │ └── advertisement.css.sass
│ │ ├── multiplexer.css.sass
│ │ ├── opinion.css.sass
│ │ ├── page.css.sass
│ │ ├── partials
│ │ │ ├── _article-grid.css.sass
│ │ │ ├── _columns.css.sass
│ │ │ ├── _multimedia-row.css.sass
│ │ │ ├── _section_page-slideshow.css.sass
│ │ │ └── _top-headline.css.sass
│ │ ├── poll.css.sass
│ │ ├── search.css.sass
│ │ ├── sponsor.css.sass
│ │ ├── staff.css.sass
│ │ ├── topic.css.sass
│ │ ├── topic_responses.css.sass
│ │ ├── tournaments.css.sass
│ │ └── variables.css.sass
│ │ └── themes
│ │ └── jquery-ui
│ │ └── chronicle
│ │ ├── images
│ │ ├── animated-overlay.gif
│ │ ├── ui-bg_flat_0_aaaaaa_40x100.png
│ │ ├── ui-bg_flat_0_eee_40x100.png
│ │ ├── ui-bg_flat_75_ffffff_40x100.png
│ │ ├── ui-bg_glass_65_fff_1x400.png
│ │ ├── ui-bg_glass_75_eee_1x400.png
│ │ ├── ui-bg_glass_75_fff_1x400.png
│ │ ├── ui-bg_glass_95_fef1ec_1x400.png
│ │ ├── ui-bg_highlight-soft_75_069_1x100.png
│ │ ├── ui-icons_069_256x240.png
│ │ ├── ui-icons_222_256x240.png
│ │ ├── ui-icons_36c_256x240.png
│ │ ├── ui-icons_4D90F0_256x240.png
│ │ ├── ui-icons_cd0a0a_256x240.png
│ │ └── ui-icons_eee_256x240.png
│ │ └── jquery-ui-1.10.2.custom.css.erb
├── controllers
│ ├── admin
│ │ ├── articles_controller.rb
│ │ ├── base_controller.rb
│ │ ├── blog_posts_controller.rb
│ │ ├── blog_series_controller.rb
│ │ ├── galleries_controller.rb
│ │ ├── images_controller.rb
│ │ ├── main_controller.rb
│ │ ├── newsletter_controller.rb
│ │ ├── pages_controller.rb
│ │ ├── polls_controller.rb
│ │ ├── sitevars_controller.rb
│ │ ├── staff_controller.rb
│ │ ├── topic_responses_controller.rb
│ │ ├── topics_controller.rb
│ │ ├── tournament_teams_controller.rb
│ │ ├── tournaments_controller.rb
│ │ ├── users_controller.rb
│ │ └── widgets_controller.rb
│ ├── api
│ │ ├── articles_controller.rb
│ │ ├── base_controller.rb
│ │ ├── blog_posts_controller.rb
│ │ ├── images_controller.rb
│ │ ├── posts_controller.rb
│ │ ├── qduke_controller.rb
│ │ ├── searches_controller.rb
│ │ ├── staff_controller.rb
│ │ ├── taxonomy_controller.rb
│ │ └── topic_responses_controller.rb
│ ├── application_controller.rb
│ ├── beta
│ │ ├── articles_controller.rb
│ │ ├── base_controller.rb
│ │ ├── blog_posts_controller.rb
│ │ ├── galleries_controller.rb
│ │ ├── images_controller.rb
│ │ ├── newsletters_controller.rb
│ │ ├── polls_controller.rb
│ │ ├── searches_controller.rb
│ │ ├── staff_controller.rb
│ │ ├── topics_controller.rb
│ │ ├── tournament_brackets_controller.rb
│ │ └── tournaments_controller.rb
│ ├── mobile
│ │ ├── articles_controller.rb
│ │ ├── base_controller.rb
│ │ ├── blog_posts_controller.rb
│ │ └── searches_controller.rb
│ ├── posts_controller.rb
│ ├── robots_controller.rb
│ ├── rss
│ │ ├── articles_controller.rb
│ │ └── blog_posts_controller.rb
│ └── site
│ │ ├── articles_controller.rb
│ │ ├── base_controller.rb
│ │ ├── blog_posts_controller.rb
│ │ ├── newsletters_controller.rb
│ │ ├── polls_controller.rb
│ │ ├── searches_controller.rb
│ │ ├── staff_controller.rb
│ │ ├── tournament_brackets_controller.rb
│ │ ├── tournaments_controller.rb
│ │ └── users_controller.rb
├── helpers
│ ├── admin
│ │ ├── articles_helper.rb
│ │ ├── image_helper.rb
│ │ ├── pages_helper.rb
│ │ └── staff_helper.rb
│ ├── application_helper.rb
│ ├── article_helper.rb
│ ├── blog_post_helper.rb
│ ├── gallery_helper.rb
│ ├── image_helper.rb
│ ├── post_helper.rb
│ ├── rss
│ │ └── application_helper.rb
│ ├── site
│ │ ├── advertisement_helper.rb
│ │ ├── application_helper.rb
│ │ └── poll_helper.rb
│ ├── social_media_helper.rb
│ ├── taxonomy_helper.rb
│ ├── topics_helper.rb
│ └── tournaments_helper.rb
├── inputs
│ ├── body_image_input.rb
│ ├── date_time_input.rb
│ ├── image_picker_input.rb
│ ├── input_value_helper.rb
│ ├── string_input.rb
│ ├── taxonomy_input.rb
│ └── text_list_input.rb
├── mailers
│ ├── .gitkeep
│ ├── newsletter_mailer.rb
│ └── tournament_bracket_mailer.rb
├── models
│ ├── article.rb
│ ├── blog.rb
│ ├── blog
│ │ ├── post.rb
│ │ ├── serializer.rb
│ │ └── series.rb
│ ├── gallery.rb
│ ├── gallery
│ │ └── image.rb
│ ├── image.rb
│ ├── newsletter.rb
│ ├── newsletter
│ │ └── renderer.rb
│ ├── page.rb
│ ├── page
│ │ ├── layouts.rb
│ │ ├── layouts
│ │ │ ├── article_grid.rb
│ │ │ ├── bracket.rb
│ │ │ ├── coach_k.rb
│ │ │ ├── commencement.rb
│ │ │ ├── frontpage.rb
│ │ │ ├── gallery.rb
│ │ │ ├── large_embed.rb
│ │ │ ├── news.rb
│ │ │ ├── newsletter.rb
│ │ │ ├── opinion.rb
│ │ │ ├── recess.rb
│ │ │ ├── recess2.rb
│ │ │ ├── recruitment.rb
│ │ │ ├── section.rb
│ │ │ ├── send_home.rb
│ │ │ ├── simple_slideshow.rb
│ │ │ ├── single_block.rb
│ │ │ ├── special_topic.rb
│ │ │ ├── sponsor.rb
│ │ │ ├── sport.rb
│ │ │ ├── sports.rb
│ │ │ ├── sports2.rb
│ │ │ ├── sports_event.rb
│ │ │ ├── staff_highlight.rb
│ │ │ ├── towerview.rb
│ │ │ └── video_slideshow.rb
│ │ ├── template.rb
│ │ └── template
│ │ │ └── single_block.rb
│ ├── poll.rb
│ ├── poll
│ │ └── choice.rb
│ ├── post.rb
│ ├── post
│ │ ├── embedded_media.rb
│ │ └── embedded_media
│ │ │ ├── image_tag.rb
│ │ │ ├── instagram_tag.rb
│ │ │ ├── poll_tag.rb
│ │ │ ├── quote_tag.rb
│ │ │ ├── scribd_tag.rb
│ │ │ ├── soundcloud_tag.rb
│ │ │ ├── spotify_tag.rb
│ │ │ ├── tag.rb
│ │ │ ├── twitter_tag.rb
│ │ │ ├── vimeo_tag.rb
│ │ │ ├── vine_tag.rb
│ │ │ └── youtube_tag.rb
│ ├── search.rb
│ ├── staff.rb
│ ├── topic.rb
│ ├── topic
│ │ └── response.rb
│ ├── tournament.rb
│ ├── tournament
│ │ ├── bracket.rb
│ │ ├── game.rb
│ │ └── team.rb
│ └── user.rb
├── sweepers
│ ├── article_sweeper.rb
│ ├── base_sweeper.rb
│ ├── blog_post_sweeper.rb
│ ├── image_sweeper.rb
│ ├── page_sweeper.rb
│ └── staff_sweeper.rb
├── views
│ ├── admin
│ │ ├── articles
│ │ │ ├── _form.html.haml
│ │ │ ├── edit.html.haml
│ │ │ ├── index.html.haml
│ │ │ └── new.html.haml
│ │ ├── blog_posts
│ │ │ ├── _form.html.haml
│ │ │ ├── edit.html.haml
│ │ │ ├── index.html.haml
│ │ │ └── new.html.haml
│ │ ├── blog_series
│ │ │ ├── _form.html.haml
│ │ │ ├── edit.html.haml
│ │ │ ├── index.html.haml
│ │ │ └── new.html.haml
│ │ ├── galleries
│ │ │ ├── _form.html.haml
│ │ │ ├── edit.html.haml
│ │ │ └── index.html.haml
│ │ ├── images
│ │ │ ├── edit.html.haml
│ │ │ ├── index.html.haml
│ │ │ └── upload.html.erb
│ │ ├── main
│ │ │ └── home.html.haml
│ │ ├── newsletter
│ │ │ └── show.html.haml
│ │ ├── pages
│ │ │ ├── form.html.haml
│ │ │ └── index.html.haml
│ │ ├── partials
│ │ │ ├── _flash.html.haml
│ │ │ └── _header.html.haml
│ │ ├── polls
│ │ │ ├── _form.html.haml
│ │ │ ├── _table.html.haml
│ │ │ ├── edit.html.haml
│ │ │ ├── index.html.haml
│ │ │ └── new.html.haml
│ │ ├── sitevars
│ │ │ └── show.html.haml
│ │ ├── staff
│ │ │ ├── _form.html.haml
│ │ │ ├── edit.html.haml
│ │ │ ├── index.html.haml
│ │ │ └── new.html.haml
│ │ ├── topics
│ │ │ ├── _table.html.haml
│ │ │ ├── edit.html.haml
│ │ │ ├── index.html.haml
│ │ │ ├── new.html.haml
│ │ │ └── show.html.haml
│ │ ├── tournament_teams
│ │ │ ├── _form.html.haml
│ │ │ ├── edit.html.haml
│ │ │ └── new.html.haml
│ │ ├── tournaments
│ │ │ ├── _form.html.haml
│ │ │ ├── edit.html.haml
│ │ │ ├── index.html.haml
│ │ │ ├── new.html.haml
│ │ │ └── show.html.haml
│ │ ├── users
│ │ │ ├── index.html.haml
│ │ │ └── show.html.haml
│ │ └── widgets
│ │ │ └── index.html.haml
│ ├── application
│ │ └── unauthorized.html.haml
│ ├── beta
│ │ ├── 404.html.haml
│ │ ├── articles
│ │ │ ├── _subtitle.html.haml
│ │ │ ├── index.html.haml
│ │ │ ├── print.html.haml
│ │ │ └── show.html.haml
│ │ ├── blog_posts
│ │ │ ├── _blog.html.haml
│ │ │ ├── _index.html.haml
│ │ │ ├── _tags.html.haml
│ │ │ ├── index.html.haml
│ │ │ ├── show.html.haml
│ │ │ └── tags.html.haml
│ │ ├── blogs
│ │ │ └── index.html.haml
│ │ ├── containers
│ │ │ ├── _article-box.html.haml
│ │ │ ├── _article-list.html.haml
│ │ │ ├── _article-row.html.haml
│ │ │ ├── _author-box.html.haml
│ │ │ ├── _blog-box.html.haml
│ │ │ ├── _columns.html.haml
│ │ │ ├── _featured-bracket.html.haml
│ │ │ ├── _featured-selectable.html.haml
│ │ │ ├── _image.html.haml
│ │ │ ├── _multimedia-row.html.haml
│ │ │ ├── _multiplexer.html.haml
│ │ │ ├── _poll.html.haml
│ │ │ ├── _sports-standings.html.haml
│ │ │ ├── _staff-profile.html.haml
│ │ │ ├── _topic.html.haml
│ │ │ ├── _twitter-timeline.html.haml
│ │ │ ├── _two-column-article-list.html.haml
│ │ │ ├── article-list
│ │ │ │ ├── _disqus.html.haml
│ │ │ │ ├── _featured.html.haml
│ │ │ │ ├── _numbered.html.haml
│ │ │ │ ├── _page.html.haml
│ │ │ │ ├── _rss.html.haml
│ │ │ │ ├── _single.html.haml
│ │ │ │ ├── _subhead.html.haml
│ │ │ │ └── _teaser.html.haml
│ │ │ ├── article-row
│ │ │ │ ├── _teaser.html.haml
│ │ │ │ └── _title.html.haml
│ │ │ └── block
│ │ │ │ ├── _featured.html.haml
│ │ │ │ ├── _square.html.haml
│ │ │ │ ├── _thumbnail.html.haml
│ │ │ │ └── _wide.html.haml
│ │ ├── galleries
│ │ │ ├── index.html.haml
│ │ │ └── show.html.haml
│ │ ├── newsletters
│ │ │ ├── _alt.html.erb
│ │ │ └── show.html.haml
│ │ ├── pages
│ │ │ ├── article_grid.html.haml
│ │ │ ├── bracket.html.haml
│ │ │ ├── coach_k.html.haml
│ │ │ ├── commencement.html.haml
│ │ │ ├── frontpage.html.haml
│ │ │ ├── gallery.html.haml
│ │ │ ├── large_embed.html.haml
│ │ │ ├── news.html.haml
│ │ │ ├── opinion.html.haml
│ │ │ ├── recess.html.haml
│ │ │ ├── recruitment.html.haml
│ │ │ ├── send_home.html.haml
│ │ │ ├── simple_slideshow.html.haml
│ │ │ ├── single_block.html.haml
│ │ │ ├── special_topic.html.haml
│ │ │ ├── sport.html.haml
│ │ │ ├── sports.html.haml
│ │ │ ├── sports_event.html.haml
│ │ │ ├── staff_highlight.html.haml
│ │ │ ├── towerview.html.haml
│ │ │ └── video_slideshow.html.haml
│ │ ├── partials
│ │ │ ├── _admin-panel.html.haml
│ │ │ ├── _admin_notification.html.haml
│ │ │ ├── _advertisement.html.haml
│ │ │ ├── _advertisement_tag.html.haml
│ │ │ ├── _blog-info.html.haml
│ │ │ ├── _blog_navigation.html.haml
│ │ │ ├── _facebook-recommended.html.haml
│ │ │ ├── _flash.html.haml
│ │ │ ├── _footer.html.haml
│ │ │ ├── _gallery_navigation.html.haml
│ │ │ ├── _header.html.haml
│ │ │ ├── _image_slideshow.html.haml
│ │ │ ├── _large-photoshelter-slideshow.html.haml
│ │ │ ├── _navigation.html.haml
│ │ │ ├── _openx.html.haml
│ │ │ ├── _search.html.haml
│ │ │ ├── _share-box.html.haml
│ │ │ ├── _slideshow.html.haml
│ │ │ ├── _small-photoshelter-slideshow.html.haml
│ │ │ ├── _sports-event-info.html.haml
│ │ │ ├── _twitter-timeline.html.haml
│ │ │ ├── _video.html.haml
│ │ │ ├── _widgets.html.haml
│ │ │ ├── open-graph
│ │ │ │ ├── _facebook-app.html.haml
│ │ │ │ ├── _post.html.haml
│ │ │ │ └── _staff.html.haml
│ │ │ └── twitter_cards
│ │ │ │ └── _post.html.haml
│ │ ├── searches
│ │ │ ├── _article.html.haml
│ │ │ ├── _blog_post.html.haml
│ │ │ ├── _result.html.haml
│ │ │ └── show.html.haml
│ │ ├── staff
│ │ │ ├── images.html.haml
│ │ │ ├── posts.html.haml
│ │ │ └── show.html.haml
│ │ ├── topics
│ │ │ ├── _form.html.haml
│ │ │ ├── index.html.haml
│ │ │ └── show.html.haml
│ │ ├── tournament_brackets
│ │ │ ├── new.html.haml
│ │ │ └── show.html.haml
│ │ └── tournaments
│ │ │ ├── challenge.html.haml
│ │ │ ├── leaderboard.html.haml
│ │ │ └── show.html.haml
│ ├── devise
│ │ ├── mailer
│ │ │ └── reset_password_instructions.html.haml
│ │ ├── passwords
│ │ │ ├── edit.html.haml
│ │ │ └── new.html.haml
│ │ ├── registrations
│ │ │ ├── edit.html.haml
│ │ │ └── new.html.haml
│ │ ├── sessions
│ │ │ └── new.html.slim
│ │ └── shared
│ │ │ └── _links.html.haml
│ ├── layouts
│ │ ├── admin.html.haml
│ │ ├── beta.html.haml
│ │ ├── error.html.haml
│ │ ├── mobile.html.haml
│ │ ├── print.html.haml
│ │ └── site.html.slim
│ ├── mobile
│ │ ├── 404.html.haml
│ │ ├── articles
│ │ │ ├── index.html.haml
│ │ │ ├── search.html.haml
│ │ │ └── show.html.haml
│ │ ├── blog_posts
│ │ │ ├── index.html.haml
│ │ │ └── show.html.haml
│ │ ├── blogs
│ │ │ └── index.html.haml
│ │ ├── partials
│ │ │ ├── _advertisement.html.haml
│ │ │ ├── _footer.html.haml
│ │ │ ├── _header.html.haml
│ │ │ ├── _search-dialog.html.haml
│ │ │ └── _section-navigation.html.haml
│ │ └── searches
│ │ │ ├── _article.html.haml
│ │ │ ├── _blog_post.html.haml
│ │ │ ├── _result.html.haml
│ │ │ └── show.html.haml
│ ├── newsletter_mailer
│ │ ├── advertisement.html.haml
│ │ ├── article.html.haml
│ │ ├── daily.html.haml
│ │ ├── featured.html.haml
│ │ └── header_image.html.haml
│ ├── partials
│ │ ├── _blog_image.html.slim
│ │ ├── _failwhale.html.haml
│ │ ├── _favicon.html.slim
│ │ ├── _google_analytics.html.slim
│ │ ├── _jumbotron_default.html.slim
│ │ ├── _main_image.html.slim
│ │ ├── _main_video.html.slim
│ │ └── _quantcast.html.slim
│ ├── robots
│ │ ├── admin.txt
│ │ ├── api.txt
│ │ ├── mobile.txt
│ │ └── rss.txt
│ ├── rss
│ │ ├── articles
│ │ │ └── index.builder
│ │ └── posts
│ │ │ └── index.builder
│ ├── site
│ │ ├── 404.html.slim
│ │ ├── articles
│ │ │ ├── _subtitle.html.slim
│ │ │ ├── index.html.slim
│ │ │ └── show.html.slim
│ │ ├── blog_posts
│ │ │ ├── _index.html.slim
│ │ │ ├── _tags.html.slim
│ │ │ ├── index.html.slim
│ │ │ ├── show.html.slim
│ │ │ └── tags.html.slim
│ │ ├── blogs
│ │ │ └── index.html.slim
│ │ ├── containers
│ │ │ ├── _article_list.html.slim
│ │ │ ├── _article_row.html.slim
│ │ │ ├── _columns.html.slim
│ │ │ ├── _featured_bracket.html.slim
│ │ │ ├── _poll.html.slim
│ │ │ ├── _sports_standings.html.slim
│ │ │ ├── _staff_profile.html.slim
│ │ │ ├── _topic.html.slim
│ │ │ ├── article_list
│ │ │ │ ├── _featured.html.slim
│ │ │ │ ├── _numbered.html.slim
│ │ │ │ ├── _social_image.html.slim
│ │ │ │ ├── _taxonomy_list.html.slim
│ │ │ │ └── _teaser.html.slim
│ │ │ └── block
│ │ │ │ └── _article_square.html.slim
│ │ ├── newsletters
│ │ │ ├── _alt.html.erb
│ │ │ └── show.html.slim
│ │ ├── pages
│ │ │ ├── article_grid.html.slim
│ │ │ ├── coach_k.html.slim
│ │ │ ├── commencement.html.slim
│ │ │ ├── frontpage.html.slim
│ │ │ ├── news.html.slim
│ │ │ ├── opinion.html.slim
│ │ │ ├── recess2.html.slim
│ │ │ ├── section.html.slim
│ │ │ ├── simple_slideshow.html.slim
│ │ │ ├── single_block.html.haml
│ │ │ ├── sponsor.html.slim
│ │ │ ├── sport.html.slim
│ │ │ ├── sports2.html.slim
│ │ │ ├── staff_highlight.html.slim
│ │ │ └── towerview.html.slim
│ │ ├── partials
│ │ │ ├── _admin_notification.html.slim
│ │ │ ├── _admin_panel.html.slim
│ │ │ ├── _advertisement.html.slim
│ │ │ ├── _article_grid.html.slim
│ │ │ ├── _article_horizontal_list.html.slim
│ │ │ ├── _author_box.html.slim
│ │ │ ├── _blog_info.html.slim
│ │ │ ├── _facebook_recommended.html.slim
│ │ │ ├── _feature_social.html.slim
│ │ │ ├── _flash.html.slim
│ │ │ ├── _footer.html.slim
│ │ │ ├── _header.html.slim
│ │ │ ├── _image_placeholder.html.slim
│ │ │ ├── _multimedia_row.html.slim
│ │ │ ├── _openx.html.slim
│ │ │ ├── _page_article_vertical_list.html.slim
│ │ │ ├── _search.html.slim
│ │ │ ├── _section_gallery_top.html.slim
│ │ │ ├── _section_page_slideshow.html.slim
│ │ │ ├── _sports_event_info.html.slim
│ │ │ ├── _top_headline.html.slim
│ │ │ ├── _top_headline_page.html.slim
│ │ │ ├── _tournament_teaser.html.slim
│ │ │ ├── _towerview_gallery_side.html.slim
│ │ │ ├── _twitter_timeline.html.slim
│ │ │ ├── _widget_sidebar.html.slim
│ │ │ ├── mobile
│ │ │ │ └── _advertisement.html.slim
│ │ │ ├── open_graph
│ │ │ │ ├── _facebook_app.html.slim
│ │ │ │ ├── _post.html.slim
│ │ │ │ └── _staff.html.slim
│ │ │ ├── twitter_cards
│ │ │ │ └── _post.html.slim
│ │ │ └── widgets
│ │ │ │ ├── _subtaxonomies.html.slim
│ │ │ │ └── _today.html.slim
│ │ ├── searches
│ │ │ ├── _article.html.slim
│ │ │ ├── _blog_post.html.slim
│ │ │ ├── _result.html.slim
│ │ │ └── show.html.slim
│ │ ├── staff
│ │ │ ├── images.html.slim
│ │ │ ├── posts.html.slim
│ │ │ └── show.html.slim
│ │ ├── tournament_brackets
│ │ │ ├── new.html.slim
│ │ │ └── show.html.slim
│ │ └── tournaments
│ │ │ ├── challenge.html.slim
│ │ │ ├── leaderboard.html.slim
│ │ │ └── show.html.slim
│ └── tournament_bracket_mailer
│ │ └── notify_incomplete.text.erb
└── workers
│ └── photoshelter_worker.rb
├── bower.json
├── config.ru
├── config
├── ad_types.yml
├── application.rb
├── asset_sync.yml
├── blacklist.txt
├── blogs.yml
├── boot.rb
├── compass.rb
├── cucumber.yml
├── database.yml
├── environment.rb
├── environments
│ ├── development.rb
│ ├── production.rb
│ └── test.rb
├── image_styles.yml
├── initializers
│ ├── backtrace_silencers.rb
│ ├── devise.rb
│ ├── inflections.rb
│ ├── mime_types.rb
│ ├── paperclip.rb
│ ├── recaptcha.rb
│ ├── redis.rb
│ ├── secret_token.rb
│ ├── session_store.rb
│ ├── simple_form.rb
│ ├── simple_form_bootstrap.rb
│ ├── sitevars.rb
│ ├── subdomains.rb
│ ├── taxonomy.rb
│ └── wrap_parameters.rb
├── locales
│ ├── devise.en.yml
│ ├── devise_invitable.en.yml
│ ├── en.yml
│ └── simple_form.en.yml
├── newrelic.yml
├── routes.rb
├── sitemaps
│ ├── news.rb
│ └── site.rb
├── sitevars.yml
├── sunspot.yml
├── taxonomy.yml
└── unicorn.rb
├── db
├── fixtures
│ └── tournament_teams.yml
├── migrate
│ ├── 20121130045750_create_articles.rb
│ ├── 20121213062723_add_slug_to_article.rb
│ ├── 20121213064314_create_friendly_id_slugs.rb
│ ├── 20121213231611_create_staff.rb
│ ├── 20121214033721_create_articles_authors.rb
│ ├── 20121217035913_create_images.rb
│ ├── 20121220181602_add_photographer_to_images.rb
│ ├── 20121221045137_add_image_to_articles.rb
│ ├── 20121223185853_add_slug_to_staff.rb
│ ├── 20130105174545_create_pages.rb
│ ├── 20130113103148_devise_create_users.rb
│ ├── 20130113103455_devise_invitable_add_to_users.rb
│ ├── 20130119220641_add_previous_id_to_articles.rb
│ ├── 20130122042716_add_date_to_image.rb
│ ├── 20130124023838_staff_remove_type.rb
│ ├── 20130124031515_articles_staff_table.rb
│ ├── 20130124050200_indexes.rb
│ ├── 20130124081052_increase_caption_size.rb
│ ├── 20130128001111_add_headshot_to_staff.rb
│ ├── 20130202211724_add_credit_to_images.rb
│ ├── 20130204222244_add_attribution_to_images.rb
│ ├── 20130206032936_enhance_pages.rb
│ ├── 20130223193409_create_blog_posts.rb
│ ├── 20130318012915_acts_as_taggable_on_migration.rb
│ ├── 20130409050936_add_published_at_to_article.rb
│ ├── 20130419063641_add_published_at_to_blog_posts.rb
│ ├── 20130708010122_add_previous_url_to_blog_post.rb
│ ├── 20130731022212_add_block_bots_column_to_postable.rb
│ ├── 20130821030518_merge_blog_post_and_article_tables.rb
│ ├── 20130902175543_create_galleries_and_gallery_images.rb
│ ├── 20130907041203_add_embed_code_to_article.rb
│ ├── 20131124051154_create_topics.rb
│ ├── 20131124051931_create_topic_responses.rb
│ ├── 20131231195346_create_blog_series.rb
│ ├── 20140117200446_create_polls.rb
│ ├── 20140119064432_create_poll_choices.rb
│ ├── 20140201003855_add_date_to_galleries.rb
│ ├── 20140205174147_add_admin_to_users.rb
│ ├── 20140211165459_add_trackable_to_users.rb
│ ├── 20140218024954_create_tournaments.rb
│ ├── 20140218051415_create_tournament_teams.rb
│ ├── 20140218053628_create_tournament_games.rb
│ ├── 20140218061102_create_tournament_brackets.rb
│ ├── 20140226160443_add_preview_and_article_to_team.rb
│ ├── 20140308232907_add_archived_to_polls.rb
│ ├── 20140316224623_add_index_on_tournament_teams.rb
│ ├── 20140317154029_add_regions_to_tournament.rb
│ ├── 20140320005922_add_score_to_tournament_brackets.rb
│ ├── 20140320032226_add_featured_to_tournaments.rb
│ └── 20140418022031_add_sponsored_to_articles.rb
├── schema.rb
└── seeds.rb
├── doc
└── README_FOR_APP
├── lib
├── assets
│ └── .gitkeep
├── chron_slug.rb
├── disqus.rb
├── espn.rb
├── extensions
│ ├── core
│ │ └── active_record.rb
│ └── oembed.rb
├── has_layout.rb
├── has_taxonomy.rb
├── layout.rb
├── layout
│ ├── schema.rb
│ ├── schemata.rb
│ └── validator.rb
├── layout_validator.rb
├── paperclip_processors
│ └── cropper.rb
├── photoshelter_api.rb
├── photoshelter_api
│ └── errors.rb
├── sample-images
│ └── pikachu.png
├── searchable.rb
├── searchable
│ └── facet_decorator.rb
├── sitevar.rb
├── tasks
│ ├── .gitkeep
│ ├── assets.rake
│ ├── cucumber.rake
│ ├── espn.rake
│ ├── images.rake
│ ├── photoshelter.rake
│ ├── resque.rake
│ └── tournament.rake
├── taxonomy.rb
└── taxonomy
│ ├── errors.rb
│ ├── serializer.rb
│ └── validator.rb
├── log
└── .gitkeep
├── public
├── 422.html
├── 500.html
└── favicon.ico
├── script
├── bootstrap.sh
├── cucumber
├── files
│ └── sudoers
├── lang.sh
└── rails
├── spec
├── config
│ ├── blogs.yml
│ ├── sitevars.yml
│ └── taxonomy.yml
├── controllers
│ └── admin
│ │ └── main_controller_spec.rb
├── factories.rb
├── fixtures
│ └── dish_cassettes
│ │ ├── .gitkeep
│ │ ├── authentication.yml
│ │ ├── bad_password.yml
│ │ ├── bad_username.yml
│ │ ├── galleries.yml
│ │ ├── images.yml
│ │ ├── info.yml
│ │ └── logout.yml
├── helpers
│ ├── application_helper.rb
│ ├── article_helper_spec.rb
│ ├── image_helper_spec.rb
│ ├── poll_helper_spec.rb
│ └── post_helper_spec.rb
├── lib
│ ├── chron_slug_spec.rb
│ ├── disqus_spec.rb
│ ├── photoshelter_api_spec.rb
│ ├── searchable_spec.rb
│ ├── sitevar_spec.rb
│ └── taxonomy_spec.rb
├── matchers.rb
├── models
│ ├── article_spec.rb
│ ├── blog_post_spec.rb
│ ├── blog_series_spec.rb
│ ├── blog_spec.rb
│ ├── gallery_image_spec.rb
│ ├── gallery_spec.rb
│ ├── image_spec.rb
│ ├── newsletter_spec.rb
│ ├── page_spec.rb
│ ├── post_spec.rb
│ ├── search_spec.rb
│ ├── staff_spec.rb
│ └── tournament
│ │ └── game_spec.rb
├── requests
│ └── api
│ │ ├── articles_spec.rb
│ │ ├── images_spec.rb
│ │ ├── posts_spec.rb
│ │ ├── staff_spec.rb
│ │ ├── taxonomy_spec.rb
│ │ └── topic_responses_spec.rb
├── spec_helper.rb
└── support
│ ├── auth_helper.rb
│ ├── helpers.rb
│ ├── matchers.rb
│ └── sunspot.rb
└── vendor
└── assets
├── javascripts
├── .gitkeep
├── bootstrap-typeahead.js
├── date.format.js
├── jquery.chained.js
├── jquery.hoverscroll.js
├── jquery.mobile-1.2.1.js
└── onde.js
└── stylesheets
├── .gitkeep
├── jquery.hoverscroll.css.scss
└── jquery.mobile-1.2.0.min.css
/.env.test:
--------------------------------------------------------------------------------
1 | AWS_S3_BUCKET=charmander
2 | DISQUS_SHORTNAME=squirtle
3 |
4 | PHOTOSHELTER_EMAIL=secret
5 | PHOTOSHELTER_PASSWORD=secret
--------------------------------------------------------------------------------
/.rspec:
--------------------------------------------------------------------------------
1 | --color
2 | --format documentation
3 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: ruby
2 | rvm:
3 | - "2.1.2"
4 | before_script:
5 | - redis-server &
6 | - psql -c 'create database chronline_test;' -U postgres
7 | - bundle exec rake db:migrate db:test:prepare
8 | script:
9 | - bundle exec rake
10 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
2 | resque: QUEUE=* env TERM_CHILD=1 bundle exec rake environment resque:work
3 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rake
2 | # Add your own tasks in files placed in lib/tasks ending in .rake,
3 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4 |
5 | require File.expand_path('../config/application', __FILE__)
6 |
7 | Chronline::Application.load_tasks
8 |
--------------------------------------------------------------------------------
/app/assets/images/auth/facebook_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/auth/facebook_active.png
--------------------------------------------------------------------------------
/app/assets/images/auth/facebook_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/auth/facebook_pressed.png
--------------------------------------------------------------------------------
/app/assets/images/auth/google_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/auth/google_active.png
--------------------------------------------------------------------------------
/app/assets/images/auth/google_hover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/auth/google_hover.png
--------------------------------------------------------------------------------
/app/assets/images/auth/google_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/auth/google_pressed.png
--------------------------------------------------------------------------------
/app/assets/images/blogs/backpageblogs-banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/backpageblogs-banner.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/backpageblogs-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/backpageblogs-logo.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/bigblog-banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/bigblog-banner.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/bigblog-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/bigblog-logo.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/bluezone-banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/bluezone-banner.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/bluezone-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/bluezone-logo.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/newsblog-banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/newsblog-banner.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/playground-banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/playground-banner.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/playground-logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/playground-logo.jpg
--------------------------------------------------------------------------------
/app/assets/images/blogs/sportsblog-banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/blogs/sportsblog-banner.jpg
--------------------------------------------------------------------------------
/app/assets/images/gfx/arrow-down-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/gfx/arrow-down-small.png
--------------------------------------------------------------------------------
/app/assets/images/gfx/arrow-down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/gfx/arrow-down.png
--------------------------------------------------------------------------------
/app/assets/images/gfx/arrow-left-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/gfx/arrow-left-small.png
--------------------------------------------------------------------------------
/app/assets/images/gfx/arrow-left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/gfx/arrow-left.png
--------------------------------------------------------------------------------
/app/assets/images/gfx/arrow-right-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/gfx/arrow-right-small.png
--------------------------------------------------------------------------------
/app/assets/images/gfx/arrow-right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/gfx/arrow-right.png
--------------------------------------------------------------------------------
/app/assets/images/gfx/arrow-up-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/gfx/arrow-up-small.png
--------------------------------------------------------------------------------
/app/assets/images/gfx/arrow-up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/gfx/arrow-up.png
--------------------------------------------------------------------------------
/app/assets/images/icons/camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/camera.png
--------------------------------------------------------------------------------
/app/assets/images/icons/comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/comment.png
--------------------------------------------------------------------------------
/app/assets/images/icons/currents.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/currents.png
--------------------------------------------------------------------------------
/app/assets/images/icons/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/email.png
--------------------------------------------------------------------------------
/app/assets/images/icons/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/facebook.png
--------------------------------------------------------------------------------
/app/assets/images/icons/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/google.png
--------------------------------------------------------------------------------
/app/assets/images/icons/print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/print.png
--------------------------------------------------------------------------------
/app/assets/images/icons/read.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/read.png
--------------------------------------------------------------------------------
/app/assets/images/icons/rss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/rss.png
--------------------------------------------------------------------------------
/app/assets/images/icons/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/search.png
--------------------------------------------------------------------------------
/app/assets/images/icons/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/twitter.png
--------------------------------------------------------------------------------
/app/assets/images/icons/youtube.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/icons/youtube.png
--------------------------------------------------------------------------------
/app/assets/images/logo/114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/114x114.png
--------------------------------------------------------------------------------
/app/assets/images/logo/128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/128x128.png
--------------------------------------------------------------------------------
/app/assets/images/logo/144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/144x144.png
--------------------------------------------------------------------------------
/app/assets/images/logo/16x16.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/16x16.ico
--------------------------------------------------------------------------------
/app/assets/images/logo/16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/16x16.png
--------------------------------------------------------------------------------
/app/assets/images/logo/300x300.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/300x300.png
--------------------------------------------------------------------------------
/app/assets/images/logo/32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/32x32.png
--------------------------------------------------------------------------------
/app/assets/images/logo/57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/57x57.png
--------------------------------------------------------------------------------
/app/assets/images/logo/64x64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/64x64.png
--------------------------------------------------------------------------------
/app/assets/images/logo/72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/72x72.png
--------------------------------------------------------------------------------
/app/assets/images/logo/75x75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/75x75.png
--------------------------------------------------------------------------------
/app/assets/images/logo/96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/96x96.png
--------------------------------------------------------------------------------
/app/assets/images/logo/round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/logo/round.png
--------------------------------------------------------------------------------
/app/assets/images/mobile/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/mobile/ajax-loader.gif
--------------------------------------------------------------------------------
/app/assets/images/mobile/icons-18-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/mobile/icons-18-black.png
--------------------------------------------------------------------------------
/app/assets/images/mobile/icons-18-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/mobile/icons-18-white.png
--------------------------------------------------------------------------------
/app/assets/images/mobile/icons-36-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/mobile/icons-36-black.png
--------------------------------------------------------------------------------
/app/assets/images/mobile/icons-36-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/mobile/icons-36-white.png
--------------------------------------------------------------------------------
/app/assets/images/newsletter/alert_header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/newsletter/alert_header.png
--------------------------------------------------------------------------------
/app/assets/images/newsletter/daily_header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/newsletter/daily_header.png
--------------------------------------------------------------------------------
/app/assets/images/social-media/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/social-media/facebook.png
--------------------------------------------------------------------------------
/app/assets/images/social-media/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/images/social-media/twitter.png
--------------------------------------------------------------------------------
/app/assets/javascripts/admin.js:
--------------------------------------------------------------------------------
1 | //= require jquery
2 | //= require jquery_ujs
3 | //= require jquery-ui/ui/jquery-ui
4 | //= require bootstrap/docs/assets/js/bootstrap
5 | //= require bootstrap-typeahead
6 | //= require underscore/underscore
7 | //= require backbone/backbone
8 |
9 | //= require util
10 | //= require initialize
11 | //= require admin/image-selector
12 | //= require common/local-time
13 | //= require_tree ./admin
14 |
--------------------------------------------------------------------------------
/app/assets/javascripts/admin/form-field.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '.add-field', ->
2 | $(this).click (e) ->
3 | e.preventDefault()
4 | $item = $(this).siblings('.addible-field').last()
5 | $newItem = $item.clone()
6 | i = parseInt($item.children('input').attr('id').match(/_(\d+)/)[1])
7 | $newItem.children('input').attr 'id', (__, id) ->
8 | id.replace(/_(\d+)/, "_#{i + 1}")
9 | $newItem.children('input').val(undefined)
10 | $item.after $newItem
11 |
--------------------------------------------------------------------------------
/app/assets/javascripts/admin/image.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/admin/newsletter.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '.input-enabler', ->
2 | $(this).change ->
3 | target = $(this).siblings('input, select')
4 | if $(this).is(':checked')
5 | $(target).removeAttr('disabled')
6 | else
7 | $(target).attr('disabled', true)
8 |
--------------------------------------------------------------------------------
/app/assets/javascripts/admin/staff-picker.js.coffee:
--------------------------------------------------------------------------------
1 | # Can't use initialize because author-picker fields may be added dynamically
2 | $ ->
3 | $('body').on 'focus', '.staff-picker', ->
4 | $(this).attr('autocomplete', 'off')
5 | $(this).typeahead
6 | source: (query, callback) ->
7 | $.get fullUrl('api', '/staff'), {search: query}, (staff) ->
8 | callback((member.name for member in staff))
9 |
10 | initialize 'form.staff-search', ->
11 | $(this).submit (e) ->
12 | e.preventDefault()
13 | slug = $(this).find('input').val().toLowerCase().replace(/[\s\']/g, '-')
14 | window.location = "/staff/#{slug}/edit"
15 |
--------------------------------------------------------------------------------
/app/assets/javascripts/admin/taxonomy-select.js.coffee:
--------------------------------------------------------------------------------
1 | #= require jquery.chained.js
2 |
3 | initialize 'select.taxonomy', ->
4 | $selects = $(this)
5 | $selects.each (i) ->
6 | $(this).chained($selects.eq(i - 1)) if i > 0
7 |
--------------------------------------------------------------------------------
/app/assets/javascripts/admin/widgets/image.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '#widget-editor', ->
2 | ImageView = Backbone.View.extend
3 | events:
4 | 'click #choose': 'update'
5 |
6 | handler: (callback) ->
7 | imageSelector.open (image) ->
8 | callback(image.id)
9 |
10 | render: ->
11 | this.$el.html('Choose Image')
12 |
13 | update: (e) ->
14 | e.preventDefault()
15 | this.handler (id) ->
16 | $('#tag-result').text("{{Image:#{id}}}")
17 |
18 | window.ImageView = ImageView
19 |
--------------------------------------------------------------------------------
/app/assets/javascripts/admin/widgets/poll.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '#widget-editor', ->
2 | PollView = Backbone.View.extend
3 | events:
4 | 'keyup #pollId': 'update'
5 |
6 | render: ->
7 | text_field = _.template("
8 | ")
9 | this.$el.html(text_field
10 | field_id: 'pollId'
11 | label: 'Poll ID'
12 | )
13 |
14 | update: (e) ->
15 | id = $(e.target).val()
16 | $('#tag-result').text("{{Poll:#{id}}}")
17 |
18 | window.PollView = PollView
19 |
20 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta.js:
--------------------------------------------------------------------------------
1 | //= require jquery
2 | //= require jquery_ujs
3 | //= require jquery-ui/ui/jquery-ui
4 | //= require underscore/underscore
5 | //= require backbone/backbone
6 | //= require marionette/lib/backbone.marionette
7 | //= require jade/runtime
8 |
9 | //= require util
10 | //= require initialize
11 | //= require common/social-media
12 | //= require common/analytics
13 | //= require common/local-time
14 | //= require lightbox2/js/lightbox.min
15 | //= require_tree ./beta
16 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/admin-panel.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '.toggle-link', ->
2 | $(this).click ->
3 | adminNotif = $('.admin-notification')
4 | toggleLink = $(this)
5 | if adminNotif.hasClass('showing')
6 | adminNotif.removeClass('showing', 100, ->
7 | adminNotif.addClass('hiding')
8 | toggleLink.html('[ Show ]')
9 | )
10 | else if adminNotif.hasClass('hiding')
11 | adminNotif.removeClass('hiding', 100, ->
12 | adminNotif.addClass('showing')
13 | toggleLink.html('[ Hide ]')
14 | )
15 |
16 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/collection-views/topic-response.js.coffee:
--------------------------------------------------------------------------------
1 | #= require beta/item-views/topic-response
2 |
3 | window.TopicResponsesView = Backbone.Marionette.CollectionView.extend
4 | itemView: TopicResponseView
5 |
6 | events:
7 | 'scroll': 'scroll'
8 |
9 | scroll: ->
10 | if not @_fetching and (@$el.height() + @$el.scrollTop() == @el.scrollHeight)
11 | @_fetching = true
12 | @collection.nextPage
13 | success: (collection, response) =>
14 | this.render()
15 | @_fetching = false if response.length > 0
16 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/collections/game.js.coffee:
--------------------------------------------------------------------------------
1 | #= require beta/models/game
2 |
3 | Game.Collection = Backbone.Collection.extend
4 | model: Game
5 |
6 | comparator: 'position'
7 |
8 | inRound: (round, region) ->
9 | switch region
10 | when 0
11 | start = 64 - Math.pow(2, 7 - round)
12 | when 1
13 | start = 64 - Math.pow(2, 7 - round) + Math.pow(2, 4 - round)
14 | when 2
15 | start = 64 - Math.pow(2, 7 - round) + Math.pow(2, 5 - round)
16 | when 3
17 | start = 64 - Math.pow(2, 6 - round) - Math.pow(2, 4 - round)
18 | this.slice(start, start + Math.pow(2, 4 - round))
19 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/collections/topic-response.js.coffee:
--------------------------------------------------------------------------------
1 | #= require beta/models/topic-response
2 |
3 | TopicResponse.Collection = Backbone.Collection.extend
4 | model: TopicResponse
5 |
6 | url: ->
7 | fullUrl('api', "/topics/#{@topicId}/responses")
8 |
9 | initialize: (_models, options) ->
10 | @topicId = options.topicId
11 | @page = 1
12 |
13 | nextPage: (options) ->
14 | options.data = options.data ? {}
15 | options.data['page'] = @page
16 | options['remove'] = false
17 | @page = @page + 1
18 | this.fetch(options)
19 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/featured-selectable.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '.featured-selectable', ->
2 | $slide = $('.slide:visible')
3 | $slide.css('display', 'block')
4 | $('.selector a[data-index=0]').addClass('selected')
5 | $(this).on 'click', '.selector a', (e) ->
6 | e.preventDefault()
7 | $lastSlide = $slide
8 | $('.selector a').removeClass('selected')
9 | $(this).addClass('selected')
10 | $slide = $('.slide').eq($(this).data('index'))
11 | $lastSlide.fadeOut -> $slide.fadeIn()
12 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/models/poll.js.coffee:
--------------------------------------------------------------------------------
1 | window.Poll = Backbone.Model.extend
2 | urlRoot: "/polls"
3 |
4 | vote: (choiceId) ->
5 | $.ajax
6 | method: 'POST'
7 | url: "#{this.url()}/vote",
8 | data: {choice: choiceId}
9 | .done (data) =>
10 | this.set(data)
11 |
12 | calculatePercentages: () ->
13 | vote_sum = _.reduce(this.get('choices'), (memo, choice) ->
14 | memo + choice.votes
15 | , 0)
16 | _.each this.get('choices'), (choice) ->
17 | choice.percentage = 100 * choice.votes/vote_sum
18 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/models/tournament.js.coffee:
--------------------------------------------------------------------------------
1 | window.Tournament = Backbone.Model.extend
2 | started: ->
3 | Date.now() > new Date(this.get('start_date'))
4 |
5 | games: ->
6 | new Game.Collection(this.get('games'))
7 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/navscroll.js.coffee:
--------------------------------------------------------------------------------
1 | #= require jquery.hoverscroll
2 |
3 | initialize '.subnav', ->
4 | if $(this)[0].scrollWidth > $(this).width()
5 | $(this).hoverscroll
6 | vertical: false
7 | width: 518
8 | height: 36
9 | arrows: true
10 | arrowsOpacity: .6 # Max possible opacity of the arrows
11 | fixedArrows: false # Fixed arrows on the sides of the list (disables arrowsOpacity)
12 | rtl: false # Print images from right to left
13 | debug: false # Debug output in the firebug console
14 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/poll.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '.poll-container', ->
2 | pollId = $(this).find('.poll').data('poll-id')
3 | poll = new Poll(id: pollId)
4 | view = new PollView(model: poll, el: '.poll')
5 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/slideshow.js.coffee.erb:
--------------------------------------------------------------------------------
1 | #= require jquery-galleria/src/galleria
2 |
3 | GALLERIA_THEME = "<%= asset_path 'galleria/themes/chronicle/galleria.chronicle.js' %>"
4 |
5 | initialize '.galleria', ->
6 | Galleria.loadTheme(GALLERIA_THEME)
7 | Galleria.configure
8 | transition: 'fade'
9 | autoplay: 9000
10 | width: 636
11 | height: 393
12 | Galleria.run $(this)
13 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/templates/bracket-game.jst.jade:
--------------------------------------------------------------------------------
1 | mixin team(team, num)
2 | .team(class=[
3 | "team-" + num,
4 | selectable ? 'team-selectable' : '',
5 | winner && team && winner.id == team.id ? selectedClass : '',
6 | team && team.roundEliminated(game.collection) && game.round() > team.roundEliminated(game.collection) ? 'incomplete' : ''
7 | ])
8 | .seed= team && team.get('seed')
9 | .game-info
10 | span.name= team && team.get('shortname')
11 |
12 | +team(team1, 1)
13 | +team(team2, 2)
14 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/templates/game.jst.jade:
--------------------------------------------------------------------------------
1 | mixin team(team, score)
2 | .team(class=(team && game.winner() && team.id === game.winner().id ? 'winner' : ''))
3 | .seed= team && team.get('seed')
4 | .game-info
5 | span.name= team && team.get('shortname')
6 | if score
7 | span.score= score
8 |
9 | +team(team1, game.get('score1'))
10 | +team(team2, game.get('score2'))
11 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/templates/poll-form.jst.jade:
--------------------------------------------------------------------------------
1 | h4.title= title
2 | p= description
3 | form.poll-form(accept-charset="UTF-8", action="/polls/" + id + "/vote", method="post")
4 | ul.choice-list
5 | each choice in choices
6 | li.poll-choice
7 | input(id="choice_" + choice.id, name="choice", type="radio", value=choice.id)
8 | label(for="choice_" + choice.id)= choice.title
9 | button(type="submit") Submit
10 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/templates/poll-results.jst.jade:
--------------------------------------------------------------------------------
1 | h4.title= title
2 | p= description
3 | ul.choice-list
4 | each choice in choices
5 | li.poll-choice(data-votes=choice.votes)
6 | .poll-choice-bar
7 | .poll-choice-result
8 | = choice.title
9 | |
10 | span.choice-percentage
11 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/templates/social-share.jst.jade:
--------------------------------------------------------------------------------
1 | if authToken
2 | a.toggle(href="#")
3 | | Sharing is
4 | span.status= enabled ? 'on' : 'off'
5 | a.activity-toggle(href="#"): i.activity-icon
6 | if actions
7 | .activity
8 | h4 Recent Activity
9 | table
10 | tbody
11 | each action in actions
12 | tr(id=action.id)
13 | td.url
14 | a(href=action.data.article.url)= action.data.article.title
15 | td: a.delete(href="#", data-id=action.id) x
16 | else
17 | a.login(href="#") Share what you are reading on Facebook
18 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/templates/topic-response.jst.jade:
--------------------------------------------------------------------------------
1 | p.content= content
2 | ul.response-actions
3 | li(class=(upvoted ? 'voted' : ''))
4 | button.upvote(type="button")
5 | span.count= upvotes
6 | li(class=(downvoted ? 'voted' : ''))
7 | button.downvote(type="button")
8 | span.count= downvotes
9 | li: button.report(type="button") Report
10 | li: time(datetime=created_at)= timestamp
11 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beta/widgets.js:
--------------------------------------------------------------------------------
1 | // Browser update
2 | (function() {
3 | var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true;
4 | s.src = ('https:'==document.location.protocol?'https://':'http://') + 'updatemybrowser.org/umb.js';
5 | var b = document.getElementsByTagName('script')[0]; b.parentNode.insertBefore(s, b);
6 | })();
7 |
--------------------------------------------------------------------------------
/app/assets/javascripts/common/analytics.js.coffee.erb:
--------------------------------------------------------------------------------
1 | initialize '.fb-like', ->
2 | $('#fb-root').on 'fbinit', ->
3 | FB.Event.subscribe 'edge.create', (url) ->
4 | _gaq.push(['_trackSocial', 'facebook', 'like', url])
5 |
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/chronicle/circ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/chronicle/circ.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/chronicle/classic-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/chronicle/classic-loader.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/chronicle/classic-map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/chronicle/classic-map.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/chronicle/dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/chronicle/dots.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/gallery/circ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/gallery/circ.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/gallery/classic-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/gallery/classic-loader.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/gallery/classic-map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/gallery/classic-map.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/gallery/dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/gallery/dots.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/miniml/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/miniml/bg.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/miniml/bye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/miniml/bye.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/miniml/circ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/miniml/circ.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/miniml/exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/miniml/exit.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/miniml/fs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/miniml/fs.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/miniml/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/miniml/info.png
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/miniml/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/miniml/loader.gif
--------------------------------------------------------------------------------
/app/assets/javascripts/galleria/themes/miniml/thumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/javascripts/galleria/themes/miniml/thumb.png
--------------------------------------------------------------------------------
/app/assets/javascripts/initialize.js.coffee:
--------------------------------------------------------------------------------
1 | initializers = []
2 |
3 | $ ->
4 | for [selector, action] in initializers
5 | if not selector? or $(selector).length > 0
6 | # try
7 | action.call $(selector)
8 | # catch err
9 | # console.error(err)
10 |
11 | window.initialize = (selector, action) ->
12 | if not action?
13 | action = selector
14 | selector = undefined
15 | initializers.push [selector, action]
16 |
--------------------------------------------------------------------------------
/app/assets/javascripts/mobile/full-site.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '#full-site', ->
2 | $(this).click (e) ->
3 | e.preventDefault()
4 | path = location.pathname + location.search
5 | path += if location.search then "&" else "?"
6 | path += 'force_full_site=true'
7 | location.href = fullUrl('www', path)
8 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/collection-views/topic-response.js.coffee:
--------------------------------------------------------------------------------
1 | #= require site/item-views/topic-response
2 |
3 | window.TopicResponsesView = Backbone.Marionette.CollectionView.extend
4 | itemView: TopicResponseView
5 |
6 | events:
7 | 'scroll': 'scroll'
8 |
9 | scroll: ->
10 | if not @_fetching and (@$el.height() + @$el.scrollTop() == @el.scrollHeight)
11 | @_fetching = true
12 | @collection.nextPage
13 | success: (collection, response) =>
14 | this.render()
15 | @_fetching = false if response.length > 0
16 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/collections/game.js.coffee:
--------------------------------------------------------------------------------
1 | #= require site/models/game
2 |
3 | Game.Collection = Backbone.Collection.extend
4 | model: Game
5 |
6 | comparator: 'position'
7 |
8 | inRound: (round, region) ->
9 | switch region
10 | when 0
11 | start = 64 - Math.pow(2, 7 - round)
12 | when 1
13 | start = 64 - Math.pow(2, 7 - round) + Math.pow(2, 4 - round)
14 | when 2
15 | start = 64 - Math.pow(2, 7 - round) + Math.pow(2, 5 - round)
16 | when 3
17 | start = 64 - Math.pow(2, 6 - round) - Math.pow(2, 4 - round)
18 | this.slice(start, start + Math.pow(2, 4 - round))
19 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/collections/topic-response.js.coffee:
--------------------------------------------------------------------------------
1 | #= require site/models/topic-response
2 |
3 | TopicResponse.Collection = Backbone.Collection.extend
4 | model: TopicResponse
5 |
6 | url: ->
7 | fullUrl('api', "/topics/#{@topicId}/responses")
8 |
9 | initialize: (_models, options) ->
10 | @topicId = options.topicId
11 | @page = 1
12 |
13 | nextPage: (options) ->
14 | options.data = options.data ? {}
15 | options.data['page'] = @page
16 | options['remove'] = false
17 | @page = @page + 1
18 | this.fetch(options)
19 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/models/poll.js.coffee:
--------------------------------------------------------------------------------
1 | window.Poll = Backbone.Model.extend
2 | urlRoot: "/polls"
3 |
4 | vote: (choiceId) ->
5 | $.ajax
6 | method: 'POST'
7 | url: "#{this.url()}/vote",
8 | data: {choice: choiceId}
9 | .done (data) =>
10 | this.set(data)
11 |
12 | calculatePercentages: () ->
13 | vote_sum = _.reduce(this.get('choices'), (memo, choice) ->
14 | memo + choice.votes
15 | , 0)
16 | _.each this.get('choices'), (choice) ->
17 | choice.percentage = 100 * choice.votes/vote_sum
18 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/models/tournament.js.coffee:
--------------------------------------------------------------------------------
1 | window.Tournament = Backbone.Model.extend
2 | started: ->
3 | Date.now() > new Date(this.get('start_date'))
4 |
5 | games: ->
6 | new Game.Collection(this.get('games'))
7 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/poll.js.coffee:
--------------------------------------------------------------------------------
1 | initialize '.poll-container', ->
2 | pollId = $(this).find('.poll').data('poll-id')
3 | poll = new Poll(id: pollId)
4 | view = new PollView(model: poll, el: '.poll')
5 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/templates/bracket-game.jst.jade:
--------------------------------------------------------------------------------
1 | mixin team(team, num)
2 | .team(class=[
3 | "team-" + num,
4 | selectable ? 'team-selectable' : '',
5 | winner && team && winner.id == team.id ? selectedClass : '',
6 | team && team.roundEliminated(game.collection) && game.round() > team.roundEliminated(game.collection) ? 'incomplete' : ''
7 | ])
8 | .seed= team && team.get('seed')
9 | .game-info
10 | span.name= team && team.get('shortname')
11 |
12 | +team(team1, 1)
13 | +team(team2, 2)
14 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/templates/game.jst.jade:
--------------------------------------------------------------------------------
1 | mixin team(team, score)
2 | .team(class=(team && game.winner() && team.id === game.winner().id ? 'winner' : ''))
3 | .seed= team && team.get('seed')
4 | .game-info
5 | span.name= team && team.get('shortname')
6 | if score
7 | span.score= score
8 |
9 | +team(team1, game.get('score1'))
10 | +team(team2, game.get('score2'))
11 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/templates/poll-form.jst.jade:
--------------------------------------------------------------------------------
1 | h4.title= title
2 | p= description
3 | form.poll-form(accept-charset="UTF-8", action="/polls/" + id + "/vote", method="post")
4 | ul.choice-list
5 | each choice in choices
6 | li.poll-choice
7 | input(id="choice_" + choice.id, name="choice", type="radio", value=choice.id)
8 | label(for="choice_" + choice.id)= choice.title
9 | button(class="button", type="submit") Submit
10 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/templates/poll-results.jst.jade:
--------------------------------------------------------------------------------
1 | h4.title= title
2 | p= description
3 | ul.choice-list
4 | each choice in choices
5 | li.poll-choice(data-votes=choice.votes)
6 | .poll-choice-bar
7 | .poll-choice-result
8 | = choice.title
9 | |
10 | span.choice-percentage
11 |
--------------------------------------------------------------------------------
/app/assets/javascripts/site/templates/topic-response.jst.jade:
--------------------------------------------------------------------------------
1 | p.content= content
2 | ul.response-actions
3 | li(class=(upvoted ? 'voted' : ''))
4 | button.upvote(type="button")
5 | span.count= upvotes
6 | li(class=(downvoted ? 'voted' : ''))
7 | button.downvote(type="button")
8 | span.count= downvotes
9 | li: button.report(type="button") Report
10 | li: time(datetime=created_at)= timestamp
11 |
--------------------------------------------------------------------------------
/app/assets/javascripts/util.js.coffee:
--------------------------------------------------------------------------------
1 | window.fullUrl = (subdomain, path) ->
2 | host = window.location.host.replace(/^\w+\./, subdomain + '.')
3 | '//' + host + path
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/404.css.sass:
--------------------------------------------------------------------------------
1 | pre
2 | font-size: 1.5em
3 | text-align: center
4 | .notfound-text
5 | font-size: 1.3em
6 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/admin.css.sass:
--------------------------------------------------------------------------------
1 | /*
2 | *= require bootstrap/docs/assets/css/bootstrap.css
3 | *= require bootstrap/docs/assets/css/bootstrap-responsive.css
4 | *= require jquery-file-upload/css/jquery.fileupload-ui.css
5 | *= require jcrop/css/jquery.Jcrop.css
6 | *= require onde/src/onde.css
7 | */
8 |
9 | @import "admin/image-picker"
10 |
11 | .addible-field
12 | margin-bottom: 4px
13 |
14 | #image_crop_style
15 | margin-bottom: 0px
16 |
17 | form.edit_image .popover
18 | width: 400px
19 |
20 | .onde-panel input.article-picker
21 | width: 40em !important
22 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/admin/articles.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the admin/Articles controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/admin/image-picker.css.sass:
--------------------------------------------------------------------------------
1 | #image-select
2 | width: 80%
3 | margin: 0 -40%
4 |
5 | .modal-body
6 | img
7 | margin-right: 5px
8 | float: left
9 | border: 1px solid transparent
10 | img:hover
11 | border-color: rgba(82,168,236,0.8)
12 | outline: 0
13 | outline: thin dotted 9
14 | box-shadow: inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)
15 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/admin/main.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the admin/main controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/admin/staff.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the admin/Staff controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/advertisement.css.sass:
--------------------------------------------------------------------------------
1 | .custom_ad
2 | width: 240px
3 | height: 90px
4 |
5 | .leaderboard
6 | width: 728px
7 | height: 90px
8 |
9 | .medium_rectangle
10 | width: 300px
11 | height: 250px
12 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/blog.css.sass:
--------------------------------------------------------------------------------
1 | .blog-logo
2 | width: 300px
3 | height: 100px
4 |
5 | .blog-banner
6 | width: 636px
7 | height: 106px
8 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/buttons.css.sass:
--------------------------------------------------------------------------------
1 | a.button
2 | color: white
3 |
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/coach-k.css.sass:
--------------------------------------------------------------------------------
1 | .coachk
2 | .note
3 | overflow: hidden
4 |
5 | .logo
6 | display: inline
7 | .logo img
8 | height: 120px
9 | float: left
10 | padding: 8px
11 |
12 | .note .content-container
13 | margin-left: 130px
14 | overflow: hidden
15 | .wins-box
16 | .rounded
17 | background-color: #00529b
18 | .wins
19 | color: white
20 | h1.wins
21 | text-align: center
22 | font-size: 50px
23 | margin-bottom: 10px
24 | h2.wins
25 | text-align: center
26 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/containers/article-box.css.sass:
--------------------------------------------------------------------------------
1 | .article-box
2 | img
3 | float: right
4 | +border-radius($corner-radius)
5 | margin-left: 10px
6 |
7 | .content-container
8 | a
9 | margin-bottom: 15px
10 |
11 | .left-column.content-container
12 | padding-right: 0px
13 |
14 | .right-column.content-container
15 | padding-left: 0px
16 |
17 | ul.articles
18 | margin: 0px
19 | li
20 | font-size: .5em
21 | .title
22 | font-size: 2em
23 |
24 | .two-column-article-list
25 | .content-container
26 | a
27 | margin-bottom: 10px
28 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/containers/block.css.sass:
--------------------------------------------------------------------------------
1 | .block
2 | a
3 | height: 100%
4 | overflow: hidden
5 |
6 | .block-square .rounded
7 | height: 156px
8 |
9 | .image-container
10 | float: left
11 | img
12 | margin-right: 5px
13 |
14 | .block-thumbnail .rounded
15 | height: 119px
16 | .content-container
17 | padding: 5px
18 |
19 | .title
20 | height: 2.5em
21 |
22 | img
23 | float: right
24 | margin-left: 5px
25 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/containers/blog-info.css.sass:
--------------------------------------------------------------------------------
1 | .blog-info
2 | .banner
3 | display: block
4 | padding: 3px
5 | img
6 | width: 100%
7 | display: block
8 | +border-radius($corner-radius)
9 |
10 | .description
11 | font-size: 1.2em
12 | margin-bottom: 10px
13 |
14 | ul
15 | margin: 6px 0px 0px
16 | li
17 | font-size: 0.75em
18 | a
19 | font-size: 1.4em
20 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/containers/facebook-recommended.css.sass:
--------------------------------------------------------------------------------
1 | .facebook-recommended
2 | padding: 3px
3 | height: 300px
4 |
5 | .twitter-timeline
6 | padding: 3px 3px 0px
7 | width: 300px
8 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/containers/multimedia-row.css.sass:
--------------------------------------------------------------------------------
1 | .multimedia-row
2 | .rounded
3 | padding: 6px
4 | .element
5 | float: left
6 | margin-right: 10px
7 | margin-bottom: -5px
8 | .element:last-child
9 | margin-right: 0px
10 |
11 | .span-8 .multimedia-row
12 | .element
13 | margin-right: 7px
14 | .element:last-child
15 | margin-right: 0px
16 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/containers/multiplexer.css.sass:
--------------------------------------------------------------------------------
1 | @import "compass/layout/stretching"
2 |
3 | .multiplexer
4 | position: relative
5 | min-height: 300px !important
6 | margin-bottom: 20px
7 |
8 | .selectors
9 | +stretch-y
10 | margin-bottom: 0px
11 | width: 150px
12 | .label
13 | font-size: 1.1em
14 | line-height: 1.3em
15 |
16 | .selections
17 | +stretch-y
18 | margin-bottom: 0px
19 | left: 150px
20 | width: 324px
21 |
22 | .selection
23 | display: none
24 |
25 | .multiplexer.wide .selections
26 | width: 492px
27 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/containers/opinion.css.sass:
--------------------------------------------------------------------------------
1 | .columns
2 | img.headshot
3 | float: right
4 | margin-left: 5px
5 | +border-radius($corner-radius)
6 |
7 | .author-box
8 | .author-info
9 | +clearfix
10 | border-bottom: 1px solid #DDD
11 | padding-bottom: 10px
12 | margin-bottom: 10px
13 |
14 | img.headshot
15 | float: right
16 | +border-radius($corner-radius)
17 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/embedded-media.css.sass:
--------------------------------------------------------------------------------
1 | .embedded-image img
2 | display: block
3 | border: solid 3px #FFF
4 | &:hover
5 | border: solid 3px LightGray
6 |
7 | .embedded-instagram
8 | margin: auto
9 | width: 400px
10 |
11 | .embedded-twitter
12 | margin: auto
13 | width: 502px
14 |
15 | .embedded-quote blockquote
16 | width: 250px
17 | margin: 10px
18 | font-size: 1.2em
19 |
20 | .embedded-right
21 | float: right
22 | margin-left: 10px
23 |
24 | .embedded-left
25 | float: left
26 | margin-right: 10px
27 |
28 | .embedded-full
29 | margin-bottom: 1.5em
30 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/footer.css.sass:
--------------------------------------------------------------------------------
1 | #footer
2 | padding: 10px 0px 30px
3 | font-variant: small-caps
4 | +single-text-shadow(0px, 1px, 1px, white)
5 |
6 | .legal, .legal a
7 | text-align: left
8 | color: #888
9 | .sep
10 | padding: 0px 3px
11 | a:hover
12 | color: $link-color
13 |
14 | .links
15 | a
16 | padding: 0px 12px
17 | a:first-child
18 | padding-left: 0px
19 | a:last-child
20 | padding-right: 0px
21 | a:hover
22 | text-decoration: underline
23 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/large-embed.css.sass:
--------------------------------------------------------------------------------
1 | .slideshow-embed
2 | padding: 3px
3 | padding-bottom: 0px
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/mixins.sass:
--------------------------------------------------------------------------------
1 | @mixin black-box-shadow($opacity: $default-box-shadow-opacity, $hoff: $default-box-shadow-h-offset, $voff: $default-box-shadow-v-offset, $blur: $default-box-shadow-blur, $spread: $default-box-shadow-spread, $inset: $default-box-shadow-inset)
2 | +single-box-shadow(rgba(0, 0, 0, $opacity), $hoff, $voff, $blur, $spread, $inset)
3 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/pagination.css.sass:
--------------------------------------------------------------------------------
1 | .pagination
2 | +rounded
3 | padding: 10px
4 | font-size: 2em
5 |
6 | ul
7 | padding: 0px
8 | margin: 0px
9 | list-style: none
10 |
11 | li
12 | display: inline
13 | a
14 | color: $text-color
15 | +single-transition(color, 0.25s, linear)
16 |
17 | li a:hover, li.active a
18 | color: $link-color
19 |
20 | li.prev, li.next
21 | font-size: .6em
22 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/poll.css.sass:
--------------------------------------------------------------------------------
1 | h4.poll-title
2 | margin-bottom: 7px
3 |
4 | ul.choice-list
5 | padding-left: 0px
6 | margin: 7px 0px
7 |
8 | li.poll-choice
9 | list-style-type: none
10 |
11 | .poll-choice-bar
12 | width: 0%
13 | height: 10px
14 | background-color: $banner-color
15 |
16 | .choice-percentage
17 | font-size: 1em
18 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/search.css.sass:
--------------------------------------------------------------------------------
1 | @import "blueprint/buttons"
2 |
3 | .search-options
4 | .rounded
5 | padding: 10px
6 | fieldset
7 | width: 100%
8 | +box-sizing(border-box)
9 | .facets
10 | padding: 10px 0px
11 | select
12 | margin-top: 0px
13 | width: 200px
14 | input[type=submit]
15 | +anchor-button
16 | +black-box-shadow(.6)
17 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/tournaments.css.sass:
--------------------------------------------------------------------------------
1 | .tournament-leaderboard
2 | font-size: 1.2em
3 | .highlighted td
4 | font-weight: bold
5 |
6 | .user-row td
7 | border-bottom: 2px solid $text-color
8 |
9 | .featured-bracket
10 | font-size: 1.2em
11 | .title
12 | font-size: 1.2em
13 | margin-bottom: 0.3em
14 | .headshot
15 | +border-radius($corner-radius)
16 | float: right
17 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beta/video-player.css.sass:
--------------------------------------------------------------------------------
1 | .video-player
2 | table
3 | margin-bottom: 0px
4 | td
5 | padding: 3px
6 | object
7 | display: block
8 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/error.css.scss:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: white;
3 | color: #444;
4 | margin: 0;
5 | padding: 36px;
6 | line-height: 18px;
7 | font-size: 16px;
8 | font-family: 'Times New Roman', serif;
9 | }
10 | .section {
11 | margin-bottom: 36px;
12 | color: #444;
13 | }
14 | .section h1 {
15 | color: white;
16 | font-size: 28px;
17 | background-color: #069;
18 | padding: 18px 22px 15px 22px;
19 | margin: 0;
20 | overflow: hidden;
21 | }
22 | .article {
23 | border: 4px solid #069;
24 | padding: 24px 18px 18px 18px;
25 | font-size: 16px;
26 | }
27 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/ie.css.sass:
--------------------------------------------------------------------------------
1 | @import "blueprint"
2 |
3 | // Generate the blueprint IE-specific customizations:
4 | @include blueprint-ie
5 |
6 | .rounded
7 | border-bottom: 1px solid #B8B8B8
8 | border-bottom: 1px solid #B8B8B8
9 | border-right: 1px solid #B8B8B8
10 | margin-right: -1px
11 |
12 | .vertical-label
13 | margin-left: -1em
14 | writing-mode: tb-rl
15 | filter: flipv fliph
16 |
17 | #header-overlay
18 | display: none
19 |
20 | .row-article
21 | margin-right: 8px
--------------------------------------------------------------------------------
/app/assets/stylesheets/mobile.css.sass:
--------------------------------------------------------------------------------
1 | /*
2 | *= require jquery.mobile-1.2.0.min.css
3 | *= require mobile/themes/chronline.css
4 | */
5 |
6 | @import "mobile/advertisement"
7 | @import "mobile/articles"
8 | @import "mobile/images"
9 | @import "mobile/blog-post"
10 | @import "mobile/chapel"
11 | @import "mobile/header"
12 | @import "404"
13 |
14 | .ui-link
15 | text-decoration: none
16 |
17 | .ui-li-thumb
18 | margin-top: 1px
19 |
20 | .ui-li-heading
21 | font-weight: normal
22 |
23 | .ui-content
24 | position: relative
25 |
26 | mark
27 | background: none
28 | font-weight: bold
29 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/mobile/advertisement.css.sass:
--------------------------------------------------------------------------------
1 | #push
2 | width: 100%
3 | height: 50px
4 |
5 | #advertisement-container
6 | position: fixed
7 | z-index: 10
8 | bottom: 0px
9 | width: 100%
10 | height: 50px
11 |
12 | .advertisement
13 | width: 320px
14 | margin: auto
15 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/mobile/blog-post.css.sass:
--------------------------------------------------------------------------------
1 | .article-container.blog-post
2 | .blog-name
3 | margin-bottom: 0px
4 | .title
5 | margin-top: 0px
6 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/mobile/chapel.css.sass:
--------------------------------------------------------------------------------
1 | @import "compass/css3/opacity"
2 |
3 |
4 | #background-image
5 | position: fixed
6 | width: 100%
7 | +opacity(.1)
8 |
9 | .ui-collapsible-content, .ui-footer
10 | background: transparent
11 |
12 | li.ui-btn-up-c, li.ui-btn-down-c, li.ui-btn-hover-c:hover
13 | background: transparent
14 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/mobile/header.css.sass:
--------------------------------------------------------------------------------
1 | header.ui-header
2 | h1.brand
3 | font-family: ambroise-std, skolar
4 | font-weight: lighter
5 | font-size: 2.5em
6 | margin: 5px 10px
7 |
8 | .ui-btn
9 | top: 16px
10 |
11 | .ui-btn-left
12 | left: 10px
13 |
14 | .ui-btn-right
15 | right: 10px
16 |
17 | nav.ui-header
18 | h2.ui-title
19 | margin: .6em 10% .8em
20 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/mobile/images.css.sass:
--------------------------------------------------------------------------------
1 | .article-container
2 | .image-container .main-image
3 | max-width: 100%
4 | height: auto
5 | border-radius: 4px
6 |
7 | .embedded-image
8 | display: block
9 | margin: 10px 0px
10 | img
11 | max-width: 100%
12 | height: auto
13 | display: block
14 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/print.css.sass:
--------------------------------------------------------------------------------
1 | @import "blueprint"
2 |
3 | // Generate the blueprint print styles:
4 | @include blueprint-print
5 |
6 | .container
7 | +container
8 |
9 | body
10 | h1, h2, h3, p
11 | font-family: serif
12 |
13 | #mast
14 | font-size: 2.5em
15 | border-bottom: 1px solid lightgray
16 |
17 | #article
18 | font-size: 1.2em
19 |
20 | .title
21 | font-size: 2.0em
22 |
23 | .subtitle
24 | margin-top: -25px
25 | font-style: italic
26 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/admin-panel.css.sass:
--------------------------------------------------------------------------------
1 | .admin-panel
2 | font-family: $chron-font-sans
3 | text-transform: uppercase
4 | letter-spacing: 0.5px
5 | background-color: $chron-gray-dark
6 | font-size: 0.9em
7 | padding: 2px 0px
8 | a
9 | color: $chron-gray-medium
10 | a:after
11 | content: " | "
12 | a:last-child:after
13 | content: " "
14 | &:hover
15 | color: inherit
16 | .columns
17 | padding: 0px
18 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/article.css.sass:
--------------------------------------------------------------------------------
1 | .header-taxonomy
2 | margin-top: $page-section-spacing
3 | .breadcrumb-link
4 | font-family: $chron-font-serif
5 | &:after
6 | content: ' » '
7 | font-size: .8em
8 | vertical-align: .1em
9 | &:last-child:after
10 | content: none
11 | article
12 | padding-bottom: 3.5em
13 | main
14 | a
15 | @include text-underline($anchor-font-color, 1.1em)
16 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/containers/article-list.css.sass:
--------------------------------------------------------------------------------
1 | .article-list
2 | article
3 | &:hover
4 | background: $chron-gray-light
5 | padding-top: $page-section-spacing
6 | padding-bottom: $page-section-spacing
7 | header
8 | h1
9 | color: $chron-blue-accent
10 | font-size: 1.1rem
11 | line-height: 1.1rem
12 | p
13 | color: $chron-gray-dark
14 | font-size: .8rem
15 | .taxonomy-article-list
16 | .article-list
17 | article
18 | header
19 | h1
20 | font-size: 1.2rem
21 | line-height: 1.2rem
22 | .header-byline
23 | font-size: 1rem
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/containers/article-row.css.sass:
--------------------------------------------------------------------------------
1 | .article-row
2 | overflow: hidden
3 | background-color: white
4 | margin: .9rem 0
5 | padding: 0 .9rem
6 | border: $chron-gray-border
7 | ul
8 | padding: 0px $column-gutter/2
9 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/containers/sports-standings.css.sass:
--------------------------------------------------------------------------------
1 | .standings
2 | h3
3 | margin-top: 0.5rem
4 | .content-container
5 | .league
6 | table
7 | width: 100%
8 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/form.css.sass:
--------------------------------------------------------------------------------
1 | @import "auth/*.png"
2 |
3 | .facebook-login
4 | margin: 0 auto 10px
5 | width: 374px
6 | height: 84px
7 | display: block
8 | @include auth-sprite(facebook_active)
9 | &:active
10 | @include auth-sprite(facebook_pressed)
11 |
12 | .google-login
13 | margin: 0 auto
14 | width: 374px
15 | height: 64px
16 | display: block
17 | @include auth-sprite(google_active)
18 | &:active
19 | @include auth-sprite(google_pressed)
20 | &:hover
21 | @include auth-sprite(google_hover)
22 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/mobile/advertisement.css.sass:
--------------------------------------------------------------------------------
1 | #mobile-advertisement-container
2 | position: fixed
3 | z-index: 10
4 | bottom: 0px
5 | width: 100%
6 | height: 50px
7 |
8 | .advertisement
9 | width: 320px
10 | margin: auto
11 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/multiplexer.css.sass:
--------------------------------------------------------------------------------
1 | .multiplexer
2 | position: relative
3 | min-height: 300px !important
4 | margin-bottom: 20px
5 |
6 | .selectors
7 | margin-bottom: 0px
8 | .label
9 | font-size: 1.1em
10 | line-height: 1.3em
11 |
12 | .selections
13 | margin-bottom: 0px
14 |
15 | .selection
16 | display: none
17 |
18 | .selected > h3
19 | color: $chron-blue-highlight
20 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/opinion.css.sass:
--------------------------------------------------------------------------------
1 | #editorial-board
2 | margin-top: 20px
3 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/partials/_article-grid.css.sass:
--------------------------------------------------------------------------------
1 | .article-grid
2 | p
3 | color: $chron-text
4 | h2:hover, p:hover
5 | color: $anchor-font-color-hover
6 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/partials/_columns.css.sass:
--------------------------------------------------------------------------------
1 | .opinion-article
2 | width: 100%
3 | padding-bottom: 1rem
4 | margin-top: .5rem
5 | .teaser
6 | margin-bottom: 0px
7 | &:last-child
8 | border-bottom: none
9 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/partials/_multimedia-row.css.sass:
--------------------------------------------------------------------------------
1 | .multimedia-row li
2 | text-align: center
3 | div
4 | margin: auto
5 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/partials/_top-headline.css.sass:
--------------------------------------------------------------------------------
1 | .top-headline
2 | margin-bottom: 4px
3 | padding: 0.875rem
4 | .byline
5 | font-size: .8em
6 | h3
7 | margin: 0px
8 | &:hover
9 | color: $anchor-font-color-hover
10 | p
11 | margin: 0px
12 | a
13 | &:hover
14 | color: inherit
15 |
16 | .breaking-label
17 | display: inline-block
18 | font-size: .6em
19 | vertical-align: top
20 | padding: .2em
21 | margin: .1em 10px
22 | background-color: red
23 | color: $chron-gray-light
24 | border-radius: 4px
25 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/poll.css.sass:
--------------------------------------------------------------------------------
1 | h4.poll-title
2 | margin-bottom: 7px
3 |
4 | ul.choice-list
5 | padding-left: 0px
6 | margin: 7px 0px
7 |
8 | li.poll-choice
9 | list-style-type: none
10 |
11 | .poll-choice-bar
12 | width: 0%
13 | height: 10px
14 | background-color: $chron-blue
15 |
16 | .choice-percentage
17 | font-size: 1em
18 |
19 | .poll button
20 | font-family: $chron-font-sans
21 | letter-spacing: 1px
22 | padding: 0.75rem 1rem
23 |
24 | .poll p
25 | margin-bottom: 0.5em
26 |
27 | .poll-sidebar
28 | margin: 20px
29 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/search.css.sass:
--------------------------------------------------------------------------------
1 | .search-result
2 | border-bottom: $chron-gray-border
3 | overflow: hidden
4 | a
5 | &:hover
6 | color: inherit
7 | &:last-child
8 | border-bottom: none
9 | &:hover
10 | h3
11 | color: $anchor-font-color-hover
12 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/sponsor.css.sass:
--------------------------------------------------------------------------------
1 | .sponsor
2 | .logo img
3 | height: 240px
4 | float: left
5 | padding: 8px
6 | .description
7 | text-align: center
8 | .sponsor-img
9 | height: 100px
10 | display: block
11 | margin-left: auto
12 | margin-right: auto
13 |
14 | .sponsor-coachk
15 | h3
16 | text-align: center
17 | color: $chron-blue
18 |
19 | .contest-rules
20 | margin-left: 10px
21 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/site/tournaments.css.sass:
--------------------------------------------------------------------------------
1 | .tournament-leaderboard
2 | font-size: 1.2em
3 | width: 100%
4 | .highlighted td
5 | font-weight: bold
6 |
7 | .user-row td
8 | border-bottom: 2px solid $chron-text
9 |
10 | .featured-bracket
11 | font-size: 1.2em
12 | .title
13 | font-size: 1.2em
14 | margin-bottom: 0.3em
15 | .headshot
16 | +border-radius(4px)
17 | float: right
18 |
19 | .challenge-text
20 | a
21 | @include text-underline($anchor-font-color, 1.1em)
22 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/animated-overlay.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/animated-overlay.gif
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_flat_0_aaaaaa_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_flat_0_aaaaaa_40x100.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_flat_0_eee_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_flat_0_eee_40x100.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_flat_75_ffffff_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_flat_75_ffffff_40x100.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_glass_65_fff_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_glass_65_fff_1x400.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_glass_75_eee_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_glass_75_eee_1x400.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_glass_75_fff_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_glass_75_fff_1x400.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_glass_95_fef1ec_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_glass_95_fef1ec_1x400.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_highlight-soft_75_069_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-bg_highlight-soft_75_069_1x100.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_069_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_069_256x240.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_222_256x240.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_36c_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_36c_256x240.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_4D90F0_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_4D90F0_256x240.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_cd0a0a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_cd0a0a_256x240.png
--------------------------------------------------------------------------------
/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_eee_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/assets/stylesheets/themes/jquery-ui/chronicle/images/ui-icons_eee_256x240.png
--------------------------------------------------------------------------------
/app/controllers/admin/base_controller.rb:
--------------------------------------------------------------------------------
1 | class Admin::BaseController < ApplicationController
2 | layout 'admin'
3 |
4 | before_filter :authenticate_admin!
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/admin/main_controller.rb:
--------------------------------------------------------------------------------
1 | class Admin::MainController < Admin::BaseController
2 |
3 | def home
4 | end
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/app/controllers/admin/sitevars_controller.rb:
--------------------------------------------------------------------------------
1 | class Admin::SitevarsController < Admin::BaseController
2 | def show
3 | end
4 |
5 | def update
6 | params[:sitevar].each do |var, val|
7 | Sitevar.send "#{var}=", val
8 | end
9 | redirect_to admin_configuration_path
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/app/controllers/admin/widgets_controller.rb:
--------------------------------------------------------------------------------
1 | class Admin::WidgetsController < Admin::BaseController
2 | def index
3 | end
4 |
5 | def match_url
6 | render json: {tag: Post::EmbeddedMedia.match_url_to_tag(params[:url]).to_s}
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/controllers/api/base_controller.rb:
--------------------------------------------------------------------------------
1 | class Api::BaseController < ApplicationController
2 | respond_to :json
3 |
4 | def allow_cors
5 | headers['Access-Control-Allow-Origin'] = '*'
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/app/controllers/api/blog_posts_controller.rb:
--------------------------------------------------------------------------------
1 | class Api::BlogPostsController < ApplicationController
2 |
3 | def index
4 | blog = Blog.find(params[:blog_id])
5 | blog_posts = blog.posts
6 | .includes(:authors, :image)
7 | .order('published_at DESC')
8 | .paginate(page: 1, per_page: params[:limit])
9 | render json: blog_posts, include: :authors,
10 | methods: [:square_80x_url, :blog]
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/app/controllers/api/qduke_controller.rb:
--------------------------------------------------------------------------------
1 | class Api::QdukeController < ApplicationController
2 |
3 | def frontpage
4 | page = Page.find_by_path('/')
5 | page.layout.generate_model
6 | render json: {
7 | layout: ActiveSupport::JSON.decode(page.layout_data),
8 | articles: page.layout.embedded.as_json(include: {image: {methods: :thumbnail_url}}),
9 | }
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/app/controllers/api/searches_controller.rb:
--------------------------------------------------------------------------------
1 | class Api::SearchesController < ApplicationController
2 |
3 | def show
4 | search = Search.new(params)
5 | render json: search.results
6 | end
7 |
8 | end
9 |
--------------------------------------------------------------------------------
/app/controllers/api/taxonomy_controller.rb:
--------------------------------------------------------------------------------
1 | require 'will_paginate/array'
2 |
3 | class Api::TaxonomyController < Api::BaseController
4 | def index
5 | nodes = Taxonomy.nodes(include_archived: true).paginate(
6 | page: params[:page],
7 | per_page: params[:limit]
8 | )
9 | render json: nodes
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/app/controllers/beta/images_controller.rb:
--------------------------------------------------------------------------------
1 | class Beta::ImagesController < Beta::BaseController
2 | end
3 |
--------------------------------------------------------------------------------
/app/controllers/beta/searches_controller.rb:
--------------------------------------------------------------------------------
1 | class Beta::SearchesController < Beta::BaseController
2 |
3 | def show
4 | if params[:search]
5 | params[:search][:page] = params[:page]
6 | params[:search][:highlight] = true
7 | @search = Search.new(params[:search])
8 | @results = @search.results
9 | else
10 | @search = Search.new
11 | @results = []
12 | end
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/app/controllers/beta/topics_controller.rb:
--------------------------------------------------------------------------------
1 | class Beta::TopicsController < Beta::BaseController
2 |
3 | def show
4 | @topic = Topic.find(params[:id])
5 | end
6 |
7 | def index
8 | @active_topics = Topic.where('archived = ?', false)
9 | @archived_topics = Topic.where('archived = ?', true)
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/app/controllers/mobile/base_controller.rb:
--------------------------------------------------------------------------------
1 | class Mobile::BaseController < ApplicationController
2 | layout 'mobile'
3 |
4 | def not_found
5 | render 'mobile/404', status: :not_found
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/app/controllers/mobile/searches_controller.rb:
--------------------------------------------------------------------------------
1 | class Mobile::SearchesController < Mobile::BaseController
2 |
3 | def show
4 | if params[:search]
5 | params[:search][:page] = params[:page]
6 | @search = Search.new(params[:search])
7 | @results = @search.results
8 | else
9 | @search = Search.new
10 | @results = []
11 | end
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/app/controllers/robots_controller.rb:
--------------------------------------------------------------------------------
1 | class RobotsController < ApplicationController
2 |
3 | def show
4 | output = "User-agent: *\n"
5 | Article.where(block_bots: true).find_each do |article|
6 | article.slugs.each do |s|
7 | output += "Disallow: /#{s.slug}\n"
8 | output += "Disallow: /#{s.slug}/print\n"
9 | end
10 | end
11 | render text: output, :content_type => "text/plain"
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/app/controllers/rss/articles_controller.rb:
--------------------------------------------------------------------------------
1 | class Rss::ArticlesController < ApplicationController
2 |
3 | def index
4 | @taxonomy = Taxonomy.new(:sections, "/#{params[:section]}/")
5 | @posts = Article
6 | .includes(:authors, :image)
7 | .section(@taxonomy)
8 | .order('published_at DESC')
9 | .limit(30)
10 | render 'rss/posts/index'
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/app/controllers/rss/blog_posts_controller.rb:
--------------------------------------------------------------------------------
1 | class Rss::BlogPostsController < ApplicationController
2 |
3 | def index
4 | @taxonomy = @blog = Blog.find(params[:blog_id])
5 | @posts = @blog.posts
6 | .includes(:authors, :image)
7 | .order('published_at DESC')
8 | .limit(30)
9 | render 'rss/posts/index'
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/app/controllers/site/searches_controller.rb:
--------------------------------------------------------------------------------
1 | class Site::SearchesController < Site::BaseController
2 |
3 | def show
4 | if params[:search]
5 | params[:search][:page] = params[:page]
6 | params[:search][:highlight] = true
7 | @search = Search.new(params[:search])
8 | @results = @search.results
9 | else
10 | @search = Search.new
11 | @results = []
12 | end
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/app/helpers/admin/articles_helper.rb:
--------------------------------------------------------------------------------
1 | module Admin::ArticlesHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/admin/image_helper.rb:
--------------------------------------------------------------------------------
1 | module Admin::ImageHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/admin/pages_helper.rb:
--------------------------------------------------------------------------------
1 | module Admin::PagesHelper
2 |
3 | def page_url(page)
4 | URI.join("http://www.#{current_domain}", page.path).to_s
5 | end
6 |
7 | def page_layout_options
8 | Page::Layouts.all.each_pair.map do |name, layout_class|
9 | [name, name, {'data-schema' => layout_class.new(nil).json_schema.to_json}]
10 | end
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/app/helpers/admin/staff_helper.rb:
--------------------------------------------------------------------------------
1 | module Admin::StaffHelper
2 | end
3 |
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 |
3 | def datetime_tag(datetime, format, options = {})
4 | data = { format: format }
5 | data[:timestamp] = 'true' if options[:timestamp]
6 | content_tag(
7 | :time,
8 | nil,
9 | datetime: datetime.iso8601,
10 | class: options[:class],
11 | data: data
12 | )
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/app/helpers/rss/application_helper.rb:
--------------------------------------------------------------------------------
1 | module Rss::ApplicationHelper
2 |
3 | def title(section)
4 | if section.is_a? Blog
5 | "The Chronicle | #{section.name}"
6 | elsif section.root?
7 | "The Chronicle"
8 | else
9 | "The Chronicle | #{section.to_a.join(', ')}"
10 | end
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/app/helpers/site/application_helper.rb:
--------------------------------------------------------------------------------
1 | module Site::ApplicationHelper
2 | def frontpage?
3 | request.path == site_root_path
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/helpers/site/poll_helper.rb:
--------------------------------------------------------------------------------
1 | module Site::PollHelper
2 | def voted_on_poll?(poll)
3 | not session["poll#{poll.id}"].nil?
4 | end
5 |
6 | def find_section_poll(taxonomy)
7 | hierarchy = taxonomy.parents
8 | Poll.where(section: hierarchy.map(&:to_s)).order("LENGTH(section) DESC").first
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/helpers/taxonomy_helper.rb:
--------------------------------------------------------------------------------
1 | module TaxonomyHelper
2 |
3 | def section_path(taxonomy, options = {})
4 | case taxonomy.taxonomy
5 | when :sections
6 | options[:section] = taxonomy.to_s[1..-1]
7 | site_article_section_path(options)
8 | when :blogs
9 | blog = Blog.find_by_taxonomy(taxonomy)
10 | if taxonomy.root?
11 | site_blogs_path(options)
12 | elsif blog && taxonomy[1]
13 | site_blog_category_path(blog, category: taxonomy[1].downcase)
14 | else
15 | site_blog_posts_path(blog)
16 | end
17 | end
18 | end
19 |
20 | end
21 |
--------------------------------------------------------------------------------
/app/helpers/topics_helper.rb:
--------------------------------------------------------------------------------
1 | module TopicsHelper
2 |
3 | def hasupvoted(topic_response)
4 | session[:upvotes][topic_response.id]
5 | end
6 |
7 | def hasdownvoted(topic_response)
8 | session[:downvotes][topic_response.id]
9 | end
10 |
11 | end
--------------------------------------------------------------------------------
/app/inputs/body_image_input.rb:
--------------------------------------------------------------------------------
1 | class BodyImageInput < SimpleForm::Inputs::Base
2 | include InputValueHelper
3 |
4 | def input
5 | @builder.text_area(attribute_name, input_html_options) + body_image_input().html_safe
6 | end
7 |
8 | private
9 |
10 | def body_image_input()
11 | <
13 |
17 | EOF
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/app/inputs/date_time_input.rb:
--------------------------------------------------------------------------------
1 | class DateTimeInput < SimpleForm::Inputs::DateTimeInput
2 | include InputValueHelper
3 |
4 | def input
5 | if input_options[:native]
6 | input_html_options[:type] = input_type
7 | if input_type == :date && value(attribute_name)
8 | input_html_options[:value] = value(attribute_name).to_date.to_s
9 | end
10 | @builder.text_field(attribute_name, input_html_options)
11 | else
12 | super
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/app/inputs/input_value_helper.rb:
--------------------------------------------------------------------------------
1 | module InputValueHelper
2 | protected
3 |
4 | def value(attribute_name)
5 | tag = ActionView::Helpers::InstanceTag.new(
6 | @builder.object_name, attribute_name, @builder.template)
7 | tag.value(tag.object)
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/inputs/string_input.rb:
--------------------------------------------------------------------------------
1 | class StringInput < SimpleForm::Inputs::StringInput
2 | include InputValueHelper
3 |
4 | def input
5 | if input_options[:value_method]
6 | target = value(@reflection.name)
7 | if target
8 | input_html_options[:value] = target.send(input_options[:value_method])
9 | end
10 | end
11 | super
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/app/mailers/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/mailers/.gitkeep
--------------------------------------------------------------------------------
/app/mailers/newsletter_mailer.rb:
--------------------------------------------------------------------------------
1 | class NewsletterMailer < ActionMailer::Base
2 | helper PostHelper
3 |
4 | def article(article)
5 | @article = article
6 | mail
7 | end
8 |
9 | def daily(model)
10 | @model = model
11 | mail
12 | end
13 |
14 | def featured(article)
15 | @article = article
16 | mail
17 | end
18 |
19 | def advertisement(href, image_src)
20 | @href = href
21 | @image_src = image_src
22 | mail
23 | end
24 |
25 | def header_image(image_path, alt)
26 | @image_path = image_path
27 | @alt = alt
28 | mail
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/app/mailers/tournament_bracket_mailer.rb:
--------------------------------------------------------------------------------
1 | class TournamentBracketMailer < ActionMailer::Base
2 | def notify_incomplete(bracket)
3 | @bracket = bracket
4 | @start_time = @bracket.tournament.start_date
5 | .in_time_zone("Eastern Time (US & Canada)")
6 | mail(to: @bracket.user.email, subject: 'Complete your bracket')
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/models/blog/serializer.rb:
--------------------------------------------------------------------------------
1 | class Blog
2 | class Serializer
3 | def load(blog)
4 | Blog.find(blog) unless blog.nil?
5 | end
6 |
7 | def dump(blog)
8 | blog.id
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/app/models/page/layouts.rb:
--------------------------------------------------------------------------------
1 | class Page
2 | module Layouts
3 | require_rel 'layouts'
4 |
5 | def self.all
6 | constants.reduce({}) do |layouts, name|
7 | layout = const_get(name)
8 | layouts[name] = layout if layout < Layout
9 | layouts
10 | end
11 | end
12 |
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/app/models/page/layouts/article_grid.rb:
--------------------------------------------------------------------------------
1 | class Page::Layouts::ArticleGrid < Layout
2 |
3 | def schema
4 | {
5 | 'articles' => {
6 | 'type' => 'array',
7 | 'label' => 'Articles',
8 | 'required' => true,
9 | 'items' => article_schema,
10 | },
11 | }
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/app/models/page/layouts/single_block.rb:
--------------------------------------------------------------------------------
1 | class Page::Layouts::SingleBlock < Layout
2 |
3 | def schema
4 | {
5 | 'contents' => {
6 | 'extends' => markdown_schema,
7 | 'required' => true,
8 | 'label' => 'Body Contents',
9 | }
10 | }
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/app/models/page/template.rb:
--------------------------------------------------------------------------------
1 | class Page::Template
2 | require_rel 'template' # loads in subclasses
3 |
4 |
5 | def generate_model(data)
6 | JSON::Validator.fully_validate(schema, data)
7 | end
8 |
9 | def schema
10 | {
11 | 'type' => 'object',
12 | 'required' => true,
13 | 'properties' => model,
14 | }
15 | end
16 |
17 | def markdown
18 | {
19 | "type" => "string",
20 | "description" => "Markdown text",
21 | }
22 | end
23 |
24 | end
25 |
--------------------------------------------------------------------------------
/app/models/page/template/single_block.rb:
--------------------------------------------------------------------------------
1 | class Page::Template::SingleBlock < Page::Template
2 |
3 | def model
4 | {
5 | 'contents' => {
6 | 'extends' => markdown,
7 | 'required' => true,
8 | 'label' => 'Body Contents',
9 | }
10 | }
11 | end
12 |
13 | end
14 |
--------------------------------------------------------------------------------
/app/models/poll.rb:
--------------------------------------------------------------------------------
1 | class Poll < ActiveRecord::Base
2 | extend HasTaxonomy
3 |
4 | attr_accessible :description, :title, :section, :choice_ids, :archived
5 |
6 | has_many :choices, class_name: 'Poll::Choice', dependent: :destroy
7 |
8 | has_taxonomy(:section, :sections)
9 |
10 | accepts_nested_attributes_for :choices
11 |
12 | validates :title, presence: true
13 |
14 | default_scope { where(archived: false) }
15 |
16 | self.per_page = 25
17 | end
18 |
--------------------------------------------------------------------------------
/app/models/post/embedded_media/quote_tag.rb:
--------------------------------------------------------------------------------
1 | class Post
2 | class EmbeddedMedia
3 | class QuoteTag < EmbeddedMedia::Tag
4 | include ActionView::Helpers
5 |
6 | def initialize(_embedded_media, *args)
7 | @text = args.join(',')
8 | end
9 |
10 | def to_html
11 | content_tag(:blockquote, @text)
12 | end
13 |
14 | def full_width?
15 | false
16 | end
17 |
18 | def to_s
19 | "{{Quote:#{@text}}}"
20 | end
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/app/models/topic.rb:
--------------------------------------------------------------------------------
1 | class Topic < ActiveRecord::Base
2 |
3 | has_many :responses, class_name: 'Topic::Response', dependent: :destroy
4 |
5 | attr_accessible :title, :description, :archived
6 |
7 | validates :title, presence: true
8 | end
9 |
--------------------------------------------------------------------------------
/app/sweepers/article_sweeper.rb:
--------------------------------------------------------------------------------
1 | class ArticleSweeper < ActionController::Caching::Sweeper
2 | include ::BaseSweeper
3 | observe Article
4 |
5 |
6 | def after_create(article)
7 | expire_article_cache(article)
8 | end
9 |
10 | def after_update(article)
11 | expire_article_cache(article)
12 | end
13 |
14 | def after_destroy(article)
15 | expire_article_cache(article)
16 | end
17 |
18 | end
19 |
--------------------------------------------------------------------------------
/app/sweepers/blog_post_sweeper.rb:
--------------------------------------------------------------------------------
1 | class BlogPostSweeper < ActionController::Caching::Sweeper
2 | include ::BaseSweeper
3 | observe Blog::Post
4 |
5 | def after_create(post)
6 | expire_blog_post_cache(post)
7 | end
8 |
9 | def after_update(post)
10 | expire_blog_post_cache(post)
11 | end
12 |
13 | def after_destroy(post)
14 | expire_blog_post_cache(post)
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/app/sweepers/image_sweeper.rb:
--------------------------------------------------------------------------------
1 | class ImageSweeper < ActionController::Caching::Sweeper
2 | include ::BaseSweeper
3 | observe Image
4 |
5 | def after_create(image)
6 | expire_cache_for(image)
7 | end
8 |
9 | def after_update(image)
10 | expire_cache_for(image)
11 | end
12 |
13 | def after_destroy(image)
14 | expire_cache_for(image)
15 | end
16 |
17 | private
18 | def expire_cache_for(image)
19 | image.posts.each do |post|
20 | expire_obj_cache post
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/app/sweepers/page_sweeper.rb:
--------------------------------------------------------------------------------
1 | class PageSweeper < ActionController::Caching::Sweeper
2 | observe Page
3 |
4 |
5 | def after_create(page)
6 | expire_cache_for(page)
7 | end
8 |
9 | def after_update(page)
10 | expire_cache_for(page)
11 | end
12 |
13 | def after_destroy(page)
14 | expire_cache_for(page)
15 | end
16 |
17 | private
18 | def expire_cache_for(page)
19 | expire_fragment "www.#{ENV['DOMAIN']}#{page.path}"
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/app/sweepers/staff_sweeper.rb:
--------------------------------------------------------------------------------
1 | class StaffSweeper < ActionController::Caching::Sweeper
2 | include ::BaseSweeper
3 | observe Staff
4 |
5 |
6 | def after_create(staff)
7 | expire_cache_for(staff)
8 | end
9 |
10 | def after_update(staff)
11 | expire_cache_for(staff)
12 | end
13 |
14 | def after_destroy(staff)
15 | expire_cache_for(staff)
16 | end
17 |
18 |
19 | private
20 |
21 | def expire_cache_for(staff)
22 | articles = staff.articles + staff.images.map(&:articles).flatten
23 | articles.each do |article|
24 | expire_article_cache article
25 | end
26 | end
27 |
28 | end
29 |
--------------------------------------------------------------------------------
/app/views/admin/articles/edit.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, "Edit Article"
2 | = render 'admin/articles/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/articles/new.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, "New Article"
2 | = render 'admin/articles/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/blog_posts/edit.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, "Edit Blog Post"
2 | = render 'form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/blog_posts/new.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, "New Blog Post"
2 | = render 'form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/blog_series/edit.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, "Edit Blog Series"
2 | = render 'admin/blog_series/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/blog_series/index.html.haml:
--------------------------------------------------------------------------------
1 | %table.table.table-striped
2 | %thead
3 | %tr
4 | %th Name
5 | %th Actions
6 | - @blog_series.each do |series|
7 | %tr{id: "blog_series_#{series.id}"}
8 | %td= link_to series.name, site_blog_tagged_url(series.blog, series.name, subdomain: 'www')
9 | %td
10 | = link_to "Edit", [:edit, :admin, series], class: 'btn btn-mini'
11 | = link_to "Delete", [:admin, series], method: :delete, data: {confirm: "Are you sure?"}, class: 'btn btn-mini btn-danger'
12 | = will_paginate
13 |
--------------------------------------------------------------------------------
/app/views/admin/blog_series/new.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, "New Blog Series"
2 | = render 'admin/blog_series/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/galleries/_form.html.haml:
--------------------------------------------------------------------------------
1 | = simple_form_for([:site, @gallery], html: {class: 'form-horizontal'}, defaults: {input_html: {class: 'input-xlarge'}}) do |f|
2 | %legend= yield :form_title
3 | = f.error_notification
4 | .form-inputs
5 | = f.input :name
6 | = f.input :date
7 | = f.input :description, label: 'Subtitle', input_html: { rows: 8}
8 |
9 | .form-actions
10 | = f.button :submit, "Submit", class: 'btn btn-large btn-primary'
11 |
--------------------------------------------------------------------------------
/app/views/admin/galleries/edit.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, "Edit Gallery"
2 | = render 'admin/galleries/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/galleries/index.html.haml:
--------------------------------------------------------------------------------
1 | = button_to "Refresh Galleries", scrape_admin_galleries_path, method: 'post'
2 | %table.table.table-striped
3 | %thead
4 | %tr
5 | %th ID
6 | %th Date
7 | %th Gallery
8 | %th Actions
9 | %tbody
10 | - @galleries.each do |gallery|
11 | %tr{id: "gallery_#{gallery.gid}"}
12 | %td= link_to gallery.gid, edit_admin_gallery_path(gallery)
13 | %td= gallery.date
14 | %td= link_to gallery.name, site_gallery_url(gallery, subdomain: 'www')
15 | %td= link_to "Edit", edit_admin_gallery_path(gallery), class: 'btn btn-mini'
16 |
17 | = will_paginate
18 |
--------------------------------------------------------------------------------
/app/views/admin/images/index.html.haml:
--------------------------------------------------------------------------------
1 | %table.table.table-striped
2 | - @images.each do |image|
3 | %tr{id: "image_#{image.id}"}
4 | %td= link_to image.original_file_name, [:edit, :admin, image]
5 | %td= image_tag image.original.url(:rectangle_152x)
6 | %td= link_to "Delete", [:admin, image], method: :delete, data: {confirm: "Are you sure?"}
7 | = will_paginate
8 |
--------------------------------------------------------------------------------
/app/views/admin/main/home.html.haml:
--------------------------------------------------------------------------------
1 | .hero-unit
2 | %h1 Welcome, #{current_user.name}!
3 |
--------------------------------------------------------------------------------
/app/views/admin/pages/index.html.haml:
--------------------------------------------------------------------------------
1 | %table.table.table-striped
2 | %thead
3 | %tr
4 | %th ID
5 | %th Title
6 | %th Actions
7 | %tbody
8 | - @pages.each do |page|
9 | %tr{id: "page_#{page.id}"}
10 | %td= page.id
11 | %td= link_to page.title, page_url(page)
12 | %td
13 | = link_to "Edit", [:edit, :admin, page], class: 'btn btn-mini'
14 | = link_to "Delete", [:admin, page], method: :delete, data: {confirm: "Are you sure?"}, class: 'btn btn-mini btn-danger'
15 | = will_paginate
16 |
--------------------------------------------------------------------------------
/app/views/admin/partials/_flash.html.haml:
--------------------------------------------------------------------------------
1 | - flash.each do |key, value|
2 | .alert{class: "alert-#{key}"}= value
3 |
--------------------------------------------------------------------------------
/app/views/admin/polls/_form.html.haml:
--------------------------------------------------------------------------------
1 | = simple_form_for([:admin, @poll], html: {class: 'form-horizontal'}, defaults: {input_html: {class: 'input-xlarge'}}, wrapper: :bootstrap) do |f|
2 | %legend= yield :form_title
3 | = f.error_notification
4 | .form-inputs
5 | = f.input :title
6 | = f.input :description
7 | = f.input :archived
8 |
9 | = f.input :section, as: :taxonomy, taxonomy: :sections
10 |
11 | %legend Choices
12 | = f.association :choices, as: :text_list, value_method: :title, input_html: {class: 'choice-picker', autocomplete: 'off'}
13 |
14 | .form-actions
15 | = f.button :submit, class: 'btn btn-large btn-primary'
16 |
--------------------------------------------------------------------------------
/app/views/admin/polls/_table.html.haml:
--------------------------------------------------------------------------------
1 | %table.table.table-striped
2 | %thead
3 | %tr
4 | %th Title
5 | %th Section
6 | %th Actions
7 | %tbody
8 | - polls.each do |poll|
9 | %tr
10 | %td= link_to poll.title, [:edit, :admin, poll]
11 | %td= poll.section
12 | %td= link_to 'Edit', [:edit, :admin, poll], class: 'btn btn-mini'
13 |
14 |
--------------------------------------------------------------------------------
/app/views/admin/polls/edit.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, 'Edit Poll'
2 | = render 'admin/polls/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/polls/index.html.haml:
--------------------------------------------------------------------------------
1 | %h3 Active
2 | = render 'table', polls: @unarchived_polls
3 | = will_paginate(@unarchived_polls, param_name: :unarchived_page)
4 | %h3 Archived
5 | = render 'table', polls: @archived_polls
6 | = will_paginate(@archived_polls, param_name: :archived_page)
7 |
--------------------------------------------------------------------------------
/app/views/admin/polls/new.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, 'New Poll'
2 | = render 'admin/polls/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/sitevars/show.html.haml:
--------------------------------------------------------------------------------
1 | = form_for :sitevar, url: admin_configuration_path, method: :put, html: {class: 'form-horizontal'} do |f|
2 | %legend Configuration
3 | .form-inputs
4 | - Sitevar.each do |sitevar|
5 | .control-group
6 | %label.control-label{for: sitevar.name}= sitevar.label
7 | .controls
8 | - if sitevar.type == :text
9 | = f.text_area sitevar.name, class: 'input-xxlarge', value: sitevar.value
10 | - else
11 | = f.text_field sitevar.name, class: 'input-xxlarge', value: sitevar.value
12 | .form-actions
13 | = f.submit 'Send', class: 'btn btn-large btn-primary'
14 |
--------------------------------------------------------------------------------
/app/views/admin/staff/edit.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, 'Edit Staff Member'
2 | = render 'admin/staff/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/staff/index.html.haml:
--------------------------------------------------------------------------------
1 | %h1 Search Staff
2 | %form.form-search.staff-search
3 | %input#staff-search-input.input-large.search-query.staff-picker{type: "search"}
4 | %button.btn.btn-primary{type: "submit"} Search
5 |
--------------------------------------------------------------------------------
/app/views/admin/staff/new.html.haml:
--------------------------------------------------------------------------------
1 | - provide :form_title, 'New Staff Member'
2 | = render 'admin/staff/form'
3 |
--------------------------------------------------------------------------------
/app/views/admin/topics/edit.html.haml:
--------------------------------------------------------------------------------
1 | %btn.pull-left= link_to "All Topics", admin_topics_path, class: 'btn'
2 |
3 | = simple_form_for([:admin, @topic], html: {class: 'form-horizontal'}, defaults: {input_html: {class: 'input-xlarge'}}) do |f|
4 | %legend= yield :form_title
5 | = f.error_notification
6 | .form-inputs
7 | = f.input :description
8 |
9 | .form-actions
10 | = f.button :submit, class: 'btn btn-large btn-primary'
11 |
12 | - content_for :scripts do
13 | = tinymce_assets
14 |
--------------------------------------------------------------------------------
/app/views/admin/topics/index.html.haml:
--------------------------------------------------------------------------------
1 | %btn.pull-left= link_to "New", new_admin_topic_path, class: 'btn'
2 |
3 | = render 'table', topics: @active_topics, title: 'Active Topics'
4 | = render 'table', topics: @archived_topics, title: 'Archived Topics'
5 |
--------------------------------------------------------------------------------
/app/views/admin/topics/new.html.haml:
--------------------------------------------------------------------------------
1 | %btn.pull-left= link_to "All Topics", admin_topics_path, class: 'btn'
2 |
3 | = simple_form_for([:admin, @topic], html: {class: 'form-horizontal'}, defaults: {input_html: {class: 'input-xlarge'}}) do |f|
4 | %legend= yield :form_title
5 | = f.error_notification
6 | .form-inputs
7 | = f.input :title
8 | = f.input :description
9 |
10 | .form-actions
11 | = f.button :submit, class: 'btn btn-large btn-primary'
12 |
--------------------------------------------------------------------------------
/app/views/admin/tournament_teams/edit.html.haml:
--------------------------------------------------------------------------------
1 | = render 'admin/tournament_teams/form', team: @team, form_title: "Edit #{@team.school}"
2 |
--------------------------------------------------------------------------------
/app/views/admin/tournament_teams/new.html.haml:
--------------------------------------------------------------------------------
1 | = render 'admin/tournament_teams/form', team: @team, form_title: "New Team"
2 |
--------------------------------------------------------------------------------
/app/views/admin/tournaments/edit.html.haml:
--------------------------------------------------------------------------------
1 | = render 'admin/tournaments/form', form_title: "Edit #{@tournament.full_name}"
2 |
--------------------------------------------------------------------------------
/app/views/admin/tournaments/index.html.haml:
--------------------------------------------------------------------------------
1 | %table.table.table-striped
2 | %thead
3 | %tr
4 | %th Name
5 | %th Start Date
6 | %th Actions
7 | %tbody
8 | - @tournaments.each do |tournament|
9 | %tr{id: "tournament_#{tournament.id}"}
10 | %td= link_to tournament.full_name, site_tournament_url(tournament, subdomain: 'www')
11 | %td= datetime_tag(tournament.start_date, 'mmm d, yyyy')
12 | %td
13 | = link_to "Manage", [:admin, tournament], class: 'btn btn-mini'
14 | = link_to "Edit", [:edit, :admin, tournament], class: 'btn btn-mini'
15 |
16 | = will_paginate
17 |
--------------------------------------------------------------------------------
/app/views/admin/tournaments/new.html.haml:
--------------------------------------------------------------------------------
1 | = render 'admin/tournaments/form', form_title: "New Tournament"
2 |
--------------------------------------------------------------------------------
/app/views/admin/tournaments/show.html.haml:
--------------------------------------------------------------------------------
1 | %h1= @tournament.full_name
2 |
3 | %h2 Statistics
4 | %p
5 | %strong Number of brackets:
6 | = @tournament.brackets.count
7 |
8 | %h2 Teams
9 | = link_to "Add team", new_admin_tournament_tournament_team_path(@tournament)
10 | %ul
11 | - @teams.each do |team|
12 | %li= link_to team.school, [:edit, :admin, @tournament, team]
13 |
--------------------------------------------------------------------------------
/app/views/admin/widgets/index.html.haml:
--------------------------------------------------------------------------------
1 | .row
2 | .span8
3 | #widget-editor
4 | #tag-result
5 | .span4
6 | %ul#methods.nav.nav-tabs.nav-stacked
7 |
--------------------------------------------------------------------------------
/app/views/application/unauthorized.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, "Unauthorized"
2 |
3 | %p You are not authorized to view this page
4 |
--------------------------------------------------------------------------------
/app/views/beta/404.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, 'Page Not Found'
2 |
3 | - content_for :title_bock do
4 | %h1 'Page Not Found'
5 | .span-8
6 | .rounded
7 | .article-container
8 | .notfound-text
9 | Sorry, this page doesn't exist. Please click
10 | %a{href: site_root_path} here
11 | to go back to our homepage.
12 | = render 'partials/failwhale'
13 | .span-4.last
14 | = render partial: 'beta/partials/advertisement', locals: {zone: :medium_rectangle}
15 | = render 'beta/partials/facebook-recommended'
16 |
--------------------------------------------------------------------------------
/app/views/beta/articles/_subtitle.html.haml:
--------------------------------------------------------------------------------
1 | - notime ||= true
2 |
3 | %p.subtitle
4 | %span.author= byline(article)
5 | = display_date(article, nil, notime: notime)
6 |
--------------------------------------------------------------------------------
/app/views/beta/blog_posts/_blog.html.haml:
--------------------------------------------------------------------------------
1 | .rounded
2 | %article.article-container
3 | %h3= blog_post.blog.name
4 | %h1.title= blog_post.title
5 |
6 | %p.byline
7 | %span.author
8 | By
9 | = link_to blog_post.author.name, site_staff_path(blog_post.author)
10 | %span.sep= "|"
11 | %span.date= display_date(blog_post)
12 |
13 | - if blog_post.image
14 | = render partial: 'partials/main-image', locals: {image: blog_post.image}
15 |
16 | .article-body
17 | = render partial: 'beta/partials/share-box', locals: {postable: blog_post, except: [:print, :email]}
18 | != blog_post.render_body
19 |
--------------------------------------------------------------------------------
/app/views/beta/blog_posts/_tags.html.haml:
--------------------------------------------------------------------------------
1 | - if blog_post.tags.present?
2 | .tags-row
3 | %ul.tags
4 | - blog_post.tags.each do |tag|
5 | %li= link_to tag, site_blog_tagged_path(tag: tag.name)
6 |
--------------------------------------------------------------------------------
/app/views/beta/blog_posts/index.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, @blog.name
2 |
3 | - content_for :title_block do
4 | = render 'beta/partials/navigation'
5 |
6 | = render 'beta/blog_posts/index'
7 |
--------------------------------------------------------------------------------
/app/views/beta/blog_posts/tags.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, "#{@blog.name}: #{params[:tag]}"
2 |
3 | - content_for :title_block do
4 | %h1 #{link_to @blog.name, site_blog_posts_path(@blog)}: #{params[:tag]}
5 |
6 | = render 'beta/blog_posts/index'
7 |
--------------------------------------------------------------------------------
/app/views/beta/blogs/index.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, "Blogs"
2 | - provide :title_block do
3 | %h1 Chronicle Blogs
4 |
5 | .align-group.clearfix
6 | - Blog.all.each_with_index do |blog, i|
7 | .span-4.align-element{data: {aligntarget: '.rounded'}, class: ("last" if i % 3 == 2)}
8 | = render 'beta/partials/blog-info', {blog: blog, show_label: false}
9 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_article-list.html.haml:
--------------------------------------------------------------------------------
1 | - notime ||= true
2 |
3 | .article-list
4 | %h2.vertical-label= title
5 | .rounded
6 | .content-container
7 | - articles.each_with_index do |article, i|
8 | %a.list-story.hover.highlight-right{href: site_post_path(article)}
9 | - if style
10 | = render partial: "beta/containers/article-list/#{style}", locals: {article: article, first: (i == 0), options: {notime: notime}}
11 | - else
12 | %h3.title= article.title
13 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_blog-box.html.haml:
--------------------------------------------------------------------------------
1 | .article-box
2 | .rounded
3 | - articles.each do |article|
4 | .clearfix
5 | %a.hover.highlight-left{href: site_post_path(article)}
6 | .content-container
7 | - if article.image
8 | = cropped_image_tag article.image, :rectangle_183x
9 | %h4.title= article.title
10 | %p.subtitle
11 | %span.author= byline(article)
12 | = display_date(article)
13 | %p.teaser= article.teaser
14 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_featured-bracket.html.haml:
--------------------------------------------------------------------------------
1 | .rounded.featured-bracket
2 | .content-container
3 | .clearfix
4 | - if bracket_info['headshot']
5 | = cropped_image_tag Image.find(bracket_info['headshot']), :square_80x, class: 'headshot'
6 | %h3.name= link_to bracket_info['bracket'].user.name, [:site, tournament, bracket_info['bracket']]
7 | %p.title= bracket_info['position']
8 | %p
9 | %strong Champion:
10 | = bracket_info['champion'].try(:school)
11 | %p
12 | %strong Rank:
13 | = bracket_info['bracket'].rank
14 | %p
15 | %strong Score:
16 | = bracket_info['bracket'].score
17 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_image.html.haml:
--------------------------------------------------------------------------------
1 | %h2.vertical-label= title
2 | .rounded
3 | .image-container.clearfix
4 | %a{href: image.original.url}
5 | = cropped_image_tag image, :rectangle_468x
6 | .photo-credit
7 | %span= photo_credit(image)
8 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_multimedia-row.html.haml:
--------------------------------------------------------------------------------
1 | .multimedia-row
2 | %h2.vertical-label= title
3 | .rounded.clearfix
4 | - multimedia.each do |element|
5 | .element!= element
6 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_multiplexer.html.haml:
--------------------------------------------------------------------------------
1 | .multiplexer.wide
2 | %h2.vertical-label= title
3 |
4 | .rounded.selectors
5 | .content-container
6 | - selections.each do |selector, _|
7 | %a.hover.highlight-left{href: "#"}
8 | %h2.label= selector
9 |
10 | .rounded.selections
11 | - selections.each do |_, selection|
12 | .selection
13 | .article-container
14 | .article-body
15 | != selection
16 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_poll.html.haml:
--------------------------------------------------------------------------------
1 | - if poll
2 | %h2.vertical-label Poll
3 | .rounded
4 | .content-container
5 | .poll-container
6 | .poll{data: {'poll-id' => poll.id}}
7 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_sports-standings.html.haml:
--------------------------------------------------------------------------------
1 | .standings
2 | %h2.vertical-label Standings
3 | .rounded
4 | .content-container
5 | - ESPN.new.standings(url).to_a.reverse.each do |league, standings|
6 | .league
7 | %h3= league
8 | %table
9 | %tr
10 | %th Team
11 | %th Conference
12 | %th Overall
13 | - standings.each do |team, conf, overall|
14 | %tr
15 | %td= team
16 | %td= conf
17 | %td= overall
18 |
--------------------------------------------------------------------------------
/app/views/beta/containers/_twitter-timeline.html.haml:
--------------------------------------------------------------------------------
1 | .rounded
2 | %h2.vertical-label Twitter
3 | %a.twitter-timeline{href: "https://twitter.com/#{handle}", data: {'widget-id' => "295248698340933632"}} Tweets by @#{handle}
4 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-list/_disqus.html.haml:
--------------------------------------------------------------------------------
1 | .article-list
2 | %h2.vertical-label= title
3 | .rounded
4 | .content-container
5 | - articles.each do |article, comments|
6 | %a.list-story.hover.highlight-right{href: site_post_path(article)}
7 | %h3.title= article.title
8 | %p.subtitle
9 | %span.comments #{comments} Comments
10 | = display_date(article, nil, notime: true)
11 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-list/_featured.html.haml:
--------------------------------------------------------------------------------
1 | %h3.title= article.title
2 | - if first
3 | %p.teaser= article.teaser
4 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-list/_numbered.html.haml:
--------------------------------------------------------------------------------
1 | .article-list
2 | %h2.vertical-label= title
3 | .rounded
4 | .content-container
5 | %ol
6 | - articles.each do |article|
7 | %a.list-story.hover.highlight-right{href: site_post_path(article)}
8 | %li
9 | %h3.title= article.title
10 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-list/_page.html.haml:
--------------------------------------------------------------------------------
1 | .article-list
2 | .rounded
3 | .content-container
4 | %a.list-story.hover{href: page.path}
5 | %h3.title
6 | = page.title
7 | %p.teaser= page.description
8 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-list/_rss.html.haml:
--------------------------------------------------------------------------------
1 | .article-list
2 | %h2.vertical-label= title
3 | .rounded
4 | - if image
5 | .image-container
6 | %a{href: image[:href]}
7 | = image_tag image[:src], class: :banner
8 | .content-container
9 | - items.each do |item|
10 | %a.list-story.hover.highlight-right{href: item.link}
11 | %h3.title= item.title
12 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-list/_single.html.haml:
--------------------------------------------------------------------------------
1 | .article-list{class: ('breaking' if breaking)}
2 | .rounded
3 | .content-container
4 | %a.list-story.hover{href: site_post_path(article)}
5 | %h3.title
6 | = article.title
7 | - if breaking
8 | %span.breaking-label Breaking
9 | = render partial: 'beta/articles/subtitle', locals: {article: article}
10 | %p.teaser= article.teaser
11 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-list/_subhead.html.haml:
--------------------------------------------------------------------------------
1 | %h3.title= article.title
2 | = render partial: 'beta/articles/subtitle', locals: {article: article, notime: options[:notime]}
3 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-list/_teaser.html.haml:
--------------------------------------------------------------------------------
1 | %h3.title= article.title
2 | %p.subtitle
3 | %span.date= article.published_at.strftime("%B %e, %Y")
4 | %p.teaser= article.teaser
5 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-row/_teaser.html.haml:
--------------------------------------------------------------------------------
1 | %h3.title= article.title
2 | %p.subtitle
3 | %span.author= byline(article)
4 | - unless feature and index == 0
5 | %p.teaser= article.teaser
6 |
--------------------------------------------------------------------------------
/app/views/beta/containers/article-row/_title.html.haml:
--------------------------------------------------------------------------------
1 | %h3.title= article.title
2 | %p.subtitle
3 | = display_date article
4 | - unless article.image
5 | %p.teaser= article.teaser
6 |
--------------------------------------------------------------------------------
/app/views/beta/containers/block/_featured.html.haml:
--------------------------------------------------------------------------------
1 | .block.block-featured
2 | .rounded
3 | %a.hover.highlight-bottom{href: site_post_path(article)}
4 | - if article.image
5 | .image-container
6 | = cropped_image_tag article.image, :rectangle_468x
7 | .content-container
8 | %h3.title= article.title
9 | %p.teaser= article.teaser
10 |
--------------------------------------------------------------------------------
/app/views/beta/containers/block/_square.html.haml:
--------------------------------------------------------------------------------
1 | .block.block-square
2 | .rounded
3 | %a.hover.highlight-right{href: site_post_path(article)}
4 | - if article.image
5 | .image-container
6 | = cropped_image_tag article.image, :square_150x
7 | .content-container
8 | %h4.title= article.title
9 | %p.teaser= article.teaser
10 |
--------------------------------------------------------------------------------
/app/views/beta/containers/block/_thumbnail.html.haml:
--------------------------------------------------------------------------------
1 | .block.block-thumbnail
2 | .rounded
3 | %a.hover.highlight-right{href: site_post_path(article)}
4 | .content-container
5 | %h4.title= article.title
6 | - if article.image
7 | = cropped_image_tag article.image, :square_70x
8 | %p.teaser= article.teaser
9 |
--------------------------------------------------------------------------------
/app/views/beta/containers/block/_wide.html.haml:
--------------------------------------------------------------------------------
1 | - title ||= nil
2 | - unless defined? show_image
3 | - show_image = true
4 |
5 | .block.block-wide
6 | %h2.vertical-label= title
7 | .rounded
8 | %a.hover.highlight-bottom{href: site_post_path(article)}
9 | - if article.image and show_image
10 | .image-container
11 | = cropped_image_tag article.image, :banner_216x
12 | .content-container
13 | %h3.title= article.title
14 | %p.teaser= article.teaser
15 |
--------------------------------------------------------------------------------
/app/views/beta/galleries/index.html.haml:
--------------------------------------------------------------------------------
1 | - @galleries.each do |gallery|
2 | %h3= link_to gallery.name, site_gallery_path(gallery)
3 |
4 | = will_paginate
5 |
--------------------------------------------------------------------------------
/app/views/beta/pages/article_grid.html.haml:
--------------------------------------------------------------------------------
1 | .clearfix.align-group
2 | - (@model.articles || []).each_with_index do |article, i|
3 | - if (i+1)%2 == 0
4 | .span-6.last= render partial: 'beta/containers/block/square', locals: {article: article }
5 | - else
6 | .span-6= render partial: 'beta/containers/block/square', locals: {article: article }
7 |
--------------------------------------------------------------------------------
/app/views/beta/pages/bracket.html.haml:
--------------------------------------------------------------------------------
1 | %div#bracket_data{:data => {:bracket => @model.to_json} }
2 | %div.rounded
3 | .content-container
4 | %h1{:style =>'text-align: center'}NCAA Bracket
5 | %h3{:style =>'text-align: center'} Click on a team to see their description.
6 | %canvas#bracket{:width => 978, :height => 1200}
7 |
--------------------------------------------------------------------------------
/app/views/beta/pages/large_embed.html.haml:
--------------------------------------------------------------------------------
1 | .clearfix.align-group
2 | .span-8
3 | .rounded.slideshow-embed
4 | != @model.slideshow_embed
5 | .rounded
6 | != @model.large_embed
7 | .span-4.last.align-element
8 | = render partial: 'beta/partials/video', locals: {video: @model.video }
9 | - (@model.side_articles || []).each_with_index do |article, i|
10 | .span-4{class: (i % 3 == 2 ? 'last' : nil)}= render partial: 'beta/containers/block/square', locals: {article: article}
11 |
--------------------------------------------------------------------------------
/app/views/beta/pages/recruitment.html.haml:
--------------------------------------------------------------------------------
1 | .rounded
2 | .article-container
3 | .article-body.clearfix
4 | = cropped_image_tag @model.main_image, :rectangle_606x, class: 'embedded-right'
5 | != @model.pitch
6 |
7 | .clearfix
8 | .span-8
9 | - selections = @model.sections.map { |section| [section['name'], section['description']] }
10 | = render partial: 'beta/containers/multiplexer', locals: { title: "Information", selections: selections }
11 |
12 | .span-4.last
13 | %h2.vertical-label Sign Up
14 | .rounded
15 | .content-container!= @model.form_embed
16 |
--------------------------------------------------------------------------------
/app/views/beta/pages/single_block.html.haml:
--------------------------------------------------------------------------------
1 | .rounded
2 | .article-container
3 | .article-body!= @model.contents
4 |
--------------------------------------------------------------------------------
/app/views/beta/pages/sports_event.html.haml:
--------------------------------------------------------------------------------
1 | .clearfix.align-group
2 | .span-6.align-element{data: {aligntarget: '.rounded'}}
3 | .rounded
4 | .image-container!= @model.video
5 |
6 | .span-6.last.align-element{data: {aligntarget: '.rounded'}}
7 | = render partial: 'beta/partials/sports-event-info', locals: {title: 'Game Details', info: @model.information}
8 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_admin-panel.html.haml:
--------------------------------------------------------------------------------
1 | - if current_user.try(:admin?)
2 | .admin-panel
3 | = link_to "Administrative Interface", admin_root_url(subdomain: :admin)
4 | - if @page.present? and @page.is_a? Page
5 | = link_to "Edit this page", edit_admin_page_url(@page, subdomain: :admin)
6 | - if content_for? :administrative_links
7 | = yield :administrative_links
8 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_admin_notification.html.haml:
--------------------------------------------------------------------------------
1 | - if current_user.try(:admin?)
2 | .admin-notification.showing
3 | .admin-notification-header
4 | Admin Notification
5 | .toggle-link
6 | [ Hide ]
7 | .admin-notification-body
8 | %h1 This is a sample view!
9 | %h2 Your article has not been published yet.
10 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_advertisement.html.haml:
--------------------------------------------------------------------------------
1 | - suffix ||= nil
2 | .advertisement
3 | %h2.vertical-label Advertisement
4 | .rounded
5 | .image-container
6 | %div{class: zone}= advertisement(zone, suffix)
7 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_advertisement_tag.html.haml:
--------------------------------------------------------------------------------
1 | :javascript
2 | OX_#{group_id}.showAdUnit("#{unit}");
3 | %noscript
4 | %iframe{id: group_id, name: group_id, src: "//ox-d.oncampusweb.com/w/1.0/afr?auid=#{unit}&cb=#{a_random}", frameBorder: 0, frameSpacing: 0, scrolling: "no", width: "#{width}", height: "#{height}"}
5 | %a{href: "//ox-d.oncampusweb.com/w/1.0/rc?cs=#{group_id}&cb=#{a_random}"}
6 | %img{src: "//ox-d.oncampusweb.com/w/1.0/ai?auid=#{unit}&cs=#{group_id}&cb=#{a_random}", border: 0}
7 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_blog-info.html.haml:
--------------------------------------------------------------------------------
1 | - unless defined? show_label then show_label = true end
2 |
3 | .blog-info.title-small
4 | - if show_label
5 | %h2.vertical-label Blog
6 | .rounded
7 | %a.banner{href: site_blog_posts_path(blog)}
8 | = blog_logo_tag blog, class: 'blog-logo'
9 | .content-container
10 | %p.description= blog.description
11 | %h3 Recent Posts
12 | %ul.article-list
13 | - recent_blog_posts(blog).each do |blog_post|
14 | %li
15 | %a.list-story.hover{href: site_blog_post_path(blog, blog_post)}
16 | %h3.title= blog_post.title
17 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_blog_navigation.html.haml:
--------------------------------------------------------------------------------
1 | .nav-container
2 | %nav.subnav
3 | - @blog.categories.each do |tag|
4 | %a.hover{href: site_blog_tagged_path(tag: tag)}
5 | %h2= tag
6 | %h1= @blog.name
7 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_facebook-recommended.html.haml:
--------------------------------------------------------------------------------
1 | .rounded.facebook-recommended
2 | %h2.vertical-label Facebook Recommended
3 | .fb-recommendations{data: {width: 300, height: 300, header: "true", font: "lucida grande", 'border-color' => 'white'}}
4 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_flash.html.haml:
--------------------------------------------------------------------------------
1 | - flash.each do |key, value|
2 | %div{class: key}= value
3 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_gallery_navigation.html.haml:
--------------------------------------------------------------------------------
1 | .nav-container
2 | %nav.subnav
3 | %h1.title= link_to "Photo Galleries", site_galleries_path
4 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_image_slideshow.html.haml:
--------------------------------------------------------------------------------
1 | .rounded.large-slideshow
2 | .galleria
3 | - images.each do |image|
4 | = cropped_image_tag image, :rectangle_636x, 'data-title' => image.caption, 'data-link' => '#'
5 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_large-photoshelter-slideshow.html.haml:
--------------------------------------------------------------------------------
1 | .rounded.large-slideshow
2 | .galleria
3 | - gallery.images.each do |image|
4 | %img{:src => image.url, :data => {:link => site_gallery_path(gallery)}}
5 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_navigation.html.haml:
--------------------------------------------------------------------------------
1 | - nav_links ||= nil
2 |
3 | .nav-container
4 | %nav.subnav
5 | - if nav_links
6 | - nav_links.each do |link|
7 | %a.hover{href: link['href']}
8 | %h2= link['name']
9 | - else
10 | - @taxonomy.children.each do |subsection|
11 | %a.hover{href: section_path(subsection)}
12 | %h2= subsection.name
13 | %h1
14 | - @taxonomy.parents.each_with_index do |parent, i|
15 | - if i > 0
16 | »
17 | = link_to parent.name, section_path(parent)
18 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_openx.html.haml:
--------------------------------------------------------------------------------
1 | %script{type: 'text/javascript', src: '//ox-d.oncampusweb.com/w/1.0/jstag'}
2 | :javascript
3 | var OX_#{ad_group_id} = OX();
4 | OX_#{ad_group_id}.addPage("536870985");
5 | OX_#{ad_group_id}.fetchAds();
6 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_small-photoshelter-slideshow.html.haml:
--------------------------------------------------------------------------------
1 | - width ||= 200
2 | - image = gallery.images.first
3 | - if image
4 | %a{href: site_gallery_url(gallery) }
5 | %img.gal-img{:src => image.url(width), :data => {:link => site_gallery_url(gallery)}, width: "#{width}px"}
6 | %p.title-link= link_to gallery.name, site_gallery_path(gallery)
7 |
8 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_twitter-timeline.html.haml:
--------------------------------------------------------------------------------
1 | /%h2.vertical-label Twitter
2 | .rounded
3 | %a.twitter-timeline{'data-widget-id' => widget_id}
4 |
--------------------------------------------------------------------------------
/app/views/beta/partials/_video.html.haml:
--------------------------------------------------------------------------------
1 | .rounded
2 | .image-container!= video
3 |
--------------------------------------------------------------------------------
/app/views/beta/partials/open-graph/_facebook-app.html.haml:
--------------------------------------------------------------------------------
1 | %meta{property: "fb:app_id", content: ENV['FACEBOOK_APP_ID']}
2 |
--------------------------------------------------------------------------------
/app/views/beta/partials/open-graph/_staff.html.haml:
--------------------------------------------------------------------------------
1 | %meta{property: "og:type", content: "profile"}
2 | %meta{property: "og:url", content: site_staff_url(staff, subdomain: 'www')}
3 | - if staff.headshot
4 | %meta{property: "og:image", content: 'http:' + staff.headshot.original.url(:rectangle_636x)}
5 | %meta{property: "og:title", content: staff.name}
6 | - if staff.tagline
7 | %meta{property: "og:description", content: staff.tagline}
8 |
--------------------------------------------------------------------------------
/app/views/beta/partials/twitter_cards/_post.html.haml:
--------------------------------------------------------------------------------
1 | - unless post.teaser.blank?
2 | %meta{name: 'twitter:card', content: :summary}
3 | %meta{name: 'twitter:site:id', content: ENV['TWITTER_ID']}
4 | %meta{name: 'twitter:title', content: post.title}
5 | %meta{name: 'twitter:url', content: permanent_post_url(post)}
6 | %meta{name: 'twitter:description', content: post.teaser}
7 | - if post.authors.first.twitter.present?
8 | %meta{name: 'twitter:creator', content: "@#{post.authors.first.twitter}"}
9 | - if post.image
10 | %meta{name: 'twitter:image', content: 'http:' + post.image.original.url(:square_200x)}
11 |
--------------------------------------------------------------------------------
/app/views/beta/searches/_article.html.haml:
--------------------------------------------------------------------------------
1 | .rounded
2 | %a.hover{href: site_article_path(article)}
3 | .content-container
4 | %h3= article.matched_title || article.title
5 | = render partial: 'beta/articles/subtitle', locals: {article: article}
6 | %p= article.matched_content || article.teaser
7 |
--------------------------------------------------------------------------------
/app/views/beta/searches/_blog_post.html.haml:
--------------------------------------------------------------------------------
1 | .rounded
2 | %a.hover{href: site_blog_post_path(blog_post.blog, blog_post)}
3 | .content-container
4 | %h3= blog_post.matched_title || blog_post.title
5 | = render partial: 'beta/articles/subtitle', locals: {article: blog_post}
6 | - if blog_post.matched_content.present?
7 | %p= blog_post.matched_content
8 |
--------------------------------------------------------------------------------
/app/views/beta/searches/_result.html.haml:
--------------------------------------------------------------------------------
1 | - if result.is_a? Article
2 | = render partial: 'beta/searches/article', locals: {article: result}
3 | - if result.is_a? Blog::Post
4 | = render partial: 'beta/searches/blog_post', locals: {blog_post: result}
5 |
--------------------------------------------------------------------------------
/app/views/beta/staff/show.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, @staff.name
2 |
3 | - content_for :administrative_links do
4 | = link_to "Edit staff profile", edit_admin_staff_url(@staff, subdomain: :admin)
5 |
6 | - content_for :open_graph_tags do
7 | = render partial: 'beta/partials/open-graph/staff', locals: {staff: @staff}
8 |
9 | - content_for :title_block do
10 | %h1= @staff.name
11 |
12 | = render partial: 'beta/containers/staff-profile', locals: {staff: @staff, except: nil}
13 |
--------------------------------------------------------------------------------
/app/views/beta/topics/index.html.haml:
--------------------------------------------------------------------------------
1 | .span-8
2 | .rounded
3 | .topic-container
4 | =button_to "Back", site_opinion_path, method: :get
5 | %h2='Discussion Topics'
6 |
7 | %table.table.table-striped
8 | %thead
9 | %tr
10 | %th Topic
11 | %th Description
12 | %th Created Date
13 | - @active_topics.each do |topic|
14 | %tr{id: "topic_#{topic.id}"}
15 | %td= link_to topic.title, admin_topic_path(topic)
16 | %td= topic.description
17 | %td= datetime_tag(topic.created_at,"mm/dd/yyyy")
--------------------------------------------------------------------------------
/app/views/beta/topics/show.html.haml:
--------------------------------------------------------------------------------
1 | .span-8
2 | .rounded
3 | .topic-container
4 | =button_to "Back", site_topics_path, method: :get
5 | = render 'beta/containers/topics', title: 'Discussion', topic: @topic
6 |
--------------------------------------------------------------------------------
/app/views/beta/tournament_brackets/new.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, "Create an #{@tournament.full_name} Bracket"
2 |
3 | .rounded
4 | .bracket-container
5 | %p.challenge-text
6 | Double click on a game box to see a preview of the match up.
7 | = form_for [:site, @tournament, @bracket] do |f|
8 | = f.hidden_field :picks
9 | = f.submit "Done", class: "done button button-flat-action button-large"
10 | #bracket.bracket{data: {bracket: tournament_bracket_json(@bracket)}}
11 |
--------------------------------------------------------------------------------
/app/views/beta/tournament_brackets/show.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, "#{@bracket.user.name}'s #{@tournament.full_name} Bracket"
2 |
3 | .rounded
4 | .bracket-container
5 | = render 'beta/partials/flash', flash: flash
6 | - if @tournament.started?
7 | %p.challenge-text
8 | Click
9 | = link_to "here", leaderboard_site_tournament_path(@tournament)
10 | to see the Chronicle bracket challenge leaderboard.
11 | - unless @forbidden
12 | #bracket.bracket{data: {bracket: tournament_bracket_json(@bracket)}}
13 |
--------------------------------------------------------------------------------
/app/views/beta/tournaments/challenge.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, "#{@tournament.full_name} Challenge"
2 |
3 | .clearfix
4 | .span-8
5 | .rounded
6 | .article-container
7 | .article-body!= @tournament.challenge_text
8 |
9 | .span-4.last
10 | = render 'beta/partials/advertisement', zone: :medium_rectangle
11 |
--------------------------------------------------------------------------------
/app/views/devise/mailer/reset_password_instructions.html.haml:
--------------------------------------------------------------------------------
1 | %p Hello #{@resource.first_name}
2 |
3 | %p Someone has requested a link to change your password. You can do this through the link below.
4 |
5 | %p= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @resource.reset_password_token, subdomain: 'www')
6 |
7 | %p If you didn't request this, please ignore this email.
8 | %p Your password won't change until you access the link above and create a new one.
9 |
--------------------------------------------------------------------------------
/app/views/layouts/admin.html.haml:
--------------------------------------------------------------------------------
1 | !!! 5
2 | %html
3 | %head
4 | %title The Chronicle
5 | = stylesheet_link_tag "admin", :media => "all"
6 | = csrf_meta_tags
7 | %body
8 | = render 'admin/partials/header'
9 | .container
10 | = render 'admin/partials/flash', flash: flash
11 | = yield
12 | #scripts
13 | = javascript_include_tag "admin"
14 | = yield :scripts
15 |
--------------------------------------------------------------------------------
/app/views/layouts/error.html.haml:
--------------------------------------------------------------------------------
1 | !!! 5
2 | %html
3 | %head
4 | %meta{'http-equiv' => "Content-Type", content: "text/html; charset=UTF-8"}
5 | %title #{yield :title} | The Chronicle
6 | = stylesheet_link_tag 'error', media: 'all'
7 | %body
8 | .section
9 | %h1 The Chronicle
10 | .article= yield
11 |
--------------------------------------------------------------------------------
/app/views/layouts/print.html.haml:
--------------------------------------------------------------------------------
1 | !!! 5
2 | %html
3 | %head
4 | %title #{yield(:title)} | The Chronicle
5 | = stylesheet_link_tag "print", :media => "all"
6 | = render 'partials/favicon'
7 | = yield :head
8 | %body
9 | .container= yield
10 |
--------------------------------------------------------------------------------
/app/views/mobile/404.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, 'Page Not Found'
2 |
3 | - content_for :title_bock do
4 | %h1 'Page Not Found'
5 | .center
6 | Sorry, this page doesn't exist. Please click
7 | %a{href: mobile_root_path} here
8 | to go back to our homepage.
9 | =render 'partials/failwhale'
10 |
--------------------------------------------------------------------------------
/app/views/mobile/blogs/index.html.haml:
--------------------------------------------------------------------------------
1 | - provide :title, "Blogs"
2 |
3 | - provide :title_block do
4 | %h2
5 | = link_to "Home", mobile_root_path
6 | »
7 | = link_to "Blogs", mobile_blogs_path
8 |
9 | #blog-listing{data: {role: "collapsible-set", 'collapsed-icon' => "arrow-r", 'expanded-icon' => "arrow-d"}}
10 | - Blog.each do |blog|
11 | %div{data: {role: "collapsible", theme: "a", 'content-theme' => "c", collapsed: "true", blog: blog.id}}
12 | %h3= blog.name
13 | %ul{data: {role: "listview"}}
14 | %li= link_to "Visit the #{blog.name}", mobile_blog_posts_path(blog)
15 |
--------------------------------------------------------------------------------
/app/views/mobile/partials/_footer.html.haml:
--------------------------------------------------------------------------------
1 | %footer{data: {role: "footer", theme: "c"}}
2 | %h4 Copyright © 2012
3 | %h4 Duke Student Publishing Company
4 | %h4= link_to "View Full Site", "#", id: 'full-site'
5 | #push
6 |
--------------------------------------------------------------------------------
/app/views/mobile/partials/_header.html.haml:
--------------------------------------------------------------------------------
1 | %header{data: {role: "header", theme: "a", 'add-back-btn' => "true"}}
2 | %h1.brand The Chronicle
3 | %a.ui-btn-right#seach-button{href: "#search-dialog", data: {role: "button", rel: "dialog", icon: "search", iconpos: "notext", theme: "b"}} Search
4 | - if content_for? :title_block
5 | %nav{data: {role: "header", theme: "c"}}
6 | %a{data: {role: "button", rel: "back", icon: "back", iconpos: "notext"}} Back
7 | = yield :title_block
8 |
--------------------------------------------------------------------------------
/app/views/mobile/partials/_search-dialog.html.haml:
--------------------------------------------------------------------------------
1 | #search-dialog{data: {role: "dialog"}}
2 | %div{data: {role: "header"}}
3 | %h1 Search
4 | %section{data: {role: "content"}}
5 | = form_for(Search.new, url: site_search_path, method: :get, html: {id: 'search-box'}) do |f|
6 | = f.search_field :query, placeholder: 'Search archives', results: '5'
7 |
--------------------------------------------------------------------------------
/app/views/mobile/partials/_section-navigation.html.haml:
--------------------------------------------------------------------------------
1 | %h2
2 | = link_to "Home", mobile_root_path
3 | - taxonomy.parents.each do |parent|
4 | »
5 | = link_to parent.name, section_path(parent)
6 |
--------------------------------------------------------------------------------
/app/views/mobile/searches/_article.html.haml:
--------------------------------------------------------------------------------
1 | %a{href: mobile_article_path(article)}
2 | - if article.image
3 | = cropped_image_tag article.image, :square_80x
4 | %h2= article.title
5 | %p #{byline(article)} | #{display_date(article)}
6 |
--------------------------------------------------------------------------------
/app/views/mobile/searches/_blog_post.html.haml:
--------------------------------------------------------------------------------
1 | %a{href: mobile_blog_post_path(blog_post.blog, blog_post)}
2 | - if blog_post.image
3 | = cropped_image_tag blog_post.image, :square_80x
4 | %h2= blog_post.title
5 | %p #{byline(blog_post)} | #{display_date(blog_post)}
6 |
--------------------------------------------------------------------------------
/app/views/mobile/searches/_result.html.haml:
--------------------------------------------------------------------------------
1 | - if result.is_a? Article
2 | = render partial: 'mobile/searches/article', locals: {article: result}
3 | - if result.is_a? Blog::Post
4 | = render partial: 'mobile/searches/blog_post', locals: {blog_post: result}
5 |
--------------------------------------------------------------------------------
/app/views/newsletter_mailer/advertisement.html.haml:
--------------------------------------------------------------------------------
1 | = link_to @href do
2 | = image_tag @image_src, alt: 'Advertisement', size: '160x600'
3 |
4 |
--------------------------------------------------------------------------------
/app/views/newsletter_mailer/article.html.haml:
--------------------------------------------------------------------------------
1 | %h1
2 | %a{href: site_post_url(@article, subdomain: 'www')}= @article.title
3 |
4 | %p.byline
5 | %span.author By #{@article.authors.map(&:name).join(', ')}
6 | %span.sep= "|"
7 | %span.date= @article.published_at.strftime("%B %e, %Y")
8 |
9 | - if @article.image
10 | %img{src: 'https:' + @article.image.original.url(:rectangle_314x), width: 314, height: 194, alt: "Chronicle Image", style: 'display:block;'}
11 |
12 | %p= @article.teaser
13 |
14 | %p
15 | %a{href: site_post_url(@article, subdomain: 'www')}
16 | Visit #{ENV['DOMAIN']} for the full article.
17 |
--------------------------------------------------------------------------------
/app/views/newsletter_mailer/featured.html.haml:
--------------------------------------------------------------------------------
1 | %a{target: "_blank", href: site_post_url(@article, subdomain: 'www')}
2 | - if @article.image
3 | %img.columnImage{src: 'https:' + @article.image.original.url(:rectangle_314x), alt: "Chronicle Photo"}
4 | %h3{style: 'padding-top:10px;'}
5 | %a{target: "_blank", href: site_post_url(@article, subdomain: 'www')}= @article.title
6 | %p= @article.teaser
7 |
--------------------------------------------------------------------------------
/app/views/newsletter_mailer/header_image.html.haml:
--------------------------------------------------------------------------------
1 | =link_to image_tag(@image_path, alt: @alt, id: 'headerImage', style: 'max-width:600px;'), site_root_url(subdomain: 'www')
--------------------------------------------------------------------------------
/app/views/partials/_blog_image.html.slim:
--------------------------------------------------------------------------------
1 | - if blog_post.series
2 | = cropped_image_tag blog_post.series.image, :banner_606x, class: 'main-image'
3 | - elsif blog_post.image
4 | = render 'partials/main_image', image: blog_post.image
5 |
--------------------------------------------------------------------------------
/app/views/partials/_failwhale.html.haml:
--------------------------------------------------------------------------------
1 | %pre
2 | =preserve do
3 | :escaped
4 | H R O A
5 | C N F I
6 | '. L
7 | .-""-._ \ \.--|
8 | / "-..__) .-'
9 | | _ /
10 | \'-.__, .__.,'
11 | `'----'._\--'
12 | VVVVVVVVVVVVVVVVVVVVV
13 |
--------------------------------------------------------------------------------
/app/views/partials/_favicon.html.slim:
--------------------------------------------------------------------------------
1 | = favicon_link_tag 'logo/16x16.ico'
2 | = favicon_link_tag 'logo/57x57.png', rel: 'apple-touch-icon', type: 'image/png', sizes: '57x57'
3 | = favicon_link_tag 'logo/72x72.png', rel: 'apple-touch-icon', type: 'image/png', sizes: '72x72'
4 | = favicon_link_tag 'logo/114x114.png', rel: 'apple-touch-icon', type: 'image/png', sizes: '114x114'
5 | = favicon_link_tag 'logo/144x144.png', rel: 'apple-touch-icon', type: 'image/png', sizes: '144x144'
6 |
--------------------------------------------------------------------------------
/app/views/partials/_jumbotron_default.html.slim:
--------------------------------------------------------------------------------
1 | figure
2 | - if image_size
3 | = cropped_image_tag image, image_size, class: 'jumbotron jumbotron-default'
4 | - else
5 | = cropped_image_tag image, :rectangle_606x, class: 'jumbotron jumbotron-default'
6 | figcaption
7 | - unless image.photographer.nil?
8 | .photo-credit= photo_credit(image, link: true)
9 | - unless image.caption.blank?
10 | .photo-caption= image.caption
11 |
--------------------------------------------------------------------------------
/app/views/partials/_main_image.html.slim:
--------------------------------------------------------------------------------
1 | = cropped_image_tag image, :rectangle_606x, class: 'main-image'
2 | .clearfix
3 | .photo-credit
4 | span= photo_credit(image, link: true)
5 | - if not image.caption.blank?
6 | p.photo-caption= image.caption
7 |
--------------------------------------------------------------------------------
/app/views/partials/_main_video.html.slim:
--------------------------------------------------------------------------------
1 | iframe[width="768" height="577" src="//www.youtube.com/embed/#{@article.embed_code}?rel=0" frameborder="0" allowfullscreen=true]
2 |
--------------------------------------------------------------------------------
/app/views/robots/admin.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /
3 |
--------------------------------------------------------------------------------
/app/views/robots/api.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/views/robots/api.txt
--------------------------------------------------------------------------------
/app/views/robots/mobile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/views/robots/mobile.txt
--------------------------------------------------------------------------------
/app/views/robots/rss.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/app/views/robots/rss.txt
--------------------------------------------------------------------------------
/app/views/site/articles/_subtitle.html.slim:
--------------------------------------------------------------------------------
1 | - notime ||= true
2 |
3 | .byline
4 | span.author= byline(article)
5 | span.date= display_date(article, nil, notime: notime)
6 |
--------------------------------------------------------------------------------
/app/views/site/blog_posts/_tags.html.slim:
--------------------------------------------------------------------------------
1 | - if blog_post.tags.present?
2 | .tags-row
3 | ul.tags
4 | - blog_post.tags.each do |tag|
5 | li= link_to tag, site_blog_tagged_path(tag: tag.name)
6 |
--------------------------------------------------------------------------------
/app/views/site/blog_posts/index.html.slim:
--------------------------------------------------------------------------------
1 | - provide(:title) { @blog.name }
2 |
3 | = render 'site/blog_posts/index'
4 |
--------------------------------------------------------------------------------
/app/views/site/blog_posts/tags.html.slim:
--------------------------------------------------------------------------------
1 | - provide :title, "#{@blog.name}: #{params[:tag]}"
2 |
3 | = render 'site/blog_posts/index'
4 |
--------------------------------------------------------------------------------
/app/views/site/blogs/index.html.slim:
--------------------------------------------------------------------------------
1 | - provide(:title) { "Blogs" }
2 |
3 | .page-main-wrap
4 | .row.page-container
5 | .page-front
6 | .columns.page-content-column.small-12
7 | h1 Chronicle Blogs
8 |
9 | ul.small-block-grid-1.medium-block-grid-4[data-equalizer=""]
10 | - Blog.all.each_with_index do |blog, i|
11 | li
12 | = render 'site/partials/blog_info', blog: blog, show_label: false
13 |
--------------------------------------------------------------------------------
/app/views/site/containers/_article_row.html.slim:
--------------------------------------------------------------------------------
1 | .article-row
2 | .row
3 | .small-12.columns
4 | h2= title
5 | .row
6 | ul.small-block-grid-1(class="medium-block-grid-3")
7 | - articles.each do |article|
8 | li
9 | .row
10 | a(href=site_post_path(article))
11 | .columns.small-12
12 | - if article.image
13 | = cropped_image_tag article.image, :rectangle_183x, width: "100%"
14 | .columns.small-12
15 | = article.title
16 |
--------------------------------------------------------------------------------
/app/views/site/containers/_featured_bracket.html.slim:
--------------------------------------------------------------------------------
1 | .featured-bracket
2 | - if bracket_info['headshot']
3 | = cropped_image_tag Image.find(bracket_info['headshot']), :square_80x, class: 'headshot'
4 | h3.name= link_to bracket_info['bracket'].user.name, [:site, tournament, bracket_info['bracket']]
5 | p.title= bracket_info['position']
6 | p
7 | strong Champion:
8 | = bracket_info['champion'].try(:school)
9 | p
10 | strong Rank:
11 | = bracket_info['bracket'].rank
12 | p
13 | strong Score:
14 | = bracket_info['bracket'].score
15 |
--------------------------------------------------------------------------------
/app/views/site/containers/_poll.html.slim:
--------------------------------------------------------------------------------
1 | - if poll
2 | section.row
3 | header.columns.small-12.chev-container
4 | .chev-header-rt-arrow
5 | h2 Poll
6 | .columns.small-12.column-collapse
7 | .poll-container.poll-sidebar
8 | .poll(data-poll-id=poll.id)
9 |
--------------------------------------------------------------------------------
/app/views/site/containers/_sports_standings.html.slim:
--------------------------------------------------------------------------------
1 | .standings
2 | .content-container
3 | - ESPN.new.standings(url).to_a.reverse.each do |league, standings|
4 | .league
5 | h3= league
6 | table
7 | tr
8 | th Team
9 | th Conference
10 | th Overall
11 | - standings.each do |team, conf, overall|
12 | tr
13 | td= team
14 | td= conf
15 | td= overall
16 |
--------------------------------------------------------------------------------
/app/views/site/containers/article_list/_featured.html.slim:
--------------------------------------------------------------------------------
1 | h3.title= article.title
2 | - if first
3 | p.teaser= article.teaser
4 |
--------------------------------------------------------------------------------
/app/views/site/containers/article_list/_numbered.html.slim:
--------------------------------------------------------------------------------
1 | .article-list
2 | h2.vertical-label= title
3 | .rounded
4 | .content-container
5 | ol
6 | - articles.each do |article|
7 | a.list-story.hover.highlight-right[href=site_post_path(article)]
8 | li
9 | h3.title= article.title
10 |
--------------------------------------------------------------------------------
/app/views/site/containers/article_list/_social_image.html.slim:
--------------------------------------------------------------------------------
1 | .article-list-social.columns.small-4
2 | - if article.image
3 | = cropped_image_tag article.image, :square_200x
4 | - elsif article.authors.first.columnist? and not article.authors.first.headshot.nil?
5 | = cropped_image_tag article.authors.first.headshot, :square_200x
6 | - else
7 | = render 'site/partials/image_placeholder', width: 200, height: 200
8 | header.columns.small-8
9 | h1= article.title
10 | p.header-byline
11 | span.author By #{byline(article, link: false)}
12 | span.date
13 | = " on "
14 | = display_date(article)
15 |
--------------------------------------------------------------------------------
/app/views/site/containers/article_list/_teaser.html.slim:
--------------------------------------------------------------------------------
1 | .columns.small-12
2 | h3.title= article.title
3 | p.subtitle
4 | span.date= article.published_at.strftime("%B %e, %Y")
5 | p.teaser= article.teaser
6 |
--------------------------------------------------------------------------------
/app/views/site/containers/block/_article_square.html.slim:
--------------------------------------------------------------------------------
1 | a[href=site_post_path(article)]
2 | .row
3 | .column.small-4
4 | = cropped_image_tag article.image, :square_150x
5 | .column.small-8
6 | h3= article.title
7 | p= article.teaser
8 |
--------------------------------------------------------------------------------
/app/views/site/pages/article_grid.html.slim:
--------------------------------------------------------------------------------
1 | .page-main-wrap
2 | .row.page-container
3 | .page-front
4 | .columns.page-content-column.small-12
5 | section.row
6 | .columns.small-12
7 | h2.section-title= @title
8 | = render 'site/partials/article_grid', articles: @model.articles
9 |
--------------------------------------------------------------------------------
/app/views/site/pages/single_block.html.haml:
--------------------------------------------------------------------------------
1 | .page-main-wrap
2 | .row.page-container
3 | .page-front
4 | .section-column-container.page-content-column.columns.small-12
5 | .article-container
6 | .article-body!= @model.contents
7 |
--------------------------------------------------------------------------------
/app/views/site/partials/_admin_notification.html.slim:
--------------------------------------------------------------------------------
1 | - if current_user.try(:admin?)
2 | .admin-notification.showing
3 | .admin-notification-header
4 | | Admin Notification
5 | .toggle-link
6 | | [ Hide ]
7 | .admin-notification-body
8 | h1 This is a sample view!
9 | h2 Your article has not been published yet.
10 |
--------------------------------------------------------------------------------
/app/views/site/partials/_advertisement.html.slim:
--------------------------------------------------------------------------------
1 | - suffix ||= nil
2 | section.row.advertisement
3 | .advertisement-container
4 | div{class=zone}= advertisement(zone, suffix)
5 |
--------------------------------------------------------------------------------
/app/views/site/partials/_article_grid.html.slim:
--------------------------------------------------------------------------------
1 | .article-grid
2 | ul.small-block-grid-1.medium-block-grid-2
3 | - articles.each do |article|
4 | li= render 'site/containers/block/article_square', article: article
5 |
--------------------------------------------------------------------------------
/app/views/site/partials/_blog_info.html.slim:
--------------------------------------------------------------------------------
1 | - unless defined? show_label then show_label = true end
2 |
3 | .blog-info.title-small
4 | .blog-description(data-equalizer-watch="")
5 | a.banner(href=site_blog_posts_path(blog))
6 | = blog_logo_tag blog, class: 'blog-logo', width: '100%'
7 | p.description= blog.description
8 | h2 Recent Posts
9 | ul.article-list
10 | - recent_blog_posts(blog).each do |blog_post|
11 | li
12 | a.list-story.hover(href=site_blog_post_path(blog, blog_post))
13 | h3.title= blog_post.title
14 |
--------------------------------------------------------------------------------
/app/views/site/partials/_facebook_recommended.html.slim:
--------------------------------------------------------------------------------
1 | section.row
2 | header.columns.small-12.chev-container
3 | .chev-header-rt-arrow
4 | h2 Facebook Recommended
5 | .columns.small-12.column-collapse
6 | .fb-recommendations[data= {width: 399, height: 300, header: "true", font: "lucida grande", 'border-color' => 'white'}]
7 |
--------------------------------------------------------------------------------
/app/views/site/partials/_flash.html.slim:
--------------------------------------------------------------------------------
1 | - flash.each do |key, value|
2 | div(class=key)= value
3 |
--------------------------------------------------------------------------------
/app/views/site/partials/_image_placeholder.html.slim:
--------------------------------------------------------------------------------
1 | = image_tag('logo/144x144.png', class: 'placeholder-image')
2 |
--------------------------------------------------------------------------------
/app/views/site/partials/_multimedia_row.html.slim:
--------------------------------------------------------------------------------
1 | .multimedia-row
2 | h3.section-title= title
3 | ul.small-block-grid-1[class="medium-block-grid-#{multimedia.length}"]
4 | - multimedia.each do |m|
5 | li== m
6 |
--------------------------------------------------------------------------------
/app/views/site/partials/_openx.html.slim:
--------------------------------------------------------------------------------
1 | script[type="text/javascript" src="//ox-d.oncampusweb.com/w/1.0/jstag"]
2 | javascript:
3 | var OX_#{ad_group_id} = OX();
4 | OX_#{ad_group_id}.addPage("536870985");
5 | OX_#{ad_group_id}.fetchAds();
6 |
--------------------------------------------------------------------------------
/app/views/site/partials/_top_headline.html.slim:
--------------------------------------------------------------------------------
1 | .top-headline
2 | a(href=site_article_path(headline['article']))
3 | h3
4 | = headline['article'].title
5 | - if headline['breaking']
6 | span.breaking-label Breaking
7 | = render 'site/articles/subtitle', article: headline['article']
8 | p.teaser= headline['article'].teaser
9 |
--------------------------------------------------------------------------------
/app/views/site/partials/_top_headline_page.html.slim:
--------------------------------------------------------------------------------
1 | .top-headline
2 | a href=page.path
3 | h3= page.title
4 | p.teaser= page.description
5 |
--------------------------------------------------------------------------------
/app/views/site/partials/_tournament_teaser.html.slim:
--------------------------------------------------------------------------------
1 | .top-headline
2 | a href=link
3 | h3 See The Chronicle's 2015 NCAA Tournament Bracket Challenge Leaderboard
4 | p.teaser The overall winner will be awarded two free Duke Men's Basketball tickets
5 |
--------------------------------------------------------------------------------
/app/views/site/partials/_towerview_gallery_side.html.slim:
--------------------------------------------------------------------------------
1 | header.columns.small-12
2 | h2 Editor's Note
3 | .columns.small-12= render 'site/containers/article_list', articles: [note], style: "social_image", notime: false
4 | header.columns.small-12
5 | h2 Isssu
6 | .columns.small-12.grid-center
7 | .inner-grid-center== @model.issuu
8 |
--------------------------------------------------------------------------------
/app/views/site/partials/_twitter_timeline.html.slim:
--------------------------------------------------------------------------------
1 | .rounded
2 | a.twitter-timeline[data-widget-id=widget_id]
3 |
--------------------------------------------------------------------------------
/app/views/site/partials/_widget_sidebar.html.slim:
--------------------------------------------------------------------------------
1 | - nav_links ||= nil
2 | aside.page-widget-sidebar.row
3 | = render 'site/partials/widgets/subtaxonomies', nav_links: nav_links
4 |
--------------------------------------------------------------------------------
/app/views/site/partials/open_graph/_facebook_app.html.slim:
--------------------------------------------------------------------------------
1 | meta(property="fb:app_id" content=ENV['FACEBOOK_APP_ID'])
2 |
--------------------------------------------------------------------------------
/app/views/site/partials/open_graph/_staff.html.slim:
--------------------------------------------------------------------------------
1 | meta(property="og:type" content="profile")
2 | meta(property="og:url" content=site_staff_url(staff, subdomain: 'www'))
3 | - if staff.headshot
4 | meta(property="og:image" content="http:#{staff.headshot.original.url(:rectangle_636x)}")
5 | meta(property="og:title" content=staff.name)
6 | - if staff.tagline
7 | meta(property="og:description" content=staff.tagline)
8 |
--------------------------------------------------------------------------------
/app/views/site/partials/twitter_cards/_post.html.slim:
--------------------------------------------------------------------------------
1 | - unless post.teaser.blank?
2 | meta(name='twitter:card' content=:summary)
3 | meta(name='twitter:site:id' content=ENV['TWITTER_ID'])
4 | meta(name='twitter:title' content=post.title)
5 | meta(name='twitter:url' content=permanent_post_url(post))
6 | meta(name='twitter:description' content=post.teaser)
7 | - if post.authors.first.twitter.present?
8 | meta(name='twitter:creator' content="@#{post.authors.first.twitter}")
9 | - if post.image
10 | meta(name='twitter:image' content="http:#{post.image.original.url(:square_200x)}")
11 |
12 |
--------------------------------------------------------------------------------
/app/views/site/partials/widgets/_subtaxonomies.html.slim:
--------------------------------------------------------------------------------
1 | - nav_links ||= nil
2 |
3 | - if not frontpage?
4 | section.widget.columns.small-12
5 | header
6 | a(href=section_path(@taxonomy.parents.last))
7 | h2= @taxonomy.parents.last.name
8 | - if nav_links
9 | - nav_links.each do |link|
10 | header
11 | a.hover(href=link['href'])
12 | h3= link['name']
13 | - else
14 | - @taxonomy.children.each do |subsection|
15 | header
16 | a(href=section_path(subsection))
17 | h3= subsection.name
18 |
--------------------------------------------------------------------------------
/app/views/site/partials/widgets/_today.html.slim:
--------------------------------------------------------------------------------
1 | section.widget.columns.small-12
2 | header
3 | h2 Today
4 | section.widget.columns.small-12
5 | header
6 | h3 Print Edition
--------------------------------------------------------------------------------
/app/views/site/searches/_article.html.slim:
--------------------------------------------------------------------------------
1 | .columns.small-12
2 | a(href=site_article_path(article))
3 | .content-container
4 | h3= article.matched_title || article.title
5 | = render 'site/articles/subtitle', article: article
6 | p= article.matched_content || article.teaser
7 |
--------------------------------------------------------------------------------
/app/views/site/searches/_blog_post.html.slim:
--------------------------------------------------------------------------------
1 | .columns.small-12
2 | a(href=site_blog_post_path(blog_post.blog, blog_post))
3 | .content-container
4 | h3= blog_post.matched_title || blog_post.title
5 | = render 'site/articles/subtitle', article: blog_post
6 | - if blog_post.matched_content.present?
7 | p= blog_post.matched_content
8 |
--------------------------------------------------------------------------------
/app/views/site/searches/_result.html.slim:
--------------------------------------------------------------------------------
1 | .search-result
2 | - if result.is_a? Article
3 | = render 'site/searches/article', article: result
4 | - if result.is_a? Blog::Post
5 | = render 'site/searches/blog_post', blog_post: result
6 |
--------------------------------------------------------------------------------
/app/views/site/staff/show.html.slim:
--------------------------------------------------------------------------------
1 | - provide :title, @staff.name
2 |
3 | - content_for :administrative_links do
4 | = link_to "Edit staff profile", edit_admin_staff_url(@staff, subdomain: :admin)
5 |
6 | - content_for :open_graph_tags do
7 | = render 'site/partials/open_graph/staff', staff: @staff
8 |
9 | - content_for :title_block do
10 | h1= @staff.name
11 |
12 | = render 'site/containers/staff_profile', staff: @staff, except: nil
13 |
--------------------------------------------------------------------------------
/app/views/site/tournament_brackets/new.html.slim:
--------------------------------------------------------------------------------
1 | - provide :title, "Create an #{@tournament.full_name} Bracket"
2 |
3 | .page-front
4 | .page-content-column.columns.small-12
5 | section.row
6 | .columns.small-12
7 | .bracket-container
8 | p.challenge-text
9 | | Double click on a game box to see a preview of the match up.
10 | = form_for [:site, @tournament, @bracket] do |f|
11 | = f.hidden_field :picks
12 | = f.submit "Done", class: "done button button-flat-action button-large"
13 | #bracket.bracket(data-bracket=tournament_bracket_json(@bracket))
14 |
--------------------------------------------------------------------------------
/app/views/site/tournaments/challenge.html.slim:
--------------------------------------------------------------------------------
1 | - provide :title, "#{@tournament.full_name} Challenge"
2 |
3 | .page-main-wrap
4 | .row.page-container
5 | .page-front
6 | .page-content-column.columns.small-12
7 | section.row
8 | .columns.small-12
9 | .article-body.challenge-text== @tournament.challenge_text
10 |
--------------------------------------------------------------------------------
/app/views/tournament_bracket_mailer/notify_incomplete.text.erb:
--------------------------------------------------------------------------------
1 | Hello <%= @bracket.user.first_name %>,
2 |
3 | I wanted to let you know that your bracket on the Chronicle is not complete. Please finish making your selections before the tournament begins on <%= @start_time.strftime('%A, %B %-d') %> at <%= @start_time.strftime('%l:%M %p %Z') %>.
4 |
5 | To edit your bracket, please sign into the Chronicle and visit <%= site_tournament_tournament_bracket_url(@bracket.tournament, @bracket, subdomain: 'www') %>.
6 |
7 | Thank you for participating and good luck!
8 |
--------------------------------------------------------------------------------
/app/workers/photoshelter_worker.rb:
--------------------------------------------------------------------------------
1 | class PhotoshelterWorker
2 | @queue = :photoshelter
3 | def self.perform
4 | Gallery.scrape
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Chronline::Application
5 |
--------------------------------------------------------------------------------
/config/ad_types.yml:
--------------------------------------------------------------------------------
1 | ---
2 | custom:
3 | width: 240
4 | height: 90
5 | unit: 536871737
6 | custom2:
7 | width: 300
8 | height: 90
9 | unit: 537234517
10 | leaderboard:
11 | width: 728
12 | height: 90
13 | unit: 536871739
14 | towerview_leaderboard:
15 | width: 728
16 | height: 90
17 | unit: 537147352
18 | medium_rectangle:
19 | width: 300
20 | height: 250
21 | unit: 536871740
22 | medium_rectangle_1:
23 | width: 300
24 | height: 250
25 | unit: 536871741
26 | medium_rectangle_2:
27 | width: 300
28 | height: 250
29 | unit: 536871744
30 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | require 'rubygems'
2 |
3 | # Set up gems listed in the Gemfile.
4 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5 |
6 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
7 |
--------------------------------------------------------------------------------
/config/compass.rb:
--------------------------------------------------------------------------------
1 | # Require any additional compass plugins here.
2 | project_type = :rails
3 |
--------------------------------------------------------------------------------
/config/cucumber.yml:
--------------------------------------------------------------------------------
1 | <%
2 | rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3 | rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4 | std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
5 | %>
6 | default: <%= std_opts %> features
7 | wip: --tags @wip:3 --wip features
8 | rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
9 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | development:
2 | adapter: postgresql
3 | database: chronline_development
4 | username: postgres
5 | password: postgres
6 | host: localhost
7 |
8 | test: &test
9 | adapter: postgresql
10 | database: chronline_test
11 | username: postgres
12 | password: postgres
13 | host: localhost
14 |
15 | production:
16 | adapter: postgresql
17 | database: chronline_production
18 | username: postgres
19 | password: postgres
20 | host: localhost
21 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the rails application
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the rails application
5 | Chronline::Application.initialize!
6 |
--------------------------------------------------------------------------------
/config/image_styles.yml:
--------------------------------------------------------------------------------
1 | ---
2 | rectangle:
3 | width: 636
4 | height: 393
5 | sizes:
6 | - 606
7 | - 468
8 | - 378
9 | - 314
10 | - 183
11 | - 152
12 | square:
13 | width: 200
14 | height: 200
15 | sizes:
16 | - 150
17 | - 80
18 | - 70
19 | banner:
20 | width: 636
21 | height: 212
22 | sizes:
23 | - 606
24 | - 300
25 | - 216
26 | vertical:
27 | width: 243
28 | height: 393
29 | sizes:
30 | - 183
31 |
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/config/initializers/recaptcha.rb:
--------------------------------------------------------------------------------
1 | Recaptcha.configure do |config|
2 | config.public_key = ENV['RECAPTCHA_PUBLIC_KEY']
3 | config.private_key = ENV['RECAPTCHA_PRIVATE_KEY']
4 | end
5 |
--------------------------------------------------------------------------------
/config/initializers/redis.rb:
--------------------------------------------------------------------------------
1 | if Rails.env.test?
2 | $redis = MockRedis.new
3 | else
4 | Resque.redis = $redis =
5 | Redis.new(url: ENV['REDIS_URL'], driver: :hiredis)
6 |
7 | # https://devcenter.heroku.com/articles/forked-pg-connections
8 | Resque.before_fork do
9 | defined?(ActiveRecord::Base) and
10 | ActiveRecord::Base.connection.disconnect!
11 | end
12 |
13 | Resque.after_fork do
14 | defined?(ActiveRecord::Base) and
15 | ActiveRecord::Base.establish_connection
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 | # Make sure the secret is at least 30 characters and all random,
6 | # no regular words or you'll be exposed to dictionary attacks.
7 | Chronline::Application.config.secret_token = ENV['SECRET_TOKEN']
8 |
--------------------------------------------------------------------------------
/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | Chronline::Application.config.session_store :redis_store, redis_server: ENV['REDIS_URL'], domain: ENV['DOMAIN'], expire_after: 3.days
2 |
--------------------------------------------------------------------------------
/config/initializers/sitevars.rb:
--------------------------------------------------------------------------------
1 | File.open(Rails.root.join("config", "sitevars.yml")) do |file|
2 | Sitevar.config.sitevars = YAML.load(file)
3 | Sitevar.config.redis = promise { $redis }
4 | end
5 |
--------------------------------------------------------------------------------
/config/initializers/subdomains.rb:
--------------------------------------------------------------------------------
1 | SubdomainFu.configure do |config|
2 | config.tld_size = ENV['DOMAIN'].count('.')
3 | config.preferred_mirror = 'www'
4 | end
5 |
--------------------------------------------------------------------------------
/config/initializers/taxonomy.rb:
--------------------------------------------------------------------------------
1 | Taxonomy.set_taxonomy_tree(
2 | :sections,
3 | YAML.load_file(Rails.root.join('config', 'taxonomy.yml'))
4 | )
5 | Taxonomy.set_taxonomy_tree(
6 | :blogs,
7 | YAML.load_file(Rails.root.join('config', 'blogs.yml'))
8 | )
9 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # Disable root element in JSON by default.
12 | ActiveSupport.on_load(:active_record) do
13 | self.include_root_in_json = false
14 | end
15 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Sample localization file for English. Add more files in this directory for other locales.
2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3 |
4 | en:
5 | hello: "Hello world"
6 |
--------------------------------------------------------------------------------
/config/sitevars.yml:
--------------------------------------------------------------------------------
1 | ---
2 | issuu:
3 | label: Issuu Embed
4 | type: text
5 | mailchimp_ad_href:
6 | label: Newsletter Advertisement Link
7 | mailchimp_ad_image:
8 | label: Newsletter Advertisement Image
9 |
--------------------------------------------------------------------------------
/config/sunspot.yml:
--------------------------------------------------------------------------------
1 | production:
2 | solr:
3 | hostname: <%= ENV['SOLR_HOSTNAME'] %>
4 | path: <%= ENV['SOLR_PATH'] %>
5 | port: <%= ENV['SOLR_PORT'] %>
6 | log_level: WARNING
7 |
8 | development:
9 | solr:
10 | hostname: localhost
11 | port: 8982
12 | log_level: INFO
13 | solr_home: solr
14 |
15 | test:
16 | solr:
17 | hostname: localhost
18 | port: 8982
19 | log_level: WARNING
20 | solr_home: solr
21 |
--------------------------------------------------------------------------------
/db/migrate/20121130045750_create_articles.rb:
--------------------------------------------------------------------------------
1 | class CreateArticles < ActiveRecord::Migration
2 | def change
3 | create_table :articles do |t|
4 | t.text :body
5 | t.string :subtitle
6 | t.string :section
7 | t.string :teaser
8 | t.string :title
9 |
10 | t.timestamps
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20121213062723_add_slug_to_article.rb:
--------------------------------------------------------------------------------
1 | class AddSlugToArticle < ActiveRecord::Migration
2 | def change
3 | add_column :articles, :slug, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20121213064314_create_friendly_id_slugs.rb:
--------------------------------------------------------------------------------
1 | class CreateFriendlyIdSlugs < ActiveRecord::Migration
2 |
3 | def self.up
4 | create_table :friendly_id_slugs do |t|
5 | t.string :slug, :null => false
6 | t.integer :sluggable_id, :null => false
7 | t.string :sluggable_type, :limit => 40
8 | t.datetime :created_at
9 | end
10 | add_index :friendly_id_slugs, :sluggable_id
11 | add_index :friendly_id_slugs, [:slug, :sluggable_type], :unique => true
12 | add_index :friendly_id_slugs, :sluggable_type
13 | end
14 |
15 | def self.down
16 | drop_table :friendly_id_slugs
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/db/migrate/20121213231611_create_staff.rb:
--------------------------------------------------------------------------------
1 | class CreateStaff < ActiveRecord::Migration
2 | def change
3 | create_table :staff do |t|
4 | t.string :affiliation
5 | t.text :biography
6 | t.boolean :columnist
7 | t.string :name
8 | t.string :tagline
9 | t.string :twitter
10 | t.string :type
11 |
12 | t.timestamps
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20121214033721_create_articles_authors.rb:
--------------------------------------------------------------------------------
1 | class CreateArticlesAuthors < ActiveRecord::Migration
2 | def change
3 | create_table :articles_authors do |t|
4 | t.integer :article_id
5 | t.integer :author_id
6 | end
7 |
8 | add_index :articles_authors, :article_id
9 | add_index :articles_authors, :author_id
10 | add_index :articles_authors, [:article_id, :author_id], unique: true
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/db/migrate/20121217035913_create_images.rb:
--------------------------------------------------------------------------------
1 | class CreateImages < ActiveRecord::Migration
2 | def change
3 | create_table :images do |t|
4 | t.string :caption
5 | t.string :location
6 | t.attachment :original
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20121220181602_add_photographer_to_images.rb:
--------------------------------------------------------------------------------
1 | class AddPhotographerToImages < ActiveRecord::Migration
2 | def change
3 | add_column :images, :photographer_id, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20121221045137_add_image_to_articles.rb:
--------------------------------------------------------------------------------
1 | class AddImageToArticles < ActiveRecord::Migration
2 | def change
3 | add_column :articles, :image_id, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20121223185853_add_slug_to_staff.rb:
--------------------------------------------------------------------------------
1 | class AddSlugToStaff < ActiveRecord::Migration
2 | def change
3 | add_column :staff, :slug, :string
4 | add_index :staff, :slug, unique: true
5 | add_index :staff, :name, unique: true
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20130105174545_create_pages.rb:
--------------------------------------------------------------------------------
1 | class CreatePages < ActiveRecord::Migration
2 | def change
3 | create_table :pages do |t|
4 | t.text :layout_data
5 | t.string :layout_template
6 | t.string :path
7 | t.string :title
8 |
9 | t.timestamps
10 | end
11 | add_index :pages, :path, unique: true
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20130119220641_add_previous_id_to_articles.rb:
--------------------------------------------------------------------------------
1 | class AddPreviousIdToArticles < ActiveRecord::Migration
2 | def change
3 | add_column :articles, :previous_id, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130122042716_add_date_to_image.rb:
--------------------------------------------------------------------------------
1 | class AddDateToImage < ActiveRecord::Migration
2 | def change
3 | add_column :images, :date, :date
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130124023838_staff_remove_type.rb:
--------------------------------------------------------------------------------
1 | class StaffRemoveType < ActiveRecord::Migration
2 | def change
3 | remove_column :staff, :type
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130124031515_articles_staff_table.rb:
--------------------------------------------------------------------------------
1 | class ArticlesStaffTable < ActiveRecord::Migration
2 | def change
3 | rename_column :articles_authors, :author_id, :staff_id
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130124050200_indexes.rb:
--------------------------------------------------------------------------------
1 | class Indexes < ActiveRecord::Migration
2 | def change
3 | add_index :articles, [:section, :created_at]
4 | add_index :articles, :slug, unique: true
5 |
6 | add_index :images, :date
7 | add_index :images, :photographer_id
8 |
9 | add_index :staff, :columnist
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20130124081052_increase_caption_size.rb:
--------------------------------------------------------------------------------
1 | class IncreaseCaptionSize < ActiveRecord::Migration
2 | def change
3 | change_column :images, :caption, :string, limit: 500
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130128001111_add_headshot_to_staff.rb:
--------------------------------------------------------------------------------
1 | class AddHeadshotToStaff < ActiveRecord::Migration
2 | def change
3 | add_column :staff, :headshot_id, :integer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130202211724_add_credit_to_images.rb:
--------------------------------------------------------------------------------
1 | class AddCreditToImages < ActiveRecord::Migration
2 | def change
3 | add_column :images, :credit, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130204222244_add_attribution_to_images.rb:
--------------------------------------------------------------------------------
1 | class AddAttributionToImages < ActiveRecord::Migration
2 | def change
3 | add_column :images, :attribution, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130206032936_enhance_pages.rb:
--------------------------------------------------------------------------------
1 | class EnhancePages < ActiveRecord::Migration
2 | def change
3 | add_column :pages, :description, :string
4 | add_column :pages, :image_id, :integer
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20130223193409_create_blog_posts.rb:
--------------------------------------------------------------------------------
1 | class CreateBlogPosts < ActiveRecord::Migration
2 | def change
3 | create_table :blog_posts do |t|
4 | t.text :body
5 | t.string :blog
6 | t.string :title
7 | t.string :slug
8 | t.integer :image_id
9 | t.integer :author_id
10 |
11 | t.timestamps
12 | end
13 |
14 | add_index :blog_posts, :slug, unique: true
15 | add_index :blog_posts, [:blog, :created_at], unique: true
16 | add_index :blog_posts, :author_id
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/db/migrate/20130409050936_add_published_at_to_article.rb:
--------------------------------------------------------------------------------
1 | class AddPublishedAtToArticle < ActiveRecord::Migration
2 | def change
3 | add_column :articles, :published_at, :datetime
4 | add_index :articles, [:section, :published_at]
5 | remove_index :articles, [:section, :created_at]
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20130419063641_add_published_at_to_blog_posts.rb:
--------------------------------------------------------------------------------
1 | class AddPublishedAtToBlogPosts < ActiveRecord::Migration
2 | def change
3 | add_column :blog_posts, :published_at, :datetime
4 | add_index :blog_posts, [:blog, :published_at]
5 | remove_index :blog_posts, [:blog, :created_at]
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20130708010122_add_previous_url_to_blog_post.rb:
--------------------------------------------------------------------------------
1 | class AddPreviousUrlToBlogPost < ActiveRecord::Migration
2 | def change
3 | add_column :blog_posts, :previous_url, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20130731022212_add_block_bots_column_to_postable.rb:
--------------------------------------------------------------------------------
1 | class AddBlockBotsColumnToPostable < ActiveRecord::Migration
2 | def change
3 | add_column :articles, :block_bots, :boolean, default: false
4 | add_column :blog_posts, :block_bots, :boolean, default: false
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20130821030518_merge_blog_post_and_article_tables.rb:
--------------------------------------------------------------------------------
1 | class MergeBlogPostAndArticleTables < ActiveRecord::Migration
2 | def change
3 | drop_table :blog_posts
4 | add_column :articles, :type, :string
5 | rename_table :articles_authors, :posts_authors
6 | rename_column :posts_authors, :article_id, :post_id
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20130907041203_add_embed_code_to_article.rb:
--------------------------------------------------------------------------------
1 | class AddEmbedCodeToArticle < ActiveRecord::Migration
2 | def change
3 | add_column :articles, :embed_code, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20131124051154_create_topics.rb:
--------------------------------------------------------------------------------
1 | class CreateTopics < ActiveRecord::Migration
2 | def change
3 | create_table :topics do |t|
4 | t.string :title
5 | t.text :description
6 | t.boolean :archived, default: false
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20131124051931_create_topic_responses.rb:
--------------------------------------------------------------------------------
1 | class CreateTopicResponses < ActiveRecord::Migration
2 | def change
3 | create_table :topic_responses do |t|
4 | t.integer :topic_id
5 | t.boolean :approved, default: false
6 | t.boolean :reported, default: false
7 | t.integer :upvotes, default: 0
8 | t.integer :downvotes, default: 0
9 | t.string :content
10 | t.float :score
11 |
12 | t.timestamps
13 | end
14 |
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/db/migrate/20131231195346_create_blog_series.rb:
--------------------------------------------------------------------------------
1 | class CreateBlogSeries < ActiveRecord::Migration
2 | def change
3 | create_table :blog_series do |t|
4 | t.integer :tag_id
5 | t.integer :image_id
6 | t.string :blog_id
7 |
8 | t.timestamps
9 | end
10 |
11 | add_index :blog_series, :tag_id
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20140117200446_create_polls.rb:
--------------------------------------------------------------------------------
1 | class CreatePolls < ActiveRecord::Migration
2 | def change
3 | create_table :polls do |t|
4 | t.string :title
5 | t.string :description
6 | t.string :section
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20140119064432_create_poll_choices.rb:
--------------------------------------------------------------------------------
1 | class CreatePollChoices < ActiveRecord::Migration
2 | def change
3 | create_table :poll_choices do |t|
4 | t.integer :poll_id
5 | t.string :title
6 | t.integer :votes
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20140201003855_add_date_to_galleries.rb:
--------------------------------------------------------------------------------
1 | class AddDateToGalleries < ActiveRecord::Migration
2 | def change
3 | add_column :galleries, :date, :date
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20140205174147_add_admin_to_users.rb:
--------------------------------------------------------------------------------
1 | class AddAdminToUsers < ActiveRecord::Migration
2 | def change
3 | add_column :users, :role, :string
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20140218024954_create_tournaments.rb:
--------------------------------------------------------------------------------
1 | class CreateTournaments < ActiveRecord::Migration
2 | def change
3 | create_table :tournaments do |t|
4 | t.string :name
5 | t.string :event
6 | t.datetime :start_date
7 | t.text :challenge_text
8 | t.string :slug
9 |
10 | t.timestamps
11 | end
12 |
13 | add_index :tournaments, :slug, unique: true
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20140218051415_create_tournament_teams.rb:
--------------------------------------------------------------------------------
1 | class CreateTournamentTeams < ActiveRecord::Migration
2 | def change
3 | create_table :tournament_teams do |t|
4 | t.string :school
5 | t.string :shortname
6 | t.string :mascot
7 | t.integer :seed
8 | t.integer :region_id
9 | t.integer :espn_id
10 | t.integer :tournament_id
11 |
12 | t.timestamps
13 | end
14 |
15 | add_index :tournament_teams, [:tournament_id, :region_id, :seed], unique: true
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/db/migrate/20140218053628_create_tournament_games.rb:
--------------------------------------------------------------------------------
1 | class CreateTournamentGames < ActiveRecord::Migration
2 | def change
3 | create_table :tournament_games do |t|
4 | t.integer :tournament_id
5 | t.integer :team1_id
6 | t.integer :team2_id
7 | t.integer :score1
8 | t.integer :score2
9 | t.integer :position
10 | t.datetime :start_time
11 | t.boolean :final, default: false
12 |
13 | t.timestamps
14 | end
15 |
16 | add_index :tournament_games, [:tournament_id, :position], unique: true
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/db/migrate/20140218061102_create_tournament_brackets.rb:
--------------------------------------------------------------------------------
1 | class CreateTournamentBrackets < ActiveRecord::Migration
2 | def change
3 | create_table :tournament_brackets do |t|
4 | t.integer :tournament_id
5 | t.integer :user_id
6 | t.text :picks
7 |
8 | t.timestamps
9 | end
10 |
11 | add_index :tournament_brackets, [:tournament_id, :user_id], unique: true
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20140226160443_add_preview_and_article_to_team.rb:
--------------------------------------------------------------------------------
1 | class AddPreviewAndArticleToTeam < ActiveRecord::Migration
2 | def change
3 | add_column :tournament_teams, :preview, :text
4 | add_column :tournament_teams, :article_id, :integer
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20140308232907_add_archived_to_polls.rb:
--------------------------------------------------------------------------------
1 | class AddArchivedToPolls < ActiveRecord::Migration
2 | def change
3 | add_column :polls, :archived, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20140316224623_add_index_on_tournament_teams.rb:
--------------------------------------------------------------------------------
1 | class AddIndexOnTournamentTeams < ActiveRecord::Migration
2 | def change
3 | add_index :tournament_teams, :tournament_id
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20140317154029_add_regions_to_tournament.rb:
--------------------------------------------------------------------------------
1 | class AddRegionsToTournament < ActiveRecord::Migration
2 | def change
3 | add_column :tournaments, :region0, :string
4 | add_column :tournaments, :region1, :string
5 | add_column :tournaments, :region2, :string
6 | add_column :tournaments, :region3, :string
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/db/migrate/20140320005922_add_score_to_tournament_brackets.rb:
--------------------------------------------------------------------------------
1 | class AddScoreToTournamentBrackets < ActiveRecord::Migration
2 | def change
3 | add_column :tournament_brackets, :score, :integer, default: 0
4 | add_index :tournament_brackets, :score
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/db/migrate/20140320032226_add_featured_to_tournaments.rb:
--------------------------------------------------------------------------------
1 | class AddFeaturedToTournaments < ActiveRecord::Migration
2 | def change
3 | add_column :tournaments, :featured, :text
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/migrate/20140418022031_add_sponsored_to_articles.rb:
--------------------------------------------------------------------------------
1 | class AddSponsoredToArticles < ActiveRecord::Migration
2 | def change
3 | add_column :articles, :sponsored_post, :boolean, default: false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/doc/README_FOR_APP:
--------------------------------------------------------------------------------
1 | Use this README file to introduce your application and point to useful places in the API for learning more.
2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
3 |
--------------------------------------------------------------------------------
/lib/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/lib/assets/.gitkeep
--------------------------------------------------------------------------------
/lib/chron_slug.rb:
--------------------------------------------------------------------------------
1 | # Inspired by http://snipt.net/jpartogi/slugify-javascript/
2 | module ChronSlug
3 | def normalize_friendly_id(s, max_chars=100)
4 | removelist = %w(a an as at before but by for from is in into like of off on
5 | onto per since than the this that to up via with)
6 | r = /\b(#{removelist.join('|')})\b/i
7 |
8 | s = s.downcase # convert to lowercase
9 | s.gsub!(r, '')
10 | s.strip!
11 | s.gsub!(/[^-\w\s]/, '') # remove unneeded chars
12 | s.gsub!(/[-\s]+/, '-') # convert spaces to hyphens
13 | s[0...max_chars].chomp('-')
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/lib/extensions/oembed.rb:
--------------------------------------------------------------------------------
1 | require 'oembed'
2 | module OEmbed
3 | class Providers
4 | Twitter = OEmbed::Provider.new("https://api.twitter.com/1/statuses/oembed.json")
5 | Twitter << "https://twitter.com/*/status/*"
6 | Twitter << "http://twitter.com/*/status/*"
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/lib/layout_validator.rb:
--------------------------------------------------------------------------------
1 | class LayoutValidator < ActiveModel::Validator
2 |
3 | def validate(record)
4 | record.errors[:layout_data] += record.layout.validate
5 | begin
6 | record.layout.generate_model
7 | rescue
8 | record.errors[:layout_data] << "Something went wrong. Try again."
9 | end
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/lib/photoshelter_api/errors.rb:
--------------------------------------------------------------------------------
1 | class PhotoshelterAPI
2 | module Errors
3 |
4 | class PhotoshelterError < StandardError
5 | attr_reader :error_code
6 |
7 | def initialize(error_code)
8 | super(error_code)
9 | end
10 | end
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/lib/sample-images/pikachu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/lib/sample-images/pikachu.png
--------------------------------------------------------------------------------
/lib/tasks/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/lib/tasks/.gitkeep
--------------------------------------------------------------------------------
/lib/tasks/assets.rake:
--------------------------------------------------------------------------------
1 | Rake::Task['assets:precompile'].enhance ['bower:install', 'bower:resolve']
2 |
--------------------------------------------------------------------------------
/lib/tasks/photoshelter.rake:
--------------------------------------------------------------------------------
1 |
2 | namespace :photoshelter do
3 | desc "Refresh Photoshelter galleries and images"
4 | task :refresh => [:scrape]
5 |
6 | desc "Scrape Photoshelter API"
7 | task :scrape => :environment do
8 | Gallery.scrape
9 | end
10 |
11 | desc "Empty Photoshelter data"
12 | task :empty => :environment do
13 | require 'gallery/image'
14 | Gallery.delete_all
15 | end
16 |
17 |
18 | end
19 |
--------------------------------------------------------------------------------
/lib/tasks/resque.rake:
--------------------------------------------------------------------------------
1 | require 'resque/tasks'
2 |
3 | task "resque:setup" => :environment do
4 | ENV['QUEUE'] ||= '*'
5 | Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
6 | end
7 |
--------------------------------------------------------------------------------
/lib/tasks/tournament.rake:
--------------------------------------------------------------------------------
1 | namespace :tournaments do
2 |
3 | desc "Send an email all users with incomplete brackets"
4 | task notify_incomplete: :environment do
5 | Tournament.where('start_date > ?', DateTime.now).find_each do |tournament|
6 | tournament.brackets.includes(:user).find_each do |bracket|
7 | unless bracket.complete?
8 | TournamentBracketMailer.notify_incomplete(bracket).deliver
9 | end
10 | end
11 | end
12 | end
13 |
14 | end
15 |
--------------------------------------------------------------------------------
/lib/taxonomy/errors.rb:
--------------------------------------------------------------------------------
1 | class Taxonomy
2 | module Errors
3 |
4 | class InvalidTaxonomyError < StandardError
5 | attr_reader :path
6 |
7 | def initialize(taxonomy, path)
8 | super(path)
9 | @taxonomy = taxonomy
10 | @path = path
11 | end
12 | end
13 |
14 | class UnknownTaxonomyError < StandardError
15 | attr_reader :taxonomy
16 |
17 | def initialize(taxonomy)
18 | super(taxonomy)
19 | @taxonomy = taxonomy
20 | end
21 | end
22 |
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/lib/taxonomy/serializer.rb:
--------------------------------------------------------------------------------
1 | class Taxonomy
2 | class Serializer
3 | def initialize(taxonomy)
4 | @taxonomy = taxonomy
5 | end
6 |
7 | def load(path)
8 | Taxonomy.new(@taxonomy, path)
9 | end
10 |
11 | def dump(taxonomy)
12 | taxonomy.to_s
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/lib/taxonomy/validator.rb:
--------------------------------------------------------------------------------
1 | class Taxonomy
2 | class Validator < ActiveModel::Validator
3 | def validate(record)
4 | taxonomy_term = record[options[:attr]]
5 | if not taxonomy_term.is_a?(Taxonomy) or
6 | taxonomy_term.taxonomy != options[:taxonomy]
7 | record.errors[options[:attr]] <<
8 | "must be a valid \"#{options[:taxonomy]}\" taxonomy term"
9 | end
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/log/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/log/.gitkeep
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/public/favicon.ico
--------------------------------------------------------------------------------
/script/cucumber:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
4 | if vendored_cucumber_bin
5 | load File.expand_path(vendored_cucumber_bin)
6 | else
7 | require 'rubygems' unless ENV['NO_RUBYGEMS']
8 | require 'cucumber'
9 | load Cucumber::BINARY
10 | end
11 |
--------------------------------------------------------------------------------
/script/lang.sh:
--------------------------------------------------------------------------------
1 | # Setup Locales
2 | sudo touch /etc/profile.d/lang.shudo touch /etc/profile.d/lang.sh
3 | sudo chmod 777 /etc/profile.d/lang.sh
4 | sudo echo 'export LANGUAGE="en_US.UTF-8"' >> /etc/profile.d/lang.sh
5 | sudo echo 'export LANG="en_US.UTF-8"' >> /etc/profile.d/lang.sh
6 | sudo echo 'export LC_ALL="en_US.UTF-8"' >> /etc/profile.d/lang.sh
7 |
8 | sudo locale-gen en_US.UTF-8
9 | sudo dpkg-reconfigure locales
10 | sudo update-locale LANG=en_US.UTF-8
11 |
12 |
--------------------------------------------------------------------------------
/script/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3 |
4 | APP_PATH = File.expand_path('../../config/application', __FILE__)
5 | require File.expand_path('../../config/boot', __FILE__)
6 | require 'rails/commands'
7 |
--------------------------------------------------------------------------------
/spec/config/blogs.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: Pokedex
3 | id: 1001
4 | description: Gotta catch em all
5 | - name: Kanto News
6 | id: 1002
7 | description: Everything about Kanto
8 |
--------------------------------------------------------------------------------
/spec/config/sitevars.yml:
--------------------------------------------------------------------------------
1 | ---
2 | region:
3 | description: The current region of the Pokemon world.
4 | type: string
5 |
--------------------------------------------------------------------------------
/spec/config/taxonomy.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - id: 1
3 | name: News
4 | children:
5 | - id: 2
6 | name: University
7 | children:
8 | - id: 3
9 | name: Academics
10 | - id: 4
11 | name: Board of Trustees
12 | - id: 5
13 | new_id: 3
14 | name: Merged
15 | - id: 10
16 | name: Archived
17 | archived: true
18 | - id: 6
19 | name: Sports
20 | - id: 7
21 | name: Opinion
22 | - id: 8
23 | name: Recess
24 | - id: 9
25 | name: Towerview
26 |
--------------------------------------------------------------------------------
/spec/controllers/admin/main_controller_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe Admin::MainController do
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/spec/fixtures/dish_cassettes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/spec/fixtures/dish_cassettes/.gitkeep
--------------------------------------------------------------------------------
/spec/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 |
4 | describe ApplicationHelper do
5 |
6 | describe "#datetime_tag" do
7 | let(:date) { DateTime.new(1999, 10, 1) }
8 | subject { helper.datetime_tag(date, "pewter", class: "vermillion") }
9 |
10 | it "should create a time HTML tag" do
11 | should == ''
12 | end
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/spec/matchers.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 |
4 | describe "custom matchers" do
5 |
6 | describe "include_in_order" do
7 | subject { [1, 2, 3, 4] }
8 |
9 | it { should include_in_order(1) }
10 | it { should include_in_order(1, 2) }
11 | it { should include_in_order(1, 2, 4) }
12 |
13 | it { should_not include_in_order(5) }
14 | it { should_not include_in_order(1, 5) }
15 | it { should_not include_in_order(4, 2) }
16 | end
17 |
18 | end
19 |
--------------------------------------------------------------------------------
/spec/models/blog_series_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 |
4 | describe Blog::Series do
5 | let(:blog_series) { FactoryGirl.build(:blog_series) }
6 | let(:blog_post) { FactoryGirl.build(:blog_post) }
7 | subject { blog_series }
8 |
9 | it { should validate_presence_of(:tag) }
10 | it { should validate_presence_of(:image) }
11 | it { should validate_presence_of(:blog) }
12 |
13 | its(:name) { should == "Route 14" }
14 | its(:blog) { should == Blog.find('pokedex') }
15 |
16 | describe "#blog=" do
17 | before { blog_series.blog = Blog.find('kantonews') }
18 | its(:blog_id) { should == 'kantonews' }
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/spec/models/gallery_image_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe Gallery::Image do
4 | pending "add some examples to (or delete) #{__FILE__}"
5 | end
6 |
--------------------------------------------------------------------------------
/spec/models/gallery_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe Gallery do
4 | pending "add some examples to (or delete) #{__FILE__}"
5 | end
6 |
--------------------------------------------------------------------------------
/spec/models/page_spec.rb:
--------------------------------------------------------------------------------
1 | # == Schema Information
2 | #
3 | # Table name: pages
4 | #
5 | # id :integer not null, primary key
6 | # layout_data :text
7 | # layout_template :string(255)
8 | # path :string(255)
9 | # title :string(255)
10 | # created_at :datetime not null
11 | # updated_at :datetime not null
12 | #
13 |
14 | require 'spec_helper'
15 |
16 | describe Page do
17 | pending "add some examples to (or delete) #{__FILE__}"
18 | end
19 |
--------------------------------------------------------------------------------
/spec/support/auth_helper.rb:
--------------------------------------------------------------------------------
1 | module AuthHelper
2 | def http_auth(user)
3 | ActionController::HttpAuthentication::Basic.encode_credentials(
4 | user.email, user.password)
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/spec/support/helpers.rb:
--------------------------------------------------------------------------------
1 | module Helpers
2 | def json_attributes(obj, options = {})
3 | ActiveSupport::JSON.decode(obj.to_json(options))
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/spec/support/matchers.rb:
--------------------------------------------------------------------------------
1 | RSpec::Matchers.define :include_in_order do |*expected|
2 | match do |actual|
3 | (actual & expected) == expected
4 | end
5 | end
6 |
7 | RSpec::Matchers.define :require_authorization do |expected|
8 | match do |proc|
9 | proc.call
10 | response.should have_status_code(:unauthorized)
11 | end
12 |
13 | failure_message_for_should do |proc|
14 | "expected #{proc.source_location.join(':')} to require authentication"
15 | end
16 | end
17 |
18 | RSpec::Matchers.define :have_status_code do |expected|
19 | match do |response|
20 | response.status == Rack::Utils.status_code(expected)
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/spec/support/sunspot.rb:
--------------------------------------------------------------------------------
1 | Sunspot.session = Sunspot::Rails::StubSessionProxy.new(Sunspot.session)
2 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/vendor/assets/javascripts/.gitkeep
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dukechronicle/chronline/01635e95af0fe4928c02c483dd3df916bafe320b/vendor/assets/stylesheets/.gitkeep
--------------------------------------------------------------------------------