page templating and css management
This commit is contained in:
parent
c1fe66bec5
commit
6d74c2c594
@ -358,15 +358,17 @@ if($a->module != 'install') {
|
|||||||
|
|
||||||
|
|
||||||
$page_css = 'view/theme/' . current_theme() . '/'
|
$page_css = 'view/theme/' . current_theme() . '/'
|
||||||
. ((x($a->page,'layout')) ? $a->page['layout'] : 'layout' ) . '.css';
|
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.css';
|
||||||
|
|
||||||
if(! file_exists($page_css))
|
if(! file_exists($page_css))
|
||||||
$page_css = str_replace('theme/' . current_theme() . '/', '', $page_css);
|
$page_css = str_replace('theme/' . current_theme() . '/', '', $page_css);
|
||||||
|
|
||||||
$module_css = 'view/theme/' . current_theme() . '/mod_' . $a->module . '.css';
|
$module_css = 'view/theme/' . current_theme() . '/mod_' . $a->module . '.css';
|
||||||
|
|
||||||
if(! file_exists($module_css))
|
if(! file_exists($module_css))
|
||||||
$module_css = str_replace('theme/' . current_theme() . '/', '', $module_css);
|
$module_css = str_replace('theme/' . current_theme() . '/', '', $module_css);
|
||||||
if(! file_exists($module_css))
|
|
||||||
|
if(! file_exists($module_css))
|
||||||
$module_css = null;
|
$module_css = null;
|
||||||
|
|
||||||
$interval = ((local_user()) ? get_pconfig(local_user(),'system','update_interval') : 40000);
|
$interval = ((local_user()) ? get_pconfig(local_user(),'system','update_interval') : 40000);
|
||||||
@ -386,7 +388,7 @@ if(! file_exists($module_css))
|
|||||||
'$showfewer' => t('show fewer'),
|
'$showfewer' => t('show fewer'),
|
||||||
'$update_interval' => $interval,
|
'$update_interval' => $interval,
|
||||||
'$page_css' => $a->get_baseurl() . '/' . $page_css,
|
'$page_css' => $a->get_baseurl() . '/' . $page_css,
|
||||||
'$module_css' => $a->get_baseurl() . '/' . $module_css,
|
'$module_css' => (($module_css) ? $a->get_baseurl() . '/' . $module_css : null),
|
||||||
'$stylesheet' => current_theme_url(),
|
'$stylesheet' => current_theme_url(),
|
||||||
'$theme' => current_theme()
|
'$theme' => current_theme()
|
||||||
));
|
));
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function zregister_init(&$a) {
|
function zregister_init(&$a) {
|
||||||
$a->page['layout'] = 'full';
|
$a->page['template'] = 'full';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
20
view/default.css
Normal file
20
view/default.css
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
nav {
|
||||||
|
height: 94px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
display: block;
|
||||||
|
min-height: 112px;
|
||||||
|
width: 200px;
|
||||||
|
position: absolute;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding-left: 250px;
|
||||||
|
display: block;
|
||||||
|
min-height: 112px;
|
||||||
|
}
|
10
view/full.css
Normal file
10
view/full.css
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
nav {
|
||||||
|
height: 94px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
display: block;
|
||||||
|
min-height: 112px;
|
||||||
|
}
|
14
view/full.php
Normal file
14
view/full.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html >
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
|
||||||
|
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
|
||||||
|
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<section><?php if(x($page,'content')) echo $page['content']; ?>
|
||||||
|
<div id="page-footer"></div>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -8,8 +8,8 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="$baseurl/library/jslider/bin/jquery.slider.min.css" media="screen" />
|
<link rel="stylesheet" type="text/css" href="$baseurl/library/jslider/bin/jquery.slider.min.css" media="screen" />
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="$page_css" media="all" />
|
<link rel="stylesheet" type="text/css" href="$page_css" media="all" />
|
||||||
{{ if $mod_css }}
|
{{ if $module_css }}
|
||||||
<link rel="stylesheet" type="text/css" href="$mod_css" media="all" />
|
<link rel="stylesheet" type="text/css" href="$module_css" media="all" />
|
||||||
{{ endif }}
|
{{ endif }}
|
||||||
<link rel="stylesheet" type="text/css" href="$stylesheet" media="all" />
|
<link rel="stylesheet" type="text/css" href="$stylesheet" media="all" />
|
||||||
|
|
||||||
|
27
view/mod_zregister.css
Normal file
27
view/mod_zregister.css
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-left: 15%;
|
||||||
|
margin-top: 15%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zregister-form {
|
||||||
|
font-size: 1.4em;
|
||||||
|
margin-left: 15%;
|
||||||
|
margin-top: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zregister-label {
|
||||||
|
float: left;
|
||||||
|
width: 275px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zregister-input {
|
||||||
|
float: left;
|
||||||
|
width: 275px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zregister-field-end {
|
||||||
|
clear: both;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
@ -87,7 +87,6 @@ blockquote {
|
|||||||
|
|
||||||
/* nav */
|
/* nav */
|
||||||
nav {
|
nav {
|
||||||
height: 94px;
|
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0px 10%;
|
margin: 0px 10%;
|
||||||
border-bottom: 1px solid #babdb6;
|
border-bottom: 1px solid #babdb6;
|
||||||
@ -176,14 +175,11 @@ nav #nav-link-wrapper .nav-link {
|
|||||||
aside {
|
aside {
|
||||||
display: block;
|
display: block;
|
||||||
min-height: 112px;
|
min-height: 112px;
|
||||||
width: 200px;
|
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
float: left;
|
|
||||||
background-image: url(border.jpg);
|
background-image: url(border.jpg);
|
||||||
background-position: top left;
|
background-position: top left;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
position: absolute;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#dfrn-request-link {
|
#dfrn-request-link {
|
||||||
@ -211,16 +207,13 @@ aside {
|
|||||||
section {
|
section {
|
||||||
margin: 0px 10%;
|
margin: 0px 10%;
|
||||||
padding-top: 1em;
|
padding-top: 1em;
|
||||||
padding-left: 250px;
|
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
display: block;
|
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
background-image: url(border.jpg);
|
background-image: url(border.jpg);
|
||||||
background-position: top right;
|
background-position: top right;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
min-height: 112px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
height: 27px;
|
height: 27px;
|
||||||
background-image: url(head.jpg);
|
background-image: url(head.jpg);
|
||||||
@ -3305,24 +3298,3 @@ ul.menu-popup {
|
|||||||
left: 5%;
|
left: 5%;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#zregister-form {
|
|
||||||
font-size: 1.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.zregister-label {
|
|
||||||
float: left;
|
|
||||||
width: 275px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.zregister-input {
|
|
||||||
float: left;
|
|
||||||
width: 275px;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.zregister-field-end {
|
|
||||||
clear: both;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
Reference in New Issue
Block a user