# HG changeset patch # User Tomas Zeman # Date 1547564365 -3600 # Node ID 34d3cc40552c7511d26ea2cd924537f5efebb8b3 # Parent 9ae93aad4b144885515f3f41be6529004a212db2 example5: FA 5.6.3 w/ v4-shims diff -r 9ae93aad4b14 -r 34d3cc40552c example/src/main/scala/example/Example5.scala --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/src/main/scala/example/Example5.scala Tue Jan 15 15:59:25 2019 +0100 @@ -0,0 +1,56 @@ +package example + +import fontawesome.jsdom.FA._ +import org.scalajs.dom +import scalatags.JsDom.all._ + +import scala.scalajs.js.annotation.{JSExport, JSExportTopLevel} + +@JSExportTopLevel("Example5") +object Example5 { + + @JSExport + def main(): Unit = { + val el = dom.document.getElementById("main") + el.innerHTML = "" + el.appendChild(div(cls:="pure-u-1", margin:="1em", + h1("Font awesome demo..."), + h2("Larger icons"), + div(cls:="pure-g", + div(cls:="pure-u-1-5", faCameraRetro.lg, "fa-lg"), + div(cls:="pure-u-1-5", faCameraRetro.x2, "fa-2x"), + div(cls:="pure-u-1-5", faCameraRetro.x3, "fa-3x"), + div(cls:="pure-u-1-5", faCameraRetro.x4, "fa-4x"), + div(cls:="pure-u-1-5", faCameraRetro.x5, "fa-5x") + ), + h2("Fixed width icons (default)"), + div(cls:="pure-u-1", faHome, "Home"), + div(cls:="pure-u-1", faBook, "Library"), + div(cls:="pure-u-1", faPencil, "Applications"), + div(cls:="pure-u-1", faCog, "Settings"), + h2("No fixed width icons"), + div(cls:="pure-u-1", + faWifi.noFw, faWikipediaW.noFw, faWon.noFw, faWordpress.noFw, + faXing.noFw, faYahoo.noFw, faYelp.noFw, faYen.noFw, + faYoast.noFw, faYoutube.noFw), + h2("List icons"), + ul(cls:="fa-ul", + li(faCheckSquare.li, "List icons"), + li(faCheckSquare.li, "can be used"), + li(faSpinner.li.spin, "as bullets"), + li(faSquare.li, "in lists") + ), + h2("Bordered & Pulled Icons"), + div(cls:="pure-u-1-4", + faQuoteLeft.x3.pullLeft.border, + s"""...tomorrow we will run faster, stretch out our arms farther... + And then one fine morning - So we beat on, boats against the + current, borne back ceaselessly into the past."""), + h2("Animated Icons "), + div(cls:="pure-u-1", + faSpinner.x3.spin, faCircleONotch.x3.spin, faRefresh.x3.spin, + faCog.x3.spin, faSpinner.x3.pulse + ) + ).render) + } +} diff -r 9ae93aad4b14 -r 34d3cc40552c example5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example5.html Tue Jan 15 15:59:25 2019 +0100 @@ -0,0 +1,20 @@ + + + + +FA tags example + + + + + + + +
Please run sbt fastOptJS to build the demo. Then reload this page.
+ + + + +