forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 themes (visuals) => Topic started by: ron4mac on January 05, 2019, 04:28:27 pm

Title: Building a CPG 1.6.x responsive theme
Post by: ron4mac on January 05, 2019, 04:28:27 pm
Here is the start of my attempt at creating a responsive theme for CPG (1.6.x only). It still needs a lot of work but I thought I would put it here in hopes of getting feedback to help it along its way. The purpose for developing this is geared more toward determining how the CPG core will need to be changed to provide native support for responsive themes rather than just trying to create a super stylish theme. So the more people willing to test this theme and provide feedback, the sooner CPG will provide native support for responsive themes.

It currently uses the jQuery 1.11.2 and bootstrap 3.3.7 frameworks. I'm not happy using bootstrap and hope to soon write it out of use.

The theme will have built-in swipe and keyboard navigation.

It uses 2 .css files: theme.css (which should not be changed) and style.css. If a file named custom.css is placed in the theme folder, it will use that file instead of style.css. I totally suck at styling web pages so I'll hopefully be able to provide the means for you to make it look good. Don't put much effort into that yet, though, as it's currently being built on sand.

It is not dependent on its folder name, so you can name it as you please.

Update: v0.6 Added swipe and keyboard navigation; adjustments for some admin screens
Update: v0.8 Removed need for bootstrap; renamed folder to just respond
Title: Re: Building a CPG 1.6.x responsive theme
Post by: Phill Luckhurst on January 05, 2019, 10:53:31 pm
Well done on things so far. It is rare for coders to be talented designers and vice versa, I think that is why many open source projects struggle in this area.

As for bootstrap, I agree. Teams are moving away from it for so many reasons.

I look forward to seeing peopleís thoughs on your theme. It certainly seems the way forward to me.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: netb on January 11, 2019, 01:32:35 pm
Looking forward to how this develops.

Quite a while ago I did replace some tables with div's in my theme.php and have been thinking of cleaning it up to post here as a sample but haven't got the time. Seems you did it in a better way, since what I did was kind of dirty, e.g.:

Code: [Select]
<!-- BEGIN album_cell -->
        <td width="{COL_WIDTH}%">
        <div>
<div class="tableh2">
<span class="alblink"><a href="{ALB_LINK_TGT}">{ALBUM_TITLE}</a></span>
</div>
<div class="thumbnails">
<img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br /><a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
</div>
<div class="tableb tableb_alternate">
{ADMIN_MENU}
<!-- Hide Album Description below Gallery Thumbnail <p>{ALB_DESC}</p> -->
<p class="album_stat">{ALB_INFOS}<br />{ALB_HITS}</p>
</div>
</div>
        </td>
<!-- END album_cell -->
But hey, it worked for me and just used some css
Code: [Select]
@media only screen and (max-width:... to make some elemets responsive.


I don't like that there are jQuery and Bootstrap involved but it is my personal opinion of course because I like things to be more lightweight of sorts.

Great Job, nevertheless! Keep going.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: eule on February 13, 2019, 08:40:09 am
Thanks for the theme looks great i will try it on one of my pages.
I hope its ok if i remove the bricksotnes:-)

Greetings
Title: Re: Building a CPG 1.6.x responsive theme
Post by: tomskafo on April 09, 2019, 05:11:17 pm
Ron4mac, I put your theme. I like it - this is the best thing I've ever seen.
How it looks, see the link in my signature.
And also I will have comments and requests to correct what seems to me not to be as it should be.
Do you mind? I will use your theme and actively test.

1. At the top right, we see two words - Albums and Files - the words crawled over each other, blocked each other. That would be a fix.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: ron4mac on April 10, 2019, 04:54:19 pm
1. At the top right, we see two words - Albums and Files - the words crawled over each other, blocked each other. That would be a fix.

See the update above...
Title: Re: Building a CPG 1.6.x responsive theme
Post by: tomskafo on April 10, 2019, 06:24:48 pm
Ron4mac, I put this theme now. At the top I do not like that there is very little space. The words "Gallery Name" and "Gallery Description" - these texts are almost invisible to me on large monitors:
Quote
Галерея цветов
Загружаемое фото обязательно подписывайте и показывайте в темах!

And on small monitors and smartphones, the phrases "Персональные альбомы ........................................ Альбомы492 Файлы12,021" - crawl over each other and overlap each other. This is very inconvenient and unreadable, spoils the style of the main page of the gallery.

See for yourself and try to compress the browser window to a minimum. Phrases and words should not crawl over each other. They should be readable on both large and small screens  http://fialka.tomsk.ru/forum/gallery/

In all other respects, this theme seemed to me more convenient and thoughtful. All elements have a very high degree of adaptability and mobility.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: ron4mac on April 10, 2019, 07:00:36 pm
Thanks for your feedback.  I will be away for a while but will work on this again as soon as I can.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: tomskafo on April 12, 2019, 08:01:43 pm
ron4mac, we are very pleased and grateful. This is the only mobile and adaptive Coppermine Photo Gallery in the world. This theme works very well and we will use it.

