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

update mobile view and some bugs #2836

Merged
merged 28 commits into from May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b402c5a
Fix dark theme bugs: mobile TOC is visible on 1px and has white backg…
zoobestik Jan 23, 2023
981ff54
Refactoring css styles for header controls
zoobestik Jan 26, 2023
14bb6c5
Change header responsive layout
zoobestik Jan 30, 2023
48148bd
Change header responsive layout
zoobestik Jan 30, 2023
e26ff2f
Fix scrollable columns for any header size
zoobestik Jan 30, 2023
118bc50
Remove main content mobile spacing
zoobestik Jan 30, 2023
3abb186
Change style for platform filters and labels
zoobestik Jan 30, 2023
a2596ca
Fix: add burger icon into dist
zoobestik Jan 31, 2023
cf26f74
Fix: long code token in mobile view
zoobestik Jan 31, 2023
c8e1c64
Fix: color in filter selector
zoobestik Jan 31, 2023
4e60b2b
Fix: long token in keyValue for desktop
zoobestik Jan 31, 2023
2d65dd8
Fix: add spacing for iPad Mini
zoobestik Jan 31, 2023
e79fd9f
Fix: dropdown for multiple versions
zoobestik Jan 31, 2023
72eb325
update platform brand colors
zoobestik Jan 31, 2023
d96b5dd
Fix: sample spacing, blockquote, playground initialize
zoobestik Feb 1, 2023
c494f31
Safari fix outline for platform tags
zoobestik Feb 1, 2023
8f146ec
Fix non-js main content for better SEO
zoobestik Feb 1, 2023
337dc63
Fix outline for safari browser
zoobestik Feb 1, 2023
5c48069
Add consistent vertical spacing for header. It should normalize subpi…
zoobestik Feb 1, 2023
9286444
Update manual for custom logo
zoobestik Feb 16, 2023
595c0af
Add comment for playground
zoobestik Feb 16, 2023
ef67c0f
Hide copy button for non-js user
zoobestik Feb 16, 2023
f67c4f0
fix; use google fonts
zoobestik May 15, 2023
926764f
feat; change style for platform in platform-tags
zoobestik May 15, 2023
7a42656
Revert Inter as defult font
zoobestik May 22, 2023
c18a6e4
Add breaks for CONSTANTS
zoobestik May 23, 2023
e186b7f
incorrect non-js script position
zoobestik May 23, 2023
ba0677f
less specific selector for article links
zoobestik May 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/topics/formats/dokka-html.md
Expand Up @@ -195,7 +195,6 @@ It's also possible to override Dokka's default stylesheets by providing files wi
| `style.css` | Main stylesheet, contains most of the styles used across all pages |
| `logo-styles.css` | Header logo styling |
| `prism.css` | Styles for [PrismJS](https://prismjs.com/) syntax highlighter |
| `jetbrains-mono.css` | Font styling |

The source code for all of Dokka's stylesheets is
[available on GitHub](https://github.com/Kotlin/dokka/tree/%dokkaVersion%/plugins/base/src/main/resources/dokka/styles).
Expand Down
28 changes: 14 additions & 14 deletions examples/gradle/dokka-customFormat-example/logo-styles.css
@@ -1,20 +1,20 @@
/*
* 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.
* You may need to override it and find what works best for your case.
*/
.library-name a {
position: relative;
margin-left: 55px;
:root {
--dokka-logo-image-url: url('../images/ktor-logo.png');
--dokka-logo-height: 125px;
--dokka-logo-width: 50px;
}

.library-name a::before {
content: '';
background-image: url('../images/ktor-logo.png');
background-repeat: no-repeat;
background-size: 125px 50px;
position: absolute;
width: 52px;
height: 50px;
top: -18px;
left: -62px;
/* link custom rules styles */
.library-name--link {
/* ... */
}

/* logo custom rules styles */
.library-name--link::before {
background-position: left;
width: 52px;
}
Empty file.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 23 additions & 13 deletions plugins/base/frontend/src/main/components/search/search.scss
@@ -1,24 +1,34 @@
$font-color: hsla(0, 0%, 100%, 0.8);
$secondary-font-color: hsla(0, 0%, 100%, 0.6);

.search {
button {
margin-top: 10px;

cursor: pointer;
#pages-search {
cursor: pointer;
border: none;
border-radius: 50%;
background: transparent;
fill: #fff;
fill: var(--dark-mode-and-search-icon-color);

&:focus {
outline: none;
}

border: none;
background: var(--color-dark);
fill: #fff;
fill: var(--dark-mode-and-search-icon-color);
&:hover {
background: var(--white-10);
}
}

&:focus {
outline: none;
}
.search {
&, [data-test="ring-select"], [data-test="ring-tooltip"], [data-test="ring-select_focus"], #pages-search {
display: inline-block;
padding: 0;
margin: 0;
font-size: 0;
line-height: 0;
}
}

.search-hotkey-popup{
.search-hotkey-popup {
background-color: var(--background-color) !important;
padding: 4px;
}
Expand Down
Expand Up @@ -75,7 +75,6 @@ class ScriptsInstaller(private val dokkaContext: DokkaContext) : PageTransformer
class StylesInstaller(private val dokkaContext: DokkaContext) : PageTransformer {
private val stylesPages = listOf(
"styles/style.css",
"styles/jetbrains-mono.css",
"styles/main.css",
"styles/prism.css",
"styles/logo-styles.css"
Expand All @@ -102,6 +101,7 @@ object AssetsInstaller : PageTransformer {
"images/copy-icon.svg",
"images/copy-successful-icon.svg",
"images/theme-toggle.svg",
"images/burger.svg",

// navigation icons
"images/nav-icons/abstract-class.svg",
Expand Down
5 changes: 5 additions & 0 deletions plugins/base/src/main/resources/dokka/images/burger.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions plugins/base/src/main/resources/dokka/images/theme-toggle.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -82,7 +82,7 @@ const samplesAreEnabled = () => {


const initHidingLeftNavigation = () => {
document.getElementById("leftToggler").onclick = function (event) {
document.getElementById("menu-toggle").onclick = function (event) {
//Events need to be prevented from bubbling since they will trigger next handler
event.preventDefault();
event.stopPropagation();
Expand Down Expand Up @@ -329,6 +329,16 @@ function refreshFiltering() {
refreshFilterButtons()
refreshPlatformTabs()
refreshNoContentNotification()
refreshPlaygroundSamples()
}

function refreshPlaygroundSamples() {
document.querySelectorAll('code.runnablesample').forEach(node => {
const playground = node.KotlinPlayground;
/* Some samples may be hidden by filter, they have 0px height for visible code area
* after rendering. Call this method for re-calculate code area height */
playground && playground.view.codemirror.refresh();
});
}

function refreshNoContentNotification() {
Expand Down
17 changes: 0 additions & 17 deletions plugins/base/src/main/resources/dokka/styles/jetbrains-mono.css

This file was deleted.

18 changes: 4 additions & 14 deletions plugins/base/src/main/resources/dokka/styles/logo-styles.css
@@ -1,15 +1,5 @@
.library-name a {
position: relative;
margin-left: 55px;
:root {
--dokka-logo-image-url: url('../images/logo-icon.svg');
--dokka-logo-height: 50px;
--dokka-logo-width: 50px;
}

.library-name a::before {
content: '';
background: url("../images/logo-icon.svg") center no-repeat;
background-size: contain;
position: absolute;
width: 50px;
height: 50px;
top: -18px;
left: -55px;
}