From c1d738befee3b2517dbf44419f5ad80037766e23 Mon Sep 17 00:00:00 2001 From: Samuel Gallo Date: Mon, 22 Feb 2016 17:28:03 -0300 Subject: [PATCH] commit all files --- .gitignore | 2 + .htaccess | 11 + 404.html | 60 ++++ Gruntfile.js | 67 +++++ assets/_js/scripts.js | 52 ++++ assets/_js/slider.js | 313 ++++++++++++++++++++ assets/css/main.css | 2 + assets/css/main.css.map | 7 + assets/images/banner-01.jpg | Bin 0 -> 25244 bytes assets/images/banner-02.jpg | Bin 0 -> 28469 bytes assets/images/banner-03.jpg | Bin 0 -> 23863 bytes assets/images/favicon.ico | Bin 0 -> 99678 bytes assets/images/flag-frete-gratis.png | Bin 0 -> 337 bytes assets/images/flag-novidade.png | Bin 0 -> 296 bytes assets/images/logo.png | Bin 0 -> 5533 bytes assets/images/pixel.gif | Bin 0 -> 43 bytes assets/images/product-01.jpg | Bin 0 -> 7115 bytes assets/images/product-02.jpg | Bin 0 -> 8171 bytes assets/images/product-03.jpg | Bin 0 -> 10083 bytes assets/images/product-04.jpg | Bin 0 -> 11604 bytes assets/images/product-05.jpg | Bin 0 -> 7773 bytes assets/images/sale.png | Bin 0 -> 4524 bytes assets/images/slider-1.jpg | Bin 0 -> 169970 bytes assets/images/slider-2.jpg | Bin 0 -> 139200 bytes assets/images/sprite.png | Bin 0 -> 28665 bytes assets/js/jquery-1.12.0.min.js | 5 + assets/js/main.js | 1 + assets/js/modernizr.min.js | 4 + assets/js/products.json | 68 +++++ assets/js/slider.js | 1 + assets/sass/components/_grid.scss | 297 +++++++++++++++++++ assets/sass/components/_slider.scss | 378 ++++++++++++++++++++++++ assets/sass/global/_global.scss | 39 +++ assets/sass/main.scss | 12 + assets/sass/reset/_reset.scss | 19 ++ assets/sass/responsive/_responsive.scss | 76 +++++ assets/sass/structure/_body.scss | 308 +++++++++++++++++++ assets/sass/structure/_footer.scss | 54 ++++ assets/sass/structure/_header.scss | 99 +++++++ favicon.ico | Bin 0 -> 99678 bytes index.html | 225 ++++++++++++++ package.json | 13 + robots.txt | 5 + 43 files changed, 2118 insertions(+) create mode 100644 .gitignore create mode 100644 .htaccess create mode 100644 404.html create mode 100644 Gruntfile.js create mode 100644 assets/_js/scripts.js create mode 100644 assets/_js/slider.js create mode 100644 assets/css/main.css create mode 100644 assets/css/main.css.map create mode 100644 assets/images/banner-01.jpg create mode 100644 assets/images/banner-02.jpg create mode 100644 assets/images/banner-03.jpg create mode 100644 assets/images/favicon.ico create mode 100644 assets/images/flag-frete-gratis.png create mode 100644 assets/images/flag-novidade.png create mode 100644 assets/images/logo.png create mode 100644 assets/images/pixel.gif create mode 100644 assets/images/product-01.jpg create mode 100644 assets/images/product-02.jpg create mode 100644 assets/images/product-03.jpg create mode 100644 assets/images/product-04.jpg create mode 100644 assets/images/product-05.jpg create mode 100644 assets/images/sale.png create mode 100644 assets/images/slider-1.jpg create mode 100644 assets/images/slider-2.jpg create mode 100644 assets/images/sprite.png create mode 100644 assets/js/jquery-1.12.0.min.js create mode 100644 assets/js/main.js create mode 100644 assets/js/modernizr.min.js create mode 100644 assets/js/products.json create mode 100644 assets/js/slider.js create mode 100644 assets/sass/components/_grid.scss create mode 100644 assets/sass/components/_slider.scss create mode 100644 assets/sass/global/_global.scss create mode 100644 assets/sass/main.scss create mode 100644 assets/sass/reset/_reset.scss create mode 100644 assets/sass/responsive/_responsive.scss create mode 100644 assets/sass/structure/_body.scss create mode 100644 assets/sass/structure/_footer.scss create mode 100644 assets/sass/structure/_header.scss create mode 100644 favicon.ico create mode 100644 index.html create mode 100644 package.json create mode 100644 robots.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..16b2d7d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Include your project-specific ignores in this file +# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files diff --git a/.htaccess b/.htaccess new file mode 100644 index 00000000..5a1f3f02 --- /dev/null +++ b/.htaccess @@ -0,0 +1,11 @@ +# BEGIN WordPress + +RewriteEngine On +RewriteBase / +RewriteRule ^index\.php$ - [L] +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . /index.php [L] + + +# END WordPress diff --git a/404.html b/404.html new file mode 100644 index 00000000..8d7925a8 --- /dev/null +++ b/404.html @@ -0,0 +1,60 @@ + + + + + Page Not Found + + + + +

