Spaces:
Running on Zero
Running on Zero
Icons on the tabs (globe, desktop, picture)
Browse filesLine icons in the web view's style; the open tab's icon is terracotta.
app.py
CHANGED
|
@@ -53,6 +53,19 @@ LOGO = """<svg viewBox="0 0 24 24" width="15" height="15" aria-hidden="true"><re
|
|
| 53 |
fill="none" stroke="#fff" stroke-width="1.8"/><rect x="8.5" y="10" width="13" height="10" rx="2" fill="#fff" stroke="#fff"
|
| 54 |
stroke-width="1.8"/><path d="M8.5 13h13" stroke="#D2603A" stroke-width="1.5"/></svg>"""
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
VIEW_HINT = { # a few words on each tab, after a "|"
|
| 57 |
"web": "any task, real browser",
|
| 58 |
"live": "DeskForge vs. its base",
|
|
@@ -69,9 +82,9 @@ TOPBAR = f"""
|
|
| 69 |
<div class="df-brand"><div class="df-logo">{LOGO}</div><div class="df-word">DeskForge</div></div>
|
| 70 |
<div class="df-sep"></div>
|
| 71 |
<div class="df-views">
|
| 72 |
-
<button type="button" class="df-view on" data-view="web" title="{VIEW_ABOUT['web']}">Web agent<span class="df-view-sep">|</span><span class="df-view-hint">{VIEW_HINT['web']}</span></button>
|
| 73 |
-
<button type="button" class="df-view" data-view="live" title="{VIEW_ABOUT['live']}">Live duel<span class="df-view-sep">|</span><span class="df-view-hint">{VIEW_HINT['live']}</span></button>
|
| 74 |
-
<button type="button" class="df-view" data-view="shot" title="{VIEW_ABOUT['shot']}">Try a screenshot<span class="df-view-sep">|</span><span class="df-view-hint">{VIEW_HINT['shot']}</span></button>
|
| 75 |
</div>
|
| 76 |
<div class="df-spacer"></div>
|
| 77 |
<div class="df-status"><span class="df-led"></span>Running on ZeroGPU</div>
|
|
@@ -345,6 +358,9 @@ footer { border-top: 1px solid #E6E3DF; background: #FBF6EE; }
|
|
| 345 |
.df-word { font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: #2B2722; }
|
| 346 |
.df-sep { width: 1px; height: 20px; background: #E6E3DF; }
|
| 347 |
.df-views { display: flex; gap: 4px; }
|
|
|
|
|
|
|
|
|
|
| 348 |
.df-top .df-view-sep { margin: 0 7px; color: #CFCAC3; font-weight: 400; }
|
| 349 |
.df-top .df-view-hint { font-size: 13px; font-weight: 400; color: #9a9389; }
|
| 350 |
.df-top .df-view.on .df-view-hint { color: #8a8378; }
|
|
|
|
| 53 |
fill="none" stroke="#fff" stroke-width="1.8"/><rect x="8.5" y="10" width="13" height="10" rx="2" fill="#fff" stroke="#fff"
|
| 54 |
stroke-width="1.8"/><path d="M8.5 13h13" stroke="#D2603A" stroke-width="1.5"/></svg>"""
|
| 55 |
|
| 56 |
+
def _icon(body):
|
| 57 |
+
return (f'<svg class="df-view-ico" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" '
|
| 58 |
+
f'stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">{body}</svg>')
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
VIEW_ICON = {
|
| 62 |
+
"web": _icon('<circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/>'), # globe
|
| 63 |
+
"live": _icon('<rect x="2.5" y="4" width="19" height="13" rx="2"/><path d="M8 21h8M12 17v4"/>'
|
| 64 |
+
'<path d="M8.5 9.5l2 1.5-2 1.5M15.5 9.5l-2 1.5 2 1.5"/>'), # a desktop with two facing cursors
|
| 65 |
+
"shot": _icon('<rect x="3" y="5" width="18" height="14" rx="2"/><circle cx="8.5" cy="10" r="1.6"/>'
|
| 66 |
+
'<path d="M21 15.5l-4.5-4.5L7 19"/>'), # a picture
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
VIEW_HINT = { # a few words on each tab, after a "|"
|
| 70 |
"web": "any task, real browser",
|
| 71 |
"live": "DeskForge vs. its base",
|
|
|
|
| 82 |
<div class="df-brand"><div class="df-logo">{LOGO}</div><div class="df-word">DeskForge</div></div>
|
| 83 |
<div class="df-sep"></div>
|
| 84 |
<div class="df-views">
|
| 85 |
+
<button type="button" class="df-view on" data-view="web" title="{VIEW_ABOUT['web']}">{VIEW_ICON['web']}Web agent<span class="df-view-sep">|</span><span class="df-view-hint">{VIEW_HINT['web']}</span></button>
|
| 86 |
+
<button type="button" class="df-view" data-view="live" title="{VIEW_ABOUT['live']}">{VIEW_ICON['live']}Live duel<span class="df-view-sep">|</span><span class="df-view-hint">{VIEW_HINT['live']}</span></button>
|
| 87 |
+
<button type="button" class="df-view" data-view="shot" title="{VIEW_ABOUT['shot']}">{VIEW_ICON['shot']}Try a screenshot<span class="df-view-sep">|</span><span class="df-view-hint">{VIEW_HINT['shot']}</span></button>
|
| 88 |
</div>
|
| 89 |
<div class="df-spacer"></div>
|
| 90 |
<div class="df-status"><span class="df-led"></span>Running on ZeroGPU</div>
|
|
|
|
| 358 |
.df-word { font-weight: 700; font-size: 15px; letter-spacing: -.01em; color: #2B2722; }
|
| 359 |
.df-sep { width: 1px; height: 20px; background: #E6E3DF; }
|
| 360 |
.df-views { display: flex; gap: 4px; }
|
| 361 |
+
.df-top .df-view { display: inline-flex; align-items: center; }
|
| 362 |
+
.df-top .df-view-ico { flex: none; margin-right: 7px; color: #a39d94; }
|
| 363 |
+
.df-top .df-view.on .df-view-ico { color: #D2603A; }
|
| 364 |
.df-top .df-view-sep { margin: 0 7px; color: #CFCAC3; font-weight: 400; }
|
| 365 |
.df-top .df-view-hint { font-size: 13px; font-weight: 400; color: #9a9389; }
|
| 366 |
.df-top .df-view.on .df-view-hint { color: #8a8378; }
|