Giter VIP home page Giter VIP logo

html-flatten's Introduction

html-flatten's People

Contributors

automata avatar bergie avatar cgarvis avatar forresto avatar gabithume avatar greenkeeperio-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

html-flatten's Issues

location block converted to interactive

moved from https://github.com/the-grid/apis/issues/530


Testing https://github.com/the-grid/ed-location widget

PUT

{
        "id": "89baa998-936f-4632-8e9c-0cbaf6bb626c",
        "type": "location",
        "html": "<iframe src=\"https://the-grid.github.io/ed-location/?latitude=19.327691&longitude=-99.82173&zoom=7&address=M%C3%A9xico%2C%20Mexico\"></iframe>",
        "metadata": {
            "geo": {
                "latitude": 19.327691,
                "longitude": -99.82173,
                "zoom": 7
            },
            "isBasedOnUrl": "https://the-grid.github.io/ed-location/?latitude=19.327691&longitude=-99.82173&zoom=7&address=M%C3%A9xico%2C%20Mexico",
            "address": "México, Mexico",
            "starred": true
        }
}

GET

{
        "id": "cce61f3d-abaa-4ea9-bb0c-4411bef97c0c",
        "item": "a6839f56-c76e-4814-a7e6-b97a26a3954b",
        "type": "interactive",
        "html": "<iframe src=\"https://the-grid.github.io/ed-location/?latitude=64.997588&longitude=-18.605467&zoom=5&address=Iceland\"></iframe>",
        "created_at": null,
        "updated_at": "2016-08-02T09:03:43.302Z",
        "metadata": {
            "source": "a6839f56-c76e-4814-a7e6-b97a26a3954b",
            "publisher": {},
            "geo": {
                "latitude": 64.997588,
                "longitude": -18.605467,
                "zoom": 5
            },
            "address": "Iceland",
            "isBasedOnUrl": "https://the-grid.github.io/ed-location/?latitude=64.997588&longitude=-18.605467&zoom=5&address=Iceland",
            "starred": true
        },
        "src": null,
        "measurementHash": "6519bbf7e920f0a098dd07cc8ec2f54c",
        "cover": {
            "unsalvageable": true
        },
        "measurementVersion": 16
}

Expected

  • type stays location
  • no cover.unsalvageable added

Output interactive blocks for mid and dir gmaps

don't strip br

Soft breaks in paragraphs can be semantically important. We shouldn't strip them.

`cta` block type html and metadata correspondance

We need to define how cta blocks are saved, and make sure html-flatten works as expected.

type: 'cta'
html: '<a href="url" data-role="cta" data-cta-modal="true">take an action!</a>'
metadata:
  openAsModal: true
  url: 'url'
  label: 'take an action!'

I like the link way, since the raw html from API will work.

coverTitle and coverAlt

html-flatten now puts img.title and img.alt to block(.metadata).title and block(.metadata).description. These should go to different keys, to enable saving more-semantic image blocks with different figcaption, img.title, img.alt.

allow child elements in <figcaption>

html-flatten is turning
<figure><img src="http://....jpg"><figcaption><h1>Title</h1><p>Description</p></figcaption></figure>
to
<figure><img src="http://....jpg"><figcaption>TitleDescription</figcaption></figure>

Expected: html survives intact.

the-grid/ed#54

special-case gifv

Embedly's iframe is dumb (loads a 17mb gif poster for a <1mb mp4)... We can do better and output a <video> tag with mp4 and webm sources (just change .gifv to .mp4, .webm) ... still poster image h.jpg.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.