Devicon support ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Devicon support ?

aalmiray
Hi guys,

Did you notice http://vorillaz.github.io/devicons/ provides useful icos for most of the languages that Asciidoctor supports/understands in source blocks? Wouldn't it be great to be able to display a language icon next to/instead of the text hint (html5 backend) when hovering over a source block?

WDYT?
Reply | Threaded
Open this post in threaded view
|

Re: Devicon support ?

mojavelinux
Administrator
Brilliant. This is actually very doable today even with a docinfo.html file. The words are currently added using CSS, keyed off the language in the CSS class. If you can sort out the CSS, we can push this in when font icons are enabled perhaps.

```css
.listingblock:hover code[class*=" language-"]:before {
    text-transform: uppercase;
    font-size: 0.9em;
    color: #999;
    position: absolute;
    top: 0.375em;
    right: 0.375em;
}
.listingblock:hover code.asciidoc:before { content: "asciidoc"; }
.listingblock:hover code.clojure:before { content: "clojure"; }
.listingblock:hover code.css:before { content: "css"; }
.listingblock:hover code.go:before { content: "go"; }
.listingblock:hover code.groovy:before { content: "groovy"; }
...
```


-Dan


On Wed, Jul 30, 2014 at 4:00 PM, aalmiray [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi guys,

Did you notice http://vorillaz.github.io/devicons/ provides useful icos for most of the languages that Asciidoctor supports/understands in source blocks? Wouldn't it be great to be able to display a language icon next to/instead of the text hint (html5 backend) when hovering over a source block?

WDYT?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Devicon-support-tp1942.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Ted
Reply | Threaded
Open this post in threaded view
|

Re: Devicon support ?

Ted
In reply to this post by aalmiray
+1
- Ted @TedAtCIS