Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
77 changes: 77 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
var gulp = require('gulp'),
imagemin = require('gulp-imagemin'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
htmlReplace = require('gulp-html-replace'),
uglify = require('gulp-uglify'),
usemin = require('gulp-usemin'),
cssmin = require('gulp-cssmin'),
browserSync = require('browser-sync'),
jshint = require('gulp-jshint'),
jshintStyle = require('jshint-stylish'),
csslint = require('gulp-csslint');

//executar *todas as tarefas abaixo: npm run gulp
gulp.task('default', ['copy'], function(){
gulp.start('build-img', 'usemin');
});

//faz cópia do arquivo original com o nome de "final"
gulp.task('copy', ['clean'], function(){

return gulp.src('src/**/*')
.pipe(gulp.dest('final'));
});

gulp.task('clean', function(){

return gulp.src('final')
.pipe(clean());
});

//minifica as imagens da pasta uploads
gulp.task('build-img', function(){

gulp.src('final/uploads/**/*')
.pipe(imagemin())
.pipe(gulp.dest('final/uploads'));
});

//mágica! usemin vai ler, concatenar, minificar...
gulp.task('usemin', function(){

gulp.src('final/**/*.html')
.pipe(usemin({
'js' : [uglify],
'css' : [cssmin]
}))
.pipe(gulp.dest('final'));
});

//fim da execução de toda tarefa run gulp*

//atualiza automaticamente o navegador com o novo código
//npm run gulp server
gulp.task('server', function(){

browserSync.init({
server: {
baseDir: 'src'
}
});

//lista(terminal) erros nos aquivos js
gulp.watch('src/js/*.js').on('change', function(event){
gulp.src(event.path)
.pipe(jshint())
.pipe(jshint.reporter(jshintStyle));
});

//lista(terminal) erros nos aquivos css
gulp.watch('src/css/*.css').on('change', function(event){
gulp.src(event.path)
.pipe(csslint())
.pipe(csslint.reporter());
});
gulp.watch('src/**/*').on('change', browserSync.reload);
});
24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "get-devs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"gulp": "gulp"
},
"repository": {
"type": "git",
"url": "git+https://github.com/profite/get-devs.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/profite/get-devs/issues"
},
"homepage": "https://github.com/profite/get-devs#readme",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-imagemin": "^3.2.0"
}
}
15 changes: 15 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(function(){

var app = angular.module("app", ["ngRoute"]);

app.config(function($routeProvider){
$routeProvider
.when("/produtos", {
templateUrl: "templates/produtos.html",
controller: "ProdutoController"
})
.otherwise({redirectTo:"/produtos"});
});

}());

33 changes: 33 additions & 0 deletions src/controllers/produtoController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
(function() {

'use strict';

angular
.module('app')
.controller('ProdutoController', ProdutoController);

ProdutoController.$inject = ['$scope', 'produtoApi'];

function ProdutoController($scope, produtoApi) {

const Zero_A_Cinquenta = 1;
const Cinquenta_A_CentoECinquenta = 2;
const CentoECinquenta_A_Trezentos = 3;
const Trezentos_A_Quinhentos = 4;
const Acima_De_Quinhentos = 5;

$scope.filtroDataCadastro = "";

$scope.carregarProdutos = function(){
$scope.produtos = produtoApi.obterPrimeirosProdutos();
};

$scope.carregarProdutos();

$scope.carregarMaisProdutos = function(){
$scope.produtos = produtoApi.obterTodosProdutos();
}

}

}());
55 changes: 55 additions & 0 deletions src/css/boot.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*RESET*/
*, *:before, *:after{
margin: 0;
padding: 0;
font-family: 'Raleway', sans-serif;
font-size: 1em;
font-weight: 300;
line-height: 1.2;
letter-spacing: 0em;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}

body{background: #F7F8FA;}

object,
embed,
video,
iframe,
iframe['style']{
max-width: 100%;
height: auto;
}

p{margin-bottom: 15px;}
b, strong{font-weight: bold;}
ul{list-style: none;}
img{border: none; max-width: 100%; vertical-align: middle;}
small{font-size: 0.75em; color: #555;}
a{text-decoration: none; color: #303030; outline: 0 none;}

fieldset{border: 0;}
input,
select,
textarea{padding: 10px; width: 100%; outline: none;}
input.btn{width: auto; cursor: pointer; outline: none;}

.container{
display: block;
width: 100%;
}

.content{
display: block;
margin: 0 auto;
}

.clear{
clear: both;
}

.fontzero{
font-size: 0;
}
Loading