@esavoretti/flexmenu 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,17 +1,28 @@
1
1
  {
2
2
  "name": "@esavoretti/flexmenu",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Menu web component with built-in flexibility to accommodate itself to mobile screens",
5
+ "keywords": [
6
+ "web-components",
7
+ "custom-elements",
8
+ "flexmenu",
9
+ "responsive-menu",
10
+ "vanilla-js",
11
+ "mobile-menu",
12
+ "hamburger-menu"
13
+ ],
5
14
  "main": "flexmenu.js",
6
15
  "type": "module",
7
16
  "scripts": {
8
17
  "test": "echo \"Error: no test specified\" && exit 1"
9
18
  },
10
- "keywords": [],
11
19
  "author": "Domingo E. Savoretti <esavoretti@gmail.com> (https://sandy98.github.io/flexmenu)",
12
20
  "repository": {
13
21
  "type": "git",
14
22
  "url": "git+https://github.com/sandy98/flexmenu.git"
15
23
  },
16
- "license": "MIT"
24
+ "license": "MIT",
25
+ "publishConfig": {
26
+ "access": "public"
27
+ }
17
28
  }
package/favicon.ico DELETED
Binary file
package/index.html DELETED
@@ -1,54 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Flexible Menu Test</title>
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
7
- <!--[if lt IE 9]><script src="js/html5shiv-printshiv.js" media="all"></script><![endif]-->
8
- <link rel="stylesheet" href="styles.css" />
9
- <link rel="icon" type="image/x-icon" href="favicon.ico">
10
- <script src="flexmenu.js"></script>
11
- </head>
12
- <body>
13
- <!-- <hamburger-button></hamburger-button> -->
14
- <flex-menu bg-color="teal">
15
- <!-- <nav> -->
16
- <menu-list menu-title="Sites">
17
- <menu-item use-default-handler href="#home">Home</menu-item>
18
- <div>River Plate, el más grande, lejos!</div>
19
- <menu-item use-default-handler href="#contact">Contact</menu-item>
20
- <span></span>
21
- <menu-item use-default-handler href="#about">About</menu-item>
22
- </menu-list>
23
- <menu-list menu-title="Teams">
24
- <menu-item use-default-handler href="#river">River Plate</menu-item>
25
- <menu-item use-default-handler href="#boca">Boca Juniors</menu-item>
26
- <menu-item use-default-handler href="#racing">Racing Club</menu-item>
27
- <span></span>
28
- <menu-list menu-title="2nd Division">
29
- <menu-item use-default-handler href="#centralCordoba">Central Cordoba</menu-item>
30
- <menu-item use-default-handler href="#argentino">Argentino</menu-item>
31
- <menu-item use-default-handler href="#leonesRosario">Leones Rosario</menu-item>
32
- </menu-list>
33
- </menu-list>
34
- <!-- </nav> -->
35
- </flex-menu>
36
- <div class="main">
37
- <!-- <div class="stack"> -->
38
- <!-- </div> -->
39
- <hr>
40
- <h3 class="title-header">
41
- Flexible Menu Test Page
42
- </h3>
43
- <hr>
44
- <!-- <p>
45
- <button>Toggle Menu Item</button>
46
- </p> -->
47
- <div class="row centered">
48
- <label for="loc-hash">Location: </label>
49
- <span class="purple big cornered" id="loc-hash"></span>
50
- </div>
51
- </div>
52
- <script src="index.js"></script>
53
- </body>
54
- </html>
package/index.js DELETED
@@ -1,23 +0,0 @@
1
-
2
- let flexmenu, hambutton;
3
-
4
- document.addEventListener("DOMContentLoaded", () => {
5
- console.log("Document loaded.");
6
- flexmenu = document.querySelector('flex-menu');
7
- hambutton = flexmenu.shadowRoot.querySelector('hamburger-button');
8
- menuitem = document.querySelectorAll('menu-item')[0];
9
- hambutton.addEventListener('hamburger-toggle', () => console.info(`Hamburger toggled: ${hambutton.isopen ? "open" : "closed"}`));
10
- document.querySelectorAll('menu-item').forEach(mi => mi.addEventListener('click', ev => {
11
- console.info(`Click on '${ev.currentTarget.textContent}'`);
12
- }));
13
- const hashChange = () => {
14
- const content = location.hash.length > 1 ?
15
- `${location.hash[1].toUpperCase()}${location.hash.slice(2)}` : "#";
16
- document.querySelector('#loc-hash').textContent = content;
17
- // document.querySelector('menu-item').unselect();
18
- // if (content === "#") document.querySelectorAll('menu-item').forEach(mi => mi.unselect());
19
- };
20
-
21
- window.addEventListener('hashchange', hashChange);
22
- hashChange();
23
- });
package/runserver.py DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
-
4
- import sys, http.server
5
-
6
- def main():
7
- HOST, PORT = '', 8086
8
- print(f"Serving web content at ({HOST}, {PORT})")
9
- server = http.server.ThreadingHTTPServer((HOST, PORT), http.server.SimpleHTTPRequestHandler)
10
- try:
11
- server.serve_forever()
12
- except KeyboardInterrupt:
13
- print("\nKeyboard interrupt.")
14
- except Exception as exc:
15
- print(f"\nUnknown exception: {exc}")
16
- finally:
17
- server.server_close()
18
- print("\nBye")
19
-
20
-
21
- if __name__ == '__main__':
22
- main()
23
-
24
-
25
-