From 5ecdfcd041767c9e3244a92bb0a6cc3c3f80fea3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 8 Mar 2016 17:02:34 +0100 Subject: manage assets through npm first draft remote assetic totally work nearly there use at least nodejs > 0.12 use proper version of grunt bump nodejs version for travis update npm workaround for materialize install node 5.0 add grunt-cli baggy theme & cache node modules cache bower & npm make travis build assets on php7 only exclude installing node & npm if not needed & use bash clean & try to make icomoon work on baggy ready config for travis rebase make travis work more travis work impove travis & update deps add missing pixrem deps add module through oddly lost ui updates install latest nodejs add install_dev.sh, link local binaries for npm/bower/grunt ui improvements (mostly baggy) fix travis build no need to install on travis Add unread filter to entries pages Add the ability to filter for unread pages in the filters menu. Add unread filter test to EntryControllerTest Add a new test to the EntryControllerTest collection which checks that only entries which have not been archived (and are treated as "unread") are retrieved. Improve English translation Update FAQ -Fix grammar -Add notes about MTA, firewall, and SELinux Update installation instructions -Fix grammar -Add SELinux section add screenshots of android docu in English Fix the deletion of Tags/Entries relation when delete an entry Fix #2121 Move fixtures to the right place Display a message when saving an entry failed When saving an entry fail because of database error we previously just returned `false`. Now we got an error in the log and the displayed notice to the user is updated too. Change ManyToMany between entry & tag Following https://gist.github.com/Ocramius/3121916 Be sure to remove the related entity when removing an entity. Let say you have Entry -> EntryTag -> Tag. If you remove the entry: - before that commit, the EntryTag will stay (at least using SQLite). - with that commit, the related entity is removed Prepare wallabag 2.0.5 enforce older materialize version --- app/Resources/static/themes/baggy/css/font.css | 6 + app/Resources/static/themes/baggy/css/main.css | 1233 ++++++++++++++++++++ app/Resources/static/themes/baggy/css/messages.css | 19 + app/Resources/static/themes/baggy/css/print.css | 64 + .../static/themes/baggy/css/ratatouille.css | 225 ++++ app/Resources/static/themes/baggy/font/icomoon.eot | Bin 0 -> 97236 bytes app/Resources/static/themes/baggy/font/icomoon.svg | 501 ++++++++ app/Resources/static/themes/baggy/font/icomoon.ttf | Bin 0 -> 97072 bytes .../static/themes/baggy/font/icomoon.woff | Bin 0 -> 97148 bytes app/Resources/static/themes/baggy/img/blank.png | Bin 0 -> 141 bytes app/Resources/static/themes/baggy/img/down.png | Bin 0 -> 216 bytes app/Resources/static/themes/baggy/img/list.png | Bin 0 -> 201 bytes app/Resources/static/themes/baggy/img/table.png | Bin 0 -> 229 bytes app/Resources/static/themes/baggy/img/top.png | Bin 0 -> 212 bytes app/Resources/static/themes/baggy/js/autoClose.js | 6 + .../static/themes/baggy/js/autoCompleteTags.js | 47 + .../static/themes/baggy/js/closeMessage.js | 17 + app/Resources/static/themes/baggy/js/init.js | 101 ++ app/Resources/static/themes/baggy/js/popupForm.js | 100 ++ app/Resources/static/themes/baggy/js/saveLink.js | 78 ++ 20 files changed, 2397 insertions(+) create mode 100755 app/Resources/static/themes/baggy/css/font.css create mode 100755 app/Resources/static/themes/baggy/css/main.css create mode 100755 app/Resources/static/themes/baggy/css/messages.css create mode 100755 app/Resources/static/themes/baggy/css/print.css create mode 100644 app/Resources/static/themes/baggy/css/ratatouille.css create mode 100644 app/Resources/static/themes/baggy/font/icomoon.eot create mode 100644 app/Resources/static/themes/baggy/font/icomoon.svg create mode 100644 app/Resources/static/themes/baggy/font/icomoon.ttf create mode 100644 app/Resources/static/themes/baggy/font/icomoon.woff create mode 100755 app/Resources/static/themes/baggy/img/blank.png create mode 100644 app/Resources/static/themes/baggy/img/down.png create mode 100755 app/Resources/static/themes/baggy/img/list.png create mode 100755 app/Resources/static/themes/baggy/img/table.png create mode 100644 app/Resources/static/themes/baggy/img/top.png create mode 100644 app/Resources/static/themes/baggy/js/autoClose.js create mode 100755 app/Resources/static/themes/baggy/js/autoCompleteTags.js create mode 100644 app/Resources/static/themes/baggy/js/closeMessage.js create mode 100755 app/Resources/static/themes/baggy/js/init.js create mode 100644 app/Resources/static/themes/baggy/js/popupForm.js create mode 100755 app/Resources/static/themes/baggy/js/saveLink.js (limited to 'app/Resources/static/themes/baggy') 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 00000000..cae7904a --- /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/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css new file mode 100755 index 00000000..d46fae1a --- /dev/null +++ b/app/Resources/static/themes/baggy/css/main.css @@ -0,0 +1,1233 @@ +/* ========================================================================== + Sommaire + + 1 = Style Guide + 2 = Layout + 3 = Pictos + 4 = Messages + 5 = Article + 6 = Media queries + + ========================================================================== */ + +html { + min-height: 100%; +} + +body { + background-color: #eee; +} + +.login { + background-color: #333; +} + +.login #main { + padding: 0; + margin: 0; +} + +.login form { + background-color: #fff; + padding: 1.5em; + box-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); + width: 20em; + position: absolute; + top: 8em; + left: 50%; + margin-left: -10em; +} + +.login .logo { + position: absolute; + top: 2em; + left: 50%; + margin-left: -55px; +} + +/* ========================================================================== + 1 = Style Guide + ========================================================================== */ + +::selection { + color: #fff; + background-color: #000; +} + +.desktopHide { + display: none; +} + +.logo { + position: fixed; + z-index: 20; + top: 0.4em; + left: 0.6em; +} + +h2, +h3, +h4 { + font-family: "PT Sans", sans-serif; + text-transform: uppercase; +} + +p, +li, +label { + color: #666; +} + +a { + color: #000; + font-weight: bold; +} + +a.nostyle { + text-decoration: none; +} + +a:hover, +a:focus { + text-decoration: none; +} + +form fieldset { + 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"] { + border: 1px solid #999; + padding: 0.5em 1em; + min-width: 12em; + color: #666; +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + select { + -webkit-appearance: none; + border-radius: 0; + background: #fff url("../../_global/img/bg-select.png") no-repeat right center; + } +} + +.inline .row { + display: inline-block; + margin-right: 0.5em; +} + +.inline label { + min-width: 6em; +} + +fieldset label { + display: inline-block; + min-width: 12.5em; + color: #666; +} + +label { + margin-right: 0.5em; +} + +form .row { + margin-bottom: 0.5em; +} + +form button, +input[type="submit"] { + cursor: pointer; + background-color: #000; + color: #fff; + border: 0; + padding: 0.5em 1em; + display: inline-block; + 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; +} + +#bookmarklet { + cursor: move; +} + +h2::after { + content: ""; + height: 4px; + width: 70px; + background-color: #000; + display: block; +} + +.links { + padding: 0; + margin: 0; +} + +.links li { + list-style: none; + margin: 0; + padding: 0; +} + +#links { + position: fixed; + top: 0; + width: 10em; + left: 0; + text-align: right; + background-color: #333; + padding-top: 9.5em; + height: 100%; + box-shadow: inset -4px 0 20px rgba(0, 0, 0, 0.6); + z-index: 15; +} + +#main { + margin-left: 13em; + position: relative; + z-index: 10; + padding-right: 5%; + 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: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 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; +} + +#sort li { + display: inline; + font-size: 0.9em; +} + +#sort li + li { + margin-left: 10px; +} + +#sort a { + padding: 2px 2px 0; + vertical-align: middle; +} + +#sort img { + vertical-align: baseline; +} + +#sort img:hover { + cursor: pointer; +} + +#display-mode { + float: right; + vertical-align: middle; + margin-top: 10px; + 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 + ========================================================================== */ + +#content { + margin-top: 2em; + min-height: 30em; +} + +footer { + text-align: right; + position: relative; + bottom: 0; + right: 5em; + color: #999; + font-size: 0.8em; + font-style: italic; + z-index: 20; +} + +footer a { + color: #999; + font-weight: normal; +} + +.list-entries { + letter-spacing: -5px; +} + +.listmode .entry { + width: 100% !important; + margin-left: 0 !important; +} + +.list-entries + .results { + margin-bottom: 2em; +} + +.estimatedTime .reading-time { + color: #999; + font-style: italic; + font-weight: normal; + font-size: 0.9em; +} + +.estimatedTime small { + position: relative; + top: -1px; +} + +.entry { + 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; + vertical-align: top; + margin-left: 1.5%; + position: relative; + overflow: hidden; + padding: 1.5em 1.5em 3em 1.5em; +} + +.entry::before { + content: ""; + width: 0; + height: 0; + border-style: solid; + border-color: transparent transparent #000 transparent; + border-width: 10px; + position: absolute; + bottom: 0.3em; + 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; +} + +.entry::after { + content: ""; + position: absolute; + height: 7px; + width: 100%; + bottom: 0; + 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; +} + +.entry:hover { + box-shadow: 0 3px 10px rgba(0, 0, 0, 1); +} + +.entry:hover::after { + height: 40px; +} + +.entry:hover::before { + bottom: 2.4em; +} + +.entry:hover h2 a { + color: #666; +} + +.entry h2 { + text-transform: none; + margin-bottom: 0; + line-height: 1.2; +} + +.entry h2::after { + content: none; +} + +.entry h2 a { + display: block; + text-decoration: none; + 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; +} + +img.preview { + max-width: 100%; +} + +.entry p { + color: #666; + font-size: 0.9em; + line-height: 1.7; +} + +.entry h2 a::first-letter { + text-transform: uppercase; +} + +.entry:hover .tools { + bottom: 0; +} + +.entry .tools { + position: absolute; + bottom: -50px; + left: 0; + width: 100%; + z-index: 10; + 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; +} + +.entry .tools a { + color: #666; + text-decoration: none; + display: block; + padding: 0.4em; +} + +.entry .tools a:hover { + color: #fff; +} + +.entry .tools li { + display: inline-block; +} + +.entry:nth-child(3n+1) { + margin-left: 0; +} + +.results { + letter-spacing: -5px; + padding: 0 0 0.5em; +} + +.results > * { + display: inline-block; + vertical-align: top; + letter-spacing: normal; + width: 50%; + text-align: right; +} + +div.pagination ul { + text-align: right; + margin-bottom: 50px; +} + +.nb-results { + text-align: left; + font-style: italic; + color: #999; +} + +div.pagination ul > * { + display: inline-block; + margin-left: 0.5em; +} + +div.pagination ul a { + color: #999; + text-decoration: none; +} + +div.pagination ul a:hover, +div.pagination ul a:focus { + text-decoration: underline; +} + +div.pagination ul .prev.disabled, +div.pagination ul .next.disabled { + display: none; +} + +div.pagination ul .current { + height: 25px; + padding: 4px 8px; + border: 1px solid #d5d5d5; + text-decoration: none; + font-weight: bold; + color: #000; + background-color: #ccc; +} + +/* ========================================================================== + 2.1 = "save a link" related styles + ========================================================================== */ + +.popup-form { + background: rgba(0, 0, 0, 0.5); + position: absolute; + top: 0; + left: 10em; + z-index: 20; + height: 100%; + width: 100%; + margin: 0; + margin-top: -30% !important; + padding: 2em; + display: none; + border-left: 1px #eee solid; +} + +.popup-form form { + background-color: #fff; + position: absolute; + top: 0; + left: 0; + z-index: 20; + border: 10px solid #000; + width: 400px; + height: 200px; + padding: 2em; +} + +#bagit-form-form .addurl { + 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; + text-decoration: none; +} + +.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; +} + +.active-current { + background-color: #999; +} + +.active-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; +} + +.opacity03 { + opacity: 0.3; +} + +.add-to-wallabag-link-after { + background-color: #000; + color: #fff; + padding: 0 3px 2px 3px; +} + +a.add-to-wallabag-link-after { + 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: 0.3s; + transition-timing-function: ease-in; +} + +a.add-to-wallabag-link-after::after { + content: "w"; +} + +#add-link-result { + font-weight: bold; + 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-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; + 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; +} + +.icon-flattr::before { + content: "\ead4"; +} + +.icon-mail::before { + content: "\ea86"; +} + +.icon-up-open::before { + content: "\e80b"; +} + +.icon-star::before { + content: "\e9d9"; +} + +.icon-check::before { + content: "\ea10"; +} + +.icon-link::before { + content: "\e9cb"; +} + +.icon-reply::before { + content: "\e806"; +} + +.icon-menu::before { + content: "\e9bd"; +} + +.icon-clock::before { + content: "\e803"; +} + +.icon-twitter::before { + content: "\ea91"; +} + +.icon-down-open::before { + content: "\e809"; +} + +.icon-trash::before { + content: "\e9ac"; +} + +.icon-delete::before { + content: "\ea0d"; +} + +.icon-power::before { + content: "\ea14"; +} + +.icon-arrow-up-thick::before { + content: "\ea3a"; +} + +.icon-rss::before { + content: "\e808"; +} + +.icon-print::before { + content: "\e954"; +} + +.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; +} + +/* Carrot (http://carrot.org) */ +.icon-image--carrot { + background-image: url("../../_global/img/icons/carrot-icon--white.png"); +} + +/* Diaspora */ +.icon-image--diaspora { + background-image: url("../../_global/img/icons/diaspora-icon--black.png"); +} + +/* ========================================================================== + Icon selected + ========================================================================== */ + +.icon-star.fav::before { + color: #fff; +} + +.icon-check.archive::before { + color: #fff; +} + +/* ========================================================================== + 4 = Messages + ========================================================================== */ + +.messages { + text-align: left; + margin-top: 1em; +} + +.messages > * { + display: inline-block; +} + +.warning { + font-weight: bold; + display: block; + width: 100%; +} + +.more-info { + font-size: 0.85em; + line-height: 1.5; + color: #aaa; +} + +.more-info a { + color: #aaa; +} + +/* ========================================================================== + 5 = Article + ========================================================================== */ + +#article { + width: 70%; + margin-bottom: 3em; + text-align: justify; +} + +#article .tags { + margin-bottom: 1em; +} + +#article i { + font-style: normal; +} + +blockquote { + border: 1px solid #999; + background-color: #fff; + padding: 1em; + margin: 0; +} + +#article h1 { + text-align: left; +} + +#article h2, +#article h3, +#article h4 { + text-transform: none; +} + +#article h2::after { + content: none; +} + +.topPosF { + position: fixed; + right: 20%; + bottom: 2em; + font-size: 1.5em; +} + +#article_toolbar { + margin-bottom: 1em; +} + +#article_toolbar li { + display: inline-block; +} + +#article_toolbar a { + background-color: #000; + padding: 0.3em 0.5em 0.2em; + color: #fff; + text-decoration: none; +} + +#article_toolbar a:hover, +#article_toolbar a:focus { + background-color: #999; +} + +#nav-btn-add-tag { + cursor: pointer; +} + +.shaarli::before { + content: "*"; +} + +.return { + text-decoration: none; + margin-top: 1em; + display: block; +} + +.return::before { + margin-right: 0.5em; +} + +.notags { + font-style: italic; + color: #999; +} + +.icon-rss { + background-color: #000; + color: #fff; + padding: 0.2em 0.5em; +} + +.icon-rss::before { + position: relative; + top: 2px; +} + +.list-tags li { + margin-bottom: 0.5em; +} + +.list-tags .icon-rss:hover, +.list-tags .icon-rss:focus { + background-color: #fff; + color: #000; + text-decoration: none; +} + +.list-tags a { + text-decoration: none; +} + +.list-tags a:hover, +.list-tags a:focus { + text-decoration: underline; +} + +pre code { + font-family: "Courier New", Courier, monospace; +} + +#filter-form { + position: fixed; + width: 20%; + 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: 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 + ========================================================================== */ + +@media screen and (max-width: 1050px) { + .entry { + width: 49%; + } + .entry:nth-child(3n+1) { + margin-left: 1.5%; + } + .entry:nth-child(2n+1) { + margin-left: 0; + } +} + +@media screen and (max-width: 900px) { + #article { + width: 80%; + } + .topPosF { + right: 2.5em; + } +} + +@media screen and (max-width: 700px) { + .entry { + width: 100%; + margin-left: 0; + } + #display-mode { + display: none; + } +} + +@media screen and (max-width: 500px) { + .entry { + width: 100%; + margin-left: 0; + } + + body > header { + background-color: #333; + position: fixed; + top: 0; + width: 100%; + height: 3em; + z-index: 11; + } + + #links li:last-child { + position: static; + width: auto; + } + + #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; + top: 0.5em; + width: 75px; + height: 75px; + margin-left: -37.5px; + } + + .desktopHide { + display: block; + position: fixed; + z-index: 20; + top: 0; + right: 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; + } + + #links { + display: none; + width: 100%; + height: auto; + padding-top: 3em; + } + + #links.menu--open { + display: block; + } + + 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; + } + + #article { + width: 100%; + } + + #article h1 { + font-size: 1.5em; + } + + #article_toolbar a { + padding: 0.3em 0.4em 0.2em; + } + + #display-mode { + display: none; + } + + .popup-form, + #bagit-form, + #search-form { + left: 0; + width: 100%; + border-left: none; + } + + .popup-form form, + #bagit-form form, + #search-form form { + width: 100%; + } +} 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 00000000..bfaf1448 --- /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 00000000..6f187ff5 --- /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/app/Resources/static/themes/baggy/css/ratatouille.css b/app/Resources/static/themes/baggy/css/ratatouille.css new file mode 100644 index 00000000..bf89d881 --- /dev/null +++ b/app/Resources/static/themes/baggy/css/ratatouille.css @@ -0,0 +1,225 @@ +/* + Ratatouille mini Framework css by Thomas LEBEAU + Base on KNACSS => www.KNACSS.com (2013-10) @author: Raphael Goetter, Alsacreations + and normalize.css +*/ + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +body { + font-size: 1em; + line-height: 1.5; + margin: 0; +} + +/* ========================================================================== + Mise en forme + ========================================================================== */ + +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child, +p:first-child, +ul:first-child, +ol:first-child, +dl:first-child { + margin-top: 0; +} + +code, +kbd, +pre, +samp { + font-family: monospace, serif; +} + +pre { + white-space: pre-wrap; +} + +.upper { + text-transform: uppercase; +} + +.bold { + font-weight: bold; +} + +.inner { + margin: 0 auto; + max-width: 61.25em; /* 980px */ +} + +table, +img { + max-width: 100%; + height: auto; +} + +iframe { + max-width: 100%; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +table { + border-collapse: collapse; +} + +figure { + margin: 0; +} + +button, +input, +select, +textarea { + font-family: inherit; + font-size: 100%; + margin: 0; +} + +input[type="search"] { + -webkit-appearance: textfield; +} + +/* ========================================================================== + Mise en page + ========================================================================== */ + +.dib { + display: inline-block; + vertical-align: middle; +} + +.dnone { + display: none; +} + +.dtable { + display: table; +} + +.dtable > * { + display: table-row; +} + +.dtable > * > * { + display: table-cell; +} + +.element-invisible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +.small { + font-size: 0.8em; +} + +.big { + font-size: 1.2em; +} + +/* 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%; +} + +/* ========================================================================== + Internet Explorer + ========================================================================== */ + +/* IE8 and IE9 */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/* IE8 and IE9 */ + +audio, +canvas, +video { + display: inline-block; +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + select { + -webkit-appearance: none; + border-radius: 0; + } +} 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 00000000..248758fb 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 00000000..b1b9c92a --- /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 00000000..c03770c6 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 00000000..121e0bdd Binary files /dev/null and b/app/Resources/static/themes/baggy/font/icomoon.woff differ diff --git a/app/Resources/static/themes/baggy/img/blank.png b/app/Resources/static/themes/baggy/img/blank.png new file mode 100755 index 00000000..63e09844 Binary files /dev/null and b/app/Resources/static/themes/baggy/img/blank.png differ diff --git a/app/Resources/static/themes/baggy/img/down.png b/app/Resources/static/themes/baggy/img/down.png new file mode 100644 index 00000000..b9d536a7 Binary files /dev/null and b/app/Resources/static/themes/baggy/img/down.png differ diff --git a/app/Resources/static/themes/baggy/img/list.png b/app/Resources/static/themes/baggy/img/list.png new file mode 100755 index 00000000..bd5aff5a Binary files /dev/null and b/app/Resources/static/themes/baggy/img/list.png differ diff --git a/app/Resources/static/themes/baggy/img/table.png b/app/Resources/static/themes/baggy/img/table.png new file mode 100755 index 00000000..859c4cd8 Binary files /dev/null and b/app/Resources/static/themes/baggy/img/table.png differ diff --git a/app/Resources/static/themes/baggy/img/top.png b/app/Resources/static/themes/baggy/img/top.png new file mode 100644 index 00000000..954a8c0a Binary files /dev/null and b/app/Resources/static/themes/baggy/img/top.png differ 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 00000000..e9145b7e --- /dev/null +++ b/app/Resources/static/themes/baggy/js/autoClose.js @@ -0,0 +1,6 @@ +$(document).ready(function() { + current_url = window.location.href + if (current_url.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 00000000..90bc982c --- /dev/null +++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js @@ -0,0 +1,47 @@ +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 00000000..527719d5 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/closeMessage.js @@ -0,0 +1,17 @@ +$(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; + }); +}); \ No newline at end of file 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 00000000..1721ae41 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/init.js @@ -0,0 +1,101 @@ +var $ = global.jquery = require('jquery'); +require('jquery.cookie'); +require('jquery-ui'); +var annotator = require('annotator'); + + +$.fn.ready(function() { + + var $listmode = $('#listmode'), + $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 00000000..0b478fad --- /dev/null +++ b/app/Resources/static/themes/baggy/js/popupForm.js @@ -0,0 +1,100 @@ +$(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 00000000..91cc2c3f --- /dev/null +++ b/app/Resources/static/themes/baggy/js/saveLink.js @@ -0,0 +1,78 @@ +$.fn.ready(function() { + + var $bagit = $('#bagit'), + $bagitForm = $('#bagit-form'), + $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(); + }); + +}); + + -- cgit v1.2.3 From 0743287f955fd19fd1a04c91f3b40a4ac2236423 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 9 Jun 2016 19:02:38 +0200 Subject: clean & lint stuff --- app/Resources/static/themes/baggy/js/autoClose.js | 12 +- .../static/themes/baggy/js/autoCompleteTags.js | 35 +++-- .../static/themes/baggy/js/closeMessage.js | 36 ++--- app/Resources/static/themes/baggy/js/init.js | 99 ++++++------ app/Resources/static/themes/baggy/js/popupForm.js | 167 +++++++++++---------- app/Resources/static/themes/baggy/js/saveLink.js | 67 ++++----- 6 files changed, 207 insertions(+), 209 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/autoClose.js b/app/Resources/static/themes/baggy/js/autoClose.js index e9145b7e..b0dafab2 100644 --- a/app/Resources/static/themes/baggy/js/autoClose.js +++ b/app/Resources/static/themes/baggy/js/autoClose.js @@ -1,6 +1,8 @@ -$(document).ready(function() { - current_url = window.location.href - if (current_url.match("&closewin=true")) { - window.close(); - } +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 index 90bc982c..edd0a421 100755 --- a/app/Resources/static/themes/baggy/js/autoCompleteTags.js +++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js @@ -1,47 +1,46 @@ -jQuery(function($) { +var $ = global.jquery = require('jquery'); - function split( val ) { - return val.split( /,\s*/ ); +jQuery(function ($) { + function split(val) { + return val.split(/,\s*/); } - function extractLast( term ) { - return split( term ).pop(); + function extractLast(term) { + return split(term).pop(); } - $("#value").bind("keydown", function(event) { - if (event.keyCode === $.ui.keyCode.TAB && $(this).data("ui-autocomplete").menu.active) { + $('#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), + source: function (request, response) { + $.getJSON('./?view=tags', { + term: extractLast(request.term), //id: $(':hidden#entry_id').val() }, response); }, - search : function() { + search: function () { // custom minLength var term = extractLast(this.value); if (term.length < 1) { return false; } }, - focus : function() { + focus: function () { // prevent value inserted on focus return false; }, - select : function(event, ui) { + 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(", "); + 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 index 527719d5..ae4b1791 100644 --- a/app/Resources/static/themes/baggy/js/closeMessage.js +++ b/app/Resources/static/themes/baggy/js/closeMessage.js @@ -1,17 +1,19 @@ -$(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; - }); -}); \ No newline at end of file +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 index 1721ae41..d7d4b166 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -4,19 +4,18 @@ require('jquery-ui'); var annotator = require('annotator'); -$.fn.ready(function() { - - var $listmode = $('#listmode'), - $listentries = $("#list-entries"); +$.fn.ready(function () { + var $listmode = $('#listmode'); + var $listentries = $('#list-entries'); /* ========================================================================== Menu ========================================================================== */ - $("#menu").click(function(){ - $("#links").toggleClass('menu--open'); + $('#menu').click(function () { + $('#links').toggleClass('menu--open'); if ($('#content').hasClass('opacity03')) { - $('#content').removeClass('opacity03'); + $('#content').removeClass('opacity03'); } }); @@ -24,34 +23,32 @@ $.fn.ready(function() { List mode or Table Mode ========================================================================== */ - $listmode.click(function(){ - if ( jquery.cookie("listmode") == 1 ) { + $listmode.click(function () { + if (jquery.cookie('listmode') === 1) { // Cookie - $.removeCookie("listmode"); + $.removeCookie('listmode'); - $listentries.removeClass("listmode"); - $listmode.removeClass("tablemode"); - $listmode.addClass("listmode"); - } - else { + $listentries.removeClass('listmode'); + $listmode.removeClass('tablemode'); + $listmode.addClass('listmode'); + } else { // Cookie - jquery.cookie("listmode", 1, {expires: 365}); + jquery.cookie('listmode', 1, { expires: 365 }); - $listentries.addClass("listmode"); - $listmode.removeClass("listmode"); - $listmode.addClass("tablemode"); + $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"); + if (jquery.cookie('listmode') === 1) { + $listentries.addClass('listmode'); + $listmode.removeClass('listmode'); + $listmode.addClass('tablemode'); } /* ========================================================================== @@ -59,43 +56,43 @@ $.fn.ready(function() { ========================================================================== */ - $('#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-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(); + if ($('article').length) { + var app = new annotator.App(); - app.include(annotator.ui.main, { - element: document.querySelector('article') - }); + app.include(annotator.ui.main, { + element: document.querySelector('article'), + }); - var x = JSON.parse($('#annotationroutes').html()); - app.include(annotator.storage.http, x); + var x = JSON.parse($('#annotationroutes').html()); + app.include(annotator.storage.http, x); - app.start().then(function () { - app.annotations.load({entry: x.entryId}); - }); + 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); - }); + $(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); + retrievePercent(x.entryId); - $(window).resize(function(){ - 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 index 0b478fad..95ba60ee 100644 --- a/app/Resources/static/themes/baggy/js/popupForm.js +++ b/app/Resources/static/themes/baggy/js/popupForm.js @@ -1,100 +1,101 @@ -$(document).ready(function() { +var $ = global.jquery = require('jquery'); - $("#search-form").hide(); - $("#bagit-form").hide(); - $("#filter-form").hide(); - $("#download-form").hide(); +$(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 '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 'Filter' popup on entries list + //--------------------------------------------------------------------------- + function toggleFilter() { + $('#filter-form').toggle(); + } - //--------------------------------------------------------------------------- - // Toggle the "Download" popup on entries list - //--------------------------------------------------------------------------- - function toggleDownload() { - $("#download-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"); - } + //--------------------------------------------------------------------------- + // 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"); - } + //--------------------------------------------------------------------------- + // 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(); - }); + $('#search').click(function () { + closePopups(); + toggleSearch(); + $('#searchfield').focus(); + }); - $(".filter-btn").click(function(){ - closePopups(); - toggleFilter(); - }); + $('.filter-btn').click(function () { + closePopups(); + toggleFilter(); + }); - $(".download-btn").click(function(){ - closePopups(); - toggleDownload(); - }); + $('.download-btn').click(function () { + closePopups(); + toggleDownload(); + }); - $("#bagit").click(function(){ - closePopups(); - toggleBagit(); - $("#plainurl").focus(); - }); + $('#bagit').click(function () { + closePopups(); + toggleBagit(); + $('#plainurl').focus(); + }); - $("#search-form-close").click(function(){ - toggleSearch(); - }); + $('#search-form-close').click(function () { + toggleSearch(); + }); - $("#filter-form-close").click(function(){ - toggleFilter(); - }); + $('#filter-form-close').click(function () { + toggleFilter(); + }); - $("#download-form-close").click(function(){ - toggleDownload(); - }); + $('#download-form-close').click(function () { + toggleDownload(); + }); - $("#bagit-form-close").click(function(){ - toggleBagit(); - }); + $('#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 index 91cc2c3f..5c720886 100755 --- a/app/Resources/static/themes/baggy/js/saveLink.js +++ b/app/Resources/static/themes/baggy/js/saveLink.js @@ -1,60 +1,60 @@ -$.fn.ready(function() { +var $ = global.jquery = require('jquery'); - var $bagit = $('#bagit'), - $bagitForm = $('#bagit-form'), - $bagitFormForm = $('#bagit-form-form'); +$.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(); + $('#add-link-result').empty(); - $bagit.toggleClass("active-current"); + $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"}); + // 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(); + if ($('#search-form').length !== 0) { + $('#search').removeClass('current'); + $('#search-arrow').removeClass('arrow-down'); + $('#search-form').hide(); } $bagitForm.toggle(); - $('#content').toggleClass("opacity03"); + $('#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(); + // 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!"); + success: function (data) { + $('#add-link-result').html('Done!'); $('#plainurl').val(''); $('#plainurl').blur(''); - $("body").css("cursor", "auto"); + $('body').css('cursor', 'auto'); + }, + error: function (data) { + $('#add-link-result').html('Failed!'); + $('body').css('cursor', 'auto'); }, - error: function(data) { - $('#add-link-result').html("Failed!"); - $("body").css("cursor", "auto"); - } }); event.preventDefault(); @@ -64,15 +64,12 @@ $.fn.ready(function() { Process all links inside an article ========================================================================== */ - $("article a[href^='http']").after(function() { - return " "; + $('article a[href^="http"]').after(function () { + return ' '; }); - $(".add-to-wallabag-link-after").click(function(event){ + $('.add-to-wallabag-link-after').click(function (event) { toggleSaveLinkForm($(this).attr('href'), event); event.preventDefault(); }); - }); - - -- cgit v1.2.3 From 1d4d9aaf2971e5b4d00a28f935c815e88bcf1487 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 1 Jul 2016 13:59:30 +0200 Subject: Bring tags on entries view to baggy Also, a couple of UI improvement and CSS fixing --- app/Resources/static/themes/baggy/css/main.css | 113 ++++++++++++++++++------- 1 file changed, 81 insertions(+), 32 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index d46fae1a..7ffaa12c 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -84,7 +84,7 @@ a { } a.nostyle { - text-decoration: none; + text-decoration: none; } a:hover, @@ -146,7 +146,6 @@ input[type="submit"] { cursor: pointer; background-color: #000; color: #fff; - border: 0; padding: 0.5em 1em; display: inline-block; border: 1px solid #000; @@ -202,7 +201,7 @@ h2::after { } #main { - margin-left: 13em; + margin-left: 12em; position: relative; z-index: 10; padding-right: 5%; @@ -287,7 +286,6 @@ h2::after { #display-mode { float: right; - vertical-align: middle; margin-top: 10px; margin-bottom: 10px; opacity: 0.5; @@ -359,6 +357,46 @@ footer a { margin-left: 0 !important; } +.card-entry-labels { + position: absolute; + top: 100px; + left: -1em; + z-index: 90; + max-width: 50%; + padding-left: 0; +} + +.card-entry-labels li { + margin: 10px 10px 10px auto; + padding: 5px 12px 5px 25px; + background-color: rgba(0, 0, 0, 0.6); + border-radius: 0 3px 3px 0; + color: #fff; + cursor: default; + max-height: 2em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.card-entry-tags { + max-height: 2em; + overflow-y: hidden; + padding: 0; +} + +.card-entry-tags li { + display: inline-block; + margin: 0 5px; + padding: 5px 12px; + background-color: rgba(0, 0, 0, 0.6); + border-radius: 3px; + max-height: 2em; + overflow: hidden; + text-overflow: ellipsis; + color: #fff; +} + .list-entries + .results { margin-bottom: 2em; } @@ -383,10 +421,11 @@ footer a { width: 32%; margin-bottom: 1.5em; vertical-align: top; - margin-left: 1.5%; + margin-right: 1%; position: relative; overflow: hidden; - padding: 1.5em 1.5em 3em 1.5em; + padding: 1.5em 1.5em 3em; + height: 440px; } .entry::before { @@ -394,7 +433,7 @@ footer a { width: 0; height: 0; border-style: solid; - border-color: transparent transparent #000 transparent; + border-color: transparent transparent #000; border-width: 10px; position: absolute; bottom: 0.3em; @@ -442,6 +481,9 @@ footer a { text-transform: none; margin-bottom: 0; line-height: 1.2; + text-align: justify; + -moz-text-align-last: center; + text-align-last: center; } .entry h2::after { @@ -461,7 +503,9 @@ footer a { } img.preview { - max-width: 100%; + max-width: calc(100% + 3em); + left: -1.5em; + position: relative; } .entry p { @@ -653,7 +697,7 @@ div.pagination ul .current { .add-to-wallabag-link-after { background-color: #000; color: #fff; - padding: 0 3px 2px 3px; + padding: 0 3px 2px; } a.add-to-wallabag-link-after { @@ -682,7 +726,7 @@ a.add-to-wallabag-link-after::after { } .btn-clickable { - cursor: pointer; + cursor: pointer; } /* ========================================================================== @@ -706,6 +750,7 @@ a.add-to-wallabag-link-after::after { 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"); } @@ -727,6 +772,7 @@ a.add-to-wallabag-link-after::after { /* Support for all WebKit browsers. */ -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ text-rendering: optimizeLegibility; @@ -1045,30 +1091,30 @@ pre code { } #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; + 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; + display: block; + padding: 0.5em 2em 0.5em 1em; + color: #fff; + position: relative; + text-transform: uppercase; + text-decoration: none; + font-weight: 400; + font-family: PT Sans, sans-serif; + transition: all 0.5s ease; } /* ========================================================================== @@ -1148,7 +1194,6 @@ pre code { } .login .logo { - width: auto; height: auto; top: 0.5em; width: 75px; @@ -1197,6 +1242,10 @@ pre code { margin-top: 3em; } + .card-entry-labels { + display: none; + } + #article_toolbar .topPosF { display: none; } -- cgit v1.2.3 From add0e14cffa6d36affc5fe2e815d069a1ecfc258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 26 Aug 2016 21:20:02 +0200 Subject: Fixed print view for baggy theme --- app/Resources/static/themes/baggy/css/print.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/print.css b/app/Resources/static/themes/baggy/css/print.css index 6f187ff5..f7f6a8ad 100755 --- a/app/Resources/static/themes/baggy/css/print.css +++ b/app/Resources/static/themes/baggy/css/print.css @@ -26,7 +26,9 @@ div.tools, header div, .messages, - .entrie + .results { + .entrie + .results, + #article .mbm a, + #article-informations { display: none !important; } -- cgit v1.2.3 From c146f6940a176142084b4fc3c610d13aca60d90e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 28 Sep 2016 10:30:18 +0200 Subject: Assets work * ES6 all the things ! * ESLint checks everything * CSS fixes (use stylelint) * Fix #2231 --- app/Resources/static/themes/baggy/css/main.css | 13 +- .../static/themes/baggy/css/ratatouille.css | 4 +- app/Resources/static/themes/baggy/js/autoClose.js | 8 - .../static/themes/baggy/js/autoCompleteTags.js | 52 +--- .../static/themes/baggy/js/closeMessage.js | 19 -- app/Resources/static/themes/baggy/js/init.js | 277 ++++++++++++++++++--- app/Resources/static/themes/baggy/js/popupForm.js | 101 -------- app/Resources/static/themes/baggy/js/saveLink.js | 75 ------ app/Resources/static/themes/baggy/js/uiTools.js | 35 +++ 9 files changed, 296 insertions(+), 288 deletions(-) delete mode 100644 app/Resources/static/themes/baggy/js/autoClose.js delete mode 100644 app/Resources/static/themes/baggy/js/closeMessage.js delete mode 100644 app/Resources/static/themes/baggy/js/popupForm.js delete mode 100755 app/Resources/static/themes/baggy/js/saveLink.js create mode 100644 app/Resources/static/themes/baggy/js/uiTools.js (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 7ffaa12c..58f0eb82 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -481,9 +481,6 @@ footer a { text-transform: none; margin-bottom: 0; line-height: 1.2; - text-align: justify; - -moz-text-align-last: center; - text-align-last: center; } .entry h2::after { @@ -1071,7 +1068,7 @@ pre code { font-family: "Courier New", Courier, monospace; } -#filter-form { +#filters { position: fixed; width: 20%; height: 100%; @@ -1086,7 +1083,7 @@ pre code { min-width: 300px; } -#filter-form form .filter-group { +#filters form .filter-group { margin: 5px; } @@ -1125,9 +1122,11 @@ pre code { .entry { width: 49%; } + .entry:nth-child(3n+1) { margin-left: 1.5%; } + .entry:nth-child(2n+1) { margin-left: 0; } @@ -1137,6 +1136,7 @@ pre code { #article { width: 80%; } + .topPosF { right: 2.5em; } @@ -1147,6 +1147,7 @@ pre code { width: 100%; margin-left: 0; } + #display-mode { display: none; } @@ -1197,7 +1198,6 @@ pre code { height: auto; top: 0.5em; width: 75px; - height: 75px; margin-left: -37.5px; } @@ -1214,6 +1214,7 @@ pre code { background-color: #999; font-size: 1.2em; } + .desktopHide:hover, .desktopHide:focus { background-color: #fff; diff --git a/app/Resources/static/themes/baggy/css/ratatouille.css b/app/Resources/static/themes/baggy/css/ratatouille.css index b5aeb54e..a6167f34 100644 --- a/app/Resources/static/themes/baggy/css/ratatouille.css +++ b/app/Resources/static/themes/baggy/css/ratatouille.css @@ -63,7 +63,9 @@ pre { max-width: 61.25em; /* 980px */ } -table, img, figure { +table, +img, +figure { max-width: 100%; height: auto; } diff --git a/app/Resources/static/themes/baggy/js/autoClose.js b/app/Resources/static/themes/baggy/js/autoClose.js deleted file mode 100644 index b0dafab2..00000000 --- a/app/Resources/static/themes/baggy/js/autoClose.js +++ /dev/null @@ -1,8 +0,0 @@ -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 index edd0a421..f287ebfa 100755 --- a/app/Resources/static/themes/baggy/js/autoCompleteTags.js +++ b/app/Resources/static/themes/baggy/js/autoCompleteTags.js @@ -1,46 +1,8 @@ -var $ = global.jquery = require('jquery'); +function split(val) { + return val.split(/,\s*/); +} +function extractLast(term) { + return split(term).pop(); +} -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; - }, - }); -}); +export { split, extractLast }; diff --git a/app/Resources/static/themes/baggy/js/closeMessage.js b/app/Resources/static/themes/baggy/js/closeMessage.js deleted file mode 100644 index ae4b1791..00000000 --- a/app/Resources/static/themes/baggy/js/closeMessage.js +++ /dev/null @@ -1,19 +0,0 @@ -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 index d7d4b166..c6a54f6f 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -1,21 +1,25 @@ -var $ = global.jquery = require('jquery'); +const $ = global.jquery = require('jquery'); require('jquery.cookie'); require('jquery-ui'); -var annotator = require('annotator'); +const annotator = require('annotator'); +import { savePercent, retrievePercent } from '../../_global/js/tools.js'; +import { split, extractLast } from './autoCompleteTags.js'; +import { toggleSaveLinkForm } from './uiTools.js'; -$.fn.ready(function () { - var $listmode = $('#listmode'); - var $listentries = $('#list-entries'); +$.fn.ready(() => { + const $listmode = $('#listmode'); + const $listentries = $('#list-entries'); /* ========================================================================== Menu ========================================================================== */ - $('#menu').click(function () { + $('#menu').click(() => { $('#links').toggleClass('menu--open'); - if ($('#content').hasClass('opacity03')) { - $('#content').removeClass('opacity03'); + const content = $('#content'); + if (content.hasClass('opacity03')) { + content.removeClass('opacity03'); } }); @@ -23,8 +27,8 @@ $.fn.ready(function () { List mode or Table Mode ========================================================================== */ - $listmode.click(function () { - if (jquery.cookie('listmode') === 1) { + $listmode.click(() => { + if ($.cookie('listmode') === 1) { // Cookie $.removeCookie('listmode'); @@ -33,7 +37,7 @@ $.fn.ready(function () { $listmode.addClass('listmode'); } else { // Cookie - jquery.cookie('listmode', 1, { expires: 365 }); + $.cookie('listmode', 1, { expires: 365 }); $listentries.addClass('listmode'); $listmode.removeClass('listmode'); @@ -45,7 +49,7 @@ $.fn.ready(function () { Cookie listmode ========================================================================== */ - if (jquery.cookie('listmode') === 1) { + if ($.cookie('listmode') === 1) { $listentries.addClass('listmode'); $listmode.removeClass('listmode'); $listmode.addClass('tablemode'); @@ -56,43 +60,250 @@ $.fn.ready(function () { ========================================================================== */ - $('#nav-btn-add-tag').on('click', function () { + $('#nav-btn-add-tag').on('click', () => { $('.nav-panel-add-tag').toggle(100); $('.nav-panel-menu').addClass('hidden'); $('#tag_label').focus(); return false; }); + /** + * Filters & Export + */ + // no display if filters not available + if ($('div').is('#filters')) { + $('#button_filters').show(); + $('#clear_form_filters').on('click', () => { + $('#filters input').val(''); + $('#filters :checked').removeAttr('checked'); + return false; + }); + } + /* ========================================================================== Annotations & Remember position ========================================================================== */ - if ($('article').length) { - var app = new annotator.App(); + if ($('article').length) { + const app = new annotator.App(); + + app.include(annotator.ui.main, { + element: document.querySelector('article'), + }); - app.include(annotator.ui.main, { - element: document.querySelector('article'), - }); + const x = JSON.parse($('#annotationroutes').html()); + app.include(annotator.storage.http, x); - var x = JSON.parse($('#annotationroutes').html()); - app.include(annotator.storage.http, x); + app.start().then(() => { + app.annotations.load({ entry: x.entryId }); + }); - app.start().then(function () { - app.annotations.load({ entry: x.entryId }); - }); + $(window).scroll(() => { + const scrollTop = $(window).scrollTop(); + const docHeight = $(document).height(); + const scrollPercent = (scrollTop) / (docHeight); + const scrollPercentRounded = Math.round(scrollPercent * 100) / 100; + savePercent(x.entryId, scrollPercentRounded); + }); - $(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(() => { retrievePercent(x.entryId); + }); + } + + /** + * Close window after adding entry if popup + */ + const currentUrl = window.location.href; + if (currentUrl.match('&closewin=true')) { + window.close(); + } + + /** + * Tags autocomplete + */ + $('#value').bind('keydown', (event) => { + if (event.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active) { + event.preventDefault(); + } + }).autocomplete({ + source: function source(request, response) { + $.getJSON('./?view=tags', { + term: extractLast(request.term), + //id: $(':hidden#entry_id').val() + }, response); + }, + search: function search() { + // custom minLength + const term = extractLast(this.value); + return term.length >= 1; + }, + focus: function focus() { + // prevent value inserted on focus + return false; + }, + select: function select(event, ui) { + const 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; + }, + }); + + //--------------------------------------------------------------------------- + // Close the message box when the user clicks the close icon + //--------------------------------------------------------------------------- + $('a.closeMessage').on('click', () => { + $(this).parents('div.messages').slideUp(300, () => { $(this).remove(); }); + return false; + }); + + $('#search-form').hide(); + $('#bagit-form').hide(); + $('#filters').hide(); + $('#download-form').hide(); - $(window).resize(function () { - retrievePercent(x.entryId); - }); + //--------------------------------------------------------------------------- + // 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() { + $('#filters').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(() => { + closePopups(); + toggleSearch(); + $('#searchfield').focus(); + }); + + $('.filter-btn').click(() => { + closePopups(); + toggleFilter(); + }); + + $('.download-btn').click(() => { + closePopups(); + toggleDownload(); + }); + + $('#bagit').click(() => { + closePopups(); + toggleBagit(); + $('#plainurl').focus(); + }); + + $('#search-form-close').click(() => { + toggleSearch(); + }); + + $('#filter-form-close').click(() => { + toggleFilter(); + }); + + $('#download-form-close').click(() => { + toggleDownload(); + }); + + $('#bagit-form-close').click(() => { + toggleBagit(); + }); + + const $bagitFormForm = $('#bagit-form-form'); + + /* ========================================================================== + bag it link and close button + ========================================================================== */ + + // send 'bag it link' form request via ajax + $bagitFormForm.submit((event) => { + $('body').css('cursor', 'wait'); + $('#add-link-result').empty(); + + $.ajax({ + type: $bagitFormForm.attr('method'), + url: $bagitFormForm.attr('action'), + data: $bagitFormForm.serialize(), + success: function success() { + $('#add-link-result').html('Done!'); + $('#plainurl').val(''); + $('#plainurl').blur(''); + $('body').css('cursor', 'auto'); + }, + error: function error() { + $('#add-link-result').html('Failed!'); + $('body').css('cursor', 'auto'); + }, + }); + + event.preventDefault(); + }); + + /* ========================================================================== + Process all links inside an article + ========================================================================== */ + + $('article a[href^="http"]').after( + () => `' + ); + + $('.add-to-wallabag-link-after').click((event) => { + toggleSaveLinkForm($(this).attr('href'), event); + event.preventDefault(); + }); }); diff --git a/app/Resources/static/themes/baggy/js/popupForm.js b/app/Resources/static/themes/baggy/js/popupForm.js deleted file mode 100644 index 95ba60ee..00000000 --- a/app/Resources/static/themes/baggy/js/popupForm.js +++ /dev/null @@ -1,101 +0,0 @@ -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 deleted file mode 100755 index 5c720886..00000000 --- a/app/Resources/static/themes/baggy/js/saveLink.js +++ /dev/null @@ -1,75 +0,0 @@ -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/baggy/js/uiTools.js b/app/Resources/static/themes/baggy/js/uiTools.js new file mode 100644 index 00000000..900b2707 --- /dev/null +++ b/app/Resources/static/themes/baggy/js/uiTools.js @@ -0,0 +1,35 @@ +const $ = require('jquery'); + +function toggleSaveLinkForm(url, event) { + $('#add-link-result').empty(); + + const $bagit = $('#bagit'); + const $bagitForm = $('#bagit-form'); + + $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' }); + } + } + + const searchForm = $('#search-form'); + const plainUrl = $('#plainurl'); + if (searchForm.length !== 0) { + $('#search').removeClass('current'); + $('#search-arrow').removeClass('arrow-down'); + searchForm.hide(); + } + $bagitForm.toggle(); + $('#content').toggleClass('opacity03'); + if (url !== 'undefined' && url) { + plainUrl.val(url); + } + plainUrl.focus(); +} + +export { toggleSaveLinkForm }; -- cgit v1.2.3 From 8f234d0156cc6f2eb6e3c9f692e4633b35fafc41 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 28 Sep 2016 18:59:15 +0200 Subject: remove autocomplete and bring fonts through npm --- app/Resources/static/themes/baggy/js/init.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index c6a54f6f..8da9a859 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -1,6 +1,6 @@ const $ = global.jquery = require('jquery'); require('jquery.cookie'); -require('jquery-ui'); +require('jquery-ui-browserify'); const annotator = require('annotator'); import { savePercent, retrievePercent } from '../../_global/js/tools.js'; import { split, extractLast } from './autoCompleteTags.js'; @@ -124,6 +124,10 @@ $.fn.ready(() => { /** * Tags autocomplete */ + /** + * Not working on v2 + * + $('#value').bind('keydown', (event) => { if (event.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active) { event.preventDefault(); @@ -156,6 +160,7 @@ $.fn.ready(() => { return false; }, }); + */ //--------------------------------------------------------------------------- // Close the message box when the user clicks the close icon -- cgit v1.2.3 From 0471e905b8b37ac226176ee9a708624c869bb046 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 29 Sep 2016 09:18:46 +0200 Subject: fonts & ligatures --- app/Resources/static/themes/baggy/css/font.css | 2 +- app/Resources/static/themes/baggy/css/main.css | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/font.css b/app/Resources/static/themes/baggy/css/font.css index cae7904a..47edcb83 100755 --- a/app/Resources/static/themes/baggy/css/font.css +++ b/app/Resources/static/themes/baggy/css/font.css @@ -2,5 +2,5 @@ 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"); + src: local("PT Sans Bold"), local("PTSans-Bold"), url("../fonts/ptsansbold.woff") format("woff"); } diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 58f0eb82..eeedd277 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -732,12 +732,7 @@ a.add-to-wallabag-link-after::after { @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"); + src: url("../fonts/IcoMoon-Free.ttf"); font-weight: normal; font-style: normal; } -- cgit v1.2.3 From a494c33ef7e574e68ab5bb83d0bdbd67348af0ef Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 3 Oct 2016 23:08:26 +0200 Subject: Basically, fix everything * Remove install.sh * Assets are now provided * Icons font issues are fixed --- app/Resources/static/themes/baggy/css/main.css | 35 +++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index eeedd277..52186818 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -796,6 +796,15 @@ a.add-to-wallabag-link-after::after { text-transform: none; line-height: 1; + /* Enable Ligatures ================ */ + letter-spacing: 0; + -webkit-font-feature-settings: "liga"; + -moz-font-feature-settings: "liga=1"; + -moz-font-feature-settings: "liga"; + -ms-font-feature-settings: "liga" 1; + -o-font-feature-settings: "liga"; + font-feature-settings: "liga"; + /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -838,7 +847,7 @@ a.add-to-wallabag-link-after::after { } .icon-twitter::before { - content: "\ea91"; + content: "\ea96"; } .icon-down-open::before { @@ -877,13 +886,28 @@ a.add-to-wallabag-link-after::after { content: "\e936"; } +.icon-eye::before { + content: "\e9ce"; +} + +.icon-no-eye::before { + content: "\e9d1"; +} + +.icon-calendar::before { + content: "\e953"; +} + +.icon-time::before { + content: "\e952"; +} + /* .icon-image class, for image-based icons ========================================================================== */ .icon-image { background-size: 16px 16px; - background-repeat: no-repeat; - background-position: center; + background: no-repeat center; padding-right: 1em !important; padding-left: 1em !important; } @@ -898,6 +922,11 @@ a.add-to-wallabag-link-after::after { background-image: url("../../_global/img/icons/diaspora-icon--black.png"); } +/* Diaspora */ +.icon-image--shaarli { + background-image: url("../../_global/img/icons/shaarli.png"); +} + /* ========================================================================== Icon selected ========================================================================== */ -- cgit v1.2.3 From 9f3a1cd20c13ad3384d079641c7bd079b4c1d6ae Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 4 Oct 2016 07:26:18 +0200 Subject: shaarli instead of Diaspora --- app/Resources/static/themes/baggy/css/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 52186818..522c4833 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -922,7 +922,7 @@ a.add-to-wallabag-link-after::after { background-image: url("../../_global/img/icons/diaspora-icon--black.png"); } -/* Diaspora */ +/* shaarli */ .icon-image--shaarli { background-image: url("../../_global/img/icons/shaarli.png"); } -- cgit v1.2.3 From 9f7d154e3451f1ccc1d69f0013e98acf4639c63b Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 4 Oct 2016 12:14:28 +0200 Subject: Add eslint & stylelint tests (fix a few things) and move dependencies to dev --- app/Resources/static/themes/baggy/css/main.css | 3 ++- app/Resources/static/themes/baggy/js/init.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 522c4833..99ea6c6b 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -907,7 +907,8 @@ a.add-to-wallabag-link-after::after { .icon-image { background-size: 16px 16px; - background: no-repeat center; + background-repeat: no-repeat; + background-position: center; padding-right: 1em !important; padding-left: 1em !important; } diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index 8da9a859..07afd311 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -3,7 +3,6 @@ require('jquery.cookie'); require('jquery-ui-browserify'); const annotator = require('annotator'); import { savePercent, retrievePercent } from '../../_global/js/tools.js'; -import { split, extractLast } from './autoCompleteTags.js'; import { toggleSaveLinkForm } from './uiTools.js'; -- cgit v1.2.3 From 6cb364a2c123b96d245b1ca3c330fd0042c74cd1 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 4 Oct 2016 15:30:05 +0200 Subject: use airbnb base rules and update eslint --- app/Resources/static/themes/baggy/js/init.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/js/init.js b/app/Resources/static/themes/baggy/js/init.js index 07afd311..dc11043a 100755 --- a/app/Resources/static/themes/baggy/js/init.js +++ b/app/Resources/static/themes/baggy/js/init.js @@ -1,9 +1,10 @@ +import { savePercent, retrievePercent } from '../../_global/js/tools'; +import { toggleSaveLinkForm } from './uiTools'; + const $ = global.jquery = require('jquery'); require('jquery.cookie'); require('jquery-ui-browserify'); const annotator = require('annotator'); -import { savePercent, retrievePercent } from '../../_global/js/tools.js'; -import { toggleSaveLinkForm } from './uiTools.js'; $.fn.ready(() => { -- cgit v1.2.3 From 645c0d5bce85be0dfcb7b58c31ce96a47ceb99e3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 4 Oct 2016 20:11:10 +0200 Subject: better tags on baggy --- app/Resources/static/themes/baggy/css/main.css | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 99ea6c6b..61e7b22a 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -383,9 +383,11 @@ footer a { max-height: 2em; overflow-y: hidden; padding: 0; + margin: 0; } -.card-entry-tags li { +.card-entry-tags li, +.card-entry-tags span { display: inline-block; margin: 0 5px; padding: 5px 12px; @@ -394,9 +396,19 @@ footer a { max-height: 2em; overflow: hidden; text-overflow: ellipsis; +} + +.card-entry-tags a, +.card-entry-labels a { + text-decoration: none; + font-weight: normal; color: #fff; } +.nav-panel-add-tag { + margin-top: 10px; +} + .list-entries + .results { margin-bottom: 2em; } @@ -509,6 +521,7 @@ img.preview { color: #666; font-size: 0.9em; line-height: 1.7; + margin-top: 5px; } .entry h2 a::first-letter { @@ -1021,6 +1034,7 @@ blockquote { #article_toolbar li { display: inline-block; + margin: 3px auto; } #article_toolbar a { -- cgit v1.2.3 From d32e1c424adb6722706245fe91071594a8c7c826 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 15 Oct 2016 19:04:53 +0200 Subject: Fix baggy on small screens --- app/Resources/static/themes/baggy/css/main.css | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/Resources/static/themes/baggy') diff --git a/app/Resources/static/themes/baggy/css/main.css b/app/Resources/static/themes/baggy/css/main.css index 61e7b22a..44db2070 100755 --- a/app/Resources/static/themes/baggy/css/main.css +++ b/app/Resources/static/themes/baggy/css/main.css @@ -1192,6 +1192,14 @@ pre code { } } +@media screen and (max-height: 770px) { + .menu.users, + .menu.internal, + .menu.developer { + display: none; + } +} + @media screen and (max-width: 500px) { .entry { width: 100%; -- cgit v1.2.3