@@ -122,43 +122,59 @@ tasks.dokkaHtmlMultiModule {
122
122
fun createDocsIndexPage (): String {
123
123
return createHTML().html {
124
124
head {
125
+ link(href = " ./$version /styles/style.css" , rel = " Stylesheet" )
126
+ title(" modelix.core API Reference" )
125
127
style {
126
- + """
127
- body {
128
- font-family: sans-serif;
129
- }
130
-
131
- ul {
132
- list-style-type: none;
133
- }
134
- .wrapper {
135
- margin: auto;
136
- width: 50%;
137
- border: 1px solid;
138
- border-radius: 15px;
139
- padding: 20px;
140
- text-align: center;
128
+ unsafe {
129
+ + """
130
+ .library-name {
131
+ padding-top: 6px;
132
+ padding-bottom: 6px;
133
+ }
134
+ """ .trimIndent()
141
135
}
142
- """ .trimIndent()
143
136
}
144
137
}
145
138
body {
146
- header {
147
- h1 { + " Modelix Core API Reference" }
139
+ div(" navigation-wrapper" ) {
140
+ id = " navigation-wrapper"
141
+ div(" library-name" ) {
142
+ a { + " modelix.core API Reference" }
143
+ }
148
144
}
149
145
div(" wrapper" ) {
150
-
151
- ul {
152
- val versionDirs = docsDir.listFiles()
153
- ?.filter { it.isDirectory }
154
- ?.sortedByDescending { it.name }
155
- ? : return @ul
156
- for (versionDir in versionDirs) {
157
- val versionIndex = versionDir.resolve(" index.html" )
158
- if (versionIndex.exists()) {
159
- li {
160
- a(href = versionIndex.relativeTo(docsDir).path) {
161
- + " modelix.core ${versionDir.name} "
146
+ id = " container"
147
+ div {
148
+ id = " leftColumn"
149
+ }
150
+ div {
151
+ id = " main"
152
+ div(" main-content" ) {
153
+ id = " content"
154
+ div(" breadcrumbs" )
155
+ div(" cover" ) {
156
+ h2 { + " Available versions:" }
157
+ div(" table" ) {
158
+ val versionDirs = docsDir.listFiles()
159
+ ?.filter { it.isDirectory }
160
+ ?.sortedByDescending { it.name }
161
+ if (versionDirs != null ) {
162
+ for (versionDir in versionDirs) {
163
+ val versionIndex = versionDir.resolve(" index.html" )
164
+ if (versionIndex.exists()) {
165
+ div(" table-row" ) {
166
+ div(" main-subrow" ) {
167
+ div(" w-100" ) {
168
+ span(" inline-flex" ) {
169
+ a( href = versionIndex.relativeTo(docsDir).path) {
170
+ + " modelix.core ${versionDir.name} "
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
162
178
}
163
179
}
164
180
}
0 commit comments