-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: split considerations into separate sections
- Loading branch information
Showing
5 changed files
with
62 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: 'Polyfills' | ||
--- | ||
|
||
Since the **Microlink SDK** consumes the [Microlink API](/docs/api/getting-started/overview) and turns the raw data into a beautiful preview, it needs to perform an internal request to obtain it from the target URL. | ||
|
||
To do that, our integrations use the standard [Fetch API](https://developer.mozilla.org/es/docs/Web/API/Fetch_API). However, **Microlink SDK** doesn't add it as part of the bundle: It will take it from `window`. | ||
|
||
That means that `window.fetch` should be available and accesible. | ||
|
||
Although nowadays the [fetch browser compatibility](https://caniuse.com/#search=fetch) is good enough, you need to be sure that the environment **Microlink SDK** is running on has it available. | ||
|
||
We recommend using the [polyfill.io](https://polyfill.io/v3/) CDN for that purpose, it will only load the polyfill if `window.fetch` isn't globally detected. | ||
|
||
```html | ||
<script> | ||
crossorigin="anonymous" | ||
src="https://polyfill.io/v3/polyfill.min.js?features=fetch"> | ||
</script> | ||
``` | ||
|
||
Just add the above to your main markup before the closing `body` tag. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: 'Styling' | ||
--- | ||
|
||
<!-- ## CSS Classnames --> | ||
|
||
We don't inject any CSS into your application. | ||
|
||
The card previsualization is shipped with a default minimal inline style. | ||
|
||
If you need to adapt the _look and feel_, each component of the card has been assigned a [BEM](http://getbem.com/introduction) class name: | ||
|
||
- **microlink_card**: The root element of the card. | ||
- **microlink_card\_\_content_description**: The `p` tag of the card description. | ||
- **microlink_card\_\_content_title**: The `p` tag of the card title. | ||
- **microlink_card\_\_content_url**: The `span` tag of the card url link. | ||
- **microlink_card\_\_content**: The wrapper `div` around the content preview. | ||
- **microlink_card\_\_media_audio_wrapper**: The wrapper `div` around the audio preview. | ||
- **microlink_card\_\_media_audio**: The `audio` element for the audio preview. | ||
- **microlink_card\_\_media_image**: The `div` holding the `background-image` of the image preview. | ||
- **microlink_card\_\_media_video_wrapper**: The wrapper `div` around the video preview. | ||
- **microlink_card\_\_media_video**: The `video` element for the video preview. | ||
- **microlink_card\_\_media**: The media element, regardless of the media type (`video`, `image`, etc.). | ||
- **microlink_card\_\_progress_bar**: The `div` tag of the card progress. | ||
- **microlink_card\_\_spinner**: The `div` tag of the loading spinner in the card. | ||
|
||
For each SDK package there are some specific class names too: | ||
|
||
- **microlink_vanilla**: A root `div` used in [Vanilla](/docs/sdk/integrations/vanilla) to render the virtual DOM. | ||
- **microlink_vue**: A root `div` used in [Vue](/docs/sdk/integrations/vue) to render the virtual DOM. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters