Service used to render the content of the template.

Do nothing by default but subclasses should put all their specific templating code in this method to regroup and simplify their logic

Note: to avoid inconsistencies, the template is automatically frozen (see freeze) after the invocation of rendering.

Property definitions

template $ Template :: rendering
	# Service used to render the content of the template.
	#
	# Do nothing by default but subclasses should put all their specific
	# templating code in this method to regroup and simplify their logic
	#
	# Note: to avoid inconsistencies, the template is automatically frozen
	# (see `freeze`) after the invocation of `rendering`.
	protected fun rendering do end
lib/template/template.nit:88,2--95,31

gen_nit $ NitModule :: rendering
	redef fun rendering
	do
		var header = header
		if header != null then add header

		var name = name
		if annotations.is_empty then
			add "module {name}\n\n"
		else
			add "module {name} is\n"
			for annotation in annotations do add "\t{annotation}\n"
			add "end\n\n"
		end

		for i in imports do
			if i.to_s.has("import ") then
				add i
			else
				add "import "
				add i
			end
			add "\n"
		end
		add "\n"

		for l in content do
			add l
			add "\n"
		end
	end
lib/gen_nit/gen_nit.nit:68,2--97,4

template $ TemplateMacro :: rendering
	# Render `replacement` or else `name`.
	redef fun rendering do
		if is_replaced then
			add replacement.as(not null)
		else
			add "%{name}%"
		end
	end
lib/template/macro.nit:294,2--301,4

template $ TmplComposer :: rendering
	redef fun rendering do add "- {name}\n"
lib/template/examples/tmpl_composer.nit:60,2--40

