add a default theme for vertical scrolling (fixes #53)
* includes/galleryfunctions.php: - add the theme parameter to generated gallery links if the gallery has initially been called with a theme parameter * themes/default_vertical: default vertical theme
This commit is contained in:
parent
22ad44f0a8
commit
6a3c06c224
4 changed files with 117 additions and 2 deletions
|
@ -325,10 +325,20 @@ function getGalleryLinks() {
|
|||
GLOB_ONLYDIR) as $directory) {
|
||||
$basename = basename($directory);
|
||||
if (galleryExists($basename)) {
|
||||
$url = sprintf('index.php?galleryname=%s', urlencode($basename));
|
||||
$urlparams = array();
|
||||
$urlparams['galleryname'] = $basename;
|
||||
if (array_key_exists('theme', $_GET)) {
|
||||
$urlparams['theme'] = $_GET['theme'];
|
||||
}
|
||||
$parts = array();
|
||||
foreach ($urlparams as $key => $value) {
|
||||
$parts[] = sprintf("%s=%s", $key, urlencode($value));
|
||||
}
|
||||
$url = sprintf('index.php?%s',
|
||||
implode(ini_get('arg_separator.output'), $parts));
|
||||
$retval[] = array('gallery' => $basename,
|
||||
'label' => getGalleryLabel($basename),
|
||||
'url' => $url);
|
||||
'url' => htmlspecialchars($url));
|
||||
}
|
||||
}
|
||||
return $retval;
|
||||
|
|
49
themes/default_vertical/css/main.css
Normal file
49
themes/default_vertical/css/main.css
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Jan Dittberner <jan@dittberner.info>
|
||||
* Jan Dittberner IT-Consulting & -Solutions
|
||||
* Cottbuser Str. 1, D-01129 Dresden
|
||||
*
|
||||
* This file is part of the ScrollingJQueryGallery component of the
|
||||
* gnuviech-server.de Websitetools
|
||||
*
|
||||
* ScrollingJQueryGallery is free software: you can redistribute it
|
||||
* and/or modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* ScrollingJQueryGallery is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with ScrollingJQueryGallery. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
@charset "UTF-8";
|
||||
|
||||
body {
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#slider {
|
||||
width:90px;
|
||||
float:left;
|
||||
margin-left:10px;
|
||||
margin-right:10px;
|
||||
}
|
||||
|
||||
#arrup, #arrdown {
|
||||
heigt:10px;
|
||||
}
|
||||
|
||||
#imgscroller {
|
||||
height:200px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
#scrollable {
|
||||
position:relative;
|
||||
}
|
4
themes/default_vertical/theme.ini
Normal file
4
themes/default_vertical/theme.ini
Normal file
|
@ -0,0 +1,4 @@
|
|||
themename=Vertical default theme
|
||||
themetype=vertical
|
||||
previewsize=311
|
||||
thumbsize=90
|
52
themes/default_vertical/theme.php
Normal file
52
themes/default_vertical/theme.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $content['lang'] ; ?>">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?php echo $content['title']; ?></title>
|
||||
<style type="text/css">
|
||||
<?php print($content['inlinestyle']); ?>
|
||||
</style>
|
||||
<?php foreach ($content['styles'] as $style) { ?>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $style; ?>" />
|
||||
<?php } ?>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $content['themepath']; ?>/css/main.css" />
|
||||
<script type="text/javascript"><!--
|
||||
<?php echo $content['inlinescript']; ?>
|
||||
|
||||
//--></script>
|
||||
<?php foreach ($content['scripts'] as $script) { ?>
|
||||
<script type="text/javascript" src="<?php echo $script; ?>"></script>
|
||||
<?php } ?>
|
||||
</head>
|
||||
<body>
|
||||
<ul id="menu"><?php foreach ($content['gallerylinks'] as $data) {
|
||||
printf('<li class="menu%s"><a class="menu" href="%s">%s </a></li>',
|
||||
($data['gallery'] == $content['gallery']) ? ' active' : '',
|
||||
$data['url'], $data['label']);
|
||||
} ?></ul>
|
||||
<div id="slider">
|
||||
<div id="arrup">up</div>
|
||||
<div id="imgscroller">
|
||||
<div id="scrollable"><?php
|
||||
foreach($content['thumbnails'] as $thumb) {
|
||||
?><div class="thumbnail"><img src="<?php echo $thumb['src']; ?>" alt="<?php echo $thumb['alt']; ?>" <?php echo $thumb['sizes']; ?> /></div><?php
|
||||
} ?></div></div>
|
||||
<div id="arrdown">down</div>
|
||||
</div>
|
||||
<div id="content_main"><?php
|
||||
$data = $content['firstpreview'];
|
||||
printf('<a class="lightbox" title="%s" href="%s" rel="lightbox">' .
|
||||
'<img id="contentimg" src="%s" alt="%s" %s /></a>',
|
||||
$data['title'], $data['full'], $data['src'], $data['alt'],
|
||||
$data['sizes']);
|
||||
?></div>
|
||||
<div class="imgdescription" id="imagedescription"><?php
|
||||
echo $content['firstdescription'];
|
||||
?></div>
|
||||
<div id="content_nav">
|
||||
<span id="backbtn">Back</span>
|
||||
<span id="fwdbtn">Forward</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in a new issue