And now about what would like to fix. Above, I wrote is not quite accurate and correct when I said:
Quote
At the top I do not like that there is very little space. The words "Gallery Name" and "Gallery Description" - these texts are almost invisible to me on large monitors
Then I understood why I see it at the top of the gallery. It turned out that the top of the topic on my computer is blocked by a program - an ad blocker - it is called "Ad Muncher", this is its creator: https://www.admuncher.com/

And I thought: this is wrong. The ad blocker program does block not ads, but part of the style, an important top of the gallery theme. Therefore, I did not see any inscriptions there and it seemed to me that there was not enough space above.
The top of the topic should not be blocked by ad blockers. After all, other people also see the crumpled top of the gallery, many people today have ad blockers.

And why was the top of the gallery blocked? I think this is because of the name of the image file with tiles - it is called a "banner". Advertising blockers block all banners by default. It's unavoidable. Need a different name. It seems to me. Or search for another reason - why the top gallery are blocked by ad blockers.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: tomskafo on April 12, 2019, 08:16:19 pm
About what I previously wrote:
Quote
And on small monitors and smartphones, the phrases "Персональные альбомы ........................................ Альбомы492 Файлы12,021" - crawl over each other and overlap each other. This is very inconvenient and unreadable, spoils the style of the main page of the gallery.
It looked like this on smartphones:

I corrected it, put one the phrase under the other so that they did not crawl onto each other.
didnít make any serious changes, except that he translated some words into our language and slightly changed color:
strip <div class="cat-stats">
and
picture /banners/banner5.jpg
Title: Re: Building a CPG 1.6.x responsive theme
Post by: Sweetener on October 21, 2019, 06:34:08 am
You should put this code in order to make the film responsive too  ;)

Code: [Select]
#film {
width: 100%!important;
}

#film .tape {
width: 100%!important;
height: 100%!important;
margin-left: 0!important;
}

#film .tape a {
width: 100%!important;
}

/* here you can decide the sizes */
#film .tape a img {
width: 14vw!important;
max-width: 100px;
}
Title: Re: Building a CPG 1.6.x responsive theme
Post by: sharpo on October 21, 2019, 12:43:05 pm
You've been very helpful with my problems in the past Ron, so having just noticed this topic I thought I would give it a try.

Swiping the intermediate image on my Android tablet works fine but on my mobile there are problems - swiping from right to left just moves the whole page across, as if you were viewing thumbnails, and swiping left to right does work, but only on the second swipe each time.

Just feedback for you, I'm not waiting for it to be corrected - but will give it a try later if you do fix the problem.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: sharpo on October 26, 2019, 11:51:21 am
Just wondering if it's my mobile that doesn't work properly with the theme?

http://www.transport-photos.co.uk/test/q16test/

It's just a new (temporary) install to test the theme with a few photos added, it might work for other people though??? See post above for the problem I had.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: ron4mac on October 26, 2019, 02:29:43 pm
Sharpo,

I had not done any work on the theme to accommodate a film strip. Perhaps that is causing issues. There doesn't seem to be that much interest the theme and I doubt I'll do any more work on it. You should probably just stick with what works for you.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: lurkalot on October 26, 2019, 03:17:47 pm
Ron, I love the idea of responsive themes for Coppermine, I wonder if the stock theme should be responsive actually, I mean that's the way everything is going these days.  I would imagine most of the sites people want to bridge or integrate a gallery script are already responsive.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: sharpo on October 26, 2019, 03:29:52 pm
Yes Ron, I'll keep on using my proper galleries as they are now. I've not spent so much time on them since changing from camera to camcorder and concentrate more on filming these days but as they have been running for so many years I do try to make them as easy as possible to view by mobile, tablet or computer.

As lurkalot says, I also think the basic theme would be better if it was responsive for mobile users.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: Phill Luckhurst on October 26, 2019, 11:43:01 pm
Ron,

Not had a chance to look deep,y. How did you deal with the fixed number of columns in config?
Title: Re: Building a CPG 1.6.x responsive theme
Post by: ron4mac on October 27, 2019, 03:29:58 am
How did you deal with the fixed number of columns in config?
It just takes the thumbnails per page (rows x cols) and displays them free-form (via CSS) rather than in a table.
Title: Building a CPG 1.6.x responsive theme
Post by: allvip on November 08, 2019, 09:40:07 pm
It currently uses the jQuery 1.11.2 and bootstrap 3.3.7 frameworks. I'm not happy using bootstrap and hope to soon write it out of use.

Now I really know how to make it responsive professionally.
If and only if you want I can make a basic theme for you.
Just white with black text and responsive and even tell you how I did it.

Just classic css compatible with old PCs and new devices.
No JS or frameworks.
Very responsive and simple.
Let me know.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: allvip on November 08, 2019, 09:43:05 pm
BTW your theme is not really responsive.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: Timos-Welt on November 24, 2019, 04:06:43 pm
Hi allvip,

