Skip to content
Snippets Groups Projects
Commit f2892596 authored by William Billingsley's avatar William Billingsley
Browse files

moving location

parents
No related branches found
No related tags found
No related merge requests found
FROM openjdk:17-jdk-slim-bullseye
# Install some basic development utilities
RUN apt-get update && apt-get install -y \
curl \
git \
python3 \
zip \
procps \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSL https://deb.nodesource.com/setup_17.x | bash \
&& apt-get install -y nodejs \
&& npm install -g yarn \
&& rm -rf /var/lib/apt/lists/*
# User the Java-based launcher as Alpine Linux and Graal native compiled images of CS don't like
# Alpine Linux (due to musl instead of gcc)
RUN bash -c 'curl -fLo /usr/bin/cs https://git.io/coursier-cli' && \
chmod u+x /usr/bin/cs
# Put Coursier-installed artifacts on the path
ENV PATH="$PATH:/root/.local/share/coursier/bin"
# Get sbt
RUN bash -c 'cs install sbt'
# Get scala-cli
RUN bash -c 'curl -sSLf https://scala-cli.virtuslab.org/get | sh'
# Get http server
RUN bash -c 'npm install -g http-server'
CMD bash
\ No newline at end of file
{
"name": "Doctacular codespace config",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"scala-lang.scala",
// "scalameta.metals",
]
}
}
}
\ No newline at end of file
//> using repository sonatype:snapshots
//> using dep com.wbillingsley::doctacular::0.3.0+3-50b0c032-SNAPSHOT
import com.wbillingsley.veautiful.*
import doctacular.*
import html.*
import installers.*
given marked:Markup = new Markup({ (s:String) => scalajs.js.Dynamic.global.marked.parse(s).asInstanceOf[String] })
val root = mountToBody(HTML.div("Loading..."))
//given HTMLMarkupTransformer = root.installMarked("4.2.5")
//val name = PushValue("")
given styles:StyleSuite = StyleSuite()
val borderedText = Styling(
"""
border: 1px dashed red;
border-radius: 5px;
padding: 5px;
"""
).register()
case class Counter() extends DHtmlComponent {
val toggle = stateVariable(true)
override def render = div(
p("The value is now ", span(^.cls := borderedText, toggle.value.toString)),
button("Toggle it", ^.on.click --> { toggle.value = !toggle.value })
)
}
@main def main =
styles.install()
val deck = DeckBuilder(1280, 720)
.veautifulSlide(
h1("Hello world")
).withClass("center middle")
.markdownSlides("""
|## This is a title
|
|This is some text
|
| * This is a bullet point
|
| 1. This is a numbered list
|
|---
|
|## Here's another slide
|
|With some more text
|
|
|""".stripMargin)
.veautifulSlide(<.div(
<.h2("Here's our counter"),
Counter()
))
.mountToRoot(root)
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<body style="margin: 0;"></body>
<!-- Marked.js, a markdown parser -->
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<!-- Our compiled deck -->
<script src="compiled.js"></script>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment