diff --git a/.gitignore b/.gitignore index 2fd7a7bd4..d5f9a9a37 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ hasjob/static/gen *.sql *.gz *.bz2 +hasjob/assets/node_modules diff --git a/README.md b/README.md index 9af7c2823..329571c05 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ Hasjob makes use of subdomains to serve different sub-boards for jobs. To set it Hasjob runs on [Python](https://www.python.org) with the [Flask](http://flask.pocoo.org/) microframework. -##### Virutalenv + pip +##### Virutalenv + pip + webpack If you are going to use a computer on which you would work on multiple Python based projects, [Virtualenv](docs.python-guide.org/en/latest/dev/virtualenvs/) is strongly recommended to ensure Hasjob’s elaborate and sometimes version-specific requirements doesn't clash with anything else. @@ -122,6 +122,16 @@ Finish configuration with: $ python manage.py db create +You will need to install all dependencies listed in `package.json` + + $ cd hasjob/assets + $ npm install + +You will need to run Webpack to bundle CSS, JS files & generate the service-worker.js + + $ cd hasjob/assets + $ yarn build + Before you run the server in development mode, make sure you have Postgres server and Redis server running as well. To start Hasjob: $ python runserver.py diff --git a/hasjob/__init__.py b/hasjob/__init__.py index 952bfa3ca..93ead0be9 100644 --- a/hasjob/__init__.py +++ b/hasjob/__init__.py @@ -17,7 +17,7 @@ # First, make an app and config it -app = Flask(__name__, instance_relative_config=True, static_folder=None) +app = Flask(__name__, instance_relative_config=True) app.static_folder = 'static' mail = Mail() lastuser = Lastuser() @@ -25,8 +25,6 @@ # Second, setup assets version = Version(__version__) -assets['hasjob.js'][version] = 'js/app.js' -assets['hasjob.css'][version] = 'css/app.css' # Third, after config, import the models and views @@ -47,11 +45,9 @@ RQ(app) -baseframe.init_app(app, requires=['hasjob'], - ext_requires=['baseframe-bs3', - ('jquery.autosize', 'jquery.sparkline', 'jquery.liblink', 'jquery.wnumb', 'jquery.nouislider'), - 'baseframe-firasans', 'fontawesome>=4.3.0', 'bootstrap-multiselect', 'nprogress', 'ractive', - 'jquery.appear', 'hammer']) +baseframe.init_app(app, requires=['baseframe-bs3', 'jquery.autosize', 'jquery.liblink', + 'jquery.wnumb', 'jquery.nouislider', 'baseframe-firasans', 'fontawesome>=4.3.0', + 'bootstrap-multiselect', 'nprogress', 'ractive', 'jquery.appear', 'hammer']) # TinyMCE has to be loaded by itself, unminified, or it won't be able to find its assets app.assets.register('js_tinymce', assets.require('!jquery.js', 'tinymce.js>=4.0.0', 'jquery.tinymce.js>=4.0.0')) app.assets.register('css_editor', Bundle('css/editor.css', diff --git a/hasjob/static/js/app.js b/hasjob/assets/js/app.js similarity index 97% rename from hasjob/static/js/app.js rename to hasjob/assets/js/app.js index 9bd33c50e..3e8090275 100644 --- a/hasjob/static/js/app.js +++ b/hasjob/assets/js/app.js @@ -215,6 +215,7 @@ window.Hasjob.StickieList = { //rgba - RGBA values at a particular point in the canvas. var rgba = window.Hasjob.Config[funnelName].canvasContext.getImageData(value, 1, 1, 1).data; + var colourHex; if (rgba[0] > 255 || rgba[1] > 255 || rgba[2] > 255) { // rgb value is invalid, hence return white colourHex ="#FFFFFF"; @@ -245,16 +246,24 @@ window.Hasjob.StickieList = { }, initFunnelViz: function() { window.addEventListener('onStickiesInit', function (e) { - Hasjob.StickieList.createGradientColour(); - Hasjob.StickieList.renderGradientColour(); + /* Check for MaxCounts since on job post page it is assigned much later + when related job posts are loaded. */ + if (window.Hasjob.Config.MaxCounts) { + Hasjob.StickieList.createGradientColour(); + Hasjob.StickieList.renderGradientColour(); + } }, false); window.addEventListener('onStickiesRefresh', function (e) { - Hasjob.StickieList.renderGradientColour(); + if (window.Hasjob.Config.MaxCounts) { + Hasjob.StickieList.renderGradientColour(); + } }, false); window.addEventListener('onStickiesPagination', function (e) { - Hasjob.StickieList.renderGradientColour(); + if (window.Hasjob.Config.MaxCounts) { + Hasjob.StickieList.renderGradientColour(); + } }, false); } }; @@ -687,9 +696,7 @@ $(function() { window.Hasjob.Filters.init(); window.Hasjob.JobPost.handleStarClick(); window.Hasjob.JobPost.handleGroupClick(); - if (window.Hasjob.Config.MaxCounts) { - window.Hasjob.StickieList.initFunnelViz(); - } + window.Hasjob.StickieList.initFunnelViz(); var getCurrencyVal = function() { return $("input[type='radio'][name='currency']:checked").val(); diff --git a/hasjob/assets/package.json b/hasjob/assets/package.json new file mode 100644 index 000000000..631cfbda7 --- /dev/null +++ b/hasjob/assets/package.json @@ -0,0 +1,40 @@ +{ + "name": "hasjob", + "version": "0.0.1", + "description": "Hasjob is India’s premier job board for tech startups", + "main": "app.js", + "directories": { + "test": "tests" + }, + "scripts": { + "dev": "NODE_ENV=development node_modules/.bin/webpack --progress --profile --colors", + "build": "NODE_ENV=production node_modules/.bin/webpack --progress --profile --colors" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hasgeek/hasjob.git" + }, + "author": "HasGeek team", + "license": "AGPLv3", + "bugs": { + "url": "https://github.com/hasgeek/hasjob/issues" + }, + "homepage": "https://github.com/hasgeek/hasjob#readme", + "devDependencies": { + "babel-core": "^6.26.0", + "babel-loader": "^7.1.2", + "babel-preset-es2015": "^6.24.1", + "clean-webpack-plugin": "^0.1.18", + "compass-mixins": "^0.12.10", + "copy-webpack-plugin": "^4.5.1", + "css-loader": "^0.28.9", + "extract-text-webpack-plugin": "^3.0.2", + "file-loader": "^1.1.9", + "filemanager-webpack-plugin": "^1.0.25", + "node-sass": "^4.7.2", + "sass-loader": "^6.0.6", + "style-loader": "^0.20.2", + "webpack": "^3.11.0", + "workbox-webpack-plugin": "^2.1.2" + } +} diff --git a/hasjob/static/sass/_40x.scss b/hasjob/assets/sass/_40x.scss similarity index 88% rename from hasjob/static/sass/_40x.scss rename to hasjob/assets/sass/_40x.scss index 392eab270..c4e42dd72 100644 --- a/hasjob/static/sass/_40x.scss +++ b/hasjob/assets/sass/_40x.scss @@ -16,6 +16,12 @@ letter-spacing: -0.2em; margin-left: -0.2em; // This must match letter-spacing } +#i40x.offline { + font-size: 80px; + letter-spacing: 0; + margin-left: 0em; + margin-right: 0; +} #i40x:after { display: block; color: $color-title-jobs; diff --git a/hasjob/static/sass/_animate.scss b/hasjob/assets/sass/_animate.scss similarity index 100% rename from hasjob/static/sass/_animate.scss rename to hasjob/assets/sass/_animate.scss diff --git a/hasjob/static/sass/_colors.scss b/hasjob/assets/sass/_colors.scss similarity index 100% rename from hasjob/static/sass/_colors.scss rename to hasjob/assets/sass/_colors.scss diff --git a/hasjob/static/sass/_fonts.scss b/hasjob/assets/sass/_fonts.scss similarity index 100% rename from hasjob/static/sass/_fonts.scss rename to hasjob/assets/sass/_fonts.scss diff --git a/hasjob/static/sass/_footer.sass b/hasjob/assets/sass/_footer.sass similarity index 94% rename from hasjob/static/sass/_footer.sass rename to hasjob/assets/sass/_footer.sass index a092abaa7..48447fe30 100644 --- a/hasjob/static/sass/_footer.sass +++ b/hasjob/assets/sass/_footer.sass @@ -14,7 +14,7 @@ footer footer .footer-inner background: #ebe7e4 - +box-shadow(0 -1px 5px $color-shadow) + box-shadow: 0 -1px 5px $color-shadow footer .container padding-bottom: 0 diff --git a/hasjob/static/sass/_header.sass b/hasjob/assets/sass/_header.sass similarity index 83% rename from hasjob/static/sass/_header.sass rename to hasjob/assets/sass/_header.sass index ad00778f7..eb96301b7 100644 --- a/hasjob/static/sass/_header.sass +++ b/hasjob/assets/sass/_header.sass @@ -1,6 +1,6 @@ body font-family: $font-default - background: #e8e7e6 image-url("canvas.jpg") + background: #e8e7e6 url("~/static/img/canvas.jpg") header margin-bottom: 0 @@ -11,6 +11,7 @@ header font-size: 16px margin-top: 10px margin-bottom: 10px + small display: inline-block color: $color-title-geek @@ -22,14 +23,10 @@ header text-decoration: none border-bottom: none - a:hover, a:focus, a:active - // background-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 8px, $color-title-jobs 8px, $color-title-jobs 13px, rgba(0, 0, 0, 0) 13px) - background-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 12%, $color-title-jobs 12%, $color-title-jobs 23%, rgba(0, 0, 0, 0) 23%) - #hgnav background: #ebe7e4 border-bottom: 1px solid rgba(0,0,0,0.1) - +box-shadow(0 1px 5px $color-shadow) + box-shadow: 0 1px 5px $color-shadow min-height: 62px .container @@ -41,7 +38,7 @@ header background-color: $color-title-geek border-color: $color-title-geek border-bottom: 2px solid $color-title-geek-darker - margin-top: 6px + margin-top: 15px margin-right: 4px padding: 0 15px color: #fff @@ -49,21 +46,39 @@ header .btn-post-job:hover background-color: $color-title-geek-dark + a#hg-login-btn + margin-top: 19px + + .nav>li>button + margin-top: 13px + .hg-header-app-nav max-width: 58% overflow: hidden + margin-top: 4px h1 a, h1 a small - display: block overflow: hidden text-overflow: ellipsis white-space: nowrap + .hasjob-mobile-logo + height: 40px + width: 40px + margin: 5px 5px 0 0 + + .hasjob-large-logo + display: none + + .board-title + position: relative + top: -4px + .board-caption - position: absolute - left: 15px - right: 15px - top: 28px + position: relative + left: -50px + top: 14px + line-height: 1 .board-caption h1 a width: 100% @@ -116,12 +131,12 @@ header border-bottom: none #logo - +replace-text-with-dimensions('logo-star.png') + +replace-text-with-dimensions('~/static/img/logo-star.png') .filters-wrapper width: 100% background: #ebe7e4 - margin: 20px 0 0 + margin: 8px 0 0 label font-weight: normal @@ -212,6 +227,10 @@ header .job-filter-location-search-clear cursor: pointer +@media (min-width: 360px) + header #hgnav .board-caption + left: -60px + @media (min-width: 480px) header #hgnav .hg-header-app-nav max-width: 70% @@ -230,13 +249,34 @@ header #hgnav min-height: 0 + .hasjob-large-logo + height: 30px + width: 30px + margin: -4px 5px 0 0 + display: inline-block + + .hasjob-mobile-logo + display: none + + .btn-post-job + margin-top: 10px + + a#hg-login-btn + margin-top: 10px + + .nav>li>button + padding-top: 5px + margin-top: 0 + .container height: auto .hg-header-app-nav max-width: 76% + margin-top: 4px - .board-caption + .board-caption, + .board-title position: static .hg-header-app-nav h1 a small @@ -247,7 +287,7 @@ header .filters-wrapper width: 100% - padding: 10px 0 5px + padding: 2px 0 9px min-height: 0 margin: 0 @@ -291,6 +331,7 @@ header .filters padding: 0 10px 0 0 + margin-bottom: 0 width: 19.8% .filters-col1 diff --git a/hasjob/static/sass/_popup.sass b/hasjob/assets/sass/_popup.sass similarity index 97% rename from hasjob/static/sass/_popup.sass rename to hasjob/assets/sass/_popup.sass index 003fded9c..a729b5ec3 100644 --- a/hasjob/static/sass/_popup.sass +++ b/hasjob/assets/sass/_popup.sass @@ -41,7 +41,7 @@ top: -3.4em margin: 0 padding: 1em - @include box-shadow(0 2px 10px $color-shadow) + box-shadow: 0 2px 10px $color-shadow & > *:last-child margin-bottom: 0 diff --git a/hasjob/static/sass/_search.sass b/hasjob/assets/sass/_search.sass similarity index 100% rename from hasjob/static/sass/_search.sass rename to hasjob/assets/sass/_search.sass diff --git a/hasjob/static/sass/_sheet.sass b/hasjob/assets/sass/_sheet.sass similarity index 86% rename from hasjob/static/sass/_sheet.sass rename to hasjob/assets/sass/_sheet.sass index caa019b38..18e7fc5b5 100644 --- a/hasjob/static/sass/_sheet.sass +++ b/hasjob/assets/sass/_sheet.sass @@ -19,7 +19,7 @@ padding-right: 15px // background: #ebe7e4 border: none - +box-shadow(0 1px 5px $color-shadow, 0 0 10px rgba(0, 0, 0, 0.1) inset) + box-shadow: 0 1px 5px $color-shadow, 0 0 10px rgba(0, 0, 0, 0.1) inset .flash-interactive:before, .guide:before content: "" @@ -107,13 +107,13 @@ tr > div // Fix for ParsleyJS inserting div tags in table rows in the campaign e margin: 0 -15px word-wrap: break-word border-bottom: 1px solid $color-sheet-border - +box-shadow(0 2px 10px $color-shadow) + box-shadow: 0 2px 10px $color-shadow text-rendering: optimizeLegibility .nav-tabs-top background: #ebe7e4 border-bottom: 0 - +box-shadow(0 0 10px rgba(0,0,0,0.1) inset) + box-shadow: 0 0 10px rgba(0,0,0,0.1) inset & > li margin-bottom: 0 @@ -129,21 +129,21 @@ tr > div // Fix for ParsleyJS inserting div tags in table rows in the campaign e border-radius: 0 .nav-tabs-top>li.active>a - +box-shadow(0 10px 10px -10px rgba(0,0,0,0.1) inset) + box-shadow: 0 10px 10px -10px rgba(0,0,0,0.1) inset border: none .nav-tabs-top>li:first-child.active>a - +box-shadow(0 10px 10px -10px rgba(0,0,0,0.1) inset, 10px 0 10px -10px rgba(0,0,0,0.1) inset) + box-shadow: 0 10px 10px -10px rgba(0,0,0,0.1) inset, 10px 0 10px -10px rgba(0,0,0,0.1) inset .nav-tabs-top>li>a:hover - +box-shadow(0 10px 10px -10px rgba(0,0,0,0.1) inset, 0 -10px 10px -10px rgba(0,0,0,0.1) inset) + box-shadow: 0 10px 10px -10px rgba(0,0,0,0.1) inset, 0 -10px 10px -10px rgba(0,0,0,0.1) inset .nav-tabs-top>li.active>a:hover, .nav-tabs-top>li.active>a:focus - +box-shadow(0 10px 10px -10px rgba(0,0,0,0.1) inset) + box-shadow: 0 10px 10px -10px rgba(0,0,0,0.1) inset border: none .nav-tabs-top>li:first-child.active>a:hover, .nav-tabs-top>li:first-child.active>a:focus - +box-shadow(0 10px 10px -10px rgba(0,0,0,0.1) inset, 10px 0 10px -10px rgba(0,0,0,0.1) inset) + box-shadow: 0 10px 10px -10px rgba(0,0,0,0.1) inset, 10px 0 10px -10px rgba(0,0,0,0.1) inset .list-group margin: 0 -15px @@ -161,10 +161,10 @@ tr > div // Fix for ParsleyJS inserting div tags in table rows in the campaign e color: inherit .list-group-item:first-child - +border-top-radius(0) + border-top-radius: 0 .list-group-item:last-child - +border-bottom-radius(0) + border-bottom-radius: 0 margin-bottom: -1px .list-group-item.no-bottom-border @@ -262,8 +262,8 @@ tr > div // Fix for ParsleyJS inserting div tags in table rows in the campaign e padding: 14px 30px 1px margin: 12px 0 24px border: 1px solid $color-sheet-border - +border-radius(4px) - +box-shadow(0 2px 10px $color-shadow) + border-radius: 4px + box-shadow: 0 2px 10px $color-shadow .guide, .post-guide form @@ -275,15 +275,15 @@ tr > div // Fix for ParsleyJS inserting div tags in table rows in the campaign e .sheet margin: 12px 0 24px border: 1px solid $color-sheet-border - +border-radius(4px) - +box-shadow(0 2px 10px $color-shadow, 0 0 10px rgba(0, 0, 0, 0.1) inset) + border-radius: 4px + box-shadow: 0 2px 10px $color-shadow, 0 0 10px rgba(0, 0, 0, 0.1) inset .nav-tabs - +border-top-left-radius(4px) - +border-top-right-radius(4px) + border-top-left-radius: 4px + border-top-right-radius: 4px & > li > a - +border-radius(4px 4px 0 0) + border-radius: 4px 4px 0 0 .sheet + .post-guide margin-top: 0 diff --git a/hasjob/static/sass/_stickie.sass b/hasjob/assets/sass/_stickie.sass similarity index 63% rename from hasjob/static/sass/_stickie.sass rename to hasjob/assets/sass/_stickie.sass index 9e2459e0a..090a25474 100644 --- a/hasjob/static/sass/_stickie.sass +++ b/hasjob/assets/sass/_stickie.sass @@ -18,9 +18,9 @@ overflow: visible // To make shadow visible padding: 24px 0 0 word-wrap: break-word - +box-sizing(border-box) - +border-radius(2px) - +box-shadow(0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset) + box-sizing: border-box + border-radius: 2px + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset /* Make stickies clickable */ &, &:active, &:hover, &:visited, &:focus @@ -174,9 +174,9 @@ left: calc(50% - 5px) width: 10px height: 10px - +border-radius(5px) + border-radius: 5px background: $color-title-has - +box-shadow(0 2px 2px rgba(0, 0, 0, 0.2)) + box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) .stickie.grouped.under position: absolute @@ -186,11 +186,13 @@ bottom: 5px z-index: -3 overflow: hidden - +transition-duration(0.1s) - +transition-property(top, left, bottom, right) - +transition-timing-function(ease-out) + -webkit-transition: top, left, bottom, right .1s ease-out + -moz-transition: top, left, bottom, right .1s ease-out + -ms-transition: top, left, bottom, right .1s ease-out + -o-transition: top, left, bottom, right .1s ease-out + transition: top, left, bottom, right .1s ease-out &:before, &:after - +box-shadow(none) + box-shadow: none .headline display: block @@ -213,9 +215,11 @@ left: 15px right: 15px bottom: 0px - +transition-duration(0.1s) - +transition-property(top, left, bottom, right) - +transition-timing-function(ease-out) + -webkit-transition: top, left, bottom, right .1s ease-out + -moz-transition: top, left, bottom, right .1s ease-out + -ms-transition: top, left, bottom, right .1s ease-out + -o-transition: top, left, bottom, right .1s ease-out + transition: top, left, bottom, right .1s ease-out // Top left .no-touch li:hover > &:nth-of-type(1) @@ -281,7 +285,11 @@ .stickie .pstar color: $color-title-has cursor: pointer - +transition(opacity 0.2s ease-in-out) + -webkit-transition: opacity .2s ease-in-out + -moz-transition: opacity .2s ease-in-out + -ms-transition: opacity .2s ease-in-out + -o-transition: opacity .2s ease-in-out + transition: opacity .2s ease-in-out .stickie .pstar .fa-star-o opacity: 0.1 @@ -306,40 +314,72 @@ resize: none min-height: 0 padding: 0 - +box-shadow(none) - +transition(border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out) + box-shadow: none + -webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out + -moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out + -ms-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out + -o-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out + transition: oborder-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out &:hover, &:focus border-color: #66afe9 outline: 0 - +box-shadow(0 0 8px rgba(102,175,233,0.6)) - +transition(border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out) + box-shadow: 0 0 8px rgba(102,175,233,0.6) + -webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out + -moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out + -ms-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out + -o-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out + transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out #newpost_headline::-webkit-input-placeholder color: $color-stickie-main-text opacity: 1.0 - +transition(opacity 0.2s ease-in-out) + -webkit-transition: opacity .2s ease-in-out + -moz-transition: opacity .2s ease-in-out + -ms-transition: opacity .2s ease-in-out + -o-transition: opacity .2s ease-in-out + transition: opacity .2s ease-in-out #newpost_headline:focus::-webkit-input-placeholder opacity: 0.4 - +transition(opacity 0.2s ease-in-out) + -webkit-transition: opacity .2s ease-in-out + -moz-transition: opacity .2s ease-in-out + -ms-transition: opacity .2s ease-in-out + -o-transition: opacity .2s ease-in-out + transition: opacity .2s ease-in-out #newpost_headline::-moz-placeholder color: $color-stickie-main-text opacity: 1.0 - +transition(opacity 0.2s ease-in-out) + -webkit-transition: opacity .2s ease-in-out + -moz-transition: opacity .2s ease-in-out + -ms-transition: opacity .2s ease-in-out + -o-transition: opacity .2s ease-in-out + transition: opacity .2s ease-in-out #newpost_headline:focus::-moz-placeholder opacity: 0.4 - +transition(opacity 0.2s ease-in-out) + -webkit-transition: opacity .2s ease-in-out + -moz-transition: opacity .2s ease-in-out + -ms-transition: opacity .2s ease-in-out + -o-transition: opacity .2s ease-in-out + transition: opacity .2s ease-in-out #newpost_headline:-ms-input-placeholder color: $color-stickie-main-text opacity: 1.0 - +transition(opacity 0.2s ease-in-out) + -webkit-transition: opacity .2s ease-in-out + -moz-transition: opacity .2s ease-in-out + -ms-transition: opacity .2s ease-in-out + -o-transition: opacity .2s ease-in-out + transition: opacity .2s ease-in-out #newpost_headline:focus:-ms-input-placeholder opacity: 0.4 - +transition(opacity 0.2s ease-in-out) + -webkit-transition: opacity .2s ease-in-out + -moz-transition: opacity .2s ease-in-out + -ms-transition: opacity .2s ease-in-out + -o-transition: opacity .2s ease-in-out + transition: opacity .2s ease-in-out #newpost_details // position: relative @@ -368,10 +408,10 @@ width: 50% height: 20% max-width: 300px - +box-shadow(0 15px 10px $color-shadow) - +rotate(-3deg) + box-shadow: 0 15px 10px $color-shadow + rotate: -3deg &:after right: 10px left: auto - +rotate(3deg) + rotate: 3deg diff --git a/hasjob/static/sass/app.sass b/hasjob/assets/sass/app.sass similarity index 76% rename from hasjob/static/sass/app.sass rename to hasjob/assets/sass/app.sass index 24b8c083b..6d14c19f7 100644 --- a/hasjob/static/sass/app.sass +++ b/hasjob/assets/sass/app.sass @@ -1,4 +1,4 @@ -@import "compass" +@import ../node_modules/compass-mixins/lib/compass @import "colors" @import "fonts" @import "header" diff --git a/hasjob/assets/service-worker-template.js b/hasjob/assets/service-worker-template.js new file mode 100644 index 000000000..b048cdb20 --- /dev/null +++ b/hasjob/assets/service-worker-template.js @@ -0,0 +1,85 @@ +importScripts('https://unpkg.com/workbox-sw@2.1.2/build/importScripts/workbox-sw.prod.v2.1.2.js'); + +const workboxSW = new self.WorkboxSW({ + "cacheId": "hasjob", + "skipWaiting": true, + "clientsClaim": true +}); + +workboxSW.precache([]); + +workboxSW.router.registerRoute(/^https?\:\/\/static.*/, workboxSW.strategies.networkFirst({ + "cacheName": "assets" +}), 'GET'); + +//For development setup caching of assets +workboxSW.router.registerRoute(/^http:\/\/localhost:5000\/static/, workboxSW.strategies.networkFirst({ + "cacheName": "baseframe-local" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?\:\/\/ajax.googleapis.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "cdn-libraries" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/cdnjs.cloudflare.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "cdn-libraries" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/images\.hasgeek\.com\/embed\/file\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "images" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/hasgeek.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "images" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/hasjob.co\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "images" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/fonts.googleapis.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "fonts" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/fonts.gstatic.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "fonts" +}), 'GET'); + +/* The service worker handles all fetch requests. If fetching of job post page or +other pages fails due to a network error, it will return the cached "offline" page. +*/ +workboxSW.router.registerRoute('/(.*)', args => { + return workboxSW.strategies.networkFirst({cacheName: 'routes'}).handle(args).then(response => { + if (!response) { + return caches.match('/offline'); + } + return response; + }); +}); + +// https://googlechrome.github.io/samples/service-worker/custom-offline-page/ +function createCacheBustedRequest(url) { + let request = new Request(url, {cache: 'reload'}); + // See https://fetch.spec.whatwg.org/#concept-request-mode + /* This is not yet supported in Chrome as of M48, so we need to + explicitly check to see if the cache: 'reload' option had any effect.*/ + if ('cache' in request) { + return request; + } + + // If {cache: 'reload'} didn't have any effect, append a cache-busting URL parameter instead. + let bustedUrl = new URL(url, self.location.href); + bustedUrl.search += (bustedUrl.search ? '&' : '') + 'cachebust=' + Date.now(); + return new Request(bustedUrl); +} + +// Cache the offline page during install phase of the service worker +self.addEventListener('install', event => { + event.waitUntil( + fetch(createCacheBustedRequest('/api/1/template/offline')).then(function(response) { + return caches.open('hasjob-offline').then(function(cache) { + return cache.put('offline', response); + }); + }) + ); +}); diff --git a/hasjob/assets/webpack.config.js b/hasjob/assets/webpack.config.js new file mode 100644 index 000000000..ecb7ca923 --- /dev/null +++ b/hasjob/assets/webpack.config.js @@ -0,0 +1,114 @@ +var webpack = require('webpack'); +var path = require('path'); +var dev = process.env.NODE_ENV === "development"; +var extractTextPlugin = require('extract-text-webpack-plugin'); +var cleanWebpackPlugin = require('clean-webpack-plugin'); +var workboxPlugin = require('workbox-webpack-plugin'); +var copyWebpackPlugin = require('copy-webpack-plugin'); + +function ManifestPlugin(options){ + this.manifestPath = options.manifestPath ? options.manifestPath : '../static/build/manifest.json'; +} + +ManifestPlugin.prototype.apply = function(compiler) { + compiler.plugin('done', stats => { + var stats_json = stats.toJson(); + var parsed_stats = { + assets: stats_json.assetsByChunkName, + } + Object.keys(parsed_stats.assets).forEach(function(key) { + if(typeof(parsed_stats.assets[key]) == "object") { + for(var index in parsed_stats.assets[key]) { + if(parsed_stats.assets[key][index].indexOf('.js') === -1 && + parsed_stats.assets[key][index].indexOf('stylesheet') > -1) { + parsed_stats.assets[key] = parsed_stats.assets[key][index]; + } + } + } + }); + require('fs').writeFileSync( + path.join(__dirname, this.manifestPath), + JSON.stringify(parsed_stats) + ); + }); +} + + +module.exports = { + context: __dirname, + devtool: dev ? "inline-sourcemap" : false, + watch: dev ? true : false, + resolve: { + modules: [ + __dirname + '/node_modules' + ] + }, + entry: { + "app": path.resolve(__dirname, "js/app.js"), + "app-css": path.resolve(__dirname, "sass/app.sass") + }, + output: { + path: path.resolve(__dirname, "../static/build"), + publicPath: "/static/build/", + filename: dev ? "js/[name].js" : "js/[name].[hash].js" + }, + module: { + loaders: [ + { + test: /\.js$/, + loader: 'babel-loader', + query: { + presets: [ + 'babel-preset-es2015', + ].map(require.resolve), + } + }, + { + test: /\.css$/, + loader: extractTextPlugin.extract({use: ['css-loader']}), + }, + { + test: /\.(sass|scss)$/, + loader: extractTextPlugin.extract({ fallback: 'style-loader', use:['css-loader','sass-loader'] }), + }, + { + test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/, + loader: 'file-loader?name=assets/[name].[hash].[ext]' + }] + }, + plugins: dev ? [new ManifestPlugin({manifestPath: ''})] : [ + new cleanWebpackPlugin(['build'], {root: path.join(__dirname, '../static')}), + new extractTextPlugin('css/stylesheet-[name].[hash].css'), //is used for generating css file bundles + new ManifestPlugin({manifestPath: ''}), + new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: true }), + // keep module.id stable when vender modules does not change + new webpack.HashedModuleIdsPlugin(), + // split vendor js into its own file + new webpack.optimize.CommonsChunkPlugin({ + name: 'vendor', + minChunks: function (module) { + // any required modules inside node_modules are extracted to vendor + return ( + module.resource && + /\.js$/.test(module.resource) && + module.resource.indexOf( + path.join(__dirname, '/node_modules') + ) === 0 + ) + } + }), + // extract webpack runtime and module manifest to its own file in order to + // prevent vendor hash from being updated whenever app bundle is updated + new webpack.optimize.CommonsChunkPlugin({ + name: 'manifest', + chunks: ['vendor'] + }), + new workboxPlugin({ + globDirectory: path.resolve(__dirname, "../static/build"), + globPatterns: ['**/*.{js,css}'], + globIgnores: ['**/app-css.*.js', '**/manifest.json'], + swSrc: path.resolve(__dirname, "service-worker-template.js"), + swDest: path.resolve(__dirname, "../static/service-worker.js"), + }) + ], +}; diff --git a/hasjob/static/build/css/stylesheet-app-css.570e2b3dc55e56c21c0b.css b/hasjob/static/build/css/stylesheet-app-css.570e2b3dc55e56c21c0b.css new file mode 100644 index 000000000..0eeada351 --- /dev/null +++ b/hasjob/static/build/css/stylesheet-app-css.570e2b3dc55e56c21c0b.css @@ -0,0 +1,1161 @@ +@charset "UTF-8"; +body { + font-family: "Fira Sans", arial, sans-serif; + background: #e8e7e6 url("/static/img/canvas.jpg"); } + +header { + margin-bottom: 0; + min-height: 103px; } + header h1 { + color: #df5e0e; + font-size: 16px; + margin-top: 10px; + margin-bottom: 10px; } + header h1 small { + display: inline-block; + color: #816894; + font-size: 70%; + font-weight: bold; } + header h1 a, header h1 a:hover, header h1 a:focus, header h1 a:active, header h1 a:visited { + color: inherit; + text-decoration: none; + border-bottom: none; } + header #hgnav { + background: #ebe7e4; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); + min-height: 62px; } + header #hgnav .container { + position: relative; + height: 103px; + background: #ebe7e4; } + header #hgnav .btn-post-job { + background-color: #816894; + border-color: #816894; + border-bottom: 2px solid #554562; + margin-top: 15px; + margin-right: 4px; + padding: 0 15px; + color: #fff; } + header #hgnav .btn-post-job:hover { + background-color: #725c83; } + header #hgnav a#hg-login-btn { + margin-top: 19px; } + header #hgnav .nav > li > button { + margin-top: 13px; } + header #hgnav .hg-header-app-nav { + max-width: 58%; + overflow: hidden; + margin-top: 4px; } + header #hgnav .hg-header-app-nav h1 a, header #hgnav .hg-header-app-nav h1 a small { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } + header #hgnav .hasjob-mobile-logo { + height: 40px; + width: 40px; + margin: 5px 5px 0 0; } + header #hgnav .hasjob-large-logo { + display: none; } + header #hgnav .board-title { + position: relative; + top: -4px; } + header #hgnav .board-caption { + position: relative; + left: -50px; + top: 14px; + line-height: 1; } + header #hgnav .board-caption h1 a { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + background-image: none; } + header #hgnav h1 { + margin: 0; } + header #hgnav .hg-site-nav { + clear: both; } + header #hgnav .search-field { + font-family: "Fira Sans", arial, sans-serif, FontAwesome; } + header #hgnav .filter-dropdown { + position: absolute; + top: -500px; + left: 0; + width: 100%; + margin: 0; + -webkit-transition: top 0.25s linear, z-index 0.1s step-start; + -moz-transition: top 0.25s linear, z-index 0.1s step-start; + -ms-transition: top 0.25s linear, z-index 0.1s step-start; + -o-transition: top 0.25s linear, z-index 0.1s step-start; + transition: top 0.25s linear, z-index 0.1s step-start; + z-index: -1; + background: #ebe7e4; + padding-bottom: 15px; + box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.4); } + header #hgnav .filter-dropdown.active { + top: 96px; + -webkit-transition: top 0.25s linear, z-index 0.25s step-end; + -moz-transition: top 0.25s linear, z-index 0.25s step-end; + -ms-transition: top 0.25s linear, z-index 0.25s step-end; + -o-transition: top 0.25s linear, z-index 0.25s step-end; + transition: top 0.25s linear, z-index 0.25s step-end; + z-index: 1; } + header #hgnav .dropdown-backdrop { + display: none; } + header #hgnav .fa { + width: 14px; } + +#page-header { + border-bottom: none; } + +#logo { + text-indent: -119988px; + overflow: hidden; + text-align: left; + background-image: url("/static/img/logo-star.png"); + background-repeat: no-repeat; + background-position: 50% 50%; + width: image-width("~/static/img/logo-star.png"); + height: image-height("~/static/img/logo-star.png"); } + +.filters-wrapper { + width: 100%; + background: #ebe7e4; + margin: 8px 0 0; } + .filters-wrapper label { + font-weight: normal; + font-size: 14px; } + .filters-wrapper .btn { + text-align: left; + padding: 6px 0; + border: 1px solid #ccc; + font-size: 14px; + border-radius: 3px; + text-overflow: ellipsis; } + .filters-wrapper .btn .multiselect-selected-text { + padding-left: 10px; } + .filters-wrapper .btn:hover { + border: 1px solid #adadad; } + .filters-wrapper .pay-field { + padding-left: 10px; } + .filters-wrapper .submit-btn { + padding: 6px 10px; + display: block; } + .filters-wrapper .submit-btn i { + margin-right: 5px; } + .filters-wrapper .filter-select { + width: 100%; + padding-left: 10px; + font-size: 14px; + height: auto; + border-radius: 3px; } + .filters-wrapper .dropdown-menu > li > a:hover { + background-color: #f5f5f5; } + .filters-wrapper .dropdown-menu > .active > a { + color: #333; + background-color: inherit; } + .filters-wrapper ul.multiselect-container { + overflow: auto; + width: 100%; + padding: 5px 0; + left: 0; } + .filters-wrapper .multiselect-container label.checkbox, .filters-wrapper .multiselect-container label.radio { + padding: 5px 0 5px 30px; + width: 100%; } + +.filters { + margin-bottom: 5px; } + .filters ul.dropdown-menu { + max-height: 68vh; } + +.pay-filter-dropdown { + width: 100%; + padding: 5px 0; + margin-top: 0; + left: 0; } + .pay-filter-dropdown li { + padding: 5px 10px; } + +.currency-checkbox { + float: left; + width: 25%; } + +.equity-label { + width: 100%; + cursor: pointer; } + +.pay-filter-slider { + margin: 5px auto; } + +.pay-filter-slider .noUi-horizontal { + padding-right: 32px; } + +.pay-filter-slider .noUi-horizontal .noUi-handle { + left: -1px; } + +.pay-filter-slider .noUi-horizontal .noUi-origin { + right: -32px; } + +.job-filter-location-search-clear { + cursor: pointer; } + +@media (min-width: 360px) { + header #hgnav .board-caption { + left: -60px; } } + +@media (min-width: 480px) { + header #hgnav .hg-header-app-nav { + max-width: 70%; } } + +@media (min-width: 768px) { + header { + margin-bottom: 110px; + min-height: 36px; } + header h1 { + font-size: 25px; } + header h1 small { + display: inline; } + header #hgnav { + min-height: 0; } + header #hgnav .hasjob-large-logo { + height: 30px; + width: 30px; + margin: -4px 5px 0 0; + display: inline-block; } + header #hgnav .hasjob-mobile-logo { + display: none; } + header #hgnav .btn-post-job { + margin-top: 10px; } + header #hgnav a#hg-login-btn { + margin-top: 10px; } + header #hgnav .nav > li > button { + padding-top: 5px; + margin-top: 0; } + header #hgnav .container { + height: auto; } + header #hgnav .hg-header-app-nav { + max-width: 76%; + margin-top: 4px; } + header #hgnav .board-caption, + header #hgnav .board-title { + position: static; } + header #hgnav .hg-header-app-nav h1 a small { + display: inline; } + header #hgnav .hg-site-nav { + margin: 0; } + header #hgnav .filters-wrapper { + width: 100%; + padding: 2px 0 9px; + min-height: 0; + margin: 0; } + header #hgnav .filters-wrapper ul.multiselect-container { + width: 20em; } + header #hgnav .filters-wrapper .pay-filter-dropdown { + width: 190%; + left: 0; + right: auto; } + header #hgnav .filters-wrapper li.unavailable label { + font-style: italic; + color: #888; } } + +@media (min-width: 768px) and (max-width: 991px) { + .category-filter ul.multiselect-container { + right: 0; + left: auto; } } + +@media (min-width: 992px) and (max-width: 1199px) { + .filters-wrapper .pay-filter-dropdown { + right: 0; + left: auto; } } + +@media (min-width: 1200px) { + header { + margin-bottom: 70px; } + header #hgnav .hg-header-app-nav { + max-width: 90%; } + .filters-wrapper { + padding-bottom: 4px; } + .filters-wrapper .submit-btn { + text-align: center; + padding: 6px 0; + width: 100%; + margin-top: -2px; } + .filters { + padding: 0 10px 0 0; + margin-bottom: 0; + width: 19.8%; } + .filters-col1 { + padding-left: 15px; } + .submit-filters { + width: 6.2%; + padding: 0; } } + +#nprogress .bar { + background: #df5e0e; } + +#nprogress .peg { + box-shadow: 0 0 10px #df5e0e, 0 0 5px #df5e0e; } + +#nprogress .spinner-icon { + border-top-color: #df5e0e; + border-left-color: #df5e0e; } + +.input-group-btn > .btn { + border-bottom: 1px solid #ccc; } + .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { + border-bottom-color: #adadad; } + +#search { + margin-top: 14px; + margin-bottom: 12px; + line-height: 36px; } + #search input[type="text"] { + background: white image-url("search.png") 4px center no-repeat; + padding: 7px 10px 3px 20px; } + #search .btn { + padding: 7px 10px 3px; } + +@media screen and (min-width: 768px) { + #search { + float: right; } } + +#root { + margin-bottom: -107px; } + +#root_footer { + height: 97px; } + +footer { + min-height: 97px; + text-rendering: optimizeLegibility; } + +footer .footer-inner { + background: #ebe7e4; + box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.4); } + +footer .container { + padding-bottom: 0; } + +@media (min-width: 468px) and (max-width: 1199px) { + #root { + margin-bottom: -86px; } + #root_footer { + height: 76px; } + footer { + min-height: 76px; } } + +@media (min-width: 1200px) { + #root { + margin-bottom: -67px; } + #root_footer { + height: 57px; } + footer { + min-height: 57px; } } + +.flash, .guide, .post-guide { + background: #fff; + position: relative; + margin: 0 -15px; + padding: 14px 15px 1px; + border-top: 1px solid #afafaf; + border-bottom: 1px solid #afafaf; } + .flash h2, .guide h2, .post-guide h2 { + margin: 0; } + .flash .close, .guide .close, .post-guide .close { + position: absolute; + top: 2px; + right: 5px; } + +.flash.info { + padding-left: 15px; + padding-right: 15px; + border: none; + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1) inset; } + +.flash-interactive:before, .guide:before { + content: ""; + display: block; + position: absolute; + bottom: -21px; + left: 30px; + width: 0; + height: 0; + border: 10px solid transparent; + border-top-color: #afafaf; } + +/* creates the smaller triangle */ +.flash-interactive:after, .guide:after { + content: ""; + display: block; + position: absolute; + bottom: -20px; + left: 30px; + width: 0; + height: 0; + border: 10px solid transparent; + border-top-color: #fff; } + +.post-guide:before { + content: ""; + display: block; + position: absolute; + top: -21px; + left: 30px; + width: 0; + height: 0; + border: 10px solid transparent; + border-bottom-color: #afafaf; } + +/* creates the smaller triangle */ +.post-guide:after { + content: ""; + display: block; + position: absolute; + top: -20px; + left: 30px; + width: 0; + height: 0; + border: 10px solid transparent; + border-bottom-color: #fff; } + +h1 { + color: #df5e0e; + font-size: 30px; + margin-bottom: 0; } + +h1 small, h2 small, h3 small { + font-weight: bold; } + +.img-container { + text-align: center; } + .img-container img { + max-width: 100%; } + +.label { + padding: 0 0.6em; } + +.tab-download { + font-size: smaller; + margin: 12px 0 0.25em; } + +.c3 svg { + font-family: inherit !important; } + +tr > div { + display: none; } + +.list-group-item .badge { + float: right; } + +.badge-new { + background-color: #428bca; } + +.sheet { + background: #fff; + margin: 0 -15px; + word-wrap: break-word; + border-bottom: 1px solid #afafaf; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); + text-rendering: optimizeLegibility; } + .sheet .nav-tabs-top { + background: #ebe7e4; + border-bottom: 0; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1) inset; } + .sheet .nav-tabs-top > li { + margin-bottom: 0; + float: left; + margin-left: 0; + margin-right: 0; } + .sheet .nav-tabs-top > li > a { + color: inherit; + font-variant: small-caps; + text-transform: lowercase; + border: none; + border-radius: 0; } + .sheet .nav-tabs-top > li.active > a { + box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset; + border: none; } + .sheet .nav-tabs-top > li:first-child.active > a { + box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 10px 0 10px -10px rgba(0, 0, 0, 0.1) inset; } + .sheet .nav-tabs-top > li > a:hover { + box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 0 -10px 10px -10px rgba(0, 0, 0, 0.1) inset; } + .sheet .nav-tabs-top > li.active > a:hover, .sheet .nav-tabs-top > li.active > a:focus { + box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset; + border: none; } + .sheet .nav-tabs-top > li:first-child.active > a:hover, .sheet .nav-tabs-top > li:first-child.active > a:focus { + box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 10px 0 10px -10px rgba(0, 0, 0, 0.1) inset; } + .sheet .list-group { + margin: 0 -15px; + font-size: 80%; } + .sheet .badge { + font-size: inherit; } + .sheet .list-group-item { + border-left: none; + border-right: none; + background-color: inherit; } + .sheet a.list-group-item { + color: inherit; } + .sheet .list-group-item:first-child { + border-top-radius: 0; } + .sheet .list-group-item:last-child { + border-bottom-radius: 0; + margin-bottom: -1px; } + .sheet .list-group-item.no-bottom-border { + border-bottom: 0; + margin-bottom: 0; } + .sheet .alert { + margin-bottom: 12px; } + .sheet form { + margin-bottom: 12px; } + +.sheet .table, .post-guide .table { + margin-bottom: 12px; } + .sheet .table th:first-child, .sheet .table td:first-child, .post-guide .table th:first-child, .post-guide .table td:first-child { + padding-left: 0; } + .sheet .table th:last-child, .sheet .table td:last-child, .post-guide .table th:last-child, .post-guide .table td:last-child { + padding-right: 0; } + +.sheet + .post-guide { + margin-top: -1px; } + +.post-company-logo { + text-align: center; } + +.section { + *zoom: 1; + border-top: 1px solid #ddd; + padding: 12px 15px 0; + margin-bottom: 0; } + .section:after { + content: ""; + display: table; + clear: both; } + .section.first { + border-top: none; } + .section.unmarked { + border-top: none; + padding-top: 0; } + .section h1:first-child, .section h2:first-child, .section h3:first-child { + margin-top: 0; } + +.post-date { + font-size: 75%; + line-height: 24px; + color: #666; } + +.form-horizontal .help-required { + display: none; } + +.sliderholder { + padding-top: 15px; + float: none; + clear: both; + margin: auto; } + +.cash-slider, .equity-slider { + position: relative; } + +.max-field { + position: absolute; + top: 0; + right: 0; } + +.sliderholder .noUi-horizontal { + padding-right: 32px; } + +.sliderholder .noUi-horizontal .noUi-handle { + left: -1px; } + +.sliderholder .noUi-horizontal .noUi-origin { + right: -32px; } + +#banner-bottom { + margin: 0 0 24px 30px; } + +@media screen and (max-width: 767px) { + .input-xs-small { + font-size: 13px; } } + +@media screen and (min-width: 768px) { + .form-horizontal .control-label { + text-align: left; } + .post-company-logo { + text-align: right; } + .post-company-logo img { + margin-bottom: 12px; } + .flash, .guide, .post-guide { + padding: 14px 30px 1px; + margin: 12px 0 24px; + border: 1px solid #afafaf; + border-radius: 4px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); } + .guide form, .post-guide form { + margin-bottom: 12px; } + .flash.info { + margin-bottom: 24px; } + .sheet { + margin: 12px 0 24px; + border: 1px solid #afafaf; + border-radius: 4px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1) inset; } + .sheet .nav-tabs { + border-top-left-radius: 4px; + border-top-right-radius: 4px; } + .sheet .nav-tabs > li > a { + border-radius: 4px 4px 0 0; } + .sheet + .post-guide { + margin-top: 0; } + .section { + padding: 12px 30px 0; } + .sliderholder { + padding-top: 10px; + float: left; + clear: none; } } + +@media screen and (min-width: 992px) { + .sheet .list-group { + margin: -12px -30px 20px -15px; + margin-top: -12px; + margin-right: -30px; } + .sheet .list-group-item { + padding-right: 30px; } + .sheet .list-group-item:first-child { + border-top: none; } } + +.sheet .list-group-item a.popup { + color: inherit; + display: block; + margin: -10px -15px; + padding: 10px 15px; } + +.sheet .list-group-item a.popup:hover, .sheet .list-group-item a.popup:focus { + text-decoration: none; + background-color: #f5f5f5; } + +.popup-box { + display: none; } + +.popup-box:target { + display: block; } + +.close-popup { + display: inline; + position: absolute; + top: 2px; + right: 4px; + margin: 0; + padding: 0; } + +@media screen and (min-width: 768px) { + .sheet .list-group-item a.popup { + margin-right: -30px; + padding-right: 30px; } + .popup-box { + background: #fff; + border: 1px solid #afafaf; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + position: absolute; + width: 23em; + right: 105%; + top: -3.4em; + margin: 0; + padding: 1em; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); } + .popup-box > *:last-child { + margin-bottom: 0; } + .popup-box .close-popup { + display: none; } + .no-js .popup-box .close-popup { + display: inline; } + .popup-box h2 { + margin: 0; } + .popup-box form { + margin-bottom: 0; } + .popup-box form ul { + margin: 0; } + .popup-box form ul li { + border-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; } + .popup-box form ul li label { + padding-left: 0.25em; } + .popup-box form ul li li.selected { + background-color: #f0a40c; } + .popup-box:before { + content: ""; + display: block; + position: absolute; + right: -21px; + top: 4em; + width: 0; + height: 0; + border: 10px solid transparent; + border-left-color: #afafaf; } + .popup-box:after { + content: ""; + display: block; + position: absolute; + right: -20px; + top: 4em; + width: 0; + height: 0; + border: 10px solid transparent; + border-left-color: #fff; } } + +#stickie-area { + margin-top: 12px; + padding-left: 0; + list-style: none; + margin-bottom: 0; } + #stickie-area > li { + margin-bottom: 20px; + float: none; + display: block; + vertical-align: top; } + +.stickie { + background: #ffffa2; + position: relative; + vertical-align: top; + display: block; + overflow: visible; + padding: 24px 0 0; + word-wrap: break-word; + box-sizing: border-box; + border-radius: 2px; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset; + /* Make stickies clickable */ } + .stickie, .stickie:active, .stickie:hover, .stickie:visited, .stickie:focus { + text-decoration: none; + color: inherit; + border-bottom: 0; } + .stickie label { + font-weight: normal; } + .stickie .annotation { + font-size: 75%; + display: block; + position: absolute; + color: #816894; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + height: 1.5em; } + .stickie .top-right { + top: .1em; + right: .5em; } + .stickie .top-left { + top: .1em; + left: .5em; + width: 75%; } + .stickie .headline, + .stickie .pay { + display: block; + padding: 0 18px; + position: static; } + .stickie .headline { + font-family: "McLaren", sans-serif; } + .stickie .star { + position: static; + float: left; + width: 20%; + margin-left: 0.5em; } + .stickie .new { + color: #df5e0e; } + .stickie .company-name { + position: static; + float: right; + width: 70%; + text-align: right; + margin-right: 0.5em; } + .stickie .count { + margin-top: 5px; + color: #816894; + display: flex; } + .stickie .count-items { + flex: 1; + font-size: 9px; } + .stickie .count-text { + display: inline-block; + width: calc(100% - 6px); } + .stickie .count-items.impressions { + flex: 1.5; } + .stickie .count-arrow { + float: right; } + .stickie .count-text, + .stickie .count-arrow { + font-size: 10px; } + @media (min-width: 480px) { + .stickie .count-text, + .stickie .count-arrow { + font-size: 14px; } } + @media (min-width: 768px) { + .stickie .count-text, + .stickie .count-arrow { + font-size: 7px; } + .stickie .count-arrow { + margin-top: 2px; } } + @media (min-width: 1200px) { + .stickie .count-text, + .stickie .count-arrow { + font-size: 8px; } + .stickie .count-arrow { + margin-top: 1px; } } + .stickie .count-background { + display: flex; + height: 7px; + margin-top: 4px; + border-radius: 0 0 2px 2px; + overflow: hidden; + padding: 0; + list-style: none; } + .stickie .count-background .background { + flex: 1; + height: 100%; + margin: 0; + padding: 0; } + .stickie .count-background .impressions.background { + flex: 1.5; + position: relative; + z-index: 4; } + .stickie .count-background .viewed.background { + position: relative; + z-index: 3; } + .stickie .count-background .opened.background { + position: relative; + z-index: 2; } + .stickie .count-background .applied.background { + position: relative; + z-index: 1; } + .stickie .count-background .background.arrow:before { + content: ''; + display: inline-block; + width: 7px; + height: 7px; + border-style: solid; + border-width: 2px 2px 0 0; + border-color: #ffffa2; + position: absolute; + top: 0; + right: -2px; + vertical-align: top; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); } + .stickie .pinned { + text-indent: -10000px; + display: block; + position: absolute; + top: -4px; + left: 135px; + left: calc(50% - 5px); + width: 10px; + height: 10px; + border-radius: 5px; + background: #df5e0e; + box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); } + +.stickie.grouped.under { + position: absolute; + top: -5px; + left: 10px; + right: 20px; + bottom: 5px; + z-index: -3; + overflow: hidden; + -webkit-transition: top, left, bottom, right .1s ease-out; + -moz-transition: top, left, bottom, right .1s ease-out; + -ms-transition: top, left, bottom, right .1s ease-out; + -o-transition: top, left, bottom, right .1s ease-out; + transition: top, left, bottom, right .1s ease-out; } + .stickie.grouped.under:before, .stickie.grouped.under:after { + box-shadow: none; } + .stickie.grouped.under .headline { + display: block; + overflow: hidden; + position: absolute; + top: 1.5em; + bottom: 1.5em; + left: 1.5em; + right: 1.5em; } + .stickie.grouped.under .count-background { + position: absolute; + bottom: 0; + width: 100%; } + .no-touch li:hover > .stickie.grouped.under { + top: 0px; + left: 15px; + right: 15px; + bottom: 0px; + -webkit-transition: top, left, bottom, right .1s ease-out; + -moz-transition: top, left, bottom, right .1s ease-out; + -ms-transition: top, left, bottom, right .1s ease-out; + -o-transition: top, left, bottom, right .1s ease-out; + transition: top, left, bottom, right .1s ease-out; } + .no-touch li:hover > .stickie.grouped.under:nth-of-type(1) { + top: -15px; + left: 0px; + right: 30px; + bottom: 15px; } + .no-touch li:hover > .stickie.grouped.under:nth-of-type(2) { + top: 15px; + left: 30px; + right: 0px; + bottom: -15px; } + .no-touch li:hover > .stickie.grouped.under:nth-of-type(3) { + top: -10px; + left: 20px; + right: 5px; + bottom: 10px; } + .no-touch li:hover > .stickie.grouped.under:nth-of-type(4) { + top: 10px; + left: 5px; + right: 25px; + bottom: -10px; } + .no-touch li:hover > .stickie.grouped.under:nth-of-type(5) { + top: -25px; + left: 15px; + right: 15px; + bottom: 25px; } + +.stickiead { + padding: 0; + text-align: center; } + +.stickie.special { + background-color: #f6f6f6; + padding: 24px 18px; } + +.stickie.org { + background-color: #fff; + text-align: center; + font-family: "Fira Sans", arial, sans-serif; } + .stickie.org img { + max-width: 100%; + height: auto; + max-height: 100px; + padding-bottom: 5px; } + +.stickie.announcement { + background-color: #ffff2c; } + +.stickie .pstar { + color: #df5e0e; + cursor: pointer; + -webkit-transition: opacity .2s ease-in-out; + -moz-transition: opacity .2s ease-in-out; + -ms-transition: opacity .2s ease-in-out; + -o-transition: opacity .2s ease-in-out; + transition: opacity .2s ease-in-out; } + +.stickie .pstar .fa-star-o { + opacity: 0.1; } + +.stickie:hover .pstar .fa-star-o { + opacity: 0.3; } + +.stickie .pstar .fa-star-o:hover { + opacity: 1.0; } + +.stickie .pstar .fa-spin { + opacity: 1.0; } + +#newpost { + font-family: inherit; } + +#newpost_headline { + font-family: "McLaren", sans-serif; + width: 100%; + border: 0; + background-color: #f6f6f6; + resize: none; + min-height: 0; + padding: 0; + box-shadow: none; + -webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; + -moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; + -ms-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; + -o-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; + transition: oborder-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; } + #newpost_headline:hover, #newpost_headline:focus { + border-color: #66afe9; + outline: 0; + box-shadow: 0 0 8px rgba(102, 175, 233, 0.6); + -webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; + -moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; + -ms-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; + -o-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; + transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; } + +#newpost_headline::-webkit-input-placeholder { + color: #555; + opacity: 1.0; + -webkit-transition: opacity .2s ease-in-out; + -moz-transition: opacity .2s ease-in-out; + -ms-transition: opacity .2s ease-in-out; + -o-transition: opacity .2s ease-in-out; + transition: opacity .2s ease-in-out; } + +#newpost_headline:focus::-webkit-input-placeholder { + opacity: 0.4; + -webkit-transition: opacity .2s ease-in-out; + -moz-transition: opacity .2s ease-in-out; + -ms-transition: opacity .2s ease-in-out; + -o-transition: opacity .2s ease-in-out; + transition: opacity .2s ease-in-out; } + +#newpost_headline::-moz-placeholder { + color: #555; + opacity: 1.0; + -webkit-transition: opacity .2s ease-in-out; + -moz-transition: opacity .2s ease-in-out; + -ms-transition: opacity .2s ease-in-out; + -o-transition: opacity .2s ease-in-out; + transition: opacity .2s ease-in-out; } + +#newpost_headline:focus::-moz-placeholder { + opacity: 0.4; + -webkit-transition: opacity .2s ease-in-out; + -moz-transition: opacity .2s ease-in-out; + -ms-transition: opacity .2s ease-in-out; + -o-transition: opacity .2s ease-in-out; + transition: opacity .2s ease-in-out; } + +#newpost_headline:-ms-input-placeholder { + color: #555; + opacity: 1.0; + -webkit-transition: opacity .2s ease-in-out; + -moz-transition: opacity .2s ease-in-out; + -ms-transition: opacity .2s ease-in-out; + -o-transition: opacity .2s ease-in-out; + transition: opacity .2s ease-in-out; } + +#newpost_headline:focus:-ms-input-placeholder { + opacity: 0.4; + -webkit-transition: opacity .2s ease-in-out; + -moz-transition: opacity .2s ease-in-out; + -ms-transition: opacity .2s ease-in-out; + -o-transition: opacity .2s ease-in-out; + transition: opacity .2s ease-in-out; } + +#newpost_details { + margin-top: 12px; + margin-bottom: -12px; + text-align: right; } + +#loadmore { + margin-bottom: 24px; + text-align: center; } + +@media screen and (min-width: 768px) { + #stickie-area > li { + display: inline-block; + margin-bottom: 30px; } + .stickie:before, .stickie:after { + content: ""; + position: absolute; + z-index: -2; + bottom: 15px; + left: 10px; + width: 50%; + height: 20%; + max-width: 300px; + box-shadow: 0 15px 10px rgba(0, 0, 0, 0.4); + rotate: -3deg; } + .stickie:after { + right: 10px; + left: auto; + rotate: 3deg; } } + +#main-40x { + text-align: center; } + +#stickie-40x { + background-color: #ffffa2; + float: none; + display: inline-block; + text-align: center; + width: auto; + margin: 24px 0; + padding: 24px 18px; } + +#i40x { + font-size: 150px; + font-weight: bold; + letter-spacing: -0.2em; + margin-left: -0.2em; } + +#i40x.offline { + font-size: 80px; + letter-spacing: 0; + margin-left: 0em; + margin-right: 0; } + +#i40x:after { + display: block; + color: #f0a40c; + content: "\FE35"; + margin-top: -0.75em; } + +.i4 { + color: #df5e0e; + position: relative; } + +.i0 { + color: #f0a40c; + z-index: -1; } + +.i5 { + color: #816894; + position: relative; } + +#i40x-message { + font-family: "McLaren", sans-serif; + color: #816894; + max-width: 400px; } + +/*! +https://github.com/daneden/animate.css +Animate.css - http://daneden.me/animate +Licensed under the MIT license - http://opensource.org/licenses/MIT +Copyright (c) 2014 Daniel Eden + */ +.animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; } + +@-webkit-keyframes shake { + 0%, 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); } + 20%, 40%, 60%, 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); } } + +@keyframes shake { + 0%, 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); } + 20%, 40%, 60%, 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); } } + +.shake { + -webkit-animation-name: shake; + animation-name: shake; } diff --git a/hasjob/static/build/js/app-css.570e2b3dc55e56c21c0b.js b/hasjob/static/build/js/app-css.570e2b3dc55e56c21c0b.js new file mode 100644 index 000000000..8caafc00d --- /dev/null +++ b/hasjob/static/build/js/app-css.570e2b3dc55e56c21c0b.js @@ -0,0 +1 @@ +webpackJsonp([1],{"/7iv":function(module,exports){}},["/7iv"]); \ No newline at end of file diff --git a/hasjob/static/build/js/app.570e2b3dc55e56c21c0b.js b/hasjob/static/build/js/app.570e2b3dc55e56c21c0b.js new file mode 100644 index 000000000..a5a577c39 --- /dev/null +++ b/hasjob/static/build/js/app.570e2b3dc55e56c21c0b.js @@ -0,0 +1 @@ +webpackJsonp([2],{yZ5m:function(module,exports,__webpack_require__){"use strict";Hasjob.Util={updateGA:function(){if(window.ga){var path=window.location.href.split(window.location.host)[1];window.ga("set","page",path),window.ga("send","pageview")}},createCustomEvent:function(eventName){if("function"==typeof window.Event)var customEvent=new Event(eventName);else{var customEvent=document.createEvent("Event");customEvent.initEvent(eventName,!0,!0)}return customEvent}},window.Hasjob.JobPost={handleStarClick:function(){$("#main-content").on("click",".pstar",function(e){var starlink=$(this).find("i"),csrf_token=$('meta[name="csrf-token"]').attr("content");return starlink.addClass("fa-spin"),$.ajax("/star/"+starlink.data("id"),{type:"POST",data:{csrf_token:csrf_token},dataType:"json",complete:function(){starlink.removeClass("fa-spin")},success:function(data){!0===data.is_starred?starlink.removeClass("fa-star-o").addClass("fa-star").parent().find(".pstar-caption").html("Bookmarked"):starlink.removeClass("fa-star").addClass("fa-star-o").parent().find(".pstar-caption").html("Bookmark this")}}),!1})},handleGroupClick:function(){var node,outer,inner,outerTemplate=document.createElement("li"),innerTemplate=document.createElement("a");outerTemplate.setAttribute("class","col-xs-12 col-md-3 col-sm-4 animated shake"),innerTemplate.setAttribute("class","stickie"),innerTemplate.setAttribute("rel","bookmark"),$("#main-content").on("click","#stickie-area li.grouped",function(e){e.preventDefault();for(var group=this,parent=group.parentNode,i=0;i255||rgba[1]>255||rgba[2]>255?"#FFFFFF":0==rgba[0]&&0==rgba[1]&&0==rgba[2]?window.Hasjob.Config[funnelName].maxColour:"#"+("000000"+(rgba[0]<<16)|rgba[1]<<8|rgba[2]).toString(16).slice(-6);var element=document.getElementById(elementId);element.classList.add("funnel-color-set"),element.style.backgroundColor=colourHex},renderGradientColour:function(){$(".js-funnel").each(function(){$(this).hasClass("funnel-color-set")||Hasjob.StickieList.setGradientColour($(this).data("funnel-name"),$(this).data("funnel-value"),$(this).attr("id"))})},createGradientColour:function(){Hasjob.StickieList.createGradientColourScale("impressions",Hasjob.Config.MaxCounts.max_impressions),Hasjob.StickieList.createGradientColourScale("views",Hasjob.Config.MaxCounts.max_views),Hasjob.StickieList.createGradientColourScale("opens",Hasjob.Config.MaxCounts.max_opens),Hasjob.StickieList.createGradientColourScale("applied",Hasjob.Config.MaxCounts.max_applied)},initFunnelViz:function(){window.addEventListener("onStickiesInit",function(e){window.Hasjob.Config.MaxCounts&&(Hasjob.StickieList.createGradientColour(),Hasjob.StickieList.renderGradientColour())},!1),window.addEventListener("onStickiesRefresh",function(e){window.Hasjob.Config.MaxCounts&&Hasjob.StickieList.renderGradientColour()},!1),window.addEventListener("onStickiesPagination",function(e){window.Hasjob.Config.MaxCounts&&Hasjob.StickieList.renderGradientColour()},!1)}},window.Hasjob.Filters={toParam:function(){var sortedFilterParams=this.formatFilterParams($("#js-job-filters").serializeArray());return sortedFilterParams.length?$.param(sortedFilterParams):""},getCurrentState:function(){return Object.keys(window.Hasjob.Config.selectedFilters).length||(window.Hasjob.Config.selectedFilters={selectedLocations:[],selectedTypes:[],selectedCategories:[],selectedQuery:"",selectedCurrency:"",pay:0,equity:""}),{jobLocations:window.Hasjob.Config.allFilters.job_location_filters,jobTypes:window.Hasjob.Config.allFilters.job_type_filters,jobCategories:window.Hasjob.Config.allFilters.job_category_filters,jobsArchive:window.Hasjob.Config.selectedFilters.archive,selectedLocations:window.Hasjob.Config.selectedFilters.location_names,selectedTypes:window.Hasjob.Config.selectedFilters.types,selectedCategories:window.Hasjob.Config.selectedFilters.categories,selectedQuery:window.Hasjob.Config.selectedFilters.query_string,selectedCurrency:window.Hasjob.Config.selectedFilters.currency,pay:window.Hasjob.Config.selectedFilters.pay,equity:window.Hasjob.Config.selectedFilters.equity,isMobile:$(window).width()<768}},init:function(){var keywordTimeout,pageScrollTimerId,filters=this,isFilterDropdownClosed=!0,filterMenuHeight=$("#hgnav").height()-$("#hg-sitenav").height();filters.dropdownMenu=new Ractive({el:"job-filters-ractive-template",template:"#filters-ractive",data:this.getCurrentState(),openOnMobile:function(event){event.original.preventDefault(),filters.dropdownMenu.set("show",!0)},closeOnMobile:function(event){event&&event.original.preventDefault(),filters.dropdownMenu.set("show",!1)},complete:function(){$(window).resize(function(){$(window).width()<768?filters.dropdownMenu.set("isMobile",!0):filters.dropdownMenu.set("isMobile",!1)}),$(document).on("click",function(event){$("#js-job-filters")===event.target||$(event.target).parents("#filter-dropdown").length||filters.dropdownMenu.closeOnMobile()})}});var pageScrollTimer=function(){return setInterval(function(){isFilterDropdownClosed&&($(window).scrollTop()>filterMenuHeight?$("#hg-sitenav").slideUp():$("#hg-sitenav").slideDown())},250)};$(window).width()>767&&(pageScrollTimerId=pageScrollTimer()),$(window).resize(function(){$(window).width()<768?($("#hg-sitenav").show(),pageScrollTimerId&&(clearInterval(pageScrollTimerId),pageScrollTimerId=0)):(filterMenuHeight=$("#hgnav").height()-$("#hg-sitenav").height(),pageScrollTimerId||(pageScrollTimerId=pageScrollTimer()))}),$("#job-filters-keywords").on("change",function(){$(this).val($(this).val().trim())}),$(".js-handle-filter-change").on("change",function(e){window.Hasjob.StickieList.refresh()});var lastKeyword="";$(".js-handle-keyword-update").on("keyup",function(){$(this).val()!==lastKeyword&&(window.clearTimeout(keywordTimeout),lastKeyword=$(this).val(),keywordTimeout=window.setTimeout(window.Hasjob.StickieList.refresh,1e3))}),$("#job-filters-location").multiselect({nonSelectedText:"Location",numberDisplayed:1,buttonWidth:"100%",enableFiltering:!0,enableCaseInsensitiveFiltering:!0,templates:{filter:'
  • ',filterClearBtn:'
  • '},optionClass:function(element){if($(element).hasClass("unavailable"))return"unavailable"},onDropdownShow:function(event,ui){isFilterDropdownClosed=!1},onDropdownHide:function(event,ui){isFilterDropdownClosed=!0}}),$(".job-filter-location-search-clear").click(function(e){$("#job-filter-location-search").val("")}),$("#job-filters-type").multiselect({nonSelectedText:"Job Type",numberDisplayed:1,buttonWidth:"100%",optionClass:function(element){if($(element).hasClass("unavailable"))return"unavailable"},onDropdownShow:function(event,ui){isFilterDropdownClosed=!1},onDropdownHide:function(event,ui){isFilterDropdownClosed=!0}}),$("#job-filters-category").multiselect({nonSelectedText:"Job Category",numberDisplayed:1,buttonWidth:"100%",optionClass:function(element){if($(element).hasClass("unavailable"))return"unavailable"},onDropdownShow:function(event,ui){isFilterDropdownClosed=!1},onDropdownHide:function(event,ui){isFilterDropdownClosed=!0}}),$("#job-filters-pay").on("shown.bs.dropdown",function(){isFilterDropdownClosed=!1}),$("#job-filters-pay").on("hidden.bs.dropdown",function(){isFilterDropdownClosed=!0}),$(document).keydown(function(event){27===event.keyCode&&(event.preventDefault(),filters.dropdownMenu.closeOnMobile())})},formatFilterParams:function(formParams){for(var sortedFilterParams=[],currencyVal="",fpIndex=0;fpIndex0&&(afterPoint=value.substring(value.indexOf("."),value.length)),value=Math.floor(value),value=value.toString();var lastThree=value.substring(value.length-3),otherNumbers=value.substring(0,value.length-3);return""!==otherNumbers&&(lastThree=","+lastThree),"₹"+otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g,",")+lastThree+afterPoint},window.Hasjob.Currency.prefix=function(currency){var currencyMap={default:"¤",inr:"₹",usd:"$",sgd:"S$",aud:"A$",eur:"€",gbp:"£"};return void 0===currency||"na"==currency.toLowerCase()?currencyMap.default:currencyMap[currency.toLowerCase()]},window.Hasjob.Currency.isRupee=function(currency){return"inr"===currency.toLowerCase()},window.Hasjob.Currency.wNumbFormat=function(currency){var prefix="¤",encoder=null;return currency&&window.Hasjob.Currency.isRupee(currency)&&(encoder=Hasjob.Currency.indian_rupee_encoder),prefix=Hasjob.Currency.prefix(currency),null===encoder?window.wNumb({decimals:0,thousand:",",prefix:prefix}):window.wNumb({decimals:0,thousand:",",prefix:prefix,edit:encoder})},window.Hasjob.Currency.formatTo=function(currency,value){return window.Hasjob.Currency.wNumbFormat(currency).to(value)},window.Hasjob.Currency.formatFrom=function(currency,value){return window.Hasjob.Currency.wNumbFormat(currency).from(value)},window.Hasjob.PaySlider.toNumeric=function(str){return str.slice(1).replace(/,/g,"")},window.Hasjob.PaySlider.range=function(currency){return"INR"===currency?{min:[0,5e3],"15%":[1e5,1e4],"30%":[2e5,5e4],"70%":[2e6,1e5],"85%":[1e7,1e6],max:[1e8]}:{min:[0,5e3],"2%":[2e5,5e4],"10%":[1e6,1e5],max:[1e7,1e5]}},window.Hasjob.PaySlider.prototype.init=function(){return this.slider=$(this.selector).noUiSlider({start:this.start,connect:this.start.constructor===Array,behaviour:"tap",range:{min:[0,5e4],"10%":[1e6,1e5],max:[1e7,1e5]},format:window.wNumb({decimals:0,thousand:",",prefix:"¤"})}),this.slider.Link("lower").to($(this.minField)),void 0!==this.maxField&&this.slider.Link("upper").to($(this.maxField)),this},window.Hasjob.PaySlider.prototype.resetSlider=function(currency){var start,startval=this.slider.val();start=startval.constructor===Array?[Hasjob.PaySlider.toNumeric(startval[0]),Hasjob.PaySlider.toNumeric(startval[1])]:Hasjob.PaySlider.toNumeric(startval),this.slider.noUiSlider({start:start,connect:start.constructor===Array,range:Hasjob.PaySlider.range(currency),format:Hasjob.Currency.wNumbFormat(currency)},!0),this.slider.Link("lower").to($(this.minField)),void 0!==this.maxField&&this.slider.Link("upper").to($(this.maxField))},$(function(){Ractive.DEBUG=!1,$(window).on("popstate",function(event){if(!event.originalEvent.state||!event.originalEvent.state.reloadOnPop)return!1;location.reload(!0)}),window.Hasjob.Filters.init(),window.Hasjob.JobPost.handleStarClick(),window.Hasjob.JobPost.handleGroupClick(),window.Hasjob.StickieList.initFunnelViz();var getCurrencyVal=function(){return $("input[type='radio'][name='currency']:checked").val()},setPayTextField=function(){var payFieldLabel,currencyLabel="Pay",equityLabel="";if($("#job-filters-equity").is(":checked")&&(equityLabel+=" + %"),"na"===getCurrencyVal().toLowerCase())currencyLabel="Pay";else{currencyLabel="0"===Hasjob.PaySlider.toNumeric($("#job-filters-payval").val())?"Pay "+getCurrencyVal():$("#job-filters-payval").val()+" per year"}payFieldLabel="Pay"===currencyLabel&&""!==equityLabel?"Equity (%)":currencyLabel+equityLabel,$("#job-filters-pay-text").html(payFieldLabel)};$("#job-filters-equity").on("change",function(){setPayTextField()});var presetCurrency=window.Hasjob.Config&&window.Hasjob.Config.selectedFilters.currency||"NA";$.each($("input[type='radio'][name='currency']"),function(index,currencyRadio){$(currencyRadio).val()===presetCurrency&&$(currencyRadio).attr("checked","checked")}),window.Hasjob.Config&&window.Hasjob.Config.selectedFilters.equity&&$("input[type='checkbox'][name='equity']").attr("checked","checked"),$("input[type='radio'][name='currency']").on("change",function(){setPaySliderVisibility(),paySlider.resetSlider(getCurrencyVal()),setPayTextField()}),$("ul.pay-filter-dropdown").click(function(e){e.stopPropagation()});var setPaySliderVisibility=function(){"na"===getCurrencyVal().toLowerCase()?$(".pay-filter-slider").slideUp():$(".pay-filter-slider").slideDown()},paySlider=new Hasjob.PaySlider({start:window.Hasjob.Config&&window.Hasjob.Config.selectedFilters.pay||0,selector:"#pay-slider",minField:"#job-filters-payval"});$("#pay-slider").on("slide",function(){setPayTextField()}),$("#pay-slider").on("change",function(){window.Hasjob.StickieList.refresh()}),setPaySliderVisibility(),paySlider.resetSlider(getCurrencyVal()),setPayTextField()})}},["yZ5m"]); \ No newline at end of file diff --git a/hasjob/static/build/js/manifest.570e2b3dc55e56c21c0b.js b/hasjob/static/build/js/manifest.570e2b3dc55e56c21c0b.js new file mode 100644 index 000000000..551ee40e3 --- /dev/null +++ b/hasjob/static/build/js/manifest.570e2b3dc55e56c21c0b.js @@ -0,0 +1 @@ +!function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var parentJsonpFunction=window.webpackJsonp;window.webpackJsonp=function(chunkIds,moreModules,executeModules){for(var moduleId,chunkId,result,i=0,resolves=[];i=0&&stylesInsertedAtTop.splice(idx,1)}function createStyleElement(options){var style=document.createElement("style");return options.attrs.type="text/css",addAttrs(style,options.attrs),insertStyleElement(options,style),style}function createLinkElement(options){var link=document.createElement("link");return options.attrs.type="text/css",options.attrs.rel="stylesheet",addAttrs(link,options.attrs),insertStyleElement(options,link),link}function addAttrs(el,attrs){Object.keys(attrs).forEach(function(key){el.setAttribute(key,attrs[key])})}function addStyle(obj,options){var style,update,remove,result;if(options.transform&&obj.css){if(!(result=options.transform(obj.css)))return function(){};obj.css=result}if(options.singleton){var styleIndex=singletonCounter++;style=singleton||(singleton=createStyleElement(options)),update=applyToSingletonTag.bind(null,style,styleIndex,!1),remove=applyToSingletonTag.bind(null,style,styleIndex,!0)}else obj.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(style=createLinkElement(options),update=updateLink.bind(null,style,options),remove=function(){removeStyleElement(style),style.href&&URL.revokeObjectURL(style.href)}):(style=createStyleElement(options),update=applyToTag.bind(null,style),remove=function(){removeStyleElement(style)});return update(obj),function(newObj){if(newObj){if(newObj.css===obj.css&&newObj.media===obj.media&&newObj.sourceMap===obj.sourceMap)return;update(obj=newObj)}else remove()}}function applyToSingletonTag(style,index,remove,obj){var css=remove?"":obj.css;if(style.styleSheet)style.styleSheet.cssText=replaceText(index,css);else{var cssNode=document.createTextNode(css),childNodes=style.childNodes;childNodes[index]&&style.removeChild(childNodes[index]),childNodes.length?style.insertBefore(cssNode,childNodes[index]):style.appendChild(cssNode)}}function applyToTag(style,obj){var css=obj.css,media=obj.media;if(media&&style.setAttribute("media",media),style.styleSheet)style.styleSheet.cssText=css;else{for(;style.firstChild;)style.removeChild(style.firstChild);style.appendChild(document.createTextNode(css))}}function updateLink(link,options,obj){var css=obj.css,sourceMap=obj.sourceMap,autoFixUrls=void 0===options.convertToAbsoluteUrls&&sourceMap;(options.convertToAbsoluteUrls||autoFixUrls)&&(css=fixUrls(css)),sourceMap&&(css+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))))+" */");var blob=new Blob([css],{type:"text/css"}),oldSrc=link.href;link.href=URL.createObjectURL(blob),oldSrc&&URL.revokeObjectURL(oldSrc)}var stylesInDom={},isOldIE=function(fn){var memo;return function(){return void 0===memo&&(memo=fn.apply(this,arguments)),memo}}(function(){return window&&document&&document.all&&!window.atob}),getTarget=function(target){return document.querySelector(target)},getElement=function(fn){var memo={};return function(target){if("function"==typeof target)return target();if(void 0===memo[target]){var styleTarget=getTarget.call(this,target);if(window.HTMLIFrameElement&&styleTarget instanceof window.HTMLIFrameElement)try{styleTarget=styleTarget.contentDocument.head}catch(e){styleTarget=null}memo[target]=styleTarget}return memo[target]}}(),singleton=null,singletonCounter=0,stylesInsertedAtTop=[],fixUrls=__webpack_require__("mJPh");module.exports=function(list,options){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");options=options||{},options.attrs="object"==typeof options.attrs?options.attrs:{},options.singleton||"boolean"==typeof options.singleton||(options.singleton=isOldIE()),options.insertInto||(options.insertInto="head"),options.insertAt||(options.insertAt="bottom");var styles=listToStyles(list,options);return addStylesToDom(styles,options),function(newList){for(var mayRemove=[],i=0;i li > a:hover { - background-color: #f5f5f5; -} -.filters-wrapper .dropdown-menu > .active > a { - color: #333; - background-color: inherit; -} -.filters-wrapper ul.multiselect-container { - overflow: auto; - width: 100%; - padding: 5px 0; - left: 0; -} -.filters-wrapper .multiselect-container label.checkbox, .filters-wrapper .multiselect-container label.radio { - padding: 5px 0 5px 30px; - width: 100%; -} - -.filters { - margin-bottom: 5px; -} -.filters ul.dropdown-menu { - max-height: 68vh; -} - -.pay-filter-dropdown { - width: 100%; - padding: 5px 0; - margin-top: 0; - left: 0; -} -.pay-filter-dropdown li { - padding: 5px 10px; -} - -.currency-checkbox { - float: left; - width: 25%; -} - -.equity-label { - width: 100%; - cursor: pointer; -} - -.pay-filter-slider { - margin: 5px auto; -} - -.pay-filter-slider .noUi-horizontal { - padding-right: 32px; -} - -.pay-filter-slider .noUi-horizontal .noUi-handle { - left: -1px; -} - -.pay-filter-slider .noUi-horizontal .noUi-origin { - right: -32px; -} - -.job-filter-location-search-clear { - cursor: pointer; -} - -@media (min-width: 480px) { - header #hgnav .hg-header-app-nav { - max-width: 70%; - } -} -@media (min-width: 768px) { - header { - margin-bottom: 110px; - min-height: 36px; - } - header h1 { - font-size: 25px; - } - header h1 small { - display: inline; - } - header #hgnav { - min-height: 0; - } - header #hgnav .container { - height: auto; - } - header #hgnav .hg-header-app-nav { - max-width: 76%; - } - header #hgnav .board-caption { - position: static; - } - header #hgnav .hg-header-app-nav h1 a small { - display: inline; - } - header #hgnav .hg-site-nav { - margin: 0; - } - header #hgnav .filters-wrapper { - width: 100%; - padding: 10px 0 5px; - min-height: 0; - margin: 0; - } - header #hgnav .filters-wrapper ul.multiselect-container { - width: 20em; - } - header #hgnav .filters-wrapper .pay-filter-dropdown { - width: 190%; - left: 0; - right: auto; - } - header #hgnav .filters-wrapper li.unavailable label { - font-style: italic; - color: #888; - } -} -@media (min-width: 768px) and (max-width: 991px) { - .category-filter ul.multiselect-container { - right: 0; - left: auto; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .filters-wrapper .pay-filter-dropdown { - right: 0; - left: auto; - } -} -@media (min-width: 1200px) { - header { - margin-bottom: 70px; - } - header #hgnav .hg-header-app-nav { - max-width: 90%; - } - - .filters-wrapper { - padding-bottom: 4px; - } - .filters-wrapper .submit-btn { - text-align: center; - padding: 6px 0; - width: 100%; - margin-top: -2px; - } - - .filters { - padding: 0 10px 0 0; - width: 19.8%; - } - - .filters-col1 { - padding-left: 15px; - } - - .submit-filters { - width: 6.2%; - padding: 0; - } -} -#nprogress .bar { - background: #df5e0e; -} - -#nprogress .peg { - box-shadow: 0 0 10px #df5e0e, 0 0 5px #df5e0e; -} - -#nprogress .spinner-icon { - border-top-color: #df5e0e; - border-left-color: #df5e0e; -} - -.input-group-btn > .btn { - border-bottom: 1px solid #ccc; -} -.input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { - border-bottom-color: #adadad; -} - -#search { - margin-top: 14px; - margin-bottom: 12px; - line-height: 36px; -} -#search input[type="text"] { - background: white url('../img/search.png?1461219836') 4px center no-repeat; - padding: 7px 10px 3px 20px; -} -#search .btn { - padding: 7px 10px 3px; -} - -@media screen and (min-width: 768px) { - #search { - float: right; - } -} -#root { - margin-bottom: -107px; -} - -#root_footer { - height: 97px; -} - -footer { - min-height: 97px; - text-rendering: optimizeLegibility; -} - -footer .footer-inner { - background: #ebe7e4; - -moz-box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.4); - -webkit-box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.4); - box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.4); -} - -footer .container { - padding-bottom: 0; -} - -@media (min-width: 468px) and (max-width: 1199px) { - #root { - margin-bottom: -86px; - } - - #root_footer { - height: 76px; - } - - footer { - min-height: 76px; - } -} -@media (min-width: 1200px) { - #root { - margin-bottom: -67px; - } - - #root_footer { - height: 57px; - } - - footer { - min-height: 57px; - } -} -.flash, .guide, .post-guide { - background: #fff; - position: relative; - margin: 0 -15px; - padding: 14px 15px 1px; - border-top: 1px solid #afafaf; - border-bottom: 1px solid #afafaf; -} -.flash h2, .guide h2, .post-guide h2 { - margin: 0; -} -.flash .close, .guide .close, .post-guide .close { - position: absolute; - top: 2px; - right: 5px; -} - -.flash.info { - padding-left: 15px; - padding-right: 15px; - border: none; - -moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1) inset; -} - -.flash-interactive:before, .guide:before { - content: ""; - display: block; - position: absolute; - bottom: -21px; - left: 30px; - width: 0; - height: 0; - border: 10px solid transparent; - border-top-color: #afafaf; -} - -/* creates the smaller triangle */ -.flash-interactive:after, .guide:after { - content: ""; - display: block; - position: absolute; - bottom: -20px; - left: 30px; - width: 0; - height: 0; - border: 10px solid transparent; - border-top-color: #fff; -} - -.post-guide:before { - content: ""; - display: block; - position: absolute; - top: -21px; - left: 30px; - width: 0; - height: 0; - border: 10px solid transparent; - border-bottom-color: #afafaf; -} - -/* creates the smaller triangle */ -.post-guide:after { - content: ""; - display: block; - position: absolute; - top: -20px; - left: 30px; - width: 0; - height: 0; - border: 10px solid transparent; - border-bottom-color: #fff; -} - -h1 { - color: #df5e0e; - font-size: 30px; - margin-bottom: 0; -} - -h1 small, h2 small, h3 small { - font-weight: bold; -} - -.img-container { - text-align: center; -} -.img-container img { - max-width: 100%; -} - -.label { - padding: 0 0.6em; -} - -.tab-download { - font-size: smaller; - margin: 12px 0 0.25em; -} - -.c3 svg { - font-family: inherit !important; -} - -tr > div { - display: none; -} - -.list-group-item .badge { - float: right; -} - -.badge-new { - background-color: #428bca; -} - -.sheet { - background: #fff; - margin: 0 -15px; - word-wrap: break-word; - border-bottom: 1px solid #afafaf; - -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - text-rendering: optimizeLegibility; -} -.sheet .nav-tabs-top { - background: #ebe7e4; - border-bottom: 0; - -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1) inset; -} -.sheet .nav-tabs-top > li { - margin-bottom: 0; - float: left; - margin-left: 0; - margin-right: 0; -} -.sheet .nav-tabs-top > li > a { - color: inherit; - font-variant: small-caps; - text-transform: lowercase; - border: none; - border-radius: 0; -} -.sheet .nav-tabs-top > li.active > a { - -moz-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset; - border: none; -} -.sheet .nav-tabs-top > li:first-child.active > a { - -moz-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 10px 0 10px -10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 10px 0 10px -10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 10px 0 10px -10px rgba(0, 0, 0, 0.1) inset; -} -.sheet .nav-tabs-top > li > a:hover { - -moz-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 0 -10px 10px -10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 0 -10px 10px -10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 0 -10px 10px -10px rgba(0, 0, 0, 0.1) inset; -} -.sheet .nav-tabs-top > li.active > a:hover, .sheet .nav-tabs-top > li.active > a:focus { - -moz-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset; - border: none; -} -.sheet .nav-tabs-top > li:first-child.active > a:hover, .sheet .nav-tabs-top > li:first-child.active > a:focus { - -moz-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 10px 0 10px -10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 10px 0 10px -10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.1) inset, 10px 0 10px -10px rgba(0, 0, 0, 0.1) inset; -} -.sheet .list-group { - margin: 0 -15px; - font-size: 80%; -} -.sheet .badge { - font-size: inherit; -} -.sheet .list-group-item { - border-left: none; - border-right: none; - background-color: inherit; -} -.sheet a.list-group-item { - color: inherit; -} -.sheet .list-group-item:first-child { - -moz-border-radius-topleft: 0; - -webkit-border-top-left-radius: 0; - border-top-left-radius: 0; - -moz-border-radius-topright: 0; - -webkit-border-top-right-radius: 0; - border-top-right-radius: 0; -} -.sheet .list-group-item:last-child { - -moz-border-radius-bottomleft: 0; - -webkit-border-bottom-left-radius: 0; - border-bottom-left-radius: 0; - -moz-border-radius-bottomright: 0; - -webkit-border-bottom-right-radius: 0; - border-bottom-right-radius: 0; - margin-bottom: -1px; -} -.sheet .list-group-item.no-bottom-border { - border-bottom: 0; - margin-bottom: 0; -} -.sheet .alert { - margin-bottom: 12px; -} -.sheet form { - margin-bottom: 12px; -} - -.sheet .table, .post-guide .table { - margin-bottom: 12px; -} -.sheet .table th:first-child, .sheet .table td:first-child, .post-guide .table th:first-child, .post-guide .table td:first-child { - padding-left: 0; -} -.sheet .table th:last-child, .sheet .table td:last-child, .post-guide .table th:last-child, .post-guide .table td:last-child { - padding-right: 0; -} - -.sheet + .post-guide { - margin-top: -1px; -} - -.post-company-logo { - text-align: center; -} - -.section { - *zoom: 1; - border-top: 1px solid #ddd; - padding: 12px 15px 0; - margin-bottom: 0; -} -.section:after { - content: ""; - display: table; - clear: both; -} -.section.first { - border-top: none; -} -.section.unmarked { - border-top: none; - padding-top: 0; -} -.section h1:first-child, .section h2:first-child, .section h3:first-child { - margin-top: 0; -} - -.post-date { - font-size: 75%; - line-height: 24px; - color: #666; -} - -.form-horizontal .help-required { - display: none; -} - -.sliderholder { - padding-top: 15px; - float: none; - clear: both; - margin: auto; -} - -.cash-slider, .equity-slider { - position: relative; -} - -.max-field { - position: absolute; - top: 0; - right: 0; -} - -.sliderholder .noUi-horizontal { - padding-right: 32px; -} - -.sliderholder .noUi-horizontal .noUi-handle { - left: -1px; -} - -.sliderholder .noUi-horizontal .noUi-origin { - right: -32px; -} - -#banner-bottom { - margin: 0 0 24px 30px; -} - -@media screen and (max-width: 767px) { - .input-xs-small { - font-size: 13px; - } -} -@media screen and (min-width: 768px) { - .form-horizontal .control-label { - text-align: left; - } - - .post-company-logo { - text-align: right; - } - .post-company-logo img { - margin-bottom: 12px; - } - - .flash, .guide, .post-guide { - padding: 14px 30px 1px; - margin: 12px 0 24px; - border: 1px solid #afafaf; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - } - - .guide form, .post-guide form { - margin-bottom: 12px; - } - - .flash.info { - margin-bottom: 24px; - } - - .sheet { - margin: 12px 0 24px; - border: 1px solid #afafaf; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.1) inset; - } - .sheet .nav-tabs { - -moz-border-radius-topleft: 4px; - -webkit-border-top-left-radius: 4px; - border-top-left-radius: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-right-radius: 4px; - border-top-right-radius: 4px; - } - .sheet .nav-tabs > li > a { - -moz-border-radius: 4px 4px 0 0; - -webkit-border-radius: 4px; - border-radius: 4px 4px 0 0; - } - - .sheet + .post-guide { - margin-top: 0; - } - - .section { - padding: 12px 30px 0; - } - - .sliderholder { - padding-top: 10px; - float: left; - clear: none; - } -} -@media screen and (min-width: 992px) { - .sheet .list-group { - margin: -12px -30px 20px -15px; - margin-top: -12px; - margin-right: -30px; - } - .sheet .list-group-item { - padding-right: 30px; - } - .sheet .list-group-item:first-child { - border-top: none; - } -} -.sheet .list-group-item a.popup { - color: inherit; - display: block; - margin: -10px -15px; - padding: 10px 15px; -} -.sheet .list-group-item a.popup:hover, .sheet .list-group-item a.popup:focus { - text-decoration: none; - background-color: #f5f5f5; -} - -.popup-box { - display: none; -} - -.popup-box:target { - display: block; -} - -.close-popup { - display: inline; - position: absolute; - top: 2px; - right: 4px; - margin: 0; - padding: 0; -} - -@media screen and (min-width: 768px) { - .sheet .list-group-item a.popup { - margin-right: -30px; - padding-right: 30px; - } - - .popup-box { - background: #fff; - border: 1px solid #afafaf; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - position: absolute; - width: 23em; - right: 105%; - top: -3.4em; - margin: 0; - padding: 1em; - -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); - } - .popup-box > *:last-child { - margin-bottom: 0; - } - .popup-box .close-popup { - display: none; - } - .no-js .popup-box .close-popup { - display: inline; - } - .popup-box h2 { - margin: 0; - } - .popup-box form { - margin-bottom: 0; - } - .popup-box form ul { - margin: 0; - } - .popup-box form ul li { - border-bottom: 0; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - } - .popup-box form ul li label { - padding-left: 0.25em; - } - .popup-box form ul li li.selected { - background-color: #f0a40c; - } - .popup-box:before { - content: ""; - display: block; - position: absolute; - right: -21px; - top: 4em; - width: 0; - height: 0; - border: 10px solid transparent; - border-left-color: #afafaf; - } - .popup-box:after { - content: ""; - display: block; - position: absolute; - right: -20px; - top: 4em; - width: 0; - height: 0; - border: 10px solid transparent; - border-left-color: #fff; - } -} -#stickie-area { - margin-top: 12px; - padding-left: 0; - list-style: none; - margin-bottom: 0; -} -#stickie-area > li { - margin-bottom: 20px; - float: none; - display: block; - vertical-align: top; -} - -.stickie { - background: #ffffa2; - position: relative; - vertical-align: top; - display: block; - overflow: visible; - padding: 24px 0 0; - word-wrap: break-word; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - border-radius: 2px; - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset; - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset; - /* Make stickies clickable */ -} -.stickie, .stickie:active, .stickie:hover, .stickie:visited, .stickie:focus { - text-decoration: none; - color: inherit; - border-bottom: 0; -} -.stickie label { - font-weight: normal; -} -.stickie .annotation { - font-size: 75%; - display: block; - position: absolute; - color: #816894; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - height: 1.5em; -} -.stickie .top-right { - top: 0.1em; - right: 0.5em; -} -.stickie .top-left { - top: 0.1em; - left: 0.5em; - width: 75%; -} -.stickie .headline, -.stickie .pay { - display: block; - padding: 0 18px; - position: static; -} -.stickie .headline { - font-family: "McLaren", sans-serif; -} -.stickie .star { - position: static; - float: left; - width: 20%; - margin-left: 0.5em; -} -.stickie .new { - color: #df5e0e; -} -.stickie .company-name { - position: static; - float: right; - width: 70%; - text-align: right; - margin-right: 0.5em; -} -.stickie .count { - margin-top: 5px; - color: #816894; - display: flex; -} -.stickie .count-items { - flex: 1; - font-size: 9px; -} -.stickie .count-text { - display: inline-block; - width: calc(100% - 6px); -} -.stickie .count-items.impressions { - flex: 1.5; -} -.stickie .count-arrow { - float: right; -} -.stickie .count-text, -.stickie .count-arrow { - font-size: 10px; -} -@media (min-width: 480px) { - .stickie .count-text, - .stickie .count-arrow { - font-size: 14px; - } -} -@media (min-width: 768px) { - .stickie .count-text, - .stickie .count-arrow { - font-size: 7px; - } - .stickie .count-arrow { - margin-top: 2px; - } -} -@media (min-width: 1200px) { - .stickie .count-text, - .stickie .count-arrow { - font-size: 8px; - } - .stickie .count-arrow { - margin-top: 1px; - } -} -.stickie .count-background { - display: flex; - height: 7px; - margin-top: 4px; - border-radius: 0 0 2px 2px; - overflow: hidden; - padding: 0; - list-style: none; -} -.stickie .count-background .background { - flex: 1; - height: 100%; - margin: 0; - padding: 0; -} -.stickie .count-background .impressions.background { - flex: 1.5; - position: relative; - z-index: 4; -} -.stickie .count-background .viewed.background { - position: relative; - z-index: 3; -} -.stickie .count-background .opened.background { - position: relative; - z-index: 2; -} -.stickie .count-background .applied.background { - position: relative; - z-index: 1; -} -.stickie .count-background .background.arrow:before { - content: ""; - display: inline-block; - width: 7px; - height: 7px; - border-style: solid; - border-width: 2px 2px 0 0; - border-color: #ffffa2; - position: absolute; - top: 0; - right: -2px; - vertical-align: top; - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -webkit-transform: rotate(45deg); - transform: rotate(45deg); -} -.stickie .pinned { - text-indent: -10000px; - display: block; - position: absolute; - top: -4px; - left: 135px; - left: calc(50% - 5px); - width: 10px; - height: 10px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - background: #df5e0e; - -moz-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); - -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); - box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); -} - -.stickie.grouped.under { - position: absolute; - top: -5px; - left: 10px; - right: 20px; - bottom: 5px; - z-index: -3; - overflow: hidden; - -moz-transition-duration: 0.1s; - -o-transition-duration: 0.1s; - -webkit-transition-duration: 0.1s; - transition-duration: 0.1s; - -moz-transition-property: top, left, bottom, right; - -o-transition-property: top, left, bottom, right; - -webkit-transition-property: top, left, bottom, right; - transition-property: top, left, bottom, right; - -moz-transition-timing-function: ease-out; - -o-transition-timing-function: ease-out; - -webkit-transition-timing-function: ease-out; - transition-timing-function: ease-out; -} -.stickie.grouped.under:before, .stickie.grouped.under:after { - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} -.stickie.grouped.under .headline { - display: block; - overflow: hidden; - position: absolute; - top: 1.5em; - bottom: 1.5em; - left: 1.5em; - right: 1.5em; -} -.stickie.grouped.under .count-background { - position: absolute; - bottom: 0; - width: 100%; -} -.no-touch li:hover > .stickie.grouped.under { - top: 0px; - left: 15px; - right: 15px; - bottom: 0px; - -moz-transition-duration: 0.1s; - -o-transition-duration: 0.1s; - -webkit-transition-duration: 0.1s; - transition-duration: 0.1s; - -moz-transition-property: top, left, bottom, right; - -o-transition-property: top, left, bottom, right; - -webkit-transition-property: top, left, bottom, right; - transition-property: top, left, bottom, right; - -moz-transition-timing-function: ease-out; - -o-transition-timing-function: ease-out; - -webkit-transition-timing-function: ease-out; - transition-timing-function: ease-out; -} -.no-touch li:hover > .stickie.grouped.under:nth-of-type(1) { - top: -15px; - left: 0px; - right: 30px; - bottom: 15px; -} -.no-touch li:hover > .stickie.grouped.under:nth-of-type(2) { - top: 15px; - left: 30px; - right: 0px; - bottom: -15px; -} -.no-touch li:hover > .stickie.grouped.under:nth-of-type(3) { - top: -10px; - left: 20px; - right: 5px; - bottom: 10px; -} -.no-touch li:hover > .stickie.grouped.under:nth-of-type(4) { - top: 10px; - left: 5px; - right: 25px; - bottom: -10px; -} -.no-touch li:hover > .stickie.grouped.under:nth-of-type(5) { - top: -25px; - left: 15px; - right: 15px; - bottom: 25px; -} - -.stickiead { - padding: 0; - text-align: center; -} - -.stickie.special { - background-color: #f6f6f6; - padding: 24px 18px; -} - -.stickie.org { - background-color: #fff; - text-align: center; - font-family: "Fira Sans", arial, sans-serif; -} -.stickie.org img { - max-width: 100%; - height: auto; - max-height: 100px; - padding-bottom: 5px; -} - -.stickie.announcement { - background-color: #ffff2c; -} - -.stickie .pstar { - color: #df5e0e; - cursor: pointer; - -moz-transition: opacity 0.2s ease-in-out; - -o-transition: opacity 0.2s ease-in-out; - -webkit-transition: opacity 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; -} - -.stickie .pstar .fa-star-o { - opacity: 0.1; -} - -.stickie:hover .pstar .fa-star-o { - opacity: 0.3; -} - -.stickie .pstar .fa-star-o:hover { - opacity: 1; -} - -.stickie .pstar .fa-spin { - opacity: 1; -} - -#newpost { - font-family: inherit; -} - -#newpost_headline { - font-family: "McLaren", sans-serif; - width: 100%; - border: 0; - background-color: #f6f6f6; - resize: none; - min-height: 0; - padding: 0; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; - -moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; - -o-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; - -webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; - transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; -} -#newpost_headline:hover, #newpost_headline:focus { - border-color: #66afe9; - outline: 0; - -moz-box-shadow: 0 0 8px rgba(102, 175, 233, 0.6); - -webkit-box-shadow: 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: 0 0 8px rgba(102, 175, 233, 0.6); - -moz-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; - -o-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; - -webkit-transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; - transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, height 0.2s ease-in-out; -} - -#newpost_headline::-webkit-input-placeholder { - color: #555; - opacity: 1; - -moz-transition: opacity 0.2s ease-in-out; - -o-transition: opacity 0.2s ease-in-out; - -webkit-transition: opacity 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; -} - -#newpost_headline:focus::-webkit-input-placeholder { - opacity: 0.4; - -moz-transition: opacity 0.2s ease-in-out; - -o-transition: opacity 0.2s ease-in-out; - -webkit-transition: opacity 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; -} - -#newpost_headline::-moz-placeholder { - color: #555; - opacity: 1; - -moz-transition: opacity 0.2s ease-in-out; - -o-transition: opacity 0.2s ease-in-out; - -webkit-transition: opacity 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; -} - -#newpost_headline:focus::-moz-placeholder { - opacity: 0.4; - -moz-transition: opacity 0.2s ease-in-out; - -o-transition: opacity 0.2s ease-in-out; - -webkit-transition: opacity 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; -} - -#newpost_headline:-ms-input-placeholder { - color: #555; - opacity: 1; - -moz-transition: opacity 0.2s ease-in-out; - -o-transition: opacity 0.2s ease-in-out; - -webkit-transition: opacity 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; -} - -#newpost_headline:focus:-ms-input-placeholder { - opacity: 0.4; - -moz-transition: opacity 0.2s ease-in-out; - -o-transition: opacity 0.2s ease-in-out; - -webkit-transition: opacity 0.2s ease-in-out; - transition: opacity 0.2s ease-in-out; -} - -#newpost_details { - margin-top: 12px; - margin-bottom: -12px; - text-align: right; -} - -#loadmore { - margin-bottom: 24px; - text-align: center; -} - -@media screen and (min-width: 768px) { - #stickie-area > li { - display: inline-block; - margin-bottom: 30px; - } - - .stickie:before, .stickie:after { - content: ""; - position: absolute; - z-index: -2; - bottom: 15px; - left: 10px; - width: 50%; - height: 20%; - max-width: 300px; - -moz-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.4); - -webkit-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.4); - box-shadow: 0 15px 10px rgba(0, 0, 0, 0.4); - -moz-transform: rotate(-3deg); - -ms-transform: rotate(-3deg); - -webkit-transform: rotate(-3deg); - transform: rotate(-3deg); - } - .stickie:after { - right: 10px; - left: auto; - -moz-transform: rotate(3deg); - -ms-transform: rotate(3deg); - -webkit-transform: rotate(3deg); - transform: rotate(3deg); - } -} -#main-40x { - text-align: center; -} - -#stickie-40x { - background-color: #ffffa2; - float: none; - display: inline-block; - text-align: center; - width: auto; - margin: 24px 0; - padding: 24px 18px; -} - -#i40x { - font-size: 150px; - font-weight: bold; - letter-spacing: -0.2em; - margin-left: -0.2em; -} - -#i40x:after { - display: block; - color: #f0a40c; - content: "︵"; - margin-top: -0.75em; -} - -.i4 { - color: #df5e0e; - position: relative; -} - -.i0 { - color: #f0a40c; - z-index: -1; -} - -.i5 { - color: #816894; - position: relative; -} - -#i40x-message { - font-family: "McLaren", sans-serif; - color: #816894; - max-width: 400px; -} - -/*! -https://github.com/daneden/animate.css -Animate.css - http://daneden.me/animate -Licensed under the MIT license - http://opensource.org/licenses/MIT -Copyright (c) 2014 Daniel Eden - */ -.animated { - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - -@-webkit-keyframes shake { - 0%, 100% { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translate3d(-10px, 0, 0); - transform: translate3d(-10px, 0, 0); - } - 20%, 40%, 60%, 80% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); - } -} -@keyframes shake { - 0%, 100% { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translate3d(-10px, 0, 0); - transform: translate3d(-10px, 0, 0); - } - 20%, 40%, 60%, 80% { - -webkit-transform: translate3d(10px, 0, 0); - transform: translate3d(10px, 0, 0); - } -} -.shake { - -webkit-animation-name: shake; - animation-name: shake; -} diff --git a/hasjob/static/img/android-chrome-192x192.png b/hasjob/static/img/android-chrome-192x192.png new file mode 100755 index 000000000..5487c4c1c Binary files /dev/null and b/hasjob/static/img/android-chrome-192x192.png differ diff --git a/hasjob/static/img/favicon.ico b/hasjob/static/img/favicon.ico new file mode 100644 index 000000000..fd058ce0a Binary files /dev/null and b/hasjob/static/img/favicon.ico differ diff --git a/hasjob/static/img/hasjob-logo-small.png b/hasjob/static/img/hasjob-logo-small.png new file mode 100644 index 000000000..af7509044 Binary files /dev/null and b/hasjob/static/img/hasjob-logo-small.png differ diff --git a/hasjob/static/img/hasjob-logo.svg b/hasjob/static/img/hasjob-logo.svg new file mode 100755 index 000000000..b79e11e5e --- /dev/null +++ b/hasjob/static/img/hasjob-logo.svg @@ -0,0 +1,2608 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hasjob/static/manifest.json b/hasjob/static/manifest.json new file mode 100644 index 000000000..f7aa43474 --- /dev/null +++ b/hasjob/static/manifest.json @@ -0,0 +1,18 @@ +{ + "name": "Hasjob", + "short_name": "Hasjob", + "description": "Hasjob is India’s premier job board for tech startups", + "scope":"/", + "theme_color": "#816894", + "background_color": "#FFFFFF", + "display": "standalone", + "orientation": "portrait", + "start_url": "/", + "icons": [ + { + "src": "/static/img/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/hasjob/static/sass/editor.scss b/hasjob/static/sass/editor.scss deleted file mode 100644 index ea7265c13..000000000 --- a/hasjob/static/sass/editor.scss +++ /dev/null @@ -1,19 +0,0 @@ -@import "colors"; -@import "fonts"; -// We don't know of a clean way to NOT hardcode this URL here -// @import url("https://static.hasgeek.co.in/asset?asset=firasans.css&asset=baseframe-firasans.css"); -// @import url("//fonts.googleapis.com/css?family=Fira+Sans:400,700,400italic,700italic"); -@import url("//code.cdn.mozilla.net/fonts/fira.css"); - -body { - margin: 5px; - font-size: 16px; - line-height: 24px; - color: #444; - font-family: "Fira Sans", "Arial", sans-serif; -} - -p, ul, ol, blockquote { - margin-top: 0; - margin-bottom: 12px; -} diff --git a/hasjob/static/service-worker.js b/hasjob/static/service-worker.js new file mode 100644 index 000000000..e5a73733f --- /dev/null +++ b/hasjob/static/service-worker.js @@ -0,0 +1,102 @@ +importScripts('https://unpkg.com/workbox-sw@2.1.2/build/importScripts/workbox-sw.prod.v2.1.2.js'); + +const workboxSW = new self.WorkboxSW({ + "cacheId": "hasjob", + "skipWaiting": true, + "clientsClaim": true +}); + +workboxSW.precache([ + { + "url": "/static/build/css/stylesheet-app-css.570e2b3dc55e56c21c0b.css", + "revision": "0f5fc8fe625c3e6aab60f7c2674f79e5" + }, + { + "url": "/static/build/js/app.570e2b3dc55e56c21c0b.js", + "revision": "9fe47feb0657e65d9c3b43b59bb648ae" + }, + { + "url": "/static/build/js/manifest.570e2b3dc55e56c21c0b.js", + "revision": "fe684bf23b9518850a7a3dd90492001d" + }, + { + "url": "/static/build/js/vendor.570e2b3dc55e56c21c0b.js", + "revision": "12a1ca8d2cb2caab35d21438cb595e94" + } +]); + +workboxSW.router.registerRoute(/^https?\:\/\/static.*/, workboxSW.strategies.networkFirst({ + "cacheName": "assets" +}), 'GET'); + +//For development setup caching of assets +workboxSW.router.registerRoute(/^http:\/\/localhost:5000\/static/, workboxSW.strategies.networkFirst({ + "cacheName": "baseframe-local" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?\:\/\/ajax.googleapis.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "cdn-libraries" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/cdnjs.cloudflare.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "cdn-libraries" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/images\.hasgeek\.com\/embed\/file\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "images" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/hasgeek.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "images" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/hasjob.co\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "images" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/fonts.googleapis.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "fonts" +}), 'GET'); + +workboxSW.router.registerRoute(/^https?:\/\/fonts.gstatic.com\/*/, workboxSW.strategies.networkFirst({ + "cacheName": "fonts" +}), 'GET'); + +/* The service worker handles all fetch requests. If fetching of job post page or +other pages fails due to a network error, it will return the cached "offline" page. +*/ +workboxSW.router.registerRoute('/(.*)', args => { + return workboxSW.strategies.networkFirst({cacheName: 'routes'}).handle(args).then(response => { + if (!response) { + return caches.match('/offline'); + } + return response; + }); +}); + +// https://googlechrome.github.io/samples/service-worker/custom-offline-page/ +function createCacheBustedRequest(url) { + let request = new Request(url, {cache: 'reload'}); + // See https://fetch.spec.whatwg.org/#concept-request-mode + /* This is not yet supported in Chrome as of M48, so we need to + explicitly check to see if the cache: 'reload' option had any effect.*/ + if ('cache' in request) { + return request; + } + + // If {cache: 'reload'} didn't have any effect, append a cache-busting URL parameter instead. + let bustedUrl = new URL(url, self.location.href); + bustedUrl.search += (bustedUrl.search ? '&' : '') + 'cachebust=' + Date.now(); + return new Request(bustedUrl); +} + +// Cache the offline page during install phase of the service worker +self.addEventListener('install', event => { + event.waitUntil( + fetch(createCacheBustedRequest('/api/1/template/offline')).then(function(response) { + return caches.open('hasjob-offline').then(function(cache) { + return cache.put('offline', response); + }); + }) + ); +}); diff --git a/hasjob/templates/application.html.jinja2 b/hasjob/templates/application.html.jinja2 index 102275f40..bb9654bbe 100644 --- a/hasjob/templates/application.html.jinja2 +++ b/hasjob/templates/application.html.jinja2 @@ -31,7 +31,7 @@ {{ response_form.hidden_tag() }} {%- if job_application.response.CAN_REJECT %}
    -

    +

    {% if not job_application.response.IGNORED %}{% endif %} diff --git a/hasjob/templates/formlayout.html.jinja2 b/hasjob/templates/formlayout.html.jinja2 index a81c7c9a7..f6cd82343 100644 --- a/hasjob/templates/formlayout.html.jinja2 +++ b/hasjob/templates/formlayout.html.jinja2 @@ -23,8 +23,8 @@ {% block content %}{% endblock %}

    {% endblock %} + {% block layoutscripts %} - {%- if header_campaign %}{{ campaign_script() }}{% endif %} + {{ super() }} {% assets "js_tinymce" %}{% endassets %} - {% block footerscripts %}{% endblock %} {% endblock %} diff --git a/hasjob/templates/layout.html.jinja2 b/hasjob/templates/layout.html.jinja2 index f06b16bdd..5240739ef 100644 --- a/hasjob/templates/layout.html.jinja2 +++ b/hasjob/templates/layout.html.jinja2 @@ -24,6 +24,18 @@ {%- endblock %} {%- block layoutheaders %} + + + + + + + + + + + + {# @@ -62,11 +74,11 @@
    {% macro site_title() %} @@ -86,9 +98,9 @@ {{/jobsArchive}} {{#if isMobile}} - + {{/if}}
    @@ -152,16 +164,16 @@
    {{#if !isMobile}} - + {{/if}} {{#if isMobile}} -
    - -
    +
    + +
    {{/if}} @@ -185,6 +197,9 @@ {%- if g.user and g.user.flags.has_jobpost_unconfirmed_month %} {% set user_links = user_links + [{'title': "Drafts", 'url': url_for('browse_drafts')}] %} {%- endif %} + {%- if is_siteadmin %} + {% set user_links = user_links + [{'title': "Dashboard", 'url': url_for('AdminDashboard_dashboard')}, {'title': "Campaign", 'url': url_for('AdminCampaignList_list_current')}] %} + {%- endif %} {%- if request.path != url_for('newjob') %} {% set site_links = site_links + [{'title': "Post a job", 'url': url_for('newjob')|usessl, 'class': 'btn btn-sm btn-post-job hidden-xs'}] %} {%- endif %} @@ -233,5 +248,31 @@ {% block layoutscripts %} {%- if header_campaign %}{{ campaign_script() }}{% endif %} + + + + {% block footerscripts %}{% endblock %} {% endblock %} diff --git a/hasjob/templates/offline.html.jinja2 b/hasjob/templates/offline.html.jinja2 new file mode 100644 index 000000000..2747133a2 --- /dev/null +++ b/hasjob/templates/offline.html.jinja2 @@ -0,0 +1,16 @@ +{% extends "layout.html.jinja2" %} +{% block title %}Offline{% endblock %} +{% block pageheaders %} +{% endblock %} +{%block content %} +
    +
    +
    + offline +
    +
    + You are offline and this page is not available on your device +
    +
    +
    +{% endblock %} \ No newline at end of file diff --git a/hasjob/templates/sheet.html.jinja2 b/hasjob/templates/sheet.html.jinja2 index 95f023cd1..575fb4582 100644 --- a/hasjob/templates/sheet.html.jinja2 +++ b/hasjob/templates/sheet.html.jinja2 @@ -20,8 +20,3 @@ {% block postcontent %}{% endblock %} {%- if header_campaign %}{{ campaign_header(g, header_campaign) }}{% endif %} {% endblock %} - -{% block layoutscripts %} - {%- if header_campaign %}{{ campaign_script() }}{% endif %} - {% block footerscripts %}{% endblock %} -{% endblock %} diff --git a/hasjob/templates/stats.html.jinja2 b/hasjob/templates/stats.html.jinja2 index 5395363e7..44d2b9f84 100644 --- a/hasjob/templates/stats.html.jinja2 +++ b/hasjob/templates/stats.html.jinja2 @@ -51,5 +51,4 @@ }); - -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/hasjob/templates/tablayout.html.jinja2 b/hasjob/templates/tablayout.html.jinja2 index 6f669d089..09ed0ae8d 100644 --- a/hasjob/templates/tablayout.html.jinja2 +++ b/hasjob/templates/tablayout.html.jinja2 @@ -27,8 +27,7 @@ {% endblock %} {% block layoutscripts %} - {%- if header_campaign %}{{ campaign_script() }}{% endif %} - {% block footerscripts %}{% endblock %} + {{ super() }} {% endblock %} diff --git a/hasjob/views/index.py b/hasjob/views/index.py index b604e297b..63b5eb4a3 100644 --- a/hasjob/views/index.py +++ b/hasjob/views/index.py @@ -828,3 +828,18 @@ def logoimage(domain, hashid): @app.route('/search') def search(): return redirect(url_for('index', **request.args)) + + +@app.route('/api/1/template/offline') +def offline(): + return render_template('offline.html.jinja2') + + +@app.route('/service-worker.js', methods=['GET']) +def sw(): + return app.send_static_file('service-worker.js') + + +@app.route('/manifest.json', methods=['GET']) +def manifest(): + return app.send_static_file('manifest.json') diff --git a/instance/settings-sample.py b/instance/settings-sample.py index 48568f34f..52fd035a6 100644 --- a/instance/settings-sample.py +++ b/instance/settings-sample.py @@ -70,3 +70,6 @@ DOGPILE_CACHE_REGIONS = [ ('hasjob_index', 3600) ] +ASSET_MANIFEST_PATH = "static/build/manifest.json" +# no trailing slash +ASSET_BASE_PATH = '/static/build'