Forum Replies Created
-
AuthorPosts
-
March 15, 2017 at 12:03 am in reply to: Clearing issue in mobile 1/5th columns with 50% width #761056
hast du eine seite wo auch 5 sind?
March 14, 2017 at 11:41 pm in reply to: Clearing issue in mobile 1/5th columns with 50% width #761038https://webers-testseite.de/kokon/fifth-columns/
i only can help best if i see your page
these are 1/5th columns with image and text under it. The columns are from individual height and with no space between
March 14, 2017 at 10:50 pm in reply to: Clearing issue in mobile 1/5th columns with 50% width #761014what is the thing you like to have? 2 2 1 or maybe 1 2 2 (1 in center above)
the thing is here to work with nth:child options and clearingsis there a link for a participant as me?
March 14, 2017 at 10:42 pm in reply to: Fontello Icons showing up as squares (and asian characters). #761013you lost something – try this in htaccess file: Link
<FilesMatch "\.(ttf|otf|woff)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch>March 14, 2017 at 10:39 pm in reply to: Automatic Resized Upload-Images become more KB than the original #761007a bit offtopic but in the same direction:
Wordpress itself got an image quality tool – this is in a good meaning but if the image creator knows his job excellent sometimes the 90% jpg is bad quality but more space. To avoid this from wp induced process add this to functions.php child-theme:add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );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:beforebtw: 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 8 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 dashboard -
This reply was modified 8 years, 8 months ago by
-
AuthorPosts

