diff --git a/Gemfile b/Gemfile index 55d0f9a..8e739ae 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' gem 'rails', '4.0.0' # Use sqlite3 as the database for Active Record -gem 'sqlite3' +# gem 'sqlite3' # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.0' @@ -16,7 +16,7 @@ gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.0.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes -gem 'therubyracer', platforms: :ruby +# gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' @@ -59,8 +59,12 @@ end # Twitter Bootstrap template #gem 'bootstrap-sass' #gem 'anjlab-bootstrap-rails', '>= 3.0.0.0' -gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails', - :github => 'anjlab/bootstrap-rails' +# gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails', + # :github => 'anjlab/bootstrap-rails' + +# Zurb Foundation +gem 'foundation-rails' + # Pagination # Hint: rails generate kaminari:views bootstrap gem 'kaminari' @@ -74,8 +78,8 @@ gem 'fancybox2-rails', '~> 0.2.4' # Trying pg_search for full-text search… too slow with ranking… screw PostgreSQL #gem 'pg_search' -# Let's use Elasticsearch… meh, tire is no longer supported +# Let's use Elasticsearch. "tire" has been retired but there is not yet a worthy alternative. #gem 'tire' -# ElasticSearch access -gem 'elasticsearch-ruby' +# Use SLIM as our templating language +gem 'slim-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 9d8088e..b4e1ca4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,3 @@ -GIT - remote: git://github.com/anjlab/bootstrap-rails.git - revision: 3707d98b1f27bec87b1dd6de7129e3f52a72e413 - specs: - anjlab-bootstrap-rails (3.0.2.0) - railties (>= 3.0) - sass (>= 3.2) - GEM remote: https://rubygems.org/ specs: @@ -33,6 +25,7 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) + ansi (1.4.3) arel (4.0.1) atomic (1.1.14) better_errors (1.0.1) @@ -51,13 +44,14 @@ GEM execjs coffee-script-source (1.6.3) debug_inspector (0.0.2) - elasticsearch-ruby (0.0.4) - activesupport (>= 3.0.0) - thrift erubis (2.7.0) execjs (2.0.2) fancybox2-rails (0.2.5) railties (>= 3.1.0) + foundation-rails (5.4.5.0) + railties (>= 3.1.0) + sass (>= 3.2.0) + hashr (0.0.22) hike (1.2.3) i18n (0.6.5) jbuilder (1.5.2) @@ -70,7 +64,6 @@ GEM kaminari (0.14.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) - libv8 (3.16.14.3) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) @@ -104,7 +97,8 @@ GEM rake (10.1.0) rdoc (3.12.2) json (~> 1.4) - ref (1.0.5) + rest-client (1.6.7) + mime-types (>= 1.16) sass (3.2.12) sass-rails (4.0.1) railties (>= 4.0.0, < 5.0) @@ -113,6 +107,14 @@ GEM sdoc (0.3.20) json (>= 1.1.3) rdoc (~> 3.10) + slim (2.0.2) + temple (~> 0.6.6) + tilt (>= 1.3.3, < 2.1) + slim-rails (2.0.3) + actionpack (>= 3.0, < 4.1) + activesupport (>= 3.0, < 4.1) + railties (>= 3.0, < 4.1) + slim (~> 2.0) sprockets (2.10.0) hike (~> 1.2) multi_json (~> 1.0) @@ -122,15 +124,19 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) - sqlite3 (1.3.8) - therubyracer (0.12.0) - libv8 (~> 3.16.14.0) - ref + temple (0.6.7) thor (0.18.1) thread_safe (0.1.3) atomic - thrift (0.9.1) tilt (1.4.1) + tire (0.6.1) + activemodel (>= 3.0) + activesupport + ansi + hashr (~> 0.0.19) + multi_json (~> 1.3) + rake + rest-client (~> 1.6) treetop (1.4.15) polyglot polyglot (>= 0.3.1) @@ -143,12 +149,11 @@ PLATFORMS ruby DEPENDENCIES - anjlab-bootstrap-rails! better_errors binding_of_caller coffee-rails (~> 4.0.0) - elasticsearch-ruby fancybox2-rails (~> 0.2.4) + foundation-rails jbuilder (~> 1.2) jquery-rails kaminari @@ -157,6 +162,6 @@ DEPENDENCIES rails (= 4.0.0) sass-rails (~> 4.0.0) sdoc - sqlite3 - therubyracer + slim-rails + tire uglifier (>= 1.3.0) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index d4fbf54..5cfeeec 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,6 +12,12 @@ // //= require jquery //= require jquery_ujs +//=require 'foundation/foundation.topbar' +//=require 'foundation/foundation.slider' //= require fancybox -//= require twitter/bootstrap +//= require jquery.cycle2 //= require_tree . + +$(function(){ + $(document).foundation(); } + ); diff --git a/app/assets/javascripts/packages.js.coffee b/app/assets/javascripts/packages.js.coffee index 895ac85..662464a 100644 --- a/app/assets/javascripts/packages.js.coffee +++ b/app/assets/javascripts/packages.js.coffee @@ -2,19 +2,19 @@ # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ -jQuery -> - # Enable fancybox zoom for thumbnail images - $("a.fancybox").fancybox({ - openEffect : 'elastic', - closeEffect : 'elastic', - - helpers : { - title : { - type : 'inside' - } - } - }) - - # Submit the form if the user changes the view (grid or list) - $("input[name='search[display]']").change -> - $(this).parents('form').submit() +#jQuery -> +# # Enable fancybox zoom for thumbnail images +# $("a.fancybox").fancybox({ +# openEffect : 'elastic', +# closeEffect : 'elastic', +# +# helpers : { +# title : { +# type : 'inside' +# } +# } +# }) +# +# # Submit the form if the user changes the view (grid or list) +# $("input[name='search[display]']").change -> +# $(this).parents('form').submit() diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 78200e6..fa2daf9 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -9,8 +9,7 @@ * compiled file, but it's generally better to create a new file per style scope. * *= require_self - *= require_tree . - *= require fancybox */ -@import "twitter/bootstrap"; +@import "foundation_and_overrides.scss"; +@import "my.css.scss"; diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/foundation_and_overrides.scss new file mode 100644 index 0000000..572a676 --- /dev/null +++ b/app/assets/stylesheets/foundation_and_overrides.scss @@ -0,0 +1,1480 @@ +// Foundation by ZURB +// foundation.zurb.com +// Licensed under MIT Open Source + +// + +// Table of Contents +// Foundation Settings +// +// a. Base +// b. Grid +// c. Global +// d. Media Query Ranges +// e. Typography +// 01. Accordion +// 02. Alert Boxes +// 03. Block Grid +// 04. Breadcrumbs +// 05. Buttons +// 06. Button Groups +// 07. Clearing +// 08. Dropdown +// 09. Dropdown Buttons +// 10. Flex Video +// 11. Forms +// 12. Icon Bar +// 13. Inline Lists +// 14. Joyride +// 15. Keystrokes +// 16. Labels +// 17. Magellan +// 18. Off-canvas +// 19. Orbit +// 20. Pagination +// 21. Panels +// 22. Pricing Tables +// 23. Progress Bar +// 24. Range Slider +// 25. Reveal +// 26. Side Nav +// 27. Split Buttons +// 28. Sub Nav +// 29. Switch +// 30. Tables +// 31. Tabs +// 32. Thumbnails +// 33. Tooltips +// 34. Top Bar +// 36. Visibility Classes + +// a. Base +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// This is the default html and body font-size for the base rem value. +// $rem-base: 16px; + +// Allows the use of rem-calc() or lower-bound() in your settings +@import "foundation/functions"; + +// The default font-size is set to 100% of the browser style sheet (usually 16px) +// for compatibility with browser-based text zoom or user-set defaults. + +// Since the typical default browser font-size is 16px, that makes the calculation for grid size. +// If you want your base font-size to be different and not have it affect the grid breakpoints, +// set $rem-base to $base-font-size and make sure $base-font-size is a px value. +// $base-font-size: 100%; + +// The $base-font-size is 100% while $base-line-height is 150% +// $base-line-height: 150%; + +// We use this to control whether or not CSS classes come through in the gem files. +$include-html-classes: true; +// $include-print-styles: true; +$include-html-global-classes: $include-html-classes; + +// b. Grid +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-grid-classes: $include-html-classes; +// $include-xl-html-grid-classes: false; + +// $row-width: rem-calc(1000); +// $total-columns: 12; +// $column-gutter: rem-calc(30); + +// c. Global +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// We use these to define default font stacks +// $font-family-sans-serif: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; +// $font-family-serif: Georgia, Cambria, "Times New Roman", Times, serif; +// $font-family-monospace: Consolas, "Liberation Mono", Courier, monospace; + +// We use these to define default font weights +// $font-weight-normal: normal !default; +// $font-weight-bold: bold !default; + +// We use these as default colors throughout +// $primary-color: #008CBA; +// $secondary-color: #e7e7e7; +// $alert-color: #f04124; +// $success-color: #43AC6A; +// $warning-color: #f08a24; +// $info-color: #a0d3e8; + +// $white : #FFFFFF; +// $ghost : #FAFAFA; +// $snow : #F9F9F9; +// $vapor : #F6F6F6; +// $white-smoke : #F5F5F5; +// $silver : #EFEFEF; +// $smoke : #EEEEEE; +// $gainsboro : #DDDDDD; +// $iron : #CCCCCC; +// $base : #AAAAAA; +// $aluminum : #999999; +// $jumbo : #888888; +// $monsoon : #777777; +// $steel : #666666; +// $charcoal : #555555; +// $tuatara : #444444; +// $oil : #333333; +// $jet : #222222; +// $black : #000000; + +// We use these to control various global styles +// $body-bg: $white; +// $body-font-color: $jet; +// $body-font-family: $font-family-sans-serif; +// $body-font-weight: $font-weight-normal; +// $body-font-style: normal; + +// We use this to control font-smoothing +// $font-smoothing: antialiased; + +// We use these to control text direction settings +// $text-direction: ltr; +// $opposite-direction: right; +// $default-float: left; +// $last-child-float: $opposite-direction; + +// We use these to make sure border radius matches unless we want it different. +// $global-radius: 3px; +// $global-rounded: 1000px; + +// We use these to control inset shadow shiny edges and depressions. +// $shiny-edge-size: 0 1px 0; +// $shiny-edge-color: rgba($white, .5); +// $shiny-edge-active-color: rgba($black, .2); + +// d. Media Query Ranges +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $small-range: (0em, 40em); +// $medium-range: (40.063em, 64em); +// $large-range: (64.063em, 90em); +// $xlarge-range: (90.063em, 120em); +// $xxlarge-range: (120.063em, 99999999em); + +// $screen: "only screen"; + +// $landscape: "#{$screen} and (orientation: landscape)"; +// $portrait: "#{$screen} and (orientation: portrait)"; + +// $small-up: $screen; +// $small-only: "#{$screen} and (max-width: #{upper-bound($small-range)})"; + +// $medium-up: "#{$screen} and (min-width:#{lower-bound($medium-range)})"; +// $medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})"; + +// $large-up: "#{$screen} and (min-width:#{lower-bound($large-range)})"; +// $large-only: "#{$screen} and (min-width:#{lower-bound($large-range)}) and (max-width:#{upper-bound($large-range)})"; + +// $xlarge-up: "#{$screen} and (min-width:#{lower-bound($xlarge-range)})"; +// $xlarge-only: "#{$screen} and (min-width:#{lower-bound($xlarge-range)}) and (max-width:#{upper-bound($xlarge-range)})"; + +// $xxlarge-up: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)})"; +// $xxlarge-only: "#{$screen} and (min-width:#{lower-bound($xxlarge-range)}) and (max-width:#{upper-bound($xxlarge-range)})"; + +// Legacy +// $small: $medium-up; +// $medium: $medium-up; +// $large: $large-up; + +// We use this as cursors values for enabling the option of having custom cursors in the whole site's stylesheet +// $cursor-crosshair-value: crosshair; +// $cursor-default-value: default; +// $cursor-pointer-value: pointer; +// $cursor-help-value: help; +// $cursor-text-value: text; + +// e. Typography +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-type-classes: $include-html-classes; + +// We use these to control header font styles +// $header-font-family: $body-font-family; +// $header-font-weight: $font-weight-normal; +// $header-font-style: normal; +// $header-font-color: $jet; +// $header-line-height: 1.4; +// $header-top-margin: .2rem; +// $header-bottom-margin: .5rem; +// $header-text-rendering: optimizeLegibility; + +// We use these to control header font sizes +// $h1-font-size: rem-calc(44); +// $h2-font-size: rem-calc(37); +// $h3-font-size: rem-calc(27); +// $h4-font-size: rem-calc(23); +// $h5-font-size: rem-calc(18); +// $h6-font-size: 1rem; + +// We use these to control header size reduction on small screens +// $h1-font-reduction: rem-calc(10) !default; +// $h2-font-reduction: rem-calc(10) !default; +// $h3-font-reduction: rem-calc(5) !default; +// $h4-font-reduction: rem-calc(5) !default; +// $h5-font-reduction: 0 !default; +// $h6-font-reduction: 0 !default; + +// These control how subheaders are styled. +// $subheader-line-height: 1.4; +// $subheader-font-color: scale-color($header-font-color, $lightness: 35%); +// $subheader-font-weight: $font-weight-normal; +// $subheader-top-margin: .2rem; +// $subheader-bottom-margin: .5rem; + +// A general styling +// $small-font-size: 60%; +// $small-font-color: scale-color($header-font-color, $lightness: 35%); + +// We use these to style paragraphs +// $paragraph-font-family: inherit; +// $paragraph-font-weight: $font-weight-normal; +// $paragraph-font-size: 1rem; +// $paragraph-line-height: 1.6; +// $paragraph-margin-bottom: rem-calc(20); +// $paragraph-aside-font-size: rem-calc(14); +// $paragraph-aside-line-height: 1.35; +// $paragraph-aside-font-style: italic; +// $paragraph-text-rendering: optimizeLegibility; + +// We use these to style tags +// $code-color: $oil; +// $code-font-family: $font-family-monospace; +// $code-font-weight: $font-weight-normal; +// $code-background-color: scale-color($secondary-color, $lightness: 70%); +// $code-border-size: 1px; +// $code-border-style: solid; +// $code-border-color: scale-color($code-background-color, $lightness: -10%); +// $code-padding: rem-calc(2) rem-calc(5) rem-calc(1); + +// We use these to style anchors +// $anchor-text-decoration: none; +// $anchor-text-decoration-hover: none; +// $anchor-font-color: $primary-color; +// $anchor-font-color-hover: scale-color($primary-color, $lightness: -14%); + +// We use these to style the
element +// $hr-border-width: 1px; +// $hr-border-style: solid; +// $hr-border-color: $gainsboro; +// $hr-margin: rem-calc(20); + +// We use these to style lists +// $list-font-family: $paragraph-font-family; +// $list-font-size: $paragraph-font-size; +// $list-line-height: $paragraph-line-height; +// $list-margin-bottom: $paragraph-margin-bottom; +// $list-style-position: outside; +// $list-side-margin: 1.1rem; +// $list-ordered-side-margin: 1.4rem; +// $list-side-margin-no-bullet: 0; +// $list-nested-margin: rem-calc(20); +// $definition-list-header-weight: $font-weight-bold; +// $definition-list-header-margin-bottom: .3rem; +// $definition-list-margin-bottom: rem-calc(12); + +// We use these to style blockquotes +// $blockquote-font-color: scale-color($header-font-color, $lightness: 35%); +// $blockquote-padding: rem-calc(9 20 0 19); +// $blockquote-border: 1px solid $gainsboro; +// $blockquote-cite-font-size: rem-calc(13); +// $blockquote-cite-font-color: scale-color($header-font-color, $lightness: 23%); +// $blockquote-cite-link-color: $blockquote-cite-font-color; + +// Acronym styles +// $acronym-underline: 1px dotted $gainsboro; + +// We use these to control padding and margin +// $microformat-padding: rem-calc(10 12); +// $microformat-margin: rem-calc(0 0 20 0); + +// We use these to control the border styles +// $microformat-border-width: 1px; +// $microformat-border-style: solid; +// $microformat-border-color: $gainsboro; + +// We use these to control full name font styles +// $microformat-fullname-font-weight: $font-weight-bold; +// $microformat-fullname-font-size: rem-calc(15); + +// We use this to control the summary font styles +// $microformat-summary-font-weight: $font-weight-bold; + +// We use this to control abbr padding +// $microformat-abbr-padding: rem-calc(0 1); + +// We use this to control abbr font styles +// $microformat-abbr-font-weight: $font-weight-bold; +// $microformat-abbr-font-decoration: none; + +// 01. Accordion +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-accordion-classes: $include-html-classes; + +// $accordion-navigation-padding: rem-calc(16); +// $accordion-navigation-bg-color: $silver ; +// $accordion-navigation-hover-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -5%); +// $accordion-navigation-active-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -3%); +// $accordion-navigation-font-color: $jet; +// $accordion-navigation-font-size: rem-calc(16); +// $accordion-navigation-font-family: $body-font-family; + +// $accordion-content-padding: $column-gutter/2; +// $accordion-content-active-bg-color: $white; + +// 02. Alert Boxes +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-alert-classes: $include-html-classes; + +// We use this to control alert padding. +// $alert-padding-top: rem-calc(14); +// $alert-padding-default-float: $alert-padding-top; +// $alert-padding-opposite-direction: $alert-padding-top + rem-calc(10); +// $alert-padding-bottom: $alert-padding-top; + +// We use these to control text style. +// $alert-font-weight: $font-weight-normal; +// $alert-font-size: rem-calc(13); +// $alert-font-color: $white; +// $alert-font-color-alt: scale-color($secondary-color, $lightness: -66%); + +// We use this for close hover effect. +// $alert-function-factor: -14%; + +// We use these to control border styles. +// $alert-border-style: solid; +// $alert-border-width: 1px; +// $alert-border-color: scale-color($primary-color, $lightness: $alert-function-factor); +// $alert-bottom-margin: rem-calc(20); + +// We use these to style the close buttons +// $alert-close-color: $oil; +// $alert-close-top: 50%; +// $alert-close-position: rem-calc(4); +// $alert-close-font-size: rem-calc(22); +// $alert-close-opacity: 0.3; +// $alert-close-opacity-hover: 0.5; +// $alert-close-padding: 9px 6px 4px; + +// We use this to control border radius +// $alert-radius: $global-radius; + +// We use this to control transition effects +// $alert-transition-speed: 300ms; +// $alert-transition-ease: ease-out; + +// 03. Block Grid +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-block-grid-classes: $include-html-classes; +// $include-xl-html-block-grid-classes: false; + +// We use this to control the maximum number of block grid elements per row +// $block-grid-elements: 12; +// $block-grid-default-spacing: rem-calc(20); +// $align-block-grid-to-grid: false; + +// Enables media queries for block-grid classes. Set to false if writing semantic HTML. +// $block-grid-media-queries: true; + +// 04. Breadcrumbs +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-nav-classes: $include-html-classes; + +// We use this to set the background color for the breadcrumb container. +// $crumb-bg: scale-color($secondary-color, $lightness: 55%); + +// We use these to set the padding around the breadcrumbs. +// $crumb-padding: rem-calc(9 14 9); +// $crumb-side-padding: rem-calc(12); + +// We use these to control border styles. +// $crumb-function-factor: -10%; +// $crumb-border-size: 1px; +// $crumb-border-style: solid; +// $crumb-border-color: scale-color($crumb-bg, $lightness: $crumb-function-factor); +// $crumb-radius: $global-radius; + +// We use these to set various text styles for breadcrumbs. +// $crumb-font-size: rem-calc(11); +// $crumb-font-color: $primary-color; +// $crumb-font-color-current: $oil; +// $crumb-font-color-unavailable: $aluminum; +// $crumb-font-transform: uppercase; +// $crumb-link-decor: underline; + +// We use these to control the slash between breadcrumbs +// $crumb-slash-color: $base; +// $crumb-slash: "/"; + +// 05. Buttons +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-button-classes: $include-html-classes; + +// We use these to build padding for buttons. +// $button-tny: rem-calc(10); +// $button-sml: rem-calc(14); +// $button-med: rem-calc(16); +// $button-lrg: rem-calc(18); + +// We use this to control the display property. +// $button-display: inline-block; +// $button-margin-bottom: rem-calc(20); + +// We use these to control button text styles. +// $button-font-family: $body-font-family; +// $button-font-color: $white; +// $button-font-color-alt: $oil; +// $button-font-tny: rem-calc(11); +// $button-font-sml: rem-calc(13); +// $button-font-med: rem-calc(16); +// $button-font-lrg: rem-calc(20); +// $button-font-weight: $font-weight-normal; +// $button-font-align: center; + +// We use these to control various hover effects. +// $button-function-factor: -20%; + +// We use these to control button border and hover styles. +// $button-border-width: 0px; +// $button-border-style: solid; +// $button-bg-color: $primary-color; +// $button-bg-hover: scale-color($button-bg-color, $lightness: $button-function-factor); +// $button-border-color: $button-bg-hover; +// $secondary-button-bg-hover: scale-color($secondary-color, $lightness: $button-function-factor); +// $secondary-button-border-color: $secondary-button-bg-hover; +// $success-button-bg-hover: scale-color($success-color, $lightness: $button-function-factor); +// $success-button-border-color: $success-button-bg-hover; +// $alert-button-bg-hover: scale-color($alert-color, $lightness: $button-function-factor); +// $alert-button-border-color: $alert-button-bg-hover; + +// We use this to set the default radius used throughout the core. +// $button-radius: $global-radius; +// $button-round: $global-rounded; + +// We use this to set default opacity and cursor for disabled buttons. +// $button-disabled-opacity: 0.7; +// $button-disabled-cursor: $cursor-default-value; + +// 06. Button Groups +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-button-classes: $include-html-classes; + +// Sets the margin for the right side by default, and the left margin if right-to-left direction is used +// $button-bar-margin-opposite: rem-calc(10); +// $button-group-border-width: 1px; + +// 07. Clearing +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-clearing-classes: $include-html-classes; + +// We use these to set the background colors for parts of Clearing. +// $clearing-bg: $oil; +// $clearing-caption-bg: $clearing-bg; +// $clearing-carousel-bg: rgba(51,51,51,0.8); +// $clearing-img-bg: $clearing-bg; + +// We use these to style the close button +// $clearing-close-color: $iron; +// $clearing-close-size: 30px; + +// We use these to style the arrows +// $clearing-arrow-size: 12px; +// $clearing-arrow-color: $clearing-close-color; + +// We use these to style captions +// $clearing-caption-font-color: $iron; +// $clearing-caption-font-size: 0.875em; +// $clearing-caption-padding: 10px 30px 20px; + +// We use these to make the image and carousel height and style +// $clearing-active-img-height: 85%; +// $clearing-carousel-height: 120px; +// $clearing-carousel-thumb-width: 120px; +// $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255); + +// 08. Dropdown +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-dropdown-classes: $include-html-classes; + +// We use these to controls height and width styles. +// $f-dropdown-max-width: 200px; +// $f-dropdown-height: auto; +// $f-dropdown-max-height: none; + +// Used for bottom position +// $f-dropdown-margin-top: 2px; + +// Used for right position +// $f-dropdown-margin-left: $f-dropdown-margin-top; + +// Used for left position +// $f-dropdown-margin-right: $f-dropdown-margin-top; + +// Used for top position +// $f-dropdown-margin-bottom: $f-dropdown-margin-top; + +// We use this to control the background color +// $f-dropdown-bg: $white; + +// We use this to set the border styles for dropdowns. +// $f-dropdown-border-style: solid; +// $f-dropdown-border-width: 1px; +// $f-dropdown-border-color: scale-color($white, $lightness: -20%); + +// We use these to style the triangle pip. +// $f-dropdown-triangle-size: 6px; +// $f-dropdown-triangle-color: $white; +// $f-dropdown-triangle-side-offset: 10px; + +// We use these to control styles for the list elements. +// $f-dropdown-list-style: none; +// $f-dropdown-font-color: $charcoal; +// $f-dropdown-font-size: rem-calc(14); +// $f-dropdown-list-padding: rem-calc(5, 10); +// $f-dropdown-line-height: rem-calc(18); +// $f-dropdown-list-hover-bg: $smoke ; +// $dropdown-mobile-default-float: 0; + +// We use this to control the styles for when the dropdown has custom content. +// $f-dropdown-content-padding: rem-calc(20); + +// Default radius for dropdown. +// $f-dropdown-radius: $global-radius; + + +// 09. Dropdown Buttons +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-button-classes: $include-html-classes; + +// We use these to set the color of the pip in dropdown buttons +// $dropdown-button-pip-color: $white; +// $dropdown-button-pip-color-alt: $oil; + +// $button-pip-tny: rem-calc(6); +// $button-pip-sml: rem-calc(7); +// $button-pip-med: rem-calc(9); +// $button-pip-lrg: rem-calc(11); + +// We use these to style tiny dropdown buttons +// $dropdown-button-padding-tny: $button-pip-tny * 7; +// $dropdown-button-pip-size-tny: $button-pip-tny; +// $dropdown-button-pip-opposite-tny: $button-pip-tny * 3; +// $dropdown-button-pip-top-tny: -$button-pip-tny / 2 + rem-calc(1); + +// We use these to style small dropdown buttons +// $dropdown-button-padding-sml: $button-pip-sml * 7; +// $dropdown-button-pip-size-sml: $button-pip-sml; +// $dropdown-button-pip-opposite-sml: $button-pip-sml * 3; +// $dropdown-button-pip-top-sml: -$button-pip-sml / 2 + rem-calc(1); + +// We use these to style medium dropdown buttons +// $dropdown-button-padding-med: $button-pip-med * 6 + rem-calc(3); +// $dropdown-button-pip-size-med: $button-pip-med - rem-calc(3); +// $dropdown-button-pip-opposite-med: $button-pip-med * 2.5; +// $dropdown-button-pip-top-med: -$button-pip-med / 2 + rem-calc(2); + +// We use these to style large dropdown buttons +// $dropdown-button-padding-lrg: $button-pip-lrg * 5 + rem-calc(3); +// $dropdown-button-pip-size-lrg: $button-pip-lrg - rem-calc(6); +// $dropdown-button-pip-opposite-lrg: $button-pip-lrg * 2.5; +// $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3); + +// 10. Flex Video +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-media-classes: $include-html-classes; + +// We use these to control video container padding and margins +// $flex-video-padding-top: rem-calc(25); +// $flex-video-padding-bottom: 67.5%; +// $flex-video-margin-bottom: rem-calc(16); + +// We use this to control widescreen bottom padding +// $flex-video-widescreen-padding-bottom: 56.34%; + +// 11. Forms +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-form-classes: $include-html-classes; + +// We use this to set the base for lots of form spacing and positioning styles +// $form-spacing: rem-calc(16); + +// We use these to style the labels in different ways +// $form-label-pointer: pointer; +// $form-label-font-size: rem-calc(14); +// $form-label-font-weight: $font-weight-normal; +// $form-label-line-height: 1.5; +// $form-label-font-color: scale-color($black, $lightness: 30%); +// $form-label-small-transform: capitalize; +// $form-label-bottom-margin: 0; +// $input-font-family: inherit; +// $input-font-color: rgba(0,0,0,0.75); +// $input-font-size: rem-calc(14); +// $input-bg-color: $white; +// $input-focus-bg-color: scale-color($white, $lightness: -2%); +// $input-border-color: scale-color($white, $lightness: -20%); +// $input-focus-border-color: scale-color($white, $lightness: -40%); +// $input-border-style: solid; +// $input-border-width: 1px; +// $input-border-radius: $global-radius; +// $input-disabled-bg: $gainsboro; +// $input-disabled-cursor: $cursor-default-value; +// $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + +// We use these to style the fieldset border and spacing. +// $fieldset-border-style: solid; +// $fieldset-border-width: 1px; +// $fieldset-border-color: $gainsboro; +// $fieldset-padding: rem-calc(20); +// $fieldset-margin: rem-calc(18 0); + +// We use these to style the legends when you use them +// $legend-bg: $white; +// $legend-font-weight: $font-weight-bold; +// $legend-padding: rem-calc(0 3); + +// We use these to style the prefix and postfix input elements +// $input-prefix-bg: scale-color($white, $lightness: -5%); +// $input-prefix-border-color: scale-color($white, $lightness: -20%); +// $input-prefix-border-size: 1px; +// $input-prefix-border-type: solid; +// $input-prefix-overflow: hidden; +// $input-prefix-font-color: $oil; +// $input-prefix-font-color-alt: $white; + +// We use this setting to turn on/off HTML5 number spinners (the up/down arrows) +// $input-number-spinners: true; + +// We use these to style the error states for inputs and labels +// $input-error-message-padding: rem-calc(6 9 9); +// $input-error-message-top: -1px; +// $input-error-message-font-size: rem-calc(12); +// $input-error-message-font-weight: $font-weight-normal; +// $input-error-message-font-style: italic; +// $input-error-message-font-color: $white; +// $input-error-message-font-color-alt: $oil; + +// We use this to style the glowing effect of inputs when focused +// $input-include-glowing-effect: true; +// $glowing-effect-fade-time: 0.45s; +// $glowing-effect-color: $input-focus-border-color; + +// Select variables +// $select-bg-color: $ghost; +// $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%); + +// 12. Icon Bar +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// We use these to style the icon-bar and items +// $include-html-icon-bar-classes: $include-html-classes; +// $icon-bar-bg: $oil; +// $icon-bar-font-color: $white; +// $icon-bar-font-size: 1rem; +// $icon-bar-hover-color: $primary-color; +// $icon-bar-icon-color: $white; +// $icon-bar-icon-size: 1.875rem; +// $icon-bar-image-width: 1.875rem; +// $icon-bar-image-height: 1.875rem; +// $icon-bar-active-color: $primary-color; +// $icon-bar-item-padding: 1.25rem; + +// 13. Inline Lists +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-inline-list-classes: $include-html-classes; + +// We use this to control the margins and padding of the inline list. +// $inline-list-top-margin: 0; +// $inline-list-opposite-margin: 0; +// $inline-list-bottom-margin: rem-calc(17); +// $inline-list-default-float-margin: rem-calc(-22); +// $inline-list-default-float-list-margin: rem-calc(22); + +// $inline-list-padding: 0; + +// We use this to control the overflow of the inline list. +// $inline-list-overflow: hidden; + +// We use this to control the list items +// $inline-list-display: block; + +// We use this to control any elements within list items +// $inline-list-children-display: block; + +// 14. Joyride +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-joyride-classes: $include-html-classes; + +// Controlling default Joyride styles +// $joyride-tip-bg: $oil; +// $joyride-tip-default-width: 300px; +// $joyride-tip-padding: rem-calc(18 20 24); +// $joyride-tip-border: solid 1px $charcoal; +// $joyride-tip-radius: 4px; +// $joyride-tip-position-offset: 22px; + +// Here, we're setting the tip font styles +// $joyride-tip-font-color: $white; +// $joyride-tip-font-size: rem-calc(14); +// $joyride-tip-header-weight: $font-weight-bold; + +// This changes the nub size +// $joyride-tip-nub-size: 10px; + +// This adjusts the styles for the timer when its enabled +// $joyride-tip-timer-width: 50px; +// $joyride-tip-timer-height: 3px; +// $joyride-tip-timer-color: $steel; + +// This changes up the styles for the close button +// $joyride-tip-close-color: $monsoon; +// $joyride-tip-close-size: 24px; +// $joyride-tip-close-weight: $font-weight-normal; + +// When Joyride is filling the screen, we use this style for the bg +// $joyride-screenfill: rgba(0,0,0,0.5); + +// 15. Keystrokes +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-keystroke-classes: $include-html-classes; + +// We use these to control text styles. +// $keystroke-font: "Consolas", "Menlo", "Courier", monospace; +// $keystroke-font-size: inherit; +// $keystroke-font-color: $jet; +// $keystroke-font-color-alt: $white; +// $keystroke-function-factor: -7%; + +// We use this to control keystroke padding. +// $keystroke-padding: rem-calc(2 4 0); + +// We use these to control background and border styles. +// $keystroke-bg: scale-color($white, $lightness: $keystroke-function-factor); +// $keystroke-border-style: solid; +// $keystroke-border-width: 1px; +// $keystroke-border-color: scale-color($keystroke-bg, $lightness: $keystroke-function-factor); +// $keystroke-radius: $global-radius; + +// 16. Labels +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-label-classes: $include-html-classes; + +// We use these to style the labels +// $label-padding: rem-calc(4 8 4); +// $label-radius: $global-radius; + +// We use these to style the label text +// $label-font-sizing: rem-calc(11); +// $label-font-weight: $font-weight-normal; +// $label-font-color: $oil; +// $label-font-color-alt: $white; +// $label-font-family: $body-font-family; + +// 17. Magellan +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-magellan-classes: $include-html-classes; + +// $magellan-bg: $white; +// $magellan-padding: 0 !important; + +// 18. Off-canvas +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-off-canvas-classes: $include-html-classes; + +// $tabbar-bg: $oil; +// $tabbar-height: rem-calc(45); +// $tabbar-icon-width: $tabbar-height; +// $tabbar-line-height: $tabbar-height; +// $tabbar-color: $white; +// $tabbar-middle-padding: 0 rem-calc(10); + +// Off Canvas Divider Styles +// $tabbar-right-section-border: solid 1px scale-color($tabbar-bg, $lightness: 13%); +// $tabbar-left-section-border: solid 1px scale-color($tabbar-bg, $lightness: -50%); + +// Off Canvas Tab Bar Headers +// $tabbar-header-color: $white; +// $tabbar-header-weight: $font-weight-bold; +// $tabbar-header-line-height: $tabbar-height; +// $tabbar-header-margin: 0; + +// Off Canvas Menu Variables +// $off-canvas-width: rem-calc(250); +// $off-canvas-bg: $oil; +// $off-canvas-bg-hover: scale-color($tabbar-bg, $lightness: -30%); + +// Off Canvas Menu List Variables +// $off-canvas-label-padding: 0.3rem rem-calc(15); +// $off-canvas-label-color: $aluminum; +// $off-canvas-label-text-transform: uppercase; +// $off-canvas-label-font-size: rem-calc(12); +// $off-canvas-label-font-weight: $font-weight-bold; +// $off-canvas-label-bg: $tuatara; +// $off-canvas-label-border-top: 1px solid scale-color($tuatara, $lightness: 14%); +// $off-canvas-label-border-bottom: none; +// $off-canvas-label-margin:0; +// $off-canvas-link-padding: rem-calc(10, 15); +// $off-canvas-link-color: rgba($white, 0.7); +// $off-canvas-link-border-bottom: 1px solid scale-color($off-canvas-bg, $lightness: -25%); +// $off-canvas-back-bg: $tuatara; +// $off-canvas-back-border-top: $off-canvas-label-border-top; +// $off-canvas-back-border-bottom: $off-canvas-label-border-bottom; +// $off-canvas-back-hover-bg: scale-color($off-canvas-back-bg, $lightness: -30%); +// $off-canvas-back-hover-border-top: 1px solid scale-color($off-canvas-label-bg, $lightness: 14%); +// $off-canvas-back-hover-border-bottom: none; + +// Off Canvas Menu Icon Variables +// $tabbar-menu-icon-color: $white; +// $tabbar-menu-icon-hover: scale-color($tabbar-menu-icon-color, $lightness: -30%); + +// $tabbar-menu-icon-text-indent: rem-calc(35); +// $tabbar-menu-icon-width: $tabbar-height; +// $tabbar-menu-icon-height: $tabbar-height; +// $tabbar-menu-icon-padding: 0; + +// $tabbar-hamburger-icon-width: rem-calc(16); +// $tabbar-hamburger-icon-left: false; +// $tabbar-hamburger-icon-top: false; +// $tabbar-hamburger-icon-thickness: 1px; +// $tabbar-hamburger-icon-gap: 6px; + +// Off Canvas Back-Link Overlay +// $off-canvas-overlay-transition: background 300ms ease; +// $off-canvas-overlay-cursor: pointer; +// $off-canvas-overlay-box-shadow: -4px 0 4px rgba($black, 0.5), 4px 0 4px rgba($black, 0.5); +// $off-canvas-overlay-background: rgba($white, 0.2); +// $off-canvas-overlay-background-hover: rgba($white, 0.05); + +// Transition Variables +// $menu-slide: "transform 500ms ease"; + +// 19. Orbit +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-orbit-classes: $include-html-classes; + +// We use these to control the caption styles +// $orbit-container-bg: none; +// $orbit-caption-bg: rgba(51,51,51, 0.8); +// $orbit-caption-font-color: $white; +// $orbit-caption-font-size: rem-calc(14); +// $orbit-caption-position: "bottom"; // Supported values: "bottom", "under" +// $orbit-caption-padding: rem-calc(10 14); +// $orbit-caption-height: auto; + +// We use these to control the left/right nav styles +// $orbit-nav-bg: transparent; +// $orbit-nav-bg-hover: rgba(0,0,0,0.3); +// $orbit-nav-arrow-color: $white; +// $orbit-nav-arrow-color-hover: $white; + +// We use these to control the timer styles +// $orbit-timer-bg: rgba(255,255,255,0.3); +// $orbit-timer-show-progress-bar: true; + +// We use these to control the bullet nav styles +// $orbit-bullet-nav-color: $iron; +// $orbit-bullet-nav-color-active: $aluminum; +// $orbit-bullet-radius: rem-calc(9); + +// We use these to controls the style of slide numbers +// $orbit-slide-number-bg: rgba(0,0,0,0); +// $orbit-slide-number-font-color: $white; +// $orbit-slide-number-padding: rem-calc(5); + +// Hide controls on small +// $orbit-nav-hide-for-small: true; +// $orbit-bullet-hide-for-small: true; +// $orbit-timer-hide-for-small: true; + +// Graceful Loading Wrapper and preloader +// $wrapper-class: "slideshow-wrapper"; +// $preloader-class: "preloader"; + +// 20. Pagination +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-pagination-classes: $include-html-classes; + +// We use these to control the pagination container +// $pagination-height: rem-calc(24); +// $pagination-margin: rem-calc(-5); + +// We use these to set the list-item properties +// $pagination-li-float: $default-float; +// $pagination-li-height: rem-calc(24); +// $pagination-li-font-color: $jet; +// $pagination-li-font-size: rem-calc(14); +// $pagination-li-margin: rem-calc(5); + +// We use these for the pagination anchor links +// $pagination-link-pad: rem-calc(1 10 1); +// $pagination-link-font-color: $aluminum; +// $pagination-link-active-bg: scale-color($white, $lightness: -10%); + +// We use these for disabled anchor links +// $pagination-link-unavailable-cursor: default; +// $pagination-link-unavailable-font-color: $aluminum; +// $pagination-link-unavailable-bg-active: transparent; + +// We use these for currently selected anchor links +// $pagination-link-current-background: $primary-color; +// $pagination-link-current-font-color: $white; +// $pagination-link-current-font-weight: $font-weight-bold; +// $pagination-link-current-cursor: default; +// $pagination-link-current-active-bg: $primary-color; + +// 21. Panels +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-panel-classes: $include-html-classes; + +// We use these to control the background and border styles +// $panel-bg: scale-color($white, $lightness: -5%); +// $panel-border-style: solid; +// $panel-border-size: 1px; + +// We use this % to control how much we darken things on hover +// $panel-function-factor: -11%; +// $panel-border-color: scale-color($panel-bg, $lightness: $panel-function-factor); + +// We use these to set default inner padding and bottom margin +// $panel-margin-bottom: rem-calc(20); +// $panel-padding: rem-calc(20); + +// We use these to set default font colors +// $panel-font-color: $oil; +// $panel-font-color-alt: $white; + +// $panel-header-adjust: true; +// $callout-panel-link-color: $primary-color; + +// 22. Pricing Tables +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-pricing-classes: $include-html-classes; + +// We use this to control the border color +// $price-table-border: solid 1px $gainsboro; + +// We use this to control the bottom margin of the pricing table +// $price-table-margin-bottom: rem-calc(20); + +// We use these to control the title styles +// $price-title-bg: $oil; +// $price-title-padding: rem-calc(15 20); +// $price-title-align: center; +// $price-title-color: $smoke; +// $price-title-weight: $font-weight-normal; +// $price-title-size: rem-calc(16); +// $price-title-font-family: $body-font-family; + +// We use these to control the price styles +// $price-money-bg: $vapor ; +// $price-money-padding: rem-calc(15 20); +// $price-money-align: center; +// $price-money-color: $oil; +// $price-money-weight: $font-weight-normal; +// $price-money-size: rem-calc(32); +// $price-money-font-family: $body-font-family; + +// We use these to control the description styles +// $price-bg: $white; +// $price-desc-color: $monsoon; +// $price-desc-padding: rem-calc(15); +// $price-desc-align: center; +// $price-desc-font-size: rem-calc(12); +// $price-desc-weight: $font-weight-normal; +// $price-desc-line-height: 1.4; +// $price-desc-bottom-border: dotted 1px $gainsboro; + +// We use these to control the list item styles +// $price-item-color: $oil; +// $price-item-padding: rem-calc(15); +// $price-item-align: center; +// $price-item-font-size: rem-calc(14); +// $price-item-weight: $font-weight-normal; +// $price-item-bottom-border: dotted 1px $gainsboro; + +// We use these to control the CTA area styles +// $price-cta-bg: $white; +// $price-cta-align: center; +// $price-cta-padding: rem-calc(20 20 0); + +// 23. Progress Bar +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-media-classes: $include-html-classes; + +// We use this to set the progress bar height +// $progress-bar-height: rem-calc(25); +// $progress-bar-color: $vapor ; + +// We use these to control the border styles +// $progress-bar-border-color: scale-color($white, $lightness: 20%); +// $progress-bar-border-size: 1px; +// $progress-bar-border-style: solid; +// $progress-bar-border-radius: $global-radius; + +// We use these to control the margin & padding +// $progress-bar-pad: rem-calc(2); +// $progress-bar-margin-bottom: rem-calc(10); + +// We use these to set the meter colors +// $progress-meter-color: $primary-color; +// $progress-meter-secondary-color: $secondary-color; +// $progress-meter-success-color: $success-color; +// $progress-meter-alert-color: $alert-color; + +// 24. Range Slider +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-range-slider-classes: $include-html-classes; + +// These variables define the slider bar styles +// $range-slider-bar-width: 100%; +// $range-slider-bar-height: rem-calc(16); + +// $range-slider-bar-border-width: 1px; +// $range-slider-bar-border-style: solid; +// $range-slider-bar-border-color: $gainsboro; +// $range-slider-radius: $global-radius; +// $range-slider-round: $global-rounded; +// $range-slider-bar-bg-color: $ghost; + +// Vertical bar styles +// $range-slider-vertical-bar-width: rem-calc(16); +// $range-slider-vertical-bar-height: rem-calc(200); + +// These variables define the slider handle styles +// $range-slider-handle-width: rem-calc(32); +// $range-slider-handle-height: rem-calc(22); +// $range-slider-handle-position-top: rem-calc(-5); +// $range-slider-handle-bg-color: $primary-color; +// $range-slider-handle-border-width: 1px; +// $range-slider-handle-border-style: solid; +// $range-slider-handle-border-color: none; +// $range-slider-handle-radius: $global-radius; +// $range-slider-handle-round: $global-rounded; +// $range-slider-handle-bg-hover-color: scale-color($primary-color, $lightness: -12%); +// $range-slider-handle-cursor: pointer; + +// 25. Reveal +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-reveal-classes: $include-html-classes; + +// We use these to control the style of the reveal overlay. +// $reveal-overlay-bg: rgba($black, .45); +// $reveal-overlay-bg-old: $black; + +// We use these to control the style of the modal itself. +// $reveal-modal-bg: $white; +// $reveal-position-top: rem-calc(100); +// $reveal-default-width: 80%; +// $reveal-max-width: $row-width; +// $reveal-modal-padding: rem-calc(20); +// $reveal-box-shadow: 0 0 10px rgba($black,.4); + +// We use these to style the reveal close button +// $reveal-close-font-size: rem-calc(40); +// $reveal-close-top: rem-calc(8); +// $reveal-close-side: rem-calc(11); +// $reveal-close-color: $base; +// $reveal-close-weight: $font-weight-bold; + +// We use this to set the default radius used throughout the core. +// $reveal-radius: $global-radius; +// $reveal-round: $global-rounded; + +// We use these to control the modal border +// $reveal-border-style: solid; +// $reveal-border-width: 1px; +// $reveal-border-color: $steel; + +// $reveal-modal-class: "reveal-modal"; +// $close-reveal-modal-class: "close-reveal-modal"; + +// 26. Side Nav +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-nav-classes: $include-html-classes; + +// We use this to control padding. +// $side-nav-padding: rem-calc(14 0); + +// We use these to control list styles. +// $side-nav-list-type: none; +// $side-nav-list-position: inside; +// $side-nav-list-margin: rem-calc(0 0 7 0); + +// We use these to control link styles. +// $side-nav-link-color: $primary-color; +// $side-nav-link-color-active: scale-color($side-nav-link-color, $lightness: 30%); +// $side-nav-link-color-hover: scale-color($side-nav-link-color, $lightness: 30%); +// $side-nav-link-bg-hover: hsla(0, 0, 0, 0.025); +// $side-nav-link-margin: 0; +// $side-nav-link-padding: rem-calc(7 14); +// $side-nav-font-size: rem-calc(14); +// $side-nav-font-weight: $font-weight-normal; +// $side-nav-font-weight-active: $side-nav-font-weight; +// $side-nav-font-family: $body-font-family; +// $side-nav-font-family-active: $side-nav-font-family; + +// We use these to control heading styles. +// $side-nav-heading-color: $side-nav-link-color; +// $side-nav-heading-font-size: $side-nav-font-size; +// $side-nav-heading-font-weight: bold; +// $side-nav-heading-text-transform: uppercase; + +// We use these to control border styles +// $side-nav-divider-size: 1px; +// $side-nav-divider-style: solid; +// $side-nav-divider-color: scale-color($white, $lightness: 10%); + +// 27. Split Buttons +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-button-classes: $include-html-classes; + +// We use these to control different shared styles for Split Buttons +// $split-button-function-factor: 10%; +// $split-button-pip-color: $white; +// $split-button-pip-color-alt: $oil; +// $split-button-active-bg-tint: rgba(0,0,0,0.1); + +// We use these to control tiny split buttons +// $split-button-padding-tny: $button-pip-tny * 10; +// $split-button-span-width-tny: $button-pip-tny * 6; +// $split-button-pip-size-tny: $button-pip-tny; +// $split-button-pip-top-tny: $button-pip-tny * 2; +// $split-button-pip-default-float-tny: rem-calc(-6); + +// We use these to control small split buttons +// $split-button-padding-sml: $button-pip-sml * 10; +// $split-button-span-width-sml: $button-pip-sml * 6; +// $split-button-pip-size-sml: $button-pip-sml; +// $split-button-pip-top-sml: $button-pip-sml * 1.5; +// $split-button-pip-default-float-sml: rem-calc(-6); + +// We use these to control medium split buttons +// $split-button-padding-med: $button-pip-med * 9; +// $split-button-span-width-med: $button-pip-med * 5.5; +// $split-button-pip-size-med: $button-pip-med - rem-calc(3); +// $split-button-pip-top-med: $button-pip-med * 1.5; +// $split-button-pip-default-float-med: rem-calc(-6); + +// We use these to control large split buttons +// $split-button-padding-lrg: $button-pip-lrg * 8; +// $split-button-span-width-lrg: $button-pip-lrg * 5; +// $split-button-pip-size-lrg: $button-pip-lrg - rem-calc(6); +// $split-button-pip-top-lrg: $button-pip-lrg + rem-calc(5); +// $split-button-pip-default-float-lrg: rem-calc(-6); + +// 28. Sub Nav +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-nav-classes: $include-html-classes; + +// We use these to control margin and padding +// $sub-nav-list-margin: rem-calc(-4 0 18); +// $sub-nav-list-padding-top: rem-calc(4); + +// We use this to control the definition +// $sub-nav-font-family: $body-font-family; +// $sub-nav-font-size: rem-calc(14); +// $sub-nav-font-color: $aluminum; +// $sub-nav-font-weight: $font-weight-normal; +// $sub-nav-text-decoration: none; +// $sub-nav-padding: rem-calc(3 16); +// $sub-nav-border-radius: 3px; +// $sub-nav-font-color-hover: scale-color($sub-nav-font-color, $lightness: -25%); + +// We use these to control the active item styles +// $sub-nav-active-font-weight: $font-weight-normal; +// $sub-nav-active-bg: $primary-color; +// $sub-nav-active-bg-hover: scale-color($sub-nav-active-bg, $lightness: -14%); +// $sub-nav-active-color: $white; +// $sub-nav-active-padding: $sub-nav-padding; +// $sub-nav-active-cursor: default; + +// $sub-nav-item-divider: ""; +// $sub-nav-item-divider-margin: rem-calc(12); + +// 29. Switch +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-form-classes: $include-html-classes; + +// Controlling border styles and background colors for the switch container +// $switch-border-color: scale-color($white, $lightness: -20%); +// $switch-border-style: solid; +// $switch-border-width: 1px; +// $switch-bg: $white; + +// We use these to control the switch heights for our default classes +// $switch-height-tny: rem-calc(22); +// $switch-height-sml: rem-calc(28); +// $switch-height-med: rem-calc(36); +// $switch-height-lrg: rem-calc(44); +// $switch-bottom-margin: rem-calc(20); + +// We use these to control default font sizes for our classes. +// $switch-font-size-tny: 11px; +// $switch-font-size-sml: 12px; +// $switch-font-size-med: 14px; +// $switch-font-size-lrg: 17px; +// $switch-label-side-padding: 6px; + +// We use these to style the switch-paddle +// $switch-paddle-bg: $white; +// $switch-paddle-fade-to-color: scale-color($switch-paddle-bg, $lightness: -10%); +// $switch-paddle-border-color: scale-color($switch-paddle-bg, $lightness: -35%); +// $switch-paddle-border-width: 1px; +// $switch-paddle-border-style: solid; +// $switch-paddle-transition-speed: .1s; +// $switch-paddle-transition-ease: ease-out; +// $switch-positive-color: scale-color($success-color, $lightness: 94%); +// $switch-negative-color: $white-smoke; + +// Outline Style for tabbing through switches +// $switch-label-outline: 1px dotted $jumbo; + +// 30. Tables +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-table-classes: $include-html-classes; + +// These control the background color for the table and even rows +// $table-bg: $white; +// $table-even-row-bg: $snow ; + +// These control the table cell border style +// $table-border-style: solid; +// $table-border-size: 1px; +// $table-border-color: $gainsboro; + +// These control the table head styles +// $table-head-bg: $white-smoke ; +// $table-head-font-size: rem-calc(14); +// $table-head-font-color: $jet; +// $table-head-font-weight: $font-weight-bold; +// $table-head-padding: rem-calc(8 10 10); + +// These control the row padding and font styles +// $table-row-padding: rem-calc(9 10); +// $table-row-font-size: rem-calc(14); +// $table-row-font-color: $jet; +// $table-line-height: rem-calc(18); + +// These are for controlling the layout, display and margin of tables +// $table-layout: auto; +// $table-display: table-cell; +// $table-margin-bottom: rem-calc(20); + +// 31. Tabs +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-tabs-classes: $include-html-classes; + +// $tabs-navigation-padding: rem-calc(16); +// $tabs-navigation-bg-color: $silver ; +// $tabs-navigation-active-bg-color: $white; +// $tabs-navigation-hover-bg-color: scale-color($tabs-navigation-bg-color, $lightness: -6%); +// $tabs-navigation-font-color: $jet; +// $tabs-navigation-active-font-color: $tabs-navigation-font-color; +// $tabs-navigation-font-size: rem-calc(16); +// $tabs-navigation-font-family: $body-font-family; + +// $tabs-content-margin-bottom: rem-calc(24); +// $tabs-content-padding: $column-gutter/2; + +// $tabs-vertical-navigation-margin-bottom: 1.25rem; + +// 32. Thumbnails +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-media-classes: $include-html-classes; + +// We use these to control border styles +// $thumb-border-style: solid; +// $thumb-border-width: 4px; +// $thumb-border-color: $white; +// $thumb-box-shadow: 0 0 0 1px rgba($black,.2); +// $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5); + +// Radius and transition speed for thumbs +// $thumb-radius: $global-radius; +// $thumb-transition-speed: 200ms; + +// 33. Tooltips +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-tooltip-classes: $include-html-classes; + +// $has-tip-border-bottom: dotted 1px $iron; +// $has-tip-font-weight: $font-weight-bold; +// $has-tip-font-color: $oil; +// $has-tip-border-bottom-hover: dotted 1px scale-color($primary-color, $lightness: -55%); +// $has-tip-font-color-hover: $primary-color; +// $has-tip-cursor-type: help; + +// $tooltip-padding: rem-calc(12); +// $tooltip-bg: $oil; +// $tooltip-font-size: rem-calc(14); +// $tooltip-font-weight: $font-weight-normal; +// $tooltip-font-color: $white; +// $tooltip-line-height: 1.3; +// $tooltip-close-font-size: rem-calc(10); +// $tooltip-close-font-weight: $font-weight-normal; +// $tooltip-close-font-color: $monsoon; +// $tooltip-font-size-sml: rem-calc(14); +// $tooltip-radius: $global-radius; +// $tooltip-rounded: $global-rounded; +// $tooltip-pip-size: 5px; +// $tooltip-max-width: 300px; + +// 34. Top Bar +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-top-bar-classes: $include-html-classes; + +// Background color for the top bar +// $topbar-bg-color: $oil; +// $topbar-bg: $topbar-bg-color; + +// Height and margin +// $topbar-height: 45px; +// $topbar-margin-bottom: 0; + +// Controlling the styles for the title in the top bar +// $topbar-title-weight: $font-weight-normal; +// $topbar-title-font-size: rem-calc(17); + +// Style the top bar dropdown elements +// $topbar-dropdown-bg: $oil; +// $topbar-dropdown-link-color: $white; +// $topbar-dropdown-link-bg: $oil; +// $topbar-dropdown-link-weight: $font-weight-normal; +// $topbar-dropdown-toggle-size: 5px; +// $topbar-dropdown-toggle-color: $white; +// $topbar-dropdown-toggle-alpha: 0.4; + +// Set the link colors and styles for top-level nav +// $topbar-link-color: $white; +// $topbar-link-color-hover: $white; +// $topbar-link-color-active: $white; +// $topbar-link-color-active-hover: $white; +// $topbar-link-weight: $font-weight-normal; +// $topbar-link-font-size: rem-calc(13); +// $topbar-link-hover-lightness: -10%; // Darken by 10% +// $topbar-link-bg: $topbar-bg; +// $topbar-link-bg-color-hover: $charcoal; +// $topbar-link-bg-hover: #272727; +// $topbar-link-bg-active: $primary-color; +// $topbar-link-bg-active-hover: scale-color($primary-color, $lightness: -14%); +// $topbar-link-font-family: $body-font-family; +// $topbar-link-text-transform: none; +// $topbar-link-padding: $topbar-height / 3; +// $topbar-back-link-size: $h5-font-size; +// $topbar-link-dropdown-padding: 20px; + +// $topbar-button-font-size: 0.75rem; +// $topbar-button-top: 7px; + +// $topbar-dropdown-label-color: $monsoon; +// $topbar-dropdown-label-text-transform: uppercase; +// $topbar-dropdown-label-font-weight: $font-weight-bold; +// $topbar-dropdown-label-font-size: rem-calc(10); +// $topbar-dropdown-label-bg: $oil; + +// Top menu icon styles +// $topbar-menu-link-transform: uppercase; +// $topbar-menu-link-font-size: rem-calc(13); +// $topbar-menu-link-weight: $font-weight-bold; +// $topbar-menu-link-color: $white; +// $topbar-menu-icon-color: $white; +// $topbar-menu-link-color-toggled: $jumbo; +// $topbar-menu-icon-color-toggled: $jumbo; + +// Transitions and breakpoint styles +// $topbar-transition-speed: 300ms; +// Using rem-calc for the below breakpoint causes issues with top bar +// $topbar-breakpoint: #{lower-bound($medium-range)}; // Change to 9999px for always mobile layout +// $topbar-media-query: $medium-up; + +// Divider Styles +// $topbar-divider-border-bottom: solid 1px scale-color($topbar-bg-color, $lightness: 13%); +// $topbar-divider-border-top: solid 1px scale-color($topbar-bg-color, $lightness: -50%); + +// Sticky Class +// $topbar-sticky-class: ".sticky"; +// $topbar-arrows: true; //Set false to remove the triangle icon from the menu item + +// 36. Visibility Classes +// - - - - - - - - - - - - - - - - - - - - - - - - - + +// $include-html-visibility-classes: $include-html-classes; +// $include-table-visibility-classes: true; +// $include-legacy-visibility-classes: true; +// $include-accessibility-classes: true; + +// ---------- override Foundation defaults -------- + + +/* TODO: Make colors themable - e.g. Ubuntu has brown and SuSE has green */ +$debian_color: #c70338; +$primary-color: $debian_color; + +// Larger top bar +$topbar-height: 60px; +// Larger font in top bar +$topbar-link-font-size: rem-calc(20); + +$topbar-button-font-size: 1rem; +$topbar-button-top: 14px; + +$topbar-link-padding: 8px; + +// At which width the top navigation bar should be switched to +// mobile mode because otherwise it would wrap into two lines. +$topbar-breakpoint: 800px; +$topbar-media-query: "only screen and (min-width: #{$topbar-breakpoint})"; + +// Import Google font +@import url(http://fonts.googleapis.com/css?family=Droid+Sans:400,700); +$body-font-family: "Droid Sans"; + +$button-tny: 0.3rem; +$button-font-tny: 0.9rem; + +// Make the background of progress bars use a light version of the primary color +$progress-bar-color: tint($primary-color, 80); + +// Enable special grid and block-grid sizes for xlarge and xxlarge screens +/*$include-xl-html-grid-classes: true;*/ +/*$include-xl-html-block-grid-classes: true;*/ +/*$row-width: 100%;*/ + +@import 'foundation'; diff --git a/app/assets/stylesheets/my.css.scss b/app/assets/stylesheets/my.css.scss index 9b4d3d3..199dbd5 100644 --- a/app/assets/stylesheets/my.css.scss +++ b/app/assets/stylesheets/my.css.scss @@ -1,78 +1,288 @@ -div.thumbnail + +// -------------- debshots --------------------------- + +$page-background: #f2f2f2; +$footer-background: #333333; +$footer-text-color: #b3b3b3; + +body { - /*width: 200px;*/ - height: 210px; - margin-bottom: 5px; + background-color: $page-background; } -/* Package name in thumbnails view */ -.thumbnail h3 +#teaser { - font-size: 18px; + // Leave some space between topbar and teaser on the home page + padding-top: 20px; + + h1 + { + // Larger "We have screenshots!" teaser title + font-weight: 700; + } +} + +.top-bar .name +{ + // Display the site name in a larger font + font-size: 26px; + padding: 8px 5px 3px 0; + color: #babdb6; + + // Extra space around the Linux distribution's logo + img + { + padding: 0 5px; + } +} + +header +{ + // Draw a colored line below the navigation topbar + border-bottom: 5px solid $debian_color; +} + +// ------- Footer - format as table cell to allow vertical centering +/*@import "compass/layout/sticky-footer";*/ +/*@include sticky-footer(40px, "#wholepage");*/ + +html, body { + height: 100%; +} + +// Wrapper that makes the page 100% high so the start page looks entirely filled +#wholepage +{ + height: 100%; +} + +#footer +{ + background-color: $footer-background; + display: table; + width: 100%; + + p + { + display: table-cell; + padding: 0 20px; + color: $footer-text-color; + vertical-align: middle; text-align: center; - white-space: nowrap; - overflow: hidden; - margin-top: 8px; - margin-bottom: 5px; + font-size: 80%; + } + + a + { + color: $footer-text-color; + font-weight: bolder; + } } -/* Package description in thumbnails view */ -.thumbnail p + +// Leave some room after the topbar +#content { - text-align: center; + padding-top: 5px; } -/* Pagination is shown in top bar. Reduce margin to avoid making the nav bar larger. */ -ul.pagination -{ - margin: 8px 16px; -} - -/* Make paginator a bit narrower to save space */ -ul.pagination li a -{ - padding-left: 6px; - padding-right: 6px; -} - -/* Top bar is fixed. Move main part down so the bar does not hide it. */ -.container-main -{ - margin-top: 60px; -} - -/* Waste less space above and below pagers */ -.pager -{ - margin: 10px 0; -} - -/* Waste less space between/below the navbar and the main container */ -.navbar -{ - margin-bottom: 10px; -} - -/* Make sure that the description of a package does not flow outside of the thumbnail box */ +// Screenshot thumbnail image with name and description .thumbnail { - overflow: hidden; + padding-bottom: 10px; + text-align: center; + line-height: 120%; + + .pkgname + { + font-weight: 700; + } + .pkgdescription + { + font-size: 80%; + } } -.pkgdescr +// Vertical icon bar in package view +#sidebar { - text-overflow: ellipsis; + text-align: center; + + // Text over a group of icons + .caption + { + padding-bottom: 5px; + color: black; + } + + // An icon + .item + { + padding-bottom: 10px; + } + + // Leave space after the last icon in a group + .space + { + padding-bottom: 20px; + } } - -a.fancybox.thumbnail +// List view +.row .listview { - border: none; + // Leave vertical space and draw a line between package rows + border-bottom: 2px solid #d0d0d0; + padding-bottom: 20px; + margin-bottom: 20px; + + img.screenshot + { + width: 100%; + } } - -/* Disable resonsiveness in Twitter Bootstrap CSS */ -.container +.row .gridview { - width: 1200px !important; + img.screenshot + { + width: 100%; + } +} + +.pkgname +{ + font-size: 150%; + font-weight: 700; + padding-bottom: 5px; +} + + +.pkgdetails +{ + .description + { + font-size: 150%; + color: #808080; + padding-bottom: 10px; + } + + .longdescription + { + font-size: 90%; + line-height: 120%; + padding-bottom: 5px; + } + + .rating + { + padding-top: 5px; + vertical-align: bottom; + } + + .commentcount + { + padding-left: 20px; + } +} + +.grid-thumbnail +{ + height: 125px; +} + +// Avoid painting links to detail packages in the primary color +a.black +{ + color: black; +} + +.gray +{ + color: #808080; +} + +.detailpage +{ + h1 + { + margin-bottom: 0; + } + + .subtitle + { + font-size: 120%; + color: #808080; + } + + .imgcaption + { + text-align: center; + } + + .longdescription + { + background-color: white; + border-radius: 10px; + padding: 1em 1em 0.1em 1em; + } + + .comment + { + font-size: 90%; + + .summary + { + font-weight: 700; + } + + .author + { + text-align: right; + color: #808080; + font-style: italic; + } + } + + form.comment + { + border: 2px solid #a0a0a0; + background-color: white; + border-radius: 10px; + padding: 10px; + margin-bottom: 10px; + + .summary input,textarea + { + margin-bottom: 0; + } + + // Hide most elements in a comment input form. + // They get shown once the summary field is typed into. + .content,.author,.submit + { + display: none; + } + } +} + +.ratingbar +{ + background-color: $progress-bar-color; + width: 10em; + display: inline-block; + padding: 2px; + text-align: left; + color: white; + text-transform: uppercase; + font-size: 0.8rem; + font-weight: bolder; + + .meter + { + background-color: $primary-color; + padding: 2px; + padding-left: 0.4rem; + text-shadow: 0 0 2px black; + } } diff --git a/app/assets/stylesheets/xxmy.css.scss b/app/assets/stylesheets/xxmy.css.scss new file mode 100644 index 0000000..9b4d3d3 --- /dev/null +++ b/app/assets/stylesheets/xxmy.css.scss @@ -0,0 +1,78 @@ +div.thumbnail +{ + /*width: 200px;*/ + height: 210px; + margin-bottom: 5px; +} + +/* Package name in thumbnails view */ +.thumbnail h3 +{ + font-size: 18px; + text-align: center; + white-space: nowrap; + overflow: hidden; + margin-top: 8px; + margin-bottom: 5px; +} + +/* Package description in thumbnails view */ +.thumbnail p +{ + text-align: center; +} + +/* Pagination is shown in top bar. Reduce margin to avoid making the nav bar larger. */ +ul.pagination +{ + margin: 8px 16px; +} + +/* Make paginator a bit narrower to save space */ +ul.pagination li a +{ + padding-left: 6px; + padding-right: 6px; +} + +/* Top bar is fixed. Move main part down so the bar does not hide it. */ +.container-main +{ + margin-top: 60px; +} + +/* Waste less space above and below pagers */ +.pager +{ + margin: 10px 0; +} + +/* Waste less space between/below the navbar and the main container */ +.navbar +{ + margin-bottom: 10px; +} + +/* Make sure that the description of a package does not flow outside of the thumbnail box */ +.thumbnail +{ + overflow: hidden; +} + +.pkgdescr +{ + text-overflow: ellipsis; +} + + +a.fancybox.thumbnail +{ + border: none; +} + + +/* Disable resonsiveness in Twitter Bootstrap CSS */ +.container +{ + width: 1200px !important; +} diff --git a/app/controllers/packages_controller.rb b/app/controllers/packages_controller.rb index f43965c..49fb99c 100644 --- a/app/controllers/packages_controller.rb +++ b/app/controllers/packages_controller.rb @@ -15,6 +15,10 @@ class PackagesController < ApplicationController @packages = @packages.page(params[:page]).per(12) end + def details + @package = Package.find_by(name: params[:name]) + end + def with_screenshots end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index f9b859b..6a57120 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -1,4 +1,14 @@ class WelcomeController < ApplicationController - def index + def home + # TODO: show count depending on virtual host + #@package_count = cache_or_set("debian_pkgcount", :expires => 10 * 60) do + Package.count + #end + + # TODO: Use the package with the actual newest uploaded screenshot + @newest_uploaded_package = Package.with_screenshots.first + + # TODO: Use the actually most popular package and not just a random one + @most_popular_package = Package.with_screenshots.first end end diff --git a/app/models/package.rb b/app/models/package.rb index cfafd72..6a78306 100644 --- a/app/models/package.rb +++ b/app/models/package.rb @@ -5,22 +5,38 @@ class Package < ActiveRecord::Base order('name ASC') } - # Use PostgreSQL's full-text search capability for the user search - def self.text_search(query) - if query.present? - # Add a rank column to each result - rank = <<-RANK - ts_rank(to_tsvector(packages.name), plainto_tsquery(#{sanitize(query)})) - + - ts_rank(to_tsvector(packages.description), plainto_tsquery(#{sanitize(query)})) - RANK - # Do the full-text search and return results by rank - where("to_tsvector('english', packages.name) @@ plainto_tsquery(:q) or - to_tsvector('english', packages.description) @@ plainto_tsquery(:q) - ", q: query).order("#{rank} desc") - else - all - end + # Return a query of all packages that have screenshots + def self.with_screenshots + # Query for all packages who's ID appears in a screenshot's "package_id" field + subselect = Screenshot.select(:package_id) + where(id: subselect ) end + + # Return a query of all packages that have screenshots + def self.without_screenshots + # Query for all packages who's ID does not appear in a screenshot's "package_id" field + subselect = Screenshot.select(:package_id) + where.not(id: subselect) + end + + # Use PostgreSQL's full-text search capability for the user search + # TODO: check if pgSearch does this job for us + #def self.text_search(query) + # if query.present? + # # Add a rank column to each result + # rank = <<-RANK + # ts_rank(to_tsvector(packages.name), plainto_tsquery(#{sanitize(query)})) + # + + # ts_rank(to_tsvector(packages.description), plainto_tsquery(#{sanitize(query)})) + # RANK + # + # # Do the full-text search and return results by rank + # where("to_tsvector('english', packages.name) @@ plainto_tsquery(:q) or + # to_tsvector('english', packages.description) @@ plainto_tsquery(:q) + # ", q: query).order("#{rank} desc") + # else + # all + # end + #end end diff --git a/app/models/screenshot.rb b/app/models/screenshot.rb index 49c1a93..2d248f3 100644 --- a/app/models/screenshot.rb +++ b/app/models/screenshot.rb @@ -8,4 +8,27 @@ class Screenshot < ActiveRecord::Base def image_url(size) "#{Rails.configuration.images_path_prefix}/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png" end + + ## Get the URL leading to a screenshot of this package + #def url(size) + # if self.approved + # # TODO: Make the path configurable + # basepath = "/screenshots/approved/" + # else + # basepath = "/screenshots/unapproved/" + # end + # + # File.join(basepath, self.package.name[0], self.package.name, "#{self.id}_#{size}.png") + #end + # + ## Return caption for full-screen screenshots. + ## Takes the description of a screenshot if available. + ## Otherwise it falls back to the general description of its package. + #def caption + # if self.description != '' + # self.description + # else + # self.package.description + # end + #end end diff --git a/app/views/layouts/_footer.slim b/app/views/layouts/_footer.slim new file mode 100644 index 0000000..c0260c9 --- /dev/null +++ b/app/views/layouts/_footer.slim @@ -0,0 +1,13 @@ +#footer + p + //| DEBUG RESPONSIVE: + //strong.show-for-small-only Small + //strong.show-for-medium-only Medium + //strong.show-for-large-only Large + //strong.show-for-xlarge-only X-Large + //strong.show-for-xxlarge-up XX-Large + // TODO: show feedback form in a modal and send the context (URL, user) along with email + ' This site is operated by Christoph Haas and his debshots web application. Want to leave + a href="mailto:email@christoph-haas.de" feedback? + ' | Kindly hosted by + a href="http://vexxhost.com/" VEXXHOST diff --git a/app/views/layouts/_topbar.slim b/app/views/layouts/_topbar.slim new file mode 100644 index 0000000..fc1de9e --- /dev/null +++ b/app/views/layouts/_topbar.slim @@ -0,0 +1,40 @@ +header + div.contain-to-grid + nav.top-bar data-topbar=true role="navigation" + ul.title-area + // TODO: Make the logo depend on the virtual host + li.name + img src="/images/logos/debian.svg" width="35" alt="Debian logo" + // TODO: Use proper distribution name + 'Debian Screenshots > + // Not enough space for the search… where do we put it? + //li.item + // = form_tag( url(:package, :index), :method=>'get') + // = search_field_tag :search, :placeholder=>'Search…', :autofocus=>true + li.toggle-topbar.menu-icon + a href="#" + span Menu + + section.top-bar-section + ul.right + li class=('active' if controller_name=='welcome') + a href="/" Home + li class=('active' if controller_name=='package') + a href="/packages" Explore + li class=('active' if controller_name=='upload') + a href="/upload" Contribute + li.has-dropdown + a href="#" Distributions + ul.dropdown + // TODO: Use proper distribution list + li + a href="#" Debian + li + a href="#" Ubuntu + li class=('active' if controller_name=='about') + a href="/about" About + li.divider + // TODO: Show link for admin/moderation view if admin is logged in + li.has-form + // TODO: Show "My" when the user is logged in + a.button href="/profile" Login diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 293f868..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,15 +0,0 @@ - - - - Debshots - <%= stylesheet_link_tag "application", media: "all" %> - <%= javascript_include_tag "application", "data-turbolinks-track" => false %> - - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim new file mode 100644 index 0000000..8e3b8a3 --- /dev/null +++ b/app/views/layouts/application.html.slim @@ -0,0 +1,56 @@ +doctype html +html + head + title screenshots.debian.net + / TODO: make title reflect the virtual host (e.g. Debian) + meta charset="utf-8" + meta name="keywords" content="debian screenshots packages applications linux" + meta name="viewport" content="width=device-width, initial-scale=1.0" + / TODO: make the keywords reflect the virtual host (e.g. Debian) + = stylesheet_link_tag "application", media: "all" + = javascript_include_tag "vendor/modernizr" + = stylesheet_link_tag "jquery-fancybox/jquery.fancybox", media: "all" + = stylesheet_link_tag "jquery.raty", media: "all" + = javascript_include_tag 'jquery' + / = javascript_include_tag 'jquery.raty' + + = csrf_meta_tags + + + body + // TODO: move topbar somewhere else than packages + #wholepage + = render 'layouts/topbar' + #content + = yield + = render 'layouts/footer' + = javascript_include_tag "application" + + // Load Javascript libraries + // Initialize Zurb Foundation + javascript: + //$(document).foundation(); + $('.fancybox').fancybox({nextEffect: "none", prevEffect: "none"}); + + // See http://wbotelhos.com/raty + //$('.star-rating').raty({ + // score: 3, + // cancelOff: '/images/raty/cancel-off.png', + // cancelOn: '/images/raty/cancel-on.png', + // starHalf: '/images/raty/star-half.png', + // starOff: '/images/raty/star-off.png', + // starOn: '/images/raty/star-on.png', + // half: true + //}); + // + //$('.star-rating-readonly').raty({ + // score: 3, + // cancelOff: '/images/raty/cancel-off.png', + // cancelOn: '/images/raty/cancel-on.png', + // starHalf: '/images/raty/star-half.png', + // starOff: '/images/raty/star-off.png', + // starOn: '/images/raty/star-on.png', + // readOnly: true, + // halfShow: true, + // score: function() { return $(this).attr('data-score'); } + //}); diff --git a/app/views/packages/_packages_search_results_grid.html.erb b/app/views/packages/xx_packages_search_results_grid.html.erb similarity index 100% rename from app/views/packages/_packages_search_results_grid.html.erb rename to app/views/packages/xx_packages_search_results_grid.html.erb diff --git a/app/views/packages/_packages_search_results_list.html.erb b/app/views/packages/xx_packages_search_results_list.html.erb similarity index 100% rename from app/views/packages/_packages_search_results_list.html.erb rename to app/views/packages/xx_packages_search_results_list.html.erb diff --git a/app/views/packages/index.html.erb b/app/views/packages/xxindex.html.erb similarity index 100% rename from app/views/packages/index.html.erb rename to app/views/packages/xxindex.html.erb diff --git a/app/views/packages/moderate.html.erb b/app/views/packages/xxmoderate.html.erb similarity index 100% rename from app/views/packages/moderate.html.erb rename to app/views/packages/xxmoderate.html.erb diff --git a/app/views/welcome/home.slim b/app/views/welcome/home.slim new file mode 100644 index 0000000..bee64f6 --- /dev/null +++ b/app/views/welcome/home.slim @@ -0,0 +1,61 @@ +#teaser.row + div.large-4.medium-4.small-3.columns + #biglogo + // TODO: make the logo depending on the virtual host + img src="/images/logos/debian.svg" width="400" alt="Debian logo" + div.large-8.medium-8.small-9.columns + h1 We have screenshots! + p + ' Have you ever wondered how a certain piece of software looks + ' and works before spending time installing it? + p + ' This website lets you browse screenshots of + => number_with_delimiter(@package_count) + ' software packages coming with + ' Debian and other Linux distributions. And of course you are encouraged to upload + ' your own screenshots for others to explore. + p + = form_tag(packages_path, method: 'GET') + div.row.collapse.postfix-round + div.small-9.columns + input type="text" name="search" placeholder="Looking for a special software?" autofocus="true" + div.small-3.columns + input.button.postfix type="submit" value="Search" + +div.row + hr + +div.row + div.large-4.medium-12.small-12.columns.text-center + h2 Newest upload + // TODO: load actual newest upload and cache it + // TODO: link to the package page + a.black href=package_path(@newest_uploaded_package.name) + img src=@newest_uploaded_package.screenshots[0].image_url('large') + p + strong + =@newest_uploaded_package.name + ' : + ' + =@newest_uploaded_package.description + div.large-4.medium-12.small-12.columns.text-center + h2 Most popular + // TODO: load actual most popular package and highest-rated screenshot and cache it + // TODO: link to the package page + a.black href=package_path(@most_popular_package.name) + img src=@most_popular_package.screenshots[0].image_url('large') + p + strong + =@most_popular_package.name + ' : + ' + =@most_popular_package.description + div.large-4.medium-12.small-12.columns.text-center + h2 Your help needed + // TODO: load actual most popular package without a screenshot and cache it + a href=upload_package_path('firefox') + img src="/images/dummy/no-screenshots-upload-one.svg" width="80%" + p + ' We lack a screenshot for the Firefox package. Can you + a href=upload_package_path('firefox') provide one + ' ? diff --git a/config/database.yml b/config/database.yml index 1da93bb..187ad98 100644 --- a/config/database.yml +++ b/config/database.yml @@ -18,13 +18,19 @@ development: # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: - adapter: sqlite3 - database: db/test.sqlite3 + adapter: postgresql + database: debshots + username: debshots + password: shootme + host: torf pool: 5 timeout: 5000 production: - adapter: sqlite3 - database: db/production.sqlite3 + adapter: postgresql + database: debshots + username: debshots + password: shootme + host: torf pool: 5 timeout: 5000 diff --git a/config/environments/production.rb b/config/environments/production.rb index 610506d..9ae489a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -20,7 +20,8 @@ Debshots::Application.configure do # config.action_dispatch.rack_cache = true # Disable Rails's static asset server (Apache or nginx will already do this). - config.serve_static_assets = false + # config.serve_static_assets = false + config.serve_static_assets = true # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier @@ -43,7 +44,8 @@ Debshots::Application.configure do # config.force_ssl = true # Set to :debug to see everything in the log. - config.log_level = :info + # config.log_level = :info + config.log_level = :warn # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] @@ -60,6 +62,7 @@ Debshots::Application.configure do # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # config.assets.precompile += %w( search.js ) + config.assets.precompile += %w( vendor/modernizr.js ) # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -77,4 +80,7 @@ Debshots::Application.configure do # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new + + # URL prefix leading to the static images that should get delivered by the web server + config.images_path_prefix = '/screenshots' end diff --git a/config/environments/profile.rb b/config/environments/profile.rb new file mode 100644 index 0000000..24a4595 --- /dev/null +++ b/config/environments/profile.rb @@ -0,0 +1,32 @@ +Debshots::Application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # URL prefix leading to the static images that should get delivered by the web server + config.images_path_prefix = '/screenshots' +end diff --git a/config/environments/test.rb b/config/environments/test.rb index 8d7cd80..bf7a212 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -33,4 +33,7 @@ Debshots::Application.configure do # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr + + # URL prefix leading to the static images that should get delivered by the web server + config.images_path_prefix = '/screenshots' end diff --git a/config/routes.rb b/config/routes.rb index 29da38e..0047953 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,21 +1,26 @@ Debshots::Application.routes.draw do - #get "packages/index" - #get "packages" => "packages#index" - #get "packages/:page/:display" => "packages#index" - get 'packages' => 'packages#index', defaults: { display: 'grid' }, as: :package_list - #get "packages/list" => "packages#index", display: 'list', as: :package_list - get 'packages' => 'packages#index', display: 'grid', as: :package_grid - #get "packages(/:display)", to: "packages#index", defaults: { display: 'grid' } - get 'packages/with_screenshots' - get 'packages/without_screenshots' - get 'packages/moderate' - get 'welcome/index' + ##get "packages/index" + ##get "packages" => "packages#index" + ##get "packages/:page/:display" => "packages#index" + #get 'packages' => 'packages#index', defaults: { display: 'grid' }, as: :package_list + ##get "packages/list" => "packages#index", display: 'list', as: :package_list + #get 'packages' => 'packages#index', display: 'grid', as: :package_grid + ##get "packages(/:display)", to: "packages#index", defaults: { display: 'grid' } + #get 'packages/with_screenshots' + #get 'packages/without_screenshots' + #get 'packages/moderate' + #get 'welcome/index' + + get 'packages' => 'packages#index' + get 'package/:name' => 'packages#details', as: :package + get 'upload/:packagename' => 'packages#upload', as: :upload_package + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" - # root 'welcome#index' - root to: 'packages#index' + root 'welcome#home' + #root to: 'packages#home' # Example of regular route: # get 'products/:id' => 'catalog#view' diff --git a/public/images/sidebar/about.svg b/public/images/sidebar/about.svg new file mode 100644 index 0000000..6b92795 --- /dev/null +++ b/public/images/sidebar/about.svg @@ -0,0 +1,82 @@ + + + + + + + + + + image/svg+xml + + + + + + + + i + + diff --git a/public/images/sidebar/grid0.svg b/public/images/sidebar/grid0.svg new file mode 100644 index 0000000..f2fc550 --- /dev/null +++ b/public/images/sidebar/grid0.svg @@ -0,0 +1,132 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/public/images/sidebar/grid1.svg b/public/images/sidebar/grid1.svg new file mode 100644 index 0000000..68cdfec --- /dev/null +++ b/public/images/sidebar/grid1.svg @@ -0,0 +1,132 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/public/images/sidebar/list0.svg b/public/images/sidebar/list0.svg new file mode 100644 index 0000000..8b9ca94 --- /dev/null +++ b/public/images/sidebar/list0.svg @@ -0,0 +1,90 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/public/images/sidebar/list1.svg b/public/images/sidebar/list1.svg new file mode 100644 index 0000000..994d4a0 --- /dev/null +++ b/public/images/sidebar/list1.svg @@ -0,0 +1,90 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/public/images/sidebar/show-any0.svg b/public/images/sidebar/show-any0.svg new file mode 100644 index 0000000..5529eec --- /dev/null +++ b/public/images/sidebar/show-any0.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + any + + diff --git a/public/images/sidebar/show-any1.svg b/public/images/sidebar/show-any1.svg new file mode 100644 index 0000000..f8714d1 --- /dev/null +++ b/public/images/sidebar/show-any1.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + any + + diff --git a/public/images/sidebar/show-with0.svg b/public/images/sidebar/show-with0.svg new file mode 100644 index 0000000..dd6e095 --- /dev/null +++ b/public/images/sidebar/show-with0.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + with + + diff --git a/public/images/sidebar/show-with1.svg b/public/images/sidebar/show-with1.svg new file mode 100644 index 0000000..e796e44 --- /dev/null +++ b/public/images/sidebar/show-with1.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + with + + diff --git a/public/images/sidebar/show-without0.svg b/public/images/sidebar/show-without0.svg new file mode 100644 index 0000000..7934fa5 --- /dev/null +++ b/public/images/sidebar/show-without0.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + without + + diff --git a/public/images/sidebar/show-without1.svg b/public/images/sidebar/show-without1.svg new file mode 100644 index 0000000..364809e --- /dev/null +++ b/public/images/sidebar/show-without1.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + without + + diff --git a/public/images/sidebar/upload.svg b/public/images/sidebar/upload.svg new file mode 100644 index 0000000..124eac8 --- /dev/null +++ b/public/images/sidebar/upload.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + +