diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 000000000..e01636872 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,4 @@ +{ + "directory" : "app/Resources/static/lib", + "json" : "bower.json" +} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..976a9eb59 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "extends": "airbnb", + "installedESLint": true, +} diff --git a/.gitignore b/.gitignore index 02e921f8d..5eca0e6b2 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,11 @@ docker/data/ # To avoid crazy stuff on some PR, we must manually FORCE ADD IT on each new release composer.lock + +# assets stuff +/node_modules/ +!app/Resources/static/lib +app/Resources/static/lib/* +/bin +!/src/Wallabag/CoreBundle/Resources/public +/src/Wallabag/CoreBundle/Resources/public/* diff --git a/.travis.yml b/.travis.yml index d397c872d..0e72d2072 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,9 @@ cache: directories: - vendor - $HOME/.composer/cache + - node_modules + - $HOME/.cache/bower + - $HOME/.npm php: - 5.5 @@ -22,16 +25,21 @@ php: - 7.0 - hhvm +node_js: + - "5" + env: - - DB=mysql - - DB=pgsql - - DB=sqlite + - DB=mysql ASSETS=nobuild + - DB=pgsql ASSETS=nobuild + - DB=sqlite ASSETS=nobuild matrix: fast_finish: true include: - php: 7.0 - env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite + env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite ASSETS=nobuild + - php: 7.0 + env: DB=sqlite ASSETS=build exclude: - php: hhvm env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency @@ -49,11 +57,15 @@ before_script: - composer self-update --no-progress - if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; +install: + - if [[ $ASSETS != nobuild ]]; then source ~/.nvm/nvm.sh && nvm install 5.0; fi; + - if [[ $ASSETS != nobuild ]]; then npm install -g npm@latest; fi; + before_install: - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; script: - - travis_wait composer install --no-interaction --no-progress --prefer-dist -o + - travis_wait bash install.sh - ant prepare-$DB - bin/phpunit -v - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000000000..04fd1fe86 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,215 @@ +module.exports = function (grunt) { + require('load-grunt-tasks')(grunt); + + grunt.initConfig({ + appDir: 'app/Resources/static', + buildDir: 'web/bundles/wallabagcore', + + postcss: { + material: { + options: { + map: { + inline: false, + }, + + processors: [ + require('pixrem')(), + require('autoprefixer')({ browsers: 'last 2 versions' }), + require('cssnano')(), + ], + }, + src: '<%= buildDir %>/material.css', + dest: '<%= buildDir %>/themes/material/css/style.min.css', + }, + baggy: { + options: { + map: { + inline: false, + }, + + processors: [ + require('pixrem')(), + require('autoprefixer')({ browsers: 'last 2 versions' }), + require('cssnano')(), + ], + }, + src: '<%= buildDir %>/baggy.css', + dest: '<%= buildDir %>/themes/baggy/css/style.min.css', + }, + }, + concat: { + options: { + separator: ';', + }, + jsMaterial: { + src: [ + '<%= appDir %>/themes/material/js/init.js', + '<%= appDir %>/themes/_global/js/restoreScroll.js', + ], + dest: '<%= buildDir %>/material.js', + }, + jsBaggy: { + src: [ + '<%= appDir %>/themes/baggy/js/init.js', + '<%= appDir %>/themes/_global/js/restoreScroll.js', + '<%= appDir %>/themes/baggy/js/autoClose.js', + '<%= appDir %>/themes/baggy/js/autoCompleteTags.js', + '<%= appDir %>/themes/baggy/js/closeMessage.js', + '<%= appDir %>/themes/baggy/js/popupForm.js', + // Save link is no more used for now + // '<%= appDir %>/themes/baggy/js/saveLink.js', + ], + dest: '<%= buildDir %>/baggy.js', + }, + cssMaterial: { + src: [ + 'node_modules/materialize-css/bin/materialize.css', + '<%= appDir %>/themes/material/css/*.css', + ], + dest: '<%= buildDir %>/material.css', + }, + cssBaggy: { + src: [ + '<%= appDir %>/themes/baggy/css/*.css', + ], + dest: '<%= buildDir %>/baggy.css', + }, + }, + browserify: { + '<%= buildDir %>/material.browser.js': ['<%= buildDir %>/material.js'], + '<%= buildDir %>/baggy.browser.js': ['<%= buildDir %>/baggy.js'], + }, + uglify: { + material: { + files: { + '<%= buildDir %>/themes/material/js/material.min.js': + ['<%= buildDir %>/material.browser.js'], + }, + options: { + sourceMap: true, + }, + }, + baggy: { + files: { + '<%= buildDir %>/themes/baggy/js/baggy.min.js': + ['<%= buildDir %>/baggy.browser.js'], + }, + options: { + sourceMap: true, + }, + }, + }, + copy: { + pickerjs: { + expand: true, + cwd: 'node_modules/pickadate/lib', + src: 'picker.js', + dest: '<%= buildDir %>', + }, + annotator: { + expand: true, + cwd: 'node_modules/annotator/pkg', + src: 'annotator.min.js', + dest: '<%= buildDir %>/themes/_global/js/', + }, + }, + symlink: { + baggyfonts: { + files: [ + { + expand: true, + overwrite: true, + cwd: '<%= appDir %>/lib/icomoon-bower/', + src: 'fonts', + dest: '<%= buildDir %>/themes/baggy/', + }, + { + expand: true, + overwrite: true, + cwd: '<%= appDir %>/lib/bower-pt-sans/fonts', + src: '*', + dest: '<%= buildDir %>/themes/baggy/fonts/', + }, + ], + }, + materialfonts: { + files: [ + { + expand: true, + overwrite: true, + cwd: '<%= appDir %>/lib/icomoon-bower/', + src: 'fonts', + dest: '<%= buildDir %>/themes/material/', + }, + { + expand: true, + overwrite: true, + cwd: 'node_modules/materialize-css/', + src: 'font', + dest: '<%= buildDir %>/themes/material', + }, + { + expand: true, + overwrite: true, + cwd: '<%= appDir %>/lib/roboto-fontface/fonts/', + src: '*', + dest: '<%= buildDir %>/themes/material/fonts/roboto/', + }, + { + expand: true, + overwrite: true, + cwd: '<%= appDir %>/lib/material-design-icons/iconfont/', + src: '*', + dest: '<%= buildDir %>/themes/material/fonts/', + }, + ], + }, + pics: { + files: [ + { + expand: true, + overwrite: true, + cwd: '<%= appDir %>/themes/_global/', + src: 'img', + dest: '<%= buildDir %>/themes/_global/', + }, + ], + }, + }, + clean: { + css: { + src: ['<%= buildDir %>/**/*.css'], + }, + js: { + src: ['<%= buildDir %>/**/*.js', '<%= buildDir %>/**/*.map'], + }, + all: { + src: ['./<%= buildDir %>'], + }, + }, + }); + + grunt.registerTask( + 'fonts', + 'Install fonts', + ['symlink:baggyfonts', 'symlink:materialfonts'] + ); + + grunt.registerTask( + 'js', + 'Build and install js files', + ['clean:js', 'copy:pickerjs', 'concat:jsMaterial', 'concat:jsBaggy', 'browserify', 'uglify'] + ); + + grunt.registerTask( + 'default', + 'Build and install everything', + ['clean', 'copy:pickerjs', 'concat', 'browserify', 'uglify', 'postcss', 'symlink'] + ); + + grunt.registerTask( + 'css', + 'Compiles the stylesheets.', + ['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss'] + ); +}; diff --git a/app/AppKernel.php b/app/AppKernel.php index 04f86eb76..96e45da81 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -13,7 +13,6 @@ class AppKernel extends Kernel new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), - new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new FOS\RestBundle\FOSRestBundle(), diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-114.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-114.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-114.png rename to app/Resources/static/themes/_global/img/appicon/apple-touch-icon-114.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-120.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-120.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-120.png rename to app/Resources/static/themes/_global/img/appicon/apple-touch-icon-120.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-144.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-144.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-144.png rename to app/Resources/static/themes/_global/img/appicon/apple-touch-icon-144.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-152.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png rename to app/Resources/static/themes/_global/img/appicon/apple-touch-icon-152.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-57.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-57.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-57.png rename to app/Resources/static/themes/_global/img/appicon/apple-touch-icon-57.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-72.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-72.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-72.png rename to app/Resources/static/themes/_global/img/appicon/apple-touch-icon-72.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-76.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon-76.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-76.png rename to app/Resources/static/themes/_global/img/appicon/apple-touch-icon-76.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon.png b/app/Resources/static/themes/_global/img/appicon/apple-touch-icon.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon.png rename to app/Resources/static/themes/_global/img/appicon/apple-touch-icon.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/favicon.ico b/app/Resources/static/themes/_global/img/appicon/favicon.ico similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/favicon.ico rename to app/Resources/static/themes/_global/img/appicon/favicon.ico diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/bg-select.png b/app/Resources/static/themes/_global/img/bg-select.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/bg-select.png rename to app/Resources/static/themes/_global/img/bg-select.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/carrot-icon--black.png b/app/Resources/static/themes/_global/img/icons/carrot-icon--black.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/carrot-icon--black.png rename to app/Resources/static/themes/_global/img/icons/carrot-icon--black.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/carrot-icon--white.png b/app/Resources/static/themes/_global/img/icons/carrot-icon--white.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/carrot-icon--white.png rename to app/Resources/static/themes/_global/img/icons/carrot-icon--white.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/diaspora-icon--black.png b/app/Resources/static/themes/_global/img/icons/diaspora-icon--black.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/diaspora-icon--black.png rename to app/Resources/static/themes/_global/img/icons/diaspora-icon--black.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/diaspora-icon--white.png b/app/Resources/static/themes/_global/img/icons/diaspora-icon--white.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/img/icons/diaspora-icon--white.png rename to app/Resources/static/themes/_global/img/icons/diaspora-icon--white.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/material/img/logo-other_themes.png b/app/Resources/static/themes/_global/img/logo-other_themes.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/material/img/logo-other_themes.png rename to app/Resources/static/themes/_global/img/logo-other_themes.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/material/img/logo-square.png b/app/Resources/static/themes/_global/img/logo-square.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/material/img/logo-square.png rename to app/Resources/static/themes/_global/img/logo-square.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo-w.png b/app/Resources/static/themes/_global/img/logo-w.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo-w.png rename to app/Resources/static/themes/_global/img/logo-w.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo-wallabag.svg b/app/Resources/static/themes/_global/img/logo-wallabag.svg similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/logo-wallabag.svg rename to app/Resources/static/themes/_global/img/logo-wallabag.svg diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/js/bookmarklet.js b/app/Resources/static/themes/_global/js/bookmarklet.js similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/_global/js/bookmarklet.js rename to app/Resources/static/themes/_global/js/bookmarklet.js diff --git a/app/Resources/static/themes/_global/js/restoreScroll.js b/app/Resources/static/themes/_global/js/restoreScroll.js new file mode 100644 index 000000000..9c4d7e20b --- /dev/null +++ b/app/Resources/static/themes/_global/js/restoreScroll.js @@ -0,0 +1,25 @@ +function supportsLocalStorage() { + try { + return 'localStorage' in window && window.localStorage !== null; + } catch (e) { + return false; + } +} + +function savePercent(id, percent) { + if (!supportsLocalStorage()) { return false; } + localStorage['wallabag.article.' + id + '.percent'] = percent; + return true; +} + +function retrievePercent(id) { + if (!supportsLocalStorage()) { return false; } + + var bheight = $(document).height(); + var percent = localStorage['wallabag.article.' + id + '.percent']; + var scroll = bheight * percent; + + $('html,body').animate({ scrollTop: scroll }, 'fast'); + + return true; +} diff --git a/app/Resources/static/themes/baggy/css/font.css b/app/Resources/static/themes/baggy/css/font.css new file mode 100755 index 000000000..cae7904a5 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/font.css @@ -0,0 +1,6 @@ +@font-face { + font-family: "PT Sans"; + font-style: normal; + font-weight: 700; + src: local("PT Sans Bold"), local("PTSans-Bold"), url("../fonts/pt_sans/regular/PTS55F.woff") format("woff"); +} diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css similarity index 59% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/main.css rename to app/Resources/static/themes/baggy/css/main.css index ba430cc4a..d46fae1a7 100755 --- a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -15,7 +15,7 @@ html { } body { - background-color: #EEE; + background-color: #eee; } .login { @@ -28,9 +28,9 @@ body { } .login form { - background-color: #FFF; + background-color: #fff; padding: 1.5em; - box-shadow: 0 1px 8px rgba(0,0,0,0.9); + box-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); width: 20em; position: absolute; top: 8em; @@ -50,7 +50,7 @@ body { ========================================================================== */ ::selection { - color: #FFF; + color: #fff; background-color: #000; } @@ -65,12 +65,16 @@ body { left: 0.6em; } -h2, h3, h4 { - font-family: 'PT Sans', sans-serif; +h2, +h3, +h4 { + font-family: "PT Sans", sans-serif; text-transform: uppercase; } -p, li, label { +p, +li, +label { color: #666; } @@ -79,28 +83,38 @@ a { font-weight: bold; } -a:hover, a:focus { +a.nostyle { + text-decoration: none; +} + +a:hover, +a:focus { text-decoration: none; } form fieldset { - border:0; + border: 0; padding: 0; margin: 0; } -form input[type="text"], form input[type="number"], select, form input[type="password"], form input[type="url"], form input[type="email"] { +form input[type="text"], +form input[type="number"], +select, +form input[type="password"], +form input[type="url"], +form input[type="email"] { border: 1px solid #999; padding: 0.5em 1em; min-width: 12em; color: #666; } -@media screen and (-webkit-min-device-pixel-ratio:0){ - select{ +@media screen and (-webkit-min-device-pixel-ratio: 0) { + select { -webkit-appearance: none; border-radius: 0; - background: #FFF url(../img/bg-select.png) no-repeat right center; + background: #fff url("../../_global/img/bg-select.png") no-repeat right center; } } @@ -127,31 +141,35 @@ form .row { margin-bottom: 0.5em; } -form button, input[type="submit"] { - cursor:pointer; +form button, +input[type="submit"] { + cursor: pointer; background-color: #000; - color: #FFF; - border:0; + color: #fff; + border: 0; padding: 0.5em 1em; display: inline-block; - border:1px solid #000; + border: 1px solid #000; } - form button:hover, form button:focus, input[type="submit"]:hover, input[type="submit"]:focus { - background-color: #FFF; - color: #000; - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -ms-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; - } +form button:hover, +form button:focus, +input[type="submit"]:hover, +input[type="submit"]:focus { + background-color: #fff; + color: #000; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -ms-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; +} #bookmarklet { cursor: move; } -h2:after { +h2::after { content: ""; height: 4px; width: 70px; @@ -163,12 +181,12 @@ h2:after { padding: 0; margin: 0; } - .links li { - list-style: none; - margin: 0; - padding: 0; - } +.links li { + list-style: none; + margin: 0; + padding: 0; +} #links { position: fixed; @@ -179,7 +197,7 @@ h2:after { background-color: #333; padding-top: 9.5em; height: 100%; - box-shadow:inset -4px 0 20px rgba(0,0,0,0.6); + box-shadow: inset -4px 0 20px rgba(0, 0, 0, 0.6); z-index: 15; } @@ -191,79 +209,80 @@ h2:after { padding-bottom: 1em; } - #links > li > a { - display: block; - padding: 0.5em 2em 0.5em 1em; - color: #FFF; - position: relative; - text-transform: uppercase; - text-decoration: none; - font-weight: normal; - font-family: 'PT Sans', sans-serif; - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -ms-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; - } +#links > li > a { + display: block; + padding: 0.5em 2em 0.5em 1em; + color: #fff; + position: relative; + text-transform: uppercase; + text-decoration: none; + font-weight: normal; + font-family: "PT Sans", sans-serif; + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -ms-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; +} - #links > li > a:hover, #links > li > a:focus { - background-color: #999; - color: #000; - } +#links > li > a:hover, +#links > li > a:focus { + background-color: #999; + color: #000; +} - #links .current:after { - content: ""; - width: 0; - height: 0; - position: absolute; - border-style: solid; - border-width: 10px; - border-color: transparent #EEE transparent transparent; - right: 0; - top: 50%; - margin-top: -10px; - } +#links .current::after { + content: ""; + width: 0; + height: 0; + position: absolute; + border-style: solid; + border-width: 10px; + border-color: transparent #eee transparent transparent; + right: 0; + top: 50%; + margin-top: -10px; +} - #links li:last-child { - position: fixed; - bottom: 1em; - width: 10em; - } - - #links li:last-child a:before { - font-size: 1.2em; - position: relative; - top: 2px; - } +#links li:last-child { + position: fixed; + bottom: 1em; + width: 10em; +} +#links li:last-child a::before { + font-size: 1.2em; + position: relative; + top: 2px; +} #sort { - padding: 0; - list-style-type: none; - opacity: 0.5; - display: inline-block; + padding: 0; + list-style-type: none; + opacity: 0.5; + display: inline-block; } #sort li { - display: inline; - font-size: 0.9em; + display: inline; + font-size: 0.9em; } #sort li + li { - margin-left: 10px; + margin-left: 10px; } #sort a { - padding: 2px 2px 0; - vertical-align: middle; + padding: 2px 2px 0; + vertical-align: middle; } #sort img { - vertical-align: baseline; + vertical-align: baseline; } + #sort img:hover { - cursor: pointer; + cursor: pointer; } #display-mode { @@ -273,25 +292,38 @@ h2:after { margin-bottom: 10px; opacity: 0.5; } + #listmode { width: 16px; display: inline-block; text-decoration: none; } + #listmode a:hover { opacity: 1; } + #listmode.tablemode { background-image: url("../img/baggy/table.png"); background-repeat: no-repeat; background-position: bottom; } + #listmode.listmode { background-image: url("../img/baggy/list.png"); background-repeat: no-repeat; background-position: bottom; } +#warning_message { + position: fixed; + background-color: #ff6347; + z-index: 1000; + bottom: 0; + left: 0; + width: 100%; + color: #000; +} /* ========================================================================== 2 = Layout @@ -319,12 +351,12 @@ footer a { } .list-entries { - letter-spacing:-5px; + letter-spacing: -5px; } .listmode .entry { - width: 100%!important; - margin-left: 0!important; + width: 100% !important; + margin-left: 0 !important; } .list-entries + .results { @@ -344,9 +376,9 @@ footer a { } .entry { - background-color: #FFF; - letter-spacing:normal; - box-shadow: 0 3px 7px rgba(0,0,0,0.3); + background-color: #fff; + letter-spacing: normal; + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); display: inline-block; width: 32%; margin-bottom: 1.5em; @@ -355,22 +387,13 @@ footer a { position: relative; overflow: hidden; padding: 1.5em 1.5em 3em 1.5em; - - /* Removing CSS transitions because they make the switch from list view to - * table view jerky - */ - /* -webkit-transition: all 0.5s ease; */ - /* -moz-transition: all 0.5s ease; */ - /* -ms-transition: all 0.5s ease; */ - /* -o-transition: all 0.5s ease; */ - /* transition: all 0.5s ease; */ } -.entry:before { +.entry::before { content: ""; width: 0; height: 0; - border-style:solid; + border-style: solid; border-color: transparent transparent #000 transparent; border-width: 10px; position: absolute; @@ -378,13 +401,13 @@ footer a { z-index: 10; right: 1.5em; -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -ms-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -ms-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; } -.entry:after { +.entry::after { content: ""; position: absolute; height: 7px; @@ -393,21 +416,21 @@ footer a { left: 0; background-color: #000; -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -ms-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -ms-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; } .entry:hover { - box-shadow: 0 3px 10px rgba(0,0,0,1); + box-shadow: 0 3px 10px rgba(0, 0, 0, 1); } -.entry:hover:after { +.entry:hover::after { height: 40px; } -.entry:hover:before { +.entry:hover::before { bottom: 2.4em; } @@ -421,10 +444,9 @@ footer a { line-height: 1.2; } - .entry h2:after { - content: none; - } - +.entry h2::after { + content: none; +} .entry h2 a { display: block; @@ -432,24 +454,14 @@ footer a { color: #000; word-wrap: break-word; -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -ms-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -ms-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; } -/* -.entry h2 a:after { - content: ""; - position: absolute; - top: 0; - width: 100%; - height: 100%; - left: 0; -} -*/ img.preview { - max-width: 100%; + max-width: 100%; } .entry p { @@ -458,9 +470,9 @@ img.preview { line-height: 1.7; } - .entry h2 a:first-letter { - text-transform: uppercase; - } +.entry h2 a::first-letter { + text-transform: uppercase; +} .entry:hover .tools { bottom: 0; @@ -475,26 +487,26 @@ img.preview { padding-right: 0.5em; text-align: right; -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - -ms-transition: all 0.5s ease; - -o-transition: all 0.5s ease; - transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -ms-transition: all 0.5s ease; + -o-transition: all 0.5s ease; + transition: all 0.5s ease; } - .entry .tools a { - color: #666; - text-decoration: none; - display: block; - padding: 0.4em; - } +.entry .tools a { + color: #666; + text-decoration: none; + display: block; + padding: 0.4em; +} - .entry .tools a:hover { - color: #FFF; - } +.entry .tools a:hover { + color: #fff; +} - .entry .tools li { - display: inline-block; - } +.entry .tools li { + display: inline-block; +} .entry:nth-child(3n+1) { margin-left: 0; @@ -510,11 +522,12 @@ img.preview { vertical-align: top; letter-spacing: normal; width: 50%; + text-align: right; } div.pagination ul { text-align: right; - margin-bottom:50px; + margin-bottom: 50px; } .nb-results { @@ -533,11 +546,13 @@ div.pagination ul a { text-decoration: none; } -div.pagination ul a:hover, div.pagination ul a:focus { - text-decoration: underline; +div.pagination ul a:hover, +div.pagination ul a:focus { + text-decoration: underline; } -div.pagination ul .disabled { +div.pagination ul .prev.disabled, +div.pagination ul .next.disabled { display: none; } @@ -556,7 +571,7 @@ div.pagination ul .current { ========================================================================== */ .popup-form { - background: rgba(0,0,0,0.5); + background: rgba(0, 0, 0, 0.5); position: absolute; top: 0; left: 10em; @@ -567,11 +582,11 @@ div.pagination ul .current { margin-top: -30% !important; padding: 2em; display: none; - border-left: 1px #EEE solid; + border-left: 1px #eee solid; } - .popup-form form { - background-color: #FFF; +.popup-form form { + background-color: #fff; position: absolute; top: 0; left: 0; @@ -580,51 +595,52 @@ div.pagination ul .current { width: 400px; height: 200px; padding: 2em; - } +} #bagit-form-form .addurl { - margin-left: 0; + margin-left: 0; } .closeMessage, .close-button { background-color: #000; - color: #FFF; - font-size: 1.2em; - line-height: 1.6; - width: 1.6em; - height: 1.6em; - text-align: center; + color: #fff; + font-size: 1.2em; + line-height: 1.6; + width: 1.6em; + height: 1.6em; + text-align: center; text-decoration: none; } - .closeMessage:hover, - .closeMessage:focus, - .close-button:hover, - .close-button:focus { + +.closeMessage:hover, +.closeMessage:focus, +.close-button:hover, +.close-button:focus { background-color: #999; color: #000; - } +} .close-button--popup { - display: inline-block; - position: absolute; - top: 0; - right: 0; - font-size: 1.4em; + display: inline-block; + position: absolute; + top: 0; + right: 0; + font-size: 1.4em; } .active-current { background-color: #999; } -.active-current:after { +.active-current::after { content: ""; width: 0; height: 0; position: absolute; border-style: solid; border-width: 10px; - border-color: transparent #EEE transparent transparent; + border-color: transparent #eee transparent transparent; right: 0; top: 50%; margin-top: -10px; @@ -641,22 +657,23 @@ div.pagination ul .current { } a.add-to-wallabag-link-after { - visibility: hidden; - position: absolute; - opacity: 0; - transition-duration: 2s; - transition-timing-function: ease-out; + visibility: hidden; + position: absolute; + opacity: 0; + transition-duration: 2s; + transition-timing-function: ease-out; } -#article article a:hover + a.add-to-wallabag-link-after, a.add-to-wallabag-link-after:hover { - opacity: 1; - visibility: visible; - transition-duration: .3s; - transition-timing-function: ease-in; +#article article a:hover + a.add-to-wallabag-link-after, +a.add-to-wallabag-link-after:hover { + opacity: 1; + visibility: visible; + transition-duration: 0.3s; + transition-timing-function: ease-in; } -a.add-to-wallabag-link-after:after { - content: "w"; +a.add-to-wallabag-link-after::after { + content: "w"; } #add-link-result { @@ -664,29 +681,76 @@ a.add-to-wallabag-link-after:after { font-size: 0.9em; } +.btn-clickable { + cursor: pointer; +} + /* ========================================================================== 3 = Pictos ========================================================================== */ @font-face { - font-family: 'icomoon'; - src:url('../fonts/icomoon.eot?-s0mcsx'); - src:url('../fonts/icomoon.eot?#iefix-s0mcsx') format('embedded-opentype'), - url('../fonts/icomoon.woff?-s0mcsx') format('woff'), - url('../fonts/icomoon.ttf?-s0mcsx') format('truetype'), - url('../fonts/icomoon.svg?-s0mcsx#icomoon') format('svg'); + font-family: icomoon; + src: url("../fonts/icomoon.eot?-s0mcsx"); + src: + url("../fonts/icomoon.eot?#iefix-s0mcsx") format("embedded-opentype"), + url("../fonts/icomoon.woff?-s0mcsx") format("woff"), + url("../fonts/icomoon.ttf?-s0mcsx") format("truetype"), + url("../fonts/icomoon.svg?-s0mcsx#icomoon") format("svg"); font-weight: normal; font-style: normal; } +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url(../fonts/MaterialIcons-Regular.eot); + /* For IE6-8 */ + src: local("Material Icons"), local("MaterialIcons-Regular"), url(../fonts/MaterialIcons-Regular.woff2) format("woff2"), url(../fonts/MaterialIcons-Regular.woff) format("woff"), url(../fonts/MaterialIcons-Regular.ttf) format("truetype"); +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 1em; /* Preferred icon size */ + width: 1em; + height: 1em; + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; +} + +.material-icons.md-18 { font-size: 18px; } +.material-icons.md-24 { font-size: 24px; } +.material-icons.md-36 { font-size: 36px; } +.material-icons.md-48 { font-size: 48px; } + .icon span, .icon-image span { position: absolute; top: -9999px; } -[class^="icon-"]:before, [class*=" icon-"]:before { - font-family: 'icomoon'; +[class^="icon-"]::before, +[class*=" icon-"]::before { + font-family: icomoon; speak: none; font-style: normal; font-weight: normal; @@ -699,93 +763,113 @@ a.add-to-wallabag-link-after:after { -moz-osx-font-smoothing: grayscale; } -.icon-flattr:before { - content: "\e800"; +.icon-flattr::before { + content: "\ead4"; } -.icon-mail:before { - content: "\e80a"; + +.icon-mail::before { + content: "\ea86"; } -.icon-up-open:before { + +.icon-up-open::before { content: "\e80b"; } -.icon-star:before { - content: "\e805"; + +.icon-star::before { + content: "\e9d9"; } -.icon-check:before { - content: "\e804"; + +.icon-check::before { + content: "\ea10"; } -.icon-link:before { - content: "\e801"; + +.icon-link::before { + content: "\e9cb"; } -.icon-reply:before { + +.icon-reply::before { content: "\e806"; } -.icon-menu:before { - content: "\e802"; + +.icon-menu::before { + content: "\e9bd"; } -.icon-clock:before { + +.icon-clock::before { content: "\e803"; } -.icon-twitter:before { - content: "\e807"; + +.icon-twitter::before { + content: "\ea91"; } -.icon-down-open:before { + +.icon-down-open::before { content: "\e809"; } -.icon-trash:before { - content: "\e80c"; + +.icon-trash::before { + content: "\e9ac"; } -.icon-delete:before { - content: "\e600"; + +.icon-delete::before { + content: "\ea0d"; } -.icon-power:before { - content: "\e601"; + +.icon-power::before { + content: "\ea14"; } -.icon-arrow-up-thick:before { - content: "\e602"; + +.icon-arrow-up-thick::before { + content: "\ea3a"; } -.icon-rss:before { + +.icon-rss::before { content: "\e808"; } -.icon-print:before { - content: "\e80d"; + +.icon-print::before { + content: "\e954"; } -.icon-reload:before { + +.icon-reload::before { content: "\ea2e"; } +.icon-price-tags::before { + content: "\e936"; +} /* .icon-image class, for image-based icons ========================================================================== */ .icon-image { - background-size: 16px 16px; - background-repeat: no-repeat; - background-position: center; - padding-right: 1em !important; - padding-left: 1em !important; + background-size: 16px 16px; + background-repeat: no-repeat; + background-position: center; + padding-right: 1em !important; + padding-left: 1em !important; } /* Carrot (http://carrot.org) */ .icon-image--carrot { - background-image: url('../../_global/img/icons/carrot-icon--white.png'); + background-image: url("../../_global/img/icons/carrot-icon--white.png"); } /* Diaspora */ .icon-image--diaspora { - background-image: url('../../_global/img/icons/diaspora-icon--black.png'); + background-image: url("../../_global/img/icons/diaspora-icon--black.png"); } /* ========================================================================== Icon selected ========================================================================== */ -.icon-star.fav:before { - color: #FFF; +.icon-star.fav::before { + color: #fff; } -.icon-check.archive:before { - color: #FFF; +.icon-check.archive::before { + color: #fff; } /* ========================================================================== @@ -797,33 +881,25 @@ a.add-to-wallabag-link-after:after { margin-top: 1em; } -.messages > * { display: inline-block;} +.messages > * { + display: inline-block; +} .warning { - /* font-size: 3em; - color: #999; - font-style: italic; - position: absolute; - top: 50%; - left: 0; - width: 100%; - text-align: center; - padding-right: 5%; - margin-top: -2em;*/ font-weight: bold; display: block; width: 100%; } .more-info { - font-size: 0.85em; + font-size: 0.85em; line-height: 1.5; - color: #aaa; + color: #aaa; } - .more-info a { +.more-info a { color: #aaa; - } +} /* ========================================================================== 5 = Article @@ -844,8 +920,8 @@ a.add-to-wallabag-link-after:after { } blockquote { - border:1px solid #999; - background-color: #FFF; + border: 1px solid #999; + background-color: #fff; padding: 1em; margin: 0; } @@ -854,11 +930,13 @@ blockquote { text-align: left; } -#article h2, #article h3, #article h4 { +#article h2, +#article h3, +#article h4 { text-transform: none; } -#article h2:after { +#article h2::after { content: none; } @@ -880,19 +958,20 @@ blockquote { #article_toolbar a { background-color: #000; padding: 0.3em 0.5em 0.2em; - color: #FFF; + color: #fff; text-decoration: none; } -#article_toolbar a:hover, #article_toolbar a:focus { +#article_toolbar a:hover, +#article_toolbar a:focus { background-color: #999; } #nav-btn-add-tag { - cursor: pointer; + cursor: pointer; } -.shaarli:before { +.shaarli::before { content: "*"; } @@ -902,7 +981,7 @@ blockquote { display: block; } -.return:before { +.return::before { margin-right: 0.5em; } @@ -913,11 +992,11 @@ blockquote { .icon-rss { background-color: #000; - color: #FFF; + color: #fff; padding: 0.2em 0.5em; } -.icon-rss:before { +.icon-rss::before { position: relative; top: 2px; } @@ -926,8 +1005,9 @@ blockquote { margin-bottom: 0.5em; } -.list-tags .icon-rss:hover, .list-tags .icon-rss:focus { - background-color: #FFF; +.list-tags .icon-rss:hover, +.list-tags .icon-rss:focus { + background-color: #fff; color: #000; text-decoration: none; } @@ -936,14 +1016,13 @@ blockquote { text-decoration: none; } -.list-tags a:hover, .list-tags a:focus { +.list-tags a:hover, +.list-tags a:focus { text-decoration: underline; } pre code { font-family: "Courier New", Courier, monospace; - border: 1px solid #ccc; - font-size: 0.96em; } #filter-form { @@ -952,28 +1031,45 @@ pre code { height: 100%; top: 0; right: 0; - background-color: #FFF; + background-color: #fff; padding: 15px; padding-right: 30px; padding-top: 30px; border-left: 1px #333 solid; z-index: 12; - - /*transition-property: transform; - transition-duration: 0.3s; - transition-delay: 0.3s; - - transform: translate3d(100%, 0, 0);*/ -} - -#filter-form form { - + min-width: 300px; } #filter-form form .filter-group { margin: 5px; } +#download-form { + position: fixed; + width: 10%; + height: 100%; + top: 0; + right: 0; + background-color: #fff; + padding: 15px; + padding-right: 30px; + padding-top: 30px; + border-left: 1px #333 solid; + z-index: 12; + min-width: 200px; +} + +#download-form li { + display: block; + padding: .5em 2em .5em 1em; + color: #fff; + position: relative; + text-transform: uppercase; + text-decoration: none; + font-weight: 400; + font-family: PT Sans,sans-serif; + transition: all .5s ease; +} /* ========================================================================== 6 = Media Queries @@ -1015,6 +1111,7 @@ pre code { width: 100%; margin-left: 0; } + body > header { background-color: #333; position: fixed; @@ -1023,27 +1120,33 @@ pre code { height: 3em; z-index: 11; } + #links li:last-child { position: static; width: auto; } - #links li:last-child a:before { + + #links li:last-child a::before { content: none; } + .logo { width: 1.25em; height: 1.25em; left: 0; top: 0; } + .login > header { position: static; } + .login form { width: 100%; position: static; margin-left: 0; } + .login .logo { width: auto; height: auto; @@ -1052,41 +1155,48 @@ pre code { height: 75px; margin-left: -37.5px; } + .desktopHide { display: block; position: fixed; z-index: 20; top: 0; right: 0; - border:0; + border: 0; width: 2.5em; height: 2.5em; cursor: pointer; background-color: #999; font-size: 1.2em; } - .desktopHide:hover, .desktopHide:focus { - background-color: #FFF; - } + .desktopHide:hover, + .desktopHide:focus { + background-color: #fff; + } + #links { display: none; width: 100%; height: auto; padding-top: 3em; } + #links.menu--open { display: block; } - footer { + + footer { position: static; margin-right: 3em; } + #main { margin-left: 1.5em; padding-right: 1.5em; position: static; margin-top: 3em; } + #article_toolbar .topPosF { display: none; } @@ -1098,6 +1208,7 @@ pre code { #article h1 { font-size: 1.5em; } + #article_toolbar a { padding: 0.3em 0.4em 0.2em; } @@ -1106,7 +1217,9 @@ pre code { display: none; } - .popup-form, #bagit-form, #search-form { + .popup-form, + #bagit-form, + #search-form { left: 0; width: 100%; border-left: none; diff --git a/app/Resources/static/themes/baggy/css/messages.css b/app/Resources/static/themes/baggy/css/messages.css new file mode 100755 index 000000000..bfaf14488 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/messages.css @@ -0,0 +1,19 @@ +.messages.error.install { + border: 1px solid #c42608; + color: #c00 !important; + background: #fff0ef; + text-align: left; +} + +.messages.notice.install { + border: 1px solid #ebcd41; + color: #000; + background: #fffcd3; + text-align: left; +} + +.messages.success.install { + border: 1px solid #6dc70c; + background: #e0fbcc !important; + text-align: left; +} diff --git a/app/Resources/static/themes/baggy/css/print.css b/app/Resources/static/themes/baggy/css/print.css new file mode 100755 index 000000000..6f187ff54 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/print.css @@ -0,0 +1,64 @@ +@media print { + /* ### Layout ### */ + + body { + font-family: Serif; + background-color: #fff; + } + + @page { + margin: 1cm; + } + + img { + max-width: 100% !important; + } + + /* ### Content ### */ + + /* Hide useless blocks */ + body > header, + #article_toolbar, + #links, + #sort, + body > footer, + .top_link, + div.tools, + header div, + .messages, + .entrie + .results { + display: none !important; + } + + article { + border: none !important; + } + + /* Add URL after links */ + .vieworiginal a::after { + content: " (" attr(href) ")"; + } + + /* Add explanation after abbr */ + abbr[title]::after { + content: " (" attr(title) ")"; + } + + /* Change border on current pager item */ + .pagination span.current { + border-style: dashed; + } + + #main { + width: 100%; + padding: 0; + margin: 0; + margin-left: 0; + padding-right: 0; + padding-bottom: 0; + } + + #article { + width: 100%; + } +} diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/ratatouille.css b/app/Resources/static/themes/baggy/css/ratatouille.css similarity index 62% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/ratatouille.css rename to app/Resources/static/themes/baggy/css/ratatouille.css index b203cbb89..bf89d8816 100644 --- a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/css/ratatouille.css +++ b/app/Resources/static/themes/baggy/css/ratatouille.css @@ -6,8 +6,8 @@ * { -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } html { @@ -18,7 +18,7 @@ html { body { font-size: 1em; - line-height:1.5; + line-height: 1.5; margin: 0; } @@ -35,7 +35,7 @@ h6:first-child, p:first-child, ul:first-child, ol:first-child, -dl:first-child{ +dl:first-child { margin-top: 0; } @@ -43,14 +43,13 @@ code, kbd, pre, samp { - font-family: monospace, serif; + font-family: monospace, serif; } pre { - white-space: pre-wrap; + white-space: pre-wrap; } - .upper { text-transform: uppercase; } @@ -61,12 +60,13 @@ pre { .inner { margin: 0 auto; - max-width: 61.25em;/*980px*/ + max-width: 61.25em; /* 980px */ } -table, img { +table, +img { max-width: 100%; - height :auto; + height: auto; } iframe { @@ -93,13 +93,13 @@ button, input, select, textarea { - font-family: inherit; - font-size: 100%; - margin: 0; + font-family: inherit; + font-size: 100%; + margin: 0; } input[type="search"] { - -webkit-appearance: textfield; + -webkit-appearance: textfield; } /* ========================================================================== @@ -115,11 +115,17 @@ input[type="search"] { display: none; } -.dtable { display:table } +.dtable { + display: table; +} - .dtable > * { display:table-row; } +.dtable > * { + display: table-row; +} - .dtable > * > * { display:table-cell; } +.dtable > * > * { + display: table-cell; +} .element-invisible { border: 0; @@ -133,32 +139,60 @@ input[type="search"] { } .small { - font-size:0.8em; + font-size: 0.8em; } .big { font-size: 1.2em; } -/*Width*/ +/* Width */ -.w100 { width:100%; } -.w90 { width:90%; } -.w80 { width:80%; } -.w70 { width:70%; } -.w60 { width:60%; } -.w50 { width:50%; } -.w40 { width:40%; } -.w30 { width:30%; } -.w20 { width:20%; } -.w10 { width:10%; } +.w100 { + width: 100%; +} +.w90 { + width: 90%; +} + +.w80 { + width: 80%; +} + +.w70 { + width: 70%; +} + +.w60 { + width: 60%; +} + +.w50 { + width: 50%; +} + +.w40 { + width: 40%; +} + +.w30 { + width: 30%; +} + +.w20 { + width: 20%; +} + +.w10 { + width: 10%; +} /* ========================================================================== Internet Explorer ========================================================================== */ -/*IE8 and IE9*/ +/* IE8 and IE9 */ article, aside, @@ -172,40 +206,20 @@ main, nav, section, summary { - display: block; + display: block; } -/*IE8 and IE9*/ +/* IE8 and IE9 */ audio, canvas, video { - display: inline-block; + display: inline-block; } -@media screen and (-webkit-min-device-pixel-ratio:0){ - select{ +@media screen and (-webkit-min-device-pixel-ratio: 0) { + select { -webkit-appearance: none; border-radius: 0; } } - -/* ========================================================================== - Medias Queries - ========================================================================== */ - -/*Desktop 1080px*/ - -@media screen and (max-width: 67.50em) { -} - -/*Tablet 800px*/ - -@media screen and (max-width: 50em) { -} - -/*Mobile 640px*/ - -@media screen and (max-width: 40em) { -} - diff --git a/app/Resources/static/themes/baggy/font/icomoon.eot b/app/Resources/static/themes/baggy/font/icomoon.eot new file mode 100644 index 000000000..248758fbd Binary files /dev/null and b/app/Resources/static/themes/baggy/font/icomoon.eot differ diff --git a/app/Resources/static/themes/baggy/font/icomoon.svg b/app/Resources/static/themes/baggy/font/icomoon.svg new file mode 100644 index 000000000..b1b9c92ac --- /dev/null +++ b/app/Resources/static/themes/baggy/font/icomoon.svg @@ -0,0 +1,501 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/Resources/static/themes/baggy/font/icomoon.ttf b/app/Resources/static/themes/baggy/font/icomoon.ttf new file mode 100644 index 000000000..c03770c6c Binary files /dev/null and b/app/Resources/static/themes/baggy/font/icomoon.ttf differ diff --git a/app/Resources/static/themes/baggy/font/icomoon.woff b/app/Resources/static/themes/baggy/font/icomoon.woff new file mode 100644 index 000000000..121e0bddb Binary files /dev/null and b/app/Resources/static/themes/baggy/font/icomoon.woff differ diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/blank.png b/app/Resources/static/themes/baggy/img/blank.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/blank.png rename to app/Resources/static/themes/baggy/img/blank.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/down.png b/app/Resources/static/themes/baggy/img/down.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/down.png rename to app/Resources/static/themes/baggy/img/down.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/list.png b/app/Resources/static/themes/baggy/img/list.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/list.png rename to app/Resources/static/themes/baggy/img/list.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/table.png b/app/Resources/static/themes/baggy/img/table.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/table.png rename to app/Resources/static/themes/baggy/img/table.png diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/top.png b/app/Resources/static/themes/baggy/img/top.png similarity index 100% rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/img/baggy/top.png rename to app/Resources/static/themes/baggy/img/top.png diff --git a/app/Resources/static/themes/baggy/js/autoClose.js b/app/Resources/static/themes/baggy/js/autoClose.js new file mode 100644 index 000000000..b0dafab21 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/autoClose.js @@ -0,0 +1,8 @@ +var $ = global.jquery = require('jquery'); + +$(document).ready(function () { + var currentUrl = window.location.href; + if (currentUrl.match('&closewin=true')) { + window.close(); + } +}); diff --git a/app/Resources/static/themes/baggy/js/autoCompleteTags.js b/app/Resources/static/themes/baggy/js/autoCompleteTags.js new file mode 100755 index 000000000..edd0a421e --- /dev/null +++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js @@ -0,0 +1,46 @@ +var $ = global.jquery = require('jquery'); + +jQuery(function ($) { + function split(val) { + return val.split(/,\s*/); + } + function extractLast(term) { + return split(term).pop(); + } + + + $('#value').bind('keydown', function (event) { + if (event.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active) { + event.preventDefault(); + } + }).autocomplete({ + source: function (request, response) { + $.getJSON('./?view=tags', { + term: extractLast(request.term), + //id: $(':hidden#entry_id').val() + }, response); + }, + search: function () { + // custom minLength + var term = extractLast(this.value); + if (term.length < 1) { + return false; + } + }, + focus: function () { + // prevent value inserted on focus + return false; + }, + select: function (event, ui) { + var terms = split(this.value); + // remove the current input + terms.pop(); + // add the selected item + terms.push(ui.item.value); + // add placeholder to get the comma-and-space at the end + terms.push(''); + this.value = terms.join(', '); + return false; + }, + }); +}); diff --git a/app/Resources/static/themes/baggy/js/closeMessage.js b/app/Resources/static/themes/baggy/js/closeMessage.js new file mode 100644 index 000000000..ae4b17912 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/closeMessage.js @@ -0,0 +1,19 @@ +var $ = global.jquery = require('jquery'); + +$(function () { + //--------------------------------------------------------------------------- + // Show the close icon when the user hover over a message + //--------------------------------------------------------------------------- + // $('.messages').on('mouseenter', function(){ + // $(this).find('a.closeMessage').stop(true, true).show(); + // }).on('mouseleave', function(){ + // $(this).find('a.closeMessage').stop(true, true).hide(); + // }); + //--------------------------------------------------------------------------- + // Close the message box when the user clicks the close icon + //--------------------------------------------------------------------------- + $('a.closeMessage').on('click', function () { + $(this).parents('div.messages').slideUp(300, function () { $(this).remove(); }); + return false; + }); +}); diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js new file mode 100755 index 000000000..d7d4b1661 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/init.js @@ -0,0 +1,98 @@ +var $ = global.jquery = require('jquery'); +require('jquery.cookie'); +require('jquery-ui'); +var annotator = require('annotator'); + + +$.fn.ready(function () { + var $listmode = $('#listmode'); + var $listentries = $('#list-entries'); + + /* ========================================================================== + Menu + ========================================================================== */ + + $('#menu').click(function () { + $('#links').toggleClass('menu--open'); + if ($('#content').hasClass('opacity03')) { + $('#content').removeClass('opacity03'); + } + }); + + /* ========================================================================== + List mode or Table Mode + ========================================================================== */ + + $listmode.click(function () { + if (jquery.cookie('listmode') === 1) { + // Cookie + $.removeCookie('listmode'); + + $listentries.removeClass('listmode'); + $listmode.removeClass('tablemode'); + $listmode.addClass('listmode'); + } else { + // Cookie + jquery.cookie('listmode', 1, { expires: 365 }); + + $listentries.addClass('listmode'); + $listmode.removeClass('listmode'); + $listmode.addClass('tablemode'); + } + }); + + /* ========================================================================== + Cookie listmode + ========================================================================== */ + + if (jquery.cookie('listmode') === 1) { + $listentries.addClass('listmode'); + $listmode.removeClass('listmode'); + $listmode.addClass('tablemode'); + } + + /* ========================================================================== + Add tag panel + ========================================================================== */ + + + $('#nav-btn-add-tag').on('click', function () { + $('.nav-panel-add-tag').toggle(100); + $('.nav-panel-menu').addClass('hidden'); + $('#tag_label').focus(); + return false; + }); + + /* ========================================================================== + Annotations & Remember position + ========================================================================== */ + + if ($('article').length) { + var app = new annotator.App(); + + app.include(annotator.ui.main, { + element: document.querySelector('article'), + }); + + var x = JSON.parse($('#annotationroutes').html()); + app.include(annotator.storage.http, x); + + app.start().then(function () { + app.annotations.load({ entry: x.entryId }); + }); + + $(window).scroll(function (e) { + var scrollTop = $(window).scrollTop(); + var docHeight = $(document).height(); + var scrollPercent = (scrollTop) / (docHeight); + var scrollPercentRounded = Math.round(scrollPercent * 100) / 100; + savePercent(x.entryId, scrollPercentRounded); + }); + + retrievePercent(x.entryId); + + $(window).resize(function () { + retrievePercent(x.entryId); + }); + } +}); diff --git a/app/Resources/static/themes/baggy/js/popupForm.js b/app/Resources/static/themes/baggy/js/popupForm.js new file mode 100644 index 000000000..95ba60ee5 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/popupForm.js @@ -0,0 +1,101 @@ +var $ = global.jquery = require('jquery'); + +$(document).ready(function () { + $('#search-form').hide(); + $('#bagit-form').hide(); + $('#filter-form').hide(); + $('#download-form').hide(); + + //--------------------------------------------------------------------------- + // Toggle the 'Search' popup in the sidebar + //--------------------------------------------------------------------------- + function toggleSearch() { + $('#search-form').toggle(); + $('#search').toggleClass('current'); + $('#search').toggleClass('active-current'); + $('#search-arrow').toggleClass('arrow-down'); + if ($('#search').hasClass('current')) { + $('#content').addClass('opacity03'); + } else { + $('#content').removeClass('opacity03'); + } + } + + //--------------------------------------------------------------------------- + // Toggle the 'Filter' popup on entries list + //--------------------------------------------------------------------------- + function toggleFilter() { + $('#filter-form').toggle(); + } + + //--------------------------------------------------------------------------- + // Toggle the 'Download' popup on entries list + //--------------------------------------------------------------------------- + function toggleDownload() { + $('#download-form').toggle(); + } + + //--------------------------------------------------------------------------- + // Toggle the 'Save a Link' popup in the sidebar + //--------------------------------------------------------------------------- + function toggleBagit() { + $('#bagit-form').toggle(); + $('#bagit').toggleClass('current'); + $('#bagit').toggleClass('active-current'); + $('#bagit-arrow').toggleClass('arrow-down'); + if ($('#bagit').hasClass('current')) { + $('#content').addClass('opacity03'); + } else { + $('#content').removeClass('opacity03'); + } + } + + //--------------------------------------------------------------------------- + // Close all #links popups in the sidebar + //--------------------------------------------------------------------------- + function closePopups() { + $('#links .messages').hide(); + $('#links > li > a').removeClass('active-current'); + $('#links > li > a').removeClass('current'); + $('[id$=-arrow]').removeClass('arrow-down'); + $('#content').removeClass('opacity03'); + } + + $('#search').click(function () { + closePopups(); + toggleSearch(); + $('#searchfield').focus(); + }); + + $('.filter-btn').click(function () { + closePopups(); + toggleFilter(); + }); + + $('.download-btn').click(function () { + closePopups(); + toggleDownload(); + }); + + $('#bagit').click(function () { + closePopups(); + toggleBagit(); + $('#plainurl').focus(); + }); + + $('#search-form-close').click(function () { + toggleSearch(); + }); + + $('#filter-form-close').click(function () { + toggleFilter(); + }); + + $('#download-form-close').click(function () { + toggleDownload(); + }); + + $('#bagit-form-close').click(function () { + toggleBagit(); + }); +}); diff --git a/app/Resources/static/themes/baggy/js/saveLink.js b/app/Resources/static/themes/baggy/js/saveLink.js new file mode 100755 index 000000000..5c7208862 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/saveLink.js @@ -0,0 +1,75 @@ +var $ = global.jquery = require('jquery'); + +$.fn.ready(function () { + var $bagit = $('#bagit'); + var $bagitForm = $('#bagit-form'); + var $bagitFormForm = $('#bagit-form-form'); + + /* ========================================================================== + bag it link and close button + ========================================================================== */ + + function toggleSaveLinkForm(url, event) { + $('#add-link-result').empty(); + + $bagit.toggleClass('active-current'); + + // only if bag-it link is not presented on page + if ($bagit.length === 0) { + if (event !== 'undefined' && event) { + $bagitForm.css({ position: 'absolute', top: event.pageY, left: event.pageX - 200 }); + } else { + $bagitForm.css({ position: 'relative', top: 'auto', left: 'auto' }); + } + } + + if ($('#search-form').length !== 0) { + $('#search').removeClass('current'); + $('#search-arrow').removeClass('arrow-down'); + $('#search-form').hide(); + } + $bagitForm.toggle(); + $('#content').toggleClass('opacity03'); + if (url !== 'undefined' && url) { + $('#plainurl').val(url); + } + $('#plainurl').focus(); + } + + // send 'bag it link' form request via ajax + $bagitFormForm.submit(function (event) { + $('body').css('cursor', 'wait'); + $('#add-link-result').empty(); + + $.ajax({ + type: $bagitFormForm.attr('method'), + url: $bagitFormForm.attr('action'), + data: $bagitFormForm.serialize(), + success: function (data) { + $('#add-link-result').html('Done!'); + $('#plainurl').val(''); + $('#plainurl').blur(''); + $('body').css('cursor', 'auto'); + }, + error: function (data) { + $('#add-link-result').html('Failed!'); + $('body').css('cursor', 'auto'); + }, + }); + + event.preventDefault(); + }); + + /* ========================================================================== + Process all links inside an article + ========================================================================== */ + + $('article a[href^="http"]').after(function () { + return ' '; + }); + + $('.add-to-wallabag-link-after').click(function (event) { + toggleSaveLinkForm($(this).attr('href'), event); + event.preventDefault(); + }); +}); diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css new file mode 100755 index 000000000..473b03088 --- /dev/null +++ b/app/Resources/static/themes/material/css/main.css @@ -0,0 +1,611 @@ +/* ========================================================================== + Sommaire + + 0 = Common + 1 = Nav + 2 = Side-nav + 3 = Filters slider + 4 = Cards + 5 = Article + 6 = Media queries + 7 = Font + 8 = Others + + ========================================================================== */ + +/* ========================================================================== + 0 = Common + ========================================================================== */ + +@font-face { + font-family: icomoon; + src: url("../fonts/icomoon.eot"); + src: + url("../fonts/icomoon.eot#iefix") format("embedded-opentype"), + url("../fonts/icomoon.ttf") format("truetype"), + url("../fonts/icomoon.woff") format("woff"), + url("../fonts/icomoon.svg#icomoon") format("svg"); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url(../fonts/MaterialIcons-Regular.eot); + /* For IE6-8 */ + src: local("Material Icons"), local("MaterialIcons-Regular"), url(../fonts/MaterialIcons-Regular.woff2) format("woff2"), url(../fonts/MaterialIcons-Regular.woff) format("woff"), url(../fonts/MaterialIcons-Regular.ttf) format("truetype"); +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + width: 1em; + height: 1em; + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; +} + +[class^="icon-"], +[class*=" icon-"] { + font-family: icomoon; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +body { + display: flex; + min-height: 100vh; + flex-direction: column; + background: #f0f0f0; +} + +body.login main { + padding: 0; +} + +.border-bottom { + border-bottom: 1px solid #ddd; +} + +nav, +main, +footer { + padding-left: 240px; +} + +main, +#content, +.valign-wrapper { + height: 100%; +} + +#main { + flex: 1 0 auto; +} + +.results { + height: 1em; + line-height: 30px; +} + +.results .nb-results, +.results .pagination { + margin: 15px; + margin-bottom: 0; +} + +.pagination { + float: right; +} + +.pagination ul { + margin: 0 !important; +} + +.pagination li { + padding: 0; +} + +.pagination a { + padding: 0 10px; + height: 30px; + display: block; +} + +.pagination .disabled { + margin-right: 10px; + margin-left: 10px; +} + +div.pagination ul .prev.disabled, +div.pagination ul .next.disabled { + display: none; +} + +.pagination li.active span { + padding: 0px 10px; + height: 30px; + display: block; + color: #fff; +} + +.page-footer .footer-copyright p { + display: inline; +} + +.hidden { + display: none; +} + +.picker__date-display { + display: none; +} + +footer.page-footer { + margin-top: 10px; + padding-top: 10px; +} + +footer .row { + margin-bottom: 10px; +} + +/* ========================================================================== + 1 = Nav + ========================================================================== */ + +nav input { + color: #aaa; +} + +.nav-wrapper .button-collapse { + padding: 0 15px; +} + +.nav-input { + display: none; +} + +.nav-panels { + overflow: hidden; +} + +.nav-panel-buttom li { + max-height: 64px; +} + +.nav-panels { + transition: background 0.2s ease; +} + +.nav-panel-add .add, +.nav-panel-search .search, +.nav-panels .close { + color: #444 !important; +} + +.nav-panels .action { + padding-left: 0.75rem; + font-size: 2.1rem; + white-space: nowrap; +} + +.nav-panels .input-field input { + display: block; + line-height: inherit; + padding-left: 4rem !important; + width: calc(100% - 8rem); +} + +.nav-panels .input-field input:focus { + background-color: #fff; + border: 0; + box-shadow: none; + color: #444; +} + +.input-field.nav-panel-add label { + left: 1rem; +} + +.input-field.nav-panel-add .close { + position: absolute; + top: 0; + right: 1rem; + color: transparent; + cursor: pointer; + font-size: 2rem; + transition: 0.3s color; +} + +#button_filters { + display: none; +} + +#button_export { + display: none; +} + +/* ========================================================================== + 2 = Side-nav + ========================================================================== */ + +.side-nav.fixed a { + font-size: 13px; + line-height: 44px; + height: 44px; +} + +.side-nav .collapsible-header, +.side-nav.fixed .collapsible-header { + height: 45px; + line-height: 44px; + padding: 0 20px; +} + +.bold > a { + font-weight: bold; +} + +.side-nav > li.logo { + line-height: 0; + text-align: center; +} + +#main .logo a { + height: 100pt; +} + +#main .logo img { + height: 100pt; + width: 100pt; +} + +#main .logo:hover { + background: transparent; +} + +.side-nav li { + padding: 0; +} + +.side-nav a { + margin: 0 1rem; +} + +/* ========================================================================== + * 3 = Filters slider + * ========================================================================== */ + +#filters button { + padding: 0; + width: 100%; +} + +.side-nav.fixed.right-aligned { + right: -250px; + left: auto !important; + overflow-y: visible; +} + +#filters div.with-checkbox { + height: 3rem; + margin-top: 0; +} + +/* ========================================================================== + 4 = Cards + ========================================================================== */ + +main #content { + padding: 0 0.5rem; +} + +main ul.row { + padding: 0 0.75rem; +} + +.data .card .card-body { + height: 22em; + overflow: hidden; +} + +.card .card-content .card-title { + line-height: 32px; +} + +.card .card-content .estimatedTime { + margin-bottom: 10px; +} + +.card .card-action .original { + line-height: 24px; +} + +.card .card-action ul.links { + margin: 0; + font-size: 24px; + line-height: 24px; +} + +.card .card-action a { + color: #fff; + margin: 0; +} + +.card .card-action a:hover { + color: #fff; +} + +.settings .div_tabs { + padding-bottom: 15px; +} + +.card.sw { + max-width: 370px; + margin-left: auto; + margin-right: auto; +} + +.card .card-image { + height: 14em; +} + +.card .card-image .preview { + height: 14em; + background-size: cover; + background-repeat: no-repeat; + background-position: 50%; +} + +/* ========================================================================== + 5 = Article + ========================================================================== */ + +#article { + font-size: 20px; + margin: 0 auto; + max-width: 40em; +} + +#article img { + max-width: 100%; + height: auto; +} + +.reader-mode { + width: 95px !important; + transition: width 0.2s ease; +} + +.reader-mode:hover { + width: 240px !important; +} + +.reader-mode .collapsible-body { + height: 0; + overflow: hidden; +} + +.reader-mode:hover .collapsible-body { + height: auto; +} + +.reader-mode span { + opacity: 0; + transition: opacity 0.2s ease; +} + +.reader-mode:hover span { + opacity: 1; +} + +.progress { + position: fixed; + top: 0; + width: 100%; + height: 3px; + margin: 0; + z-index: 9999; +} + +#article aside .link { + color: #000; + font-size: 0.8em; + text-decoration: none; +} + +#article aside #list { + float: right; + margin-right: 15px; +} + +#article aside .chip { + background-color: #039be5; + color: #fff; +} + +#article aside .chip i { + color: #fff; +} + +/* ========================================================================== + 6 = Media queries + ========================================================================== */ + +@media only screen and (max-width: 992px) { + header, + main, + footer { + padding-left: 0; + } + nav, + main, + footer { + padding-left: 0; + } + .pagination { + width: auto; + } + .reader-mode { + width: 240px !important; + } + .reader-mode span { + opacity: 1; + } + .tabs { + display: inline-block; + height: auto; + } + .tab { + min-width: 100%; + } + .indicator { + display: none; + } + .pagination li.prev, .pagination li.next { + width: auto; + } +} + +@media only screen and (min-width: 400px) { + .nav-panel-buttom { + float: right; + } +} + +@media only screen and (min-width: 993px) and (max-width: 1180px) { + .row .col.l1 { + width: 25%; + margin-left: 0; + } + .row .col.l2 { + width: 33.33333%; + margin-left: 0; + } + .row .col.l3 { + width: 41.66667%; + margin-left: 0; + } + .row .col.l4 { + width: 50%; + margin-left: 0; + } + .row .col.l5 { + width: 58.33333%; + margin-left: 0; + } + .row .col.l6 { + width: 66.66667%; + margin-left: 0; + } + .row .col.l7 { + width: 75%; + margin-left: 0; + } + .row .col.l8 { + width: 83.33333%; + margin-left: 0; + } + .row .col.l9 { + width: 91.66667%; + margin-left: 0; + } + .row .col.l10 { + width: 100%; + margin-left: 0; + } +} + +@media only screen and (max-width: 350px) { + .nb-results { + display: none; + } +} + +/* ========================================================================== + 7 = Font + ========================================================================== */ + +.icon-google-plus2::before { + content: "\ea89"; +} + +.icon-facebook2::before { + content: "\ea8d"; +} + +.icon-twitter::before { + content: "\ea91"; +} + +.icon-apple::before { + content: "\eabf"; +} + +.icon-android::before { + content: "\eac1"; +} + +.icon-chrome::before { + content: "\eae5"; +} + +.icon-firefox::before { + content: "\eae6"; +} + +footer [class^="icon-"], +footer [class*=" icon-"] { + font-size: 2em; + transition: text-shadow 0.2s ease; + padding-right: 10px; +} + +footer [class^="icon-"]::hover, +footer [class*=" icon-"]::hover { + text-shadow: 0 0 10px rgba(0, 0, 0, 0.3); +} + +/* ========================================================================== + 8 = Others + ========================================================================== */ + +/* force height on non-input field in the settings page */ +div.settings div.input-field div, +div.settings div.input-field ul { + margin-top: 40px; +} + +/* but avoid to kill all file input */ +div.settings div.file-field div { + margin-top: inherit; +} diff --git a/app/Resources/static/themes/material/css/print.css b/app/Resources/static/themes/material/css/print.css new file mode 100755 index 000000000..a16be71e9 --- /dev/null +++ b/app/Resources/static/themes/material/css/print.css @@ -0,0 +1,64 @@ +@media print { + /* ### Layout ### */ + + body { + font-family: Serif; + background-color: #fff; + } + + @page { + margin: 1cm; + } + + img { + max-width: 100% !important; + } + + /* ### Content ### */ + + /* Hide useless blocks */ + body > header, + #article_toolbar, + #links, + #sort, + body > footer, + .top_link, + div.tools, + header div, + .messages, + .entry + .results { + display: none !important; + } + + article { + border: none !important; + } + + /* Add URL after links */ + .vieworiginal a::after { + content: " (" attr(href) ")"; + } + + /* Add explanation after abbr */ + abbr[title]::after { + content: " (" attr(title) ")"; + } + + /* Change border on current pager item */ + .pagination span.current { + border-style: dashed; + } + + #main { + width: 100%; + padding: 0; + margin: 0; + margin-left: 0; + padding-right: 0; + padding-bottom: 0; + } + + #article { + width: 100%; + } +} diff --git a/app/Resources/static/themes/material/js/init.js b/app/Resources/static/themes/material/js/init.js new file mode 100755 index 000000000..d6a87941e --- /dev/null +++ b/app/Resources/static/themes/material/js/init.js @@ -0,0 +1,117 @@ +var $ = require('jquery'); +require('materialize'); +var annotator = require('annotator'); + +function initFilters() { + // no display if filters not aviable + if ($('div').is('#filters')) { + $('#button_filters').show(); + $('.button-collapse-right').sideNav({ edge: 'right' }); + $('#clear_form_filters').on('click', function () { + $('#filters input').val(''); + $('#filters :checked').removeAttr('checked'); + return false; + }); + } +} + +function initExport() { + // no display if export not aviable + if ($('div').is('#export')) { + $('#button_export').show(); + $('.button-collapse-right').sideNav({ edge: 'right' }); + } +} + +$(document).ready(function () { + // sideNav + $('.button-collapse').sideNav(); + $('select').material_select(); + $('.collapsible').collapsible({ + accordion: false, + }); + $('.datepicker').pickadate({ + selectMonths: true, + selectYears: 15, + formatSubmit: 'dd/mm/yyyy', + hiddenName: true, + format: 'dd/mm/yyyy', + }); + initFilters(); + initExport(); + + $('#nav-btn-add-tag').on('click', function () { + $('.nav-panel-add-tag').toggle(100); + $('.nav-panel-menu').addClass('hidden'); + $('#tag_label').focus(); + return false; + }); + $('#nav-btn-add').on('click', function () { + $('.nav-panel-buttom').hide(100); + $('.nav-panel-add').show(100); + $('.nav-panels .action').hide(100); + $('.nav-panel-menu').addClass('hidden'); + $('.nav-panels').css('background', 'white'); + $('#entry_url').focus(); + return false; + }); + $('#nav-btn-search').on('click', function () { + $('.nav-panel-buttom').hide(100); + $('.nav-panel-search').show(100); + $('.nav-panels .action').hide(100); + $('.nav-panel-menu').addClass('hidden'); + $('.nav-panels').css('background', 'white'); + $('#searchfield').focus(); + return false; + }); + $('.close').on('click', function () { + $('.nav-panel-add').hide(100); + $('.nav-panel-search').hide(100); + $('.nav-panel-buttom').show(100); + $('.nav-panels .action').show(100); + $('.nav-panel-menu').removeClass('hidden'); + $('.nav-panels').css('background', 'transparent'); + return false; + }); + $(window).scroll(function () { + var s = $(window).scrollTop(); + var d = $(document).height(); + var c = $(window).height(); + var scrollPercent = (s / (d - c)) * 100; + $('.progress .determinate').css('width', scrollPercent + '%'); + }); + +/* ========================================================================== + Annotations & Remember position + ========================================================================== */ + + if ($('article').length) { + var app = new annotator.App(); + var x = JSON.parse($('#annotationroutes').html()); + + + app.include(annotator.ui.main, { + element: document.querySelector('article'), + }); + + app.include(annotator.storage.http, x); + + app.start().then(function () { + app.annotations.load({ entry: x.entryId }); + }); + + $(window).scroll(function (e) { + var scrollTop = $(window).scrollTop(); + var docHeight = $(document).height(); + var scrollPercent = (scrollTop) / (docHeight); + var scrollPercentRounded = Math.round(scrollPercent * 100) / 100; + savePercent(x.entryId, scrollPercentRounded); + }); + + retrievePercent(x.entryId); + + $(window).resize(function () { + retrievePercent(x.entryId); + }); + } +}); diff --git a/app/config/config.yml b/app/config/config.yml index ea028d855..c371cf73d 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -59,19 +59,6 @@ twig: form_themes: - "LexikFormFilterBundle:Form:form_div_layout.html.twig" -# Assetic Configuration -assetic: - debug: "%kernel.debug%" - use_controller: false - bundles: [ ] - #java: /usr/bin/java - filters: - cssrewrite: ~ - #closure: - # jar: "%kernel.root_dir%/Resources/java/compiler.jar" - #yui_css: - # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar" - # Doctrine Configuration doctrine: dbal: diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index 2813e369d..410d5a6c0 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -34,9 +34,6 @@ monolog: VERBOSITY_DEBUG: DEBUG channels: [doctrine] -assetic: - use_controller: true - swiftmailer: # see http://mailcatcher.me/ transport: smtp diff --git a/bower.json b/bower.json new file mode 100644 index 000000000..aa529bd33 --- /dev/null +++ b/bower.json @@ -0,0 +1,38 @@ +{ + "name": "wallabag", + "version": "2.0.0-beta.1", + "homepage": "https://github.com/wallabag/wallabag", + "authors": [ + { + "name": "Nicolas Lœuillet", + "email": "nicolas@loeuillet.org", + "homepage": "http://www.cdetc.fr", + "role": "Developer" + }, + { + "name": "Thomas Citharel", + "homepage": "http://tcit.fr", + "role": "Developer" + }, + { + "name": "Jérémy Benoist", + "homepage": "http://www.j0k3r.net", + "role": "Developer" + } + ], + "description": "wallabag is a self hostable application for saving web pages", + "license": "MIT", + "main": "bower.json", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "icomoon-bower": "^0.1.0", + "bower-pt-sans": "pt-sans#*", + "roboto-fontface": "^0.4.5" + } +} diff --git a/composer.json b/composer.json index c4edd3c2e..a8ab2a596 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,6 @@ "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-cache-bundle": "^1.2", "twig/extensions": "~1.0", - "symfony/assetic-bundle": "~2.3", "symfony/swiftmailer-bundle": "^2.3", "symfony/monolog-bundle": "^2.8", "sensio/distribution-bundle": "^5.0", @@ -81,7 +80,8 @@ "mnapoli/piwik-twig-extension": "^1.0", "lexik/maintenance-bundle": "~2.1", "ocramius/proxy-manager": "1.*", - "white-october/pagerfanta-bundle": "^1.0" + "white-october/pagerfanta-bundle": "^1.0", + "mouf/nodejs-installer": "~1.0" }, "require-dev": { "doctrine/doctrine-fixtures-bundle": "~2.2", @@ -95,7 +95,6 @@ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ], @@ -112,7 +111,6 @@ "symfony-var-dir": "var", "symfony-web-dir": "web", "symfony-tests-dir": "tests", - "symfony-assets-install": "relative", "incenteev-parameters": { "file": "app/config/parameters.yml" } diff --git a/install.sh b/install.sh new file mode 100755 index 000000000..414f73f27 --- /dev/null +++ b/install.sh @@ -0,0 +1,29 @@ +#! /usr/bin/env bash + +if [[ $ASSETS == 'nobuild' ]]; then + composer install --no-interaction --no-progress --prefer-dist -o +else + + echo "Installing PHP dependencies through Composer..." + if [[ $ASSETS == 'build' ]]; then + composer install --no-interaction --no-progress --prefer-dist -o + else + SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist + fi + + chmod ugo+x vendor/mouf/nodejs-installer/bin/local/npm + echo "Downloading javascript librairies through npm..." + vendor/mouf/nodejs-installer/bin/local/npm install + + echo "Downloading fonts librairies through bower..." + node_modules/bower/bin/bower install + + echo "Concat, minify and installing assets..." + node_modules/grunt/bin/grunt + + if [[ $ASSETS != 'build' ]]; then + echo "Installing wallabag..." + php bin/console wallabag:install --env=prod + fi + +fi diff --git a/install_dev.sh b/install_dev.sh new file mode 100755 index 000000000..81f871daf --- /dev/null +++ b/install_dev.sh @@ -0,0 +1,16 @@ +#! /usr/bin/env bash + +echo "Installing PHP dependencies (including dev) through Composer..." +composer install + +echo "Downloading javascript librairies through npm..." +npm install + +echo "Downloading fonts librairies through bower..." +bower install + +echo "Concat, minify and installing assets..." +grunt + +echo "Installing wallabag..." +php bin/console wallabag:install diff --git a/package.json b/package.json new file mode 100644 index 000000000..52c8d9096 --- /dev/null +++ b/package.json @@ -0,0 +1,86 @@ +{ + "name": "wallabag", + "version": "2.1.0", + "description": "wallabag is a self hostable application for saving web pages", + "main": "index.js", + "private": true, + "directories": { + "doc": "docs" + }, + "dependencies": { + "annotator": "git://github.com/wallabag/annotator.git#0f076c7d371ed25eb0793346f46982d90f2c4c85", + "autoprefixer": "^6.3.6", + "bower": "^1.7.7", + "browserify": "^13.0.0", + "browserify-shim": "^3.8.12", + "cssnano": "^3.5.2", + "grunt": ">=0.4.0", + "grunt-browserify": "^5.0.0", + "grunt-cli": "^1.2.0", + "grunt-contrib-clean": "^1.0.0", + "grunt-contrib-concat": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-symlink": "^1.0.0", + "grunt-contrib-uglify": "^1.0.0", + "grunt-postcss": "^0.8.0", + "hammerjs": "^2.0.6", + "jquery": "^2.2.1", + "jquery-ui": "^1.10.5", + "jquery.cookie": "^1.4.1", + "load-grunt-tasks": "^3.4.1", + "materialize-css": "0.97.5", + "npm": "^3.8.3", + "pickadate": "^3.5.6", + "pixrem": "^3.0.0", + "postcss-cssnext": "^2.5.1", + "prismjs": "^1.4.1" + }, + "engines": { + "node": ">0.12" + }, + "browser": { + "jquery": "./node_modules/jquery/dist/jquery.js", + "jQuery": "./node_modules/jquery/dist/jquery.js", + "materialize": "./node_modules/materialize-css/bin/materialize.js" + }, + "browserify-shim": { + "jquery": "$", + "jQuery": "jQuery", + "materialize": "materialize" + }, + "browserify": { + "transform": [ + "browserify-shim" + ] + }, + "repository": { + "type": "git", + "url": "https://github.com/wallabag/wallabag" + }, + "contributors": [ + { + "name": "Nicolas Lœuillet", + "email": "nicolas@loeuillet.org", + "homepage": "http://www.cdetc.fr", + "role": "Developer" + }, + { + "name": "Thomas Citharel", + "homepage": "http://tcit.fr", + "role": "Developer" + }, + { + "name": "Jérémy Benoist", + "homepage": "http://www.j0k3r.net", + "role": "Developer" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/wallabag/wallabag/issues" + }, + "devDependencies": { + "eslint": "^2.11.1", + "eslint-config-airbnb": "^9.0.1" + } +} diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 813ac720d..e134ced52 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -61,7 +61,6 @@ class InstallCommand extends ContainerAwareCommand ->setupDatabase() ->setupAdmin() ->setupConfig() - ->setupAsset() ; $output->writeln('Wallabag has been successfully installed.'); @@ -70,7 +69,7 @@ class InstallCommand extends ContainerAwareCommand protected function checkRequirements() { - $this->defaultOutput->writeln('Step 1 of 5. Checking system requirements.'); + $this->defaultOutput->writeln('Step 1 of 4. Checking system requirements.'); $fulfilled = true; @@ -120,7 +119,7 @@ class InstallCommand extends ContainerAwareCommand protected function setupDatabase() { - $this->defaultOutput->writeln('Step 2 of 5. Setting up database.'); + $this->defaultOutput->writeln('Step 2 of 4. Setting up database.'); // user want to reset everything? Don't care about what is already here if (true === $this->defaultInput->getOption('reset')) { @@ -191,7 +190,7 @@ class InstallCommand extends ContainerAwareCommand protected function setupAdmin() { - $this->defaultOutput->writeln('Step 3 of 5. Administration setup.'); + $this->defaultOutput->writeln('Step 3 of 4. Administration setup.'); $questionHelper = $this->getHelperSet()->get('question'); $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true); @@ -235,7 +234,7 @@ class InstallCommand extends ContainerAwareCommand protected function setupConfig() { - $this->defaultOutput->writeln('Step 4 of 5. Config setup.'); + $this->defaultOutput->writeln('Step 4 of 4. Config setup.'); $em = $this->getContainer()->get('doctrine.orm.entity_manager'); // cleanup before insert new stuff @@ -374,20 +373,6 @@ class InstallCommand extends ContainerAwareCommand return $this; } - protected function setupAsset() - { - $this->defaultOutput->writeln('Step 5 of 5. Installing assets.'); - - $this - ->runCommand('assets:install') - ->runCommand('assetic:dump') - ; - - $this->defaultOutput->writeln(''); - - return $this; - } - /** * Run a command. * diff --git a/src/Wallabag/CoreBundle/Resources/public/themes/_global/js/annotator.min.js b/src/Wallabag/CoreBundle/Resources/public/themes/_global/js/annotator.min.js deleted file mode 100644 index fdc35c69b..000000000 --- a/src/Wallabag/CoreBundle/Resources/public/themes/_global/js/annotator.min.js +++ /dev/null @@ -1,23 +0,0 @@ -/* -** Annotator v2.0.0-alpha.3-0f076c7 -** https://github.com/okfn/annotator/ -** -** Copyright 2016, the Annotator project contributors. -** Dual licensed under the MIT and GPLv3 licenses. -** https://github.com/okfn/annotator/blob/master/LICENSE -** -** Built at: 2016-02-26 15:02:00Z -*/ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.annotator=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o1){for(var i=1;i=0&&j=0},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},isPlainObject:function(obj){var key;if(!obj||jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}try{if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false}}catch(e){return false}if(!support.ownFirst){for(key in obj){return hasOwn.call(obj,key)}}for(key in obj){}return key===undefined||hasOwn.call(obj,key)},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(data){if(data&&jQuery.trim(data)){(window.execScript||function(data){window["eval"].call(window,data)})(data)}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i0&&length-1 in obj}var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while(target[j++]=els[i++]){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var m,i,elem,nid,nidselect,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if(m=match[1]){if(nodeType===9){if(elem=context.getElementById(m)){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector}else if(context.nodeName.toLowerCase()!=="object"){if(nid=context.getAttribute("id")){nid=nid.replace(rescape,"\\$&")}else{context.setAttribute("id",nid=expando)}groups=tokenize(selector);i=groups.length;nidselect=ridentifier.test(nid)?"#"+nid:"[id='"+nid+"']";while(i--){groups[i]=nidselect+" "+toSelector(groups[i])}newSelector=groups.join(",");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(nid===expando){context.removeAttribute("id")}}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key+" "]=value}return cache}function markFunction(fn){fn[expando]=true; -return fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return false}finally{if(div.parentNode){div.parentNode.removeChild(div)}div=null}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff}if(cur){while(cur=cur.nextSibling){if(cur===b){return-1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,parent,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if((parent=document.defaultView)&&parent.top!==parent){if(parent.addEventListener){parent.addEventListener("unload",unloadHandler,false)}else if(parent.attachEvent){parent.attachEvent("onunload",unloadHandler)}}support.attributes=assert(function(div){div.className="i";return!div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(document.createComment(""));return!div.getElementsByTagName("*").length});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(div){docElem.appendChild(div).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length});if(support.getById){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var m=context.getElementById(id);return m?[m]:[]}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{delete Expr.find["ID"];Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag)}else if(support.qsa){return context.querySelectorAll(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while(elem=results[i++]){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if(support.qsa=rnative.test(document.querySelectorAll)){assert(function(div){docElem.appendChild(div).innerHTML=""+""+"";if(div.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")")}if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!div.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=")}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}if(!div.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]")}});assert(function(div){var input=document.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=")}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled")}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1}if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}else if(aup===bup){return siblingCheck(a,b)}cur=a;while(cur=cur.parentNode){ap.unshift(cur)}cur=b;while(cur=cur.parentNode){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return document};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i++]){ret+=getText(node)}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else if(nodeType===3||nodeType===4){return elem.nodeValue}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3]){Sizzle.error(match[0])}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex}if(diff===false){while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===false},disabled:function(elem){return elem.disabled===true},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return!Expr.pseudos["empty"](elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;if(outermost){outermostContext=context===document||context||outermost}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML}while(matcher=elementMatchers[j++]){if(matcher(elem,context||document,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector=selector.slice(tokens.shift().value.length)}i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type]){break}if(find=Expr.find[type]){if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="";return div.firstChild.getAttribute("href")==="#"})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}})}if(!support.attributes||!assert(function(div){div.innerHTML="";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue}})}if(!assert(function(div){return div.getAttribute("disabled")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched};var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/;var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return jQuery.inArray(elem,qualifier)>-1!==not})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,ret=[],self=this,len=self.length;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this}root=root||rootjQuery;if(typeof selector==="string"){if(selector.charAt(0)==="<"&&selector.charAt(selector.length-1)===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){if(elem.id!==match[2]){return rootjQuery.find(selector)}this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}}else if(!context||context.jquery){return(context||root).find(selector)}else{return this.constructor(context).find(selector)}}else if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector)){return typeof root.ready!=="undefined"?root.ready(selector):selector(jQuery)}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var i,targets=jQuery(target,this),len=targets.length;return this.filter(function(){for(i=0;i-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched)},index:function(elem){if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof elem==="string"){return jQuery.inArray(this[0],jQuery(elem))}return jQuery.inArray(elem.jquery?elem[0]:elem,this)},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){do{cur=cur[dir]}while(cur&&cur.nodeType!==1);return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return dir(elem,"nextSibling")},prevAll:function(elem){return dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return dir(elem,"previousSibling",until)},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return siblings(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until}if(selector&&typeof selector==="string"){ret=jQuery.filter(selector,ret)}if(this.length>1){if(!guaranteedUnique[name]){ret=jQuery.uniqueSort(ret)}if(rparentsprev.test(name)){ret=ret.reverse()}}return this.pushStack(ret)}});var rnotwhite=/\S+/g;function createOptions(options){ -var object={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex-1){list.splice(index,1);if(index<=firingIndex){firingIndex--}}});return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0},empty:function(){if(list){list=[]}return this},disable:function(){locked=queue=[];list=memory="";return this},disabled:function(){return!list},lock:function(){locked=true;if(!memory){self.disable()}return this},locked:function(){return!!locked},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire()}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return!!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject)}else{newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)}})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock)}deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(subordinate){var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues){deferred.notifyWith(contexts,values)}else if(!--remaining){deferred.resolveWith(contexts,values)}}},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i0){return}readyList.resolveWith(document,[jQuery]);if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");jQuery(document).off("ready")}}});function detach(){if(document.addEventListener){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed)}else{document.detachEvent("onreadystatechange",completed);window.detachEvent("onload",completed)}}function completed(){if(document.addEventListener||window.event.type==="load"||document.readyState==="complete"){detach();jQuery.ready()}}jQuery.ready.promise=function(obj){if(!readyList){readyList=jQuery.Deferred();if(document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll){window.setTimeout(jQuery.ready)}else if(document.addEventListener){document.addEventListener("DOMContentLoaded",completed);window.addEventListener("load",completed)}else{document.attachEvent("onreadystatechange",completed);window.attachEvent("onload",completed);var top=false;try{top=window.frameElement==null&&document.documentElement}catch(e){}if(top&&top.doScroll){(function doScrollCheck(){if(!jQuery.isReady){try{top.doScroll("left")}catch(e){return window.setTimeout(doScrollCheck,50)}detach();jQuery.ready()}})()}}}return readyList.promise(obj)};jQuery.ready.promise();var i;for(i in jQuery(support)){break}support.ownFirst=i==="0";support.inlineBlockNeedsLayout=false;jQuery(function(){var val,div,body,container;body=document.getElementsByTagName("body")[0];if(!body||!body.style){return}div=document.createElement("div");container=document.createElement("div");container.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";body.appendChild(container).appendChild(div);if(typeof div.style.zoom!=="undefined"){div.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";support.inlineBlockNeedsLayout=val=div.offsetWidth===3;if(val){body.style.zoom=1}}body.removeChild(container)});(function(){var div=document.createElement("div");support.deleteExpando=true;try{delete div.test}catch(e){support.deleteExpando=false}div=null})();var acceptData=function(elem){var noData=jQuery.noData[(elem.nodeName+" ").toLowerCase()],nodeType=+elem.nodeType||1;return nodeType!==1&&nodeType!==9?false:!noData||noData!==true&&elem.getAttribute("classid")===noData};var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/([A-Z])/g;function dataAttr(elem,key,data){if(data===undefined&&elem.nodeType===1){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}jQuery.data(elem,key,data)}else{data=undefined}}return data}function isEmptyDataObject(obj){var name;for(name in obj){if(name==="data"&&jQuery.isEmptyObject(obj[name])){continue}if(name!=="toJSON"){return false}}return true}function internalData(elem,name,data,pvt){if(!acceptData(elem)){return}var ret,thisCache,internalKey=jQuery.expando,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey;if((!id||!cache[id]||!pvt&&!cache[id].data)&&data===undefined&&typeof name==="string"){return}if(!id){if(isNode){id=elem[internalKey]=deletedIds.pop()||jQuery.guid++}else{id=internalKey}}if(!cache[id]){cache[id]=isNode?{}:{toJSON:jQuery.noop}}if(typeof name==="object"||typeof name==="function"){if(pvt){cache[id]=jQuery.extend(cache[id],name)}else{cache[id].data=jQuery.extend(cache[id].data,name)}}thisCache=cache[id];if(!pvt){if(!thisCache.data){thisCache.data={}}thisCache=thisCache.data}if(data!==undefined){thisCache[jQuery.camelCase(name)]=data}if(typeof name==="string"){ret=thisCache[name];if(ret==null){ret=thisCache[jQuery.camelCase(name)]}}else{ret=thisCache}return ret}function internalRemoveData(elem,name,pvt){if(!acceptData(elem)){return}var thisCache,i,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:jQuery.expando;if(!cache[id]){return}if(name){thisCache=pvt?cache[id]:cache[id].data;if(thisCache){if(!jQuery.isArray(name)){if(name in thisCache){name=[name]}else{name=jQuery.camelCase(name);if(name in thisCache){name=[name]}else{name=name.split(" ")}}}else{name=name.concat(jQuery.map(name,jQuery.camelCase))}i=name.length;while(i--){delete thisCache[name[i]]}if(pvt?!isEmptyDataObject(thisCache):!jQuery.isEmptyObject(thisCache)){return}}}if(!pvt){delete cache[id].data;if(!isEmptyDataObject(cache[id])){return}}if(isNode){jQuery.cleanData([elem],true)}else if(support.deleteExpando||cache!=cache.window){delete cache[id]}else{cache[id]=undefined}}jQuery.extend({cache:{},noData:{"applet ":true,"embed ":true,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(elem){elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando];return!!elem&&!isEmptyDataObject(elem)},data:function(elem,name,data){return internalData(elem,name,data)},removeData:function(elem,name){return internalRemoveData(elem,name)},_data:function(elem,name,data){return internalData(elem,name,data,true)},_removeData:function(elem,name){return internalRemoveData(elem,name,true)}});jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(key===undefined){if(this.length){data=jQuery.data(elem);if(elem.nodeType===1&&!jQuery._data(elem,"parsedAttrs")){i=attrs.length;while(i--){if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=jQuery.camelCase(name.slice(5));dataAttr(elem,name,data[name])}}}jQuery._data(elem,"parsedAttrs",true)}}return data}if(typeof key==="object"){return this.each(function(){jQuery.data(this,key)})}return arguments.length>1?this.each(function(){jQuery.data(this,key,value)}):elem?dataAttr(elem,key,jQuery.data(elem,key)):undefined},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=jQuery._data(elem,type);if(data){if(!queue||jQuery.isArray(data)){queue=jQuery._data(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery._removeData(elem,type+"queue");jQuery._removeData(elem,key)})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.lengtha";support.leadingWhitespace=div.firstChild.nodeType===3;support.tbody=!div.getElementsByTagName("tbody").length;support.htmlSerialize=!!div.getElementsByTagName("link").length;support.html5Clone=document.createElement("nav").cloneNode(true).outerHTML!=="<:nav>";input.type="checkbox";input.checked=true;fragment.appendChild(input);support.appendChecked=input.checked;div.innerHTML="x";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;fragment.appendChild(div);input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;support.noCloneEvent=!!div.addEventListener;div[jQuery.expando]=1;support.attributes=!div.getAttribute(jQuery.expando)})();var wrapMap={option:[1,"",""],legend:[1,"",""],area:[1,"",""],param:[1,"",""],thead:[1,"",""],tr:[2,"",""],col:[2,"",""],td:[3,"",""],_default:support.htmlSerialize?[0,"",""]:[1,"X",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var elems,elem,i=0,found=typeof context.getElementsByTagName!=="undefined"?context.getElementsByTagName(tag||"*"):typeof context.querySelectorAll!=="undefined"?context.querySelectorAll(tag||"*"):undefined;if(!found){for(found=[],elems=context.childNodes||context;(elem=elems[i])!=null;i++){if(!tag||jQuery.nodeName(elem,tag)){found.push(elem)}else{jQuery.merge(found,getAll(elem,tag))}}}return tag===undefined||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],found):found}function setGlobalEval(elems,refElements){var elem,i=0;for(;(elem=elems[i])!=null;i++){jQuery._data(elem,"globalEval",!refElements||jQuery._data(refElements[i],"globalEval"))}}var rhtml=/<|?\w+;/,rtbody=/"&&!rtbody.test(elem)?tmp:0;j=elem&&elem.childNodes.length;while(j--){if(jQuery.nodeName(tbody=elem.childNodes[j],"tbody")&&!tbody.childNodes.length){elem.removeChild(tbody)}}}jQuery.merge(nodes,tmp.childNodes);tmp.textContent="";while(tmp.firstChild){tmp.removeChild(tmp.firstChild)}tmp=safe.lastChild}}}if(tmp){safe.removeChild(tmp)}if(!support.appendChecked){jQuery.grep(getAll(nodes,"input"),fixDefaultChecked)}i=0;while(elem=nodes[i++]){if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem)}continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(safe.appendChild(elem),"script");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}tmp=null;return safe}(function(){var i,eventName,div=document.createElement("div");for(i in{submit:true,change:true,focusin:true}){eventName="on"+i;if(!(support[i]=eventName in window)){div.setAttribute(eventName,"t");support[i]=div.attributes[eventName].expando===false}}div=null})();var rformElems=/^(?:input|select|textarea)$/i,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}function on(elem,types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined}for(type in types){on(elem,type,selector,data,types[type],one)}return elem}if(data==null&&fn==null){fn=selector;data=selector=undefined}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined}else{fn=data;data=selector;selector=undefined}}if(fn===false){fn=returnFalse}else if(!fn){return elem}if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments)};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)}return elem.each(function(){jQuery.event.add(this,types,fn,data,selector)})}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var tmp,events,t,handleObjIn,special,eventHandle,handleObj,handlers,type,namespaces,origType,elemData=jQuery._data(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!=="undefined"&&(!e||jQuery.event.triggered!==e.type)?jQuery.event.dispatch.apply(eventHandle.elem,arguments):undefined};eventHandle.elem=elem}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false)}else if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}elem=null},remove:function(elem,types,handler,selector,mappedTypes){var j,handleObj,tmp,origCount,t,events,special,handlers,type,namespaces,origType,elemData=jQuery.hasData(elem)&&jQuery._data(elem);if(!elemData||!(events=elemData.events)){return}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){delete elemData.handle;jQuery._removeData(elem,"events")}},trigger:function(event,data,elem,onlyHandlers){var handle,ontype,cur,bubbleType,special,tmp,i,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(jQuery._data(cur,"events")||{})[event.type]&&jQuery._data(cur,"handle");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&elem[type]&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;try{elem[type]()}catch(e){}jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},dispatch:function(event){event=jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=slice.call(arguments),handlers=(jQuery._data(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.rnamespace||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(event.type!=="click"||isNaN(event.button)||event.button<1)){for(;cur!=this;cur=cur.parentNode||this){if(cur.nodeType===1&&(cur.disabled!==true||event.type!=="click")){matches=[];for(i=0;i-1:jQuery.find(sel,this,null,[cur]).length}if(matches[sel]){matches.push(handleObj)}}if(matches.length){handlerQueue.push({elem:cur,handlers:matches})}}}}if(delegateCount]","i"),rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,rnoInnerhtml=/ - - - {% endblock %} wallabag - {% block title %}{% endblock %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index c51f90d2c..40f0ae165 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig @@ -204,7 +204,6 @@ {{ form_rest(form.new_tagging_rule) }} - {{ 'config.form_rules.faq.title'|trans }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig index 778625ae0..8636e3be1 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig @@ -34,7 +34,27 @@ {% endfor %} - - {{ 'security.login.register'|trans }} + {{ 'security.login.register'|trans }} {{ 'security.login.submit'|trans }} - + send diff --git a/src/Wallabag/UserBundle/Resources/views/layout.html.twig b/src/Wallabag/UserBundle/Resources/views/layout.html.twig index 1d0189ca7..1f6ea2558 100644 --- a/src/Wallabag/UserBundle/Resources/views/layout.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/layout.html.twig @@ -11,7 +11,7 @@ - + {% block fos_user_content %} {% endblock fos_user_content %}