Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add malva to dprint #385

Merged
merged 22 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a6c6994
ci: add malva to dprint
sujuka99 Nov 3, 2023
ea9341c
ci: add toml formatter
sujuka99 Nov 3, 2023
a86375f
fix(ci): Add toml extension to dprint
sujuka99 Nov 8, 2023
f5052ef
fix(ci): add css extensions to dprint
sujuka99 Nov 8, 2023
adb1663
Replace black with ruff (#365)
sujuka99 Nov 6, 2023
72594f9
Replace black with ruff (#365)
sujuka99 Nov 6, 2023
a70bbb2
chore: format
sujuka99 Nov 8, 2023
140270d
chore: run formatter
sujuka99 Nov 8, 2023
2ed1331
Replace black with ruff (#365)
sujuka99 Nov 6, 2023
50a1313
Merge remote-tracking branch 'origin/main' into ci/add-malva
sujuka99 Nov 8, 2023
1738338
Merge remote-tracking branch 'origin/main' into ci/add-toml-formatter
sujuka99 Nov 8, 2023
0b05537
ci: rename dprint step
sujuka99 Nov 8, 2023
60b7d2b
Merge remote-tracking branch 'origin/ci/add-toml-formatter' into ci/a…
sujuka99 Nov 8, 2023
df41bb5
chore: format css
sujuka99 Nov 8, 2023
e41789f
Update .github/workflows/ci.yaml
sujuka99 Nov 20, 2023
4737660
Merge remote-tracking branch 'origin/ci/add-toml-formatter' into ci/a…
sujuka99 Nov 22, 2023
eaf3606
style: change step name in ci
sujuka99 Nov 22, 2023
fe7c6bb
docs: document CSS formatter in dev docs
sujuka99 Nov 22, 2023
e39c382
docs: document toml formatter
sujuka99 Nov 22, 2023
1fc9cc4
Merge remote-tracking branch 'origin/ci/add-toml-formatter' into ci/a…
sujuka99 Nov 22, 2023
dccd506
chore: remove unnecessary inclusions
sujuka99 Nov 22, 2023
7ac55b0
Merge remote-tracking branch 'origin/main' into ci/add-malva
sujuka99 Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Install docs dependencies
run: poetry install --with docs

- name: Check markdown, toml formatting
- name: Check markdown, toml, css formatting
uses: dprint/[email protected]
if: runner.os == 'Linux'

Expand Down
4 changes: 4 additions & 0 deletions docs/docs/developer/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Our configuration can be found in [KPOps](https://github.com/bakdata/kpops)' top

To ensure a consistent markdown style, we use [dprint](https://dprint.dev)'s [Markdown code formatter](https://dprint.dev/plugins/markdown/). Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json).

### CSS

To ensure a consistent CSS style, we use the [malva](https://github.com/g-plane/malva) [dprint](https://dprint.dev)'s plugin. Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json).

### TOML

To ensure a consistent TOML style, we use [dprint](https://dprint.dev)'s [TOML code formatter](https://dprint.dev/plugins/toml/). Our configuration can be found [here](https://github.com/bakdata/kpops/blob/main/dprint.json).
68 changes: 46 additions & 22 deletions docs/docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -1,41 +1,65 @@
:root > * {
/* The primary color of KPOps docs */
--md-primary-fg-color: #a599ff;
/* The primary color of KPOps docs */
--md-primary-fg-color: #a599ff;

/* The second color of KPOps docs */
--md-accent-fg-color: #B0A5FF;
/* The second color of KPOps docs */
--md-accent-fg-color: #b0a5ff;

/* Create custom color variable to use for the buttons */
--kpops-button-color: #7068AD;
/* Create custom color variable to use for the buttons */
--kpops-button-color: #7068ad;

/* The footer color needs to be set sparately */
--md-footer-bg-color: var(--md-primary-fg-color);
/* The footer color needs to be set sparately */
--md-footer-bg-color: var(--md-primary-fg-color);

/* Color the links with the primary color */
--md-typeset-a-color: var(--md-primary-fg-color);
/* Color the links with the primary color */
--md-typeset-a-color: var(--md-primary-fg-color);

--md-admonition-icon--wip: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m13.78 15.3 6 6 2.11-2.16-6-6-2.11 2.16m3.72-5.2c-.39 0-.81-.05-1.14-.19L4.97 21.25l-2.11-2.11 7.41-7.4L8.5 9.96l-.72.7-1.45-1.41v2.86l-.7.7-3.52-3.56.7-.7h2.81l-1.4-1.41 3.56-3.56a2.976 2.976 0 0 1 4.22 0L9.89 5.74l1.41 1.4-.71.71 1.79 1.78 1.82-1.88c-.14-.33-.2-.75-.2-1.12a3.49 3.49 0 0 1 3.5-3.52c.59 0 1.11.14 1.58.42L16.41 6.2l1.5 1.5 2.67-2.67c.28.47.42.97.42 1.6 0 1.92-1.55 3.47-3.5 3.47Z"/></svg>')
--md-admonition-icon--wip: url("data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m13.78 15.3 6 6 2.11-2.16-6-6-2.11 2.16m3.72-5.2c-.39 0-.81-.05-1.14-.19L4.97 21.25l-2.11-2.11 7.41-7.4L8.5 9.96l-.72.7-1.45-1.41v2.86l-.7.7-3.52-3.56.7-.7h2.81l-1.4-1.41 3.56-3.56a2.976 2.976 0 0 1 4.22 0L9.89 5.74l1.41 1.4-.71.71 1.79 1.78 1.82-1.88c-.14-.33-.2-.75-.2-1.12a3.49 3.49 0 0 1 3.5-3.52c.59 0 1.11.14 1.58.42L16.41 6.2l1.5 1.5 2.67-2.67c.28.47.42.97.42 1.6 0 1.92-1.55 3.47-3.5 3.47Z\"/></svg>");
}

.md-typeset .md-button, .md-button--primary {
background-color: var(--kpops-button-color);
background-color: var(--kpops-button-color);
}

.md-typeset .md-button:hover, .md-button--primary:hover {
border-color: white;
border-color: white;
}

.md-typeset .admonition.wip,
.md-typeset details.wip {
border-color: rgb(160, 45, 0);
.md-typeset .admonition.wip, .md-typeset details.wip {
border-color: rgb(160, 45, 0);
}
.md-typeset .wip > .admonition-title,
.md-typeset .wip > summary {
background-color: rgb(255, 195, 172);
.md-typeset .wip > .admonition-title, .md-typeset .wip > summary {
background-color: rgb(255, 195, 172);
}
.md-typeset .wip > .admonition-title::before,
.md-typeset .wip > summary::before {
background-color: rgb(255, 77, 6);
-webkit-mask-image: var(--md-admonition-icon--wip);
mask-image: var(--md-admonition-icon--wip);
background-color: rgb(255, 77, 6);
-webkit-mask-image: var(--md-admonition-icon--wip);
mask-image: var(--md-admonition-icon--wip);
}

.md-typeset .admonition.wip, .md-typeset details.wip {
border-color: rgb(160, 45, 0);
}
.md-typeset .wip > .admonition-title, .md-typeset .wip > summary {
background-color: rgb(255, 195, 172);
}
.md-typeset .wip > .admonition-title::before,
.md-typeset .wip > summary::before {
background-color: rgb(255, 77, 6);
-webkit-mask-image: var(--md-admonition-icon--wip);
mask-image: var(--md-admonition-icon--wip);
}

.md-typeset .admonition.wip, .md-typeset details.wip {
border-color: rgb(160, 45, 0);
}
.md-typeset .wip > .admonition-title, .md-typeset .wip > summary {
background-color: rgb(255, 195, 172);
}
.md-typeset .wip > .admonition-title::before,
.md-typeset .wip > summary::before {
background-color: rgb(255, 77, 6);
-webkit-mask-image: var(--md-admonition-icon--wip);
mask-image: var(--md-admonition-icon--wip);
}
7 changes: 5 additions & 2 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"incremental": true,
"markdown": {},
"toml": {},
"malva": {},
"includes": [
"**/*.{md}",
"**/*.{toml}"
"**/*.{toml}",
"**/*.{css}"
],
"excludes": [
".pytest_cache/**",
Expand All @@ -18,6 +20,7 @@
],
"plugins": [
"https://plugins.dprint.dev/markdown-0.16.0.wasm",
"https://plugins.dprint.dev/toml-0.5.4.wasm"
"https://plugins.dprint.dev/toml-0.5.4.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.1.2.wasm"
]
}