diff options
author | Jan Christopher Vogt <oss.nsp@cvogt.org> | 2017-04-02 15:07:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-02 15:07:41 -0400 |
commit | a40300405524c0b4f8bf5959ec06e3fe1e93837f (patch) | |
tree | 92807a01d9dd62fccd9903e18ce8765960c91603 /examples/scalatex-example | |
parent | 50f4b1778d9ba3de15433d710d2e61cd1a73337a (diff) | |
parent | cf2c37852a925eb3a31d237bfe00730d8e687686 (diff) | |
download | cbt-a40300405524c0b4f8bf5959ec06e3fe1e93837f.tar.gz cbt-a40300405524c0b4f8bf5959ec06e3fe1e93837f.tar.bz2 cbt-a40300405524c0b4f8bf5959ec06e3fe1e93837f.zip |
Merge pull request #477 from cvogt/scalatex
Add Scalatex plugin
Diffstat (limited to 'examples/scalatex-example')
-rw-r--r-- | examples/scalatex-example/Foo.scala | 4 | ||||
-rw-r--r-- | examples/scalatex-example/docs/build/build.scala | 14 | ||||
-rw-r--r-- | examples/scalatex-example/docs/readme.scalatex | 21 | ||||
-rw-r--r-- | examples/scalatex-example/docs/static/style.css | 32 |
4 files changed, 71 insertions, 0 deletions
diff --git a/examples/scalatex-example/Foo.scala b/examples/scalatex-example/Foo.scala new file mode 100644 index 0000000..e8bfc40 --- /dev/null +++ b/examples/scalatex-example/Foo.scala @@ -0,0 +1,4 @@ +package cbt_example.scalatex +object Foo{ + def foo(i: Int, j: Int) = i * j + i * j +} diff --git a/examples/scalatex-example/docs/build/build.scala b/examples/scalatex-example/docs/build/build.scala new file mode 100644 index 0000000..51b158f --- /dev/null +++ b/examples/scalatex-example/docs/build/build.scala @@ -0,0 +1,14 @@ +package cbt_examples.scalatex_example_build +import cbt._ +import java.io._ +import java.nio.file._ +import java.nio.file.attribute._ +class Build(val context: Context) extends Scalatex{ + override def dependencies = super.dependencies ++ Seq( + DirectoryDependency( projectDirectory / ".." ) + ) + override def run = { + scalatex.apply + super.run + } +} diff --git a/examples/scalatex-example/docs/readme.scalatex b/examples/scalatex-example/docs/readme.scalatex new file mode 100644 index 0000000..11f432e --- /dev/null +++ b/examples/scalatex-example/docs/readme.scalatex @@ -0,0 +1,21 @@ +@import scalatags.Text.all._ +@h1("cbt.http.client") +@p + @ul + @li + http client library + @li + super simple and easy to use + @li + type-safe and resource-leak-safe + @li + no dependencies besides JDK + @li + complete (offers everything @pre(`class`:="inline"){java.net.URLConnection} does) + @repl + cbt_example.scalatex.Foo.foo(1,2) + +@comment{ + @h3 + Usage example +}
\ No newline at end of file diff --git a/examples/scalatex-example/docs/static/style.css b/examples/scalatex-example/docs/static/style.css new file mode 100644 index 0000000..36547e0 --- /dev/null +++ b/examples/scalatex-example/docs/static/style.css @@ -0,0 +1,32 @@ +@import url('https://fonts.googleapis.com/css?family=Muli'); +body{ + font-family: 'Muli', sans-serif; + width: 600px; + left: 50%; + margin-left: -300px; + position: absolute; +} + +h1, h2, h3, h4, h5, h6{ + color: #007bbf; +} + +.path-readme li{ + font-size: 30px; +} + +pre{ + display: block; + border-top: 0px; + border-bottom: 0px; + border-left: 0; + border-right: 0; + border-color: #007bbf; + border-style: solid; + padding: 5px 0; +} + +pre.inline{ + display: inline; + border: 0; +} |