Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dokka-customFormat-example to use up-to-date logo styles (#2608)
- Loading branch information
1 parent
19eaf4c
commit ad1d480
Showing
3 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Dokka custom format example | ||
|
||
This example demonstrates a few things: | ||
|
||
1. How to override css styles and add custom images. | ||
2. How to change logo used in the header. | ||
3. How to register a custom `Dokka` task with its own independent configuration. | ||
|
||
### Running | ||
|
||
`dokkaCustomFormat` task has been created in the buildscript of this example project with a few configuration changes. | ||
|
||
In order to see the full effect of these changes, run `dokkaCustomFormat` task from your IDE or execute | ||
the following command: | ||
|
||
```bash | ||
./gradlew clean dokkaCustomFormat | ||
``` | ||
|
||
--- | ||
|
||
If you run any other `Dokka` task, such as `dokkaHtml`, you'll see vanilla `Dokka` without any alterations. | ||
This is because changes to configuration are applied only within `dokkaCustomFormat` task. This can be useful | ||
if you want to generate multiple versions of documentation with different configuration settings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 18 additions & 4 deletions
22
examples/gradle/dokka-customFormat-example/logo-styles.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
#logo { | ||
/* | ||
* All Margins and sizes are custom for the ktor-logo.png file. | ||
* You may need to modify it and find what works best for your case. | ||
*/ | ||
.library-name a { | ||
position: relative; | ||
margin-left: 55px; | ||
} | ||
|
||
.library-name a::before { | ||
content: ''; | ||
background-image: url('../images/ktor-logo.png'); | ||
background-repeat: no-repeat; | ||
background-size: 125px 50px; | ||
padding-top: 12px; | ||
height: 65px; | ||
} | ||
position: absolute; | ||
width: 52px; | ||
height: 50px; | ||
top: -18px; | ||
left: -62px; | ||
} |