From: Thomas Citharel Date: Mon, 3 Oct 2016 21:08:26 +0000 (+0200) Subject: Basically, fix everything X-Git-Tag: 2.1.1~2^2~13 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=a494c33ef7e574e68ab5bb83d0bdbd67348af0ef Basically, fix everything * Remove install.sh * Assets are now provided * Icons font issues are fixed --- diff --git a/.gitignore b/.gitignore index 3b2dc462..32b0fbbb 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,10 @@ /vendor/ # Assets and user uploads -/web/bundles/ -/web/uploads/ +web/uploads/ +!web/bundles +web/bundles/* +!web/bundles/wallabagcore # Build /app/build @@ -43,9 +45,8 @@ docker/data/ composer.lock # assets stuff -/node_modules/ -!app/Resources/static/lib -app/Resources/static/lib/* -/bin +node_modules/ +bin +app/Resources/build/ !/src/Wallabag/CoreBundle/Resources/public -/src/Wallabag/CoreBundle/Resources/public/* \ No newline at end of file +/src/Wallabag/CoreBundle/Resources/public/* diff --git a/Gruntfile.js b/Gruntfile.js index 86612dc4..bd0d6dda 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,8 +3,9 @@ module.exports = function (grunt) { grunt.initConfig({ appDir: 'app/Resources/static', - buildDir: 'web/bundles/wallabagcore', + buildDir: 'app/Resources/build', modulesDir: 'node_modules', + releaseDir: 'web/bundles/wallabagcore', postcss: { material: { @@ -20,7 +21,7 @@ module.exports = function (grunt) { ], }, src: '<%= buildDir %>/material.css', - dest: '<%= buildDir %>/themes/material/css/style.min.css', + dest: '<%= releaseDir %>/themes/material/css/style.min.css', }, baggy: { options: { @@ -35,7 +36,7 @@ module.exports = function (grunt) { ], }, src: '<%= buildDir %>/baggy.css', - dest: '<%= buildDir %>/themes/baggy/css/style.min.css', + dest: '<%= releaseDir %>/themes/baggy/css/style.min.css', }, }, concat: { @@ -92,7 +93,7 @@ module.exports = function (grunt) { uglify: { material: { files: { - '<%= buildDir %>/themes/material/js/material.min.js': + '<%= releaseDir %>/themes/material/js/material.min.js': ['<%= buildDir %>/material.browser.js'], }, options: { @@ -101,7 +102,7 @@ module.exports = function (grunt) { }, baggy: { files: { - '<%= buildDir %>/themes/baggy/js/baggy.min.js': + '<%= releaseDir %>/themes/baggy/js/baggy.min.js': ['<%= buildDir %>/baggy.browser.js'], }, options: { @@ -131,21 +132,21 @@ module.exports = function (grunt) { overwrite: true, cwd: '<%= modulesDir %>/icomoon-free-npm/Font', src: 'IcoMoon-Free.ttf', - dest: '<%= buildDir %>/themes/baggy/fonts/', + dest: '<%= releaseDir %>/themes/baggy/fonts/', }, { expand: true, overwrite: true, cwd: '<%= modulesDir %>/ptsans-npm-webfont/fonts', - src: '*', - dest: '<%= buildDir %>/themes/baggy/fonts/', + src: 'ptsansbold.woff', + dest: '<%= releaseDir %>/themes/baggy/fonts/', }, { expand: true, overwrite: true, cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/', - src: '*', - dest: '<%= buildDir %>/themes/baggy/fonts/', + src: ['MaterialIcons-Regular.eot', 'MaterialIcons-Regular.woff2', 'MaterialIcons-Regular.woff', 'MaterialIcons-Regular.ttf'], + dest: '<%= releaseDir %>/themes/baggy/fonts/', }, ], }, @@ -156,28 +157,21 @@ module.exports = function (grunt) { overwrite: true, cwd: '<%= modulesDir %>/icomoon-free-npm/Font', src: 'IcoMoon-Free.ttf', - dest: '<%= buildDir %>/themes/material/fonts', - }, - { - expand: true, - overwrite: true, - cwd: '<%= modulesDir %>/materialize-css/', - src: 'font', - dest: '<%= buildDir %>/themes/material', + dest: '<%= releaseDir %>/themes/material/fonts', }, { expand: true, overwrite: true, cwd: '<%= modulesDir %>/roboto-fontface/fonts/Roboto', src: '*', - dest: '<%= buildDir %>/themes/material/fonts/', + dest: '<%= releaseDir %>/themes/material/font/roboto', }, { expand: true, overwrite: true, cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/', - src: '*', - dest: '<%= buildDir %>/themes/material/fonts/', + src: ['MaterialIcons-Regular.eot', 'MaterialIcons-Regular.woff2', 'MaterialIcons-Regular.woff', 'MaterialIcons-Regular.ttf'], + dest: '<%= releaseDir %>/themes/material/fonts/', }, ], }, @@ -188,7 +182,7 @@ module.exports = function (grunt) { overwrite: true, cwd: '<%= appDir %>/themes/_global/', src: 'img', - dest: '<%= buildDir %>/themes/_global/', + dest: '<%= releaseDir %>/themes/_global/', }, ], }, @@ -203,6 +197,9 @@ module.exports = function (grunt) { all: { src: ['./<%= buildDir %>'], }, + release: { + src: ['./<%= releaseDir %>/*'], + } }, }); diff --git a/app/Resources/static/themes/_global/img/icons/shaarli.png b/app/Resources/static/themes/_global/img/icons/shaarli.png new file mode 100644 index 00000000..0e83c46e Binary files /dev/null and b/app/Resources/static/themes/_global/img/icons/shaarli.png differ 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 ========================================================================== */ diff --git a/app/Resources/static/themes/material/css/main.css b/app/Resources/static/themes/material/css/main.css index 397622bd..20d1dded 100755 --- a/app/Resources/static/themes/material/css/main.css +++ b/app/Resources/static/themes/material/css/main.css @@ -62,8 +62,8 @@ font-feature-settings: 'liga'; } -[class^="icon-"], -[class*=" icon-"] { +[class^="icon-"]::before, +[class*=" icon-"]::before { font-family: icomoon; speak: none; font-style: normal; @@ -72,11 +72,59 @@ 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; } +.icon-image { + background-size: 16px 16px; + background: no-repeat center; + padding-right: 1em !important; + padding-left: 1em !important; +} + +.icon-eye::before { + content: "\e9ce"; +} + +.icon-no-eye::before { + content: "\e9d1"; +} + +.icon-calendar::before { + content: "\e953"; +} + +.icon-time::before { + content: "\e952"; +} + +/* Carrot (http://carrot.org) */ +.icon-image--carrot { + background-image: url("../../_global/img/icons/carrot-icon--black.png"); +} + +/* Diaspora */ +.icon-image--diaspora { + background-image: url("../../_global/img/icons/diaspora-icon--black.png"); +} + +/* Shaarli */ +.icon-image--shaarli { + background-image: url("../../_global/img/icons/shaarli.png"); +} + + body { display: flex; min-height: 100vh; @@ -643,7 +691,7 @@ main ul.row { } .icon-twitter::before { - content: "\ea91"; + content: "\ea96"; } .icon-apple::before { diff --git a/app/Resources/views/.gitkeep b/app/Resources/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index be1e3647..bead6809 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -21,12 +21,15 @@
  • {{ markAsReadLabel|trans }}
  • {{ 'entry.view.left_menu.set_as_starred'|trans }}
  • -
  • {{ 'entry.view.left_menu.add_a_tag'|trans }}
  • +
  • {{ 'entry.view.left_menu.add_a_tag'|trans }}
  • {{ 'entry.view.left_menu.delete'|trans }}
  • - {% if craue_setting('share_public') %}
  • {{ 'entry.view.left_menu.public_link'|trans }}
  • {{ 'entry.view.left_menu.delete_public_link'|trans }}
  • {% endif %} + {% if craue_setting('share_public') %} +
  • {{ 'entry.view.left_menu.public_link'|trans }}
  • +
  • {{ 'entry.view.left_menu.delete_public_link'|trans }}
  • + {% endif %} {% if craue_setting('share_twitter') %}
  • {% endif %} {% if craue_setting('share_mail') %}
  • {% endif %} - {% if craue_setting('share_shaarli') %}
  • shaarli
  • {% endif %} + {% if craue_setting('share_shaarli') %}
  • shaarli
  • {% endif %} {% if craue_setting('share_diaspora') %}
  • diaspora
  • {% endif %} {% if craue_setting('carrot') %}
  • Carrot
  • {% endif %} {% if craue_setting('show_printlink') %}
  • {{ 'entry.view.left_menu.print'|trans }}
  • {% endif %} @@ -38,18 +41,17 @@
    - + {{ entry.createdAt|date('Y-m-d') }} + - + {% set nbAnnotations = entry.annotations | length %} comment {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 209e9e89..d73d2703 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -47,7 +47,7 @@
  • - link + public {{ 'entry.view.left_menu.view_original_article'|trans }}
    @@ -106,12 +106,14 @@
      {% if craue_setting('share_public') %}
    • - + + link {{ 'entry.view.left_menu.public_link'|trans }}
    • - + + remove_circle {{ 'entry.view.left_menu.delete_public_link'|trans }}
    • @@ -125,22 +127,22 @@ {% endif %} {% if craue_setting('share_shaarli') %}
    • - - shaarli + + shaarli
    • {% endif %} {% if craue_setting('share_diaspora') %}
    • - - diaspora* + + diaspora*
    • {% endif %} {% if craue_setting('carrot') %}
    • - - Carrot + + Carrot
    • {% endif %} @@ -211,7 +213,7 @@