From 67bb749236336d8eff3cd2bc370ba1824a14e41d Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Tue, 15 Mar 2016 18:00:14 +0800 Subject: add menu and link code --- src/navigation.less | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/navigation.less (limited to 'src/navigation.less') diff --git a/src/navigation.less b/src/navigation.less new file mode 100644 index 0000000..8fbcc0f --- /dev/null +++ b/src/navigation.less @@ -0,0 +1 @@ +// Navigation -- cgit v1.3.1-26-gb76a From fd1bb05f2deffd1bd9a48963ef3917fe9f0ef090 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sat, 19 Mar 2016 18:46:16 +0800 Subject: add breadcrumb code --- demo/index.html | 24 ++++++++++++++++++++++++ dist/spectre.css | 22 ++++++++++++++++++++++ src/buttons.less | 4 ++++ src/navigation.less | 30 ++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+) (limited to 'src/navigation.less') diff --git a/demo/index.html b/demo/index.html index 04909b1..18c3d5c 100644 --- a/demo/index.html +++ b/demo/index.html @@ -329,6 +329,30 @@ + \ No newline at end of file diff --git a/dist/spectre.css b/dist/spectre.css index 884ce1c..98cd410 100644 --- a/dist/spectre.css +++ b/dist/spectre.css @@ -1123,6 +1123,28 @@ textarea.form-input { border-bottom: 1px solid #efefef; margin: .5rem; } +.breadcrumb { + list-style: none; + margin: .5rem 0; + padding: 1.2rem; +} +.breadcrumb li { + display: inline-block; + margin: 0; +} +.breadcrumb li a { + text-decoration: none; +} +.breadcrumb li:last-child, +.breadcrumb li:last-child a { + color: #666666; + pointer-events: none; +} +.breadcrumb li:not(:last-child)::after { + content: "/"; + padding: 0 .4rem; + color: #c5c5c5; +} .clearfix::after, .container::after, .columns::after { diff --git a/src/buttons.less b/src/buttons.less index e04aaa9..43e4e7d 100644 --- a/src/buttons.less +++ b/src/buttons.less @@ -166,6 +166,10 @@ button { } } + .btn-groups { + + } + // TODO: Button with icons // TODO: Button groups } \ No newline at end of file diff --git a/src/navigation.less b/src/navigation.less index 8fbcc0f..2e94d30 100644 --- a/src/navigation.less +++ b/src/navigation.less @@ -1 +1,31 @@ // Navigation +.breadcrumb { + list-style: none; + margin: .5rem 0; + padding: 1.2rem; + + li { + display: inline-block; + margin: 0; + + a { + text-decoration: none; + } + + &:last-child { + &, + a { + color: lighten(@body-font-color, 20%); + pointer-events: none; + } + } + + &:not(:last-child) { + &::after { + content: "/"; + padding: 0 .4rem; + color: @control-color; + } + } + } +} -- cgit v1.3.1-26-gb76a From f5e4332cd625b24d0737f15a92597fa6120a988d Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Mon, 28 Mar 2016 19:10:32 +0800 Subject: add tabs code --- demo/index.html | 30 +++++++++++++++++++++++++++--- dist/spectre.css | 36 ++++++++++++++++++++++++++++++++++++ src/navigation.less | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 3 deletions(-) (limited to 'src/navigation.less') diff --git a/demo/index.html b/demo/index.html index 2bebac6..f9c8ac2 100644 --- a/demo/index.html +++ b/demo/index.html @@ -457,17 +457,41 @@ + +
+

tabs