nitc $ PbxprojectTemplate :: rendering
	redef fun rendering
	do
		add """
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 46;
	objects = {

/* Begin PBXBuildFile section */
"""

		# List build files (compilable sources and assets) with their reference UUID
		for array in [source_files, asset_files] do for file in array do add """
		{{{file.build_uuid}}} /* {{{file.doc}}} */ = {
			isa = PBXBuildFile;
			fileRef = {{{file.ref_uuid}}} /* {{{file.doc}}} */;
			};
"""

		add """
		0F4688411FDF8748004F34D4 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 0F4688401FDF8748004F34D4 /* assets */; };
		0FDD07A21C6F8E0E006FF70E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0FDD07A11C6F8E0E006FF70E /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
	/* Static generated files */
		AF9F83CC1A5F0D21004B62C0 /* {{{name}}}.app */ = {
			isa = PBXFileReference;
			explicitFileType = wrapper.application;
			includeInIndex = 0;
			path = {{{name}}}.app;
			sourceTree = BUILT_PRODUCTS_DIR;
			};
		AF9F83D01A5F0D21004B62C0 /* Info.plist */ = {
			isa = PBXFileReference;
			lastKnownFileType = text.plist.xml;
			path = Info.plist;
			sourceTree = "<group>";
			};
		AF9F83DE1A5F0D21004B62C0 /* Base */ = {
			isa = PBXFileReference;
			lastKnownFileType = file.storyboard;
			name = Base;
			path = Base.lproj/Main.storyboard;
			sourceTree = "<group>";
			};
		AF9F83E01A5F0D21004B62C0 /* Images.xcassets */ = {
			isa = PBXFileReference;
			lastKnownFileType = folder.assetcatalog;
			path = Images.xcassets;
			sourceTree = "<group>";
			};
		AF9F83E31A5F0D21004B62C0 /* Base */ = {
			isa = PBXFileReference;
			lastKnownFileType = file.xib;
			name = Base;
			path = Base.lproj/LaunchScreen.xib;
			sourceTree = "<group>";
			};

	/* Changing generated files */
"""
		# Describe all known files
		for file in files do add file.description

		add """
		0F4688401FDF8748004F34D4 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = {{{name}}}/assets; sourceTree = SOURCE_ROOT; };
		0FDD07A11C6F8E0E006FF70E /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		AF9F83C91A5F0D21004B62C0 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		AF9F83C31A5F0D21004B62C0 = {
			isa = PBXGroup;
			children = (
				AF9F83CE1A5F0D21004B62C0 /* {{{name}}} */,
				AF9F83CD1A5F0D21004B62C0 /* Products */,
				0FDD07A11C6F8E0E006FF70E /* LaunchScreen.storyboard */,
			);
			sourceTree = "<group>";
		};
		AF9F83CD1A5F0D21004B62C0 /* Products */ = {
			isa = PBXGroup;
			children = (
				AF9F83CC1A5F0D21004B62C0 /* {{{name}}}.app */,
			);
			name = Products;
			sourceTree = "<group>";
		};
		AF9F83CE1A5F0D21004B62C0 /* {{{name}}} */ = {
			isa = PBXGroup;
			children = (
				0F4688401FDF8748004F34D4 /* assets */,
"""
			# Reference all known files
			for file in files do add """
				{{{file.ref_uuid}}} /* {{{file.doc}}} */,
"""

		add """
			);
			path = {{{name}}};
			sourceTree = "<group>";
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		AF9F83CB1A5F0D21004B62C0 /* {{{name}}} */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = AF9F83F31A5F0D21004B62C0 /* Build configuration list for PBXNativeTarget "{{{name}}}" */;
			buildPhases = (
				AF9F83C81A5F0D21004B62C0 /* Sources */,
				AF9F83C91A5F0D21004B62C0 /* Frameworks */,
				AF9F83CA1A5F0D21004B62C0 /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = {{{name}}};
			productName = {{{name}}};
			productReference = AF9F83CC1A5F0D21004B62C0 /* {{{name}}}.app */;
			productType = "com.apple.product-type.application";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		AF9F83C41A5F0D21004B62C0 /* Project object */ = {
			isa = PBXProject;
			attributes = {
				LastUpgradeCheck = 0610;
				TargetAttributes = {
					AF9F83CB1A5F0D21004B62C0 = {
						CreatedOnToolsVersion = 6.1.1;
					};
				};
			};
			buildConfigurationList = AF9F83C71A5F0D21004B62C0 /* Build configuration list for PBXProject "{{{name}}}" */;
			compatibilityVersion = "Xcode 3.2";
			developmentRegion = English;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
				Base,
			);
			mainGroup = AF9F83C31A5F0D21004B62C0;
			productRefGroup = AF9F83CD1A5F0D21004B62C0 /* Products */;
			projectDirPath = "";
			projectRoot = "";
			targets = (
				AF9F83CB1A5F0D21004B62C0 /* {{{name}}} */,
			);
		};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
		AF9F83CA1A5F0D21004B62C0 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
"""
		# Reference all asset files by their build UUID
		for file in asset_files do add """
				{{{file.build_uuid}}} /* {{{file.doc}}} */,
"""

		add """
				0FDD07A21C6F8E0E006FF70E /* LaunchScreen.storyboard in Resources */,
				0F4688411FDF8748004F34D4 /* assets in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
		AF9F83C81A5F0D21004B62C0 /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
"""
		# Reference all compilable source files by their build UUID
		for file in source_files do add """
				{{{file.build_uuid}}} /* {{{file.doc}}} */,
"""
		add """
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
		AF9F83F11A5F0D21004B62C0 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
				CLANG_CXX_LIBRARY = "libc++";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
				COPY_PHASE_STRIP = NO;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_DYNAMIC_NO_PIC = NO;
				GCC_OPTIMIZATION_LEVEL = 0;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"DEBUG=1",
					"$(inherited)",
				);
				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				IPHONEOS_DEPLOYMENT_TARGET = 8.1;
				MTL_ENABLE_DEBUG_INFO = YES;
				ONLY_ACTIVE_ARCH = YES;
				SDKROOT = iphoneos;
				TARGETED_DEVICE_FAMILY = "1,2";
			};
			name = Debug;
		};
		AF9F83F21A5F0D21004B62C0 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
				CLANG_CXX_LIBRARY = "libc++";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
				COPY_PHASE_STRIP = YES;
				ENABLE_NS_ASSERTIONS = NO;
				ENABLE_STRICT_OBJC_MSGSEND = YES;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				IPHONEOS_DEPLOYMENT_TARGET = 8.1;
				MTL_ENABLE_DEBUG_INFO = NO;
				SDKROOT = iphoneos;
				TARGETED_DEVICE_FAMILY = "1,2";
				VALIDATE_PRODUCT = YES;
			};
			name = Release;
		};
		AF9F83F41A5F0D21004B62C0 /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				INFOPLIST_FILE = {{{name}}}/Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				OTHER_CFLAGS = "{{{cflags.escape_to_c}}}";
				PRODUCT_NAME = "$(TARGET_NAME)";
			};
			name = Debug;
		};
		AF9F83F51A5F0D21004B62C0 /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
				INFOPLIST_FILE = {{{name}}}/Info.plist;
				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
				OTHER_CFLAGS = "{{{cflags.escape_to_c}}}";
				PRODUCT_NAME = "$(TARGET_NAME)";
			};
			name = Release;
		};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
		AF9F83C71A5F0D21004B62C0 /* Build configuration list for PBXProject "{{{name}}}" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				AF9F83F11A5F0D21004B62C0 /* Debug */,
				AF9F83F21A5F0D21004B62C0 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		AF9F83F31A5F0D21004B62C0 /* Build configuration list for PBXNativeTarget "{{{name}}}" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				AF9F83F41A5F0D21004B62C0 /* Debug */,
				AF9F83F51A5F0D21004B62C0 /* Release */,
			);
			defaultConfigurationIsVisible = 0;
		};
/* End XCConfigurationList section */
	};
	rootObject = AF9F83C41A5F0D21004B62C0 /* Project object */;
}
"""
	end
