appy.gen: continued work on Appy-specific template.
This commit is contained in:
parent
b6dcc42038
commit
48acf65bdc
10 changed files with 135 additions and 37 deletions
|
@ -5,7 +5,14 @@ body {
|
|||
|
||||
a {text-decoration: none; color: #747171;}
|
||||
a:visited {color: #840107;}
|
||||
table { font-size: 100%; border-spacing: 0px; }
|
||||
table { font-size: 100%; border-spacing: 0px; border-collapse:collapse;}
|
||||
input {border: 1px solid #a79e9e;}
|
||||
form {margin: 0; padding: 0;}
|
||||
p {margin: 0;}
|
||||
|
||||
h1 {font-size: 11pt; margin:0;}
|
||||
h2 {font-size: 10pt; margin:0; font-style: italic; font-weight: normal;}
|
||||
h3 {font-size: 9pt; margin:0; font-weight: bold;}
|
||||
|
||||
.main {
|
||||
width: 900px;
|
||||
|
@ -16,6 +23,15 @@ table { font-size: 100%; border-spacing: 0px; }
|
|||
box-shadow: 3px 3px 3px #A9A9A9;
|
||||
}
|
||||
|
||||
.top { height: 80px; margin-left: 3em; vertical-align: top;}
|
||||
.top { height: 75px; margin-left: 3em; vertical-align: top;}
|
||||
.lang { margin-right: 3px; }
|
||||
.auth { background-color: grey;}
|
||||
.userStrip {
|
||||
background-color: #a2a2a2;
|
||||
border-top: 3px solid #525252;
|
||||
border-bottom: 2px solid #9b0000;
|
||||
height: 30px;
|
||||
}
|
||||
.login { margin-top: 2px; margin-bottom: 2px; color: white;}
|
||||
.buttons { margin-left: 4px; }
|
||||
.content {margin: 7px 0 9px 4px;}
|
||||
.message {color: #9b0000; font-style: italic; position: absolute; top: -50px; right: 5px}
|
||||
|
|
32
gen/plone25/skin/appy.js
Normal file
32
gen/plone25/skin/appy.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
function cookiesAreEnabled() {
|
||||
// Test whether cookies are enabled by attempting to set a cookie and then
|
||||
// change its value
|
||||
var c = "areYourCookiesEnabled=0";
|
||||
document.cookie = c;
|
||||
var dc = document.cookie;
|
||||
// Cookie not set? Fail
|
||||
if (dc.indexOf(c) == -1) return 0;
|
||||
// Change test cookie
|
||||
c = "areYourCookiesEnabled=1";
|
||||
document.cookie = c;
|
||||
dc = document.cookie;
|
||||
// Cookie not changed? fail
|
||||
if (dc.indexOf(c) == -1) return 0;
|
||||
// Delete cookie
|
||||
document.cookie = "areYourCookiesEnabled=; expires=Thu, 01-Jan-70 00:00:01 GMT";
|
||||
return 1;
|
||||
}
|
||||
|
||||
function setLoginVars() {
|
||||
// Indicate if JS is enabled
|
||||
document.getElementById('js_enabled').value = 1;
|
||||
// Indicate if cookies are enabled
|
||||
document.getElementById('cookies_enabled').value = cookiesAreEnabled();
|
||||
// Copy login and password length to alternative vars since current vars will
|
||||
// be removed from the request by zope's authentication mechanism.
|
||||
document.getElementById('login_name').value = document.getElementById('__ac_name').value;
|
||||
password = document.getElementById('__ac_password');
|
||||
emptyPassword = document.getElementById('pwd_empty');
|
||||
if (password.value.length==0) emptyPassword.value = '1';
|
||||
else emptyPassword.value = '0';
|
||||
}
|
BIN
gen/plone25/skin/home.gif
Normal file
BIN
gen/plone25/skin/home.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 589 B |
Binary file not shown.
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.3 KiB |
BIN
gen/plone25/skin/logout.gif
Normal file
BIN
gen/plone25/skin/logout.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 636 B |
|
@ -12,7 +12,8 @@
|
|||
|
||||
<head>
|
||||
<title tal:content="tool/getAppName"></title>
|
||||
<link rel="stylesheet" tal:attributes="href string:$appUrl/skyn/appy.css" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" tal:attributes="href string:$appUrl/skyn/appy.css"/>
|
||||
<script type="text/javascript" tal:attributes="src string:$appUrl/skyn/appy.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -23,7 +24,7 @@
|
|||
<table width="100%">
|
||||
<tr valign="top">
|
||||
<tal:comment replace="nothing">Logo</tal:comment>
|
||||
<td><img src="skyn/logo.jpg"/></td>
|
||||
<td><a tal:attributes="href appUrl"><img src="skyn/logo.jpg"/></a></td>
|
||||
<tal:comment replace="nothing">Language selector (links or listbox)</tal:comment>
|
||||
<td align="right"
|
||||
tal:define="appLangs app/portal_languages/listSupportedLanguages;
|
||||
|
@ -54,25 +55,72 @@
|
|||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tal:comment replace="nothing">The login strip</tal:comment>
|
||||
<tr class="auth">
|
||||
<tal:comment replace="nothing">The user data strip</tal:comment>
|
||||
<tr>
|
||||
<td>
|
||||
<table witdh="100%">
|
||||
<table class="userStrip" width="100%">
|
||||
<tr>
|
||||
<td>a </td>
|
||||
<td>
|
||||
<tal:comment replace="nothing">The user login form for anonymous users</tal:comment>
|
||||
<table align="center" tal:condition="isAnon" class="login"
|
||||
tal:define="auth nocall:app/acl_users/credentials_cookie_auth">
|
||||
<tr><td>
|
||||
<form name="loginform" method="post"
|
||||
tal:attributes="action python: tool.absolute_url() + '/performLogin'">
|
||||
|
||||
<input type="hidden" name="js_enabled" id="js_enabled" value="0"/>
|
||||
<input type="hidden" name="cookies_enabled" id="cookies_enabled" value=""/>
|
||||
<input type="hidden" name="login_name" id="login_name" value=""/>
|
||||
<input type="hidden" name="pwd_empty" id="pwd_empty" value="0"/>
|
||||
|
||||
<span>Login</span>
|
||||
<input type="text" size="15" name="__ac_name" id="__ac_name" value=""/>
|
||||
<span>Password</span>
|
||||
<input type="password" size="15" name="__ac_password" id="__ac_password"/>
|
||||
<input type="submit" name="submit" onclick="setLoginVars()"
|
||||
tal:define="label python: _('Login');" tal:attributes="value label; alt label;"/>
|
||||
</form>
|
||||
</td></tr>
|
||||
</table>
|
||||
<tal:comment replace="nothing">User info and controls for authenticated users</tal:comment>
|
||||
<table tal:condition="not: isAnon" class="buttons">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Go home -->
|
||||
<a tal:attributes="href appUrl; title python: _('home')">
|
||||
<img src="skyn/home.gif"/>
|
||||
</a>
|
||||
<!-- Logout -->
|
||||
<a tal:attributes="href python: tool.absolute_url() + '/performLogout';
|
||||
title python: _('logout')">
|
||||
<img src="skyn/logout.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tal:comment replace="nothing">The message strip</tal:comment>
|
||||
<tr tal:define="msg request/portal_status_message | nothing">
|
||||
<td>
|
||||
<div style="position: relative" align="right">
|
||||
<div tal:condition="msg" class="message" tal:content="structure msg"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span metal:define-slot="content"><span tal:content="isAnon"></span></span></td>
|
||||
<td>
|
||||
<table class="content" width="100%">
|
||||
<tr>
|
||||
<td><span metal:define-slot="content"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<h1>Appy</h1>
|
||||
<h2>Sub appy</h2>
|
||||
<h3>Sub sub appy</h3>
|
||||
<p>Hello</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue