100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.

0 downloads

dbbasic-web-native/test-card.html
Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-web-native.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-web-native.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-web-native.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add canonical.html v1.0 - The single source of truth for usability standards fb6e650 1 year ago History
test-card.html · 1.4 KB · 48 lines
1<!DOCTYPE html>
2<html>
3<head>
4 <title>Test Semantic Card</title>
5 <script src="semantic-components.js"></script>
6 <style>
7 body {
8 background: #000;
9 color: #fff;
10 padding: 50px;
11 font-family: system-ui;
12 }
13 </style>
14</head>
15<body>
16 <h1>Testing semantic-card</h1>
17
18 <h2>Test 1: Basic Card</h2>
19 <semantic-card>
20 <span slot="media-icon">🚀</span>
21 <card-title slot="title">Project Alpha</card-title>
22 <card-description slot="description">Next-gen platform</card-description>
23 <div slot="preview">Preview content here</div>
24 </semantic-card>
25
26 <h2>Test 2: Simpler Card</h2>
27 <semantic-card>
28 <div slot="title">Simple Title</div>
29 <div slot="description">Simple Description</div>
30 </semantic-card>
31
32 <h2>Test 3: Debug - Check Shadow DOM</h2>
33 <div id="debug"></div>
34
35 <script>
36 setTimeout(() => {
37 const card = document.querySelector('semantic-card');
38 const debug = document.getElementById('debug');
39 debug.innerHTML = `
40 <p>Card element exists: ${!!card}</p>
41 <p>Card has shadowRoot: ${!!card.shadowRoot}</p>
42 <p>Shadow innerHTML length: ${card.shadowRoot?.innerHTML?.length || 0}</p>
43 <p>Slotted elements: ${card.querySelectorAll('[slot]').length}</p>
44 `;
45 }, 1000);
46 </script>
47</body>
48</html>