Introduced classes

Redefined classes

redef class Sys

html :: html_page $ Sys

The main class of the program.

All class definitions

redef class Sys

html :: html_page $ Sys

The main class of the program.
package_diagram html::html_page html_page html html html::html_page->html template template html->template core core html->core ...template ... ...template->template ...core ... ...core->core a_star-m a_star-m a_star-m->html::html_page

Ancestors

module abstract_collection

core :: abstract_collection

Abstract collection classes and services.
module abstract_text

core :: abstract_text

Abstract class for manipulation of sequences of characters
module array

core :: array

This module introduces the standard array structure.
module bitset

core :: bitset

Services to handle BitSet
module bytes

core :: bytes

Services for byte streams and arrays
module circular_array

core :: circular_array

Efficient data structure to access both end of the sequence.
module codec_base

core :: codec_base

Base for codecs to use with streams
module codecs

core :: codecs

Group module for all codec-related manipulations
module collection

core :: collection

This module define several collection classes.
module core

core :: core

Standard classes and methods used by default by Nit programs and libraries.
module environ

core :: environ

Access to the environment variables of the process
module error

core :: error

Standard error-management infrastructure.
module exec

core :: exec

Invocation and management of operating system sub-processes.
module file

core :: file

File manipulations (create, read, write, etc.)
module fixed_ints

core :: fixed_ints

Basic integers of fixed-precision
module fixed_ints_text

core :: fixed_ints_text

Text services to complement fixed_ints
module flat

core :: flat

All the array-based text representations
module gc

core :: gc

Access to the Nit internal garbage collection mechanism
module hash_collection

core :: hash_collection

Introduce HashMap and HashSet.
module iso8859_1

core :: iso8859_1

Codec for ISO8859-1 I/O
module kernel

core :: kernel

Most basic classes and methods.
module list

core :: list

This module handle double linked lists
module math

core :: math

Mathematical operations
module native

core :: native

Native structures for text and bytes
module numeric

core :: numeric

Advanced services for Numeric types
module protocol

core :: protocol

module queue

core :: queue

Queuing data structures and wrappers
module range

core :: range

Module for range of discrete objects.
module re

core :: re

Regular expression support for all services based on Pattern
module ropes

core :: ropes

Tree-based representation of a String.
module sorter

core :: sorter

This module contains classes used to compare things and sorts arrays.
module stream

core :: stream

Input and output streams of characters
module text

core :: text

All the classes and methods related to the manipulation of text entities
module time

core :: time

Management of time and dates
module union_find

core :: union_find

union–find algorithm using an efficient disjoint-set data structure
module utf8

core :: utf8

Codec for UTF-8 I/O

Parents

module html

html :: html

HTML output facilities

Children

module a_star-m

a_star-m

module html_page is example

import html

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

var page = new NitHomepage
page.write_to stdout
page.write_to_file("nit.html")
lib/html/examples/html_page.nit:15,1--107,30