Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

card-title.html 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!--
  2. <link href='http://fonts.googleapis.com/css?family=Lora:700' rel='stylesheet' type='text/css'>
  3. -->
  4. <template id="card-title">
  5. <style>
  6. :host {
  7. font-family: Lora, 'Calisto MT', 'Bookman Old Style', Bookman, 'Goudy Old Style', Garamond, 'Hoefler Text', 'Bitstream Charter', Georgia, serif;
  8. font-variant: small-caps;
  9. font-weight: bold;
  10. background-color: inherit;
  11. color: white;
  12. display: flex;
  13. justify-content: space-between;
  14. align-items: center;
  15. height: 30px;
  16. }
  17. ::content > h1 {
  18. flex: 1;
  19. font-size: 13pt;
  20. font-family: inherit;
  21. display: block;
  22. margin: 0;
  23. padding-left: 6px;
  24. }
  25. ::content > h2 {
  26. font-size: 18pt;
  27. font-family: inherit;
  28. display: block;
  29. margin: 0;
  30. }
  31. ::content > card-icon {
  32. height: 100%;
  33. }
  34. </style>
  35. <content></content>
  36. </template>
  37. <script>
  38. (function(window, document) {
  39. var elemName = 'card-title';
  40. var mainDoc = document;
  41. var importDoc = document.currentScript.ownerDocument;
  42. var proto = Object.create(HTMLElement.prototype);
  43. proto.createdCallback = function () {
  44. var template = importDoc.getElementById(elemName);
  45. var clone = mainDoc.importNode(template.content, true);
  46. var root = this.createShadowRoot();
  47. root.appendChild(clone);
  48. }
  49. proto.attributeChangedCallback = function (name, oldValue, newValue) {
  50. switch (name) {
  51. }
  52. }
  53. mainDoc.registerElement(elemName, { prototype: proto });
  54. })(window, document);
  55. </script>