Author Topic: WeatherCat version of the Atkins ipwx Mobile web template for iPod/iPhone  (Read 39555 times)

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6490
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
JavaScript probably overrides (Re: Call Desktop Version | Links)
« Reply #30 on: January 29, 2016, 11:41:44 PM »
Dear Toby, X-Air, and WeatherCat web spinners,

1) Is there a way to call the desktop version once in the mobile site? The latest versions of iOS allow an option to "Request Desktop Site" which is fantastic, except the ipwx.html file doesn't allow that iOS option to work.

I don't know what the other problem is since I didn't write that template, but I think I can explain this problem.  The mechanism to select which website is this snippet of JavaScript:

Code: [Select]
    <!-- *** Begin Script to redirect iPhone to ipwx.html remove if not desired *** -->
    <script type="text/javascript">
(function(){var c=navigator.userAgent,a=window.location,d=document.cookie,b=a.href;
if(c.match(/iP(od|hone)/i)||c.match(/Android/i))if(d.indexOf("iphone_redirect=false")<0)a.href="ipwx_Cam.html";
})();
</script><!-- *** End Script to redirect iPhone *** -->

I suspect that this is antiquated and should be replaced with something else to work properly with iOS 9.  Since it is running in the main index.html file, when you attempt to load the desktop site, it automatically goes back to the mobile site - thus causing your problem.

Since you seem to be full of clever HTML tricks, would you know by chance what is the modern replacement so this behavior doesn't occur?

Cheers, Edouard  [cheers1]

dfw_pilot

  • Gale
  • ****
  • Posts: 345
    • GW3252
    • KTNWILLI1
    • WX Page
  • Station Details: Davis Pro2 Plus
Sorry, No
« Reply #31 on: January 29, 2016, 11:50:46 PM »
Sorry, no I don't. That's why I brought it up. I'll Google some more.

Here's to hoping I'm not the only one submitting to the HTML tricks post :)
A clear conscience is a great pillow.


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: WeatherCat version of the Atkins ipwx Mobile web template for iPod/iPhone
« Reply #32 on: January 29, 2016, 11:55:08 PM »
Not specific to javascript at all, but one "modern" solution is to design with CSS. Many suggest starting with a small screen (mobile) first and adjust placement and object size as space increases. That's one of the reasons I stopped using the "templates". They all seems to have fixed size objects designed for more than 1000 pixel windows. I've created (I really can't say I "designed" them, that implies the possession of at least minimal artistic skills! [blush] ) my two sites in the opposite direction, large to small. But hey are more than able to be used/viewed on mobile devices and 5K screens. It's called "build once, view anywhere".
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


dfw_pilot

  • Gale
  • ****
  • Posts: 345
    • GW3252
    • KTNWILLI1
    • WX Page
  • Station Details: Davis Pro2 Plus
Intrigued
« Reply #33 on: January 29, 2016, 11:59:03 PM »
I'm intrigued!
A clear conscience is a great pillow.


elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6490
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Modern doesn't code itself . . . (Re: Atkins ipwx Mobile web template)
« Reply #34 on: January 30, 2016, 12:11:51 AM »
Dear Toby, X-Air, and WeatherCat extremely busy types,

Not specific to javascript at all, but one "modern" solution is to design with CSS.

Yes, X-Air you are correct, but I don't have the time to learn the modern version of HTML  There was a time when HTML was in the range of amateurs, but it has become a very complex and powerful environment intended for the web development professionals who have create websites like Amazon's.

To me, the evolution of the web has been a real disservice to the "man in the street."  When it started out, it was simple because nobody was sure what it was good for.  As it evolved, it was clear it could be used for many things, but HTML didn't evolve into multiple environments for the various needs.  Instead of recognizing that we needed an "every-person's" HTML as well an industrial strength version - the needs of people to express themselves on the web was basically tossed aside in favor of business.  Because of that business focus at the expense of the netizens of the Internet, we have no voice unless either we work very hard or give in to services like Facebook.  It isn't like Facebook really provides a versatile creative environment that allows for a wide variety of individual expression.

I'm not sure how much effort to invest trying to keep up with web applications, but unless you make a living at it, eventually you will be drowned in details.  Even those in the business I suspect have a lot of on the job training to keep up with all the innovations.  Unless you have tonnes of time on your hands and want spend that time in front of a computer screen, this is a battle you will lose sooner or later.

Edouard

dfw_pilot

  • Gale
  • ****
  • Posts: 345
    • GW3252
    • KTNWILLI1
    • WX Page
  • Station Details: Davis Pro2 Plus
WordPress
« Reply #35 on: January 30, 2016, 12:19:51 AM »
Because of that business focus at the expense of the netizens of the Internet, we have no voice unless either we work very hard or give in to services like Facebook.

I have to disagree with this one point. I don't care much for Facebook because I want to own the content. An easy, simple, elegant, modern, secure way for "everyman on the street" to have a nice looking voice on the internet can be found here:

WordPress

All the best,

dfw
A clear conscience is a great pillow.


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: WeatherCat version of the Atkins ipwx Mobile web template for iPod/iPhone
« Reply #36 on: January 30, 2016, 12:47:12 AM »
Quote
I'm intrigued!
If you're talking about CSS, it's called "media queries". You first need to understand that all styling is done with CSS, not with html. You then have CSS note how many pixels wide any 'screen' may be and then have any needed classes/ID's set new values for that size. A 'screen' could even be a printer.

Unlike javascript, very few people know CSS can be blocked or removed, at least temporarily. Lots of sites discussing/using this idea. Here's a rather old page describing "media queries".
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: WeatherCat version of the Atkins ipwx Mobile web template for iPod/iPhone
« Reply #37 on: January 30, 2016, 01:06:55 AM »
To each his own. :) HTML has finally become highly useful with version 5. At first there were lots of browser maker pre-fixes that had to be included so it worked on those browsers that supported HTML5. Now, most of those browser builders are just dropping their proprietary names and building in support for most of the web-kit functions. It's one case where Apple has dominated an industry. HTML (and CSS), of course, are not languages. You don't 'program' in HTML (or CSS). They are still absolutely nothing but plain text files that the browser parses into what you see. They are both really just a (slowly growing) collection tags and key words.

I was never able to create anything in AppleScript (or Automator, for that matter) that didn't require a UNIX reference! ;) Like Apple itself, it's demise has been forecast for the last 20 years! [lol]

HTML and CSS have a very healthy, non-commercial, support group. But I find it much simpler than any other real programming language I've attempted to learn. However, I have no desire to ever make any income by building anything with these very powerful tools. I am free to try anything I can think of. I may not succeed, but I enjoy the process and usually learn something along the way. I suspect that those last two sentences apply equally to you, Edouard!

Frankly, I'm too stubborn [I should probably just end this sentence right here! [blush] ] to work with what some 'client' wants instead of what I want! I'm retired, I don't have any boss/client/manager! At least for the next week or so while my wife is busy in DC...  [rolleyes2] [rockon]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system