src/platform/xcode_templates.nit:167,2--475,4

nitc $ PlistTemplate :: rendering
	redef fun rendering
	do
		add """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>{{{bundle_identifier}}}</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>{{{product_name}}}</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>{{{short_version}}}</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>{{{bundle_version}}}</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>

	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>

	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key><true/>
	</dict>
</dict>
</plist>
"""
	end
src/platform/xcode_templates.nit:494,2--549,4

nitc $ LaunchScreenStoryboardTemplate :: rendering
	redef fun rendering
	do
		add """
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
    </dependencies>
    <scenes>
        <!--View Controller-->
        <scene sceneID="EHf-IW-A2E">
            <objects>
                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
                        <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="{{{subtitle}}}" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
                                <rect key="frame" x="20" y="559" width="560" height="21"/>
                                <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                <nil key="highlightedColor"/>
                            </label>
                            <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="{{{title}}}" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
                                <rect key="frame" x="20" y="176" width="560" height="43"/>
                                <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
                                <color key="textColor" red="0.0" green="0.5" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                <nil key="highlightedColor"/>
                            </label>
                        </subviews>
                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
                        <constraints>
                            <constraint firstAttribute="centerX" secondItem="obG-Y5-kRd" secondAttribute="centerX" id="5cz-MP-9tL"/>
                            <constraint firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
                            <constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="SfN-ll-jLj"/>
                            <constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
                            <constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
                            <constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="x7j-FC-K8j"/>
                        </constraints>
                    </view>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="53" y="375"/>
        </scene>
    </scenes>
</document>"""
	end
src/platform/xcode_templates.nit:565,2--618,4

nitc :: static_html $ DocPage :: rendering
	# Render the whole page
	redef fun rendering do
		render_head
		add topmenu
		addn "<div class='container-fluid'>"
		render_content
		addn "</div>"
		render_footer
	end
src/doc/static/static_html.nit:141,2--149,4

nitc :: static_html $ DocTab :: rendering
	redef fun rendering do
		var has_left = show_sidebar and sidebar.cards.not_empty
		var has_right = metadata.cards.not_empty

		addn "<div class='tab-pane {if is_active then "active" else ""}' id='{id}'>"
		if has_left then
			addn " <div class='col-sm-3'>"
			addn sidebar
			addn " </div>"
		end
		var cols = 12
		if has_left then cols -= 3
		if has_right then cols -= 3
		addn " <div class='col-sm-{cols}'>"
		for card in content do addn card
		addn " </div>"
		if has_right then
			addn " <div class='col-sm-3'>"
			addn metadata
			addn " </div>"
		end
		addn "</div>"
	end
src/doc/static/static_html.nit:227,2--249,4

nitc :: static_html $ DocSidebar :: rendering
	redef fun rendering do
		if cards.is_empty then return
		addn "<div id='sidebar'>"
		for card in cards do addn card
		addn "</div>"
	end
src/doc/static/static_html.nit:322,2--327,4

html $ Header :: rendering
	redef fun rendering do
		add "<h{level}{render_css_classes}>{text.write_to_string}"
		var subtext = self.subtext
		if subtext != null then add "<small>{subtext.write_to_string}</small>"
		add "</h{level}>"
	end
