Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jonoalderson/edge-images
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.01
Choose a base ref
...
head repository: jonoalderson/edge-images
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 10,888 additions and 2,240 deletions.
  1. +4 −0 assets/css/admin-front.css
  2. +6 −0 assets/css/admin-front.less
  3. +340 −0 assets/css/admin.less
  4. +1 −0 assets/css/admin.min.css
  5. +0 −1 assets/css/images.css
  6. +28 −22 assets/css/images.less
  7. +1 −0 assets/css/images.min.css
  8. +68 −0 assets/js/admin.js
  9. +1 −0 assets/js/admin.min.js
  10. +15 −0 assets/js/main.js
  11. +1 −0 assets/js/main.min.js
  12. +48 −14 autoload.php
  13. +82 −0 classes/blocks/class-gallery.php
  14. +102 −0 classes/blocks/class-image.php
  15. +137 −0 classes/class-activation.php
  16. +1,070 −0 classes/class-admin-page.php
  17. +0 −40 classes/class-admin.php
  18. +226 −0 classes/class-block.php
  19. +117 −0 classes/class-blocks.php
  20. +188 −0 classes/class-content-transformer.php
  21. +428 −12 classes/class-edge-provider.php
  22. +206 −0 classes/class-features.php
  23. +576 −320 classes/class-handler.php
  24. +603 −373 classes/class-helpers.php
  25. +354 −0 classes/class-image-dimensions.php
  26. +0 −598 classes/class-image.php
  27. +398 −0 classes/class-images.php
  28. +175 −0 classes/class-integration.php
  29. +263 −0 classes/class-integrations.php
  30. +165 −0 classes/class-providers.php
  31. +284 −0 classes/class-settings.php
  32. +318 −0 classes/class-srcset-transformer.php
  33. +164 −39 classes/edge-providers/class-accelerated-domains.php
  34. +290 −0 classes/edge-providers/class-bunny.php
  35. +84 −41 classes/edge-providers/class-cloudflare.php
  36. +307 −0 classes/edge-providers/class-imgix.php
  37. +79 −0 classes/edge-providers/class-none.php
  38. +215 −0 classes/features/class-avatars.php
  39. +451 −0 classes/features/class-cache.php
  40. +477 −0 classes/features/class-htaccess-cache.php
  41. +294 −0 classes/features/class-picture.php
  42. +0 −103 classes/features/class-preloads.php
  43. +83 −0 classes/integrations/bricks/class-bricks.php
  44. +49 −0 classes/integrations/enable-media-replace/class-enable-media-replace.php
  45. +162 −0 classes/integrations/relevanssi/class-live-ajax-search.php
  46. +257 −47 classes/integrations/yoast-seo/class-schema-images.php
  47. +129 −123 classes/integrations/yoast-seo/class-social-images.php
  48. +112 −54 classes/integrations/yoast-seo/class-xml-sitemaps.php
  49. +0 −40 classes/views/admin.php
  50. +59 −144 edge-images.php
  51. +969 −0 prepros.config
  52. +173 −269 readme.md
  53. +305 −0 readme.txt
  54. +24 −0 uninstall.php
4 changes: 4 additions & 0 deletions assets/css/admin-front.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#wp-admin-bar-my-account .edge-images-container {
float: left;
margin-right: 6px;
}
6 changes: 6 additions & 0 deletions assets/css/admin-front.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#wp-admin-bar-my-account {
.edge-images-container {
float: left;
margin-right: 6px;
}
}
340 changes: 340 additions & 0 deletions assets/css/admin.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,340 @@
// Variables
@primary-color: #2271b1; // WordPress primary blue color.
@border-radius: 8px; // Consistent border radius across components.
@transition-speed: 0.2s; // Standard transition speed for animations.

// Main container styles
.edge-images-wrap {
max-width: 800px;
margin: 20px 0;

// Page title styling
h1 {
margin-bottom: 1em;
padding-bottom: 1em;
border-bottom: 1px solid #eee;
}
}

