Konubinix' opinionated web of thoughts

Wip Ipfsdocs Share

Fleeting

  <html>
    <head>
      <meta charset="UTF-8"/>
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <script defer src="https://konubinix.eu/ipfs/bafkreic33rowgvvugzgzajagkuwidfnit2dyqyn465iygfs67agsukk24i?orig=https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
      <script src="https://konubinix.eu/ipfs/bafybeihp5kzlgqt56dmy5l4z7kpymfc4kn3fnehrrtr7cid7cn7ra36yha?orig=https://cdn.tailwindcss.com/3.4.3"></script>
      <script src="https://konubinix.eu/ipfs/bafkreidbmnazlpto4hcnpdbyicqa3yh3x73e7sknzawgykpzie26zd3hb4?orig=https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
      <script>
        [[wip_ipfsdocs_with_alpine.org:helpers-ex()]]
      </script>
#+HUGO: more

      <script>
        document.addEventListener('alpine:init', () => {
            Alpine.data('app', () => ({
                message: "getting the data to share",
                gun: null,
                async init () {
                    this.gun = Gun(gunserver)
                    var channel = 'piano'
                    // channel = 'a'
                    let controller = 'pianc'
                    this.gun.get("ipfsdocs").get(channel).get('control').get(controller).get('share_url').on(
        (value, index) => {
          this.$dispatch('url', {value: value})
          },
          );
          },
          }))
          })
      </script>

    </head>
    <body @url.debounce.2000ms="if($event.detail.value){
                                window.location.href = $event.detail.value
                                }
                                else
                                {
                                message='no data'
                                }" x-data="app">
      <div x-text="message"></div>
    </body>
  </html>

installer

<html>
  <head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="manifest" href="./manifest.json">
  </head>
  <body>
    <div>Option -> Add to home screen</div>
  </body>
</html>

manifest

{
    "name": "share photo",
    "short_name": "share photo",
    "description": "share photo",
    "start_url": "./index.html",
    "background_color": "#ffffff",
    "theme_color": "#4285f4",
    "icons": [
        {
            "src": "./icons/icon-192x192.png",
            "type": "image/png",
            "sizes": "192x192"
        },
        {
            "src": "./icons/icon-512x512.png",
            "type": "image/png",
            "sizes": "512x512"
        }
    ],
    "orientation": "any",
    "prefer_related_applications": false,
    "scope": "./",
    "permissions": [],
    "splash_pages": null,
    "categories": []
}

config