├── .gitignore ├── LICENSE ├── README.md ├── assets ├── css │ └── style.min.css └── sass │ ├── partials │ ├── _base.sass │ └── _home.sass │ ├── style.sass │ └── variables.sass ├── gulpfile.js ├── index.html ├── index.pug ├── js ├── index.min.js └── modules │ ├── answer.js │ └── timer.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .sass-cache/ 3 | .DS_Store 4 | package-lock.json 5 | *.map 6 | .eslintrc.js 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Kevin Oliveira 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # O front-end acabou? 2 | 3 | ### Ainda não. 4 | 5 | 2018 © Licensed by MIT 6 | -------------------------------------------------------------------------------- /assets/css/style.min.css: -------------------------------------------------------------------------------- 1 | *,::after,::before,html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;box-sizing:border-box;text-rendering:optimizeLegibility}body{align-items:center;background-color:#000;color:#fff;display:flex;flex-wrap:wrap;font-family:"Open Sans",sans-serif;font-size:18px;justify-content:center;margin:0;min-height:100vh;transition:background-color .3s ease-in-out}@media (max-width:850px){body{padding:2em 0}}a{text-decoration:none}main{text-align:left;width:75%}.question{margin-bottom:5rem}@media (max-width:850px){.question{margin-bottom:3rem}}.question__title{font-size:1.2rem;font-weight:700;margin:0}.answer{font-size:8rem;text-align:center}.timer{font-size:1.5rem;margin:.5rem 0}.timer__title{font-size:1.2rem;font-weight:700;margin:0}.timer__subtitle{font-size:.85rem}.answer,.timer{font-family:"Roboto Mono",monospace}.created-by{bottom:1em;display:block;font-size:.7em;position:absolute;text-align:center}@media (max-width:850px){.created-by{position:unset;margin-top:3em;bottom:0}}.creator-link{color:#fff;font-weight:700;text-decoration:underline;transition:opacity .3s ease-in-out}.creator-link:hover{text-decoration:none}@media (max-width:850px){.created-text:last-child{margin-bottom:0}} 2 | -------------------------------------------------------------------------------- /assets/sass/partials/_base.sass: -------------------------------------------------------------------------------- 1 | *, 2 | *::after, 3 | *::before, 4 | html 5 | // sass-lint:disable-block no-vendor-prefixes 6 | -moz-osx-font-smoothing: grayscale 7 | -webkit-font-smoothing: antialiased 8 | box-sizing: border-box 9 | text-rendering: optimizeLegibility 10 | 11 | body 12 | align-items: center 13 | background-color: $black 14 | color: $white 15 | display: flex 16 | flex-wrap: wrap 17 | font-family: $default 18 | font-size: 18px 19 | justify-content: center 20 | margin: 0 21 | min-height: 100vh 22 | transition: background-color .3s ease-in-out 23 | 24 | @media (max-width: 850px) 25 | padding: 2em 0 26 | 27 | a 28 | text-decoration: none 29 | -------------------------------------------------------------------------------- /assets/sass/partials/_home.sass: -------------------------------------------------------------------------------- 1 | main 2 | text-align: left 3 | width: 75% 4 | 5 | .question 6 | margin-bottom: 5rem 7 | 8 | @media (max-width: 850px) 9 | margin-bottom: 3rem 10 | 11 | &__title 12 | font: 13 | size: 1.2rem 14 | weight: bold 15 | margin: 0 16 | 17 | .answer 18 | font-size: 8rem 19 | text-align: center 20 | 21 | .timer 22 | font-size: 1.5rem 23 | margin: .5rem 0 24 | 25 | &__title 26 | font: 27 | size: 1.2rem 28 | weight: bold 29 | margin: 0 30 | 31 | &__subtitle 32 | font-size: .85rem 33 | 34 | .answer, 35 | .timer 36 | font-family: $monospace 37 | 38 | .created-by 39 | bottom: 1em 40 | display: block 41 | font-size: .7em 42 | position: absolute 43 | text-align: center 44 | 45 | @media (max-width: 850px) 46 | position: unset 47 | margin-top: 3em 48 | bottom: 0 49 | 50 | .creator-link 51 | color: $white 52 | font-weight: bold 53 | text-decoration: underline 54 | transition: opacity .3s ease-in-out 55 | 56 | &:hover 57 | text-decoration: none 58 | 59 | .created-text:last-child 60 | @media (max-width: 850px) 61 | margin-bottom: 0 62 | -------------------------------------------------------------------------------- /assets/sass/style.sass: -------------------------------------------------------------------------------- 1 | @import variables 2 | 3 | @import partials/base 4 | 5 | @import partials/home 6 | -------------------------------------------------------------------------------- /assets/sass/variables.sass: -------------------------------------------------------------------------------- 1 | // 1. Colors 2 | $white: #fff 3 | $black: #000 4 | 5 | // 2. Typography 6 | $default: 'Open Sans', sans-serif 7 | $monospace: 'Roboto Mono', monospace 8 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | let gulp = require('gulp'), 2 | pug = require('gulp-pug'), 3 | sass = require ('gulp-sass'), 4 | concat = require ('gulp-concat'), 5 | cleanCSS = require('gulp-clean-css'), 6 | autoprefixer = require('gulp-autoprefixer'), 7 | uglify = require('gulp-uglify'), 8 | imagemin = require('gulp-imagemin'), 9 | watch = require('gulp-watch'), 10 | browserSync = require('browser-sync').create(); 11 | 12 | 13 | // Dev Tasks 14 | gulp.task('pug-dev', () => { 15 | return gulp.src('index.pug') 16 | .pipe(pug()) 17 | .pipe(gulp.dest('./')); 18 | }); 19 | 20 | gulp.task('sass-dev', () => { 21 | return gulp.src(['assets/sass/*.sass', 'assets/sass/partials/*.sass']) 22 | .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) 23 | .pipe(concat('style.min.css')) 24 | .pipe(gulp.dest('assets/css')) 25 | .pipe(browserSync.reload({ 26 | stream: true 27 | })); 28 | }); 29 | 30 | gulp.task('js-dev', () => { 31 | return gulp.src('js/modules/*.js') 32 | //.pipe(uglify()) 33 | .pipe(concat('index.min.js')) 34 | .pipe(gulp.dest('js')); 35 | }); 36 | 37 | 38 | // Build Tasks 39 | gulp.task('pug-build', () => { 40 | return gulp.src('index.pug') 41 | .pipe(pug()) 42 | .pipe(gulp.dest('./')); 43 | }); 44 | 45 | gulp.task('sass-build', () => { 46 | return gulp.src(['assets/sass/*.sass', 'assets/sass/partials/*.sass']) 47 | .pipe(sass()) 48 | .pipe(autoprefixer()) 49 | .pipe(cleanCSS()) 50 | .pipe(concat('style.min.css')) 51 | .pipe(gulp.dest('assets/css')); 52 | }); 53 | 54 | gulp.task('js-build', () => { 55 | return gulp.src('js/modules/*.js') 56 | //.pipe(uglify()) 57 | .pipe(concat('index.min.js')) 58 | .pipe(gulp.dest('js')); 59 | }); 60 | 61 | gulp.task('image-build', () => { 62 | return gulp.src('assets/img/**/*') 63 | .pipe(imagemin()) 64 | .pipe(gulp.dest('assets/img')); 65 | }); 66 | 67 | 68 | // Server Tasks 69 | gulp.task('watch', ['browserSync', 'pug-dev', 'sass-dev', 'js-dev'], () => { 70 | 71 | gulp.watch(['index.pug', 'includes/**/*.pug'], ['pug-dev', browserSync.reload]); 72 | gulp.watch('assets/sass/**/*.sass', ['sass-dev']); 73 | gulp.watch('js/modules/*.js', ['js-dev', browserSync.reload]); 74 | 75 | }); 76 | 77 | gulp.task('browserSync', () => { 78 | browserSync.init({ 79 | server: { 80 | baseDir: './' 81 | }, 82 | }); 83 | }); 84 | 85 | 86 | // Main Tasks 87 | gulp.task('default', ['watch'], () => {}); 88 | gulp.task('build', ['pug-build', 'sass-build', 'js-build', 'image-build'], () => {}); 89 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 |
Criado por Kevin Oliveira & Ricardo Gouveia