Imported from SVN by Bitbucket

This commit is contained in:
2015-03-31 20:01:45 +00:00
committed by bitbucket
commit 28581309ce
47 changed files with 1087 additions and 0 deletions

View File

@@ -0,0 +1 @@
#

View File

@@ -0,0 +1,39 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="caotek.tcshome_theme">
<!-- 'tcshome.org site theme' Zope 3 browser layer -->
<interface
interface=".interfaces.IThemeSpecific"
type="zope.publisher.interfaces.browser.IBrowserSkinType"
name="tcshome.org Site theme"
/>
<!-- Viewlets registration -->
<browser:viewlet
name="caotek.tcshome_theme.footer"
manager="plone.app.layout.viewlets.interfaces.IPortalFooter"
class="plone.app.layout.viewlets.common.FooterViewlet"
template="templates/footer.pt"
layer=".interfaces.IThemeSpecific"
permission="zope2.View"
/>
<!-- Zope 3 browser resources -->
<!-- Resource directory for images -->
<browser:resourceDirectory
name="caotek.tcshome_theme.images"
directory="images"
layer=".interfaces.IThemeSpecific"
/>
<!-- Resource directory for stylesheets -->
<browser:resourceDirectory
name="caotek.tcshome_theme.stylesheets"
directory="stylesheets"
layer=".interfaces.IThemeSpecific"
/>
</configure>

View File

@@ -0,0 +1,56 @@
README for the 'browser/images/' directory
==========================================
This folder is a Zope 3 Resource Directory acting as a repository for images.
Its declaration is located in 'browser/configure.zcml':
<!-- Resource directory for images -->
<browser:resourceDirectory
name="caotek.tcshome_theme.images"
directory="images"
layer=".interfaces.IThemeSpecific"
/>
An image placed in this directory (e.g. 'logo.png') can be accessed from
this relative URL:
"++resource++caotek.tcshome_theme.images/logo.png"
Note that it might be better to register each of these resources separately if
you want them to be overridable from zcml directives.
The only way to override a resource in a resource directory is to override the
entire directory (all elements have to be copied over).
A Zope 3 browser resource declared like this in 'browser/configure.zcml':
<browser:resource
name="logo.png"
file="images/logo.png"
layer=".interfaces.IThemeSpecific"
/>
can be accessed from this relative URL:
"++resource++logo.png"
Notes
-----
* Whatever the way they are declared (in bulk inside a resource directory or
as separate resources), images registered as Zope 3 browser resources don't
have all the attributes that Zope 2 image objects have (i.e. the 'title'
property and the 'tag()' and 'get_size()' methods).
This means that if you want the html tag of your image to be auto-generated
(this is the case by default for the portal logo), you should store it in a
directory that is located in the 'skins/' folder of your package, registered
as a File System Directory View in the 'portal_skins' tool, and added to the
layers of your skin.
* Customizing/overriding images that are originally accessed from the
'portal_skins' tool (e.g. Plone default logo and icons) can be done inside
that tool only. There is no known way to do it with Zope 3 browser
resources.
Vice versa, there is no known (easy) way to override a Zope 3 browser
resource from a skin layer in 'portal_skins'.

View File

@@ -0,0 +1,6 @@
from plone.theme.interfaces import IDefaultPloneLayer
class IThemeSpecific(IDefaultPloneLayer):
"""Marker interface that defines a Zope 3 browser layer.
"""

View File

