Forum Replies Created
-
AuthorPosts
-
again btw:
sometimes it is neccessary to have such a divider over a slider – because there is no option on having dividers on fullwidth-sliders – you can use the top-divider option of the next section and transform it over the slider:I will now remove your “Superman” now – to come not into conflict with copy-right law ;)
-
This reply was modified 7 months, 3 weeks ago by
Guenni007.
by the way: here it is that page with the other svg inside option: preserveAspectRatio=”none”
shrink your screen-width to see the difference.
https://webers-testseite.de/rbh/PS: On the pages where I don’t have the media library sorted by month, I sometimes move this location of the custom svg divider to the uploads folder. Then I can upload them via the media library:
function my_svg_path(){ $path = get_site_url().'/wp-content/uploads'; return $path; } add_filter( 'avf_custom_svg_shapes_files_directory', 'my_svg_path', 10, 1 );
How can I now integrate a custom svg divider:
The default storage location for Enfold is: /wp-content/uploads/dynamic_avia/avia_custom_shapes/ if you put your custom files there (via ftp) then they would at least be in the right place. ( if that folder isn’t present – create it )
here is the code as you now tell Enfold that there is a custom divider:
( put this to your child-theme functions.php)function custom_avf_custom_svg_shapes( array $custom_shapes ) { $custom_shapes = array( 'reha-bad-hamm' => array( 'key' => 'reha-bad-hamm', 'title' => __( 'Reha Bad Hamm Trenner', 'avia_framework' ), 'has_width' => true, 'has_flip' => true, 'filename' => 'reha-bad-hamm' ), ); return $custom_shapes; } add_filter( 'avf_custom_svg_shapes', 'custom_avf_custom_svg_shapes', 10, 1 );
If you are familiar with creating svg files – you can have your own custom svg dividers as well.
see your svg file here in action: https://webers-testseite.de/reha-bad-hamm-2/Many of the Enfold svg files are designed so that you can set a height and the width adapts to the viewport.
This property within the svg is responsible for it:
preserveAspectRatio="none"
But this is not good for other svg. See the example page with the silhouette of Bonn at the bottom – that is a svg divider too.
On your svg too i would say it is better to preserve the aspect ratio by:
xml:space="preserve" preserveAspectRatio="xMidYMin meet"
(see svg code on that page)
For your svg, this is a special case too. These standard dividers work with paths that are not explicitly filled and are displayed as black in svg by default. The black is then coloured by the setting in the element itself. This is usually the colour that takes over the connection to the other section. So it is not transparent. – You now have a colour that is actually fixed (with the blue). Look at the source code on the example page, and the svg as I created it.
Just copy out the svg code, then you have your svg.
PS: becaue i gave a custom class to the bow itself – you can fill it by external css code ( as you can see on the example page as bottom divider)
July 3, 2024 at 2:01 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461210if you like to hold that solution – you can erase that code. ( it is based on a different custom class. )
hold the img-with-caption and blue-info css !on inserting the images to the text-block – i edited the images – and gave them all the same width (250px)
Next: It might be best to switch to responsive design on 989px ( even for your menu too )
July 3, 2024 at 11:39 am in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461188please replace the snippet in functions.php.
It seems to be neccessary to have window on load.July 3, 2024 at 11:37 am in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461187if you see this page – that has your initial setting with text-blocks in columns (equal height ) – images floating left and text directly behind it.
But you see on last column row – that with equal height option the space to top is much bigger than on the other images besides other landscape images.https://webers-testseite.de/jak73/
Password: is the last name of that logo ( capitalize )
July 3, 2024 at 8:45 am in reply to: how to use avf_dynamic_css_additional_vars and avf_dynamic_css_after_vars #1461172ich habe die Nutzung von avf_dynamic_css_after_vars immer noch nicht ganz verstanden!
Wie würde ich z.B. für die Seite mit der ID: 123 die Definition von –enfold-main-color-bg ändern?
__________I still haven’t fully understood the use of avf_dynamic_css_after_var !
For example, how would I change the definition of –enfold-main-color-bg for the page with ID: 123?July 3, 2024 at 8:15 am in reply to: Change background for specific pages and center the text #1461165there are new filters: avf_dynamic_css_additional_vars and avf_dynamic_css_after_vars
but you can redefine those var color definitions in quick css too.
but that means all elements that use these enfold default values ( set in enfold options – general styling) are replaced.
All manually set colors inside alb elements stay as they are.f.e. for your ID 777:
.html_entry_id_777, #top.page-id-777 { --enfold-header-color-bg: #eee; --enfold-main-color-bg: #eee; --enfold-footer-color-bg: #eee; --enfold-alternate-color-bg2: #eee; --enfold-header-color-bg2: #eee; --enfold-socket-color-bg: #eee; --enfold-socket-color-border: #eee; }
you can now add all page id’s comma separated in that replacement.
or like mentioned above ( Günter provided me with a working filter code ) via child-theme functions.php
(after that it is neccessary to refresh all cachings):function my_avf_dynamic_css_after_vars( $output = '' ) { $output .= "\n"; /*** Override a defined var for a specific page id*/ $output .= "html.html_entry_id_777, html.html_entry_id_12345 {\n"; $output .= "--enfold-header-color-bg: #aaa;\n"; $output .= "--enfold-header-color-bg2: #aaa;\n"; $output .= "--enfold-main-color-bg: #aaa;\n"; $output .= "--enfold-footer-color-bg: #aaa;\n"; $output .= "--enfold-alternate-color-bg: #aaa;\n"; $output .= "--enfold-alternate-color-bg2: #aaa;\n"; $output .= "--enfold-socket-color-bg: #aaa;\n"; $output .= "--enfold-socket-color-border: #aaa;\n"; $output .= "}\n"; return $output; } add_filter( 'avf_dynamic_css_after_vars', 'my_avf_dynamic_css_after_vars', 10, 1 );
maybe that is the better way – because it is early in the page generation done – then replacement via css redefinition.
btw: it is possible too – to have even mediaqueries here on the filter .July 3, 2024 at 12:07 am in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461136PS: have a look where this rule is:
@media only screen and (min-width: 990px) and (max-width: 1051px) { #top .avia_textblock.img-with-caption-right .wp-caption { grid-template-columns: 1fr; grid-template-areas: "feld2 " "feld1 " undefined!importantundefined; } }
remove it please. then we can have a look how to style the responsive cases in between 768 and 989
and replace the script with that from: https://kriesi.at/support/topic/remove-bottom-space-from-colum-and-place-text-right-to-image-how-to-reduce-spa/page/2/#post-1461099
July 3, 2024 at 12:04 am in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461135you could go and set that one rule for non responsive case :
(grid-template-columns: 35% 65%;)#top .avia_textblock.img-with-caption-right .wp-caption { border: 1px solid #cccccc; width: 100% !important; margin: 0; display: grid; grid-auto-rows: auto; grid-template-columns: 35% 65%; grid-template-areas: "feld2 feld1"; align-items: flex-end; overflow: hidden; }
But you had to manually insert softhyphens to some of your titles.
By the way: Self Contained and on the one image Selfcontained ?It is difficult to fulfill all your requirements because the preconditions are of course not identical. Different image formats and aspect ratios paired with titles of different lengths.
July 2, 2024 at 7:58 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461099ok –
put this to your child-theme functions.php:
(try if the window on load is neccessary)function set_class_for_image_orientation(){ ?> <script> (function($) { $(window).on('load', function(){ var images = document.getElementsByTagName('img'); for( var i=0; i<images.length;i++){ if(images[i].naturalWidth > images[i].naturalHeight) { $(images[i]).addClass('landscape'); } else if (images[i].naturalWidth < images[i].naturalHeight) { $(images[i]).addClass('portrait'); } else { $(images[i]).addClass('square-image'); } } }); })(jQuery); </script> <?php } add_action('wp_footer', 'set_class_for_image_orientation');
now every image got a class on img that belongs to its orientation
then place that code to your quick css:
#top .avia_textblock.img-with-caption-right .wp-caption img.portrait { margin-top: 0 }
and perhaps you like to go back to the same width if responsive case (smaller than 767px)
@media only screen and (max-width: 767px) { #top .avia_textblock.img-with-caption-right .wp-caption { grid-template-columns: 1fr 1fr; } }
July 2, 2024 at 7:10 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461088try to change that one rule to:
(it is only that line changed: grid-template-columns: auto 1fr; )
#top .avia_textblock.img-with-caption-right .wp-caption { border: 1px solid #cccccc; width: 100% !important; margin: 0; display: grid; grid-auto-rows: auto; grid-template-columns: auto 1fr; grid-template-areas: "feld2 feld1"; align-items: flex-end; }
July 2, 2024 at 4:43 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461063set on first try that second column row to not show as equal height.
July 2, 2024 at 4:41 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461061you like to remove it everywhere – or only on those portrait fotos?
maybe try without equal-height flex-columns.
The equal height is something that will come with the grid-layout automatically ;)July 2, 2024 at 3:32 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461038The text-block element got that class. (Each)
but i try now a different solution based on grid-rows …July 2, 2024 at 3:20 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461030July 2, 2024 at 3:11 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461026aha test page – i will have a look
edit: are these images with captions ? No they aren’t.
the text does not come from the text-block – but from the caption.
Otherwise the text will float etc. etc.July 2, 2024 at 2:55 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461021Well it seems to be best – to use the text block – because selectors stays the same for image with link or without.
On image alb – the selectors change – and we had to differ than if an image alb is used with or without.See on the bottom of that example page – that on the image with lightbox link it does not work with the same class.
So we had than to make that twice with a different class.PS: the field definitions are only set by css
July 2, 2024 at 1:41 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1461009Ah sorry i see that i take an textblock inside that columns- i will switch that now. to image alb support.
Just a moment …or do it like that example – place as you had before ( maybe thats the reason why i startet with it ) a text block inside the column
place one media inside ( your image – but with caption ) .July 2, 2024 at 1:05 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1460997you had to think of the custom class on the image with caption. that has to be done on the image alb.
The Text is the caption text. And the css comes to quick css. Every image with caption will than do this layout.Further reading:
https://css-tricks.com/snippets/css/complete-guide-grid/
https://www.joshwcomeau.com/css/interactive-guide-to-grid/July 2, 2024 at 12:48 pm in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1460977see link – css code on that page
https://webers-testseite.de/blue-bar-above-image/here you can see a little inside gridlayout and the power of field definitions on that.
https://webers-testseite.de/grid-layout-modul/i can place the “columns” : fields where i like to have in that grid.
July 2, 2024 at 11:51 am in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1460960You can see how easy it is to influence existing layouts with Gridlayout.
Here it is easier to assign field names to both (the image container and the caption text).
I can then use them in a grid.
This grid now has 2 columns. The rows are created automatically, but their heights are adjusted – and not fixed.
Use this (grid-template-areas: “field2 field1”) to define the order. The other way around, the caption text would be on the left.Responsive Case had to be set in detail look to the real page.
July 2, 2024 at 8:51 am in reply to: Remove bottom space from colum and place text right to image / how to reduce spa #1460892please send me your screenshot!
Edit: See again that demo page – on usage of image with captions ( scroll to the bottom)
https://webers-testseite.de/blue-bar-above-image/the section itself is set to : av-small-hide av-mini-hide.
those flex_columns with .scroll-reveal trigger are set on visibility : av-hide-on-mobile
look at the column advanced tab under responsive. Your added Class could not work on that – because it is set to display : none by your responsive settings.is it because you are working with the other option to show that animation?
if this section and the columns are set to be there on responsive case the class “active” is added.
_____________________
by the way – this is my observer sccript to get a new class added to flex-columns that comes into viewport.
( i do not stop observing, because i like the animation on scroll-in/out again and again ;)function observe_columns() { ?> <script type="text/javascript"> document.addEventListener("DOMContentLoaded", function() { var flexcolumns = [].slice.call(document.querySelectorAll(".flex_column")); if ("IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype){ let flexcolumnObserver = new IntersectionObserver(function(entries, observer) { entries.forEach(function(entry) { if (entry.isIntersecting) { entry.target.classList.add("visible"); } else { entry.target.classList.remove("visible"); } }); }, { root: null, threshold: 0.1, rootMargin: "20px 0px -10px 0px", }); flexcolumns.forEach(function(flexcolumn) { flexcolumnObserver.observe(flexcolumn); }); } }); </script> <?php } add_action( 'wp_footer', 'observe_columns' );
see in action f.e. under “Dienstleistungen”
https://webers-web.info/well – i can see the animation above “Quelques Exemples …” on my iPhone – and on devtools too on mobile simulation.
Do you prevent the hover for first level menu items? By default, these are available for the desktop menu.
This is the reason – why i had to click (including load of that extra page) to see the sublevel menu-items.on your Font Manager what do you see behind the font as font-family ( here green underlined ) ?
and the answers on https://kriesi.at/support/topic/vertical-align-of-images-in-portfolio-grid/ do not fit ;)
-
This reply was modified 7 months, 3 weeks ago by
-
AuthorPosts