-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
164 lines (152 loc) · 4.47 KB
/
index.html
File metadata and controls
164 lines (152 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Puzzle Collection</title>
<link rel="stylesheet" href="styles.css" />
<!-- minimal, non-invasive compact overrides -->
<style>
/* overall density + typography */
body.index-body{
max-width: 720px;
margin: 20px auto;
padding: 0 12px;
font: 500 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}
h1{
margin: 0 0 .5rem 0;
font-size: 1.4rem;
line-height: 1.15;
letter-spacing: -0.01em;
}
/* keybox tightened without changing structure */
.keybox{
background: var(--bg-secondary);
border: 1px solid var(--border-primary);
border-radius: 10px;
padding: .6rem .75rem;
margin: .75rem 0;
}
.keybox .row{
display: flex;
align-items: center;
flex-wrap: wrap;
gap: .5rem;
}
.keybox label{
margin-right: .25rem;
white-space: nowrap;
}
.keybox input{
width: 220px;
max-width: 100%;
padding: .4rem .5rem;
border-radius: 8px;
border: 1px solid var(--border-primary);
background: var(--bg-primary, #fff);
outline: none;
}
.keybox input:focus{ box-shadow: 0 0 0 2px color-mix(in oklab, var(--border-primary), transparent 70%); }
.keybox button{
padding: .35rem .6rem;
font-size: .85rem;
border-radius: 8px;
border: 1px solid var(--border-primary);
background: var(--bg-primary, #fff);
cursor: pointer;
line-height: 1;
}
.keybox small{
display: block;
margin-top: .35rem;
opacity: .8;
font-size: .82rem;
}
/* compact tip */
.compact-tip{
background: var(--bg-secondary);
padding: .6rem .75rem !important;
border-radius: 8px;
border: 1px solid var(--border-primary) !important;
margin: .75rem 0 !important;
}
.compact-tip p{
margin: 0;
color: var(--text-secondary);
font-size: .9rem;
}
/* link pills instead of a spaced list */
/* .puzzle-links{
list-style: none;
margin: .75rem 0 0 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: .5rem;
}
.puzzle-links li{ margin: 0; padding: 0; }
.puzzle-links a{
display: inline-block;
padding: .45rem .7rem;
border: 1px solid var(--border-primary);
border-radius: 999px;
text-decoration: none;
font-size: .92rem;
}
*/
/* .puzzle-links a:hover{ background: var(--bg-secondary); } */
</style>
</head>
<body class="index-body">
<h1>LinkedIn Puzzles</h1>
<div class="keybox">
<div class="row">
<label for="globalKey"><strong>Gemini API Key</strong></label>
<input type="password" id="globalKey" placeholder="Enter API key" />
<button id="saveKeyBtn">Save</button>
<button id="clearKeyBtn">Clear</button>
</div>
<small>Saved to this browser (localStorage) and auto-loaded in all puzzles.</small>
</div>
<!-- compact instructions -->
<div class="compact-tip" style="border: 1px solid var(--border-primary);">
<p style="text-align: center;">
<strong>💡 Tip:</strong> Click on the puzzle grids to build and edit them! Use the “Build with AI” tab to create puzzles from screenshots.
</p>
</div>
<ul class="puzzle-links">
<li><a href="tango.html">Tango Puzzle</a></li>
<li><a href="queens.html">Queens Puzzle</a></li>
<li><a href="zip.html">Zip Puzzle</a></li>
</ul>
<script>
(function () {
const keyInp = document.getElementById('globalKey');
const saveBtn = document.getElementById('saveKeyBtn');
const clearBtn = document.getElementById('clearKeyBtn');
try {
const v = localStorage.getItem('gemini_api_key') || '';
if (v) keyInp.value = v;
} catch {}
const save = () => {
try {
localStorage.setItem('gemini_api_key', keyInp.value.trim());
alert('Saved');
} catch {}
};
saveBtn.addEventListener('click', save);
clearBtn.addEventListener('click', () => {
try {
localStorage.removeItem('gemini_api_key');
keyInp.value = '';
alert('Cleared');
} catch {}
});
// small UX touch: Enter in input = Save (doesn’t refactor logic)
keyInp.addEventListener('keydown', (e) => {
if (e.key === 'Enter') save();
});
})();
</script>
</body>
</html>