Skip to content

Commit 7b94307

Browse files
committed
responsive design
1 parent 5962cc6 commit 7b94307

File tree

1 file changed

+62
-4
lines changed

1 file changed

+62
-4
lines changed

index.html

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
body {
2626
font-family: 'Raleway', sans-serif;
2727
font-size: 20px;
28-
width: 960px;
28+
max-width: 960px;
2929
margin: 20px auto;
30+
padding: 0 16px;
3031
color: #fff;
3132
background: #000;
3233
}
@@ -48,6 +49,7 @@
4849
width: 100%;
4950
box-sizing: border-box;
5051
min-height: 60px;
52+
overflow-x: auto;
5153
}
5254

5355
pre.hidden {
@@ -84,6 +86,7 @@
8486

8587
.schema-pane {
8688
flex: 1;
89+
min-width: 0;
8790
}
8891

8992
.diff-section {
@@ -95,20 +98,75 @@
9598
margin-bottom: 0.5em;
9699
}
97100

101+
.controls {
102+
display: flex;
103+
flex-wrap: wrap;
104+
align-items: center;
105+
gap: 16px;
106+
}
107+
98108
select {
99109
font-size: 18px;
100110
padding: 8px;
101-
margin-bottom: 20px;
102111
}
103112

104113
footer {
105114
margin-top: 100px;
106115
text-align: center;
116+
word-break: break-all;
107117
}
108118

109119
#version {
110120
color: #888;
111121
}
122+
123+
/* Mobile responsive styles */
124+
@media (max-width: 768px) {
125+
body {
126+
font-size: 16px;
127+
margin: 12px auto;
128+
padding: 0 12px;
129+
}
130+
131+
h1 {
132+
font-size: 1.8em;
133+
}
134+
135+
h2 {
136+
font-size: 1.4em;
137+
}
138+
139+
.schema-row {
140+
flex-direction: column;
141+
gap: 0;
142+
}
143+
144+
.schema-pane {
145+
width: 100%;
146+
}
147+
148+
textarea {
149+
padding: 12px;
150+
}
151+
152+
pre {
153+
padding: 12px;
154+
font-size: 14px;
155+
}
156+
157+
select {
158+
font-size: 16px;
159+
padding: 10px;
160+
}
161+
162+
footer {
163+
margin-top: 60px;
164+
}
165+
166+
footer a {
167+
font-size: 14px;
168+
}
169+
}
112170
</style>
113171
</head>
114172

@@ -118,14 +176,14 @@ <h1>sqldef</h1>
118176
manage the migration of RDBMSs using regular SQL DDLs.</p>
119177
<p>Supported databases: MySQL, MariaDB, TiDB, PostgreSQL, SQL Server, and SQLite3.</p>
120178
<h2>Online Demo</h2>
121-
<div>
179+
<div class="controls">
122180
<select id="dbType">
123181
<option value="mysql">MySQL</option>
124182
<option value="postgres">PostgreSQL</option>
125183
<option value="sqlite3">SQLite3</option>
126184
<option value="mssql">SQL Server</option>
127185
</select>
128-
<label style="margin-left: 20px;">
186+
<label>
129187
<input type="checkbox" id="enableDrop"> Enable DROP
130188
</label>
131189
</div>

0 commit comments

Comments
 (0)