+
+
+
    +
  • + + Home + +
  • +
  • + + Profile + +
  • +
  • Change avatar diff --git a/dist/spectre.css b/dist/spectre.css index 3d2944d..c902411 100644 --- a/dist/spectre.css +++ b/dist/spectre.css @@ -1194,6 +1194,42 @@ textarea.form-input { padding: 0 .4rem; color: #c5c5c5; } +.tab { + display: inline-block; + list-style: none; + margin: .5rem 0; + border-bottom: 0.1rem solid #c5c5c5; +} +.tab::after { + content: ""; + display: table; + clear: both; +} +.tab::after { + content: ""; + display: table; + clear: both; +} +.tab li { + float: left; + margin-bottom: -0.1rem; +} +.tab li a { + display: block; + padding: .5rem 1.5rem; + border-bottom: .1rem solid transparent; + color: #333; + text-decoration: none; +} +.tab li a:hover { + color: #5764C6; + border-bottom-color: #5764C6; +} +.tab li a.active, +.tab li a:active { + color: #3b49af; + border-bottom-color: #3b49af; +} .tooltip { position: relative; } diff --git a/src/navigation.less b/src/navigation.less index 2e94d30..c2d2cf9 100644 --- a/src/navigation.less +++ b/src/navigation.less @@ -1,4 +1,5 @@ // Navigation +// Breadcrumb .breadcrumb { list-style: none; margin: .5rem 0; @@ -29,3 +30,35 @@ } } } +// Tabs +.tab { + display: inline-block; + list-style: none; + margin: .5rem 0; + border-bottom: .1rem solid @control-color; + .clearfix(); + + li { + float: left; + margin-bottom: -.1rem; + + a { + display: block; + padding: .5rem 1.5rem; + border-bottom: .1rem solid transparent; + color: @body-font-color; + text-decoration: none; + + &:hover { + color: @core-color; + border-bottom-color: @core-color; + } + &.active, + &:active { + color: darken(@core-color, 10%); + border-bottom-color: darken(@core-color, 10%); + } + } + } +} + -- cgit v1.3.1-26-gb76a From 3516cf28416d9eeb2daaaabc3eca04c5aad0a78d Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sun, 3 Apr 2016 21:41:21 +0800 Subject: update tabs code and add tab-block --- demo/index.html | 26 ++++++++++++++++++-------- dist/spectre.css | 37 ++++++++++++++++++++++++++++--------- src/navigation.less | 33 +++++++++++++++++++++++++-------- 3 files changed, 71 insertions(+), 25 deletions(-) (limited to 'src/navigation.less') diff --git a/demo/index.html b/demo/index.html index e74275d..d8636a1 100644 --- a/demo/index.html +++ b/demo/index.html @@ -512,38 +512,48 @@
    diff --git a/dist/spectre.css b/dist/spectre.css index 69d5c82..99c6bd9 100644 --- a/dist/spectre.css +++ b/dist/spectre.css @@ -1232,7 +1232,7 @@ textarea.form-input { color: #c5c5c5; } .tab { - display: inline-block; + display: block; list-style: none; margin: .5rem 0; border-bottom: 0.1rem solid #c5c5c5; @@ -1247,26 +1247,45 @@ textarea.form-input { display: table; clear: both; } -.tab li { +.tab .tab-item { float: left; + border-bottom: .1rem solid transparent; margin-bottom: -0.1rem; } -.tab li a { +.tab .tab-item a { display: block; padding: .5rem 1.5rem; - border-bottom: .1rem solid transparent; color: #333; text-decoration: none; } -.tab li a:hover { - color: #5764C6; +.tab .tab-item:hover, +.tab .tab-item:focus { border-bottom-color: #5764C6; } -.tab li a.active, -.tab li a:active { - color: #3b49af; +.tab .tab-item:hover a, +.tab .tab-item:focus a { + color: #5764C6; +} +.tab .tab-item.active { border-bottom-color: #3b49af; } +.tab .tab-item.active a { + color: #3b49af; +} +.tab.tab-block { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} +.tab.tab-block .tab-item { + float: none; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + text-align: center; +} .tooltip { position: relative; } diff --git a/src/navigation.less b/src/navigation.less index c2d2cf9..c9b0f71 100644 --- a/src/navigation.less +++ b/src/navigation.less @@ -32,33 +32,50 @@ } // Tabs .tab { - display: inline-block; + display: block; list-style: none; margin: .5rem 0; border-bottom: .1rem solid @control-color; .clearfix(); - li { + .tab-item { float: left; + border-bottom: .1rem solid transparent; margin-bottom: -.1rem; a { display: block; padding: .5rem 1.5rem; - border-bottom: .1rem solid transparent; color: @body-font-color; text-decoration: none; + } + + &:hover, + &:focus { + border-bottom-color: @core-color; - &:hover { + a { color: @core-color; - border-bottom-color: @core-color; } - &.active, - &:active { + } + &.active { + border-bottom-color: darken(@core-color, 10%); + + a { color: darken(@core-color, 10%); - border-bottom-color: darken(@core-color, 10%); } } } + + &.tab-block { + display: flex; + + .tab-item { + float: none; + flex: 1; + text-align: center; + } + + } } -- cgit v1.3.1-26-gb76a From 23a08d04fee88bb16905e726315978c5ab673c3f Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Mon, 4 Apr 2016 10:51:14 +0800 Subject: update table code --- dist/spectre.css | 6 ++---- src/navigation.less | 2 +- src/tables.less | 11 ++++------- 3 files changed, 7 insertions(+), 12 deletions(-) (limited to 'src/navigation.less') diff --git a/dist/spectre.css b/dist/spectre.css index 99c6bd9..a849bc1 100644 --- a/dist/spectre.css +++ b/dist/spectre.css @@ -618,13 +618,11 @@ table td { text-align: left; padding: 1.5rem 1rem; border-bottom: 0.1rem solid #efefef; - background-color: #fff; } table th { - border-color: #d6d6d6; + border-color: #c9c9c9; } -table tr.selected th, -table tr.selected td { +table tr.selected { background-color: #f4f4f4; } .btn, diff --git a/src/navigation.less b/src/navigation.less index c9b0f71..2e0436f 100644 --- a/src/navigation.less +++ b/src/navigation.less @@ -75,7 +75,7 @@ flex: 1; text-align: center; } - } } +// TODO: Tabs with icons diff --git a/src/tables.less b/src/tables.less index 0fb0b4f..920f488 100644 --- a/src/tables.less +++ b/src/tables.less @@ -7,16 +7,13 @@ table { text-align: left; padding: 1.5rem 1rem; border-bottom: .1rem solid @core-border-color; - background-color: #fff; } th { - border-color: darken(@core-border-color, 10%); + border-color: darken(@core-border-color, 15%); } - tr.selected { - th, - td { - background-color: lighten(@core-border-color, 2%); + tr { + &.selected { + background-color: lighten(@core-border-color, 2%); } - } } \ No newline at end of file -- cgit v1.3.1-26-gb76a