virgo 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +37 -0
- data/app/assets/javascripts/tinymce/manifest.coffee +1 -0
- data/app/assets/javascripts/tinymce/plugins/image_manager/plugin.coffee +234 -0
- data/app/assets/javascripts/virgo/admin/page_modules/edit_form.coffee +4 -0
- data/app/assets/javascripts/virgo/admin/page_modules/edit_subject_form.coffee +29 -0
- data/app/assets/javascripts/virgo/admin/posts/edit_locking.coffee +35 -0
- data/app/assets/javascripts/virgo/admin/posts/form.coffee +183 -0
- data/app/assets/javascripts/virgo/admin/slides/form.coffee +27 -0
- data/app/assets/javascripts/virgo/admin/slideshows/form.coffee +26 -0
- data/app/assets/javascripts/virgo/admin_only.coffee +1 -0
- data/app/assets/javascripts/virgo/application.coffee +51 -0
- data/app/assets/javascripts/virgo/common.coffee +83 -0
- data/app/assets/javascripts/virgo/common/character_counter.coffee +27 -0
- data/app/assets/javascripts/virgo/components/header.coffee +47 -0
- data/app/assets/javascripts/virgo/components/media_modal.coffee +151 -0
- data/app/assets/javascripts/virgo/components/share_bar.coffee +53 -0
- data/app/assets/javascripts/virgo/components/slideshow.coffee +35 -0
- data/app/assets/javascripts/virgo/lib/jquery-ui-multiselect.js +342 -0
- data/app/assets/javascripts/virgo/lib/jquery.browser.js +184 -0
- data/app/assets/javascripts/virgo/lib/jquery.cookie.js +114 -0
- data/app/assets/javascripts/virgo/lib/jquery.pjax.js +932 -0
- data/app/assets/javascripts/virgo/lib/jquery_ext.coffee +0 -0
- data/app/assets/javascripts/virgo/lib/manifest.coffee +5 -0
- data/app/assets/javascripts/virgo/lib/ouibounce.js +194 -0
- data/app/assets/javascripts/virgo/page_modules.coffee +175 -0
- data/app/assets/javascripts/virgo/posts/show.coffee +32 -0
- data/app/assets/stylesheets/tinymce/skin.sass +2 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/content.min.sass +82 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.svg +62 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce-small.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.eot +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.svg +63 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.ttf +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/fonts/tinymce.woff +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/anchor.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/loader.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/object.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/img/trans.gif +0 -0
- data/app/assets/stylesheets/tinymce/skins/railspress/skin.min.sass +1703 -0
- data/app/assets/stylesheets/virgo/_common.sass +65 -0
- data/app/assets/stylesheets/virgo/admin.sass +301 -0
- data/app/assets/stylesheets/virgo/admin/columns.sass +3 -0
- data/app/assets/stylesheets/virgo/admin/images.sass +14 -0
- data/app/assets/stylesheets/virgo/admin/media_modal.sass +72 -0
- data/app/assets/stylesheets/virgo/admin/post.sass +102 -0
- data/app/assets/stylesheets/virgo/admin/slideshow.sass +35 -0
- data/app/assets/stylesheets/virgo/admin/users.sass +2 -0
- data/app/assets/stylesheets/virgo/admin_only.sass +1 -0
- data/app/assets/stylesheets/virgo/application.sass +605 -0
- data/app/assets/stylesheets/virgo/columns.sass +51 -0
- data/app/assets/stylesheets/virgo/install.sass +15 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-imports.sass +9 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-overrides.sass +51 -0
- data/app/assets/stylesheets/virgo/lib/bootstrap/bootstrap-variables.sass +27 -0
- data/app/assets/stylesheets/virgo/lib/jquery-ui-multiselect.css +30 -0
- data/app/assets/stylesheets/virgo/lib/manifest.sass +3 -0
- data/app/assets/stylesheets/virgo/lib/ouibounce.css +222 -0
- data/app/assets/stylesheets/virgo/lib/select2-imports.sass +8 -0
- data/app/assets/stylesheets/virgo/page_modules.sass +54 -0
- data/app/assets/stylesheets/virgo/pages/authors.sass +30 -0
- data/app/assets/stylesheets/virgo/posts.sass +782 -0
- data/app/assets/stylesheets/virgo/search.sass +36 -0
- data/app/assets/stylesheets/virgo/ui.sass +434 -0
- data/app/assets/stylesheets/virgo/users.sass +9 -0
- data/app/controllers/virgo/admin/base_controller.rb +22 -0
- data/app/controllers/virgo/admin/categories_controller.rb +90 -0
- data/app/controllers/virgo/admin/columns_controller.rb +65 -0
- data/app/controllers/virgo/admin/images_controller.rb +89 -0
- data/app/controllers/virgo/admin/media_modal_controller.rb +101 -0
- data/app/controllers/virgo/admin/newsletters_controller.rb +37 -0
- data/app/controllers/virgo/admin/page_modules_controller.rb +62 -0
- data/app/controllers/virgo/admin/pages_controller.rb +6 -0
- data/app/controllers/virgo/admin/posts_controller.rb +173 -0
- data/app/controllers/virgo/admin/sites_controller.rb +31 -0
- data/app/controllers/virgo/admin/slides_controller.rb +71 -0
- data/app/controllers/virgo/admin/slideshows_controller.rb +66 -0
- data/app/controllers/virgo/admin/tags_controller.rb +98 -0
- data/app/controllers/virgo/admin/users/sessions_controller.rb +21 -0
- data/app/controllers/virgo/admin/users_controller.rb +84 -0
- data/app/controllers/virgo/application_controller.rb +151 -0
- data/app/controllers/virgo/categories_controller.rb +20 -0
- data/app/controllers/virgo/columns_controller.rb +24 -0
- data/app/controllers/virgo/images_controller.rb +9 -0
- data/app/controllers/virgo/install_controller.rb +46 -0
- data/app/controllers/virgo/page_modules_controller.rb +23 -0
- data/app/controllers/virgo/pages_controller.rb +29 -0
- data/app/controllers/virgo/posts_controller.rb +101 -0
- data/app/controllers/virgo/search_controller.rb +35 -0
- data/app/controllers/virgo/subscribers_controller.rb +54 -0
- data/app/controllers/virgo/tags_controller.rb +15 -0
- data/app/controllers/virgo/users/confirmations_controller.rb +18 -0
- data/app/controllers/virgo/users/passwords_controller.rb +31 -0
- data/app/controllers/virgo/users/registrations_controller.rb +41 -0
- data/app/controllers/virgo/users/sessions_controller.rb +32 -0
- data/app/controllers/virgo/users_controller.rb +15 -0
- data/app/helpers/virgo/admin/post_helper.rb +54 -0
- data/app/helpers/virgo/admin_helper.rb +15 -0
- data/app/helpers/virgo/application_helper.rb +124 -0
- data/app/helpers/virgo/hooks_helper.rb +30 -0
- data/app/helpers/virgo/page_modules_helper.rb +4 -0
- data/app/helpers/virgo/post_helper.rb +159 -0
- data/app/helpers/virgo/render_helper.rb +33 -0
- data/app/helpers/virgo/search_helper.rb +49 -0
- data/app/helpers/virgo/shortcode_helper.rb +7 -0
- data/app/helpers/virgo/text_helper.rb +12 -0
- data/app/helpers/virgo/video_helper.rb +34 -0
- data/app/models/concerns/virgo/common/slug_history.rb +36 -0
- data/app/models/concerns/virgo/common/uuid.rb +22 -0
- data/app/models/concerns/virgo/post/recommendations.rb +15 -0
- data/app/models/concerns/virgo/post/search.rb +100 -0
- data/app/models/concerns/virgo/user/search.rb +39 -0
- data/app/models/virgo/ability.rb +59 -0
- data/app/models/virgo/category.rb +44 -0
- data/app/models/virgo/column.rb +25 -0
- data/app/models/virgo/form_model.rb +19 -0
- data/app/models/virgo/image.rb +63 -0
- data/app/models/virgo/page_module.rb +42 -0
- data/app/models/virgo/page_module_post.rb +8 -0
- data/app/models/virgo/post.rb +391 -0
- data/app/models/virgo/post_category.rb +8 -0
- data/app/models/virgo/post_search.rb +7 -0
- data/app/models/virgo/post_tag.rb +10 -0
- data/app/models/virgo/site.rb +36 -0
- data/app/models/virgo/slide.rb +23 -0
- data/app/models/virgo/slideshow.rb +37 -0
- data/app/models/virgo/slug_history.rb +5 -0
- data/app/models/virgo/subscriber.rb +5 -0
- data/app/models/virgo/tag.rb +34 -0
- data/app/models/virgo/user.rb +145 -0
- data/app/uploaders/virgo/application_uploader.rb +11 -0
- data/app/uploaders/virgo/avatar_uploader.rb +21 -0
- data/app/uploaders/virgo/featured_image_uploader.rb +28 -0
- data/app/uploaders/virgo/image_uploader.rb +40 -0
- data/app/uploaders/virgo/slide_uploader.rb +19 -0
- data/app/views/layouts/virgo/admin.haml +16 -0
- data/app/views/layouts/virgo/admin/site_settings.haml +14 -0
- data/app/views/layouts/virgo/application.haml +63 -0
- data/app/views/layouts/virgo/errors.haml +42 -0
- data/app/views/layouts/virgo/main.haml +5 -0
- data/app/views/layouts/virgo/posts.haml +10 -0
- data/app/views/virgo/admin/categories/_form.haml +19 -0
- data/app/views/virgo/admin/categories/edit.haml +7 -0
- data/app/views/virgo/admin/categories/index.haml +38 -0
- data/app/views/virgo/admin/categories/modal_form.haml +11 -0
- data/app/views/virgo/admin/categories/new.haml +7 -0
- data/app/views/virgo/admin/categories/success_modal.haml +14 -0
- data/app/views/virgo/admin/columns/_form.haml +30 -0
- data/app/views/virgo/admin/columns/edit.haml +1 -0
- data/app/views/virgo/admin/columns/index.haml +30 -0
- data/app/views/virgo/admin/columns/new.haml +1 -0
- data/app/views/virgo/admin/images/_form.haml +46 -0
- data/app/views/virgo/admin/images/edit.haml +1 -0
- data/app/views/virgo/admin/images/index.haml +32 -0
- data/app/views/virgo/admin/images/new.haml +1 -0
- data/app/views/virgo/admin/media_modal/_image_settings.haml +17 -0
- data/app/views/virgo/admin/media_modal/_library_panel.haml +26 -0
- data/app/views/virgo/admin/media_modal/_upload_panel.haml +21 -0
- data/app/views/virgo/admin/media_modal/_upload_success.haml +7 -0
- data/app/views/virgo/admin/media_modal/index.haml +19 -0
- data/app/views/virgo/admin/newsletters/changelog.haml +25 -0
- data/app/views/virgo/admin/newsletters/edit.haml +6 -0
- data/app/views/virgo/admin/page_modules/edit.haml +33 -0
- data/app/views/virgo/admin/page_modules/edit_subject.haml +43 -0
- data/app/views/virgo/admin/pages/help.haml +114 -0
- data/app/views/virgo/admin/posts/_author_dropdown.haml +1 -0
- data/app/views/virgo/admin/posts/_categories_form.haml +7 -0
- data/app/views/virgo/admin/posts/_category.haml +22 -0
- data/app/views/virgo/admin/posts/_form.haml +201 -0
- data/app/views/virgo/admin/posts/_revisions.haml +40 -0
- data/app/views/virgo/admin/posts/edit.haml +9 -0
- data/app/views/virgo/admin/posts/index.haml +59 -0
- data/app/views/virgo/admin/posts/new.haml +1 -0
- data/app/views/virgo/admin/posts/revision_detail.haml +28 -0
- data/app/views/virgo/admin/posts/revisions.haml +3 -0
- data/app/views/virgo/admin/sites/edit.haml +12 -0
- data/app/views/virgo/admin/slides/_form.haml +41 -0
- data/app/views/virgo/admin/slides/edit.haml +1 -0
- data/app/views/virgo/admin/slides/new.haml +1 -0
- data/app/views/virgo/admin/slideshows/_form.haml +49 -0
- data/app/views/virgo/admin/slideshows/edit.haml +1 -0
- data/app/views/virgo/admin/slideshows/index.haml +43 -0
- data/app/views/virgo/admin/slideshows/new.haml +1 -0
- data/app/views/virgo/admin/tags/_form.haml +16 -0
- data/app/views/virgo/admin/tags/edit.haml +7 -0
- data/app/views/virgo/admin/tags/index.haml +33 -0
- data/app/views/virgo/admin/tags/modal_form.haml +12 -0
- data/app/views/virgo/admin/tags/new.haml +7 -0
- data/app/views/virgo/admin/tags/success_modal.haml +14 -0
- data/app/views/virgo/admin/users/_form.haml +62 -0
- data/app/views/virgo/admin/users/edit.haml +1 -0
- data/app/views/virgo/admin/users/index.haml +34 -0
- data/app/views/virgo/admin/users/new.haml +1 -0
- data/app/views/virgo/application/sitemap.xml.builder +0 -0
- data/app/views/virgo/authors/_profile_long.haml +13 -0
- data/app/views/virgo/authors/_profile_short.haml +10 -0
- data/app/views/virgo/categories/show.haml +24 -0
- data/app/views/virgo/columns/index.haml +19 -0
- data/app/views/virgo/columns/show.haml +18 -0
- data/app/views/virgo/common/_admin_navbar.haml +100 -0
- data/app/views/virgo/common/_alerts.haml +40 -0
- data/app/views/virgo/common/_analytics.html.erb +1 -0
- data/app/views/virgo/common/_base_errors.haml +8 -0
- data/app/views/virgo/common/_category_heading.haml +26 -0
- data/app/views/virgo/common/_disqus.html.erb +24 -0
- data/app/views/virgo/common/_disqus_comment_count.html.erb +12 -0
- data/app/views/virgo/common/_fb_api.html.erb +30 -0
- data/app/views/virgo/common/_fonts.html.erb +1 -0
- data/app/views/virgo/common/_footer.haml +13 -0
- data/app/views/virgo/common/_footer_javascript.html.erb +0 -0
- data/app/views/virgo/common/_header_analytics.html.erb +9 -0
- data/app/views/virgo/common/_list_signup.haml +20 -0
- data/app/views/virgo/common/_ouibounce_modal.haml +26 -0
- data/app/views/virgo/common/_public_nav.haml +58 -0
- data/app/views/virgo/common/_search_form.haml +8 -0
- data/app/views/virgo/common/_share_bar.haml +45 -0
- data/app/views/virgo/common/_user_vars.haml +2 -0
- data/app/views/virgo/errors/404.haml +10 -0
- data/app/views/virgo/errors/500.haml +10 -0
- data/app/views/virgo/images/_shortcode.haml +4 -0
- data/app/views/virgo/install/index.haml +58 -0
- data/app/views/virgo/install/success.haml +12 -0
- data/app/views/virgo/page_modules/_latest_posts.haml +29 -0
- data/app/views/virgo/page_modules/_popular_posts.haml +51 -0
- data/app/views/virgo/pages/authors.haml +8 -0
- data/app/views/virgo/pages/home.haml +0 -0
- data/app/views/virgo/pages/show.haml +6 -0
- data/app/views/virgo/posts/_author_info.haml +16 -0
- data/app/views/virgo/posts/_post_full.haml +63 -0
- data/app/views/virgo/posts/_post_short.haml +30 -0
- data/app/views/virgo/posts/_post_thumb_box.haml +13 -0
- data/app/views/virgo/posts/_recommendations.haml +12 -0
- data/app/views/virgo/posts/_sidebar_thumb.haml +4 -0
- data/app/views/virgo/posts/index.haml +22 -0
- data/app/views/virgo/posts/latest.haml +16 -0
- data/app/views/virgo/posts/more.haml +10 -0
- data/app/views/virgo/posts/rss.xml.builder +17 -0
- data/app/views/virgo/posts/show.haml +17 -0
- data/app/views/virgo/search/_form.haml +5 -0
- data/app/views/virgo/search/_item.haml +22 -0
- data/app/views/virgo/search/index.haml +11 -0
- data/app/views/virgo/search/new.haml +4 -0
- data/app/views/virgo/shortcode_templates/blockquote.haml +9 -0
- data/app/views/virgo/shortcode_templates/h1.haml +1 -0
- data/app/views/virgo/shortcode_templates/h2.haml +1 -0
- data/app/views/virgo/shortcode_templates/h3.haml +1 -0
- data/app/views/virgo/shortcode_templates/h4.haml +1 -0
- data/app/views/virgo/shortcode_templates/image.haml +17 -0
- data/app/views/virgo/shortcode_templates/pullquote.haml +3 -0
- data/app/views/virgo/shortcode_templates/slideshow.haml +35 -0
- data/app/views/virgo/shortcode_templates/tweet.haml +3 -0
- data/app/views/virgo/shortcode_templates/video.haml +8 -0
- data/app/views/virgo/subscribers/_success_modal.haml +13 -0
- data/app/views/virgo/subscribers/modal.haml +15 -0
- data/app/views/virgo/tags/show.haml +16 -0
- data/app/views/virgo/users/confirmations/new.html.haml +10 -0
- data/app/views/virgo/users/devise_mailer/confirmation_instructions.html.erb +7 -0
- data/app/views/virgo/users/devise_mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/virgo/users/devise_mailer/unlock_instructions.html.haml +5 -0
- data/app/views/virgo/users/passwords/edit.html.haml +14 -0
- data/app/views/virgo/users/passwords/new.html.haml +14 -0
- data/app/views/virgo/users/registrations/edit.html.haml +30 -0
- data/app/views/virgo/users/registrations/new.html.haml +13 -0
- data/app/views/virgo/users/sessions/new.html.haml +12 -0
- data/app/views/virgo/users/shared/_links.haml +26 -0
- data/app/views/virgo/users/show.haml +11 -0
- data/app/views/virgo/users/unlocks/new.html.haml +9 -0
- data/config/initializers/action_mailer.rb +7 -0
- data/config/initializers/active_record.rb +72 -0
- data/config/initializers/active_record_symbolize.rb +18 -0
- data/config/initializers/assets.rb +17 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/carrierwave.rb +36 -0
- data/config/initializers/cookies_serializer.rb +3 -0
- data/config/initializers/devise.rb +257 -0
- data/config/initializers/filter_parameter_logging.rb +4 -0
- data/config/initializers/hash.rb +5 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/mime_types.rb +4 -0
- data/config/initializers/nil_class.rb +13 -0
- data/config/initializers/non_digest_assets.rb +3 -0
- data/config/initializers/paper_trail.rb +30 -0
- data/config/initializers/schema_plus.rb +5 -0
- data/config/initializers/session_store.rb +3 -0
- data/config/initializers/shortcode.rb +12 -0
- data/config/initializers/simple_form.rb +170 -0
- data/config/initializers/simple_form_bootstrap.rb +136 -0
- data/config/initializers/string.rb +5 -0
- data/config/initializers/time_formatting.rb +23 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/devise.en.yml +60 -0
- data/config/routes.rb +96 -0
- data/config/schedule.rb +3 -0
- data/db/migrate/20150729174510_create_virgo_schema.rb +225 -0
- data/lib/generators/virgo/install/install_generator.rb +16 -0
- data/lib/generators/virgo/views/views_generator.rb +22 -0
- data/lib/tasks/virgo_tasks.rake +7 -0
- data/lib/virgo.rb +4 -0
- data/lib/virgo/development_mail_interceptor.rb +6 -0
- data/lib/virgo/email_validator.rb +6 -0
- data/lib/virgo/engine.rb +73 -0
- data/lib/virgo/reduce_validator.rb +6 -0
- data/lib/virgo/upload_helpers.rb +89 -0
- data/lib/virgo/version.rb +3 -0
- data/lib/virgo/view_help.rb +3 -0
- metadata +1051 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
.navbar.navbar-default.public-nav
|
2
|
+
.navbar-header
|
3
|
+
%button.nav-toggle-btn.pull-right.navbar-toggle.collapsed{"data-target" => "#primary-nav", "data-toggle" => "collapse", :type => "button"}
|
4
|
+
%span.sr-only Toggle navigation
|
5
|
+
%span.icon-bar
|
6
|
+
%span.icon-bar
|
7
|
+
%span.icon-bar
|
8
|
+
|
9
|
+
.navbar-brand
|
10
|
+
= link_to virgo.root_path, class: "logo-link" do
|
11
|
+
= site.name || "Virgo CMS"
|
12
|
+
|
13
|
+
|
14
|
+
.navs
|
15
|
+
%ul#primary-nav.nav.navbar-nav.collapse.navbar-collapse.cat-nav.pull-right
|
16
|
+
%li.visible-sm.visible-xs
|
17
|
+
= link_to 'Home', virgo.root_path
|
18
|
+
|
19
|
+
- Virgo::Category.navbar.limit(5).each do |cat|
|
20
|
+
%li{class: ('active' if (controller?('categories') && id_param == cat.slug) || cat == @category)}
|
21
|
+
= link_to virgo.category_path(cat) do
|
22
|
+
%span= cat.name
|
23
|
+
|
24
|
+
- if Virgo::Category.navbar.size > 5
|
25
|
+
- Virgo::Category.navbar.offset(5).limit(2).each_with_index do |cat, index|
|
26
|
+
%li.extended{class: "extended-#{index + 1} #{('active' if (controller?('categories') && id_param == cat.slug) || cat == @category)}"}
|
27
|
+
= link_to virgo.category_path(cat) do
|
28
|
+
%span= cat.name
|
29
|
+
|
30
|
+
- if Virgo::Category.navbar.size > 7
|
31
|
+
%li.dropdown.more.extended-categories-dropdown-wrap
|
32
|
+
%a.dropdown-toggle{href: '#', data: {toggle: 'dropdown'}}
|
33
|
+
More
|
34
|
+
%span.caret
|
35
|
+
%ul.dropdown-menu
|
36
|
+
- Virgo::Category.navbar.offset(7).each do |cat|
|
37
|
+
%li
|
38
|
+
= link_to cat.name, virgo.category_path(cat)
|
39
|
+
|
40
|
+
%li.search.hidden-xs.hidden-sm.hidden-md
|
41
|
+
= link_to "#", class: 'navbar-search-link js-expand-search-form' do
|
42
|
+
%i.fa.fa-search
|
43
|
+
|
44
|
+
.search-form-container.js-search-form
|
45
|
+
.search-form-wrapper
|
46
|
+
= form_tag virgo.search_index_path, method: :post, class: 'search-form form-inline pull-left' do
|
47
|
+
= text_field_tag 'post_search[term]', "", class: 'form-control search-form-input'
|
48
|
+
= submit_tag "Search", class: 'btn block-link search-form-submit'
|
49
|
+
|
50
|
+
- if filter_params[:term].present?
|
51
|
+
- url = filter_params[:post_type] == 'page' ? virgo.admin_posts_path(post_type: 'page') : filter_params
|
52
|
+
= link_to nil, href: url, class: 'clear-link' do
|
53
|
+
%i.fa.fa-times-circle-o
|
54
|
+
clear search
|
55
|
+
%i.fa.fa-times.js-collapse-search-form.collapse-search-form.search-form-icon
|
56
|
+
|
57
|
+
.clear
|
58
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= form_tag url, method: :get, class: 'search-form form-inline' do
|
2
|
+
= text_field_tag 'filters[term]', filter_params[:term], class: 'form-control'
|
3
|
+
= submit_tag "Search", class: 'btn btn-default'
|
4
|
+
|
5
|
+
- if filter_params[:term].present?
|
6
|
+
= link_to nil, href: url, class: 'clear-link' do
|
7
|
+
%i.fa.fa-times-circle-o
|
8
|
+
clear search
|
@@ -0,0 +1,45 @@
|
|
1
|
+
- navbar = local_assigns.has_key?(:navbar) ? navbar : false
|
2
|
+
|
3
|
+
.share-links-wrap
|
4
|
+
.share-links
|
5
|
+
- if @post && !navbar
|
6
|
+
= link_to "#", class: "share-button facebook-share-button js-fb-share", data: {share_uri: page_url} do
|
7
|
+
%i.icon.fa.fa-facebook
|
8
|
+
%span.text Share on Facebook
|
9
|
+
|
10
|
+
= link_to "#", class: "share-button facebook-like-button js-fb-like", data: {share_uri: page_url} do
|
11
|
+
%i.icon.fa.fa-thumbs-o-up
|
12
|
+
%span.text Like
|
13
|
+
|
14
|
+
= link_to "https://twitter.com/intent/tweet?url=#{u(page_url)}&text=#{u(decode_html_entities(@post.headline))}&via=#{site.twitter_handle}", class: "share-button twitter js-tweet-button" do
|
15
|
+
%i.icon.fa.fa-twitter
|
16
|
+
%span.text Tweet
|
17
|
+
|
18
|
+
= link_to "https://www.pinterest.com/pin/create/button/?url=#{u(page_url)}", class: "share-button pinterest" do
|
19
|
+
%i.icon.fa.fa-pinterest-p
|
20
|
+
Pinterest
|
21
|
+
|
22
|
+
= link_to "mailto:?subject=#{u(@post.headline + "|" + site.name)}&body=#{u(page_url)}", class: "share-button email" do
|
23
|
+
%i.icon.fa.fa-envelope
|
24
|
+
%span.text Email
|
25
|
+
|
26
|
+
.like-widget-wrap.hidden
|
27
|
+
.fb-like{"data-action" => "like", "data-href" => "#{page_url}", "data-layout" => "standard", "data-share" => "false", "data-show-faces" => "true"}
|
28
|
+
|
29
|
+
- else
|
30
|
+
= link_to "#", class: "share-button facebook js-fb-share", data: {share_uri: page_url} do
|
31
|
+
%i.icon.fa.fa-facebook
|
32
|
+
|
33
|
+
= link_to "http://twitter.com/intent/follow?source=followbutton&variant=1.0&screen_name=#{site.twitter_handle}", class: "share-button twitter" do
|
34
|
+
%i.icon.fa.fa-twitter
|
35
|
+
|
36
|
+
= link_to "http://instagram.com/#{site.instagram_account_name}", target: "_blank", title: "Follow on instagram", class: "share-button instagram" do
|
37
|
+
%i.icon.fa.fa-instagram
|
38
|
+
|
39
|
+
= link_to "https://www.pinterest.com/#{site.pinterest_account_name}/", target: "_blank", title: "Follow on pinterest", class: "share-button pinterest" do
|
40
|
+
%i.icon.fa.fa-pinterest-p
|
41
|
+
|
42
|
+
= link_to "/feed.rss", class: "share-button share-rss" do
|
43
|
+
%i.icon.fa.fa-rss.rss-icon
|
44
|
+
|
45
|
+
.clear
|
@@ -0,0 +1,58 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-8.col-md-offset-2
|
3
|
+
.box
|
4
|
+
%h1 Welcome to Virgo CMS!
|
5
|
+
%hr
|
6
|
+
%p
|
7
|
+
Please enter some basic info about your site along with an admin email, username and password in the form below.
|
8
|
+
|
9
|
+
- if (@user && @user.errors.any?) || (@site && @site.errors.any?)
|
10
|
+
.alert.alert-danger
|
11
|
+
We're sorry but your submission was invalid. Please correct the issues below and try again.
|
12
|
+
|
13
|
+
.spacer.xs
|
14
|
+
|
15
|
+
%ul.errors-list
|
16
|
+
- @user.errors.full_messages.each do |msg|
|
17
|
+
%li= "Admin #{msg.downcase}"
|
18
|
+
- @site.errors.full_messages.each do |msg|
|
19
|
+
%li= "Site #{msg.downcase}"
|
20
|
+
|
21
|
+
= form_tag install_index_path, class: 'install-form' do
|
22
|
+
.form-group
|
23
|
+
%label Site Name
|
24
|
+
= text_field_tag "site[name]", site_params[:name], class: "form-control"
|
25
|
+
|
26
|
+
.form-group
|
27
|
+
%label Site Tagline
|
28
|
+
= text_field_tag "site[tagline]", site_params[:tagline], class: "form-control"
|
29
|
+
|
30
|
+
.form-group
|
31
|
+
%label Disqus App ID
|
32
|
+
= text_field_tag "site[disqus_app_id]", site_params[:tagline], class: "form-control"
|
33
|
+
%p.help-block
|
34
|
+
Optional, but required for Disqus comment system to function.
|
35
|
+
|
36
|
+
.form-group
|
37
|
+
%label Admin Username
|
38
|
+
= text_field_tag "user[username]", user_params[:username], class: "form-control"
|
39
|
+
|
40
|
+
.form-group
|
41
|
+
%label Admin Email
|
42
|
+
= text_field_tag "user[email]", user_params[:email], class: "form-control"
|
43
|
+
|
44
|
+
.form-group
|
45
|
+
%label Admin Byline (nickname)
|
46
|
+
= text_field_tag "user[byline]", user_params[:byline], class: "form-control"
|
47
|
+
|
48
|
+
.form-group
|
49
|
+
%label Admin Password
|
50
|
+
= password_field_tag "user[password]", user_params[:password], class: "form-control"
|
51
|
+
|
52
|
+
.form-group
|
53
|
+
%label Confirm Admin Password
|
54
|
+
= password_field_tag "user[password_confirmation]", user_params[:password_confirmation], class: "form-control"
|
55
|
+
|
56
|
+
= submit_tag "Continue", class: "btn btn-success btn-lg pull-right", data: {disable_with: "Loading..."}
|
57
|
+
|
58
|
+
.clear
|
@@ -0,0 +1,12 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-8.col-md-offset-2
|
3
|
+
.box
|
4
|
+
%h1 Success!
|
5
|
+
%hr
|
6
|
+
%p
|
7
|
+
You've successfully installed VirgoCMS. Click the button below to
|
8
|
+
go to the admin login page.
|
9
|
+
|
10
|
+
.spacer.xs
|
11
|
+
|
12
|
+
= link_to "Log In", new_user_session_path, class: "btn btn-success btn-lg"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
- @latest_posts = Post.order(publish_at: :desc)
|
2
|
+
|
3
|
+
.page-group.container-fluid.no-border.latest-posts-module-container
|
4
|
+
.content-col
|
5
|
+
.latest-posts-box
|
6
|
+
%h3.latest-posts-heading.with-link
|
7
|
+
= link_to "Latest", latest_posts_path
|
8
|
+
.latest-posts
|
9
|
+
.row
|
10
|
+
.col-md-12
|
11
|
+
= render '/virgo/posts/post_thumb_box', post: @latest_posts.first, classes: 'first-level'
|
12
|
+
|
13
|
+
- @latest_posts.limit(2).offset(1).in_groups_of(2).each do |group|
|
14
|
+
.row
|
15
|
+
- group.each do |post|
|
16
|
+
.col-md-6
|
17
|
+
= render '/virgo/posts/post_thumb_box', post: post, classes: 'second-level'
|
18
|
+
|
19
|
+
- @latest_posts.limit(3).offset(3).in_groups_of(3).each do |group|
|
20
|
+
.row
|
21
|
+
- group.each do |post|
|
22
|
+
.col-md-4
|
23
|
+
= render '/virgo/posts/post_thumb_box', post: post, classes: 'third-level'
|
24
|
+
|
25
|
+
.show-more-wrap.text-center
|
26
|
+
= link_to "Load More", '#', data: {uri: more_posts_path(page: 1)}, class: 'view-more-link block-link js-load-posts'
|
27
|
+
|
28
|
+
.rail-col
|
29
|
+
= render PageModule.POPULAR.template_path
|
@@ -0,0 +1,51 @@
|
|
1
|
+
- mini = local_assigns.has_key?(:mini) ? mini : false
|
2
|
+
- tabbed = local_assigns.has_key?(:tabbed) ? tabbed : tabbed_param
|
3
|
+
- cat_id = category_id_param
|
4
|
+
- category = local_assigns.has_key?(:category) ? category : nil
|
5
|
+
- category = Category.find_by(id: category_id_param) if category.nil?
|
6
|
+
- tab = local_assigns.has_key?(:tab) ? tab : (tab_param.try(:to_sym) || :all)
|
7
|
+
|
8
|
+
- cache_if !action?('popular_posts'), [site_key, popular_posts_page_param, mini, tabbed, cat_id, category, tab] do
|
9
|
+
.most-popular-posts-box.js-popular-posts-box{class: ('mini' if mini), data: {uri: popular_posts_page_modules_path(category_id: category.try(:id))}}
|
10
|
+
.inner
|
11
|
+
%h3.most-popular-posts-heading Most Popular
|
12
|
+
- if tabbed && (cat_id.present? || category)
|
13
|
+
- category ||= Category.find_by(id: cat_id)
|
14
|
+
|
15
|
+
%ul.popular-posts-tabs
|
16
|
+
%li{class: ('active' if tab == :category)}= link_to "In #{category.name}", '#', data: {uri: popular_posts_path(category_id: (category.try(:id) || cat_id), tabbed: tabbed, tab: :category)}
|
17
|
+
%li{class: ('active' if tab == :all)}= link_to "On #{site.name}", '#', data: {uri: popular_posts_path(category_id: (category.try(:id) || cat_id), tabbed: tabbed, tab: :all)}
|
18
|
+
.clear
|
19
|
+
.most-popular-posts-body
|
20
|
+
.loading-overlay.most-popular-posts-loading-overlay
|
21
|
+
%ul.popular-posts.list-unstyled
|
22
|
+
- if tab == :category
|
23
|
+
- posts = category.posts.most_popular.page(popular_posts_page_param).per(5)
|
24
|
+
- else
|
25
|
+
- posts = Post.most_popular.page(popular_posts_page_param).per(5)
|
26
|
+
|
27
|
+
- posts.each_with_index do |post, index|
|
28
|
+
%li.popular-post
|
29
|
+
%a.popular-post-inner{href: expanded_post_url(post)}
|
30
|
+
.number= (((popular_posts_page_param.try(:to_i) || 1) - 1) * 5) + index + 1
|
31
|
+
.post-headline
|
32
|
+
.text= post.headline
|
33
|
+
.author-info
|
34
|
+
= post_byline post, no_links: true
|
35
|
+
|
36
|
+
.more-link
|
37
|
+
- is_first_page = popular_posts_page_param.blank? || popular_posts_page_param.to_i == 1
|
38
|
+
|
39
|
+
- is_last_page = ((popular_posts_page_param.try(:to_i) || 1) >= posts.total_pages)
|
40
|
+
|
41
|
+
= link_to popular_posts_path(popular_posts_page: ((popular_posts_page_param.try(:to_i) || 1) - 1), category_id: (category.try(:id) || cat_id), tabbed: tabbed, tab: tab), class: "popular-prev-link#{' first-page' if is_first_page}" do
|
42
|
+
%i.fa.fa-chevron-left
|
43
|
+
Prev 5
|
44
|
+
|
45
|
+
= link_to popular_posts_path(popular_posts_page: ((popular_posts_page_param.try(:to_i) || 1) + 1), category_id: (category.try(:id) || cat_id), tabbed: tabbed, tab: tab), class: "popular-more-link#{' last-page' if is_last_page}" do
|
46
|
+
|
47
|
+
Next 5
|
48
|
+
%i.fa.fa-chevron-right
|
49
|
+
|
50
|
+
.clear
|
51
|
+
|
File without changes
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.author-info
|
2
|
+
%span.inner
|
3
|
+
- if post.author.avatar.present?
|
4
|
+
= link_to user_path(post.author), class: 'author-avatar' do
|
5
|
+
= image_tag post.author.avatar.url(:thumb), class: 'post-author-avatar-img'
|
6
|
+
%span.muted By
|
7
|
+
= link_to post.author.byline, user_path(post.author), class: 'post-author-link'
|
8
|
+
%span.muted.bullet •
|
9
|
+
%span.muted.pub-date
|
10
|
+
- if post.publish_at
|
11
|
+
= local_time (post.publish_at || post.created_at), post_time_format
|
12
|
+
- else
|
13
|
+
(unpublished)
|
14
|
+
- if post.post? && post.comments_enabled?
|
15
|
+
= link_to post_detail_url(post, anchor: 'disqus_thread'), class: 'muted comment-info' do
|
16
|
+
%span.disqus-comment-count{data: {disqus_identifier: post.disqus_identifier}}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
- cache [post, site_key, @category] do
|
2
|
+
:javascript
|
3
|
+
window.comments_enabled = #{@post.comments_enabled.to_s};
|
4
|
+
.post-banner-img{style: ("background-image: url('#{post_banner_image_url(post)}');" if post.show_feature_image_on_post_page), class: ('no-img' if (!post.featured_image || post.featured_image.image.blank? || !post.show_feature_image_on_post_page))}
|
5
|
+
- if post.featured_image && post.featured_image.credit.present? && post.show_feature_image_on_post_page
|
6
|
+
.photo-credit= raw post.featured_image.credit
|
7
|
+
|
8
|
+
.container-fluid.post-content{class: ('no-img' if (!post.featured_image || post.featured_image.image.blank? || !post.show_feature_image_on_post_page))}
|
9
|
+
.post-content-inner
|
10
|
+
.post-content-col
|
11
|
+
.post.post-full{data: {tracking_uri: track_post_path(post)}, class: ('no-subhead' if post.subhead.blank?)}
|
12
|
+
%h2.post-title
|
13
|
+
= link_to expanded_post_url(post) do
|
14
|
+
%span.inner
|
15
|
+
= post.headline
|
16
|
+
|
17
|
+
.author-info-wrap
|
18
|
+
= render 'author_info', post: post
|
19
|
+
= render '/virgo/common/share_bar', post: post
|
20
|
+
|
21
|
+
- if post.subhead.present?
|
22
|
+
.post-subhead
|
23
|
+
= raw post.subhead
|
24
|
+
.clear
|
25
|
+
|
26
|
+
- # this is solely here to feed to the outbrain crawler, it is styled display: none
|
27
|
+
- if post.featured_image.present?
|
28
|
+
= image_tag post.featured_image.image.url(:med_thumb), id: 'feature-thumb'
|
29
|
+
|
30
|
+
.post-body
|
31
|
+
= strip_read_more(post.rendered_body)
|
32
|
+
|
33
|
+
- if post.has_citation?
|
34
|
+
.post-citation
|
35
|
+
= link_to post.citation_url do
|
36
|
+
%span.via= "- via"
|
37
|
+
%span.citation-name= post.citation_name
|
38
|
+
|
39
|
+
.post-meta
|
40
|
+
.divider
|
41
|
+
- if post.tags.any?
|
42
|
+
%ul.post-tag-list.list-inline
|
43
|
+
%li.title Tags:
|
44
|
+
|
45
|
+
- tag_sz = post.tags.size
|
46
|
+
- post.post_tags.by_position.each_with_index do |post_tag, index|
|
47
|
+
- tag = post_tag.tag
|
48
|
+
|
49
|
+
%li
|
50
|
+
= link_to tag.name, tag_path(tag)
|
51
|
+
- if index < (tag_sz - 1)
|
52
|
+
%li.slash= "/"
|
53
|
+
= render '/virgo/common/share_bar', post: post
|
54
|
+
|
55
|
+
.clear
|
56
|
+
|
57
|
+
.post-bottom
|
58
|
+
- if post.post? && post.comments_enabled?
|
59
|
+
.post-comments
|
60
|
+
= render '/virgo/common/disqus'
|
61
|
+
|
62
|
+
- content_for :end_of_body do
|
63
|
+
= render '/virgo/common/disqus_comment_count'
|
@@ -0,0 +1,30 @@
|
|
1
|
+
- featured = local_assigns.has_key?(:featured) ? featured : false
|
2
|
+
- skip_author_info = local_assigns.has_key?(:skip_author_info) ? skip_author_info : false
|
3
|
+
|
4
|
+
- cache post do
|
5
|
+
.post.post-short{data: {uri: expanded_post_url(post)}, class: ('featured-post' if featured)}
|
6
|
+
- if post.thumb_image.present?
|
7
|
+
= link_to "", expanded_post_url(post), class: 'post-short-img', style: "background-image: url('#{post.thumb_image.try(:image).try(:url, :med_thumb)}');"
|
8
|
+
|
9
|
+
.post-headline= link_to post.headline, expanded_post_url(post)
|
10
|
+
|
11
|
+
- unless skip_author_info
|
12
|
+
.author-info
|
13
|
+
- if post.author.avatar.present?
|
14
|
+
= link_to user_path(post.author), class: 'author-avatar' do
|
15
|
+
= image_tag post.author.avatar.url(:thumb), class: 'post-author-avatar-img img-circle'
|
16
|
+
%span.muted by
|
17
|
+
= link_to post.author.byline, user_path(post.author), class: 'post-author-link'
|
18
|
+
%span.muted.slash= '/'
|
19
|
+
%span.muted.pub-date= local_time (post.publish_at || post.created_at), post_time_format
|
20
|
+
- if post.post? && post.comments_enabled?
|
21
|
+
= link_to expanded_post_url(post, anchor: 'disqus_thread'), class: 'muted comment-info' do
|
22
|
+
%span.disqus-comment-count{data: {disqus_identifier: post.disqus_identifier}}
|
23
|
+
|
24
|
+
- if post.excerpt.present? && post.show_excerpt?
|
25
|
+
.post-body.post-excerpt
|
26
|
+
= post.excerpt
|
27
|
+
- else
|
28
|
+
.post-body
|
29
|
+
= truncate_post_to_read_more(post, length: 240)
|
30
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
- classes = local_assigns.has_key?(:classes) ? classes : nil
|
2
|
+
|
3
|
+
- if post
|
4
|
+
.post-thumb-box{class: classes}
|
5
|
+
%a.post-thumb-box-img{style: "background-image: url('#{post.thumb_image.try(:image).try(:url, :med_thumb)}');", href: post_detail_path(post)}
|
6
|
+
= post_tag post
|
7
|
+
.post-thumb-text
|
8
|
+
%a.post-thumb-headline.headline{href: post_detail_path(post)}= post.headline
|
9
|
+
.author-info
|
10
|
+
= post_byline post
|
11
|
+
= featured_post_text post
|
12
|
+
|
13
|
+
|