An Embedded supports customization at the page-level with elements or in adding data-* attributes to individual generated elements.
Websites can set widget preferences across their entire website by including in every page for interpretation by YouRepo's widget JavaScript before creating a new widget or button.
Widget settings specified in a may be overridden at the individual widget level. Order of precedence:
- web intent link query parameter
- widget attribute
- meta element
- widget ID stored preference (embedded sources only)
Theme
Override the default light theme preference for an Embedded Package or an Embedded Source.
<meta name="yourepo:widgets:theme" content="dark">
<a data-theme="dark" class="yourepo-widget" ...></a>
Link color
Specify a hexadecimal color value for links displayed in an Embedded Package or an Embedded Source.
<meta name="yourepo:widgets:link-color" content="ff00ff">
<a data-link-color="ff00ff" class="yourepo-widget" ...></a>
Border color
Specify a border color for any Embedded widgets displayed on the page.
<meta name="yourepo:widgets:border-color" content="ff00ff">
<a data-border-color="ff00ff" class="yourepo-widget" ...></a>
Dimensions
An embedded widget automatically adjusts to the width of its parent element with a minimum width of 250 pixels and a maximum width of 520 pixels. Set the maximum width or the maximum height of an embedded widget by adding a width
or height
attribute to the widget's anchor element.
You can also use auto
value to specify no maximum size.
<a with="350" height="auto" class="yourepo-widget" ...></a>
Language
Loads text components in the specified language. Note: does not affect the text of a Package displayed.
Supported YouRepo language code:
- ar (العربية)
- de (Deutsch)
- el (Ελληνικά)
- en (English)
- es (Español)
- fr (Français)
- he (עברית)
- it (Italiano)
- ja (日本語)
- ko (한국어)
- nb (Norsk bokmål)
- nl (Nederlands)
- pl (Polszczyzna)
- pt (Português)
- ru (Русский)
- tr (Türkçe)
- vi (Tiếng Việt)
- zh (中国)
<a data-lang="en" class="yourepo-widget" ...></a>
Style
Remove a display component of a widget with space-separated tokens.
- noheader - hides the header
- noborders - removes all borders: around the package, between Packages, and inside a Package
- transparent - remove background color
<blockquote data-theme="light" data-width="280" data-height="400" class="yourepo-widget" data-widget-id="https://foxfort.yourepo.com/pack/lumi1"><p>Night mode camera for low light photography</p>— Foxfort Repo <a href="https://foxfort.yourepo.com/pack/lumi1"><time class="dateToMomentTimeZone" datetime="2020-09-16T10:09:56+02:00" datetimeformat="L">16/09/2020</time></a></blockquote><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.defer=true;js.id=id;js.src=p+"://api.yourepo.com/js/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","yourepo-wjs");</script>
Night mode camera for low light photography
— Foxfort Repo