Support > cpg1.5 theme contributions
Curve responsive theme (responsive coppermine theme)
allvip:
--- Quote from: whats_up_skip on April 11, 2015, 06:47:40 am ---Any idea why I getting a big gap between the Menu and the Breadcrumbs:
http://www.gojapango.com/japan_picture/index.php?cat=16
It is happening on another gallery as well.
--- End quote ---
Even the default curve theme has the gap, but if you don't like it then open themes/curve_responsive/style.css and find:
--- Code: ---.menuheight { /* IE7 */
width: 1px; /* IE7 */
height: 95px; /* IE7 */
}
--- End code ---
replace 95 with a smaller value like 45 or 25.
allvip:
--- Quote from: whats_up_skip on April 12, 2015, 11:16:49 pm ---I notice with this theme that when the screen becomes smaller such as one a mobile phone that the outer border/background still shows. It would be good if this disappeared completely.
--- End quote ---
Added to version v1.2.
allvip:
--- Quote from: whats_up_skip on April 13, 2015, 02:30:51 am ---I have been looking further into this theme and I can't understand how it is calling or formatting the intermediate image page as there doesn't seem to be a {IMAGE} in the theme.php file.
--- End quote ---
All the functions are in include/themes.inc.php. You must never edit themes.inc.php. They don't have to be in your theme. Only when you want to edit the page that has the image you need to add the function that has {IMAGE} in your theme. This functon is $template_display_media:
--- Code: ---/******************************************************************************
** Section <<<$template_display_media>>> - START
******************************************************************************/
// HTML template for intermediate image display
$template_display_media = <<<EOT
<tr>
<td align="center" class="display_media" nowrap="nowrap">
<table width="100%" cellspacing="2" cellpadding="0">
<tr>
<td align="center" style="{SLIDESHOW_STYLE}">
{IMAGE}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" cellspacing="2" cellpadding="0" class="tableb tableb_alternate">
<tr>
<td align="center">
{ADMIN_MENU}
</td>
</tr>
</table>
<!-- BEGIN img_desc -->
<table cellpadding="0" cellspacing="0" class="tableb tableb_alternate" width="100%">
<!-- BEGIN title -->
<tr>
<td class="tableb tableb_alternate"><h1 class="pic_title">
{TITLE}
</h1></td>
</tr>
<!-- END title -->
<!-- BEGIN caption -->
<tr>
<td class="tableb tableb_alternate"><h2 class="pic_caption">
{CAPTION}
</h2></td>
</tr>
<!-- END caption -->
</table>
<!-- END img_desc -->
</td>
</tr>
EOT;
/******************************************************************************
** Section <<<$template_display_media>>> - END
******************************************************************************/
--- End code ---
OR theme_display_image
--- Code: ---/******************************************************************************
** Section <<<theme_display_image>>> - START
******************************************************************************/
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
global $CONFIG, $LINEBREAK;
$superCage = Inspekt::makeSuperCage();
$width = $CONFIG['picture_table_width'];
echo '<a name="top_display_media"></a>'; // set the navbar-anchor
starttable();
echo $nav_menu;
endtable();
starttable();
echo $picture;
endtable();
if ($CONFIG['display_film_strip'] == 1) {
echo $film_strip;
}
echo $votes;
$picinfo = $superCage->cookie->keyExists('picinfo') ? $superCage->cookie->getAlpha('picinfo') : ($CONFIG['display_pic_info'] ? 'block' : 'none');
echo $LINEBREAK . '<div id="picinfo" style="display: '.$picinfo.';">' . $LINEBREAK;
starttable();
echo $pic_info;
endtable();
echo '</div>' . $LINEBREAK;
echo '<a name="comments_top"></a>';
echo '<div id="comments">' . $LINEBREAK;
echo $comments;
echo '</div>' . $LINEBREAK;
}
/******************************************************************************
** Section <<<theme_display_image>>> - END
******************************************************************************/
--- End code ---
You can find all the functions in themes/sample/theme.php. Anytime you need to make changes, just add the function you need to theme/your_theme_name/theme.php and make changes. Do not copy them from include/theme.inc.php.
whats_up_skip:
Thanks again for your work on this.
I have been having a go at making some adjustments, but I seem to break as much as I fix. You can see what I have done so far:
http://www.gojapango.com/japan_picture/displayimage.php?album=60&pid=1436&theme=curve_responsive_craig
Even works ok on the thumbnails.php?album page: http://www.gojapango.com/japan_picture/thumbnails.php?album=60&theme=curve_responsive_craig
There are clearly still many problems I haven't worked through:
Breadcrumbs are going below their bar and the links are too close together.
Navigation bar just below: text is too small and the up down arrows are too small and too close together.
Navigation bar at the bottom of the page: text is too small, individual page links are on top of each other.
index.php?cat is a real problem. The pictures need to be aligned above the text as is the case for the thumbnails.php?album page
whats_up_skip:
The main table in index.php?cat doesn't seem to be working responsively.
It isn't obvious why as the code basically looks responsive, with the possible exception of
--- Code: ---.tableb {
background: #F0F4F7 ;
padding-top: 3px;
padding-right: 10px;
padding-bottom: 3px;
padding-left: 10px;
}
--- End code ---
Particularly the padding left and right are fixed, not percentages, but this isn't the real cause of the problem.
I notice with thumbnails.php?album pages that the code for defining the table is very different using three columns:
--- Code: ---<!-- Start standard table -->
<table align="center" width="100%" cellspacing="1" cellpadding="0" class="maintable ">
<tr>
<td colspan="3" align="left">
<div class="cpg_starttable_outer">
<div class="cpg_starttable_inner">
--- End code ---
Where as index.php?cat
--- Code: ---<!-- Start standard table -->
<table align="center" width="100%" cellspacing="1" cellpadding="0" class="maintable ">
<tr class="tableb tableb_alternate">
<td width="34%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0">
--- End code ---
I haven't been able to get any further than this so far.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version