nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gamnit: intro BMFont parser and drawing services
[nit.git]
/
lib
/
html
/
bootstrap.nit
diff --git
a/lib/html/bootstrap.nit
b/lib/html/bootstrap.nit
index
66befa3
..
7b5084f
100644
(file)
--- a/
lib/html/bootstrap.nit
+++ b/
lib/html/bootstrap.nit
@@
-70,13
+70,13
@@
class Link
# Creates a link with a `title` attribute.
init with_title(href: String, text: Writable, title: nullable String) do
# Creates a link with a `title` attribute.
init with_title(href: String, text: Writable, title: nullable String) do
- self.href = href
- self.text = text
+ init(href, text)
self.title = title
end
redef fun rendering do
add "<a{render_css_classes} href=\"{href}\""
self.title = title
end
redef fun rendering do
add "<a{render_css_classes} href=\"{href}\""
+ var title = self.title
if title != null then add " title=\"{title.write_to_string}\""
add ">{text}</a>"
end
if title != null then add " title=\"{title.write_to_string}\""
add ">{text}</a>"
end
@@
-112,13
+112,13
@@
class Header
# Creates a link with a `title` attribute.
init with_subtext(level: Int, text: Writable, subtext: String) do
# Creates a link with a `title` attribute.
init with_subtext(level: Int, text: Writable, subtext: String) do
- self.level = level
- self.text = text
+ init(level, text)
self.subtext = subtext
end
redef fun rendering do
add "<h{level}{render_css_classes}>{text.write_to_string}"
self.subtext = subtext
end
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
if subtext != null then add "<small>{subtext.write_to_string}</small>"
add "</h{level}>"
end
@@
-448,6
+448,7
@@
class BSPanel
redef fun rendering do
addn "<div{render_css_classes}>"
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
if heading != null then
addn "<div class=\"panel-heading\">"
addn heading.write_to_string
@@
-456,6
+457,7
@@
class BSPanel
addn "<div class=\"panel-body\">"
addn body.write_to_string
addn "</div>"
addn "<div class=\"panel-body\">"
addn body.write_to_string
addn "</div>"
+ var footer = self.footer
if footer != null then
addn "<div class=\"panel-footer\">"
addn footer.write_to_string
if footer != null then
addn "<div class=\"panel-footer\">"
addn footer.write_to_string