This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app='angularApp'> | |
<head> | |
<meta name="description" content="angular-intro-11; internationalisation"> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script> | |
<script src="//code.angularjs.org/1.3.2/i18n/angular-locale_da-dk.js"></script> | |
<!--<script src="//code.angularjs.org/1.3.2/i18n/angular-locale_en-gb.js"></script>--> | |
<script src="script.js"> | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"plugins": [ | |
{ | |
"pluginId": "AceJump", | |
"pluginName": "AceJump", | |
"downloadUrl": "https://github.com/johnlindquist/AceJump", | |
"dependencyPluginIds": [ | |
"com.intellij", | |
"com.intellij.modules.platform" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hello world | |
html() | |
.body() | |
.heading(Heading.Level.ONE, "Hello, world!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getMeSomeHtml() { | |
Html html = new Html(); | |
Head head = html.getHead(); | |
head.addMeta("charset", "UTF-8"); | |
head.addMeta("viewport", "width=device-width"); | |
Body body = html.getBody(); | |
body.addParagraph("hello, world!"); | |
body.addHeading(Heading.Level.ONE, "Level one text"); | |
return body.toString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// keep the reference which will allow us to walk through the structure | |
Html html = html(); | |
// creating a meta tag and navigating down the tree | |
html | |
.head() | |
.meta("charset", "UTF-8"); | |
/* | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creating the document, with some headings and a paragraph | |
html | |
.body() | |
.heading(Heading.Level.ONE, "Hello h1") | |
.heading(Heading.Level.TWO, "level 2") | |
.paragraph("Some text in a paragraph goes here"); | |
/* | |
<html> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Html { | |
private Body body = Body.create(this); | |
private Head head = Head.create(this); | |
public static Html html() { return new Html(); } | |
public Head head() { return head; } | |
public Body body() { return body; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.methodicalprogrammer.fluent.htmlgenerator.Html.html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html() | |
.head() | |
.title("Insert page title here."); | |
/* | |
<html> | |
<head> | |
<title>Insert page title here.</title> | |
</head> | |
</html> |