Forum Replies Created
-
AuthorPosts
-
by the way placing the svg to the image box – give the image box a custom class and f.e. svgimg
than place in your quick css:
.svgimg .avia_image { height: auto; width: 350px; }
or 100%
on svg you can open the svg file in a good text editor (sublime text on Mac OSX or notepad++ on PC)
on top of your svg there is some code like this:
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="110 33 400 120" enable-background="new 110 33 400 120" xml:space="preserve">
you can manually enter : preserveAspectRatio=”xMinYMin meet” (just before xml:space so there is:
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="110 33 400 120" enable-background="new 110 33 400 120" preserveAspectRatio="xMinYMin meet" xml:space="preserve">
this code offers you the influence how the svg shrinks. xMinYMin means it goes to the top left corner
if you like to center the logo in x-direction : xMidYMin means it centers on shrinking in x-direction but it goes to top etc
xMaxYMax – goes to right bottom corner of the surrounding container.well with the plugin above and my “image.php” i can use the alb element. And only by adding a custom class i reach the possibility to add that inline svg.
My idea now is to insert an if clause to the image alb ( if mime type is svg than custom class of image is …)
on logo case i often use this:
function first_logo($logo) { $logo .= '<strong class="logo first-logo"><a href="url1">' ; $logo .= file_get_contents("path to svg logo"); $logo .= '</a></strong>'; return $logo; } add_filter('avf_logo_final_output', 'first_logo');
to place an inline svg as logo.
see what happens on hovering the svg!
hm i changed it in image.php to: (from line 437)
$markup_url = avia_markup_helper(array('context' => 'image_url','echo'=>false, 'custom_markup'=>$meta['custom_markup'])); $markup = avia_markup_helper(array('context' => 'image','echo'=>false, 'custom_markup'=>$meta['custom_markup'])); $output .= "<div class='avia-image-container {$class} ".$meta['el_class']." ".$this->class_by_arguments('align' ,$atts, true)."' $markup >"; $output .= "<div class='avia-image-container-inner'>"; if($link) { $output.= "<a href='{$link}' class='avia_image' {$blank}>{$overlay}<img class='avia_image ".$meta['el_class']." ' src='{$src}' alt='{$alt}' title='{$title}' $markup_url /></a>"; } else { $output.= "{$overlay}<img class='avia_image ".$meta['el_class']." ' src='{$src}' alt='{$alt}' title='{$title}' $markup_url />"; } $output .= "</div>"; $output .= "</div>"; }
you can see result here: https://webers-testseite.de/kokon/3164-2/
this is an image alb element in a 1/2 container.
The plugin (svg support) – if it comes to an img tag with class style-svg it replaces the whole img container with the svg code ! nice !:lol – yes
the reason : there is an svg plugin which enables all in wordpress what svg must have. in dashboard media the grid and the list overview is with svg preview and the clue : you can embed svg in the normal and advanced layout editor. This is allready possible – but the svg is still an img tag.
if you give a custom css class to it (standard is style-svg) it places not an image tag but the svg inline code.
This has a lot of advantages.
So in tiny mce editior this is simple to set the class to the image. But on alb image not.how does the parent container get the custom class?
for me it will be ok if i put a new shortcode image.php in child theme – but i do not see where the custom class in the code comes from.
ah – and by the way the logo in the hamburger menu is a home link with image instead of text.
For the overlay we need a container surrounding the whole thing which could be adressed well.
So best will be to make a copy of header.php in the child-theme folder.
Open it and insert that new container just after the opening wrap_all container to have than:<div id='wrap_all'> <div class='mega-bg'></div>
so we can have than in quick css :
.mega-bg { width:100%; height:500%; position:absolute; display:none; z-index:0; transition: all 1s linear 0; opacity: 0 } .av-burger-overlay-active .mega-bg { width:100%; height:500%; background:#fff; position:absolute; display:block; z-index:500; transition: all 1s linear 0; zoom: 1; filter: alpha(opacity=80); opacity: 0.8; }
you see here that mega-bg container is just a “super container ” and in normal mode with opacity zero !
when hamburger menu opens there is an extra class : .av-burger-overlay-active.
we can now use this to change opacity and background-color (you can use here every color you like even#000)here is the rest with some comments:
/******** some logo adjustments *************/ .main_menu .avia-menu,#header_main_alternate,.fallback_menu { display:block; float:right; } .responsive #top #wrap_all .container { max-width:95%; width:95%; } .responsive #top #wrap_all #header { background-color:#fff; opacity:1; position:fixed; width:100%; } .responsive #top .logo { float:left; position:absolute; top:50%!important; transform:translateY(-50%); width:65%; } #menu-item-burger > a { padding-right:8px!important; } #advanced_menu_toggle { display:none!important; } /******** if you like to have infront of your menu-items some icons. *************/ #av-burger-menu-ul li#menu-item-437 a .avia-menu-text::before {content: "\e821 \00a0";font-family: entypo-fontello; color: #0088BD} #av-burger-menu-ul li#menu-item-438 a .avia-menu-text::before {content: "\e83c \00a0";font-family: entypo-fontello; color: #0088BD} #av-burger-menu-ul li#menu-item-439 a .avia-menu-text::before {content: "\e857 \00a0";font-family: entypo-fontello; color: #0088BD} #av-burger-menu-ul li#menu-item-440 a .avia-menu-text::before {content: "\e80b \00a0";font-family: entypo-fontello; color: #0088BD} #av-burger-menu-ul li#menu-item-441 a .avia-menu-text::before {content: "\e805 \00a0";font-family: entypo-fontello; color: #0088BD} #av-burger-menu-ul li#menu-item-589 a .avia-menu-text::before {content: "\e80e \00a0";font-family: entypo-fontello; color: #0088BD} #av-burger-menu-ul li#menu-item-703 a .avia-menu-text::before {content: "\e81e \00a0";font-family: entypo-fontello; color: #0088BD} /********. some changings of hamburger menu. **********/ .av-burger-overlay { box-shadow: -2px 0 10px #bbb; left: auto; max-width: 400px; } .av-burger-overlay-inner { background: #fff url("url to a background image") no-repeat scroll 0 0 / cover ; } .av-burger-overlay-active #top .av-hamburger-inner, .av-burger-overlay-active #top .av-hamburger-inner::before, .av-burger-overlay-active #top .av-hamburger-inner::after { background-color: #0088BD !important; } #av-burger-menu-ul li a { color: #000 !important; } #av-burger-menu-ul li a .avia-menu-text { text-shadow: 1px 1px 3px #333; } #av-burger-menu-ul li a:hover .avia-menu-text { color: #0088BD; font-weight: 400; } /******** if you don't like to have fullscreen hamburger active menu when under a given screenwidth *************/ @media only screen and (max-width: 880px) { .av-burger-overlay { box-shadow: none; left: 0 !important; max-width: 100% !important; } }
you mean the whole with overlay of content?
Or only the solution that hamburger works in all cases?hm – i thought he liked to have the hamburger menu for both cases : wide screens and in responsive case
this is possible : see here Link
make the browser window smaller and see that hamburger is allways in action.
(There are some other changings on Hamburger here too – (not 100% width etc – overlay of content etc)you mean – you have a shrinking header – and if shrinking of header has is finished – you want a different logo than ! ?
i need more input.
you have choosen the sticky header on Enfold Options Dialog – and now ?the sticky option is a globaly one – so how do you get pages with and some without sticky behavior?
As an advanced layout builder element there is a 100% (to the outer container) definition. So no need to say something.
But if you insert the svg (as img) via standard editor you can change the sizes in text mode of tinymce.well i think the code snippet above should only do the job for admin area – dashboard media preview.
btw. there is a spacebar missing between td and . media-icon.
but i think the code could be a bit changed to:function fix_svg_thumb_display() { echo '<style type="text/css"> td .media-icon img[src$=".svg"] { width: 100% !important; height: auto !important; } </style>'; } add_action('admin_head', 'fix_svg_thumb_display');
showing the svg attachment isn’t the backend site it is in frontend (wp_head influenced)
function fix_svg_attachment_display() { echo '<style type="text/css"> .attachment img[src$=".svg"] { width: 100% !important; height: auto !important; } </style>'; } add_action('wp_head', 'fix_svg_attachment_display');
you did notice that you could drag & drop alb elements to the tab content field?
why instead
trya:hover:before
btw: very nice logo !
did you try the second snippet – i think its better for your site
or get rid of the loading case- This reply was modified 7 years, 8 months ago by Guenni007.
you have allways to set a width (or heights) rule for svgs – otherwise WP will give them a 1px size!
f.e.
.logo img { width: 350px; height: auto }
the reason why it works on responsive case is that on that moment the logo gets a size rule from enfold theme settings.
have you got a link to your site?
why don’t you use that brilliant Plugin: bwp minify.
thanks Christian !
maybe an important is necessary
h1,h2,h3,h4,h5 { text-transform: none !important }
or maybe better:
function avia_custom_mobile_logo(){ if(wp_is_mobile()){ ?> <script> jQuery(".logo img").attr("src", "http://kriesi.at/wp-content/themes/kriesi/images/logo.png") </script> <?php } } add_action('wp_footer', 'avia_custom_mobile_logo');
function av_dif_mobile_logo(){ ?> <script> jQuery(window).load(function(){ if (jQuery(window).width() < 480) { jQuery(".logo img").attr("src", "url to the new logo") } }); </script> <?php } add_action('wp_footer', 'av_dif_mobile_logo');
try this !
by the way if you want a custom Sorting – use page order an the plugin “intuitive custom post order” –
after activation you can sort the page order by drag & drop in page/post/portfolio listing of dashboardyou can find here http://kriesi.at/documentation/enfold/code-snippets/ some code snippets to influence sort options globaly. But this above you can decide eachtime you generate a new alb element.
put this to functions.php of your child-theme:
if(!function_exists('avia_custom_query_extension')) { function avia_custom_query_extension($query, $params) { global $avia_config; if(!empty($avia_config['avia_custom_query_options']['order'])) { $query['order'] = $avia_config['avia_custom_query_options']['order']; } if(!empty($avia_config['avia_custom_query_options']['orderby'])) { $query['orderby'] = $avia_config['avia_custom_query_options']['orderby']; } unset($avia_config['avia_custom_query_options']); return $query; } add_filter('avia_masonry_entries_query', 'avia_custom_query_extension', 10, 2); add_filter('avia_post_grid_query', 'avia_custom_query_extension', 10, 2); add_filter('avia_post_slide_query', 'avia_custom_query_extension', 10, 2); add_filter('avia_blog_post_query', 'avia_custom_query_extension', 10, 2); add_filter('avf_magazine_entries_query', 'avia_custom_query_extension', 10, 2); add_filter('avf_template_builder_shortcode_elements','avia_custom_query_options', 10, 1); function avia_custom_query_options($elements) { $allowed_elements = array('av_blog','av_masonry_entries','av_postslider','av_portfolio','av_magazine'); if(isset($_POST['params']['allowed']) && in_array($_POST['params']['allowed'], $allowed_elements)) { $elements[] = array( "name" => __("Custom Query Orderby",'avia_framework' ), "desc" => __("Set a custom query orderby value",'avia_framework' ), "id" => "orderby", "type" => "select", "std" => "", "subtype" => array( __('Default Order', 'avia_framework' ) =>'', __('Title', 'avia_framework' ) =>'title', __('Random', 'avia_framework' ) =>'rand', __('Date', 'avia_framework' ) =>'date', __('Author', 'avia_framework' ) =>'author', __('Name (Post Slug)', 'avia_framework' ) =>'name', __('Modified', 'avia_framework' ) =>'modified', __('Comment Count', 'avia_framework' ) =>'comment_count', __('Page Order', 'avia_framework' ) =>'menu_order') ); $elements[] = array( "name" => __("Custom Query Order",'avia_framework' ), "desc" => __("Set a custom query order",'avia_framework' ), "id" => "order", "type" => "select", "std" => "", "subtype" => array( __('Default Order', 'avia_framework' ) =>'', __('Ascending Order', 'avia_framework' ) =>'ASC', __('Descending Order', 'avia_framework' ) =>'DESC')); } return $elements; } add_filter('avf_template_builder_shortcode_meta', 'avia_custom_query_add_query_params_to_config', 10, 4); function avia_custom_query_add_query_params_to_config($meta, $atts, $content, $shortcodename) { global $avia_config; if(empty($avia_config['avia_custom_query_options'])) $avia_config['avia_custom_query_options'] = array(); if(!empty($atts['order'])) { $avia_config['avia_custom_query_options']['order'] = $atts['order']; } if(!empty($atts['orderby'])) { $avia_config['avia_custom_query_options']['orderby'] = $atts['orderby']; } return $meta; } }
than you got extra options in the gallery dialogs
yes you can – place the given shortcode into a text alb element.
But you have to think of the smaller canvas. it is not possible to insert f.e. a layerslider created for 1210px width to it.
Create a new one (could be responsive) but with less canvas size – see example – allthough i created a layerslider only with canvas size 320px on smaller screens when columns go to 1/1 it is bigger caused by responsiveness.
https://webers-testseite.de/kokon/layerslider-in-column/PS : you find the shortcode in Layerslider options dialog nearby the “save changes” button
habt ihr eine eigene footer.php im Child-Theme ?
Sieht so aus als wäre das dynamisch da eingepflegt.zB den Versuch unternommen einen Login für den admin bereich dort zu platzieren.
be careful it replaces it on category view
if you have single post with that category you have to take a different conditional tagtry than with has_category(‘music’)
btw – i think if you only set the parameter to has_category the is_category is included
-
AuthorPosts