Skip to content

Commit c405d9e

Browse files
committed
Updated UI 1.7
Signed-off-by: Someshdiwan <[email protected]>
1 parent 7abcb42 commit c405d9e

File tree

2 files changed

+36
-187
lines changed

2 files changed

+36
-187
lines changed

site/_layouts/default.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@
100100

101101
<div id="theme-time-container">
102102
<button id="dark-mode-btn" class="dark-toggle" onclick="toggleDarkMode()">🌓</button>
103-
<button id="tz-toggle-btn" class="time-toggle" onclick="toggleTimezone()">IST</button>
104-
<div id="live-time">Time: Loading...</div>
103+
<div id="time-zone-wrapper" style="display:flex; align-items:center; gap:0.5rem;">
104+
<button id="tz-toggle-btn" class="time-toggle" onclick="toggleTimezone()">IST</button>
105+
<div id="live-time">Time: Loading...</div>
106+
</div>
105107
</div>
106108

107109
<div class="wrapper">

site/assets/style.css

Lines changed: 32 additions & 185 deletions
Original file line numberDiff line numberDiff line change
@@ -1,208 +1,55 @@
1-
/* 1. Color Variables & Dark‑Mode Overrides*/
2-
:root {
3-
--bg-color: #ffffff;
4-
--text-color: #000000;
5-
--sidebar-bg: #f8f9fa;
6-
--link-color: #0366d6;
7-
--button-bg: #eee;
8-
--button-text: #000;
9-
--hover-bg: rgba(0, 0, 0, 0.05);
10-
--border-color: #ccc;
11-
}
12-
13-
.dark-mode {
14-
--bg-color: #121212;
15-
--text-color: #e0e0e0;
16-
--sidebar-bg: #1f1f1f;
17-
--link-color: #90caf9;
18-
--button-bg: #333;
19-
--button-text: #fff;
20-
--hover-bg: rgba(255, 255, 255, 0.1);
21-
--border-color: #444;
22-
}
23-
24-
body {
25-
background-color: var(--bg-color);
26-
color: var(--text-color);
27-
margin: 0;
28-
font-family: sans-serif;
29-
transition: background-color 0.3s ease, color 0.3s ease;
30-
}
31-
32-
/* 2. Sidebar Styles*/
33-
.sidebar {
34-
background-color: var(--sidebar-bg);
35-
width: 260px;
36-
padding: 1rem;
37-
position: fixed;
38-
height: 100vh;
39-
overflow-y: auto;
40-
border-right: 1px solid var(--border-color);
41-
transition: transform 0.3s ease-in-out, background-color 0.3s ease;
42-
z-index: 999;
43-
}
44-
45-
.sidebar.hidden {
46-
transform: translateX(-100%);
47-
}
48-
49-
.sidebar a {
50-
display: block;
51-
padding: 0.5rem;
52-
margin-bottom: 0.5rem;
53-
border-radius: 0.5rem;
54-
text-decoration: none;
55-
color: var(--link-color);
56-
transition: background-color 0.2s ease;
57-
}
58-
59-
.sidebar a:hover {
60-
background-color: var(--hover-bg);
61-
}
62-
63-
/* 3. Main Content Area*/
64-
.content {
65-
margin-left: 260px;
66-
padding: 1rem;
67-
transition: margin-left 0.3s ease;
68-
}
69-
70-
.sidebar.hidden + .content {
71-
margin-left: 0;
72-
}
73-
74-
/*
75-
4. Toggle Buttons
76-
*/
77-
.toggle-btn {
1+
/* Dark‑Mode Toggle & Live‑Time Container */
2+
#theme-time-container {
783
position: fixed;
794
top: 1rem;
80-
left: 1rem;
81-
z-index: 1001;
82-
background: var(--button-bg);
83-
color: var(--button-text);
84-
border: none;
5+
right: 1rem;
6+
left: auto;
7+
display: flex;
8+
align-items: center;
9+
justify-content: space-between; /* space between dark mode and time */
10+
gap: 1rem;
11+
background-color: var(--sidebar-bg);
12+
color: var(--text-color);
8513
padding: 0.5rem 1rem;
86-
border-radius: 5px;
87-
cursor: pointer;
88-
transition: background-color 0.3s ease;
14+
border-radius: 8px;
15+
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
16+
font-size: 0.9rem;
17+
z-index: 1002;
18+
min-width: 180px; /* optional: ensure container width */
19+
max-width: 300px;
20+
transition: background-color 0.3s, color 0.3s;
8921
}
9022

