Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions examples/src/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,29 @@
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="icon" type="image/png" href="./playcanvas-logo.png" />
<link rel="stylesheet" href="styles.css">
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<div id='app'></div>

<!-- World Clocks Section -->
<div id="world-clocks" class="fixed bottom-4 right-4 bg-gray-900 bg-opacity-90 rounded-lg shadow-2xl p-6 backdrop-blur-sm border border-gray-700">
<h2 class="text-2xl font-bold text-white mb-4 text-center border-b border-gray-700 pb-2">World Clocks</h2>
<div class="grid grid-cols-2 gap-4">
<div class="clock-item bg-gray-800 rounded-lg p-4 text-center hover:bg-gray-700 transition-colors">
<div class="text-sm text-gray-400 mb-1">New York</div>
<div id="clock-newyork" class="text-xl font-mono text-blue-400">--:--:--</div>
<div id="world-clocks">
<h2>World Clocks</h2>
<div class="clocks-grid">
<div class="clock-item">
<div class="clock-label">New York</div>
<div id="clock-newyork" class="clock-time blue">--:--:--</div>
</div>
<div class="clock-item bg-gray-800 rounded-lg p-4 text-center hover:bg-gray-700 transition-colors">
<div class="text-sm text-gray-400 mb-1">London</div>
<div id="clock-london" class="text-xl font-mono text-green-400">--:--:--</div>
<div class="clock-item">
<div class="clock-label">London</div>
<div id="clock-london" class="clock-time green">--:--:--</div>
</div>
<div class="clock-item bg-gray-800 rounded-lg p-4 text-center hover:bg-gray-700 transition-colors">
<div class="text-sm text-gray-400 mb-1">Tokyo</div>
<div id="clock-tokyo" class="text-xl font-mono text-purple-400">--:--:--</div>
<div class="clock-item">
<div class="clock-label">Tokyo</div>
<div id="clock-tokyo" class="clock-time purple">--:--:--</div>
</div>
<div class="clock-item bg-gray-800 rounded-lg p-4 text-center hover:bg-gray-700 transition-colors">
<div class="text-sm text-gray-400 mb-1">Local Time</div>
<div id="clock-local" class="text-xl font-mono text-orange-400">--:--:--</div>
<div class="clock-item">
<div class="clock-label">Local Time</div>
<div id="clock-local" class="clock-time orange">--:--:--</div>
</div>
</div>
</div>
Expand Down
57 changes: 57 additions & 0 deletions examples/src/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -775,3 +775,60 @@ body {
.pcui-slider > .pcui-numeric-input {
flex: 1.5 !important;
}

/* World Clocks Widget */
#world-clocks {
position: fixed;
bottom: 1rem;
right: 1rem;
background-color: rgba(17, 24, 39, 0.9);
border-radius: 0.5rem;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
padding: 1.5rem;
backdrop-filter: blur(4px);
border: 1px solid #374151;
}

#world-clocks h2 {
font-size: 1.5rem;
font-weight: 700;
color: #fff;
margin: 0 0 1rem 0;
text-align: center;
border-bottom: 1px solid #374151;
padding-bottom: 0.5rem;
}

.clocks-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}

.clock-item {
background-color: #1f2937;
border-radius: 0.5rem;
padding: 1rem;
text-align: center;
transition: background-color 0.15s ease-in-out;
}

.clock-item:hover {
background-color: #374151;
}

.clock-item .clock-label {
font-size: 0.875rem;
color: #9ca3af;
margin-bottom: 0.25rem;
}

.clock-item .clock-time {
font-size: 1.25rem;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.clock-time.blue { color: #60a5fa; }
.clock-time.green { color: #34d399; }
.clock-time.purple { color: #a78bfa; }
.clock-time.orange { color: #fb923c; }