hexo-theme-linen 1.0.45 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/layout/post.ejs +36 -1
- package/layout/series.ejs +1 -1
- package/package.json +1 -1
- package/scripts/lazyload/client.js +16 -1
- package/scripts/lazyload/config.js +2 -1
- package/scripts/lazyload/inject.js +2 -1
- package/source/linen-theme/css/linen.scss +23 -13
- package/source/linen-theme/js/gitalk/gitalk.css +140 -99
- package/source/linen-theme/js/gitalk/gitalk.min.js +1 -1
- package/source/linen-theme/js/lazyload.js +16 -1
package/layout/post.ejs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const coverImgStartTime = performance.now();
|
|
7
7
|
setTimeout(() => {
|
|
8
8
|
const postCoverImg = document.getElementById('postCoverImg');
|
|
9
|
-
if (postCoverImg &&
|
|
9
|
+
if (postCoverImg && !postCoverImg.classList.contains('loaded') && !postCoverImg.classList.contains('cached')) {
|
|
10
10
|
postCoverImg.classList.add('loading')
|
|
11
11
|
}
|
|
12
12
|
}, 100);
|
|
@@ -223,6 +223,41 @@ const seriesInfo = getSeriesInfo(page?.series);
|
|
|
223
223
|
});
|
|
224
224
|
|
|
225
225
|
gitalk.render("gitalk-container");
|
|
226
|
+
|
|
227
|
+
var container = document.getElementById("gitalk-container");
|
|
228
|
+
if (container) {
|
|
229
|
+
var expandComment = function() {
|
|
230
|
+
var comment = container.querySelector(".gt-header-comment");
|
|
231
|
+
if (comment && !comment.classList.contains("is-expanded")) {
|
|
232
|
+
comment.classList.add("is-expanded");
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
// Focus the textarea and expand when clicking on the comment box wrapper
|
|
237
|
+
container.addEventListener("click", function(e) {
|
|
238
|
+
var comment = e.target.closest(".gt-header-comment");
|
|
239
|
+
if (comment) {
|
|
240
|
+
expandComment();
|
|
241
|
+
if (e.target === comment) {
|
|
242
|
+
var textarea = comment.querySelector(".gt-header-textarea");
|
|
243
|
+
if (textarea) textarea.focus();
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
// Expand once interacted with and keep expanded permanently
|
|
249
|
+
container.addEventListener("focusin", function(e) {
|
|
250
|
+
if (e.target && e.target.classList.contains("gt-header-textarea")) {
|
|
251
|
+
expandComment();
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
container.addEventListener("input", function(e) {
|
|
256
|
+
if (e.target && e.target.classList.contains("gt-header-textarea")) {
|
|
257
|
+
expandComment();
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
226
261
|
};
|
|
227
262
|
document.body.appendChild(script);
|
|
228
263
|
$gitalkInitiated = true;
|
package/layout/series.ejs
CHANGED
|
@@ -51,7 +51,7 @@ const travelPlacesJson = encodeURIComponent(JSON.stringify(travelPlaces));
|
|
|
51
51
|
const coverImgStartTime = Date.now();
|
|
52
52
|
setTimeout(() => {
|
|
53
53
|
const seriesCoverImg = document.getElementById('seriesCoverImg');
|
|
54
|
-
if (seriesCoverImg &&
|
|
54
|
+
if (seriesCoverImg && !seriesCoverImg.classList.contains('loaded') && !seriesCoverImg.classList.contains('cached')) {
|
|
55
55
|
seriesCoverImg.classList.add('loading')
|
|
56
56
|
}
|
|
57
57
|
}, 100);
|
package/package.json
CHANGED
|
@@ -224,9 +224,12 @@
|
|
|
224
224
|
var showTransition =
|
|
225
225
|
!window.$lazyload || window.$lazyload.showTransition !== false;
|
|
226
226
|
var clearPlaceholder = function clearPlaceholder() {
|
|
227
|
+
// Keep the placeholder underneath by default to prevent blank frames or flashes
|
|
228
|
+
// caused by asynchronous GPU decoding and rasterization delays.
|
|
227
229
|
var keepPlaceholder =
|
|
228
230
|
element.getAttribute("data-hdr-active") === "true" ||
|
|
229
|
-
|
|
231
|
+
!window.$lazyload ||
|
|
232
|
+
window.$lazyload.keepPlaceholder !== false;
|
|
230
233
|
if (!keepPlaceholder) {
|
|
231
234
|
element.children[0].classList.add("loaded");
|
|
232
235
|
}
|
|
@@ -247,6 +250,18 @@
|
|
|
247
250
|
return;
|
|
248
251
|
}
|
|
249
252
|
revealedSource = source;
|
|
253
|
+
|
|
254
|
+
// If the resource finishes loading while off-screen, skip the opacity
|
|
255
|
+
// transition to prevent deferred animations and visual flashes when
|
|
256
|
+
// the element scrolls into the viewport.
|
|
257
|
+
var rect = element.getBoundingClientRect();
|
|
258
|
+
var inViewport =
|
|
259
|
+
rect.bottom > 0 &&
|
|
260
|
+
rect.top < (window.innerHeight || document.documentElement.clientHeight);
|
|
261
|
+
if (!inViewport) {
|
|
262
|
+
resourceElement.style.transition = "none";
|
|
263
|
+
}
|
|
264
|
+
|
|
250
265
|
// The inline opacity is already 0 and the inline transition is set
|
|
251
266
|
// before insertion, so the next frame can reveal without forcing a
|
|
252
267
|
// synchronous layout for every image.
|
|
@@ -14,6 +14,7 @@ module.exports = function (hexo) {
|
|
|
14
14
|
placeholderRatio,
|
|
15
15
|
showTransition,
|
|
16
16
|
preloadCount,
|
|
17
|
+
keepPlaceholder: configKeepPlaceholder,
|
|
17
18
|
} = {
|
|
18
19
|
...defaultConfig,
|
|
19
20
|
...(hexo?.config?.theme_config?.lazyload || {}),
|
|
@@ -154,7 +155,7 @@ module.exports = function (hexo) {
|
|
|
154
155
|
preloadCount: ${preloadCount},
|
|
155
156
|
showTransition: ${showTransition},
|
|
156
157
|
keepPlaceholder: ${
|
|
157
|
-
page?.lazyload?.keepPlaceholder ??
|
|
158
|
+
page?.lazyload?.keepPlaceholder ?? configKeepPlaceholder ?? true
|
|
158
159
|
}}</script>`;
|
|
159
160
|
|
|
160
161
|
const injectExtraScript = function (filePath) {
|
|
@@ -1547,6 +1547,10 @@ body {
|
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
1549
|
#gitalk-container {
|
|
1550
|
+
--gt-avatar-size: 2.25rem;
|
|
1551
|
+
@media (max-width: 479px) {
|
|
1552
|
+
--gt-avatar-size: 2rem;
|
|
1553
|
+
}
|
|
1550
1554
|
margin-top: $postWidgetGap;
|
|
1551
1555
|
padding: 0 $commonPadding;
|
|
1552
1556
|
background-color: #fff;
|
|
@@ -1567,11 +1571,11 @@ body {
|
|
|
1567
1571
|
.gt-comments {
|
|
1568
1572
|
padding-top: $commonPadding;
|
|
1569
1573
|
.gt-comment {
|
|
1570
|
-
--comment-content-indent: calc(
|
|
1574
|
+
--comment-content-indent: calc(var(--gt-avatar-size) + 1rem);
|
|
1571
1575
|
display: grid;
|
|
1572
|
-
grid-template-columns:
|
|
1576
|
+
grid-template-columns: var(--gt-avatar-size) minmax(0, 1fr);
|
|
1573
1577
|
grid-template-rows: auto auto auto auto;
|
|
1574
|
-
column-gap:
|
|
1578
|
+
column-gap: 1rem;
|
|
1575
1579
|
align-items: start;
|
|
1576
1580
|
padding: 1.5em 0;
|
|
1577
1581
|
border-bottom: solid 1px rgb(242, 242, 242);
|
|
@@ -1585,9 +1589,15 @@ body {
|
|
|
1585
1589
|
grid-column: 1;
|
|
1586
1590
|
grid-row: 1 / span 2;
|
|
1587
1591
|
align-self: center;
|
|
1592
|
+
width: var(--gt-avatar-size);
|
|
1593
|
+
height: var(--gt-avatar-size);
|
|
1588
1594
|
border-radius: 50%;
|
|
1589
1595
|
|
|
1590
1596
|
img {
|
|
1597
|
+
display: block;
|
|
1598
|
+
width: 100%;
|
|
1599
|
+
height: 100%;
|
|
1600
|
+
object-fit: cover;
|
|
1591
1601
|
border-radius: 50%;
|
|
1592
1602
|
}
|
|
1593
1603
|
}
|
|
@@ -1606,7 +1616,7 @@ body {
|
|
|
1606
1616
|
grid-row: 1;
|
|
1607
1617
|
line-height: 1.5;
|
|
1608
1618
|
position: relative;
|
|
1609
|
-
top:
|
|
1619
|
+
top: 0;
|
|
1610
1620
|
}
|
|
1611
1621
|
.gt-comment-text {
|
|
1612
1622
|
display: none;
|
|
@@ -1615,7 +1625,7 @@ body {
|
|
|
1615
1625
|
grid-column: 2;
|
|
1616
1626
|
grid-row: 2;
|
|
1617
1627
|
position: relative;
|
|
1618
|
-
top:
|
|
1628
|
+
top: 0;
|
|
1619
1629
|
margin: 0.2em 0 0;
|
|
1620
1630
|
}
|
|
1621
1631
|
.gt-comment-body {
|
|
@@ -1637,7 +1647,7 @@ body {
|
|
|
1637
1647
|
height: 1.5em;
|
|
1638
1648
|
line-height: 1;
|
|
1639
1649
|
margin-top: 1.1em;
|
|
1640
|
-
transform: translateX(calc(-1 * var(--comment-content-indent)
|
|
1650
|
+
transform: translateX(calc(-1 * var(--comment-content-indent)));
|
|
1641
1651
|
}
|
|
1642
1652
|
.gt-comment-edit,
|
|
1643
1653
|
.gt-comment-reply {
|
|
@@ -1720,13 +1730,13 @@ body {
|
|
|
1720
1730
|
}
|
|
1721
1731
|
@media (max-width: 479px) {
|
|
1722
1732
|
.gt-comment {
|
|
1723
|
-
--comment-content-indent: calc(
|
|
1724
|
-
grid-template-columns:
|
|
1725
|
-
column-gap: 0.
|
|
1733
|
+
--comment-content-indent: calc(var(--gt-avatar-size) + 0.875rem);
|
|
1734
|
+
grid-template-columns: var(--gt-avatar-size) minmax(0, 1fr);
|
|
1735
|
+
column-gap: 0.875rem;
|
|
1726
1736
|
}
|
|
1727
1737
|
.gt-comment-avatar {
|
|
1728
|
-
width:
|
|
1729
|
-
height:
|
|
1738
|
+
width: var(--gt-avatar-size);
|
|
1739
|
+
height: var(--gt-avatar-size);
|
|
1730
1740
|
}
|
|
1731
1741
|
}
|
|
1732
1742
|
a:not([class]) {
|
|
@@ -2353,7 +2363,7 @@ body {
|
|
|
2353
2363
|
.copyright-popover-content {
|
|
2354
2364
|
position: absolute;
|
|
2355
2365
|
bottom: 100%;
|
|
2356
|
-
right: -
|
|
2366
|
+
right: -30px;
|
|
2357
2367
|
margin-bottom: 10px;
|
|
2358
2368
|
width: 280px;
|
|
2359
2369
|
max-width: calc(100vw - 32px);
|
|
@@ -2410,7 +2420,7 @@ body {
|
|
|
2410
2420
|
.copyright-popover-arrow {
|
|
2411
2421
|
position: absolute;
|
|
2412
2422
|
bottom: -5px;
|
|
2413
|
-
right:
|
|
2423
|
+
right: 35px;
|
|
2414
2424
|
transform: rotate(45deg);
|
|
2415
2425
|
width: 8px;
|
|
2416
2426
|
height: 8px;
|
|
@@ -1250,9 +1250,10 @@
|
|
|
1250
1250
|
/*# sourceMappingURL=gitalk.css.map*/
|
|
1251
1251
|
/* Comment composer follows a heading, account row, and full-width editor. */
|
|
1252
1252
|
#gitalk-container .gt-container {
|
|
1253
|
+
--gt-avatar-size: 2.25rem;
|
|
1253
1254
|
position: relative;
|
|
1254
1255
|
display: grid;
|
|
1255
|
-
grid-template-columns:
|
|
1256
|
+
grid-template-columns: var(--gt-avatar-size) minmax(0, 1fr);
|
|
1256
1257
|
column-gap: 0.75rem;
|
|
1257
1258
|
row-gap: 0;
|
|
1258
1259
|
}
|
|
@@ -1303,40 +1304,69 @@
|
|
|
1303
1304
|
grid-column: 1;
|
|
1304
1305
|
grid-row: 2;
|
|
1305
1306
|
align-self: center;
|
|
1306
|
-
|
|
1307
|
-
|
|
1307
|
+
display: block;
|
|
1308
|
+
width: var(--gt-avatar-size);
|
|
1309
|
+
height: var(--gt-avatar-size);
|
|
1308
1310
|
margin: 0;
|
|
1309
1311
|
border-radius: 50%;
|
|
1310
1312
|
}
|
|
1311
1313
|
|
|
1312
1314
|
#gitalk-container .gt-container .gt-header-avatar img {
|
|
1315
|
+
display: block;
|
|
1316
|
+
width: 100%;
|
|
1317
|
+
height: 100%;
|
|
1318
|
+
object-fit: cover;
|
|
1313
1319
|
border-radius: 50%;
|
|
1314
1320
|
}
|
|
1315
1321
|
|
|
1316
1322
|
#gitalk-container .gt-container .gt-avatar-github {
|
|
1317
|
-
display:
|
|
1323
|
+
display: block;
|
|
1318
1324
|
grid-column: 1;
|
|
1319
1325
|
grid-row: 2;
|
|
1320
1326
|
align-self: center;
|
|
1321
|
-
width:
|
|
1322
|
-
height:
|
|
1327
|
+
width: var(--gt-avatar-size);
|
|
1328
|
+
height: var(--gt-avatar-size);
|
|
1323
1329
|
margin: 0;
|
|
1324
1330
|
}
|
|
1325
1331
|
|
|
1332
|
+
#gitalk-container .gt-container .gt-avatar-github svg {
|
|
1333
|
+
display: block;
|
|
1334
|
+
width: 100%;
|
|
1335
|
+
height: 100%;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1326
1338
|
#gitalk-container .gt-container .gt-header-comment {
|
|
1339
|
+
position: relative;
|
|
1327
1340
|
grid-column: 1 / -1;
|
|
1328
1341
|
grid-row: 3;
|
|
1329
1342
|
min-width: 0;
|
|
1330
1343
|
margin: 0.75rem 0 0;
|
|
1331
|
-
padding: 0.75rem;
|
|
1344
|
+
padding: 0.75rem 1rem;
|
|
1332
1345
|
border-radius: 2px;
|
|
1333
1346
|
background: #f5f5f5;
|
|
1347
|
+
cursor: text;
|
|
1348
|
+
transition: padding 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
#gitalk-container .gt-container .gt-header-textarea {
|
|
1352
|
+
min-height: 1.5em;
|
|
1353
|
+
max-height: 1.5em;
|
|
1354
|
+
height: 1.5em;
|
|
1355
|
+
line-height: 1.5;
|
|
1356
|
+
padding: 0;
|
|
1357
|
+
border: 0;
|
|
1358
|
+
border-radius: 0;
|
|
1359
|
+
background: transparent;
|
|
1360
|
+
font: inherit;
|
|
1361
|
+
resize: none;
|
|
1362
|
+
overflow: hidden;
|
|
1363
|
+
transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
|
|
1364
|
+
min-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1334
1365
|
}
|
|
1335
1366
|
|
|
1336
|
-
#gitalk-container .gt-container .gt-header-textarea,
|
|
1337
1367
|
#gitalk-container .gt-container .gt-header-preview {
|
|
1338
1368
|
min-height: 7.5rem;
|
|
1339
|
-
padding: 0
|
|
1369
|
+
padding: 0;
|
|
1340
1370
|
border: 0;
|
|
1341
1371
|
border-radius: 0;
|
|
1342
1372
|
background: transparent;
|
|
@@ -1347,16 +1377,42 @@
|
|
|
1347
1377
|
background: transparent;
|
|
1348
1378
|
}
|
|
1349
1379
|
|
|
1380
|
+
/* Hide controls by default in single-line collapsed state; animate reveal on expansion. */
|
|
1350
1381
|
#gitalk-container .gt-container .gt-header-controls {
|
|
1351
1382
|
display: flex;
|
|
1352
|
-
|
|
1383
|
+
position: relative;
|
|
1384
|
+
box-sizing: border-box;
|
|
1385
|
+
width: 100%;
|
|
1386
|
+
margin: 0;
|
|
1387
|
+
padding: 0;
|
|
1388
|
+
align-items: flex-end;
|
|
1353
1389
|
justify-content: flex-end;
|
|
1354
1390
|
gap: 0.75rem;
|
|
1355
|
-
|
|
1391
|
+
max-height: 0;
|
|
1392
|
+
opacity: 0;
|
|
1393
|
+
overflow: hidden;
|
|
1394
|
+
pointer-events: none;
|
|
1395
|
+
visibility: hidden;
|
|
1396
|
+
transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
|
|
1397
|
+
opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
|
|
1398
|
+
margin-top 0.25s cubic-bezier(0.4, 0, 0.2, 1),
|
|
1399
|
+
visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1356
1400
|
}
|
|
1357
1401
|
|
|
1402
|
+
/* Prevent Gitalk's float-clearing pseudo elements from shifting flex actions. */
|
|
1403
|
+
#gitalk-container .gt-container .gt-header-controls::before,
|
|
1404
|
+
#gitalk-container .gt-container .gt-header-controls::after {
|
|
1405
|
+
display: none;
|
|
1406
|
+
content: none;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
/* Pin the Markdown hint to the panel's lower-left inset. */
|
|
1358
1410
|
#gitalk-container .gt-container .gt-header-controls-tip {
|
|
1359
|
-
|
|
1411
|
+
position: absolute;
|
|
1412
|
+
left: 0;
|
|
1413
|
+
bottom: -0.25rem;
|
|
1414
|
+
margin: 0;
|
|
1415
|
+
line-height: 1.5;
|
|
1360
1416
|
color: #777;
|
|
1361
1417
|
}
|
|
1362
1418
|
|
|
@@ -1366,6 +1422,36 @@
|
|
|
1366
1422
|
margin: 0;
|
|
1367
1423
|
}
|
|
1368
1424
|
|
|
1425
|
+
/* Expanded state: when focused, containing content, in preview mode, or explicitly toggled. */
|
|
1426
|
+
#gitalk-container .gt-container .gt-header-comment:focus-within,
|
|
1427
|
+
#gitalk-container .gt-container .gt-header-comment:has(.gt-header-textarea:not(:placeholder-shown)),
|
|
1428
|
+
#gitalk-container .gt-container .gt-header-comment:has(.gt-header-preview:not(.hide)),
|
|
1429
|
+
#gitalk-container .gt-container .gt-header-comment.is-expanded {
|
|
1430
|
+
padding: 1rem;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
#gitalk-container .gt-container .gt-header-comment:focus-within .gt-header-textarea,
|
|
1434
|
+
#gitalk-container .gt-container .gt-header-comment:has(.gt-header-textarea:not(:placeholder-shown)) .gt-header-textarea,
|
|
1435
|
+
#gitalk-container .gt-container .gt-header-comment:has(.gt-header-preview:not(.hide)) .gt-header-textarea,
|
|
1436
|
+
#gitalk-container .gt-container .gt-header-comment.is-expanded .gt-header-textarea {
|
|
1437
|
+
height: 7.5rem;
|
|
1438
|
+
min-height: 7.5rem;
|
|
1439
|
+
max-height: none;
|
|
1440
|
+
resize: none;
|
|
1441
|
+
overflow: auto;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
#gitalk-container .gt-container .gt-header-comment:focus-within .gt-header-controls,
|
|
1445
|
+
#gitalk-container .gt-container .gt-header-comment:has(.gt-header-textarea:not(:placeholder-shown)) .gt-header-controls,
|
|
1446
|
+
#gitalk-container .gt-container .gt-header-comment:has(.gt-header-preview:not(.hide)) .gt-header-controls,
|
|
1447
|
+
#gitalk-container .gt-container .gt-header-comment.is-expanded .gt-header-controls {
|
|
1448
|
+
max-height: 6rem;
|
|
1449
|
+
opacity: 1;
|
|
1450
|
+
pointer-events: auto;
|
|
1451
|
+
visibility: visible;
|
|
1452
|
+
margin-top: 0.75rem;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1369
1455
|
#gitalk-container .gt-container .gt-comments {
|
|
1370
1456
|
grid-column: 1 / -1;
|
|
1371
1457
|
grid-row: 4;
|
|
@@ -1373,23 +1459,40 @@
|
|
|
1373
1459
|
|
|
1374
1460
|
@media (max-width: 479px) {
|
|
1375
1461
|
#gitalk-container .gt-container {
|
|
1376
|
-
|
|
1462
|
+
--gt-avatar-size: 2rem;
|
|
1463
|
+
grid-template-columns: var(--gt-avatar-size) minmax(0, 1fr);
|
|
1377
1464
|
column-gap: 0.875em;
|
|
1378
1465
|
}
|
|
1379
1466
|
|
|
1380
1467
|
#gitalk-container .gt-container .gt-header-avatar {
|
|
1381
|
-
width:
|
|
1382
|
-
height:
|
|
1468
|
+
width: var(--gt-avatar-size);
|
|
1469
|
+
height: var(--gt-avatar-size);
|
|
1383
1470
|
}
|
|
1384
1471
|
|
|
1385
1472
|
#gitalk-container .gt-container .gt-avatar-github {
|
|
1386
|
-
width:
|
|
1387
|
-
height:
|
|
1473
|
+
width: var(--gt-avatar-size);
|
|
1474
|
+
height: var(--gt-avatar-size);
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
#gitalk-container .gt-container .gt-header-comment {
|
|
1478
|
+
padding: 0.75rem 0.875rem;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
#gitalk-container .gt-container .gt-header-comment:focus-within,
|
|
1482
|
+
#gitalk-container .gt-container .gt-header-comment:has(.gt-header-textarea:not(:placeholder-shown)),
|
|
1483
|
+
#gitalk-container .gt-container .gt-header-comment:has(.gt-header-preview:not(.hide)),
|
|
1484
|
+
#gitalk-container .gt-container .gt-header-comment.is-expanded {
|
|
1485
|
+
padding: 0.875rem;
|
|
1388
1486
|
}
|
|
1389
1487
|
|
|
1390
1488
|
#gitalk-container .gt-container .gt-header-controls {
|
|
1391
1489
|
flex-wrap: wrap;
|
|
1392
1490
|
}
|
|
1491
|
+
|
|
1492
|
+
#gitalk-container .gt-container .gt-header-controls-tip {
|
|
1493
|
+
left: 0;
|
|
1494
|
+
bottom: -0.25rem;
|
|
1495
|
+
}
|
|
1393
1496
|
}
|
|
1394
1497
|
|
|
1395
1498
|
|
|
@@ -1400,38 +1503,16 @@
|
|
|
1400
1503
|
|
|
1401
1504
|
#gitalk-container .gt-container .gt-popup {
|
|
1402
1505
|
position: absolute;
|
|
1403
|
-
top: calc(1rem + 2rem + 0.75rem +
|
|
1506
|
+
top: calc(1rem + 2rem + 0.75rem + var(--gt-avatar-size) - 0.75rem);
|
|
1404
1507
|
right: auto;
|
|
1405
|
-
left:
|
|
1508
|
+
left: calc(var(--gt-avatar-size) + 0.75rem);
|
|
1406
1509
|
z-index: 22;
|
|
1407
1510
|
}
|
|
1408
1511
|
|
|
1409
|
-
/* Use one consistent inset around the editor content and action row. */
|
|
1410
|
-
#gitalk-container .gt-container .gt-header-comment {
|
|
1411
|
-
padding: 1rem;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
#gitalk-container .gt-container .gt-header-textarea,
|
|
1415
|
-
#gitalk-container .gt-container .gt-header-preview {
|
|
1416
|
-
padding: 0;
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
#gitalk-container .gt-container .gt-header-controls {
|
|
1420
|
-
margin: 0;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
#gitalk-container .gt-container .gt-header-controls .gt-btn {
|
|
1424
|
-
margin: 0;
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
1512
|
@media (max-width: 479px) {
|
|
1428
1513
|
#gitalk-container .gt-container .gt-popup {
|
|
1429
|
-
top: calc(1rem + 2rem + 0.75rem +
|
|
1430
|
-
left:
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
#gitalk-container .gt-container .gt-header-comment {
|
|
1434
|
-
padding: 0.875rem;
|
|
1514
|
+
top: calc(1rem + 2rem + 0.75rem + var(--gt-avatar-size) - 0.75rem);
|
|
1515
|
+
left: calc(var(--gt-avatar-size) + 0.875rem);
|
|
1435
1516
|
}
|
|
1436
1517
|
}
|
|
1437
1518
|
|
|
@@ -1452,58 +1533,11 @@
|
|
|
1452
1533
|
margin: 0.625em 0 0;
|
|
1453
1534
|
}
|
|
1454
1535
|
|
|
1455
|
-
/* Prevent Gitalk's float-clearing pseudo elements from shifting flex actions. */
|
|
1456
|
-
#gitalk-container .gt-container .gt-header-controls::before,
|
|
1457
|
-
#gitalk-container .gt-container .gt-header-controls::after {
|
|
1458
|
-
display: none;
|
|
1459
|
-
content: none;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
#gitalk-container .gt-container .gt-header-controls {
|
|
1463
|
-
box-sizing: border-box;
|
|
1464
|
-
width: 100%;
|
|
1465
|
-
padding: 0;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
#gitalk-container .gt-container .gt-header-controls {
|
|
1469
|
-
align-items: flex-end;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
/* Pin the Markdown hint to the panel's lower-left inset. */
|
|
1473
|
-
#gitalk-container .gt-container .gt-header-comment {
|
|
1474
|
-
position: relative;
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
#gitalk-container .gt-container .gt-header-controls-tip {
|
|
1478
|
-
position: absolute;
|
|
1479
|
-
left: 0;
|
|
1480
|
-
bottom: -0.25rem;
|
|
1481
|
-
margin: 0;
|
|
1482
|
-
line-height: 1.5;
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
@media (max-width: 479px) {
|
|
1486
|
-
#gitalk-container .gt-container .gt-header-controls-tip {
|
|
1487
|
-
left: 0;
|
|
1488
|
-
bottom: -0.25rem;
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
1536
|
#gitalk-container .gt-container .gt-popup,
|
|
1493
1537
|
#gitalk-container .gt-container .gt-popup * {
|
|
1494
1538
|
font-weight: 400;
|
|
1495
1539
|
}
|
|
1496
1540
|
|
|
1497
|
-
#gitalk-container .gt-container .gt-popup {
|
|
1498
|
-
top: calc(1rem + 2rem + 0.75rem + 3.125rem - 0.75rem);
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
@media (max-width: 479px) {
|
|
1502
|
-
#gitalk-container .gt-container .gt-popup {
|
|
1503
|
-
top: calc(1rem + 2rem + 0.75rem + 2.75rem - 0.75rem);
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
1541
|
@media (min-width: 480px) {
|
|
1508
1542
|
#gitalk-container .gt-container .gt-comment-body img {
|
|
1509
1543
|
max-width: 50% !important;
|
|
@@ -1529,11 +1563,11 @@
|
|
|
1529
1563
|
}
|
|
1530
1564
|
|
|
1531
1565
|
#gitalk-container .gt-container .gt-comment {
|
|
1532
|
-
--comment-content-indent: calc(
|
|
1566
|
+
--comment-content-indent: calc(var(--gt-avatar-size) + 1rem);
|
|
1533
1567
|
display: grid;
|
|
1534
|
-
grid-template-columns:
|
|
1568
|
+
grid-template-columns: var(--gt-avatar-size) minmax(0, 1fr);
|
|
1535
1569
|
grid-template-rows: auto auto auto auto;
|
|
1536
|
-
column-gap:
|
|
1570
|
+
column-gap: 1rem;
|
|
1537
1571
|
align-items: start;
|
|
1538
1572
|
padding: 1.5em 0;
|
|
1539
1573
|
border-bottom: 1px solid #f2f2f2;
|
|
@@ -1548,10 +1582,17 @@
|
|
|
1548
1582
|
grid-column: 1;
|
|
1549
1583
|
grid-row: 1 / span 2;
|
|
1550
1584
|
align-self: center;
|
|
1585
|
+
display: block;
|
|
1586
|
+
width: var(--gt-avatar-size);
|
|
1587
|
+
height: var(--gt-avatar-size);
|
|
1551
1588
|
border-radius: 50%;
|
|
1552
1589
|
}
|
|
1553
1590
|
|
|
1554
1591
|
#gitalk-container .gt-container .gt-comment-avatar img {
|
|
1592
|
+
display: block;
|
|
1593
|
+
width: 100%;
|
|
1594
|
+
height: 100%;
|
|
1595
|
+
object-fit: cover;
|
|
1555
1596
|
border-radius: 50%;
|
|
1556
1597
|
}
|
|
1557
1598
|
|
|
@@ -1568,7 +1609,7 @@
|
|
|
1568
1609
|
|
|
1569
1610
|
#gitalk-container .gt-container .gt-comment-username {
|
|
1570
1611
|
position: relative;
|
|
1571
|
-
top:
|
|
1612
|
+
top: 0;
|
|
1572
1613
|
grid-column: 2;
|
|
1573
1614
|
grid-row: 1;
|
|
1574
1615
|
line-height: 1.5;
|
|
@@ -1576,7 +1617,7 @@
|
|
|
1576
1617
|
|
|
1577
1618
|
#gitalk-container .gt-container .gt-comment-date {
|
|
1578
1619
|
position: relative;
|
|
1579
|
-
top:
|
|
1620
|
+
top: 0;
|
|
1580
1621
|
grid-column: 2;
|
|
1581
1622
|
grid-row: 2;
|
|
1582
1623
|
margin: 0.2em 0 0;
|
|
@@ -1606,7 +1647,7 @@
|
|
|
1606
1647
|
}
|
|
1607
1648
|
|
|
1608
1649
|
#gitalk-container .gt-container .gt-comment-like {
|
|
1609
|
-
transform: translateX(calc(-1 * var(--comment-content-indent)
|
|
1650
|
+
transform: translateX(calc(-1 * var(--comment-content-indent)));
|
|
1610
1651
|
}
|
|
1611
1652
|
|
|
1612
1653
|
#gitalk-container .gt-container .gt-comment-reply,
|
|
@@ -1620,9 +1661,9 @@
|
|
|
1620
1661
|
|
|
1621
1662
|
@media (max-width: 479px) {
|
|
1622
1663
|
#gitalk-container .gt-container .gt-comment {
|
|
1623
|
-
--comment-content-indent: calc(
|
|
1624
|
-
grid-template-columns:
|
|
1625
|
-
column-gap: 0.
|
|
1664
|
+
--comment-content-indent: calc(var(--gt-avatar-size) + 0.875rem);
|
|
1665
|
+
grid-template-columns: var(--gt-avatar-size) minmax(0, 1fr);
|
|
1666
|
+
column-gap: 0.875rem;
|
|
1626
1667
|
}
|
|
1627
1668
|
}
|
|
1628
1669
|
|