Skip to content

Commit f3e36e3

Browse files
authored
Fixed css to ensure version switcher dropdown is solid (#227)
* Fixed css to ensure version switcher dropdown is solid * Fixed css to ensure version switcher dropdown is solid * Removed test branch from GH action, improved authentication step, added cleanup step
1 parent 542ef3a commit f3e36e3

3 files changed

Lines changed: 32 additions & 18 deletions

File tree

.github/workflows/main.yaml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Percona Operator for PostgreSQL docs
1+
name: Build Percona Operator for MySQL docs
22
on:
33
push:
44
branches:
@@ -22,25 +22,13 @@ jobs:
2222
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
2323
with:
2424
python-version: '3.x'
25-
26-
#Configure git
27-
- name: Configure git
28-
env:
29-
ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }}
30-
run: |
31-
git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com"
32-
git config user.name "GitHub Action"
33-
git config user.email "github-action@users.noreply.github.com"
34-
git config user.password "${ROBOT_TOKEN}"
35-
echo "GIT_USER=percona-platform-robot:${ROBOT_TOKEN}" >> $GITHUB_ENV
36-
3725

3826
#Extract release from YAML
3927
- name: Extract release from variables
4028
run: |
41-
RELEASE=$(grep '^release:' variables.yml | awk '{print $2}' )
29+
RELEASE=$(grep '^release:' variables.yml | awk '{print $2}' | tr -d "'")
4230
echo "RELEASE=$RELEASE" >> $GITHUB_ENV
43-
# PRUNED_VERSION=$(grep '^pruned_version:' variables.yml | awk '{print $2}' )
31+
# PRUNED_VERSION=$(grep '^pruned_version:' variables.yml | awk '{print $2}' | tr -d "'")
4432
# echo "PRUNED_VERSION"=$"PRUNED_VERSION" >> $GITHUB_ENV
4533

4634

@@ -51,7 +39,16 @@ jobs:
5139
pip install wheel
5240
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
5341
54-
42+
# Configure git auth right before it's needed, scoped to this checkout only,
43+
# so the credential isn't live on disk for the earlier setup steps.
44+
- name: Configure git
45+
env:
46+
ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }}
47+
run: |
48+
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $(printf '%s' "x-access-token:${ROBOT_TOKEN}" | base64 -w0)"
49+
git config user.name "GitHub Action"
50+
git config user.email "github-action@users.noreply.github.com"
51+
5552
# Deploy docs
5653
- name: Deploy docs
5754
env:
@@ -60,4 +57,9 @@ jobs:
6057
mike deploy $RELEASE -u latest -b publish -p
6158
mike set-default latest -b publish -p
6259
# mike delete $PRUNED_VERSION -b publish -p
60+
61+
# Drop the credential as soon as it's no longer needed
62+
- name: Clear git credentials
63+
if: always()
64+
run: git config --local --unset-all http.https://github.com/.extraheader || true
6365

docs/css/design.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,13 @@
217217
.md-tabs__link {
218218
margin-top: 0.55rem;
219219
}
220-
.md-header__topic {
220+
/* Fade only the site/page title text. Do not set opacity on
221+
.md-header__topic itself — Material mounts .md-version inside it,
222+
and parent opacity makes the version dropdown translucent. */
223+
.md-header__topic > .md-ellipsis {
221224
transition: opacity .25s;
222225
}
223-
.md-header__topic:hover {
226+
.md-header__topic:hover > .md-ellipsis {
224227
opacity: 0.7;
225228
}
226229

docs/css/extra.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,12 @@
8080
.md-banner * {
8181
font-family: "Poppins", sans-serif !important;
8282
}
83+
84+
/* Version switcher: keep dropdown surface solid in light/dark.
85+
Material already sets background-color; reinforce it here so
86+
custom header styles cannot wash it out. Parent .md-header__topic
87+
must not use opacity (see design.css) or this still looks translucent. */
88+
.md-version__list {
89+
background-color: var(--md-default-bg-color);
90+
color: var(--md-typeset-color);
91+
}

0 commit comments

Comments
 (0)