Skip to content

Commit

Permalink
Merge branch 'trunk' into add/network-support
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed Nov 6, 2023
2 parents 27ea39d + 6aade3c commit aa2cae4
Show file tree
Hide file tree
Showing 124 changed files with 2,912 additions and 11,134 deletions.
Expand Up @@ -15,6 +15,8 @@ import showAdminCredentialsOnWpLogin from './wp-content/mu-plugins/1-show-admin-
import niceErrorMessagesForPluginsAndThemesDirectories from './wp-content/mu-plugins/2-nice-error-messages-for-plugins-and-themes-directories.php?raw';
/** @ts-ignore */
import linksTargetingTopFrameShouldTargetPlaygroundIframe from './wp-content/mu-plugins/3-links-targeting-top-frame-should-target-playground-iframe.php?raw';
/** @ts-ignore */
import enableUrlRewrite from './wp-content/mu-plugins/4-enable-url-rewrite.php?raw';

/**
* @private
Expand Down Expand Up @@ -202,6 +204,12 @@ class WordPressPatcher {
linksTargetingTopFrameShouldTargetPlaygroundIframe
);
await this.php.mkdir(`${this.wordpressPath}/wp-content/fonts`);

// Activate URL rewriting.
await this.php.writeFile(
`${this.wordpressPath}/wp-content/mu-plugins/4-enable-url-rewrite.php`,
enableUrlRewrite
);
}
}

Expand Down Expand Up @@ -251,8 +259,8 @@ export async function makeEditorFrameControlled(
const controlledIframe = `
/**
* A synchronous function to read a blob URL as text.
*
* @param {string} url
*
* @param {string} url
* @returns {string}
*/
const __playground_readBlobAsText = function (url) {
Expand All @@ -268,7 +276,7 @@ export async function makeEditorFrameControlled(
URL.revokeObjectURL(url);
}
}
window.__playground_ControlledIframe = window.wp.element.forwardRef(function (props, ref) {
const source = window.wp.element.useMemo(function () {
if (props.srcDoc) {
Expand Down
@@ -0,0 +1,5 @@
<?php
/**
* Supports URL rewriting to remove `index.php` from permalinks.
*/
add_filter( 'got_url_rewrite', '__return_true' );
Expand Up @@ -22,15 +22,15 @@

.about__container {
/* Section backgrounds */
--background: #151515;
--background: #EAE9E7;
--subtle-background: #EAE9E7;

/* Main text color */
--text: #1e1e1e;
--text-light: #fff;

/* Accent colors: used in header, on special classes. */
--accent-1: #D8613C; /* Link color */
--accent-1: #C94C26; /* Link color */
--accent-2: #CFCABE; /* Accent background */
--accent-3: #f0f0f1; /* hr background */
--accent-4: #B1C5A4; /* Light green */
Expand Down Expand Up @@ -539,28 +539,30 @@
justify-content: end;
box-sizing: border-box;
padding: var(--gap) 0;
min-height: 420px;
height: clamp(12.5rem, -1.25rem + 36.67vw, 26.25rem);
color: var(--text-light);
background: var(--background) url('../images/about-header-about.svg?ver=6.4') no-repeat;
background-size: cover;
background-position: center;
background-image: url('../images/about-header-about.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
background-size: auto 70%, cover;
border-radius: 5px;
background-repeat: no-repeat;
background-position: left 7% center, top right;
background-color: var(--background);
}

.credits-php .about__header {
background-image: url('../images/about-header-credits.svg?ver=6.4');
background-image: url('../images/about-header-credits.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
}

.freedoms-php .about__header {
background-image: url('../images/about-header-freedoms.svg?ver=6.4');
background-image: url('../images/about-header-freedoms.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
}

.privacy-php .about__header {
background-image: url('../images/about-header-privacy.svg?ver=6.4');
background-image: url('../images/about-header-privacy.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
}

.contribute-php .about__header {
background-image: url('../images/about-header-contribute.svg?ver=6.4');
background-image: url('../images/about-header-contribute.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
}

.about__header-image {
Expand All @@ -569,8 +571,9 @@

.about__header-title {
box-sizing: border-box;
margin: 0 calc(var(--gap) + 3rem);
margin: 0 calc(var(--gap) + 2rem);
padding: 0;
max-width: 55%;
}

.about__header-title h1 {
Expand All @@ -582,6 +585,7 @@
font-weight: 600;
}

.about-php .about__header-title h1,
.credits-php .about__header-title h1,
.freedoms-php .about__header-title h1,
.privacy-php .about__header-title h1,
Expand Down Expand Up @@ -646,11 +650,8 @@
}

@media screen and (max-width: 960px) {
.about__header-title h1 {
/* Fluid font size scales on browser size 600px - 960px. */
font-size: clamp(3rem, 13.33vw - 2rem, 6rem);
}

.about-php .about__header-title h1,
.credits-php .about__header-title h1,
.freedoms-php .about__header-title h1,
.privacy-php .about__header-title h1,
Expand Down

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions packages/playground/remote/public/wp-beta/wp-admin/css/about.css
Expand Up @@ -21,15 +21,15 @@

.about__container {
/* Section backgrounds */
--background: #151515;
--background: #EAE9E7;
--subtle-background: #EAE9E7;

/* Main text color */
--text: #1e1e1e;
--text-light: #fff;

/* Accent colors: used in header, on special classes. */
--accent-1: #D8613C; /* Link color */
--accent-1: #C94C26; /* Link color */
--accent-2: #CFCABE; /* Accent background */
--accent-3: #f0f0f1; /* hr background */
--accent-4: #B1C5A4; /* Light green */
Expand Down Expand Up @@ -538,28 +538,30 @@
justify-content: end;
box-sizing: border-box;
padding: var(--gap) 0;
min-height: 420px;
height: clamp(12.5rem, -1.25rem + 36.67vw, 26.25rem);
color: var(--text-light);
background: var(--background) url('../images/about-header-about.svg?ver=6.4') no-repeat;
background-size: cover;
background-position: center;
background-image: url('../images/about-header-about.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
background-size: auto 70%, cover;
border-radius: 5px;
background-repeat: no-repeat;
background-position: right 7% center, top left;
background-color: var(--background);
}

.credits-php .about__header {
background-image: url('../images/about-header-credits.svg?ver=6.4');
background-image: url('../images/about-header-credits.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
}

.freedoms-php .about__header {
background-image: url('../images/about-header-freedoms.svg?ver=6.4');
background-image: url('../images/about-header-freedoms.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
}

.privacy-php .about__header {
background-image: url('../images/about-header-privacy.svg?ver=6.4');
background-image: url('../images/about-header-privacy.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
}

.contribute-php .about__header {
background-image: url('../images/about-header-contribute.svg?ver=6.4');
background-image: url('../images/about-header-contribute.svg?ver=6.4'), url('../images/about-header-background.svg?ver=6.4');
}

.about__header-image {
Expand All @@ -568,8 +570,9 @@

.about__header-title {
box-sizing: border-box;
margin: 0 calc(var(--gap) + 3rem);
margin: 0 calc(var(--gap) + 2rem);
padding: 0;
max-width: 55%;
}

.about__header-title h1 {
Expand All @@ -581,6 +584,7 @@
font-weight: 600;
}

.about-php .about__header-title h1,
.credits-php .about__header-title h1,
.freedoms-php .about__header-title h1,
.privacy-php .about__header-title h1,
Expand Down Expand Up @@ -645,11 +649,8 @@
}

@media screen and (max-width: 960px) {
.about__header-title h1 {
/* Fluid font size scales on browser size 600px - 960px. */
font-size: clamp(3rem, 13.33vw - 2rem, 6rem);
}

.about-php .about__header-title h1,
.credits-php .about__header-title h1,
.freedoms-php .about__header-title h1,
.privacy-php .about__header-title h1,
Expand Down

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aa2cae4

Please sign in to comment.