Skip to content

Commit 946aa1c

Browse files
committed
restore CSS config
1 parent 9a4964e commit 946aa1c

File tree

1 file changed

+115
-4
lines changed

1 file changed

+115
-4
lines changed

articles/api-management/developer-portal-wordpress-plugin.md

Lines changed: 115 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.author: danlep
1616

1717
This article shows how to configure an open-source developer portal plugin (preview) to customize the API Management developer portal on WordPress. With the plugin, turn any WordPress site into a developer portal. Take advantage of site capabilities in WordPress to customize and add features to your developer portal including localization, collapsible and expandable menus, custom stylesheets, file downloads, and more.
1818

19-
Follow the steps in this article to create a WordPress site on Azure App Service and configure the developer portal plugin on the WordPress site. Microsoft Entra ID is configured for authentication to the WordPress site and the developer portal.
19+
In this article, you create a WordPress site on Azure App Service and configure the developer portal plugin on the WordPress site. Microsoft Entra ID is configured for authentication to the WordPress site and the developer portal.
2020

2121
## Prerequisites
2222

@@ -140,10 +140,121 @@ Configure the same Microsoft Entra app registration as an identity provider for
140140
1. In the left menu, select **Azure API Management Developer Portal**.
141141
1. On the **APIM Settings** page, enter the following settings and select **Save Changes**:
142142
* **APIM service name** - Name of your API Management instance
143-
* Settings to enable **Create default pages** and **Create navigation menu**
143+
* Enable **Create default pages** and **Create navigation menu**
144+
145+
## Step 8: Add a custom stylesheet
146+
147+
Add a custom stylesheet for the API Management developer portal.
148+
149+
1. In the WordPress admin site, in the left menu, select **Appearance** > **Themes**.
150+
1. Select **Customize** and then navigate to **Styles**.
151+
1. Select the pencil icon (**Edit Styles**).
152+
1. In the **Styles pane**, select **More** (three dots) > **Additional CSS**.
153+
1. In **Additional CSS**, enter the following CSS:
154+
155+
```css
156+
.apim-table {
157+
width: 100%;
158+
border: 1px solid #D1D1D1;
159+
border-radius: 4px;
160+
border-spacing: 0;
161+
}
162+
163+
.apim-table th {
164+
background: #E6E6E6;
165+
font-weight: bold;
166+
text-align: left;
167+
}
168+
169+
.apim-table th,
170+
.apim-table td {
171+
padding: .7em 1em;
172+
}
173+
174+
.apim-table td {
175+
border-top: #E6E6E6 solid 1px;
176+
}
177+
178+
.apim-input,
179+
.apim-button,
180+
.apim-nav-link-btn {
181+
border-radius: .33rem;
182+
padding: 0.6rem 1rem;
183+
}
184+
185+
.apim-button,
186+
.apim-nav-link-btn {
187+
background-color: var(--wp--preset--color--contrast);
188+
border-color: var(--wp--preset--color--contrast);
189+
border-width: 0;
190+
color: var(--wp--preset--color--base);
191+
font-size: var(--wp--preset--font-size--small);
192+
font-weight: 500;
193+
text-decoration: none;
194+
cursor: pointer;
195+
transition: all .25s ease;
196+
}
197+
198+
.apim-nav-link-btn:hover {
199+
background: var(--wp--preset--color--base);
200+
color: var(--wp--preset--color--contrast);
201+
}
202+
203+
.apim-button:hover {
204+
background: var(--wp--preset--color--vivid-cyan-blue);
205+
}
206+
207+
.apim-button:disabled {
208+
background: var(--wp--preset--color--contrast-2);
209+
cursor: not-allowed;
210+
}
211+
212+
.apim-label {
213+
display: block;
214+
margin-bottom: 0.5rem;
215+
}
216+
217+
.apim-input {
218+
border: solid 1px var(--wp--preset--color--contrast);
219+
}
220+
221+
.apim-grid {
222+
display: grid;
223+
grid-template-columns: 11em max-content;
224+
}
225+
226+
.apim-link,
227+
.apim-nav-link {
228+
text-align: inherit;
229+
font-size: inherit;
230+
padding: 0;
231+
background: none;
232+
border: none;
233+
font-weight: inherit;
234+
cursor: pointer;
235+
text-decoration: none;
236+
color: var(--wp--preset--color--vivid-cyan-blue);
237+
}
238+
239+
.apim-nav-link {
240+
font-weight: 500;
241+
}
242+
243+
.apim-link:hover,
244+
.apim-nav-link:hover {
245+
text-decoration: underline;
246+
}
247+
248+
#apim-signIn {
249+
display: flex;
250+
align-items: center;
251+
gap: 24px;
252+
}
253+
```
254+
1. **Save** the changes. Select **Save** again to save the changes to the theme.
144255
1. **Log Out** of the WordPress admin site.
145256

146-
## Step 8: Add the WordPress site to the list of origins for the developer portal
257+
## Step 9: Add the WordPress site to the list of origins for the developer portal
147258

148259
Update the settings of the developer portal in the API Management instance to include the WordPress site as a portal origin.
149260

@@ -152,7 +263,7 @@ Update the settings of the developer portal in the API Management instance to in
152263
1. On the **Self-hosted portal configuration** tab, enter the hostname of your WordPress on App Service site as a portal origin, substituting the name of your app service in the following URL: `https://<yourapp-service-name>.azurewebsites.net`
153264
1. [Republish the developer portal](developer-portal-overview.md#publish-the-portal) to apply the changes.
154265

155-
## Step 9: Sign into the API Management developer portal deployed on WordPress
266+
## Step 10: Sign into the API Management developer portal deployed on WordPress
156267

157268
Sign into the WordPress site to see your new API Management developer portal deployed on WordPress and hosted on App Service.
158269

0 commit comments

Comments
 (0)