91-
.toggle-btn:hover {
92-
background-color: var(--hover-bg);
23+
/* Wrapper for timezone toggle and live time */
24+
#time-zone-wrapper {
25+
display: flex;
26+
align-items: center;
27+
gap: 0.5rem;
9328
}
9429

95-
.dark-toggle {
96-
position: fixed;
97-
top: 1rem;
98-
right: 1rem;
99-
z-index: 1001;
30+
/* Buttons styling */
31+
#theme-time-container button {
10032
background: var(--button-bg);
10133
color: var(--button-text);
10234
border: none;
103-
padding: 0.5rem 1rem;
35+
padding: 0.3rem 0.7rem;
10436
border-radius: 5px;
10537
cursor: pointer;
38+
font-size: 1rem;
10639
transition: background-color 0.3s ease;
10740
}
10841

109-
.dark-toggle:hover {
42+
#theme-time-container button:hover {
11043
background-color: var(--hover-bg);
11144
}
11245

113-
/* 5. Fade‑In Animation*/
114-
115-
.fade-in {
116-
animation: fadeIn 0.4s ease-in;
117-
}
118-
119-
@keyframes fadeIn {
120-
from { opacity: 0; transform: translateY(10px); }
121-
to { opacity: 1; transform: translateY(0); }
122-
}
123-
124-
125-
/* 6. Responsive Sidebar (Mobile)*/
126-
@media (max-width: 768px) {
127-
.sidebar {
128-
transform: translateX(-100%);
129-
position: fixed;
130-
left: 0;
131-
}
132-
.sidebar:not(.hidden) {
133-
transform: translateX(0);
134-
}
135-
.content {
136-
margin-left: 0;
137-
}
138-
}
139-
140-
/*7. Image Layout Helpers*/
141-
.image-row {
142-
display: flex;
143-
flex-wrap: wrap;
144-
justify-content: space-around;
145-
gap: 1rem;
146-
margin: 1.5rem 0;
147-
}
148-
149-
.image-row img {
150-
max-width: 100%;
151-
height: auto;
152-
border-radius: 10px;
153-
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
154-
transition: transform 0.3s ease;
155-
}
156-
157-
.image-row img:hover {
158-
transform: scale(1.03);
159-
}
160-
161-
@media (min-width: 768px) {
162-
.image-row img {
163-
width: 48%;
164-
}
165-
}
166-
167-
.responsive-img {
168-
width: 100%;
169-
max-width: 600px;
170-
height: auto;
171-
margin: 0 auto;
172-
display: block;
173-
border-radius: 10px;
174-
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
175-
transition: transform 0.3s ease;
46+
/* Adjust live time text */
47+
#live-time {
48+
white-space: nowrap;
49+
font-weight: 500;
17650
}
17751

178-
.responsive-img:hover {
179-
transform: scale(1.02);
180-
}
181-
182-
.dark-mode .responsive-img {
183-
box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
184-
}
185-
186-
/* Dark‑Mode Toggle & Live‑Time Container */
187-
#theme-time-container {
188-
position: fixed;
189-
top: 1rem;
190-
right: 1rem; /* move to the right */
191-
left: auto; /* ensure no left offset */
192-
display: flex;
193-
align-items: center;
194-
gap: 0.5rem;
195-
background-color: var(--sidebar-bg);
196-
color: var(--text-color);
197-
padding: 0.5rem 1rem;
198-
border-radius: 8px;
199-
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
200-
font-size: 0.9rem;
201-
z-index: 1002;
202-
transition: background-color 0.3s, color 0.3s;
203-
}
204-
205-
52+
/* Dark mode container colors */
20653
body.dark-mode #theme-time-container {
20754
background-color: var(--sidebar-bg);
20855
color: var(--text-color);

0 commit comments

Comments
 (0)