Header transformation on small devices

Permalink Browser Info Environment
Hello,
is it possible to disable the header transformation on scroll on very small devices? On e.g. iPhone portrait it might look better.
Thanks for your help,
Jens

Type: Discussion
Status: In Progress
strandbein
View Replies:
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Jens,

Thanks a lot for your purchase.

To achieve the look you want please follow the steps below:

1/ Click on the "Cog" icon on the top left of the concrete5 admin bar, from the menu select "Design" and then click "Customize".

2/ From the customize options scroll all the way to the bottom until you see the "Add Custom CSS" section, under that click on the toggle switch icon "Add Custom CSS" then "Edit CSS" in the CSS window that appears paste in the following CSS code:

@media (max-width: 25em) {
    header.primary-header.primary-header--fixed-nav.primary-header--resized, .ccm-page 
    .primary-header--resized .primary-header--search {
         height: 100px;
         line-height: 100px;
    }
}


3/ Click on "save" then click on "Entire site" and publish your page.

That should target the site at small sizes if it does not work try upping the "25em" part until it captures the device size you are targeting.

Hope that helps.

Best regards

David
strandbein replied on at Permalink Reply 1 Attachment
strandbein
Hi Dave,
there seems to be a mistake somewhere:
"newline character found in selector (forgot a comma?)".
Also with comma and higher values I am not successful.
Thank you,
Jens
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Jens,

Sorry about that, I can see the issue now.

Please ignore the warnings in the CSS window, the CSS editor in Concrete is extremely old and it does not recognise media queries so it thinks something is wrong with the formatting, the reason its currently not working is it's getting overridden by some of the styles in a different part of the theme, and is a bit too small scope wise, please try the following instead:

@media (max-width: 35em) {
     header.primary-header.primary-header--fixed-nav.primary-header--resized, .ccm-page 
     .primary-header--resized .primary-header--search {
          height: 100px !important;
          line-height: 100px !important;
     }
}


Please clear your cache after adding the code.

Best regards

David
strandbein replied on at Permalink Reply 1 Attachment
strandbein
Hello Dave,
I deleted all entries from Theme Styling tool and went through Design / Owen CSS, cleared caches. Nothing happens, even with senselessly high values. You can try it yourself.
http://c5.stelze.at/start
Jens
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Jens,

Sorry about that. It appears there is a bit more needed for this, the below is tested on both our test rig and your site through the dev console and it works, please give this a try:

