java中up_Jiccup是一个受Hiccup发用于在Java中展示HTML

Jiccup

Jiccup is a Hiccup-inpsired library for representing HTML in Java.

Warning: This project is still in an experimental phase.

Requirements

Java 1.8+

Install

com.creactiviti

jiccup

0.0.1-SNAPSHOT

maven-snapshots

http://oss.sonatype.org/content/repositories/snapshots

default

false

true

Syntax

Hello World

Here is a basic example of Jiccup's syntax:

import static com.creactiviti.jiccup.Elements.*;

...

html (

body(

h1(content("Hello World"))

)

);

Which will render the following HTML:

Hello World

Bootstrap Example

import static com.creactiviti.jiccup.Elements.*;

...

html (

head (

stylesheet("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"),

stylesheet("/starter-template.css"),

title("Starter Template for Bootstrap")

),

body(

nav(

css("navbar","navbar-inverse","navbar-fixed-top"),

div(

css("container"),

div(

css("navbar-header"),

button(css("navbar-toggle","collapsed"),span(css("sr-only"),content("Toggle navigation")),attr("type", "button")),

a(href("/"),content("Project name"),css("navbar-brand"))

),

div(

id("navbar"),

css("collapse","navbar-collapse"),

ul(

css("nav","navbar-nav"),

li(a(href("/"),css("active"),content("Home"))),

li(a(href("#about"),content("About"))),

li(a(href("#contact"),content("Contact")))

)

)

)

)

div(

css("container"),

div(css("starter-template"),

h1(content("Bootstrap starter template")),

p(css("lead"),content("Use this document as a way to quickly start any new project.
All you get is this text and a mostly barebones HTML document."))

)

)

)

)

Which renders bootstrap's starter template.

Spring Integration

License

Jiccup is released under version 2.0 of the Apache License.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值