html :: NitHomepage
html :: NitHomepage :: defaultinit
html $ NitHomepage :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
html :: HTMLPage :: defaultinit
core :: Writable :: defaultinit
html :: NitHomepage :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Writable :: write_to_bytes
Likewrite_to
but return a new Bytes (may be quite large)
core :: Writable :: write_to_file
Likewrite_to
but take care of creating the file
core :: Writable :: write_to_string
Likewrite_to
but return a new String (may be quite large).
class NitHomepage
super HTMLPage
redef fun head do
add("meta").attr("charset", "utf-8")
add("title").text("Nit")
add("link").attr("rel", "icon").attr("href", "http://nitlanguage.org/favicon.ico").attr("type", "image/x-icon")
add("link").attr("rel", "stylesheet").attr("href", "http://nitlanguage.org/style.css").attr("type", "text/css")
add("link").attr("rel", "stylesheet").attr("href", "http://nitlanguage.org/local.css").attr("type", "text/css")
end
redef fun body do
open("article").add_class("page")
open("section").add_class("pageheader")
add_html("<a id='toptitle_first' class='toptitle'>the</a><a id='toptitle_second' class='toptitle' href=''>Nit</a><a id='toptitle_third' class='toptitle' href=''>Programming Language</a>")
open("header").add_class("header")
open("div").add_class("topsubtitle")
add("p").text("A Fun Language for Serious Programming")
close("div")
close("header")
close("section")
open("div").attr("id", "pagebody")
open("section").attr("id", "content")
add("h1").text("# What is Nit?")
add("p").text("Nit is an object-oriented programming language. The goal of Nit is to propose a robust statically typed programming language where structure is not a pain.")
add("p").text("So, what does the famous hello world program look like, in Nit?")
add_html("<pre><tt><span class='normal'>print </span><span class='string'>'Hello, World!'</span></tt></pre>")
add("h1").text("# Feature Highlights")
add("h2").text("Usability")
add("p").text("Nit's goal is to be usable by real programmers for real projects")
open("ul")
open("li")
add("a").attr("href", "http://en.wikipedia.org/wiki/KISS_principle").text("KISS principle")
close("li")
add("li").text("Script-like language without verbosity nor cryptic statements")
add("li").text("Painless static types: static typing should help programmers")
add("li").text("Efficient development, efficient execution, efficient evolution.")
close("ul")
add("h2").text("Robustness")
add("p").text("Nit will help you to write bug-free programs")
open("ul")
add("li").text("Strong static typing")
add("li").text("No more NullPointerException")
close("ul")
add("h2").text("Object-Oriented")
add("p").text("Nit's guideline is to follow the most powerful OO principles")
open("ul")
open("li")
add("a").attr("href", "./everything_is_an_object/").text("Everything is an object")
close("li")
open("li")
add("a").attr("href", "./multiple_inheritance/").text("Multiple inheritance")
close("li")
open("li")
add("a").attr("href", "./refinement/").text("Open classes")
close("li")
open("li")
add("a").attr("href", "./virtual_types/").text("Virtual types")
close("li")
close("ul")
add("h1").text("# Getting Started")
add("p").text("Get Nit from its Git repository:")
add_html("<pre><code>$ git clone http://nitlanguage.org/nit.git</code></pre>")
add("p").text("Build the compiler (may be long):")
add_html("<pre><code>$ cd nit\n")
add_html("$ make</code></pre>")
add("p").text("Compile a program:")
add_html("<pre><code>$ bin/nitc examples/hello_world.nit</code></pre>")
add("p").text("Execute the program:")
add_html("<pre><code>$ ./hello_world</code></pre>")
close("section")
close("div")
close("article")
end
end
lib/html/examples/html_page.nit:19,1--103,3