diff --git a/Gemfile b/Gemfile index e87fad5f..bda2cb66 100644 --- a/Gemfile +++ b/Gemfile @@ -3,8 +3,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.7' -# Use sqlite3 as the database for Active Record -gem 'sqlite3' + # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets @@ -35,9 +34,14 @@ gem 'sdoc', '~> 0.4.0', group: :doc group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' + # Use sqlite3 as the database for Active Record + gem 'sqlite3' end group :development do + gem "pry-rails" + gem "binding_of_caller" + gem "better_errors" # Access an IRB console on exception pages or by using <%= console %> in views gem 'web-console', '~> 2.0' @@ -45,3 +49,7 @@ group :development do gem 'spring' end +group :production do + gem 'pg' + gem 'rails_12factor' +end diff --git a/Gemfile.lock b/Gemfile.lock index 6c97c19f..14a4ae34 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,10 +37,15 @@ GEM thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) arel (6.0.3) + better_errors (2.1.1) + coderay (>= 1.0.0) + erubis (>= 2.6.6) + rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) builder (3.2.2) byebug (9.0.6) + coderay (1.1.1) coffee-rails (4.1.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.1.x) @@ -67,6 +72,7 @@ GEM nokogiri (>= 1.5.9) mail (2.6.4) mime-types (>= 1.16, < 4) + method_source (0.8.2) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) @@ -76,7 +82,14 @@ GEM nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) + pg (0.19.0) pkg-config (1.1.7) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + pry-rails (0.3.4) + pry (>= 0.9.10) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) @@ -99,6 +112,11 @@ GEM rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) + rails_12factor (0.0.3) + rails_serve_static_assets + rails_stdout_logging + rails_serve_static_assets (0.0.5) + rails_stdout_logging (0.0.5) railties (4.2.7) actionpack (= 4.2.7) activesupport (= 4.2.7) @@ -117,6 +135,7 @@ GEM sdoc (0.4.1) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) + slop (3.6.0) spring (2.0.0) activesupport (>= 4.2) sprockets (3.7.0) @@ -147,11 +166,16 @@ PLATFORMS ruby DEPENDENCIES + better_errors + binding_of_caller byebug coffee-rails (~> 4.1.0) jbuilder (~> 2.0) jquery-rails + pg + pry-rails rails (= 4.2.7) + rails_12factor sass-rails (~> 5.0) sdoc (~> 0.4.0) spring diff --git a/app/assets/javascripts/markets.coffee b/app/assets/javascripts/markets.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/app/assets/javascripts/markets.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/sales.coffee b/app/assets/javascripts/sales.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/app/assets/javascripts/sales.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/vendor.coffee b/app/assets/javascripts/vendor.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/app/assets/javascripts/vendor.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/welcome.coffee b/app/assets/javascripts/welcome.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/app/assets/javascripts/welcome.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index f9cd5b34..c69cbb94 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -13,3 +13,123 @@ *= require_tree . *= require_self */ + @font-face { + font-family: Mathlete-Skinny; + src: url(mathlete/Mathlete-Skinny.otf); + } + + + +.p{ + position: relative; + text-align: left; + font-size: 1em; + color: aqua; + margin-bottom: 15px; + margin-left: 15px; + +} + +.img { + position: relative; + float: left; + width: 100px; + height: 100px; + background-position: 50% 50%; + background-repeat: no-repeat; + background-size: cover; +} + + +a, a:visited{ + color: violet; + font-family: Mathlete-Skinny; + font-size: 1em; +} + +html, body { height: 100%; } + +body { + position: absolute; + width: 100%; + height: 100%; + font-weight: 200; + font-size: 1.5em; + font-style: normal; + font-family: Mathlete-Skinny; + text-align: justify; + text-decoration: none; + list-style-type: none; +} + +li a{ +position: relative; +list-style-type: none; +text-decoration: none; +} + +ul, menu, dir { + position: relative; + display: block; + -webkit-margin-end: 0px; + -webkit-padding-start: 0px; +} + +.navigation { + position: relative; + z-index: 30; + display: block; + font-size: 2em; + list-style-type: none; + margin-left: 0; + margin-right: 0; + padding: 0; + overflow: hidden; + background-color: cyan; + float: left; + } + +.link { + position: relative; + display: block; + font-size: 1em; + list-style-type: none; + text-decoration: none; + padding: 5px; + overflow: hidden; + color: grey; + background-color: honeydew; +} + +.title { + display: block; + position: relative; + text-align: center; + color: thistle; + background: skyblue; + padding: 14px 16px; + font-family: Mathlete-Skinny; + font-size: 1em; + text-decoration: none; +} + +.nav { + margin: 20px 16px; + position: relative; + display: block; + color: mediumorchid; + text-align: center; + padding: 14px 16px; + text-decoration: none; +} + +.nav:hover { + background-color: papayawhip; +} + +footer { + position: relative; + background-color: deepskyblue; + border-top: aqua thick; + margin-top: 200px; +} diff --git a/app/assets/stylesheets/bakery.png b/app/assets/stylesheets/bakery.png new file mode 100644 index 00000000..3c86bbe1 Binary files /dev/null and b/app/assets/stylesheets/bakery.png differ diff --git a/app/assets/stylesheets/bread.jpg b/app/assets/stylesheets/bread.jpg new file mode 100644 index 00000000..3f66fa4c Binary files /dev/null and b/app/assets/stylesheets/bread.jpg differ diff --git a/app/assets/stylesheets/chocolate.jpeg b/app/assets/stylesheets/chocolate.jpeg new file mode 100644 index 00000000..f769851b Binary files /dev/null and b/app/assets/stylesheets/chocolate.jpeg differ diff --git a/app/assets/stylesheets/farfont/alex-brush/AlexBrush-Regular.ttf b/app/assets/stylesheets/farfont/alex-brush/AlexBrush-Regular.ttf new file mode 100644 index 00000000..58c43a94 Binary files /dev/null and b/app/assets/stylesheets/farfont/alex-brush/AlexBrush-Regular.ttf differ diff --git a/app/assets/stylesheets/farfont/alex-brush/SIL Open Font License.txt b/app/assets/stylesheets/farfont/alex-brush/SIL Open Font License.txt new file mode 100644 index 00000000..2ceb9891 --- /dev/null +++ b/app/assets/stylesheets/farfont/alex-brush/SIL Open Font License.txt @@ -0,0 +1,44 @@ +Copyright (c) 2011 TypeSETit, LLC (typesetit@att.net), +with Reserved Font Name "Alex Brush" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). + +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Bold.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Bold.ttf new file mode 100644 index 00000000..a5c8a365 Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Bold.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-BoldItalic.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-BoldItalic.ttf new file mode 100644 index 00000000..f40a78dc Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-BoldItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Italic.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Italic.ttf new file mode 100644 index 00000000..780be06c Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Italic.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Light.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Light.ttf new file mode 100644 index 00000000..cdf53ce8 Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Light.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-LightItalic.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-LightItalic.ttf new file mode 100644 index 00000000..381c95a1 Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-LightItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Regular.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Regular.ttf new file mode 100644 index 00000000..9ac13d14 Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Regular.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-SemiBold.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-SemiBold.ttf new file mode 100644 index 00000000..caddfcd9 Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-SemiBold.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-SemiBoldItalic.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-SemiBoldItalic.ttf new file mode 100644 index 00000000..6da4d3c3 Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-SemiBoldItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Thin.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Thin.ttf new file mode 100644 index 00000000..28a4bd92 Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-Thin.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-ThinItalic.ttf b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-ThinItalic.ttf new file mode 100644 index 00000000..6c50922c Binary files /dev/null and b/app/assets/stylesheets/farfont/josefin-slab/JosefinSlab-ThinItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/josefin-slab/SIL Open Font License.txt b/app/assets/stylesheets/farfont/josefin-slab/SIL Open Font License.txt new file mode 100644 index 00000000..572fba4f --- /dev/null +++ b/app/assets/stylesheets/farfont/josefin-slab/SIL Open Font License.txt @@ -0,0 +1,43 @@ +Copyright (c) 2010 by Typemade (hi@typemade.mx). All rights reserved. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). + +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/app/assets/stylesheets/farfont/lekton/Lekton-Bold.ttf b/app/assets/stylesheets/farfont/lekton/Lekton-Bold.ttf new file mode 100644 index 00000000..b46b56b2 Binary files /dev/null and b/app/assets/stylesheets/farfont/lekton/Lekton-Bold.ttf differ diff --git a/app/assets/stylesheets/farfont/lekton/Lekton-Italic.ttf b/app/assets/stylesheets/farfont/lekton/Lekton-Italic.ttf new file mode 100644 index 00000000..a23c4ce4 Binary files /dev/null and b/app/assets/stylesheets/farfont/lekton/Lekton-Italic.ttf differ diff --git a/app/assets/stylesheets/farfont/lekton/Lekton-Regular.ttf b/app/assets/stylesheets/farfont/lekton/Lekton-Regular.ttf new file mode 100644 index 00000000..e971ecaa Binary files /dev/null and b/app/assets/stylesheets/farfont/lekton/Lekton-Regular.ttf differ diff --git a/app/assets/stylesheets/farfont/lekton/SIL Open Font License.txt b/app/assets/stylesheets/farfont/lekton/SIL Open Font License.txt new file mode 100644 index 00000000..14c043d6 --- /dev/null +++ b/app/assets/stylesheets/farfont/lekton/SIL Open Font License.txt @@ -0,0 +1,41 @@ +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). + +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/app/assets/stylesheets/farfont/mathlete 2/Mathlete-Bulky.otf b/app/assets/stylesheets/farfont/mathlete 2/Mathlete-Bulky.otf new file mode 100644 index 00000000..eded2ae2 Binary files /dev/null and b/app/assets/stylesheets/farfont/mathlete 2/Mathlete-Bulky.otf differ diff --git a/app/assets/stylesheets/farfont/mathlete 2/Mathlete-BulkySlant.otf b/app/assets/stylesheets/farfont/mathlete 2/Mathlete-BulkySlant.otf new file mode 100644 index 00000000..276c617c Binary files /dev/null and b/app/assets/stylesheets/farfont/mathlete 2/Mathlete-BulkySlant.otf differ diff --git a/app/assets/stylesheets/farfont/mathlete 2/Mathlete-Skinny.otf b/app/assets/stylesheets/farfont/mathlete 2/Mathlete-Skinny.otf new file mode 100644 index 00000000..f0555b7c Binary files /dev/null and b/app/assets/stylesheets/farfont/mathlete 2/Mathlete-Skinny.otf differ diff --git a/app/assets/stylesheets/farfont/mathlete 2/Mathlete-SkinnySlant.otf b/app/assets/stylesheets/farfont/mathlete 2/Mathlete-SkinnySlant.otf new file mode 100644 index 00000000..4ebecad5 Binary files /dev/null and b/app/assets/stylesheets/farfont/mathlete 2/Mathlete-SkinnySlant.otf differ diff --git a/app/assets/stylesheets/farfont/mathlete 2/Mathlete.txt b/app/assets/stylesheets/farfont/mathlete 2/Mathlete.txt new file mode 100644 index 00000000..70d9d0e9 --- /dev/null +++ b/app/assets/stylesheets/farfont/mathlete 2/Mathlete.txt @@ -0,0 +1 @@ +You're free to use this in commercial & personal work, but please don't redistribute or resell this typeface in any way. \ No newline at end of file diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-Black.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-Black.ttf new file mode 100644 index 00000000..6805f4f5 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-Black.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-BlackItalic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-BlackItalic.ttf new file mode 100644 index 00000000..2b2e65c0 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-BlackItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-Bold.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-Bold.ttf new file mode 100644 index 00000000..38c099cc Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-Bold.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-BoldItalic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-BoldItalic.ttf new file mode 100644 index 00000000..eac54e78 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-BoldItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-ExtraBold.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-ExtraBold.ttf new file mode 100644 index 00000000..502ff863 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-ExtraBold.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-ExtraBoldItalic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-ExtraBoldItalic.ttf new file mode 100644 index 00000000..09e0243f Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-ExtraBoldItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-ExtraLight.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-ExtraLight.ttf new file mode 100644 index 00000000..7611e96c Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-ExtraLight.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-ExtraLightItalic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-ExtraLightItalic.ttf new file mode 100644 index 00000000..3d07c1e7 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-ExtraLightItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-Italic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-Italic.ttf new file mode 100644 index 00000000..237d88d9 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-Italic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-Light.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-Light.ttf new file mode 100644 index 00000000..91aa0c70 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-Light.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-LightItalic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-LightItalic.ttf new file mode 100644 index 00000000..7ba0de81 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-LightItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-Medium.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-Medium.ttf new file mode 100644 index 00000000..7a71a6ff Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-Medium.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-MediumItalic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-MediumItalic.ttf new file mode 100644 index 00000000..43ed49a1 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-MediumItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-Regular.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-Regular.ttf new file mode 100644 index 00000000..e570a2d5 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-Regular.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-SemiBold.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-SemiBold.ttf new file mode 100644 index 00000000..ed0a8b99 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-SemiBold.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-SemiBoldItalic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-SemiBoldItalic.ttf new file mode 100644 index 00000000..36b79515 Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-SemiBoldItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-Thin.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-Thin.ttf new file mode 100644 index 00000000..a497b98a Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-Thin.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/Raleway-ThinItalic.ttf b/app/assets/stylesheets/farfont/raleway/Raleway-ThinItalic.ttf new file mode 100644 index 00000000..38008b9a Binary files /dev/null and b/app/assets/stylesheets/farfont/raleway/Raleway-ThinItalic.ttf differ diff --git a/app/assets/stylesheets/farfont/raleway/SIL Open Font License.txt b/app/assets/stylesheets/farfont/raleway/SIL Open Font License.txt new file mode 100644 index 00000000..458026d7 --- /dev/null +++ b/app/assets/stylesheets/farfont/raleway/SIL Open Font License.txt @@ -0,0 +1,49 @@ +Copyright (c) 2010, Matt McInerney (matt@pixelspread.com), +Copyright (c) 2011, Pablo Impallari (www.impallari.com|impallari@gmail.com), +Copyright (c) 2011, Rodrigo Fuenzalida (www.rfuenzalida.com|hello@rfuenzalida.com), with Reserved Font Name Raleway + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). + +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/app/assets/stylesheets/markets.scss b/app/assets/stylesheets/markets.scss new file mode 100644 index 00000000..98116b70 --- /dev/null +++ b/app/assets/stylesheets/markets.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Markets controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/sales.scss b/app/assets/stylesheets/sales.scss new file mode 100644 index 00000000..5126e4bf --- /dev/null +++ b/app/assets/stylesheets/sales.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Sales controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/straw.jpg b/app/assets/stylesheets/straw.jpg new file mode 100644 index 00000000..6f88b45b Binary files /dev/null and b/app/assets/stylesheets/straw.jpg differ diff --git a/app/assets/stylesheets/vendor.scss b/app/assets/stylesheets/vendor.scss new file mode 100644 index 00000000..e0a50da6 --- /dev/null +++ b/app/assets/stylesheets/vendor.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the vendor controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/welcome.scss b/app/assets/stylesheets/welcome.scss new file mode 100644 index 00000000..4e19aa40 --- /dev/null +++ b/app/assets/stylesheets/welcome.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Welcome controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/markets_controller.rb b/app/controllers/markets_controller.rb new file mode 100644 index 00000000..1c5d32de --- /dev/null +++ b/app/controllers/markets_controller.rb @@ -0,0 +1,52 @@ +class MarketsController < ApplicationController + def index + @markets = Market.all + end + + def show + @market = Market.find(params[:id]) + @vendors = @market.vendors + end + + def new + @market = Market.new + end + + def create + @market = Market.new(market_params) + + if @market.save + redirect_to markets_path + else + render :new + end + end + + def edit + @market = Market.find(params[:id]) + end + + def view + @markets = Market.all + end + + def details + @market = Market.find(params[:id]) + @vendors = @market.vendors + end + + def update + @market = Market.find(params[:id]) + if @market.update(market_params) + redirect_to @market + else + render 'edit' + end + end + + private + + def market_params + params.require(:market).permit(:name, :address, :city, :county, :state, :zip) + end +end diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb new file mode 100644 index 00000000..fb12d569 --- /dev/null +++ b/app/controllers/products_controller.rb @@ -0,0 +1,53 @@ +class ProductsController < ApplicationController + + def index + @product = Product.all + + @vendor = Vendor.find(params[:vendor_id]) + @individual_products = @vendor.products + end + + def show + @product = Product.find(params[:id]) + end + + def new + @product = Product.new + end + + def create + @product = Product.new + @product.name = params[:product][:name] + @product.vendor_id = params[:vendor_id] + if @product.save + redirect_to vendor_products_path(params[:vendor_id]) + else + render :new + end + end + + def edit + @product = Product.find(params[:id]) + @vendor = params[:vendor_id] + end + + def update + @product = Product.find(params[:id]) + if @product.update(product_params) + redirect_to vendor_products_path + else + render :edit + end + end + + def destroy + @product = Product.find(params[:id]).destroy + redirect_to vendor_products_path + end + + private + + def product_params + params.require(:product).permit(:id, :name, :vendor_id) + end +end diff --git a/app/controllers/sales_controller.rb b/app/controllers/sales_controller.rb new file mode 100644 index 00000000..26dc0b73 --- /dev/null +++ b/app/controllers/sales_controller.rb @@ -0,0 +1,32 @@ +class SalesController < ApplicationController + + def index + @vendor = Vendor.find(params[:vendor_id]) + @sales = @vendor.sales + + @total_sales = @vendor.total_all_sales + + @this_month_sales = @vendor.current_month_sales + + @this_month_sales_total = @vendor.current_month_sales_total + end + + def new + @sale = Sale.new + end + + def create + @sale = Sale.new + @sale.amount = params[:sale][:amount] + @sale.purchase_time = Time.now + @sale.vendor_id = params[:vendor_id] + @sale.product_id = params[:sale][:product_id] + + if @sale.save + redirect_to vendor_sales_path + else + render :new + end + end + +end diff --git a/app/controllers/vendors_controller.rb b/app/controllers/vendors_controller.rb new file mode 100644 index 00000000..eb79e70e --- /dev/null +++ b/app/controllers/vendors_controller.rb @@ -0,0 +1,52 @@ +class VendorsController < ApplicationController + + def index + @vendor = Vendor.all + end + + def show + @vendor = Vendor.find(params[:id]) + @vendor.save + end + + def new + @vendor = Vendor.new + end + + def create + @vendor = Vendor.new + @vendor.name = params[:vendor][:name] + @vendor.number_employees = params[:vendor][:name] + @vendor.market_id = params[:market_id] #didn't finish - not assigning correctly + if @vendor.save + redirect_to markets_path #didn't finish - want to direct somewhere else when not debugging + else + render :new + end + end + + def destroy + @vendor = Vendor.find(params[:id]).destroy + redirect_to vendors_path + end + + def edit + @vendor = Vendor.find(params[:id]) + end + + def update + @vendor = Vendor.find(params[:id]) + if @vendor.update(vendor_params) + redirect_to vendor_path(params[:id]) + else + render :edit + end + end + + + private + + def vendor_params + params.require(:vendor).permit(:id, :name, :number_employees, :market_id) + end +end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb new file mode 100644 index 00000000..f9b859b9 --- /dev/null +++ b/app/controllers/welcome_controller.rb @@ -0,0 +1,4 @@ +class WelcomeController < ApplicationController + def index + end +end diff --git a/app/helpers/markets_helper.rb b/app/helpers/markets_helper.rb new file mode 100644 index 00000000..655b79b7 --- /dev/null +++ b/app/helpers/markets_helper.rb @@ -0,0 +1,2 @@ +module MarketsHelper +end diff --git a/app/helpers/sales_helper.rb b/app/helpers/sales_helper.rb new file mode 100644 index 00000000..8611c4a0 --- /dev/null +++ b/app/helpers/sales_helper.rb @@ -0,0 +1,2 @@ +module SalesHelper +end diff --git a/app/helpers/vendor_helper.rb b/app/helpers/vendor_helper.rb new file mode 100644 index 00000000..e3f597e0 --- /dev/null +++ b/app/helpers/vendor_helper.rb @@ -0,0 +1,2 @@ +module VendorHelper +end diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb new file mode 100644 index 00000000..eeead45f --- /dev/null +++ b/app/helpers/welcome_helper.rb @@ -0,0 +1,2 @@ +module WelcomeHelper +end diff --git a/app/models/market.rb b/app/models/market.rb index 1a4a52dd..6a148291 100644 --- a/app/models/market.rb +++ b/app/models/market.rb @@ -1,2 +1,3 @@ class Market < ActiveRecord::Base + has_many :vendors end diff --git a/app/models/product.rb b/app/models/product.rb index 077a8197..86f8d94b 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -1,2 +1,4 @@ class Product < ActiveRecord::Base + belongs_to :vendor + has_many :sales end diff --git a/app/models/sale.rb b/app/models/sale.rb index 870f2c20..613c86b2 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -1,2 +1,4 @@ class Sale < ActiveRecord::Base + belongs_to :product + belongs_to :vendor end diff --git a/app/models/vendor.rb b/app/models/vendor.rb index dac23f0a..1a5c1e39 100644 --- a/app/models/vendor.rb +++ b/app/models/vendor.rb @@ -1,2 +1,31 @@ class Vendor < ActiveRecord::Base + belongs_to :market + has_many :products + has_many :sales + + def total_all_sales + all_sales = self.sales + + total = 0 + all_sales.each do |sale| + total += sale.amount + end + return total + end + + def current_month_sales + all_sales = self.sales + + all_sales.where(amount: 8382) #only finding a specific sale currently so I can test that calling the method in the sale show page works correctly. did not get to the logic to isolate only the current month sales + end #should return a collection of sales from the current month + + def current_month_sales_total + total = 0 + + current_month_sales.each do |sale| + # TODO: need a conditional here to add to the total using logic for isolating current month sales - did not get to the logic during th assignment time + total += sale.amount + end + return total + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 443f3152..9b0204b5 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,7 +8,14 @@
+ <%= yield %> + +