Revision 0466a6b3
Von Sven Schöling vor fast 8 Jahren hinzugefügt
SL/Layout/Classic.pm | ||
---|---|---|
6 | 6 |
use SL::Layout::Top; |
7 | 7 |
use SL::Layout::MenuLeft; |
8 | 8 |
use SL::Layout::None; |
9 |
use SL::Layout::Split; |
|
10 |
use SL::Layout::Content; |
|
9 | 11 |
|
10 | 12 |
sub init_sub_layouts { |
11 | 13 |
[ |
12 | 14 |
SL::Layout::None->new, |
13 | 15 |
SL::Layout::Top->new, |
14 |
SL::Layout::MenuLeft->new, |
|
16 |
SL::Layout::Split->new( |
|
17 |
left => [ SL::Layout::MenuLeft->new ], |
|
18 |
right => [ SL::Layout::Content->new ], |
|
19 |
) |
|
15 | 20 |
] |
16 | 21 |
} |
17 | 22 |
|
SL/Layout/Content.pm | ||
---|---|---|
1 |
package SL::Layout::Content; |
|
2 |
|
|
3 |
use strict; |
|
4 |
use parent qw(SL::Layout::Base); |
|
5 |
|
|
6 |
use SL::Presenter; |
|
7 |
|
|
8 |
sub start_content { |
|
9 |
"<div id='content'>"; |
|
10 |
} |
|
11 |
|
|
12 |
sub end_content { |
|
13 |
"</div>"; |
|
14 |
} |
|
15 |
|
|
16 |
1; |
|
17 |
|
|
18 |
__END__ |
|
19 |
|
|
20 |
=encoding utf-8 |
|
21 |
|
|
22 |
=head1 NAME |
|
23 |
|
|
24 |
SL::Layout::Content |
|
25 |
|
|
26 |
=head1 DESCRIPTION |
|
27 |
|
|
28 |
Pseudo layout for the position of the actual content in the layout. Currently |
|
29 |
only implements the start_content/end_content blocks used for styling. |
|
30 |
|
|
31 |
=head1 AUTHOR |
|
32 |
|
|
33 |
Sven Schöling E<lt>s.schoeling@linet-services.deE<gt> |
|
34 |
|
|
35 |
=cut |
SL/Layout/Javascript.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
use parent qw(SL::Layout::Base); |
5 | 5 |
|
6 |
use SL::Layout::None; |
|
7 |
use SL::Layout::Top; |
|
8 |
use SL::Layout::Content; |
|
9 |
|
|
6 | 10 |
use List::Util qw(max); |
7 | 11 |
use URI; |
8 | 12 |
|
... | ... | |
10 | 14 |
[ |
11 | 15 |
SL::Layout::None->new, |
12 | 16 |
SL::Layout::Top->new, |
17 |
SL::Layout::Content->new, |
|
13 | 18 |
] |
14 | 19 |
} |
15 | 20 |
|
... | ... | |
46 | 51 |
); |
47 | 52 |
} |
48 | 53 |
|
49 |
sub start_content { |
|
50 |
"<div id='content'>\n"; |
|
51 |
} |
|
52 |
|
|
53 |
sub end_content { |
|
54 |
"</div>\n"; |
|
55 |
} |
|
56 |
|
|
57 | 54 |
sub stylesheets { |
58 | 55 |
$_[0]->add_stylesheets(qw( |
59 | 56 |
dhtmlsuite/menu-item.css |
SL/Layout/MenuLeft.pm | ||
---|---|---|
29 | 29 |
"<div id='html-menu'></div>\n"; |
30 | 30 |
} |
31 | 31 |
|
32 |
sub start_content { |
|
33 |
"<div id='content' class='html-menu'>\n"; |
|
34 |
} |
|
35 |
|
|
36 |
sub end_content { |
|
37 |
"</div>\n"; |
|
38 |
} |
|
39 |
|
|
40 | 32 |
sub section_menu { |
41 | 33 |
my ($menu) = @_; |
42 | 34 |
my @items; |
SL/Layout/Split.pm | ||
---|---|---|
1 |
package SL::Layout::Split; |
|
2 |
|
|
3 |
use strict; |
|
4 |
use parent qw(SL::Layout::Base); |
|
5 |
|
|
6 |
use SL::Presenter; |
|
7 |
|
|
8 |
use Rose::Object::MakeMethods::Generic ( |
|
9 |
'scalar' => [ qw(left right) ], |
|
10 |
); |
|
11 |
|
|
12 |
sub sub_layouts { |
|
13 |
@{ $_[0]->left || [] }, |
|
14 |
@{ $_[0]->right || [] }, |
|
15 |
} |
|
16 |
|
|
17 |
sub pre_content { |
|
18 |
my $left = join '', map { $_->pre_content } @{ $_[0]->left || [] }; |
|
19 |
my $right = join '', map { $_->pre_content } @{ $_[0]->right || [] }; |
|
20 |
|
|
21 |
SL::Presenter->get->html_tag('div', $left, class => 't-layout-left') |
|
22 |
.'<div class="t-layout-right html-menu">' . $right; |
|
23 |
} |
|
24 |
|
|
25 |
sub post_content { |
|
26 |
my $left = join '', map { $_->post_content } @{ $_[0]->left || [] }; |
|
27 |
my $right = join '', map { $_->post_content } @{ $_[0]->right || [] }; |
|
28 |
|
|
29 |
$right . '</div>' |
|
30 |
. SL::Presenter->get->html_tag('div', $left, class => 't-layout-left'); |
|
31 |
} |
|
32 |
|
|
33 |
1; |
|
34 |
|
|
35 |
__END__ |
|
36 |
|
|
37 |
=encoding utf-8 |
|
38 |
|
|
39 |
=head1 NAME |
|
40 |
|
|
41 |
SL::Layout::Split |
|
42 |
|
|
43 |
=head1 SYNOPSIS |
|
44 |
|
|
45 |
use SL::Layout::TLayout; |
|
46 |
|
|
47 |
SL::Layout::TLayout->new( |
|
48 |
left => [ LIST OF SUBLAYOUTS ], |
|
49 |
right => [ LIST OF SUBLAYOUTS ], |
|
50 |
); |
|
51 |
|
|
52 |
=head1 DESCRIPTION |
|
53 |
|
|
54 |
Layout with left and right components, with content being part of the |
|
55 |
right block. |
|
56 |
|
|
57 |
=head1 BUGS |
|
58 |
|
|
59 |
Due to the way content is serialized it's currently not possible to shift the content into the other blocks |
|
60 |
|
|
61 |
=head1 AUTHOR |
|
62 |
|
|
63 |
Sven Schöling E<lt>s.schoeling@linet-services.deE<gt> |
|
64 |
|
|
65 |
=cut |
SL/Layout/V3.pm | ||
---|---|---|
6 | 6 |
use SL::Layout::None; |
7 | 7 |
use SL::Layout::Top; |
8 | 8 |
use SL::Layout::CssMenu; |
9 |
use SL::Layout::Content; |
|
9 | 10 |
|
10 | 11 |
sub init_sub_layouts { |
11 | 12 |
[ |
12 | 13 |
SL::Layout::None->new, |
13 | 14 |
SL::Layout::Top->new, |
14 | 15 |
SL::Layout::CssMenu->new, |
16 |
SL::Layout::Content->new, |
|
15 | 17 |
] |
16 | 18 |
} |
17 | 19 |
|
18 |
sub start_content { |
|
19 |
"<div id='content'>\n"; |
|
20 |
} |
|
21 |
|
|
22 |
sub end_content { |
|
23 |
"</div>\n"; |
|
24 |
} |
|
25 | 20 |
|
26 | 21 |
1; |
css/kivitendo/menu.css | ||
---|---|---|
149 | 149 |
each line is a mi (menuitem) and has one mii (menu-item-icon) whcih is ms (menu-spacer) |
150 | 150 |
and one mic (menu-item-chunk) |
151 | 151 |
indenting is done with the levels s0, s1, s2 */ |
152 |
#content.html-menu, #html-menu {
|
|
152 |
div.layout-split-left, #html-menu {
|
|
153 | 153 |
transition: margin-left 0.2s, width 0.2s; |
154 | 154 |
-moz-transition: margin-left 0.2s, width 0.2s; |
155 | 155 |
-webkit-transition: margin-left 0.2s, width 0.2s; |
156 | 156 |
-o-transition: margin-left 0.2s, width 0.2s; |
157 | 157 |
} |
158 |
#content.html-menu { margin-left: 190px; }
|
|
159 |
#content.html-menu.folded { margin-left: 40px }
|
|
160 |
#html-menu.folded:hover + #content.html-menu.folded { margin-left: 190px }
|
|
158 |
div.layout-split-right { margin-left: 190px; }
|
|
159 |
div.layout-split-right.folded { margin-left: 40px }
|
|
160 |
#html-menu.folded:hover + div.layout-split-right.folded { margin-left: 190px }
|
|
161 | 161 |
#html-menu { float:left; width: 183px; font-size: 8pt; margin-top: 10px; overflow:hidden; } |
162 | 162 |
#html-menu.folded { width: 32px; } |
163 | 163 |
#html-menu.folded:hover { width: 183px; } |
css/lx-office-erp/menu.css | ||
---|---|---|
152 | 152 |
each line is a mi (menuitem) and has one mii (menu-item-icon) whcih is ms (menu-spacer) |
153 | 153 |
and one mic (menu-item-chunk) |
154 | 154 |
indenting is done with the levels s0, s1, s2 */ |
155 |
#content.html-menu, #html-menu {
|
|
155 |
div.html-menu, #html-menu {
|
|
156 | 156 |
transition: margin-left 0.2s, width 0.2s; |
157 | 157 |
-moz-transition: margin-left 0.2s, width 0.2s; |
158 | 158 |
-webkit-transition: margin-left 0.2s, width 0.2s; |
159 | 159 |
-o-transition: margin-left 0.2s, width 0.2s; |
160 | 160 |
} |
161 |
#content.html-menu { margin-left: 190px; }
|
|
162 |
#content.html-menu.folded { margin-left: 40px }
|
|
163 |
#html-menu.folded:hover + #content.html-menu.folded { margin-left: 190px }
|
|
161 |
div.layout-split-right { margin-left: 190px; }
|
|
162 |
div.layout-split-right.folded { margin-left: 40px }
|
|
163 |
#html-menu.folded:hover + #content.layout-split-right.folded { margin-left: 190px }
|
|
164 | 164 |
#html-menu { float:left; width: 183px; font-size: 85%; margin-top: 10px; overflow:hidden; } |
165 | 165 |
#html-menu.folded { width: 32px; } |
166 | 166 |
#html-menu.folded:hover { width: 183px; } |
Auch abrufbar als: Unified diff
Layout: Content als eigenes Layout und Split compositor