Skip to content

Commit

Permalink
set max-width on images, make sure api namespace selector shows when …
Browse files Browse the repository at this point in the history
…it should

#163, #298
  • Loading branch information
TimHess committed Feb 15, 2024
1 parent 318d383 commit 66c0e86
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
if: ${{ github.event_name == 'pull_request' }}
run: az webapp deployment slot create --resource-group ${{ vars.AZURE_RESOURCE_GROUP }} --name ${{ vars.AZURE_WEBAPP_NAME}} --slot ${{ env.SLOT_NAME }} --configuration-source ${{ vars.STAGING_SLOT_NAME }}

# Need to pair a PR slot with a custom MainSite address?
# az webapp config appsettings set -g steeltoe --name docs-steeltoe --slot pr-310 --settings mainsite_host=https://www-steeltoe-pr-141.azurewebsites.net

- name: Deploy to staging slot
uses: azure/webapps-deploy@v3
id: deploy-to-webapp
Expand Down
4 changes: 4 additions & 0 deletions template/steeltoe/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ select.api-namespace option {
display: none;
}

img {
max-width: 100%;
}

/**** Mobile Nav & TOC Adjustments ****/

@media only screen and (max-width: 1200px) {
Expand Down
4 changes: 3 additions & 1 deletion template/steeltoe/styles/main1.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ function showApiBrowserElements() {
} else*/ if (isApiVersion3()) {
$("#api-v3").prop("checked", true);
$("#api-v3").parent().addClass('active');
$("#api-namespace-v3").removeClass('hide');
} else {
$("#api-v2").prop("checked", true);
$("#api-v2").parent().addClass('active');
$("#api-namespace-v2").removeClass('hide');
}
}

Expand Down Expand Up @@ -193,7 +195,7 @@ $(function() {
setTimeout(() => {
// move right-side nav under selected item (if found)
var activeMenuItem = $('.active.in .active.in .active');
if (activeMenuItem && $('#affix').children())
if (activeMenuItem && $('#affix').children().length > 0)
{
activeMenuItem.append($('#affix'));
}
Expand Down

0 comments on commit 66c0e86

Please sign in to comment.