Skip to content
This repository was archived by the owner on May 19, 2022. It is now read-only.

Navbar Component and Generic Components #47

Draft
wants to merge 46 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
31abb3d
nicer looking example grid boxes
bjoernmayer Nov 9, 2020
5e22878
- start working on Navbar
bjoernmayer Nov 10, 2020
30f4ae3
migrate mark, muted and small to domwrap
bjoernmayer Nov 10, 2020
aa66919
- Change alert headings into new component
bjoernmayer Nov 10, 2020
9f187b2
change navLink into domWrap
bjoernmayer Nov 10, 2020
995ce45
nicer requirement check for props
bjoernmayer Nov 10, 2020
f95d99f
renaming
bjoernmayer Nov 10, 2020
ab586d9
introduce domComponent and AbstractDomComponent
bjoernmayer Nov 10, 2020
4c7a100
renamings and preps to switch some components from abstractDom to dom
bjoernmayer Nov 10, 2020
109b8a7
domComponent now extends Bootstrap components
bjoernmayer Nov 10, 2020
3a359db
change navLink and alert link to DomComponent instead of AbstractDomC…
bjoernmayer Nov 10, 2020
6187892
introduce builders for dom components to make it easier to set both k…
bjoernmayer Nov 11, 2020
095a614
change container to abstract dom component
bjoernmayer Nov 11, 2020
7e9620e
change col to AbstractDomComponent
bjoernmayer Nov 11, 2020
df58051
changed row to DomComponent and adjusted grid references
bjoernmayer Nov 11, 2020
e096070
add handlers to alert builders
bjoernmayer Nov 11, 2020
3bc1102
allow overriding render, lint
bjoernmayer Nov 12, 2020
1e10be1
- change closingElement into AbstractDomComponent
bjoernmayer Nov 12, 2020
c082202
remove identifiable
bjoernmayer Nov 12, 2020
8b10f36
fix type of activeLinkPredicate
bjoernmayer Nov 12, 2020
d3a200f
- reduce "handler" to just propHandler because anything other makes n…
bjoernmayer Nov 12, 2020
c8f9ac1
minor adjustments in prep for SuperAbstract
bjoernmayer Nov 12, 2020
bd1e6e5
- rename DomComponent to SimpleDomComponent
bjoernmayer Nov 13, 2020
c381d98
- split up Button and change its parts to SimpleDomComponent
bjoernmayer Nov 16, 2020
036428d
- fix onChange loop for buttons
bjoernmayer Nov 16, 2020
ecdf206
change ButtonGroup to AbstractDomComponent
bjoernmayer Nov 16, 2020
f491d54
change ButtonToolbar to AbstractDomComponent and remove unused WithAr…
bjoernmayer Nov 16, 2020
666ef68
change NavComponent and NavItem to DomComponent
bjoernmayer Nov 17, 2020
7cfd361
- fun interfaces for DOMHandler and PropHandler
bjoernmayer Nov 17, 2020
9c737b1
change Display into AbstractDomComponent and delete unused AbstractCo…
bjoernmayer Nov 17, 2020
96acf9d
change Lead, Close and BlockQuoteFooter to Simple or AbstractComponents
bjoernmayer Nov 17, 2020
b394d77
change navbar to DomComponent and clean up
bjoernmayer Nov 17, 2020
4c5cd73
fix headline styling and optimise (when) usage
bjoernmayer Nov 18, 2020
9273311
two codeExample fixes, display heading now use the same font as the o…
bjoernmayer Nov 18, 2020
e9d83d0
change react dependency to implementation instead of `api` for kotlin…
bjoernmayer Nov 18, 2020
1c40bbb
move theme and expand into navbar and some other minor optimisations
bjoernmayer Nov 19, 2020
4441e24
order builder arguments, classes helper
bjoernmayer Nov 19, 2020
97e221b
cleanup
bjoernmayer Nov 19, 2020
7cbc5e1
lint
bjoernmayer Nov 19, 2020
1283c51
fixes
bjoernmayer Nov 19, 2020
79a6a1f
remove original bootstrap doc css
bjoernmayer Nov 20, 2020
2e2fa65
proper abstraction for Nav to share code between Navigation and Navba…
bjoernmayer Nov 21, 2020
8c99ea6
start with collapse
bjoernmayer Nov 24, 2020
17702b6
Kotlin 1.4.20, jetbrains fixed explicit mode
bjoernmayer Nov 25, 2020
ba55bbe
wrapper update
bjoernmayer Nov 25, 2020
66c2507
new kotlin doc style
bjoernmayer Dec 22, 2020
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
23 changes: 10 additions & 13 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4
trim_trailing_whitespace = true

