Glavin001 / atom-playlist

(This package is currently not maintained) Queue and play music directly from Atom. (deep in development)
6 stars 0 forks source link

Get Fontawesome Working #11

Closed ddaws closed 10 years ago

ddaws commented 10 years ago

Figure out how to use font awesome within our atom plugin.

Glavin001 commented 10 years ago

Atom exposes atom://my-package-name/my/path automatically.

I would suggest trying to add something like:

@import "../bundle/fontawesome/less/font-awesome.less"
@fa-font-path:   "atom://playlist/bundle/Font-Awesome/fonts"; 

Will need to play around. I have not done this before but I hope it works! Living on the bleeding edge here ;).

ddaws commented 10 years ago

Is @import built in? I have added

require: ->

    wV = atom.workspaceView
    wV.append(util.format '<link rel="stylesheet" type="text/css" href="%s">',
      'atom://components/fontawesome/css/font-awesome.min.css')

To my main file. This method adds the link tag though this does not appear to be working.

Glavin001 commented 10 years ago

@lmport port should be built in to LESS.

Yeah first idea would be to simply add the link element for CSS. Surprised that didn't at least work. Take a look at your developer console (View --> Developer -> toggle Console, I think). If it cannot find the resource, it will error in the JS console.

I had a heck of a hard time getting browser side libraries working with Atom Gitter too. I had a Emojii lib and ended up wrapping it in some crazy Node code to include it. Hopefully Atom releases an official solution for browser side inclusions.

Glavin001 commented 10 years ago

How'd it go, @dreid93 ?

ddaws commented 10 years ago

Didn't work. I have created this thread in the community seeking assistance.

Frozenfire92 commented 10 years ago

I'm pretty sure atom default uses Octicons, could we use these too?

ddaws commented 10 years ago

I didn't realise Octicons was the default. I support using Octicons over FA.

Glavin001 commented 10 years ago

Gah. Oh well, got FA working. Learning experience. Octicons look nice though.