•  » Themes
  •  » Modus theme template extension issue theme.css

#1 2024-06-04 01:31:43

jan-k
Member
2024-06-04
6

Modus theme template extension issue theme.css

Greetings,

I use the modus theme, and want to do some header modifications. So I made a copy of header.tpl, called my-header.tpl in the local files editor, and substituted it in the template extesion settings.

Surprise. Even without modifications, this setup fails.

The cause seems to be the missing file theme.css in the modus main directory and the following lines in (my-)header.tpl.

{foreach from=$themes item=theme}
  {if $theme.load_css}
  {combine_css path="themes/`$theme.id`/theme.css" order=-10}
  {/if}
  {if !empty($theme.local_head)}
  {include file=$theme.local_head load_css=$theme.load_css}
  {/if}
{/foreach}

What I don't understand is, why do these lines create an issue in my-header.tpl, but not in header.tpl, when these two files are identical?

Environment
Piwigo 14.4.0
Installed on 26 April 2024, 1 month 1 week ago
Operating system: Linux
PHP: 8.3.6 (Show info) [2024-06-03 23:18:18]
MySQL: 10.6.18-MariaDB [2024-06-03 23:18:18]
Graphics Library: GD bundled (2.1.0 compatible)
Cache size 0 Mo   calculated 1 month ago
Activated plugin list 4
Admin Tools
Contact Form
Language Switch
LocalFiles Editor

Piwigo URL: http://www.catsofai.com

Offline

 

#2 2024-06-04 07:59:47

oliver_piwigo
Member
2022-09-08
22

Re: Modus theme template extension issue theme.css

What changes want?  In the Theme Modus, you can also make many adjustments via the css in the Local Files Plugin.

Take a look here, i use the Modus Theme also: https://archiv.giel-bildwelten.de/

Many greetings
Oliver

Offline

 

#3 2024-06-04 09:42:52

jan-k
Member
2024-06-04
6

Re: Modus theme template extension issue theme.css

I need to add links to the header. You've done the same. It works fine in the Desktop versionof the site via adding banner code.

https://i.imgur.com/gustn2H.jpeg

However, the mobile version doesn't show the header links.

https://i.imgur.com/KRQ4pZ8.jpeg

It is absolutely important to have them there too, so I need to go into the header source code. It can't be done by css.

It might also be better to address the bug in template extension than to look for a workaround. A workaround would still be good for a quick fix, but the missing file template.css breaks the whole concept of template extensions.

Offline

 

#4 2024-06-04 09:52:50

oliver_piwigo
Member
2022-09-08
22

Re: Modus theme template extension issue theme.css

If you can make a screenshot on my side, what they mean exactly, then I can say how I implemented it.

Offline

 

#5 2024-06-04 11:09:40

jan-k
Member
2024-06-04
6

Re: Modus theme template extension issue theme.css

https://i.imgur.com/km8TPAE.png

However, I know how to implement this. All you've done is disable the mobile theme to get the links on mobile devices. If you can let me know how to do that, that'd be a good workround for my issue.

The mobile theme is much nicer though for mobile devices. It'd be a shame losing it.

So in any case the original issue remains. Why does replicating header.tpl cause issues?

Offline

 

#6 2024-06-04 11:16:04

jan-k
Member
2024-06-04
6

Re: Modus theme template extension issue theme.css

https://i.imgur.com/88eUIu6.jpeg

This here should not be happening from replicating header.tpl. The cause is, as I said, in the source code in my first post.

Offline

 

#7 2024-06-04 14:19:14

oliver_piwigo
Member
2022-09-08
22

Re: Modus theme template extension issue theme.css

I use only the normal Modus Theme, not a Mobile Theme.

The code of the Navigation is simple html, write in the menue "basic configuration" 

<a href="https://example.de/" target="_top">
            <img style="display: block; margin-top: 8px; margin-left: auto; margin-right: auto;" src="https://example/logo.png" alt="alttext">
    </a>

    <div class="navigation navigation-page">
        <nav class="navigation-item-list">
            <a href="https://example.de/index.html" target="_top">Bildwelten</a>
            <a href="https://example.de/leistungen/index.html" target="_top">Leistungen</a>
            <a href="https://example.de/logbuch/index.html" target="_top">Logbuch</a>
            <a href="https://example.de" target="_top">Bildarchiv</a>
        </nav>
    </div>

The switch of the navigation on smaler screen makes the browser. on my piwigo page, i make no optimation to mobile.

on the header.tpl i make only optimation for the meta name robots tag (index, folow) not for the layout.

Offline

 

#8 2024-06-04 15:23:34

jan-k
Member
2024-06-04
6

Re: Modus theme template extension issue theme.css

Thanks! The Modus template just isn't mobile friendly at all. So all of that are just workarounds...

I've switched to Bootstrap Darkroom to avoid any hassle with the Modus template now.

Offline

 

#9 2024-06-04 15:30:41

oliver_piwigo
Member
2022-09-08
22

Re: Modus theme template extension issue theme.css

Yes the Modus is a light and clean Template but not good for Mobile.

Offline

 
  •  » Themes
  •  » Modus theme template extension issue theme.css

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact