Consolidate HG WordPress plugins

This commit is contained in:
parkel committed 2026-11-18 01:22:22 +01:00
commit dccb8ed9bd
18 files changed
+1701

No files matched your search

+167
View File
@@ -0,0 +1,167 @@
.hgsf-feed .hgsf-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: clamp(0.5rem, 2vw, 1rem);
list-style: none;
margin: 0;
padding: 0;
}
.hgsf-feed .hgsf-grid > li {
margin: 0;
padding: 0;
}
.hgsf-feed .hgsf-post {
position: relative;
display: block;
aspect-ratio: 1;
border-radius: var(--hgsf-radius, 0.5rem);
}
.hgsf-feed .hgsf-post img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: inherit;
background-color: #f0f2ef;
}
.hgsf-feed .hgsf-video {
position: absolute;
inset: 0.5rem 0.5rem auto auto;
border-radius: 50%;
background: rgb(0 0 0 / 65%);
color: #fff;
font-size: 0.75rem;
width: 2rem;
height: 2rem;
display: grid;
place-items: center;
}
.hgsf-feed .hgsf-grid + .hgsf-actions {
margin-top: 1rem;
}
.hgsf-feed .hgsf-actions {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.75rem 1.25rem;
}
.hgsf-feed .hgsf-more {
font: inherit;
color: var(--hgsf-accent, inherit);
background: transparent;
border: 1px solid currentColor;
border-radius: var(--hgsf-radius, 0.5rem);
padding: 0.5rem 1rem;
min-height: 44px;
cursor: pointer;
}
.hgsf-feed .hgsf-profile {
color: var(--hgsf-accent, inherit);
text-underline-offset: 0.2em;
overflow-wrap: anywhere;
}
.hgsf-feed [hidden] {
display: none;
}
.hgsf-feed :is(.hgsf-post, .hgsf-more, .hgsf-profile):focus-visible {
outline: 2px solid currentColor;
outline-offset: 3px;
}
@media (max-width: 47rem) {
.hgsf-feed .hgsf-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
.hgsf-feed .hgsf-platform {
position: absolute;
inset: auto auto 0.5rem 0.5rem;
padding: 0.2rem 0.5rem;
border-radius: 0.25rem;
background: rgb(0 0 0 / 75%);
color: #fff;
font-size: 0.75rem;
}
.hgsf-feed .hgsf-text-post {
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 0.65rem;
padding: 0.75rem;
background: var(--hgsf-surface, #f0f2ef);
aspect-ratio: auto;
min-height: 100%;
text-decoration: none;
overflow-wrap: anywhere;
}
.hgsf-feed .hgsf-text-post:hover {
text-decoration: underline;
}
.hgsf-feed :is(.hgsf-text-platform, .hgsf-text-date) {
font-size: 0.8rem;
}
.hgsf-feed .hgsf-x-tile {
grid-column: span 2;
min-width: 0;
}
.hgsf-feed .hgsf-x-embed {
margin: 0;
padding: 0.75rem;
background: var(--hgsf-surface, #f0f2ef);
border-radius: var(--hgsf-radius, 0.5rem);
}
.hgsf-feed .hgsf-x-tile iframe {
max-width: 100%;
}
ul.hgsf-sociallinks {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
list-style: none;
margin: 0;
padding: 0;
}
.hgsf-sociallinks > li {
margin: 0;
padding: 0;
}
.hgsf-sociallinks a {
display: grid;
place-items: center;
width: 44px;
height: 44px;
border: 1px solid currentColor;
border-radius: 50%;
color: var(--hgsf-accent, inherit);
}
.hgsf-sociallinks a:hover {
background: var(--hgsf-surface, #f0f2ef);
}
.hgsf-sociallinks a:focus-visible {
outline: 2px solid currentColor;
outline-offset: 3px;
}
+22
View File
@@ -0,0 +1,22 @@
(() => {
for (const feed of document.querySelectorAll('.hgsf-feed')) {
const button = feed.querySelector('.hgsf-more');
if (!button) continue;
const tiles = [...feed.querySelectorAll('.hgsf-grid > li')];
const batchSize = Number(feed.dataset.hgsfLimit);
let visible = batchSize;
for (const tile of tiles.slice(visible)) tile.hidden = true;
button.hidden = false;
button.addEventListener('click', () => {
const nextBatch = tiles.slice(visible, visible + batchSize);
for (const tile of nextBatch) tile.hidden = false;
visible += nextBatch.length;
button.hidden = visible === tiles.length;
const firstTile = nextBatch[0];
(firstTile.querySelector('a') || firstTile).focus();
});
}
})();
+11
View File
@@ -0,0 +1,11 @@
/* HG navigation only; leave the rest of the WordPress admin color scheme intact. */
#adminmenu #toplevel_page_hg-plugins>a.menu-top{background:#173b37;color:#d8fff3;box-shadow:inset 3px 0 #56d5bb}
#adminmenu #toplevel_page_hg-plugins .wp-menu-image::before{color:#80e9d1}
#adminmenu #toplevel_page_hg-plugins:hover>a.menu-top,#adminmenu #toplevel_page_hg-plugins>a.menu-top:focus{background:#20574e;color:#fff}
#adminmenu #toplevel_page_hg-plugins.wp-has-current-submenu>a.menu-top,#adminmenu #toplevel_page_hg-plugins.current>a.menu-top{background:#126151;color:#fff}
#adminmenu #toplevel_page_hg-plugins .wp-submenu{background:#16332f}
#adminmenu #toplevel_page_hg-plugins .wp-submenu a{color:#d0e6de}
#adminmenu #toplevel_page_hg-plugins .wp-submenu a:hover,#adminmenu #toplevel_page_hg-plugins .wp-submenu a:focus{color:#fff;background:#24584e}
#adminmenu #toplevel_page_hg-plugins .wp-submenu li.current a{color:#fff;font-weight:600;background:#205147}
#adminmenu #toplevel_page_hg-plugins .wp-submenu .wp-submenu-head{color:#fff;background:#126151}
.hg-suite{max-width:1100px}.hg-suite-header{display:flex;align-items:center;gap:18px;margin:28px 0}.hg-suite-header h1{padding:0;font-size:26px}.hg-suite-header p{margin:7px 0 0;color:#50575e}.hg-suite-mark{display:grid;place-items:center;width:58px;height:58px;background:#126151;color:#fff;border-radius:10px;font-weight:750;font-size:21px;letter-spacing:-1px}.hg-suite-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.hg-suite-card{background:#fff;border:1px solid #dcdcde;border-radius:8px;padding:26px}.hg-suite-card h2{margin:12px 0;font-size:20px}.hg-suite-card p{color:#50575e;font-size:14px;line-height:1.7;min-height:48px}.hg-suite-version{display:inline-block;padding:4px 9px;border-radius:5px;color:#145c4c;background:#e9f5ee;font-size:12px}.hg-suite-card .button{margin-top:12px}@media(max-width:782px){.hg-suite-grid{grid-template-columns:1fr}.hg-suite-header{gap:14px}.hg-suite-card{padding:22px}}