Responsive Atahualpa
see How To pass Google's 'Mobile-Friendly Test' which contains the information in this thread
Here is a CSS fix to make Atahualpa responsive. If you have sidebars on the left you'd need the JavaScript below as well, or else the left sidebars will be above the main area when in mobile mode. Adjust the values 767 (CSS) and 768 (JS, see below) to the viewport width at which you want the layout columns to align below each other: Add the following CSS to "Add HTM/CSS Inserts" -> "CSS Inserts". Code:
@media only screen and (max-width: 767px) { This should be all, if you have no left sidebars. It may work without the !important for .hentry img To keep the main column on top, even with left sidebars: Add the following to "Add HTM/CSS Inserts" -> "HTML Inserts: Body Bottom" Code:
<script> The CSS is tested, the JS not. Let me know if it does not work. This solution does not take care of thing like switching to a mobile menu, however the menu items should wrap. |
it mess up the default calender widget - you end up with one date per line.
|
Quote:
|
That's better!!:)
|
Didn't work for me?
I tried this, looked at my blog on the iphone, and nothing was different. Tried it with and without the Henry section. I have no left sidebar, so I didn't include the javascript. |
ok, I added this code to http://profilepictures.co.nz... it did not seem to have an effect on iPhone and iPad display at all... it did though in a browser. How should handle resizing the banner?
|
I did the above hack - however comments get scrambled once the responsive layout kicks in and the sidebar gets moved to the bottom.
Comments then overlay the sidebar which is moved to the bottom. (yeah - and as noted it does not help to make atahualpa more responsive on mobile screens - as it does not take into account dpi/ppi. That's at least my experience. If there was some kind of ppi detection - or mobile phone browser detection - and comment problem fixed - it would actually be very useful. Right now it's more playing around without any usefulness (except people on desktop browser surfing with very small narrow window - at least for my layout with a single right widget sidebar). |
Okay - here are my complete HTML/CSS Inserts - this is working well (except broken comments) for layout with right sidebar. Even images work now - however you need to make sure image size is NOT set. Images will be scaled correctly! (anyone knows a plugin to go through all images and unset the size?) - off course the problem is that mobile devices won't use it - because their resolution is too high - and there is no PPI factor here.
Code:
div#imagecontainer { |
1 Attachment(s)
That's how comments look - anyone got a solution or same problem?
- Comments are fine as long as the sidebar is shown on the right hand side - once the sidebar moves down - it will be below the squashed comments. |
What's the latest update on the rumored update to Atahualpa that includes responsive-ness? I might have to reluctantly trudge over to Montezuma... but I've looked at it before and I got intimidated.
Darn it! I like Atahualpa and want to use it forever, but I have clients who want a responsive site. |
oh me too! I'd love Atahualpa to be responsive. I've gone over to the dark side and bought a responsive theme for a job that needs doing quite quickly - it is hell on a stick. Really limiting although it was presented as fully customisable. I've been spoiled with Atahualpa and I'm used to being able to do things like make sidebars a consistent width throughout the site or style widgets easily. This theme needs loads of coding just to make those simple things happen. My css isn't up to Montezuma yet though I'm working on it. I'd really happily pay money for a responsive Atahualpa.
|
Quote:
Code:
<script type="text/javascript"> HTML Code:
<body onresize="OnResizeDocument()" > Note: I'm using 820px instead of 768px in order to keep my nav bar from resizing. The CSS adjustments are really, really nice! Thank you! |
For those who are finding the CSS doesn't work on mobiles as is, try adding the following to the HTML Inserts: Header section:
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="initial-scale=1"> You'll also need these tags to make Google happy. Without them they will flag the site as "not mobile friendly" even though you have the media query in your CSS. I'm not seeing a problem with comments on my test site, but there is only one post with a comment so far. |
@sawyerjw
Thanks a lot for your reply. That was clearly missing. I got now 94 points on usability in google pagespeed insights.. (only some buttons to close to each user). Adding to this - if you want to pass the google mobile test - you need to set the minimum page layout width to 320 pixels and no larger. Effectively something like 600 is much much better for real time use - but then it doesn't pass google tests - so that stays a bit a dilemma. At least for users with good eyes - 320 is really not good. So do it for google and blind people - or better optimize for real users?? Actually - how could one exclude the top navigation bar if viewport is smaller than X - say smaller than 600 pixels? (I use instead a menu in the right bar - which is moved down). I got the comments fixed somehow now - but dunno why. |
I am so happy! Thank you, Thank you, Thank you. Everything looks perfect and I have 2 left columns to deal with and comments are great.
Google test says: Awesome! This page is mobile-friendly. |
Quote:
Code:
body onresize="OnResize Document()" |
Well - so Overall I'm left with the following on PageSpeed (as probably anybody using Atahualpa):
Remove Render Blocking Scripts (one of which is by Atahualpa - the last: https://openmtbmap.org/…-includes/js....js?ver=1.11.1 https://openmtbmap.org/…s/jquery/jqu...n.js?ver=1.2.1 https://openmtbmap.org/de/?bfa_ata_file=js And of course loads of: "Size tap targets appropriately" Anyone got any good recommendations on how to manage the tap targets better? Also it would be great to have some code to get rid of the Menu1 alltogether if viewport is smaller than 640 pixels (that should mean all smartphones - and maybe some tablets). Mobilegeddon is just a few days away - and I am afraid that the tap targets are still a big showstopper - and I like most atahualpa users will even with the above changes lose a lot of search traffic from google. |
What problems does google report for you?
Do you also have probs that the CSS is not working consistently and that the Sidebar from time to time is not actually removed but made smaller and detached but still there? (especially in Chrome - only Firefox is okay all the time for me). If I don't find out why this sidebar problem exists - I will have to move to another theme before 21. April. The Tap sizes are pretty much unsolvable for me - but it is possible to get to a rating that google stops complaining (if the sidebars vanish correctly - then usually 90-92 points on usability which is hopefully good enough). The rest is basically making sure it's speedy enough. I can get to 74-79 Points on Mobile Speed (95 points were possible if some third party plugins worked bettter) using ngx_pagespeed module and W3Total Cache (including minifying as well as possible). Whats your domain? |
My domain is normhamilton.ca
There is a single page site that provides entry to my photography, writing or blog. There are no side bars on this page at all. Google's Mobile-Friendly Test gives the following response. Not mobile-friendly Page appears not mobile-friendly
UPDATE As I was reading through Google's pages in the PageSpeed Insights I it suggested I configure a viewpoint, and gave a link to some instructions. I added the following to the Add HTML/CSS Inserts/HTML Inserts: Header <meta name=viewport content="width=device-width, initial-scale=1"> It now says the site is mobile friendly. I'll have to see what happens now with the sites that have multiple plugins, e-commerce and a right side bar. |
Well you definitely forgot from the above explications:
body onresize="OnResize Document()" Then Mobile viewport not set and Content wider than screen would not happen. Text too small is easily solvable (use 1em as minimum size and nothing smaller - you will need to check all style settings). and Links too close together is hard. I don't know how to solve it (same for my tap sizes to small problem). |
Is there a fully responsive version of ATA coming soon?
|
This works great on three of my sites, including a test site. Really pleased with that. However on two other sites, when viewed on a mobile, the site is limited in width to about 1/4 of the screen on my phone or doesn't move the sidebar below the main on my tablet. Text runs down left side instead of across the page. Any help is appreciated.
See Spirit Knives Yukon I've been unable to locate what is causing the problem. I thought it might be the shopping cart, but it works OK on my test site with the shopping cart in place. This is what I've put into the HTML/CSS Inserts (Everything has been cut and pasted from this thread) HTML Inserts: Header <meta name=viewport content="width=device-width, initial-scale=1"> HTML Inserts: Body Tag body onresize="OnResize Document()" HTML Inserts: Body Bottom <script> jQuery(document).ready(function($) { if( $(window).width() < 768 ) { // If any left sidebar exists if ( $('#left').length || $('#left-inner').length ) { $("#middle").detach().prependTo('#bodyrow'); } } }); </script> CSS Inserts /* Make Atahualpa Responsive */ @media only screen and (max-width: 767px) { table#layout, table#layout > tbody, table#layout > tbody > tr, table#layout > tbody > tr > td, table#layout > tr, table#layout > tr > td, table#layout td#header, table#layout td#left, table#layout td#left-inner, table#layout td#middle, table#layout td#right, table#layout td#right-inner, table#layout td#footer { display: block; } table#layout > colgroup { display: none; } div#wrapper, td#middle { width: auto; } } .hentry img { max-width: 100%; height: auto !important; display: block !important; } |
@yukoner: You have a syntax error in your body statement and many syntax errors in your CSS Inserts
|
Thanks Juggledad.
Do you mean errors in the what I'm adding here or something that was pre-existing before I added this? |
Dreams do come true! Thanks for making this happen!
|
You have at least one open bracket where you should have a close bracket
Do this, add the following to the very begining of the CSS Inserts HTML Code:
body { Now move that CSS to the end of the CSS Inserts and go view the page. Is the background light blue? Probably not it you haven't fixed teh syntax errors, so move the code halfway up in the CSS Inserts to see if you can find the error. If it works, you know the error is in the bottom half of your CSS Inserts and keep repeating, if it doesn't then you know the error is in the top half of the CSS inserts. Keep moving it and you can narrow down the issue and find and fix it. |
For some reason the only way I can find this suggestion from you was to quote another response from you. That said, this did the trick for Spirit Knives Yukon. Now on to the other site; it has a left sidebar. Thanks for this very helpful suggestion, Juggledad.
Quote:
|
Actually how can we remove the Top Menu if width smaller X?
Then we could use Responsive Menu instead - because the Menu really does not work well for mobile - but it would be a shame to use an Responsive menu on desktop too (not very quick for desktop and people do not look out for it!). |
With a few minutes using a code examiner and looking at the CSS in this thread, you should be able to puzzle it out and learn something to boot.
If you have problems, post what you have tried and why and we'll see if I can help you solve the issue yourself. |
Well I would guess somehow like the following - but I don't know what the menu bar is instead of middle here..
<script type="text/javascript"> function OnResizeDocument () { if( window.innerWidth < 820 ) { jQuery(function($) { $("#middle").detach }); } </script> |
Well I guess it's called
div#menu1 ul.rMenu ur ul.rMenu but neither works with my above code example... So nothing of this works: Code:
if( window.innerWidth < 800 ) { |
it's all done in the CSS...
|
Code:
@media only screen and (max-width: 800px) { When to do this? If you get the dreaded "tSize tap targets appropriately" message in your google webmaster / pagespeed insights mobile - User Interface (and identify that it's the menu bar that is responsible). I actually recommend to do this in any case - as the menu1 is really impossible to use with submenus on a mobile phone. If you only use pages without subpages you may be fine not using this hack, however as soon as ... Then Install "Responsive Menu" plugin or similar (like "WP Responsive Menu" or others). Responsive Menu automatically detects the screen size below which it should be activated... (if not you can set it manually too). Have not tried out other responsive menus yet though... |
Well, using the information on this thread and the one linked to at the beginning, I've gotten 4 out of 5 sites working wonderfully with mobiles. This last one, see link below, has me stumped. I've spent a few days now to no avail.
I've used Juggledad's suggestion of putting body {into the CSS inserts at the beginning and end - the background says light blue for both, indicating there are no syntax issues in the CSS inserts. I've deactivated all my plugins - still didn't work. I've even tried removing the left sidebar and that didn't help, so I put it back. The left sidebar shifts to the middle of the page on my mobile(s), but the sidebars are not appending under each other as they are on my other sites. With the left sidebar removed, the main body and right sidebar remain side-by-side. I know this will be something simple that I'm unable to locate. Any suggestions would be appreciated. http://normhamilton.ca/writer/ |
You have a syntax error in your CSS Inserts. Do this
1) do an export of yout settings (ATO->Export/Import_ 2) take everything BUT the responsive code out of the CSS Inserts and put it in a text file. Then one by one (or two by two) cut the CSS out of the text file and put it back into the CSS Inserts and test the site. at some point it will fail and you'll know the bad CSS |
Found it! There was an extra close bracket right near the end of the CSS inserts.
Thanks Juggledad. Learning these methods of investigating the CSS inserts is invaluable. |
Quote:
I also found another issue with this but I'm not sure when it started. I only discovered it when updating Atahualpa to 3.7.23 and WP to 4.2.2. I had a problem with pages where there is an input field on Android devices: the keyboard won't stay up because Android adjusts the screen size when the virtual keyboard pops up which then runs the 'onresize' function again and the input field loses focus and the keyboard disappears - it is an ugly loop. AFAIK, it's only Android. iOS doesn't exhibit the same issue. At this point the only workaround I could get to work was to remove the left sidebar from any pages that have an input field and adding back the check for a left sidebar function: Code:
if ( $('#left').length || $('#left-inner').length ) { Also, FWIW, I've switched to using the 'window.onresize' function in a separate file: Code:
window.onresize = resize; Code:
function resize_window() |
WPTouch is crashing my site so I can't use it anymore...
After reading all the comments here and the different hacks, I'm not sure the original insert will get the job done? I'd happily pay for ATA to have it be responsive. Having to add more inserts for 30 sites to get them all responsive is a lot of time and frustration. Most people surf on devices these days. Thanks! |
I am not fluent enough in code to grasp all of the variations after the first two posts in this thread.
Do I need to use any of these in my site to make it pass the Google Mobile Test? Please advise. And thanks. |
did you try it? did it pass or fail?
|
All times are GMT -6. The time now is 07:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.