Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: How to add roboto font using npm?

maksam07 free asked 1 year ago


Hi. Why when using npm you don't inform how to add roboto font and font awesome library, which is mentioned when using cdn?

CDN:

<!-- Font Awesome -->
<link
  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
  rel="stylesheet"
/>
<!-- Google Fonts -->
<link
  href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
  rel="stylesheet"
/>
<!-- MDB -->
<link
  href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/6.4.2/mdb.min.css"
  rel="stylesheet"
/>

I had to look up the instructions separately. It turned out to be not difficult, but still. Those who haven't read about the cdn version may not know that you need to add other fonts as well


Kamila Pieńkowska staff answered 1 year ago


Thanks for the suggestion we will consider adding this to our documentation.


maksam07 free commented 1 year ago

Another feature I've noticed when working with the webpack is jquery. You have a check going on to see if jquery is connected by validation: window.jQuery&&!document.body.hasAttribute("data-mdb-no-jquery")

But by default window object is not populated by jquery and even if you manually do something like this: import $ from 'jquery'; window.jQuery = $ import * as mdb from 'mdb-ui-kit';

That won't work either. I found a solution using expose-loader. Why him if there are other options? I answer - I don't need jquery to be plugged in for the whole project, but only in certain files, and this module seems to do the job perfectly. This is worth adding to the documentation too, as I had to refer to dozens of google pages to solve these problems



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 6.4.2
  • Device: PC
  • Browser: Chrome
  • OS: Kubuntu
  • Provided sample code: No
  • Provided link: No