From: Benoît Pin <pin@cri.ensmp.fr> Date: Wed, 5 Feb 2014 16:01:07 +0000 (+0100) Subject: Un peu plus de structuration : X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/678f95921b62703063dc23047fce534cc255a190 Un peu plus de structuration : — ajout du wrapper principal « main_wrapper » ; — ajout des ids « top_bar » et « user_menu_bar » ; — #Footer remonté d'un niveau ; — Footer ancré en bas (par css) ; — masquage du champ de recherche aux anonymes. --- diff --git a/skins/custom_generic/main_template_standard.pt b/skins/custom_generic/main_template_standard.pt index 101a502..9d22950 100755 --- a/skins/custom_generic/main_template_standard.pt +++ b/skins/custom_generic/main_template_standard.pt @@ -83,85 +83,86 @@ </head> <body> - <span style="display:none"> - <span id="Portal_URL" tal:content="portal_url"></span> - <span id="ajax_config" tal:content="python:request.get('ajaxConfig', request.SESSION.get('ajaxConfig', portal_object.getProperty('ajax_config')))"></span> - <script type="text/javascript"> - // <!-- - AJAX_CONFIG = document.getElementById('ajax_config'); - AJAX_CONFIG = parseInt(AJAX_CONFIG.innerHTML); - // --> - </script> - </span> - <a href="#documentContent" i18n:translate="" i18n:domain="plinn" class="hidden">Skip to content</a> - <div metal:use-macro="main_macros/top_bar">Top bar</div> - <div metal:use-macro="main_macros/user_menu_bar">User menu bar</div> - <div id="Breadcrumbs"><div metal:use-macro="main_macros/Breadcrumbs">Breadcrumbs</div></div> - - <div id="main_body"> - <table id="Forematter" width="100%" cellspacing="0"> - <tr> - <td id="leftCell" class="boxes_container" width="15%"> - <span metal:use-macro="main_macros/leftCell">Left cell</span> - </td> - - <td id="mainCell" width="70%"> - - <div id="DesktopStatusBar" tal:condition="request/portal_status_message|nothing"> - <img src="info.gif" alt="Information" tal:attributes="src here/info.gif/absolute_url" i18n:attributes="alt" /> - <span tal:content="request/portal_status_message" i18n:translate="">Status message.</span> - </div> - - <a name="documentContent"></a> - <div metal:define-slot="body" tal:omit-tag=""> - <div metal:define-slot="main_no_tabs" tal:omit-tag=""> - <div tal:condition="specialCtxHeader" tal:content="structure specialCtxHeader">special context header</div> - <div id="ContentTabs" tal:condition="not:specialCtxHeader"> - <div class="tabs" metal:use-macro="here/tabs/macros/tabs">Content tabs</div> - <div metal:use-macro="here/tabs/macros/additional_tabs">Additional tabs</div> + <div id="main_wrapper"> + <span style="display:none"> + <span id="Portal_URL" tal:content="portal_url"></span> + <span id="ajax_config" tal:content="python:request.get('ajaxConfig', request.SESSION.get('ajaxConfig', portal_object.getProperty('ajax_config')))"></span> + <script type="text/javascript"> + // <!-- + AJAX_CONFIG = document.getElementById('ajax_config'); + AJAX_CONFIG = parseInt(AJAX_CONFIG.innerHTML); + // --> + </script> + </span> + <div metal:use-macro="main_macros/top_bar">Top bar</div> + <div metal:use-macro="main_macros/user_menu_bar">User menu bar</div> + <div id="Breadcrumbs"><div metal:use-macro="main_macros/Breadcrumbs">Breadcrumbs</div></div> + + <div id="main_body"> + <table id="Forematter" width="100%" cellspacing="0"> + <tr> + <td id="leftCell" class="boxes_container" width="15%"> + <span metal:use-macro="main_macros/leftCell">Left cell</span> + </td> + + <td id="mainCell" width="70%"> + + <div id="DesktopStatusBar" tal:condition="request/portal_status_message|nothing"> + <img src="info.gif" alt="Information" tal:attributes="src here/info.gif/absolute_url" i18n:attributes="alt" /> + <span tal:content="request/portal_status_message" i18n:translate="">Status message.</span> </div> - <div id="ForematterCell"> - <div class="header"> - <div tal:omit-tag="" metal:define-slot="header"> - <h1 id="DesktopTitle"> - <span tal:replace="here/title_or_id">Page Title</span> - </h1> - <div id="DesktopDescription" tal:content="structure here/Description"> - Description of the resource goes here, perhaps even wrapping lines; this is to make it long enough to test. + + <a name="documentContent"></a> + <div metal:define-slot="body" tal:omit-tag=""> + <div metal:define-slot="main_no_tabs" tal:omit-tag=""> + <div tal:condition="specialCtxHeader" tal:content="structure specialCtxHeader">special context header</div> + <div id="ContentTabs" tal:condition="not:specialCtxHeader"> + <div class="tabs" metal:use-macro="here/tabs/macros/tabs">Content tabs</div> + <div metal:use-macro="here/tabs/macros/additional_tabs">Additional tabs</div> + </div> + <div id="ForematterCell"> + <div class="header"> + <div tal:omit-tag="" metal:define-slot="header"> + <h1 id="DesktopTitle"> + <span tal:replace="here/title_or_id">Page Title</span> + </h1> + <div id="DesktopDescription" tal:content="structure here/Description"> + Description of the resource goes here, perhaps even wrapping lines; this is to make it long enough to test. + </div> </div> </div> - </div> - <div id="Desktop"> - <div metal:define-slot="main"> - <h2>Section Header</h2> - <p>The content of the object is <a href=".">rendered</a> - hre. Lorem ipsum dolorem. Nihil obstat imprimatur. Semper ubi sub ubi. - Non illegitimi carborundum. In vino veritas. E pluribus unam. - </p> + <div id="Desktop"> + <div metal:define-slot="main"> + <h2>Section Header</h2> + <p>The content of the object is <a href=".">rendered</a> + hre. Lorem ipsum dolorem. Nihil obstat imprimatur. Semper ubi sub ubi. + Non illegitimi carborundum. In vino veritas. E pluribus unam. + </p> + </div> </div> - </div> - <div tal:condition="not:isAnon" tal:omit-tag=""> - <div id="ContentByLine" metal:use-macro="here/content_byline/macros/byline"> - Content by me + <div tal:condition="not:isAnon" tal:omit-tag=""> + <div id="ContentByLine" metal:use-macro="here/content_byline/macros/byline"> + Content by me + </div> </div> + <div metal:define-slot="footer" tal:replace="nothing">footer slot</div> </div> - <div metal:define-slot="footer" tal:replace="nothing">footer slot</div> </div> - </div> - </div> - </td> - <!-- end_main_column --> + </div> + </td> + <!-- end_main_column --> - <td id="rightCell" class="boxes_container" width="15%"> - <div metal:use-macro="main_macros/rightCell">Right cell</div> - </td> - </tr> - </table> + <td id="rightCell" class="boxes_container" width="15%"> + <div metal:use-macro="main_macros/rightCell">Right cell</div> + </td> + </tr> + </table> + </div> <div id="Footer" tal:content="python:getattr(portal_object, 'copyright_notice','') or '© 2006-2014 MINES ParisTech â Benoît Pin'">© notice</div> - </div> - <div metal:use-macro="here/widgets/macros/debug"> - DEBUG Information + <div metal:use-macro="here/widgets/macros/debug"> + DEBUG Information + </div> </div> </body> diff --git a/skins/custom_generic/zpt_stylesheet.css.dtml b/skins/custom_generic/zpt_stylesheet.css.dtml index 77011e0..ce9d377 100644 --- a/skins/custom_generic/zpt_stylesheet.css.dtml +++ b/skins/custom_generic/zpt_stylesheet.css.dtml @@ -1,11 +1,14 @@ /* <dtml-with base_properties> */ +html, body { background-color: &dtml-backgroundColor;; color: &dtml-fontColor;; font-family: &dtml-fontFamily;; font-size : &dtml-fontBaseSize;; - margin: 0 } + margin: 0; + padding: 0; +} h1, h2, h3, h4, h5, h6 { font-family: &dtml-headingFontFamily;; @@ -354,7 +357,11 @@ textarea { color: &dtml-fontColor;; font-size: 80%; text-align: center; - padding : 3px; + padding : 3px 0; + position:absolute; + bottom:0; + width:100%; + height:1em; } /* Folder contents */ diff --git a/skins/generic/main_template_macros.pt b/skins/generic/main_template_macros.pt index ed5f205..ba60bc6 100644 --- a/skins/generic/main_template_macros.pt +++ b/skins/generic/main_template_macros.pt @@ -37,12 +37,13 @@ global specialCtxHeader options/specialCtxHeader|nothing" /> -<div metal:define-macro="top_bar"> +<div id="top_bar" metal:define-macro="top_bar"> <table id="Masthead" cellspacing="0" border="0"> <tr> <td id="PortalLogo"><a href="#" tal:attributes="href string:${portal_url}?noajax=1; title portal_object/title_or_id"><img src="logo.gif" tal:define="logo here/logo.png" tal:attributes="src logo/absolute_url; alt portal_object/title_or_id; height logo/height; width logo/width" /></a></td> <!-- nav_bar / search_form --> - <td id="NavBar" align="right" i18n:domain="cmf_default"> + <td id="NavBar" align="right" i18n:domain="cmf_default" + tal:condition="not:isAnon"> <form action="search" method="get" tal:attributes="action string:${portal_url}/search"> <table> <tr><td><input name="SearchableText" size="16" /><input type="submit" value="Search" i18n:attributes="value" /></td></tr> @@ -56,7 +57,8 @@ global specialCtxHeader options/specialCtxHeader|nothing" </div> -<div tal:define="uname python: (isAnon and [''] or [member.getMemberFullName(nameBefore=0)])[0]" metal:define-macro="user_menu_bar"> +<div id="user_menu_bar" metal:define-macro="user_menu_bar" + tal:define="uname python: (isAnon and [''] or [member.getMemberFullName(nameBefore=0)])[0]"> <table id="MemberActionsBox" border="0" cellspacing="0" i18n:domain="cmf_default"> <tr> <td class="ActionTitle" tal:content="uname">Guest</td>