Page Not Found

+

Sorry, but the page you were trying to view does not exist.

+ + + diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..bd51d920 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,67 @@ +module.exports = function( grunt ) { + + grunt.initConfig({ + + uglify : { + options : { + mangle : false + }, + + my_target : { + files : { + 'assets/js/main.js' : [ 'assets/_js/scripts.js' ], + 'assets/js/slider.js' : [ 'assets/_js/slider.js' ] + } + } + }, // uglify + + imagemin: { + + public: { + + expand: true, + cwd: 'assets/images', + src: '**/*.{png,jpg,gif}', + dest: 'assets/images' + } + }, // imagemin + + sass : { + dist : { + options : { style : 'compressed' }, + files : { + 'assets/css/main.css' : 'assets/sass/main.scss' + } + } + }, // sass + + + + watch : { + dist : { + files : [ + 'assets/_js/**/*', + 'assets/sass/**/*' + ], + + tasks : [ 'uglify', 'sass' ] + } + } // watch + + }); + + + // Plugins do Grunt + grunt.loadNpmTasks( 'grunt-contrib-uglify' ); + grunt.loadNpmTasks('grunt-contrib-imagemin'); + grunt.loadNpmTasks( 'grunt-contrib-sass' ); + grunt.loadNpmTasks( 'grunt-contrib-watch' ); + + + // Tarefas que serão executadas + grunt.registerTask( 'default', [ 'uglify', 'sass', 'imagemin' ] ); + + // Tarefa para Watch + grunt.registerTask( 'w', [ 'watch' ] ); + +}; diff --git a/assets/_js/scripts.js b/assets/_js/scripts.js new file mode 100644 index 00000000..99e292e5 --- /dev/null +++ b/assets/_js/scripts.js @@ -0,0 +1,52 @@ +jQuery(document).ready(function($) { + $('.search-form').each(function() { + $(this).find('input').keypress(function(e) { + if (e.which == 10 || e.which == 13) { + this.form.submit(); + } + }); + $(this).find('input[type=submit]').hide(); + }); + $('#main-slider').cslider({ + current: 0, + bgincrement: 50, + autoplay: false, + interval: 4000 + }); + $.getJSON('assets/js/products.json', function(data) { + this.qtd = data.products.length; + this.retorno = ''; + for (i = 0; i < this.qtd; i++) { + this.retorno += '
'; + this.retorno += (data.products[i].flagFreeshipping == true) ? '' : ' '; + this.retorno += (data.products[i].flagNovelty == true) ? '' : ' '; + this.retorno += '
' + data.products[i].name + '
'; + this.retorno += '
'; + this.retorno += ''; + this.retorno += '
'; + this.retorno += (data.products[i].price == false) ? 'R$' + data.products[i].oldPrice + ' R$' + data.products[i].specialPrice + '' : ' R$' + data.products[i].price + ''; + this.retorno += (data.products[i].qtyParcel < 1) ? '' : 'ou ' + data.products[i].qtyParcel + ' x de R$' + data.products[i].priceParcel + ''; + this.retorno += '
'; + this.retorno += ''; + this.retorno += '
'; + } + $('#item-products').html(this.retorno); + var count = 0; + var theTotal = 0; + $(".item").each(function(index) { + var getPrice = parseInt($(this).find('.item-regular-price i').text() || $(this).find('.item-special-price i').text()); + $(this).on("click", "button", function() { + count++; + theTotal += parseFloat(getPrice); + $('.header-cart-qty').text(count); + $('.header-cart-amount').text('R$' + theTotal + ',00'); + $('html, body').animate({ + 'scrollTop': $(".header-cart").position().top + }); + }); + }); + }); + if ($(window).width() < 768) { + $('.slider').remove(); + } +}); \ No newline at end of file diff --git a/assets/_js/slider.js b/assets/_js/slider.js new file mode 100644 index 00000000..59a4198b --- /dev/null +++ b/assets/_js/slider.js @@ -0,0 +1,313 @@ +(function( $, undefined ) { + + $.Slider = function( options, element ) { + + this.$el = $( element ); + + this._init( options ); + + }; + + $.Slider.defaults = { + current : 0, + bgincrement : 50, + autoplay : false, + interval : 4000 + }; + + $.Slider.prototype = { + _init : function( options ) { + + this.options = $.extend( true, {}, $.Slider.defaults, options ); + + this.$slides = this.$el.children('div.item-slider'); + this.slidesCount = this.$slides.length; + + this.current = this.options.current; + + if( this.current < 0 || this.current >= this.slidesCount ) { + + this.current = 0; + + } + + this.$slides.eq( this.current ).addClass( 'item-slider-current' ); + + var $navigation = $( '