|
1 | 1 | <tal:block |
2 | | - tal:define="banner python:view.find_banner()" |
3 | | - i18n:domain="collective.behavior.banner" |
4 | | - tal:condition="python: banner"> |
| 2 | + tal:define="banner python:view.find_banner()" |
| 3 | + i18n:domain="collective.behavior.banner" |
| 4 | + tal:condition="python: banner"> |
5 | 5 |
|
6 | | -<div id="portal-banner" class="principal portal-banner banner-monads-super-txt" role="complementary" |
| 6 | + <div id="portal-banner" class="principal portal-banner banner-monads-super-txt" role="complementary" |
7 | 7 | tal:define="checkPermission python:context.restrictedTraverse('portal_membership').checkPermission; |
8 | | - has_image python:banner and 'banner_image' in banner; |
9 | | - has_minimal_image python:banner and 'banner_image_minimal' in banner; |
10 | | - has_bannertext python: banner.get('banner_title') or banner.get('banner_description') or banner.get('banner_text') or banner.get('banner_linktext'); |
11 | | - show_content_title python: view.show_content_title(); |
12 | | - show_content_title_class python: ' show-content-title' if show_content_title else ''; |
13 | | - circle_color python: view.circle_color() if show_content_title else ''; |
14 | | - banner_image_template python: banner.get('banner_image_template'); |
15 | | - inherited python: banner['banner_obj'] != context; |
16 | | - banner_scale python: banner['banner_size']; |
17 | | - slider_scale_class python: ' slider-scale bleed' if banner_scale == 'slider' else ' banner-scale'; |
18 | | - "> |
| 8 | + has_image python:banner and 'banner_image' in banner; |
| 9 | + has_image_minimal python:banner and 'banner_image_minimal' in banner; |
| 10 | + has_bannertext python: banner.get('banner_title') or banner.get('banner_description') or banner.get('banner_text') or banner.get('banner_linktext'); |
| 11 | + show_content_title python: view.show_content_title(); |
| 12 | + show_content_title_class python: ' show-content-title' if show_content_title else ''; |
| 13 | + circle_color python: view.circle_color() if show_content_title else ''; |
| 14 | + banner_image_template python: banner.get('banner_image_template'); |
| 15 | + inherited python: banner['banner_obj'] != context; |
| 16 | + banner_scale python: banner['banner_size']; |
| 17 | + slider_scale_class python: ' slider-scale bleed' if banner_scale == 'slider' else ' banner-scale'; |
| 18 | + "> |
19 | 19 |
|
20 | 20 | <div class="container" |
21 | | - tal:condition="python: banner"> |
22 | | - |
23 | | - <div class="gigantic" |
24 | | - tal:attributes="class python: 'banner_container portal-banner gigantic' + show_content_title_class + slider_scale_class if (has_image or banner_image_template) else 'banner_container banner_without_image portal-banner gigantic' + show_content_title_class + slider_scale_class"> |
25 | | - <div class="banner-wrapper"> |
26 | | - |
27 | | - <div class="bannerImage" |
28 | | - tal:condition="python: has_image or banner_image_template"> |
29 | | - <img class="bannerImageImage" |
30 | | - tal:condition="python: not has_image and banner_image_template" |
31 | | - tal:attributes="src python: banner_image_template + '.jpg'; |
32 | | - alt python: banner.get('banner_alt', '')"> |
33 | | - <img class="bannerImageImage" |
34 | | - tal:condition="python:has_image" |
35 | | - tal:attributes="src python: banner['banner_image'] + '/' + banner_scale; |
36 | | - alt python: banner.get('banner_alt', '')"> |
37 | | - |
38 | | - <img class="bannerImageImage minimal" |
39 | | - tal:condition="python: not has_image and not banner_image_template and has_image_minimal" |
40 | | - tal:attributes="src python: banner['banner_image'] + '/' + banner_scale; |
41 | | - alt python: banner.get('banner_alt', '')"> |
42 | | - </div> |
43 | | - |
44 | | - <div class="bannerContent frame" |
45 | | - tal:condition="python: not show_content_title and has_bannertext"> |
46 | | - |
47 | | - <div class="bannerText" |
48 | | - tal:attributes="class python: 'bannerText ' + banner['textblock_css_class']"> |
49 | | - |
50 | | - <h1 class="bannerTitle" |
51 | | - tal:condition="python:'banner_title' in banner"> |
52 | | - <span tal:replace="python: banner['banner_title']">Title</span> |
53 | | - </h1> |
54 | | - |
55 | | - <p class="bannerDescription" |
56 | | - tal:condition="python:'banner_description' in banner"> |
57 | | - <tal:def tal:define="banner_desc python:banner['banner_description'];"> |
58 | | - <span tal:replace="banner_desc" /> |
59 | | - </tal:def> |
60 | | - </p> |
61 | | - |
62 | | - <div class="bannerLink" |
63 | | - tal:condition="python: 'banner_link' in banner"> |
64 | | - |
65 | | - <p><a class="context" role="button" target="_blank" href="" title="" |
66 | | - tal:attributes="href python: banner['banner_link']; title python: banner['banner_linktext']" |
67 | | - tal:content="python: banner['banner_linktext']"> |
68 | | - Link |
69 | | - </a></p> |
70 | | - |
71 | | - </div> |
72 | | - |
73 | | - <div class="bannerBody" |
74 | | - tal:condition="python:'banner_text' in banner"> |
| 21 | + tal:condition="python: banner"> |
| 22 | + |
| 23 | + <div class="gigantic" |
| 24 | + tal:attributes="class python: 'banner_container portal-banner gigantic' + show_content_title_class + slider_scale_class if (has_image or banner_image_template) else 'banner_container banner_without_image portal-banner gigantic' + show_content_title_class + slider_scale_class"> |
| 25 | + <div class="banner-wrapper"> |
| 26 | + <div class="bannerImage" |
| 27 | + tal:condition="python: has_image or banner_image_template or has_image_minimal"> |
| 28 | + <img class="bannerImageImage" |
| 29 | + tal:condition="python: not has_image and banner_image_template" |
| 30 | + tal:attributes="src python: banner_image_template + '.jpg'; |
| 31 | + alt python: banner.get('banner_alt', '')"> |
| 32 | + <img class="bannerImageImage" |
| 33 | + tal:condition="python:has_image" |
| 34 | + tal:attributes="src python: banner['banner_image'] + '/' + banner_scale; |
| 35 | + alt python: banner.get('banner_alt', '')"> |
| 36 | + |
| 37 | + |
| 38 | + <div class="bannerImageImage"> |
| 39 | + <svg class="monad lazyloaded" viewBox="0 0 700 600" xmlns="http://www.w3.org/2000/svg" |
| 40 | + tal:condition="python: not has_image and not banner_image_template and has_image_minimal" |
| 41 | + xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 42 | + <defs> |
| 43 | + <clipPath id="banner-monad-std-46396"> |
| 44 | + <path |
| 45 | + d="M317.436 587.623C123.61 604.799-.032 490.34 41.273 331.972 82.58 173.603 198.868 18.788 355.19 47.07c156.323 28.283 323.885 192.1 320.085 305.011-3.803 112.91-164.013 218.365-357.839 235.542z" |
| 46 | + fill="#FFF"></path> |
| 47 | + </clipPath> |
| 48 | + </defs> |
| 49 | + <image |
| 50 | + tal:attributes="xlink:href python: banner['banner_image_minimal'] + '/' + banner_scale; |
| 51 | + data-href python: banner['banner_image_minimal'] + '/' + banner_scale" |
| 52 | + width="100%" height="100%" clip-path="url(#banner-monad-std-46396)"></image> |
| 53 | + </svg> |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + <div class="bannerContent frame" |
| 57 | + tal:condition="python: not show_content_title and has_bannertext"> |
| 58 | + |
| 59 | + <div class="bannerText" |
| 60 | + tal:attributes="class python: 'bannerText ' + banner['textblock_css_class']"> |
| 61 | + |
| 62 | + <h1 class="bannerTitle" |
| 63 | + tal:condition="python:'banner_title' in banner"> |
| 64 | + <span tal:replace="python: banner['banner_title']">Title</span> |
| 65 | + </h1> |
| 66 | + |
| 67 | + <p class="bannerDescription" |
| 68 | + tal:condition="python:'banner_description' in banner"> |
| 69 | + <tal:def tal:define="banner_desc python:banner['banner_description'];"> |
| 70 | + <span tal:replace="banner_desc" /> |
| 71 | + </tal:def> |
| 72 | + </p> |
| 73 | + |
| 74 | + <div class="bannerLink" |
| 75 | + tal:condition="python: 'banner_link' in banner"> |
| 76 | + |
| 77 | + <p><a class="context" role="button" target="_blank" href="" title="" |
| 78 | + tal:attributes="href python: banner['banner_link']; title python: banner['banner_linktext']" |
| 79 | + tal:content="python: banner['banner_linktext']"> |
| 80 | + Link |
| 81 | + </a></p> |
| 82 | + |
| 83 | + </div> |
| 84 | + |
| 85 | + <div class="bannerBody" |
| 86 | + tal:condition="python:'banner_text' in banner"> |
75 | 87 | <span tal:replace="structure python:banner['banner_text']"> |
76 | 88 | Text |
77 | 89 | </span> |
78 | | - </div> |
| 90 | + </div> |
79 | 91 |
|
| 92 | + </div> |
| 93 | + </div> |
| 94 | + |
| 95 | + <div class="bannerContent" |
| 96 | + tal:condition="python: show_content_title"> |
| 97 | + |
| 98 | + <div class="contain-shape" tal:condition="python: circle_color"> |
| 99 | + <div class="hold-shape"> |
| 100 | + <div class="shape-outer"> |
| 101 | + <div class="fg-theme" |
| 102 | + tal:attributes="style python: 'color: #' + circle_color + ';; opacity: .9'"> |
| 103 | + <svg class="shape abs-trbl" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> |
| 104 | + <circle cx="256" cy="256" r="256" fill="currentColor"/> |
| 105 | + </svg> |
80 | 106 | </div> |
81 | 107 | </div> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + <div class="contentTitle"> |
| 111 | + <h1 tal:content="python: context.title" |
| 112 | + class="bannerTitle" |
| 113 | + tal:attributes="style python: 'color: #fff' if circle_color in ['af0917'] else ''" /> |
| 114 | + </div> |
82 | 115 |
|
83 | | - <div class="bannerContent" |
84 | | - tal:condition="python: show_content_title"> |
85 | | - |
86 | | - <div class="contain-shape" tal:condition="python: circle_color"> |
87 | | - <div class="hold-shape"> |
88 | | - <div class="shape-outer"> |
89 | | - <div class="fg-theme" |
90 | | - tal:attributes="style python: 'color: #' + circle_color + ';; opacity: .9'"> |
91 | | - <svg class="shape abs-trbl" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> |
92 | | - <circle cx="256" cy="256" r="256" fill="currentColor" /> |
93 | | - </svg> |
94 | | - </div> |
95 | | - </div> |
96 | | - </div> |
97 | | - </div> |
98 | | - <div class="contentTitle"> |
99 | | - <h1 tal:content="python: context.title" |
100 | | - class="bannerTitle" |
101 | | - tal:attributes="style python: 'color: #fff' if circle_color in ['af0917'] else ''" /> |
102 | | - </div> |
103 | | - |
104 | | - </div> |
| 116 | + </div> |
105 | 117 |
|
106 | | - <div class="bannerEdit" |
107 | | - tal:condition="python: inherited and checkPermission('Modify portal content', banner['banner_obj'])"> |
108 | | - <a tal:attributes="href python: banner['banner_obj'].absolute_url() + '/@@edit'" |
109 | | - i18n:translate=""> |
110 | | - Edit inherited banner |
111 | | - </a> |
112 | | - </div> |
| 118 | + <div class="bannerEdit" |
| 119 | + tal:condition="python: inherited and checkPermission('Modify portal content', banner['banner_obj'])"> |
| 120 | + <a tal:attributes="href python: banner['banner_obj'].absolute_url() + '/@@edit'" |
| 121 | + i18n:translate=""> |
| 122 | + Edit inherited banner |
| 123 | + </a> |
| 124 | + </div> |
113 | 125 |
|
114 | | - </div> |
115 | 126 | </div> |
| 127 | + </div> |
116 | 128 | </div> |
117 | 129 |
|
118 | | -</div> |
| 130 | + </div> |
119 | 131 | </tal:block> |
0 commit comments