lib/html/bootstrap.nit:112,2--117,4

html $ ListItem :: rendering
	redef fun rendering do addn "<li{render_css_classes}>{text.write_to_string}</li>"
lib/html/bootstrap.nit:205,2--82

html $ BSIcon :: rendering
	redef fun rendering do
		add "<span{render_css_classes} aria-hidden=\"true\"></span>"
	end
lib/html/bootstrap.nit:229,2--231,4

html $ BSLabel :: rendering
	redef fun rendering do
		add "<span{render_css_classes}>{text.write_to_string}</span>"
	end
lib/html/bootstrap.nit:289,2--291,4

html $ BSBadge :: rendering
	redef fun rendering do
		add "<span{render_css_classes}>{text.write_to_string}</span>"
	end
lib/html/bootstrap.nit:313,2--315,4

html $ BSPageHeader :: rendering
	redef fun rendering do
		addn "<div{render_css_classes}>"
		addn text.write_to_string
		addn "</div>"
	end
lib/html/bootstrap.nit:341,2--345,4

html $ BSPanel :: rendering
	redef fun rendering do
		addn "<div{render_css_classes}>"
		var heading = self.heading
		if heading != null then
			addn "<div class=\"panel-heading\">"
			addn heading.write_to_string
			addn "</div>"
		end
		var body = self.body
		if body != null then
			addn "<div class=\"panel-body\">"
			addn body.write_to_string
			addn "</div>"
		end
		var footer = self.footer
		if footer != null then
			addn "<div class=\"panel-footer\">"
			addn footer.write_to_string
			addn "</div>"
		end
		addn "</div>"
	end
lib/html/bootstrap.nit:449,2--470,4

nitc $ CardList :: rendering
	redef fun rendering do
		addn "<div id='{id}' class='card-list'>"
		for card in cards do
			addn card
		end
		addn "</div>"
	end
src/doc/static/static_cards.nit:40,2--46,4

nitc $ CardText :: rendering
	redef fun rendering do
		var content = self.content
		if content == null then return
		addn "<div>"
		addn content
		addn "</div>"
		addn "<hr/>"
	end
src/doc/static/static_cards.nit:62,2--69,4

nitc $ CardSection :: rendering
	redef fun rendering do
		addn "<h{level} id='{id}'>{title}</h{level}>"
	end
src/doc/static/static_cards.nit:87,2--89,4

html $ OrderedList :: rendering
	redef fun rendering do
		addn "<ol{render_css_classes}>"
		for item in items do add item
		addn "</ol>"
	end
lib/html/bootstrap.nit:162,2--166,4

html $ UnorderedList :: rendering
	redef fun rendering do
		addn "<ul{render_css_classes}>"
		for item in items do add item
		addn "</ul>"
	end
lib/html/bootstrap.nit:190,2--194,4

nitc $ CardPageHeader :: rendering
	redef fun rendering do
		addn "<div class='page-header'>"
		super
		var subtitle = self.subtitle
		if subtitle != null then
			addn "<p class='text-muted'>"
			addn subtitle
			addn "</p>"
		end
		addn "</div>"
	end
src/doc/static/static_cards.nit:99,2--109,4

nitc $ CardSummary :: rendering
	redef fun rendering do
		if not no_title then
			addn "<h4>Summary</h4>"
		end
		addn "<div class='summary'>"
		addn " <ul class='list-unstyled'>"
		var sections = new Array[CardSection]
		for card in cards do
			if card isa CardSection then
				while sections.not_empty and sections.last.level >= card.level do
					sections.pop
				end
				sections.add card
			end
			var level = if sections.is_empty then 1 else sections.last.level
			if not card isa CardSection then level += 1
			addn "<li><a href='#{card.id}'><h{level}>{card.title}</h{level}></a></li>"
		end
		addn " </ul>"
		addn "</div>"
	end
src/doc/static/static_cards.nit:123,2--143,4

nitc $ CardMDoc :: rendering
	redef fun rendering do
		var mdoc = self.mdoc
		if mdoc == null then return
		addn "<div id='{id}' class='card'>"
		addn " <div class='card-body nitdoc'>"
		addn mdoc.html_documentation
		addn " </div>"
		addn "</div>"
	end
src/doc/static/static_cards.nit:225,2--233,4

