|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + <title>LinkedTrust Badge — Embed Demo</title> |
| 7 | + <style> |
| 8 | + body { |
| 9 | + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
| 10 | + margin: 0; |
| 11 | + padding: 40px 20px; |
| 12 | + background: #f5f5f5; |
| 13 | + } |
| 14 | + h1 { font-size: 24px; margin-bottom: 4px; } |
| 15 | + p.subtitle { color: #666; margin-top: 0; } |
| 16 | + .section { margin: 32px 0; } |
| 17 | + .section h2 { font-size: 18px; color: #333; margin-bottom: 16px; } |
| 18 | + .row { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; } |
| 19 | + pre { |
| 20 | + background: #1e1e1e; |
| 21 | + color: #d4d4d4; |
| 22 | + padding: 16px; |
| 23 | + border-radius: 8px; |
| 24 | + overflow-x: auto; |
| 25 | + font-size: 13px; |
| 26 | + line-height: 1.5; |
| 27 | + } |
| 28 | + code { color: #ce9178; } |
| 29 | + .dark-bg { |
| 30 | + background: #121212; |
| 31 | + padding: 24px; |
| 32 | + border-radius: 12px; |
| 33 | + } |
| 34 | + .try-it { |
| 35 | + margin-top: 24px; |
| 36 | + padding: 16px; |
| 37 | + background: #fff; |
| 38 | + border-radius: 8px; |
| 39 | + border: 1px solid #ddd; |
| 40 | + } |
| 41 | + .try-it label { font-weight: 600; font-size: 14px; } |
| 42 | + .try-it input { |
| 43 | + padding: 8px 12px; |
| 44 | + border: 1px solid #ccc; |
| 45 | + border-radius: 6px; |
| 46 | + font-size: 14px; |
| 47 | + width: 120px; |
| 48 | + margin: 0 8px; |
| 49 | + } |
| 50 | + .try-it button { |
| 51 | + padding: 8px 16px; |
| 52 | + background: #6366f1; |
| 53 | + color: white; |
| 54 | + border: none; |
| 55 | + border-radius: 6px; |
| 56 | + font-size: 14px; |
| 57 | + cursor: pointer; |
| 58 | + } |
| 59 | + #custom-target { margin-top: 16px; } |
| 60 | + </style> |
| 61 | +</head> |
| 62 | +<body> |
| 63 | + |
| 64 | + <h1>LinkedTrust Embeddable Badge</h1> |
| 65 | + <p class="subtitle">Drop a <script> tag and a custom element into any website — no React, no npm, no build step.</p> |
| 66 | + |
| 67 | + <!-- Load the badge component --> |
| 68 | + <script src="badge.js"></script> |
| 69 | + |
| 70 | + <!-- Usage example --> |
| 71 | + <div class="section"> |
| 72 | + <h2>Usage</h2> |
| 73 | + <pre><!-- 1. Include the script --> |
| 74 | +<script src="https://linkedtrust.us/badge.js"></script> |
| 75 | + |
| 76 | +<!-- 2. Use the element --> |
| 77 | +<linked-badge claim-id="124443"></linked-badge> |
| 78 | + |
| 79 | +<!-- With options --> |
| 80 | +<linked-badge claim-id="124443" theme="dark" compact></linked-badge></pre> |
| 81 | + </div> |
| 82 | + |
| 83 | + <!-- Light theme examples --> |
| 84 | + <div class="section"> |
| 85 | + <h2>Light Theme</h2> |
| 86 | + <div class="row"> |
| 87 | + <linked-badge claim-id="124443"></linked-badge> |
| 88 | + <linked-badge claim-id="124445"></linked-badge> |
| 89 | + </div> |
| 90 | + </div> |
| 91 | + |
| 92 | + <!-- Compact --> |
| 93 | + <div class="section"> |
| 94 | + <h2>Compact</h2> |
| 95 | + <div class="row"> |
| 96 | + <linked-badge claim-id="124444" compact></linked-badge> |
| 97 | + <linked-badge claim-id="124443" compact></linked-badge> |
| 98 | + </div> |
| 99 | + </div> |
| 100 | + |
| 101 | + <!-- Dark theme --> |
| 102 | + <div class="section"> |
| 103 | + <h2>Dark Theme</h2> |
| 104 | + <div class="dark-bg"> |
| 105 | + <div class="row"> |
| 106 | + <linked-badge claim-id="124443" theme="dark"></linked-badge> |
| 107 | + <linked-badge claim-id="124445" theme="dark"></linked-badge> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + </div> |
| 111 | + |
| 112 | + <!-- Try it --> |
| 113 | + <div class="section"> |
| 114 | + <h2>Try It</h2> |
| 115 | + <div class="try-it"> |
| 116 | + <label>Claim ID:</label> |
| 117 | + <input type="number" id="tryId" value="124443" /> |
| 118 | + <button onclick="tryBadge()">Load</button> |
| 119 | + <div id="custom-target"></div> |
| 120 | + </div> |
| 121 | + </div> |
| 122 | + |
| 123 | + <script> |
| 124 | + function tryBadge() { |
| 125 | + var id = document.getElementById('tryId').value |
| 126 | + var target = document.getElementById('custom-target') |
| 127 | + target.innerHTML = '' |
| 128 | + var badge = document.createElement('linked-badge') |
| 129 | + badge.setAttribute('claim-id', id) |
| 130 | + target.appendChild(badge) |
| 131 | + } |
| 132 | + </script> |
| 133 | + |
| 134 | +</body> |
| 135 | +</html> |
0 commit comments