// Settings container with card-like appearance
.edge-images-container {
background: #fff;
padding: 2em;
border-radius: @border-radius;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

// Provider selector grid layout
.edge-images-provider-selector {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1em;
margin-bottom: 2em;
}

// Individual provider option styling
.edge-images-provider-option {
display: block;
cursor: pointer;

// Hide radio input visually
input[type="radio"] {
display: none;
}

// Provider card styling
.edge-images-provider-card {
display: block;
padding: 1.5em;
background: #f8f9fa;
border: 2px solid #e2e4e7;
border-radius: @border-radius;
transition: all @transition-speed ease;
position: relative;
overflow: hidden;
text-align: center;

// Hover effects
&:hover {
border-color: @primary-color;
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
}

// Selected state styling
input[type="radio"]:checked + .edge-images-provider-card {
background: #fff;
border-color: @primary-color;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

// Checkmark indicator
&::after {
content: "";
position: absolute;
top: 10px;
right: 10px;
color: @primary-color;
font-weight: bold;
}
}
}

// Provider name text styling
.edge-images-provider-name {
display: block;
font-size: 15px;
font-weight: 500;
color: #1d2327;
}

// Settings field container styling
.edge-images-settings-field {
margin: 0 0 2em;
padding: 1.5em;
background: #f8f9fa;
border-radius: @border-radius;
border: 1px solid #e2e4e7;

// Field label styling
label {
display: block;
font-weight: 600;
margin-bottom: 0.5em;
}

// Help text styling
.description {
margin-top: 0.75em;
color: #666;
font-size: 13px;
line-height: 1.5;
}

// Checkbox alignment
input[type="checkbox"] {
margin-right: 8px;
}
}

// Submit button container
.submit {
margin: 2em 0 0;
padding: 1.5em 0 0;
border-top: 1px solid #eee;
}

// Responsive adjustments for mobile
@media screen and (max-width: 782px) {
.edge-images-provider-selector {
grid-template-columns: 1fr;
}
}

// Accessibility: Respect reduced motion preferences
@media (prefers-reduced-motion: reduce) {
.edge-images-provider-option .edge-images-provider-card {
transition: none;
transform: none !important;
}
}

// Add this to the existing CSS
.edge-images-imgix-field {
display: none; // Hidden by default
}

// Add this to the existing CSS
.edge-images-intro {
margin-bottom: 2em;
padding-bottom: 1.5em;
border-bottom: 1px solid #eee;

p {
font-size: 14px;
line-height: 1.6;
margin: 1em 0;
max-width: 800px;

&:last-child {
margin-bottom: 0;
}
}

a {
text-decoration: none;

&:hover {
text-decoration: underline;
}
}
}

// Add this to the existing CSS
.edge-images-integrations {
margin-top: 2em;
display: grid;
gap: 16px;

.integration-card {
background: #fff;
border: 1px solid #e2e4e7;
border-radius: 12px;

// Header row with icon and name
.integration-header {
display: flex;
align-items: center;
padding: 20px;
background: #fafafa;
border-bottom: 1px solid #eee;

.dashicons {
font-size: 20px;
width: 20px;
height: 20px;
margin-right: 12px;

&.dashicons-yes-alt {
color: #00a32a; // WordPress success green
}

&.dashicons-no-alt {
color: #d63638; // WordPress error red
}
}

strong {
font-size: 14px;
font-weight: 600;
color: #1d2327;
}
}

// Settings area
.integration-settings {
padding: 20px;

fieldset {
margin: 0;

p {
margin: 12px 0;

&:first-child {
margin-top: 0;
}

&:last-child {
margin-bottom: 0;
}

&.description {
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #eee;
color: #757575;
font-size: 13px;
}
}

label {
color: #1d2327;
}
}
}
}

// Bottom description
> .description {
margin-top: 1em;
color: #757575;
font-size: 13px;
grid-column: 1 / -1; // Span all columns
}
}

// Respect reduced motion preferences
@media (prefers-reduced-motion: reduce) {
.edge-images-integrations .integration-card {
transition: none;
transform: none !important;

&:hover {
transform: none !important;
}
}
}

// Features section styling
.edge-images-features {
display: grid;
gap: 16px;
margin-top: 1em;

.feature-card {
background: #fff;
border: 1px solid #e2e4e7;
border-radius: 12px;
overflow: hidden;

.feature-header {
padding: 16px;
background: #fafafa;
border-bottom: 1px solid #eee;

strong {
font-size: 14px;
font-weight: 600;
color: #1d2327;
}
}

.feature-settings {
padding: 16px;

fieldset {
margin: 0;

p {
margin: 8px 0;

&:first-child {
margin-top: 0;
}

&:last-child {
margin-bottom: 0;
}

&.description {
color: #757575;
font-size: 13px;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid #eee;
}
}
}
}
}
}

// Disabled feature styles
.edge-images-feature-disabled {
opacity: 0.5;
pointer-events: none;
position: relative;

&::after {
content: attr(data-disabled-reason);
display: block;
margin-top: 8px;
color: #d63638;
font-style: italic;
}

input[type="checkbox"] {
opacity: 0.5;
}
}
1 change: 1 addition & 0 deletions assets/css/admin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion assets/css/images.css

This file was deleted.

Loading