1<form class="input-form">
2 <input type="text"></input>
3 <button></button>
4</form>
1<skilljar-hero-image src="http://www.skilljar.com/logo" alt-text="the skilljar logo">
2</skilljar-hero-image>
3<proserv-announcement-banner background-color="rebeccapurple">
4This is an announcement
5</proserv-announcement-banner>
1<proserv-announcement-banner background-image="...">
2 <h1>Reddit Mod Education</h1>
3 <p>Courses, skill training, and tips for community builders.</p>
4</proserv-announcement-banner>
1<div class="catalog-header custom-header">
2 <div class="homepage-ch-container">
3 <div class="homepage-ch-title">
4 <h1>Reddit Mod Education</h1>
5 </div>
6 <div class="homepage-ch-text">
7 <p>Courses, skill training, and tips for community builders.</p>
8 </div>
9 <div class="search-container" role="search">
10 <div id="catalog-search-box" class="catalog-search-input-group">
11 <input id="catalogSearchInput" type="text" value="" class="catalog-search-input" placeholder="Search" aria-label="Search">
12 <span class="catalog-search-input-button-wrapper">
13 <button class="catalog-search-input-button" type="button" title="Search" aria-labelledby="catalogSearchInput">
14 <i class="fa fa-search" aria-hidden="true"></i>
15 </button>
16 </span>
17 </div>
18 </div>
19 </div>
20 <div>
21 <style>
22 .catalog-header {
23 background: url('...')
24 }
25 </style>
26 </div>
27</div>
1<div class="search-container" role="search">
2 <div id="catalog-search-box" class="catalog-search-input-group">
3 <input
4 id="catalogSearchInput"
5 type="text"
6 value="{{ search_query }}"
7 class="catalog-search-input"
8 placeholder="{% trans 'storefront_search_placeholder' %}"
9 aria-label="Search"
10 />
11 <span class="catalog-search-input-button-wrapper">
12 <button
13 class="catalog-search-input-button"
14 type="button"
15 title="Search"
16 aria-labelledby="catalogSearchInput"
17 >
18 <i class="fa fa-search" aria-hidden="true"></i>
19 </button>
20 </span>
21 </div>
22</div>
1<skilljar-hero-image url="www.custom-domain.com/my-image"></skilljar-hero-image>
1<skilljar-announcement-banner><h1 slot="top-left">My custom text</h1></skilljar-announcement-banner>
1class HelloWorld extends HTMLElement {
2 connectedCallback() {
3 this.textContent = `Hello ${this.getAttribute('name')}!`;
4 }
5 static get observedAttributes() {
6 return ['name'];
7 }
8}
9customElements.define('hello-world', HelloWorld);
1<hello-sayer name="Doug"></hello-sayer>
1class StyledButton extends HTMLElement {
2 connectedCallback() {
3 this.dispatchEvent(
4 new ContextEvent(
5 window.skilljarThemeContext,
6 (skilljarTheme) => {
7 this.buttonColor = skilljarTheme.buttonColor;
8 }
9 )
10 );
11 const wrapper = document.createElement('div');
12 wrapper.innerHTML = `
13 <style>
14 button { background-color: ${this.buttonColor} }
15 </style>
16 <button>my button</button>
17 `;
18 this.appendChild(wrapper);
19 }
20}
21customElements.define('styled-button', StyledButton);
1<styled-button></styled-button>
1customElements.define('client-hero-image', CustomHeroImage);
1customElements.define('skilljar-hero-image', CustomHeroImage);