@@ -0,0 +1,61 @@
README for the 'browser/stylesheets/' directory
===============================================
This folder is a Zope 3 Resource Directory acting as a repository for
stylesheets.
Its declaration is located in 'browser/configure.zcml':
<!-- Resource directory for stylesheets -->
<browser:resourceDirectory
name="caotek.tcshome_theme.stylesheets"
directory="stylesheets"
layer=".interfaces.IThemeSpecific"
/>
A stylesheet placed in this directory (e.g. 'main.css') can be accessed from
this relative URL:
"++resource++caotek.tcshome_theme.stylesheets/main.css"
Note that it might be better to register each of these resources separately if
you want them to be overridable from zcml directives.
The only way to override a resource in a resource directory is to override the
entire directory (all elements have to be copied over).
A Zope 3 browser resource declared like this in 'browser/configure.zcml':
<browser:resource
name="main.css"
file="stylesheets/main.css"
layer=".interfaces.IThemeSpecific"
/>
can be accessed from this relative URL:
"++resource++main.css"
Notes
-----
* Stylesheets registered as Zope 3 resources might be flagged as not found in
the 'portal_css' tool if the layer they are registered for doesn't match the
default skin set in 'portal_skins'.
This can be confusing but it must be considered as a minor bug in the CSS
registry instead of a lack in the way Zope 3 resources are handled in
Zope 2.
* There might be a way to interpret DTML from a Zope 3 resource view.
Although, if you need to use DTML for setting values in a stylesheet (the
same way as in default Plone stylesheets where values are read from
'base_properties'), it is much easier to store it in a directory that is
located in the 'skins/' folder of your package, registered as a File System
Directory View in the 'portal_skins' tool, and added to the layers of your
skin.
* Customizing/overriding stylesheets that are originally accessed from the
'portal_skins' tool (e.g. Plone default stylesheets) can be done inside that
tool only. There is no known way to do it with Zope 3 browser resources.
Vice versa, there is no known way to override a Zope 3 browser resource from
a skin layer in 'portal_skins'.

View File

@@ -0,0 +1,2 @@
/* Stylesheet for the 'tcshome.org site theme' Plone theme */

View File

@@ -0,0 +1,67 @@
<div metal:define-macro="portal_footer"
i18n:domain="plone"
class="row">
<div class="cell width-full position-0">
<div id="portal-footer"
tal:define="portal_state context/@@plone_portal_state;
portal_url portal_state/portal_url;">
<table width="100%" align="center">
<tr valign="top">
<td width=25%>
<p align="left">
<b>Nhạc</b><br />
<a href="/songs/albums/">Tập nhạc</a><br />
<a href="/songs/titles/">Bài hát</a><br />
<a href="/songs/ghita/">Nhạc soạn cho ghita</a><br />
<a href="/songs/mp3/">MP3</a>
</p>
<br />
<p align="left">
<b>Thơ-Văn</b><br />
<a href="/writings/">Bài viết và thơ của TCS</a><br />
</p>
</td>
<td width=25%>
<p align="left">
<b>Tranh</b><br />
<a href="/paintings/chan-dung/">Chân dung</a><br />
<a href="/paintings/bia-tap-nhac/">Bìa Tập nhạc</a><br />
<a href="/paintings/but-tich/">Bút tích</a><br />
<a href="/paintings/ky-hoa-chan-dung/">Ký họa chân dung</a><br />
<a href="/paintings/trien-lam-tranh-1990/">Triển lãm tranh, 1990</a><br />
<a href="/paintings/buu-chi-ve-tcs">Bửu Chỉ vẽ TCS</a><br />
<a href="/paintings/dinh-cuong-ve-tcs">Ðinh Cường vẽ TCS</a><br />
<a href="/paintings/dinh-truong-chinh-ve-tcs">Ðinh Trường Chinh vẽ TCS</a><br />
<a href="/paintings/ban-be-ve-tcs/">Bạn bè vẽ TCS</a>
</p>
</td>
<td width=25%>
<p align="left">
<b>Hình ảnh</b><br />
<a href="/photos/album-1/">Trịnh Công Sơn </a><br />
<a href="/photos/album-2/">TCS và bạn bè </a><br />
<a href="/photos/album-3/">Các ca sĩ Trịnh</a>
</p>
</td>
<td width=25%>
<p align="left">
<b>Góc người mến mộ</b><br />
<a href="/ban-be/vinh-biet-anh-son/">Vĩnh biệt anh Sơn</a><br />
<a href="/ban-be/articles/">Bài viết về TCS</a><br />
<a href="/ban-be/poems/">Thơ về TCS</a><br />
<a href="/ban-be/books/">Sách - Luận văn</a><br />
<a href="/ban-be/sinh-hoat/">Các đêm nhạc TCS</a><br />
</p>
</td>
</tr>
</table>
<br />
<br />
<p align="center">
Copyright © 2004-2006 by <a href="" tal:attributes="href string:$portal_url/about/apropos-de-tcs-association-culturelle">TCS-Association Culturelle</a>
</p>
</div>
</div>
</div>

View File

@@ -0,0 +1 @@
<div tal:content="view/computed_value|nothing"/>

View File

@@ -0,0 +1,2 @@
#from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
#from plone.app.layout.viewlets.common import ViewletBase