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

Make logo replaceable #1339 #1488

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Make logo replaceable #1339 #1488

merged 1 commit into from
Oct 7, 2020

Conversation

MarcinAman
Copy link
Contributor

@MarcinAman MarcinAman commented Sep 18, 2020

In order to change a logo you need to override a logo-styles.css file with your own and in this file add the background-image property on element id='logo' like this:

#logo {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/9/9d/Ubuntu_logo.svg');
}

This would result in your page looking like this:
image

As not all images are created equal you may want to make some css adjustments (padding, height, width etc) to make it look nice. You should do it in logo-styles.css file.

With this PR dokka allows to add custom styles (in customStyles) and resources (in customAssets). Styles file will be added to every page as embedded resource. Styles will be added to the styles directory and assets to images.

Sample configuration can look like this:

    customStyleSheets.set(listOf(file("customResources/logo-styles.css"), file("customResources/custom-style-to-add.css")))
    customAssets.set(listOf(file("customResources/custom-resource.svg")))

@MarcinAman MarcinAman linked an issue Sep 18, 2020 that may be closed by this pull request
Copy link
Contributor

@BarkingBad BarkingBad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should update user manual with info about extending custom styles and assets

Copy link
Contributor

@kamildoleglo kamildoleglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you forgot to update Maven configuration

core/src/main/kotlin/configuration.kt Outdated Show resolved Hide resolved
runners/cli/src/main/kotlin/cli/main.kt Outdated Show resolved Hide resolved
@MarcinAman MarcinAman force-pushed the 1339-replace-logo branch 4 times, most recently from b808eec to 1d7801a Compare September 29, 2020 15:38
@MarcinAman MarcinAman force-pushed the 1339-replace-logo branch 3 times, most recently from 2cf41e2 to aecd6a2 Compare October 5, 2020 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

K docs logo should be easily replaceable
3 participants