please share :)

It's hard to make a real responsive HTML5 only theme with the current core code. There's always something that is not covered by theme.php...

Currently making my theme responsive (WIP):
http://pics.timos-welt.de/?theme=twtest

regards
Timo
Title: Re: Building a CPG 1.6.x responsive theme
Post by: allvip on December 10, 2019, 06:17:07 pm
Hi allvip,

please share :)

It's hard to make a real responsive HTML5 only theme with the current core code. There's always something that is not covered by theme.php...

Currently making my theme responsive (WIP):
http://pics.timos-welt.de/?theme=twtest

regards
Timo

Hi :)
I attached 2 zip files.
DEMO
https://themes-scripts.com/cpg1607 (https://themes-scripts.com/cpg1607)
https://themes-scripts.com/cpg1607/displayimage.php?album=1&pid=11 (https://themes-scripts.com/cpg1607/displayimage.php?album=1&pid=11)
Title: Re: Building a CPG 1.6.x responsive theme
Post by: allvip on December 10, 2019, 06:38:35 pm
Some details:

I used very little css.
1) The curve theme style.css cleaned of unnecessary styles and grouped: general styles, admin pages styles, categories etc
I wanted to be very basic to be able to start designing the custom layout.
2) html5 in template.html or the classic way, it will still work.
3) theme.php

Not necessary
Function pageheader is not necessary but I don't like that every page gets the same classes and gets impossible to change things like the admin pages to stay simple and style only the users layout etc
Same for function starttable (class tableh1 changed to table-heading because tableh1 is used for too many things).
Filmstrip function. I belive I forgot to delete it. Not necessary.

The albums, categories and thumbnails function, I replaced the tables with the divs because eliminates the need for a mobile theme (thumbnails per row will be dictated by style.css depending on users resolution) and is very easy to create very custom layouts (where to be the thumbnail or the title or the desc etc)
Forcing table cell with css to display like a table row is not so flexible.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: allvip on December 10, 2019, 06:51:21 pm
Currently making my theme responsive (WIP):
http://pics.timos-welt.de/?theme=twtest
I just looked.
Great work  :)
Very responsive and no bootstrap, very little css.
I hope you don't mind but for the displayimage page you can use in style.css:

Code: [Select]
.display_media img {
    max-width: 100%;
    width: auto;
    height: auto;
}

instead of the inline styles

Code: [Select]
padding: 0px;
max-width: 800px;
height: auto;
width: 100vw;
Title: Re: Building a CPG 1.6.x responsive theme
Post by: Sweetener on January 27, 2020, 03:47:00 pm
Hi :)
I attached 2 zip files.
DEMO
https://themes-scripts.com/cpg1607 (https://themes-scripts.com/cpg1607)
https://themes-scripts.com/cpg1607/displayimage.php?album=1&pid=11 (https://themes-scripts.com/cpg1607/displayimage.php?album=1&pid=11)

Hi! I looked through your code and I don't understand what makes them html5 other than the change in the doctype... can u explain, please?
Title: Re: Building a CPG 1.6.x responsive theme
Post by: allvip on January 29, 2020, 06:18:06 am
other than the change in the doctype...

That's all that is to it.
https://www.w3schools.com/html/html5_intro.asp (https://www.w3schools.com/html/html5_intro.asp)
Title: Re: Building a CPG 1.6.x responsive theme
Post by: allvip on January 29, 2020, 06:52:04 am
HTML5 will allow you to use in your theme tags like <article> and other listed on the link in my prev post but will no be compatible with old PCs.
Title: Re: Building a CPG 1.6.x responsive theme
Post by: Sweetener on February 04, 2020, 11:22:36 pm
Hi :)
I attached 2 zip files.
DEMO
https://themes-scripts.com/cpg1607 (https://themes-scripts.com/cpg1607)
https://themes-scripts.com/cpg1607/displayimage.php?album=1&pid=11 (https://themes-scripts.com/cpg1607/displayimage.php?album=1&pid=11)

I think you should add this css to the html5 version since many cpg tags use this attributes
Code: [Select]
table[align=center] {
margin-left: auto;
margin-right: auto;
text-align: initial;
}
[align=center] {
text-align: center;
}
[align=left] {
text-align: left;
}
[align=right] {
text-align: right;
}
Title: Re: Building a CPG 1.6.x responsive theme
Post by: Sweetener on February 04, 2020, 11:26:17 pm
I think you should add this css to the html5 version since many cpg tags use this attributes
Code: [Select]
table[align=center] {
margin-left: auto;
margin-right: auto;
text-align: initial;
}
[align=center] {
text-align: center;
}
[align=left] {
text-align: left;
}
[align=right] {
text-align: right;
}
I forgot to explain that this is because of your * {}
Title: Re: Building a CPG 1.6.x responsive theme
Post by: allvip on February 05, 2020, 08:44:21 am
No because many things many not be wanted to be align center by the user.