[*.{kt,kts}]
disabled_rules = import-ordering
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
trim_trailing_whitespace = false

[{*.md,*.neon,*.yaml,*.yml,*.tf}]
indent_size = 2
indent_size = 2
Binary file modified .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.jlleitschuh.gradle.ktlint.BaseKtlintCheckTask
import org.jlleitschuh.gradle.ktlint.KtlintApplyToIdeaTask
import org.jlleitschuh.gradle.ktlint.KtlintCheckTask
import org.jlleitschuh.gradle.ktlint.KtlintFormatTask
import org.jlleitschuh.gradle.ktlint.KtlintInstallGitHookTask
import org.jlleitschuh.gradle.ktlint.KtlintPlugin

plugins {
Expand All @@ -13,6 +14,7 @@ plugins {
kotlin("js") apply false

id("org.jlleitschuh.gradle.ktlint")
id("com.github.gmazzo.buildconfig").version("2.0.2")
}

allprojects {
Expand Down Expand Up @@ -63,7 +65,7 @@ subprojects {
KtlintCheckTask::class,
KtlintApplyToIdeaTask::class,
KtlintFormatTask::class,
org.jlleitschuh.gradle.ktlint.KtlintInstallGitHookTask::class
KtlintInstallGitHookTask::class
)
)

Expand Down
8 changes: 0 additions & 8 deletions docs/docs.min.css

This file was deleted.

Binary file modified docs/favicon.ico
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"-->
<!-- integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">-->
<link rel="shortcut icon" href="/kotlin-react-bootstrap/favicon.ico">
<title>Kotlin React Bootstrap</title>
</head>
Expand All @@ -26,9 +26,9 @@
// When the single page app is loaded further down in this file,
// the correct url will be waiting in the browser's history for
// the single page app to route accordingly.
(function(l) {
if (l.search[1] === '/' ) {
var decoded = l.search.slice(1).split('&').map(function(s) {
(function (l) {
if (l.search[1] === '/') {
var decoded = l.search.slice(1).split('&').map(function (s) {
return s.replace(/~and~/g, '&')
}).join('?');
window.history.replaceState(null, null,
Expand Down
Binary file modified docs/logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 10 additions & 9 deletions docs/site.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/site.js.map

Large diffs are not rendered by default.

153 changes: 116 additions & 37 deletions docs/style.css
Original file line number Diff line number Diff line change
@@ -1,85 +1,164 @@
@import url(https://fonts.googleapis.com/css?family=Inter:400,700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,500,700);
@import url(https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css);

body {
font-family: "Open Sans", Helvetica, Arial, sans-serif
}

header.krbd {
background-color: #26292c;
padding-top: .75rem;
padding-bottom: .75rem;
border-bottom: 1px solid rgba(255, 255, 255, .2);
}

body {
font-family: "Open Sans", sans-serif;
header.krbd .navbar-brand {
font-weight: bold;
}

h1, h2, h3, h4, h5 {
font-family: Inter, Arial, sans-serif;
header.krbd .navbar-brand img {
height: 1em;
}

.btn-bd-primary {
background-color: #6a6ffc;
color: white;
border: none
header.krbd .navbar-brand .small {
vertical-align: top;
font-size: 60%
}

.btn-bd-primary:hover {
background-color: #878bfc
header.krbd a {
color: rgba(255,255,255,.75)
}

.bd-navbar {
background-color: #27282c;
box-shadow: none;
header.krbd a:hover, header.krbd a.active {
color: white
}

.bd-example {
padding: 1.5rem;
margin-top: 1rem;
border: .2rem solid #f8f9fa;
.krbd-nav > .nav-item > .nav-link:hover, .krbd-nav > .nav-item > .nav-link.active {
/*background-color: #f2f2f2;*/
}

.bd-navbar .navbar-nav .nav-link {
color: rgba(255, 255, 255, .5)
.krbd-nav > .nav-item > .nav-link.active + .nav {
/*background-color: #f9f9f9;*/
}

.bd-navbar .navbar-nav .nav-link.active {
.krbd-nav > .nav-item > .nav-link:before {
content: '▶';
font-size: x-small;
vertical-align: middle;
margin-right: .5rem;
display: inline-block;
}

.krbd-nav > .nav-item > .nav .nav-link:before {
content: '-';
margin-right: .5rem;
font-weight: normal;
}

.bd-masthead {
background-color: #27282c;
.krbd-nav > .nav-item > .nav-link.active:before {
transform: rotate(45deg);
}

.krbd-nav a, .krbd-nav a:hover {
color: #497bb7;
text-decoration: none;
}

.krbd-nav a:hover {
color: #f47810;
}

.krbd-nav a.active {
color: #333;
font-weight: bold;
}

.krbd-nav, .krbd-side-nav {
top: 5.5rem;
height: calc(100vh - 5rem);
overflow-y: auto
}

.krbd-side-nav a {
color: #27282c;
}

.krbd-side-nav a:hover {
color: #585def
}

/* Home */
.jumbotron.krbd {
background-color: #26292c;
color: #f4f4f4;
}

.jumbotron.krbd .btn-primary {
background-color: #7f52ff;
border: none
}

.jumbotron.krbd .btn-primary:hover {
background-color: rgba(125, 69, 250, .8);
}

.jumbotron.krbd h1, .jumbotron.krbd .btn {
font-family: Inter, Arial, sans-serif;
}

.jumbotron.krbd .btn-outline-secondary {
border-color: rgba(255, 255, 255, .3);
color: white;
margin-left: -15px;
margin-right: -15px;
}

.bd-masthead .btn {
font-weight: normal;
.jumbotron.krbd .btn-outline-secondary:hover {
border-color: rgba(255, 255, 255, .6);
background: rgba(255, 255, 255, .05);
}

.home-logo {
max-height: 430px;
}

code {
color: #f8863c
color: #0000c0;
}

.bd-title {
font-weight: 700
a {
color: #497bb7;
}

.bd-content-title {
font-weight: bold;
a:hover {
color: #f47810;
}

main p > a {
text-decoration: underline;
}

/* Docs */
.krbd-example a {
text-decoration: none !important;
}

a, a:hover {
color: #6b70fc
.krbd-example-row .row > .col, .krbd-example-row .row > [class^=col-] {
background-color: rgba(245, 136, 15, .47);
border: 1px solid rgba(0, 0, 0, .29);
padding-top: .75rem;
padding-bottom: .75rem;
}

figure.highlight {
background: none rgb(253, 253, 253);
.krbd-example-row-flex-cols .row {
min-height: 10rem;
background-color: rgba(245, 136, 15, .47);
}

figure.highlight > pre {
figure.krbd > pre {
overflow-x: auto !important;
}

figure.highlight > pre:before {
figure.krbd > pre:before {
background-color: #eee;
bottom: 0;
content: ' ';
Expand Down
9 changes: 4 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ org.gradle.kotlin.dsl.caching.buildcache=true
kotlin.incremental=true

# External dependencies
kotlin.version=1.4.10
kotlin.version=1.4.20

ktlint-gradle.version=9.4.1
ktlint.version=0.39.0

# Lib
kotlin-react.version=16.13.1-pre.124-kotlin-1.4.10
kotlin-react-dom.version=16.13.1-pre.124-kotlin-1.4.10
kotlin-react.version=17.0.0-pre.129-kotlin-1.4.20
kotlin-react-dom.version=17.0.0-pre.129-kotlin-1.4.20

# Site
kotlin-react-router-dom.version=5.1.2-pre.124-kotlin-1.4.10
kotlin-react-router-dom.version=5.2.0-pre.129-kotlin-1.4.20
file-loader.version=6.0.0
react-syntax-highlighter.version=12.2.1
markdown-to-jsx.version=6.11.4
karma.version=4.4.1
4 changes: 2 additions & 2 deletions kotlin-react-bootstrap/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
}

dependencies {
api(kotlinJsWrapper("react"))
api(kotlinJsWrapper("react-dom"))
implementation(kotlinJsWrapper("react"))
implementation(kotlinJsWrapper("react-dom"))

testImplementation(kotlin("test-js"))
}
Expand Down
Loading