how to import and use Fontello in vue/nuxt project - vue.js

so i have my svg image which i want to convert it to icon using Fontello to convert and import it to my nuxt project. but the configuration doesn't seem to work
this is what in my nuxt.config.js file
head: {
css: [
'~/assets/css/main.css',
'~/assets/css/animation.css',
'~/assets/css/fontello.css',
'~/assets/css/fontello-ie7.css',
'~/assets/css/fontello-ie7-codes.css', /*if IE 7 */
],
}
in my html page, i'm using
<i #click="goToChat" class="the-icons demo-icon icon-chat menu ic-menu"></i>
and my css file,
.demo-icon {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: 0.2em;
text-align: center;
font-variant: normal;
text-transform: none;
line-height: 1em;
margin-left: 0.2em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
the problem is the css file counldn't read font-family: "fontello"; did i config it wrong?

Stumble on the same issue just tonight and searched how to do it, I tried your config and it works..
Have you also imported the font folder provided by fontello which contains the actual font?
If you open the fontello.css file you will see the #font-face property with url reference to thos font files make sure the url is the right one (easiest solution is to import font and css folder from fontello.zip) so that your assets foolder looks something like that
Assets
- css
- font
- images

Related

How to allow wordwrap for labels in tab-bar (QTabbar) in qpdfview?

I have documents with long titles and would like them to appear with its full name in the tabbar in qpdfview.
I researched a lot and found that QT has the functionality to allow stylesheet. I looked in the documentation and found no propriety that allows word wrap for title names of the pdf files.
The stylesheet are located in ~/.config/qpdfview/qpdfview.conf, under [mainWindow] I put
styleSheet="QTabBar::tab { font-size: 12px; margin: 0px; padding: 0px; border: 1px; max-width: 120px; }\nQTabBar::tab:selected, QTabBar::tab:hover { font-size: 12px; background-color: coral; min-height: 24px; titlebar-show-tooltips-on-buttons: true; text-align: right; }"
I'm looking for something that is impossible? Then I have to try to change what are shown in the label of the tabbar.

How to remove white space over the bootstrap navigation bar in vue js?

i've just created new component with navbar code within:
<template>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark static-top">
.....
</template>
and my index.html without any changes.
I've tried to make changes based on my googling results, actually set my own style to nav tag didn't help.
If you are using VUE CLI then in you App.vue there will be a style block like this
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
because of this margin-top: 60px this white space is there. Vue CLI provides this default styling for their default components, you can remove it.
I hope this helps
So use this in App.vue, reasons to set the default for the web base
<style>
* {
padding: 0px;
margin: 0px;
box-sizing: border-box;
}
</style>

Where does <style id="shopify-dynamic-checkout"> come from and how can I override it?

I am styling a Shopify site for the first and using the Minimalist theme as a base. I want to style the shopify-payment-button (But it now) button but have not been able to. I noticed looking that the page source code there is:
<style id="shopify-dynamic-checkout">
.shopify-payment-button__button--hidden {
visibility: hidden;
}
.shopify-payment-button__button {
border-radius: 4px;
border: none;
box-shadow: 0 0 0 0 transparent;
color: white;
cursor: pointer;
display: block;
font-size: 1em;
font-weight: 500;
line-height: 1;
text-align: center;
width: 100%;
transition: background 0.2s ease-in-out;
}
//etc, etc
being injected into the <head> which is overriding my styles. I can't find where this comes from to remove it. Would anyone know how?
Shopify injects styles and js for some elements on site inside {{ content_for_header }}, which you will find in theme.liquid file.
This tag contains default shopify files as well as files for some integrations and apps. For example if you install facebook pixel through shopify, the code for it will go to {{ content_for_header }}
It is not possible to control what goes to this tag directly. If you just need to change styling then I recommend to just overwrite styles, in worst case if you need to, use"!important" tag in css

How to stop/handle random HTML popup during test execution - Selenium Webdriver

I'm hoping someone would be able to help me with my query. I've done quite a bit of research online and haven't found any particular solution to it yet.
While running my test case, I sometimes encounter an HTML popup that I'm unable to handle in my script. It is very random (well based on customer behaviour while they are traversing the site) and can popup at any time during the customer journey. Sometimes it doesn't popup at all. When it appears only then an entry is visible inside the DOM.
Basically, it is a livechat window (LivePerson to be precise) suggesting customers that an agent is available to help them complete their order if they wish to do so.
Here is a screenshot:
popup screenshot
The below is available in Firebug when I inspect the element:
<div id="LPMcontainer-1483053256847-0" class="LPMcontainer LPMoverlay" style="margin: -143px 0px 0px -285px; padding: 0px; border-style: solid; border-width: 0px; outline-color: rgb(106, 159, 177); outline-width: 2px; font-style: normal; font-weight: normal; font-variant: normal; list-style: outside none none; letter-spacing: normal; line-height: normal; text-decoration: none; vertical-align: baseline; white-space: normal; word-spacing: normal; background-repeat: repeat-x; background-position: left bottom; background-color: transparent; border-color: transparent; width: 571px; height: 287px; cursor: pointer; display: block; z-index: 107158; position: fixed; top: 50%; bottom: auto; left: 50%; right: auto;">
<div role="button" tabindex="0"><img src="https://www./content/dam/tcom/apps/live-person/live-person-chat-bundles-top.jpg" id="LPMimage-1483053256849-2" alt="" class="LPMimage" style="margin: 0px; padding: 0px; border-style: none; border-width: 0px; outline-color: rgb(106, 159, 177); outline-width: 2px; font-style: normal; font-weight: normal; font-variant: normal; list-style: outside none none; letter-spacing: normal; line-height: normal; text-decoration: none; vertical-align: baseline; white-space: normal; word-spacing: normal; position: absolute; z-index: 600; left: 0px; top: 0px;">
</div>
<img src="https://www./content/dam/tcom/apps/live-person/live-person-chat-bottom.jpg" id="LPMcloseButton-1483053256847-1" alt="" class="LPMcloseButton" style="margin: 0px; padding: 0px; border-style: none; border-width: 0px; outline-color: rgb(106, 159, 177); outline-width: 2px; font-style: normal; font-weight: normal; font-variant: normal; list-style: outside none none; letter-spacing: normal; line-height: normal; text-decoration: none; vertical-align: baseline; white-space: normal; word-spacing: normal; position: absolute; cursor: pointer; z-index: 9999; left: 0px; top: 194px;" data-lp-event="close" role="button" tabindex="0">
</div>
It appears in all browsers.
I'd like to handle it in either of the following ways:
Stop it from loading at all (again due to random nature ).
OR
While the script is being executed, as soon as the window appears, it presses 'No thanks' button (id="LPMcloseButton-1483053256847-1" in the above code) and then continue executing the rest of the steps. Please note that id is dynamic in nature, i.e it's unique every time.
Your help would be highly appreciated.
It may not be random. Some sites that I write automation for have something like this also. After some investigation I found that the dialog always popped up after 30 seconds... it just seemed random because I could be on any page when the 30s was up. After more investigation I found that the site looked for a cookie and if it wasn't found, the dialog would be triggered. I found the cookie that was created after the dialog was closed and created it at the start of the script so that it would no longer open.
I would suggest that you look for an existing cookie that was created for that site and see what's in it. Then browse to the site, wait for the dialog to pop up, and close it. See what changes... if the cookie changes or a new cookie is added, etc. then just mimic that behavior before browsing the site.
NOTE: In my case, I had to intentionally browse to a missing page on the domain, e.g. somesite.com/someerrorpage, to create the cookie without the timer starting. Then I just navigated to the site and continued the script.
I'd say the easiest way to get around this is to create a webdriver wrapper that for every call you would send to webdriver, first check if the dialog is present. If it's present, close it, otherwise send the action over to webdriver.

Icon font in Rails App not loading

I am trying to include a custom font in my rails app as an icon font. (I'm using font-awesome)
The fonts are loading but the preview is completely incorrect: http://cl.ly/image/3x0g3X3k3X3S. (I think this means the asset-path is correct.)
You can also see here in the network view that the fonts appear to be coming in:
http://cl.ly/image/0y0R171S0l3L
In the HTML - when I try a I can see all the correct CSS properties that should apply but the icon renders as a empty square which I believe is the missing character default.
Please let me know if I can provide more information. Any help would be awesome!
I've also been struggling on those lines and have the following that works
In assets/fonts put fontawesome-webfont.eot, ttf, and woff files
In your css file put the following code (substitute iconmoon for fontawesome
#font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot');
src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),
url('fonts/icomoon.woff') format('woff'),
url('fonts/icomoon.ttf') format('truetype'),
url('fonts/icomoon.svg#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[data-icon]:before {
font-family: 'icomoon';
content: attr(data-icon);
speak: none;
font-weight: normal;
font-size: 16px;
line-height: 16px;
line-height: 1;
-webkit-font-smoothing: antialiased;
}
In your erb use the following, substitute xe04b for the image you want to use
<div class="fs1" aria-hidden="true" data-icon=""></div>
hope that helps?