Cloning the UI of iOS 7 with HTML, CSS and JavaScript
c2prods.com
c2prods.com
> There’s been a lot of controversy recently on whether Javascript could compete with native or not, both in terms of performance and of look’n’feel.
On the other hand, the controversially difficult to reproduce parts of iOS 7 aren't part of this demo. The real-time blur, the zooming "z-axis" navigation, the 3D animations, and the 60fps scrubbable gestures for going back in the navigation stack aren't here.
While those are all "bonus effects," they're also a lot of what makes iOS 7 delightful to use.
I think there's an argument either way on this, though. Even with a simple app, some would say looking very similar to native but being 1% off can be more detrimental to the experience than executing very well on a different, more HTML/CSS/JS-friendly approach.
That being said, I think this would be an interesting thing to start seeing around the web!
https://gist.github.com/jeena/f62232da7d6ac964d403
The rest is a matter of CSS.
[Edit:] moved the code to a gist
It would be sad if they learned to write non-semantic HTML and I think we all who write examples on the net should try to write great examples :)
And in fact we should do it with all the HTML which is online because we all learned HTML and CSS from right click "View Page Source" :D
However when it comes to semantic HTML there is no circumstance where you are unable to move forward because you used <div> instead of <figcaption>.
In fact thanks to the sometimes ambiguous descriptions of which semantic tag is appropriate you may find you used the wrong semantic tag which is arguably worse than not using a semantic tag at all.
And at the end of the day after carefully cross referencing and/or memorizing which semantic tag to use throughout your markup zero real world, practical effect has been gained. Only theoretical gains and memorization for memorization's sake.
It is obvious to me that this is the wrong approach. And I have never said he should use <figcaption> I said he should use appropriate HTML5 tags. If something is obviously a header, use <header> if not, don't. But building everything out of <div>s like it was in his first example code is just making it more difficult to read, there is no gain in just using <div> for everything.
Yeah exactly.
"It is obvious to me that this is the wrong approach."
Semantic HTML essentially boils down to "You should because you should."
"I said he should use appropriate HTML5 tags."
To what practical benefit aside from personal aesthetic preference?
"there is no gain in just using <div> for everything"
The gain is not having to memorize or reference which semantic tag goes where, nor having to go back and refactor or maintain semantic tags.
Runs smooth, comparable with Firefox Desktop Browser. But the scrollMask doesn't fade nicely and I have no clue why this happens. You can reproduce it using regular Firefox Browser (use Tools > Web Developer > Responsive Design View).
Changes on github: https://github.com/c2prods/Project-Tyson/pull/4
The only thing I could come up with was using something like HTML2Canvas[1] to render a portion of the DOM in a canvas/image, position that exactly on top, and then blur that. But all that seems quite convoluted and heavy, so decided not to invest any energy into it.
I forget where this comes from, I just have the link.
You can probably get ok performance if you don't have a lot of images.
A high quality implementation of synthetic scrolling is available at http://github.com/zynga/scroller if you want to play with it.
http://stackoverflow.com/questions/17034485/ios-7s-blurred-o...
Also: http://www.blurjs.com/
Having web-apps trying to mimick a platform I don't use just feels wrong. In much the same way as those fake Windows-UI images ("Scan complete. 3 viruses found!") used all over the internet trying to trick noobs into installing malware.
I may have missed references to this limitation, again, if it even matters for the purpose of the post.