Vendor: Require flag-icons instead of flag-icons-css

pull/4161/head
Angel Fernando Quiroz Campos 3 years ago
parent b6dbebdf88
commit 8560a6d2a9
  1. 2
      assets/css/app.scss
  2. 2
      package.json
  3. 1
      public/main/inc/lib/template.lib.php
  4. 27
      public/main/template/default/social/user_block.html.twig
  5. 27
      src/CoreBundle/Resources/views/Social/user_block.html.twig

@ -38,7 +38,7 @@
} }
@import '~cropper/dist/cropper.css'; @import '~cropper/dist/cropper.css';
//@import '~flag-icon-css/sass/flag-icon.scss'; //@import "~flag-icons/sass/flag-icons.scss";
@import "~select2/dist/css/select2.css"; @import "~select2/dist/css/select2.css";
@import "~bootstrap-daterangepicker/daterangepicker.css"; @import "~bootstrap-daterangepicker/daterangepicker.css";
//@import '~jquery-ui/themes/base/all.css'; //@import '~jquery-ui/themes/base/all.css';

@ -60,7 +60,6 @@
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-vue": "7.20.0", "eslint-plugin-vue": "7.20.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"flag-icon-css": "^4.1.5",
"full-icu": "^1.4.0", "full-icu": "^1.4.0",
"glob-all": "^3.2.1", "glob-all": "^3.2.1",
"graphql": "^15.6.1", "graphql": "^15.6.1",
@ -142,6 +141,7 @@
"copy-webpack-plugin": "9.0.1", "copy-webpack-plugin": "9.0.1",
"deepmerge": "^4.2.2", "deepmerge": "^4.2.2",
"filemanager-webpack-plugin": "^5.0.0", "filemanager-webpack-plugin": "^5.0.0",
"flag-icons": "^6.0.3",
"free-jqgrid": "https://github.com/chamilo/jqGrid.git#bs4", "free-jqgrid": "https://github.com/chamilo/jqGrid.git#bs4",
"graphql-tag": "^2.12.5", "graphql-tag": "^2.12.5",
"node-sass": "6.0.1", "node-sass": "6.0.1",

@ -441,7 +441,6 @@ class Template
//'bootstrap-daterangepicker/daterangepicker.css', //'bootstrap-daterangepicker/daterangepicker.css',
'bootstrap-select/dist/css/bootstrap-select.min.css', 'bootstrap-select/dist/css/bootstrap-select.min.css',
'select2/dist/css/select2.min.css', 'select2/dist/css/select2.min.css',
'flag-icon-css/css/flag-icon.min.css',
'mediaelement/plugins/vrview/vrview.css', 'mediaelement/plugins/vrview/vrview.css',
]; ];

@ -34,18 +34,9 @@
{% if show_language_flag %} {% if show_language_flag %}
<!-- Language flag --> <!-- Language flag -->
<div class="avatar-lm"> <div class="avatar-lm">
{% if user.language %} {% set lang_flags = ['fr', 'de', 'es', 'it', 'pl'] %}
{% if user.language.code == 'fr' %} {% if user.language and user.language.code in lang_flags %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px"> <span class="fi fi-{{ user.language.code }}"></span>
{% elseif user.language.code == 'de' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px">
{% elseif user.language.code == 'es' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px">
{% elseif user.language.code == 'it' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px">
{% elseif user.language.code == 'pl' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px">
{% endif %}
{% endif %} {% endif %}
</div> </div>
<!-- End language flag --> <!-- End language flag -->
@ -55,17 +46,17 @@
{% for item in extra_info %} {% for item in extra_info %}
{% if item.variable == 'langue_cible' %} {% if item.variable == 'langue_cible' %}
{% if item.value == 'French2' %} {% if item.value == 'French2' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px"> <span class="fi fi-fr"></span>
{% elseif item.value == 'German2' %} {% elseif item.value == 'German2' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px"> <span class="fi fi-de"></span>
{% elseif item.value == 'Spanish' %} {% elseif item.value == 'Spanish' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px"> <span class="fi fi-es"></span>
{% elseif item.value == 'Italian' %} {% elseif item.value == 'Italian' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px"> <span class="fi fi-it"></span>
{% elseif item.value == 'Polish' %} {% elseif item.value == 'Polish' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px"> <span class="fi fi-pl"></span>
{% elseif item.value == 'English' %} {% elseif item.value == 'English' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/gb.svg" width="36px"> <span class="fi fi-gb"></span>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}

@ -35,18 +35,9 @@
{% if show_language_flag %} {% if show_language_flag %}
<!-- Language flag --> <!-- Language flag -->
<div class="avatar-lm"> <div class="avatar-lm">
{% if user.language %} {% set lang_flags = ['fr', 'de', 'es', 'it', 'pl'] %}
{% if user.language.code == 'fr' %} {% if user.language and user.language.code in lang_flags %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px"> <span class="fi fi-{{ user.language.code }}"></span>
{% elseif user.language.code == 'de' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px">
{% elseif user.language.code == 'es' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px">
{% elseif user.language.code == 'it' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px">
{% elseif user.language.code == 'pl' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px">
{% endif %}
{% endif %} {% endif %}
</div> </div>
<!-- End language flag --> <!-- End language flag -->
@ -56,17 +47,17 @@
{% for item in extra_info %} {% for item in extra_info %}
{% if item.variable == 'langue_cible' %} {% if item.variable == 'langue_cible' %}
{% if item.value == 'French2' %} {% if item.value == 'French2' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/fr.svg" width="36px"> <span class="fi fi-fr"></span>
{% elseif item.value == 'German2' %} {% elseif item.value == 'German2' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/de.svg" width="36px"> <span class="fi fi-de"></span>
{% elseif item.value == 'Spanish' %} {% elseif item.value == 'Spanish' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/es.svg" width="36px"> <span class="fi fi-es"></span>
{% elseif item.value == 'Italian' %} {% elseif item.value == 'Italian' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/it.svg" width="36px"> <span class="fi fi-it"></span>
{% elseif item.value == 'Polish' %} {% elseif item.value == 'Polish' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/pl.svg" width="36px"> <span class="fi fi-pl"></span>
{% elseif item.value == 'English' %} {% elseif item.value == 'English' %}
<img src="{{ _p.web }}web/assets/flag-icon-css/flags/4x3/gb.svg" width="36px"> <span class="fi fi-gb"></span>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}

Loading…
Cancel
Save