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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Web Components playground</title> | |
</head> | |
<body> |
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
// STEP 3 - REGISTER THE NEW COMPONENT AS A CUSTOM HTML TAG | |
window.customElements.define('awesome-component', AwesomeComponent); |
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
// STEP 2 - DEFININING COMPONENT BEHAVIOUR | |
class AwesomeComponent extends HTMLElement { | |
constructor() { | |
super(); | |
// enables to access the shadowDom through the shadowRoot | |
const shadow = this.attachShadow({ mode: 'open' }); | |
// we are going to attach the template to the shadowRoot ( || shadowDOM) | |
shadow.appendChild(template.content.cloneNode(true)); | |
} |
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
// STEP 1 - DEFINING TEMPLATE STRUCTURE AND STYLES | |
// creating the template | |
const template = document.createElement('template'); | |
// styles and HTML templating structure goes right here | |
template.innerHTML = ` | |
<style> | |
.wrapper { |
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
// STEP 1 - DEFINING TEMPLATE STRUCTURE AND STYLES | |
// creating the template | |
const template = document.createElement('template'); | |
// styles and HTML templating structure goes right here | |
template.innerHTML = ` | |
<style> | |
.wrapper { |
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
<div class='page'> | |
<nav> | |
<a href='#'>Browse</a> | |
<a href='#'>Support</a> | |
<a href='#'>Blog</a> | |
<a href='#'>Sign in</a> | |
<a href='#'> | |
<div class='button'> | |
Sign up | |
</div> |
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
$ git remote rm origin | |
$ git remote add origin [email protected]:aplikacjainfo/proj1.git | |
$ git config master.remote origin | |
$ git config master.merge refs/heads/master |
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
import java.util.Date; | |
import java.util.List; | |
import com.fasterxml.jackson.annotation.JsonInclude; | |
import lombok.Builder; | |
import lombok.Getter; | |
import nl.abnamro.ignition.api.common.domain.model.Violation; | |
@JsonInclude(JsonInclude.Include.NON_NULL) |
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
package nl.abnamro.ignition.api.common.util; | |
/** | |
* | |
* | |
* A wrapper for exceptions occuring while converting to JSON | |
* | |
* | |
*/ | |
public final class JsonConversionException extends RuntimeException { |
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
package nl.abnamro.ignition.api.common.util; | |
import java.io.IOException; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
/** | |
* JsonConverterUtil helps to convert object to JSON string | |
*/ |
NewerOlder