Forum Replies Created
-
AuthorPosts
-
zunächst würde ich dir dazu raten diese Logos immer auch in den Dimensionen gleich zu halten – auch deckungsgleich innerhalb der Fläche.
Bei deinem Logo ist zwischen dem Logo mit dem Schattenwurf und dem rein blauen Logo ein Versatz und Größenunterschied.Dann ist es wohl auch keine gute Idee ein blaues Logo auf blauem Grund zu zeigen. ;) daher wäre wohl noch ein weißes Logo gut.
Ich würde wohl versuchen, dem Logo Container einen Pseudo-Container ( :after ) zu geben, und dort ein background-image mit dem weißen Logo zu setzen. bei nicht gescrolltem Header ist das normale Logo zu sehen, bei gescrolltem Header wird dieses auf opacity null gesetzt und der pseudo-container erhält dann die Opacity 1.
Beispiel code:
#top #header .logo:after { content: ""; position: absolute; top:0; left:0; width: 100%; height: 100%; background-image: url(/wp-content/uploads/logo-IIC_Website_white.png); background-repeat: no-repeat; background-size: cover; } #top #header .logo:after { opacity: 0; transition: opacity 0.3s ease; } #top #header.header-scrolled .logo:after { opacity: 1; transition: opacity 0.3s ease; } #top #header.header-scrolled .logo a { opacity: 0; transition: opacity 0.3s ease; } /************ hier bleibt das Logo bestehen, bei anfänglich gesetzter transparenz ************/ /************ die transprenten Header haben nämlich alle an html auch eine Klasse ************/ .html_header_transparency #top #header.header-scrolled .logo a { opacity: 1; transition: opacity 0.3s ease; } .html_header_transparency #top #header.header-scrolled .logo a img { opacity: 0; transition: opacity 0.3s ease; } .html_header_transparency #top #header.header-scrolled .logo a .avia-standard-logo-sub img { opacity: 1; transition: opacity 0.3s ease; }
das unifarben blaue Logo kannst du dann als transparentes Logo setzen.
schau mal hier:
https://enfold.webers-webdesign.de/iic/
https://enfold.webers-webdesign.de/iic2/_________________
First of all, I would advise you to keep these logos always the same in the dimensions – also congruent within the area.
In your logo there is an offset and size difference between the logo with the shadow cast and the pure blue logo.Then it’s probably not a good idea to show a blue logo on a blue background ;) so another white logo would probably be good.
I would probably try to give the logo container a pseudo-container ( :after ), and put a background-image with the white logo there. when the header is not scrolled the normal logo is visible, when the header is scrolled it is set to opacity zero and the pseudo-container then gets opacity 1.
the unicolor blue logo you can then set as a transparent logo.
See example code above. and
https://enfold.webers-webdesign.de/iic/
https://enfold.webers-webdesign.de/iic2/or you let show for all – and remove it for some pages / posts
function avf_header_setting_filter_mod($header) { if(is_single() || is_front_page()){ $header['header_title_bar'] = 'hidden_title_bar'; } return $header; } add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
if you like to preserve showing it for portfolios – use instead this
function avf_header_setting_filter_mod($header) { if(is_singular('post') || is_front_page()){ $header['header_title_bar'] = 'hidden_title_bar'; } return $header; } add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
September 21, 2022 at 2:26 pm in reply to: on second page of search results page some articles are not inside content #1365845Yes you are right with that tip. on the last article – just before the layout is messed up – there was a codeblock inside with a functions.php code. All tags are closed correct – but there are comments inside that code. But even if there are non closed tags i thought that with : “display codeblock as code snippet” the codeblock encapsulates the whole thing so that nothing carries over to the outside anyway.
Now
it was that line here :$output .= "<article class='slide-entry flex_column {$style} {$post_class} {$grid} {$extraClass} {$thumb_class} post-format-{$post_format}' {$markup_article}>";
i had to do this :
$output .= "<article class='slide-entry flex_column {$style} {$post_class} {$grid} {$extraClass} {$thumb_class} post-format-{$post_format}' {$markup_article}/>";
or behind that line :
( btw. double quotes will not work here)$output .= '</article>';
yes now they are closed – but as mentioned above i thougt that the codeblock element will encapsulate it to be save in this way.
-
This reply was modified 2 years, 9 months ago by
Guenni007.
September 21, 2022 at 7:05 am in reply to: Word Wrap in Menu – or Have the menu on two lines #1365790no – i know now that i misunderstood your question – you do not want a two line menu – you want to have the menu-items labels in two lines.
Just a moment: …
Ismaels Code will work – if you got no shrinking header – but there are solutions for shrinking header too.Just one moment – i think i got a more simple method now ! …
put in that Navigation Label of the menu-item:
( you only need those classes on the spans if you like to colorise them separatly or if they should have different font-styles )<span class="firstline">Leistungen</span><span class="secondline">Portfolio</span>
give to the menu-item itself a class: twoliners
put this to your quick css
#avia-menu .twoliners.menu-item-top-level > a > .avia-menu-text { display: grid; height: 100%; grid-template-columns: 1fr; padding: 0px 10px !important; } #avia-menu .twoliners.menu-item-top-level > a > .avia-menu-text > span { justify-self: center; grid-column: 1 / 2; align-self: center; } #top #wrap_all #avia-menu .twoliners.menu-item-top-level.av-menu-button > a > .avia-menu-text { gap: 3px 0; } #avia-menu .twoliners.menu-item-top-level > a > .avia-menu-text > span { line-height: 0px; text-align: center; } #avia-menu .twoliners.menu-item-top-level > a > .avia-menu-text > .secondline { color: #999; font-size: 1.1rem; font-style: italic; } #top #wrap_all #avia-menu .twoliners.menu-item-top-level.av-menu-button-colored > a > .avia-menu-text > .secondline { color: #ddd; }
Maybe you have to adjust some padding or gap value for your header height.
See here the test page: https://consulting.webers-testseite.de/PS : you had to style the hamburger yourself f.e.
#av-burger-menu-ul * { border: none !important; } #av-burger-menu-ul > li { margin: 10px 0 !important; } #top #wrap_all #av-burger-menu-ul .twoliners.av-menu-button > a { padding-left: 10px ; } #av-burger-menu-ul .twoliners > a > .avia-menu-text { display:grid; height:100%; grid-template-columns:1fr; gap: 10px } #av-burger-menu-ul .twoliners > a > .avia-menu-text > span { justify-self:left; grid-column:1 / 2; align-self:center; } #av-burger-menu-ul .twoliners > a > .avia-menu-text > span.secondline{ padding-left: 10px; color: #ddd; font-size: 1.1rem; font-style: italic; } /**** etc. ****/
yes – you can do that – or leave all as it is with buttons – and just remove the button styling on that:
body #people .avia-button { color: #000 !important; background-color: transparent; border-radius: none; padding: 0; font-size: 16px; border-bottom: none; text-align: left; background-color: transparent; } body #people .avia-button:before { content:"+ " } body #people .avia-button:active { outline: none; border: none; }
September 20, 2022 at 3:18 pm in reply to: Word Wrap in Menu – or Have the menu on two lines #1365715i would do it like in the documentation of enfold: with flex box layout: Link
and add some additional css settings to better style the whole thing:.main_menu { max-width: 70%; /*** maybe use a calculation (100% minus logo width ) for it: calc(100% - 350px) ***/ } .av-main-nav-wrap { height: 100%; } ul.menu.av-main-nav { display: flex !important; flex-flow: row wrap; /**** try: row wrap-reverse to see influence ****/ justify-content: flex-end; /**** try: flex-start or center to see influence ****/ top: 50% !important; transform: translateY(-50%); } .av-main-nav > li > a { line-height: 35px !important; height: 35px !important; }
BUT: if your shrinking header end height will be to low ( 44px – f.e. on choosing the small header height ) the items will be too near each other and overlap header area.
if you got shopping cart and social bookmarks besides your menu – there had to be more css to adjust the right setting.
and by the way – if you like to have search input field on hamburger too – we can use that ID set above ( on hamburger the IDs will change to classes)
you need this additional snippet just under the above inserted:
function add_search_to_burger_menu(){ ?> <script type="text/javascript"> (function($) { $('.av-burger-menu-main').one('click', function() { var page = window.location.href; var mobile = $('.menu-item-search'); var search = '<form action="'+page+'" method="get" class=""><div><input type="submit" value="" id="searchsubmit" class="button avia-font-entypo-fontello"><input type="text" id="s" name="s" value="" placeholder="Search"></div></form>'; setTimeout(function() { if(mobile.find('form').length == 1) return; mobile.html(search); }, 500); }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_search_to_burger_menu');
and a bit of additional css in quick css:
#top #wrap_all #header #av-burger-menu-ul>li.av-active-burger-items.menu-item-search { padding: 15px 50px; position: relative !important; } #top #av-burger-menu-ul #searchsubmit { height: 45px; } #top #wrap_all #header #av-burger-menu-ul>li.av-active-burger-items.menu-item-search form { position: relative !important; } #av-burger-menu-ul .ajax_search_response { background-color: #efefef; border: 1px solid #ddd; padding-top: 20px; } #av-burger-menu-ul .ajax_search_response > a { padding: 10px 12px 20px !important }
See Results on : https://enfold.webers-webdesign.de/
hm – yes but this was meant for main-menu on left or right position.
but i think there will be now a better solution – just a moment …put this in your child-theme functions.php:
add_shortcode('avia_search', 'get_search_form'); function avf_add_search( $items, $args ){ if ($args->theme_location == 'avia'){ $search = '<li id="menu-item-search" class="menu-item menu-search menu-item-top-level">'; $search .= do_shortcode('[avia_search]'); $search .= '</li>'; $items = $items . $search; } return $items; } add_filter( 'wp_nav_menu_items', 'avf_add_search', 10, 2 );
and this to your child quick css:
.av-main-nav-wrap > ul:first-of-type { display: inline-flex !important; height: 100%; } #menu-item-search { line-height: 30px; position: relative; } #menu-item-search #searchform { position: relative; top: 50%; transform: translateY(-50%); height: 40px; line-height: 40px; } #top #searchform > div:first-of-type { position: relative; max-width: 200px; opacity: 1 !important; display: block !important; } #menu-item-search #searchform #s { padding: 10px 40px 10px 5px; font-size: initial; background-color: rgba(255,255,255,0.85); /*** if you like to have transparency ***/ } #top #searchform .ajax_search_response { background-color: rgba(255,255,255,0.85); position: absolute; top: 45px; padding: 10px 0; width: 100%; } /******* if you got transparency option ******/ #header.header_color.av_header_transparency #avia-menu #menu-item-search #searchform #s { background-color: rgba(255,255,255,0.35); color: #FFF !important; } #header.header_color.av_header_transparency #avia-menu ::placeholder { color: #FFF !important; } /*** end of transparency header setting ***/
or give this a try – it starts with setting the header options on : logo left, menu right.
the script will take the logo html code and insert it to the center of the main-menu items as a menu-item ( ID is menu-item-logo).
If the burger is shown the css code will set that ID to display: none.Sorry – i did not see that option on advanced tab.
This is a problem with almost all “Load More” content. The content is not yet in the DOM when the page is loaded and is only added dynamically by a click event. If there is a solution for this – it will not be a trivial solution, because you still want to keep the sorting option.September 18, 2022 at 12:33 pm in reply to: enfold schriftfarbe besuchter links / enfold font color visited links #1365423Das müsste ja um einen Effekt zu haben ein Link sein, der in einer Neuen Seite / neuem Tab geöffnet wird – und die bestehende Seite mit dem Link erhalten bleibt. Früher konnte man die pseudo classe :visited nutzen – aus Sicherheitsgründen wird heute in fast allen modernen Browsern dieses nicht gentutzt: Link
was du machen könntest wäre wohl ein Script setzen, welches einem geklickten link eine Klasse hinzufügt . z.B : visited
dauerhaft für deine Domain zu setzen würde allerdings dann wieder enden in einem eigenen Cookie – welches wohl eher nicht mehr DSGVO konform sein wird.
____________
This would have to be a link to have an effect, which is opened in a new page / new tab – and the existing page with the link remains. In the past you could use the pseudo classe :visited – for security reasons this is not used today in almost all modern browsers: Link.
what you could do would be to set a script, which adds a class to a clicked link. e.g. : visited
to set permanently for your domain would then end in a separate cookie – which will probably no longer be compliant with the GDPR.
function add_class_to_visited_links(){ ?> <script> (function($){ $('a').on('click', function(){ $(this).addClass('visited'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_class_to_visited_links');
and on quick css :
a.visited { color: #FFF; }
I have a question of understanding: if it is a portfolio grid, then only the link to the portfolio opens anyway – and no lightbox. Or do you have an image gallery?
September 18, 2022 at 10:24 am in reply to: Difference between heading and body font with same color ? #1365381How should I change the short code to breadcrumbs?
the shortcode name is the first part on the add_shortcode line.
So if you like to use only [shortcode] take mikes last snippet and only change that first part:function av_breadcrumbs_shortcode( $atts ) { return Avia_Breadcrumb_Trail()->get_trail( array( 'separator' => '/', 'richsnippet' => true ) ); } add_shortcode( 'breadcrumbs', 'av_breadcrumbs_shortcode' );
or if you forgot to set the _blank target option – maybe better to list all links except some links that fit to your domain url or mailto links etc.
function add_class_to_external_links(){ ?> <script> (function($){ var url = window.location.origin; $('a').not('a[href*="'+url+'"], a[href*="mailto:"], a[href*="#"], a[href*="tel:"], a[href*="javascript:;"] ').each(function(){ $(this).addClass('external-link'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_class_to_external_links');
you can do it via child-theme functions.php :
function add_class_to_external_links(){ ?> <script> (function($){ $('a[target*="_blank"]').each(function(){ $(this).addClass('external-link'); }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_class_to_external_links');
if you like to have it on all elements just remove the anchor a from the snippet above
it is just the point about variable fonts. There is no change on the fonts on uploading it via Custom Font Manager. The font will be shown as only a 400 upload. But downloading it again from the /wp-content/uploads/avia_fonts//type_fonts folder and checking the font abilities over wakamaifondue.com all variable font stylings are preserved.
But choosing the font on Enfold Options – General Styling – Fonts – the variable font-weight option is lost.
On this video you can see how it should be ( continous choice even 538 as font-weight will be possible ) :
https://vimeo.com/748702665
On that video you see the loss of that possibility – only 400 and 600 are “working ” – i guess it is only the 400 and the font nearby (since 600) the 700 will be rendered via browser:
https://vimeo.com/748724583yes – but on default this should not happen that both are visible ( by the way it is that: no_Icon_phase2-02.png )
and. it is inserted via a different domain (sdsitetech.com) – might be a residual from your developer site.under the insert area – where you choose your video file – there is the input area for a fallback image
Thanks for the hint – I never checked that – mostly I don’t set fallback images either.September 13, 2022 at 5:18 pm in reply to: Stopping the animation of the headline rotator after the first pass #1364946if you got ftp access – you can create your own shortcodes folder inside the child-theme folder – it is not a default folder.
then place that snippet in the child-theme functions.php :
( i think we don’t need that snippet for that – but it is a basic snippet to replace parent theme alb elements )function avia_include_shortcode_template($paths){ $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; } add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
If you copy an element from enfold>config-templatebuilder>avia-shortcodes to this folder it will replace the one in the parent and be used instead. You can also add new ones using the other shortcode elements as examples.
– and to be precise: if you put in a parent-theme ALB php file into that folder it replaces the parent theme file. ( the assets (css and js) files are loaded from the parent – because the path to load them are in the php files )
because we only want to replace the script file from that ALB Element – i decided to go that way via another little snippet
to unload parent script and load child-script ( i do not know if only uploading that js will work without doing this )function load_child_theme_headline_rotator_script() { wp_deregister_script( 'avia-module-rotator' ); wp_enqueue_script( 'avia-child-module-rotator', get_stylesheet_directory_uri().'/shortcodes/headline_rotator.js', array( 'avia-shortcodes' ), false, true ); } add_action( 'wp_enqueue_scripts', 'load_child_theme_headline_rotator_script', 100 );
PS: refresh all cachings and delete expired CSS and JS files generated by the theme ( if you got merging on)
September 13, 2022 at 2:29 pm in reply to: Stopping the animation of the headline rotator after the first pass #1364908Isn’t there an easier way?
No.
the headline-rotator.js file is in : enfold/config-templatebuilder/avia-shortcodes/headline_rotator/ folder.
for the newest Enfold (5.1.2) i placed that file in my pastebin.
See: https://pastebin.com/2asu1gtk
Download: https://pastebin.com/dl/2asu1gtkso just download it from there and upload that file to your child-theme/shortcodes folder.
Or do you only work with the parent theme? Then you can overwrite that file in the parent theme original folder – but on every update this is lost.
So my recommendation is to use always a child-theme.If you got that child-theme you can go over your dashboard – Appearance – Theme file editor : klick on “Theme Functions” – and if you have used the premade child-theme of enfold : Link this is at the beginning nearly empty.
preserve the starting line (<?php
) and insert that snippet after that first line :function load_child_theme_headline_rotator_script() { wp_deregister_script( 'avia-module-rotator' ); wp_enqueue_script( 'avia-child-module-rotator', get_stylesheet_directory_uri().'/shortcodes/headline_rotator.js', array( 'avia-shortcodes' ), false, true ); } add_action( 'wp_enqueue_scripts', 'load_child_theme_headline_rotator_script', 100 );
if you look to that snippet you see that the first instruction unloads the parent script – and the next line will load the child script instead.
This will not be lost on enfold updates – only if there are big changings to that element – we had to redo the procedure.
Edit: Wenn ich mit Google Chrome auf deine Seite gehe – sind diese Fonts wie du es auch oben hast vorhanden. ?
Wahrscheinlich sehe ich es nicht in meinem Firefox Developer Edition, weil ich dort hohe Sicherheitseinstellungen gesetzt habe und im Privaten Modus die Seiten öffne.
…
Daher musst du unbedingt in die Cookie Einstellungen und diese so setzen, dass erstmal alles abgeschaltet ist
( Google Analytics, Google Recaptcha etc. ) und dann zugestimmt werden muss.ich hoffe – auf Grund der Internetseite, dass ich auch mit Dir deutsch kommunizieren kann.
zunächst habe ich das nicht mehr auf den anderen Seiten. Auf der Kontaktseite hast du es natürlich , weil du google Addons dort nutzt:
Google Recaptcha. – Dort wird aber Roboto geladen – die Open Sans sehe ich nicht mehr auf deiner Seite über dritte geladen – sondern local wie es sein soll:Wenn du das in den Cookie Consent Einstellungen so einstellst, dass man dort erst zustimmen muss damit ReCaptcha geladen wird – wird die Schrift bis dahin auch nicht geladen.
( Du solltest aber diese Hinweisfelder auch mit einer Farbe unterlegen. Das ist durch die Semitransparenz schlecht lesbar. Eventuell das Ganze ( flex_column) auf eine 0.85 opazität setzen, oder mit der Column nicht so hoch ins Bild fahren. )
_________________________– jetzt nochmal : Du hast die Schrift – Open Sans – wohl am Mac gepackt zu einem Zip-File.
OSX hat immer auch versteckte Dateien ( werden auch im ftp mit einem Punkt davor geführt ) im Ordner, die wenn man nicht beim zippen aufpasst mit ins Archiv gehen. Das sind diese Schriften die mit macosx geführt werden.Bei Betterzip zB. gibt es die Option “für PC packen” dann sind die Versteckten Dateien nicht mit drin.
Du kannst aber jetzt auch im Custom Font Manager diese Schrift : macosx einfach löschenis there a page we can see – or at least a screenshot
i tested now my woff2 file – it is generated with command line tool from google itself. On wakamaifondue i can see that all variable properties are preserved from the ttf download on google fonts.
uploding that font via fonts-manager and downloading it from that generated ( Custom Font Manager ) font file again – checking again on wakamaifondue – i see that all variable properties are preserved ( so no mistake on upload ) – but on Enfold Setting i do only have the choice to set the 400 and 600 font-weight. The settings in between do not work.
So – fontsquirrell does not do a good job on this! And setting the correct variable font-file for the heading or body font will loose the option to have continous font-weight settings ( the font-stretch option works )
We should wait for the opinion of a mod or developer here on board.
on downloading your woff2 and uploading it to : https://wakamaifondue.com/
i can see that all variable properties are lost.
And that the file-size is less than the correct variable font – so your gtmetrix result is very good: https://gtmetrix.com/reports/www.greenconnections.nl/LddWcoje/how did you get the woff2 from that open sans font?
you can see the difference on the videos:
on a variable font it is possible to set a font-weight of 535 or 421 etc. pp.
i do not see on your settings – that this is possible.so this is my recommendation:
- upload the normal font via Custom Font Manager –
- upload the corresponding variable font manually via ftp and
- use a manually set @import rule.
if you can live with regular and bold fontweight – you do not need to change something – but i would upload only the normal fonts ( but i think it is on open-sans 400 and 700 ) because you see in the gtmetrix comparison that both font styles can be loaded at the same time, so 260ms instead of 644ms. Your website will load faster as a result.
why the 400 and 600 font-weights to work on your setting – i don’t know. But as said before:
a variable font loses its properties via the Custom Font Manager upload.if someone is interested in how to transform variable ttf fonts to woff2 – please do ask for it here.
If you watch this little video on vimeo, you’ll see that continuous adjustment of font-weight and font-stretch is possible.
https://vimeo.com/748702665I hope I’m not mistaken, perhaps the mods could run a similar test to confirm this.
On your page I also see the font and the one slider, but moving it only gives a font-weight change on 600 in that case.
But definitly no continous change.______________
this is what you got on Roboto Flex ( thats why i call it a heavy weight font ;) )
yes it is a bit more complex – but you will be rewarded with more styling options.
i do always transform the downloaded ttf variable fonts to woff2 fonts – because these files do have the best compression level of all font mime types.
All browsers that support variable font files do support woff2.
if you open the mentioned page : https://wakamaifondue.com/ and drag your ttf ( or in my case the woff2 to that circle with the rotating letters. you can see on variable section for open sans font:
here you can see the layout options on that variable font – so my more detailled @import rule will be:
( btw i do place the fonts in the same directory as the enfold custom font manager fonts and that css rule to style.css of my child theme )
on my style.css i have:@font-face { src: url('/wp-content/uploads/avia_fonts/type_fonts/opensans-variable.woff2') format('woff2'); font-family:'Open Sans Variable'; font-weight: 300 800; font-stretch: 75 100; font-style: normal; }
on my quick css
f.e.:#top #wrap_all .av-special-heading-tag { font-family:'open-sans',Helvetica,Arial,sans-serif font-weight: 400; } @supports (font-variation-settings: normal) { #top #wrap_all .av-special-heading-tag { font-family: 'Open Sans Variable', sans-serif; font-stretch: 100%; font-weight: 350; } }
this is because : if the browser supports variable fonts – that font will be taken – if not the normal open-sans (uploaded via custom font manager) is in place as fallback.
Very nice tool on firefox ( i got the developer edition installed – but maybe the normal one has it too ) on developer tools is the fontstyle tab:
enlarge the image on click
you see that the font is working under its variable layout options.
you can adjust the existing sliders until you like the layout – and then note these settings and transfer them to css.i do not see that options on your page –
so that was my assumption, that a variable font loses its properties via the Custom Font Manager.
Now do you realy need those layout options – or maybe it is enough to have a normal and a bold variant?
see file-size comparison:
you can compare those file-sizes now – think of performance of your page – perhaps it is enough to have two fixed font-weights only for selection.
and on gtmetrix the font-loading times:
-
This reply was modified 2 years, 9 months ago by
-
AuthorPosts