| @@ -60,13 +60,9 @@ | ||
| 60 | 60 | /* Admin Header */ |
| 61 | 61 | .wp-subscription-admin-header { |
| 62 | 62 | background: #fff; |
| 63 | 63 | border-bottom: 1px solid #e2e4e7; |
| 64 | - padding: 0 32px; | |
| 65 | - display: flex; | |
| 66 | - align-items: center; | |
| 67 | - justify-content: space-between; | |
| 68 | - min-height: 64px; | |
| 64 | + padding: 0 24px; | |
| 69 | 65 | position: sticky; |
| 70 | 66 | top: 32px; |
| 71 | 67 | z-index: 100; |
| 72 | 68 | width: 100%; |
| @@ -72,88 +68,135 @@ | ||
| 72 | 68 | width: 100%; |
| 73 | 69 | box-sizing: border-box; |
| 74 | 70 | } |
| 75 | 71 | |
| 76 | -.wp-subscription-admin-header-left { | |
| 72 | +.wp-subscription-admin-header-inner { | |
| 73 | + max-width: 1240px; | |
| 74 | + margin: 0 auto; | |
| 77 | 75 | display: flex; |
| 78 | 76 | align-items: center; |
| 79 | - gap: 32px; | |
| 77 | + justify-content: space-between; | |
| 78 | + min-height: 72px; | |
| 80 | 79 | } |
| 81 | 80 | |
| 82 | -.wp-subscription-logo { | |
| 83 | - height: 38px; | |
| 84 | - width: auto; | |
| 85 | - display: block; | |
| 81 | +.wp-subscription-admin-header-left { | |
| 82 | + display: flex; | |
| 83 | + flex-direction: column; | |
| 84 | + gap: 2px; | |
| 86 | 85 | } |
| 87 | 86 | |
| 88 | -.wp-subscription-admin-header-menu { | |
| 87 | +.wp-subscription-breadcrumb { | |
| 89 | 88 | display: flex; |
| 90 | 89 | align-items: center; |
| 91 | 90 | gap: 8px; |
| 92 | - margin-left: 32px; | |
| 93 | 91 | } |
| 94 | 92 | |
| 95 | -.wp-subscription-admin-header-menu a { | |
| 96 | - color: #1d2327; | |
| 93 | +.wp-subscription-breadcrumb-home { | |
| 94 | + display: inline-flex; | |
| 95 | + align-items: center; | |
| 96 | + color: #646970; | |
| 97 | 97 | text-decoration: none; |
| 98 | - padding: 8px 18px; | |
| 99 | - border-radius: 4px; | |
| 98 | + transition: color 0.2s; | |
| 99 | +} | |
| 100 | + | |
| 101 | +.wp-subscription-breadcrumb-home:hover { | |
| 102 | + color: #2271b1; | |
| 103 | +} | |
| 104 | + | |
| 105 | +.wp-subscription-breadcrumb-home .dashicons { | |
| 106 | + font-size: 20px; | |
| 107 | + width: 20px; | |
| 108 | + height: 20px; | |
| 109 | +} | |
| 110 | + | |
| 111 | +.wp-subscription-breadcrumb-sep { | |
| 112 | + color: #c3c4c7; | |
| 113 | + font-size: 16px; | |
| 114 | + line-height: 1; | |
| 115 | + user-select: none; | |
| 116 | +} | |
| 117 | + | |
| 118 | +.wp-subscription-breadcrumb-link { | |
| 119 | + color: #646970; | |
| 100 | 120 | font-weight: 500; |
| 101 | - font-family: | |
| 102 | - -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | |
| 103 | - font-size: 15px; | |
| 104 | - transition: | |
| 105 | - background 0.2s, | |
| 106 | - color 0.2s, | |
| 107 | - box-shadow 0.2s; | |
| 108 | - background: transparent; | |
| 109 | - border: none; | |
| 110 | - outline: none; | |
| 111 | - box-shadow: none; | |
| 121 | + font-size: 14px; | |
| 122 | + text-decoration: none; | |
| 123 | + transition: color 0.2s; | |
| 112 | 124 | } |
| 113 | 125 | |
| 114 | -.wp-subscription-admin-header-menu a.current, | |
| 115 | -.wp-subscription-admin-header-menu a.active { | |
| 116 | - background: #f0f0f1; | |
| 126 | +.wp-subscription-breadcrumb-link:hover { | |
| 117 | 127 | color: #2271b1; |
| 118 | 128 | } |
| 119 | 129 | |
| 120 | -.wp-subscription-admin-header-menu a:hover { | |
| 121 | - background: #eaf6ff; | |
| 122 | - color: #2271b1; | |
| 123 | - box-shadow: 0 2px 8px rgba(34, 113, 177, 0.06); | |
| 130 | +.wp-subscription-breadcrumb-current { | |
| 131 | + color: #1d2327; | |
| 132 | + font-weight: 500; | |
| 133 | + font-size: 14px; | |
| 124 | 134 | } |
| 125 | 135 | |
| 136 | +.wp-subscription-logo { | |
| 137 | + /* Deliberately small. It is a persistent header mark, not the page's | |
| 138 | + subject — the breadcrumb on the left is what identifies the screen. */ | |
| 139 | + height: 22px; | |
| 140 | + width: auto; | |
| 141 | + display: block; | |
| 142 | +} | |
| 143 | + | |
| 144 | +/* The licence badge sits before the logo and must not pick up the underline | |
| 145 | + that admin anchors get, since the inactive state is a link. */ | |
| 146 | +.wp-subscription-license-badge, | |
| 147 | +.wp-subscription-license-badge:hover, | |
| 148 | +.wp-subscription-license-badge:focus { | |
| 149 | + text-decoration: none; | |
| 150 | +} | |
| 151 | + | |
| 152 | +a.wp-subscription-license-badge:hover { | |
| 153 | + filter: brightness(0.97); | |
| 154 | +} | |
| 155 | + | |
| 156 | +a.wp-subscription-license-badge:focus { | |
| 157 | + box-shadow: 0 0 0 3px var(--wpsubs-brand-ring, rgba(255, 77, 0, 0.2)); | |
| 158 | + outline: none; | |
| 159 | +} | |
| 160 | + | |
| 126 | 161 | .wp-subscription-admin-header-right { |
| 127 | 162 | display: flex; |
| 128 | 163 | align-items: center; |
| 129 | - margin-left: auto; | |
| 164 | + gap: 12px; | |
| 130 | 165 | } |
| 131 | 166 | |
| 132 | -.wp-subscription-upgrade-btn { | |
| 133 | - background: #2271b1; | |
| 134 | - color: #fff; | |
| 135 | - padding: 10px 22px; | |
| 167 | +.wp-subscription-help-btn { | |
| 168 | + display: inline-flex; | |
| 169 | + align-items: center; | |
| 170 | + gap: 5px; | |
| 171 | + padding: 6px 14px; | |
| 172 | + border: 1px solid #c3c4c7; | |
| 136 | 173 | border-radius: 4px; |
| 174 | + color: #1d2327; | |
| 137 | 175 | text-decoration: none; |
| 138 | - font-weight: 600; | |
| 139 | - font-size: 15px; | |
| 140 | - margin-left: 16px; | |
| 176 | + font-size: 13px; | |
| 177 | + font-weight: 500; | |
| 178 | + background: #fff; | |
| 179 | + line-height: 1.4; | |
| 141 | 180 | transition: |
| 142 | - background 0.2s, | |
| 143 | - box-shadow 0.2s; | |
| 144 | - box-shadow: 0 1px 3px rgba(34, 113, 177, 0.08); | |
| 145 | - border: none; | |
| 146 | - outline: none; | |
| 147 | - display: inline-block; | |
| 181 | + border-color 0.2s, | |
| 182 | + color 0.2s, | |
| 183 | + background 0.2s; | |
| 148 | 184 | } |
| 149 | 185 | |
| 150 | -.wp-subscription-upgrade-btn:hover { | |
| 151 | - background: #135e96; | |
| 152 | - color: #fff; | |
| 153 | - box-shadow: 0 3px 12px rgba(34, 113, 177, 0.13); | |
| 186 | +.wp-subscription-help-btn:hover { | |
| 187 | + border-color: #2271b1; | |
| 188 | + color: #2271b1; | |
| 189 | + background: #f0f6fc; | |
| 154 | 190 | } |
| 155 | 191 | |
| 192 | +.wp-subscription-help-btn .dashicons { | |
| 193 | + font-size: 16px; | |
| 194 | + width: 16px; | |
| 195 | + height: 16px; | |
| 196 | + margin-top: 1px; | |
| 197 | +} | |
| 198 | + | |
| 156 | 199 | /* Admin Content */ |
| 157 | 200 | |
| 158 | 201 | .wp-subscription-admin-box { |
| 159 | 202 | background: #fff; |
| @@ -268,21 +311,14 @@ | ||
| 268 | 311 | |
| 269 | 312 | /* Responsive Design */ |
| 270 | 313 | @media screen and (max-width: 900px) { |
| 271 | 314 | .wp-subscription-admin-header { |
| 272 | - flex-direction: column; | |
| 273 | - gap: 10px; | |
| 274 | - text-align: center; | |
| 275 | - padding: 0 10px; | |
| 315 | + padding: 0 16px; | |
| 276 | 316 | } |
| 277 | - .wp-subscription-admin-header-left { | |
| 278 | - flex-direction: column; | |
| 317 | + .wp-subscription-admin-header-inner { | |
| 318 | + flex-wrap: wrap; | |
| 279 | 319 | gap: 10px; |
| 280 | 320 | } |
| 281 | - .wp-subscription-admin-header-menu { | |
| 282 | - margin-left: 0; | |
| 283 | - gap: 4px; | |
| 284 | - } | |
| 285 | 321 | .wp-subscription-admin-content { |
| 286 | 322 | padding: 10px; |
| 287 | 323 | } |
| 288 | 324 | } |
| @@ -288,35 +324,35 @@ | ||
| 288 | 324 | } |
| 289 | 325 | |
| 290 | 326 | @media screen and (max-width: 600px) { |
| 291 | 327 | .wp-subscription-admin-header { |
| 292 | - min-height: 48px; | |
| 293 | - padding: 0 4px; | |
| 328 | + padding: 0 12px; | |
| 294 | 329 | } |
| 295 | - .wp-subscription-logo { | |
| 296 | - height: 28px; | |
| 330 | + .wp-subscription-admin-header-inner { | |
| 331 | + flex-direction: column; | |
| 332 | + align-items: flex-start; | |
| 333 | + gap: 8px; | |
| 297 | 334 | } |
| 298 | - .wp-subscription-admin-header-menu a { | |
| 299 | - font-size: 13px; | |
| 300 | - padding: 6px 10px; | |
| 335 | + .wp-subscription-admin-header-right { | |
| 336 | + gap: 8px; | |
| 301 | 337 | } |
| 302 | - .wp-subscription-upgrade-btn { | |
| 303 | - font-size: 13px; | |
| 304 | - padding: 7px 12px; | |
| 338 | + .wp-subscription-logo { | |
| 339 | + height: 18px; | |
| 305 | 340 | } |
| 306 | 341 | } |
| 307 | 342 | |
| 308 | -/* Remove left padding on WP Subscription admin pages only */ | |
| 343 | +/* Remove left padding on WPSubscription admin pages only */ | |
| 309 | 344 | body.toplevel_page_wp-subscription #wpcontent, |
| 310 | -body.wp-subscription_page_wp-subscription-stats #wpcontent, | |
| 311 | -body.wp-subscription_page_wp-subscription-settings #wpcontent, | |
| 312 | -body.wp-subscription_page_wp-subscription-tools #wpcontent, | |
| 313 | -body.wp-subscription_page_wp-subscription-support #wpcontent, | |
| 314 | -body.wp-subscription_page_wp-subscription-delivery #wpcontent, | |
| 315 | -body.wp-subscription_page_wp-subscription-integrations #wpcontent { | |
| 345 | +body[class*="wpsubscription_page_wp-subscription"] #wpcontent { | |
| 316 | 346 | padding-left: 0 !important; |
| 317 | 347 | } |
| 318 | 348 | |
| 349 | +/* Remove onboarding page menu item */ | |
| 350 | +.wp-submenu a[href*="page=wp-subscription-onboarding"], | |
| 351 | +.wp-submenu a[href*="page=wp-subscription-details"] { | |
| 352 | + display: none !important; | |
| 353 | +} | |
| 354 | + | |
| 319 | 355 | /* Table & List Styles */ |
| 320 | 356 | .wp-subscription-list-table { |
| 321 | 357 | border: none !important; |
| 322 | 358 | border-radius: 8px; |
| @@ -458,12 +494,11 @@ | ||
| 458 | 494 | |
| 459 | 495 | /* Subscriptions List Page Layout */ |
| 460 | 496 | .wp-subscription-admin-content.list-page { |
| 461 | 497 | max-width: 1240px; |
| 462 | - margin: 32px auto 0 auto; | |
| 463 | - background: #fff; | |
| 464 | - padding: 32px 24px 24px 24px; | |
| 465 | - border-radius: 12px; | |
| 498 | + margin: 24px auto 32px auto; | |
| 499 | + background: transparent; | |
| 500 | + padding: 0px 24px; | |
| 466 | 501 | } |
| 467 | 502 | .wp-subscription-list-header { |
| 468 | 503 | margin-bottom: 28px; |
| 469 | 504 | display: flex; |
| @@ -657,5 +692,129 @@ | ||
| 657 | 692 | .button-link-delete:hover { |
| 658 | 693 | background: #d63638; |
| 659 | 694 | color: #fff !important; |
| 660 | 695 | text-decoration: none; |
| 696 | +} | |
| 697 | + | |
| 698 | +/* -------------------------------------------------------------------------- | |
| 699 | + Integrations: sticky filter rail + results | |
| 700 | + | |
| 701 | + Three facet groups and a dozen chips do not fit across the top without | |
| 702 | + pushing the first card off the fold, and a bar up there scrolls away exactly | |
| 703 | + when a long list needs narrowing. They live in a column instead, which stays | |
| 704 | + in reach while the results scroll. | |
| 705 | + -------------------------------------------------------------------------- */ | |
| 706 | + | |
| 707 | +/* | |
| 708 | + * The `hidden` attribute is only `display: none` in the UA stylesheet, so any | |
| 709 | + * class that sets `display` outranks it. `.wpsubs-btn` is `inline-flex`, which | |
| 710 | + * meant the Reset button stayed on screen with `hidden` set — visible, and | |
| 711 | + * still clickable. Anything toggled by the filter script needs this. | |
| 712 | + */ | |
| 713 | +.subscrpt-int-filters [hidden], | |
| 714 | +.subscrpt-int-card[hidden], | |
| 715 | +[data-subscrpt-int-section][hidden], | |
| 716 | +[data-subscrpt-int-empty][hidden], | |
| 717 | +[data-subscrpt-integration-filters][hidden] { | |
| 718 | + display: none !important; | |
| 719 | +} | |
| 720 | + | |
| 721 | +.subscrpt-int-layout { | |
| 722 | + display: grid; | |
| 723 | + grid-template-columns: 232px minmax(0, 1fr); | |
| 724 | + gap: 32px; | |
| 725 | + align-items: start; | |
| 726 | +} | |
| 727 | + | |
| 728 | +.subscrpt-int-results { | |
| 729 | + min-width: 0; | |
| 730 | +} | |
| 731 | + | |
| 732 | +/* The rail sticks below the page header, which is itself sticky at 32px. */ | |
| 733 | +.subscrpt-int-sidebar { | |
| 734 | + position: sticky; | |
| 735 | + top: 104px; | |
| 736 | + max-height: calc(100vh - 124px); | |
| 737 | + overflow-y: auto; | |
| 738 | + overscroll-behavior: contain; | |
| 739 | +} | |
| 740 | + | |
| 741 | +.subscrpt-int-filters { | |
| 742 | + display: flex; | |
| 743 | + flex-direction: column; | |
| 744 | + gap: 14px; | |
| 745 | +} | |
| 746 | + | |
| 747 | +.subscrpt-int-filters__reset { | |
| 748 | + align-self: stretch; | |
| 749 | + justify-content: center; | |
| 750 | + margin: 0 4px; | |
| 751 | +} | |
| 752 | + | |
| 753 | +/* The filter rail is the shared `wpsubs-vnav` component (one nav per facet). | |
| 754 | + Only the count badge at the end of each row is page-specific. */ | |
| 755 | +.subscrpt-int-chip__count { | |
| 756 | + font-size: 11px; | |
| 757 | + font-variant-numeric: tabular-nums; | |
| 758 | + padding: 0 6px; | |
| 759 | + border-radius: 9999px; | |
| 760 | + background: var(--wpsubs-surface-muted, #f3f4f6); | |
| 761 | + color: var(--wpsubs-text-muted, #6b7280); | |
| 762 | + flex-shrink: 0; | |
| 763 | +} | |
| 764 | + | |
| 765 | +.wpsubs-vnav__item.is-active .subscrpt-int-chip__count { | |
| 766 | + background: var(--wpsubs-brand, #ff4d00); | |
| 767 | + color: #fff; | |
| 768 | +} | |
| 769 | + | |
| 770 | +.subscrpt-int-empty { | |
| 771 | + margin: 0 0 20px; | |
| 772 | + padding: 40px 24px; | |
| 773 | + text-align: center; | |
| 774 | + font-size: 13px; | |
| 775 | + color: var(--wpsubs-text-muted, #6b7280); | |
| 776 | + background: var(--wpsubs-surface, #fff); | |
| 777 | + border: 1px solid var(--wpsubs-border, #e5e7eb); | |
| 778 | + border-radius: var(--wpsubs-radius, 8px); | |
| 779 | +} | |
| 780 | + | |
| 781 | +/* Below this the rail would squeeze the card grid to one column, so it goes | |
| 782 | + back on top and stops sticking. | |
| 783 | + | |
| 784 | + Measured against WordPress's own fold point rather than a round number: at | |
| 785 | + 960px the admin menu collapses to 36px, so the content gains 124px exactly | |
| 786 | + as the viewport loses room, and the rail plus two card columns still fit. | |
| 787 | + The previous 1200px threshold fired on an ordinary laptop — a 1196px window | |
| 788 | + put the filters back on top with 756px of space going spare beside them. */ | |
| 789 | +@media screen and (max-width: 960px) { | |
| 790 | + .subscrpt-int-layout { | |
| 791 | + grid-template-columns: minmax(0, 1fr); | |
| 792 | + } | |
| 793 | + | |
| 794 | + .subscrpt-int-sidebar { | |
| 795 | + position: static; | |
| 796 | + max-height: none; | |
| 797 | + overflow: visible; | |
| 798 | + } | |
| 799 | + | |
| 800 | + .subscrpt-int-filters { | |
| 801 | + flex-direction: row; | |
| 802 | + flex-wrap: wrap; | |
| 803 | + align-items: flex-start; | |
| 804 | + gap: 12px 20px; | |
| 805 | + } | |
| 806 | + | |
| 807 | + /* Each facet's vnav sits as its own column in the wrapped rail. */ | |
| 808 | + .subscrpt-int-filters .wpsubs-vnav { | |
| 809 | + flex: 1 1 180px; | |
| 810 | + } | |
| 811 | + | |
| 812 | + /* Reset keeps its place under the filters: a full-width last line. */ | |
| 813 | + .subscrpt-int-filters__reset { | |
| 814 | + flex: 1 1 100%; | |
| 815 | + } | |
| 816 | + | |
| 817 | + [data-subscrpt-int-reset] { | |
| 818 | + flex: 0 0 100%; | |
| 819 | + } | |
| 661 | 820 | } |