Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    What conditions hide the timeline on mobiles ?

    Windy Plugins
    2
    4
    1.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vicbV
      vicb Paraglider | Premium
      last edited by

      Hi there,

      I am trying to adapt the sounding plugin to work on mobile. One problem that I have is that the timeline at the bottom of the disappear when the plugin is opened:

      ccf4b32e-9f4d-431a-8b51-c63d943c5c08-image.png

      When I open the built-in soundings, the timeline does not get hidden.

      Could someone please explain what are the conditions to show/hide the timeline ?

      Thanks

      vicbV 1 Reply Last reply Reply Quote 0
      • vicbV
        vicb Paraglider @vicb | Premium
        last edited by

        It seems like the culprit is this CSS:

        .onwindy-plugin-sounding {
          .left-border {
            left: @width;
          }
        }
        

        The thing is that I want to display the plugin in the left pane on desktops and tablets and in a window on mobile.

        I am not sure if there is a built-in way to do that ?

        There is not consistent class applied to the body. It could be platform-desktop, platform-ios, platform-android, ... but I haven't found a way to detect mobile vs not mobile using the class applied to the body.

        If it doesn't exist, I'll add a custom class.

        Anybody knows more ?

        rittelsR 1 Reply Last reply Reply Quote 0
        • rittelsR
          rittels Code contributor @vicb | Premium
          last edited by rittels

          @vicb

          Hi.

          The device id, is added to the html element:

          #device-desktop, #device-mobile or #device-tablet.

          vicbV 1 Reply Last reply Reply Quote 1
          • vicbV
            vicb Paraglider @rittels | Premium
            last edited by

            I was able to solve this using

            The less mixins .mobile(), .desktop(), ...

            The root scope variables isMobile, ...

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
            NodeBB & contributors, OSM & contributors, HERE maps
            Terms of Use     Privacy Policy