Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context-Menu #81

Open
MauriceConrad opened this issue Jan 22, 2016 · 6 comments
Open

Context-Menu #81

MauriceConrad opened this issue Jan 22, 2016 · 6 comments
Labels

Comments

@MauriceConrad
Copy link

Native looking context-menu

https://github.com/MauriceConrad/context-menu
(JSFiddle: https://jsfiddle.net/3rvxy92k/)

I've created a native looking context-menu CSS component.
There's no controller, just plain CSS:
This Context-Menu

minimal-example

  <body>
    <div class="context-menu" style="left: 100px; top: 100px">
      <ul>
        <li>
          <h1>Option 1</h1>
        </li>
        <li>
          <h1>Option 2</h1>
        </li>
      </ul>
    </div>
  </body>

sub-context-menu example

  <body>
    <div class="context-menu" style="left: 100px; top: 100px">
      <ul>
        <li class="has-sub-context-menu">
          <h1>I have a subcontext</h1>
          <ul>
            <li><h1>Item</h1></li>
            <li><h1>Another</h1></li>
          </ul>
        </li>
        <li>
          <h1>I'm normal</h1>
        </li>
      </ul>
    </div>
  </body>

How to use it?

It's really simple. Already study the JSFiddle or the example.html should explain everything.
But of course in the README.md everything is explained.

Documentation

https://github.com/MauriceConrad/context-menu/blob/master/README.md

@cinder92
Copy link

great!

@citrusui
Copy link

Nice! But it doesn't seem to work for mobile.

@MauriceConrad
Copy link
Author

@citrusui Sorry but I don't think that Photon was made for mobile hybrid apps. To use a desktop app logic within a mobile app is a really bad idea. And Photon is not designed for such a use case.

Photon tries to clone the native UI of Mac OS X for native looking desktop apps in Atom.
For mobile hybrid apps you can use http://www.idangero.us/framework7/

@citrusui
Copy link

Well yeah, Electron doesn't support iOS but since the context menu is all HTML, theoretically it should work on mobile.

@MauriceConrad
Copy link
Author

@citrusui I think the problem is that on iOS or Android exists nothing similar. It works on mobile except the "sub-context-menus" because of a OS X context menu uses a mouse-over.
If you have a great idea how to convert everything for mobile devices, tell me.

@bibhas2
Copy link

bibhas2 commented Feb 21, 2016

Context menu is already possible using native Electron menu. Please see issue #90.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants