Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

card-title.html 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. mainDoc.registerElement(elemName, { prototype: proto });
  50. })(window, document);
  51. </script>