// Generated by moonbit-community/embed from templates.
///|
let _embed_main_mbt : String =
#|using @html {a, button, div, h1, h2, li, text, ul}
#|using @rabbita {type Val, type Html}
#|
#|enum Msg {
#| Clicked
#|}
#|
#|fn app() -> Val[Html] {
#| let (count, emit) = @rabbita.create_pure_state(0, update=fn(count, msg) {
#| match msg {
#| Clicked => count + 1
#| }
#| })
#|
#| count.view(count => {
#| div(class="app") <| [
#| h1(class="title", "Hello Rabbita"),
#| div(class="lead", "You built it successfully!"),
#| button(
#| class="click-btn",
#| on_click=emit(Clicked),
#| "You clicked \{count} times",
#| ),
#| div(class="next") <| [
#| h2(class="next-title", "What's next"),
#| ul(class="next-list") <| [
#| li(
#| "Edit a MoonBit file while the dev server runs for instant refresh.",
#| ),
#| li <| [
#| text("Explore "),
#| a(
#| class="inline-link",
#| target=Blank,
#| href="https://github.com/moonbit-community/rabbita",
#| "tutorials and examples",
#| ),
#| ],
#| ],
#| ],
#| ]
#| })
#|}
#|
#|fn main {
#| @rabbita.new(app).mount("app")
#|}
#|
///|
let _embed_moon_pkg : String =
#|import {
#| "moonbit-community/rabbita",
#| "moonbit-community/rabbita/html",
#|}
#|
#|supported_targets = "js"
#|
#|pkgtype(kind: "executable")
#|
///|
let _embed_index_html : String =
#|
#|
#|
#|
#|
#| __WARREN_PROJECT_NAME__
#|
#|
#|
#|
#|
#|
#|
///|
let _embed_styles_css : String =
#|@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&display=swap");
#|
#|* {
#| box-sizing: border-box;
#|}
#|
#|body {
#| margin: 0;
#| min-height: 100vh;
#| color: #171717;
#| font-family: "Manrope", "Avenir Next", "Trebuchet MS", sans-serif;
#| background:
#| radial-gradient(980px 460px at 8% -10%, rgba(255, 143, 184, 0.22), transparent 72%),
#| radial-gradient(1060px 560px at 100% -14%, rgba(255, 184, 219, 0.18), transparent 70%),
#| #f7f9ff;
#|}
#|
#|#app {
#| padding: 112px 20px 68px;
#|}
#|
#|.app {
#| max-width: 700px;
#| margin: 0 auto;
#| text-align: center;
#|}
#|
#|.title {
#| margin: 0;
#| font-size: clamp(2.15rem, 6vw, 3.2rem);
#| line-height: 1.03;
#|}
#|
#|.lead {
#| margin: 12px 0 0;
#| color: #6b7280;
#| font-size: 1.02rem;
#|}
#|
#|.click-btn {
#| display: block;
#| width: fit-content;
#| margin: 24px auto 0;
#| padding: 12px 18px;
#| border: 1px solid #0f0f0f;
#| border-radius: 999px;
#| color: #fff;
#| background: #111;
#| font: inherit;
#| font-weight: 700;
#| cursor: pointer;
#| transition: transform 120ms ease, opacity 120ms ease;
#|}
#|
#|.click-btn:hover {
#| transform: translateY(-1px);
#| opacity: 0.95;
#|}
#|
#|.next {
#| max-width: 560px;
#| margin: 140px auto 0;
#| color: #6b7280;
#| font-size: 0.95rem;
#|}
#|
#|.next-title {
#| margin: 0;
#| font-size: 1.25rem;
#|}
#|
#|.next-list {
#| display: inline-block;
#| margin: 12px auto 0;
#| padding-left: 20px;
#| line-height: 1.65;
#| text-align: left;
#|}
#|
#|.inline-link {
#| color: inherit;
#| text-decoration-color: #9ca3af;
#| text-underline-offset: 3px;
#|}
#|
#|@media (max-width: 640px) {
#| #app {
#| padding-top: 28px;
#| }
#|}
#|
///|
let _embed_moon_mod : String =
#|name = "local/__WARREN_PROJECT_NAME__"
#|
#|version = "0.1.0"
#|
#|import {
#| "moonbit-community/rabbita@__RABBITA_VERSION__",
#|}
#|
#|readme = "README.md"
#|
#|repository = ""
#|
#|license = "Apache-2.0"
#|
#|keywords = [ ]
#|
#|description = "A Rabbita app generated by Warren."
#|
#|preferred_target = "js"
#|
///|
let _embed_readme_md : String =
#|# __WARREN_PROJECT_NAME__
#|
#|## Run in development
#|
#|In this directory:
#|
#|```sh
#|warren dev
#|```
#|
#|Then open the local URL shown by warren.
#|
///|
let _embed_main_mbt_2 : String =
#|using @rabbita { type Val, type Html }
#|using @html { button, div, h1 }
#|
#|enum Msg {
#| Inc
#| Dec
#|}
#|
#|fn app() -> Val[Html] {
#| let (model, emit) = @rabbita.create_pure_state(
#| 0,
#| update=fn(model, msg) {
#| match msg {
#| Inc => model + 1
#| Dec => model - 1
#| }
#| },
#| )
#|
#| model.view(model => div(class="app") <| [
#| h1("\{model}"),
#| div(class="actions") <| [
#| button(on_click=emit(Dec), "-"),
#| button(on_click=emit(Inc), "+"),
#| ],
#| ])
#|}
#|
#|fn main {
#| @rabbita.new(app).mount("app")
#|}
#|
///|
let _embed_moon_mod_2 : String =
#|name = "local/__WARREN_PROJECT_NAME__"
#|
#|version = "0.1.0"
#|
#|import {
#| "moonbit-community/rabbita@__RABBITA_VERSION__",
#|}
#|
#|readme = "README.md"
#|
#|repository = ""
#|
#|license = "Apache-2.0"
#|
#|keywords = [ ]
#|
#|description = "A Rabbita app generated by Warren."
#|
#|preferred_target = "js"
#|
///|
let _embed_moon_pkg_2 : String =
#|import {
#| "moonbit-community/rabbita",
#| "moonbit-community/rabbita/html",
#|}
#|
#|supported_targets = "js"
#|
#|pkgtype(kind: "executable")
#|
///|
pub struct TemplatesFixture {
default : DefaultFixture
minimized : MinimizedFixture
}
///|
pub struct DefaultFixture {
main : MainFixture
public : PublicFixture
moon_mod : String
readme_md : String
}
///|
pub struct MainFixture {
main_mbt : String
moon_pkg : String
}
///|
pub struct PublicFixture {
index_html : String
styles_css : String
}
///|
pub struct MinimizedFixture {
main_mbt : String
moon_mod : String
moon_pkg : String
}
///|
pub let templates : TemplatesFixture = {
default: {
main: {
main_mbt: _embed_main_mbt,
moon_pkg: _embed_moon_pkg,
},
public: {
index_html: _embed_index_html,
styles_css: _embed_styles_css,
},
moon_mod: _embed_moon_mod,
readme_md: _embed_readme_md,
},
minimized: {
main_mbt: _embed_main_mbt_2,
moon_mod: _embed_moon_mod_2,
moon_pkg: _embed_moon_pkg_2,
},
}