@media (max-width: 35em) {
    header.primary-header.primary-header--fixed-nav.primary-header--resized, 
    .ccm-page .primary-header--resized .primary-header--search {
         height: 100px !important;
         line-height: 100px !important;
    }
    .ccm-page .primary-header--resized .primary-header__h1 {
        height: 100px !important;
    }
    .ccm-page .primary-header--resized .mobile-nav-toggle {
        height: 100px !important;
        line-height: 100px !important;
    }
    .ccm-page .primary-header--resized .primary-header__logo h1 img {
        line-height: 100px !important;


Best regards

David
strandbein replied on at Permalink Reply
strandbein
Hi David,
I see that the sizes are changing, but the actual scrolling motion is still there. I find those cluttered and annoying on small devices and would like to disable those on them.
Greetings Jens
VidalThemes replied on at Permalink Reply
VidalThemes
You can change this in the theme, as a whole via the options in:

Dashboard > Modena Theme Options > Header Settings and switch off "Fixed Position Header" This will be on desktop and mobile sizes though.

If you want it done just for mobile you can use:

@media (max-width: 35em) {
    header.primary-header.primary-header--fixed-nav.primary-header--resized, 
    .ccm-page .primary-header--resized .primary-header--search {
         height: 100px !important;
         line-height: 100px !important;
    }
    .ccm-page .primary-header--resized .primary-header__h1 {
        height: 100px !important;
    }
    .ccm-page .primary-header--resized .mobile-nav-toggle {
        height: 100px !important;
        line-height: 100px !important;
    }
    .ccm-page .primary-header--resized .primary-header__logo h1 img {
        line-height: 100px !important;


Be aware though that the positioning when logged in (mobile view) will be out as the code for accounting for the fixed header and admin bar will still be running. However, it will be fine for visitors, you will need to set a solid colour for your header as currently, your text is white so when the header is sat above the hero unit rather than over the top of it, you will have white text on a white background.

To make this work 100% you will need a lot of alterations which are far beyond the remit of support, we are happy to quote for the work if you want to go in that direction, or if you already have a developer on board it would be worth batting this over to them.

Best regards

David
strandbein replied on at Permalink Reply
strandbein
Hi David,
we probably misunderstand each other. I like the way the header transforms on scroll. On desktop and iPad it looks very good, that's why I bought the template.
Only on very small devices like iPhone it looks some silly. So I thought there is an easy way to turn off this scroll transformation behaviour on small devices, so that immediately the monochrome header can be seen without transformation.
But if that's too much of a hassle, it'll stay that way. Thanks for the effort anyway.
Best regards,
Jens
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Jens,

Ah I see, yes that makes it clearer. So what you are looking for is the smaller "transformed" header on mobile straight off the bat, gotcha!

This is probably more "do'able" than what I thought you were asking for, please leave it with me, and I will have a look at sorting something out for you, it will probably be early next week now, but I should be able to do this for you.

Best regards

David
strandbein replied on at Permalink Reply
strandbein
Great, have a nice weekend!
Jens
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Jens,

Sorry for the delay getting back to you, I couldn't get to this as quickly as I thought.

Here is the new CSS, it should do what you want, please delete the previous CSS and replace with this:

@media (max-width: 35em) {
    header.primary-header.primary-header--fixed-nav, 
    .ccm-page .primary-header--search {
         height: 70px !important;
         line-height: 70px !important;
    }
    .ccm-page .primary-header__h1 {
        height: 70px !important;
    }
    .ccm-page .mobile-nav-toggle {
        height: 70px !important;
        line-height: 70px !important;
    }
    .ccm-page .primary-header__logo h1 img {
        line-height: 70px !important;


Best regards

David
strandbein replied on at Permalink Reply
strandbein
Hello David,
that's perfect, thank you very much.
Probably others will be able to use this well.
Best,
Jens
VidalThemes replied on at Permalink Reply
VidalThemes
No worries Jens, we got there in the end :)

Best Regards,

David

concrete5 Environment Information

# Concrete Version
Core Version - 9.2.0
Version Installed - 9.2.0
Database Version - 20230308163514

# Hostname
dd29806

# Environment
production

# Database Information
Version: 10.5.19-MariaDB-1:10.5.19+maria~ubu2004-log
SQL Mode: NO_ENGINE_SUBSTITUTION

# Concrete Packages
Add Animation (0.9.8), Empty Anchor (1.1.0), Enlil Search Templates (0.9.0.2), Magic Tabs (9.0.5), Modena Theme (2.1.5), Nestable Manual Nav (9.0.1), Omni Gallery (9.2.13), Script Output (1.2.1), Theme Styling Tool (1.2.3), V3 Email Obfuscator (3.0.0)

# Concrete Overrides
blocks/jl_magic_tabs/templates/m1/view.php, blocks/jl_magic_tabs/templates/m1/view orig.css, blocks/jl_magic_tabs/templates/m1/view.css, blocks/jl_magic_tabs/templates/m1, blocks/jl_magic_tabs/templates/mvl/view.php, blocks/jl_magic_tabs/templates/mvl/view.css, blocks/jl_magic_tabs/templates/mvl, blocks/jl_magic_tabs/templates/m2/view Kopie.css, blocks/jl_magic_tabs/templates/m2/view.php, blocks/jl_magic_tabs/templates/m2/view.css, blocks/jl_magic_tabs/templates/m2, blocks/jl_magic_tabs/templates/mProdukte/view.php, blocks/jl_magic_tabs/templates/mProdukte/view orig.css, blocks/jl_magic_tabs/templates/mProdukte/view.css, blocks/jl_magic_tabs/templates/mProdukte, blocks/jl_magic_tabs/templates/mProduktevl/view.php, blocks/jl_magic_tabs/templates/mProduktevl/view orig.css, blocks/jl_magic_tabs/templates/mProduktevl/view.css, blocks/jl_magic_tabs/templates/mProduktevl, blocks/jl_magic_tabs/templates/m1vr/view.php, blocks/jl_magic_tabs/templates/m1vr/view.css, blocks/jl_magic_tabs/templates/m1vr, blocks/jl_magic_tabs/templates/m2vl, blocks/jl_magic_tabs/templates/m2vr, blocks/jl_magic_tabs/templates, blocks/jl_magic_tabs

# Concrete Cache Settings
Block Cache - On
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
8.1.16

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, ionCube Loader, json, ldap, libxml, mailparse, mbstring, mongodb, mysqli, mysqlnd, OAuth, odbc, openssl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, raphf, Reflection, session, shmop, SimpleXML, soap, sodium, SourceGuardian, SPL, sqlite3, standard, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 3000
max_multipart_body_parts - -1
memory_limit - 256M
post_max_size - 200M
upload_max_filesize - 200M
zend.exception_string_param_max_len - 15
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
raphf.persistent_handle.limit - -1
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.