nitc $ CardInheritance :: rendering
	redef fun rendering do
		var ancestors = self.ancestors
		var descendants = self.descendants
		if ancestors == null and parents == null and
			children == null and descendants == null then return

		addn "<div id='{id}' class='card'>"
		addn " <div class='card-body'>"
		if ancestors != null and ancestors.length <= 10 then
			render_list("Ancestors", ancestors)
		else
			render_list("Parents", parents)
		end
		if descendants != null and descendants.length <= 10 then
			render_list("Descendants", descendants)
		else
			render_list("Children", children)
		end
		addn " </div>"
		addn "</div>"
	end
src/doc/static/static_cards.nit:255,2--275,4

nitc $ CardMetadata :: rendering
	redef fun rendering do
		for maintainer in metadata.maintainers do
			addn """
				<p class='lead'>
					{{{maintainer.to_html}}}
				</p>"""
		end
		var license = metadata.license
		if license != null then
			addn """
				<span class='text-muted'>
					<a href='http://opensource.org/licenses/{{{license}}}'>{{{license}}}</a>
					license
				</span>"""
		end

		var homepage = metadata.homepage
		var browse = metadata.browse
		var issues = metadata.issues
		if homepage != null or browse != null or issues != null then
			addn """
				<h4>Links</h4>
				<ul class='list-unstyled'>"""
			if homepage != null then addn "<li><a href='{homepage}'>Homepage</a></li>"
			if browse != null then addn "<li><a href='{browse}'>Source Code</a></li>"
			if issues != null then addn "<li><a href='{issues}'>Issues</a></li>"
			addn "</ul>"
		end

		var git = metadata.git
		var last_date = metadata.last_date
		var first_date = metadata.first_date
		if git != null then
			addn """
				<h4>Git</h4>
				<ul class='list-unstyled'>
					<li><a href='{{{git}}}'>{{{git}}}</a></li>
				</ul>
				<span class='text-muted'><b>{{{stats.commits}}}</b> commits</span>
				<br>"""
			if last_date != null then
				addn """<b class=text-muted>Last:</b> {{{last_date}}}<br>"""
			end
			if first_date != null then
				addn """<b class=text-muted>First:</b> {{{first_date}}}"""
			end
		end

		addn """
			<h4>Quality</h4>
			<ul class='list-unstyled'>
				<li>{{{stats.documentation_score}}}% documented</li>
			</ul>"""

		if metadata.tags.not_empty then
			addn "<h4>Tags</h4>"
			for tag in metadata.tags do
				addn " <a href='tag_{tag.to_cmangle}.html'>{tag}</a>"
				if tag != metadata.tags.last then add ", "
			end
		end

		if deps.not_empty then
			addn "<h4>Dependencies</h4>"
			for dep in deps do
				add dep.html_link
				if dep != deps.last then add ", "
			end
		end

		if clients.not_empty then
			addn "<h4>Clients</h4>"
			for client in clients do
				add client.html_link
				if client != clients.last then add ", "
			end
		end

		if metadata.contributors.not_empty then
			addn """
				<h4>Contributors</h4>
				<ul class='list-unstyled'>"""
			for contrib in metadata.contributors do
				addn """<li>{{{contrib.to_html}}}</li>"""
			end
			addn "</ul>"
		end

		addn """
			<h4>Stats</h4>
			<ul class='list-unstyled'>
				<li>{{{stats.mmodules}}} modules</li>
				<li>{{{stats.mclasses}}} classes</li>
				<li>{{{stats.mmethods}}} methods</li>
				<li>{{{stats.loc}}} loc</li>
			</ul>"""
	end
src/doc/static/static_cards.nit:578,2--674,4

html $ BSBreadCrumbs :: rendering
	redef fun rendering do
		items.last.css_classes.add "active"
		super
	end
lib/html/bootstrap.nit:259,2--262,4

nitc $ CardMdSummary :: rendering
	redef fun rendering do
		addn "<h4>Summary</h4>"
		addn "<div class='summary'>"
		addn " <ul class='list-unstyled'>"
		for id, headline in headlines do
			var level = headline.level
			var title = md_processor.process(headline.title)
			addn "<li><a href='#{id}'><h{level}>{title}</h{level}></a></li>"
		end
		addn " </ul>"
		addn "</div>"
	end
src/doc/static/static_cards.nit:160,2--171,4