You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2017/10/12 15:56:44 UTC

[myfaces-tobago] branch master updated: TOBAGO-1759 Update Bootstrap to 4.0.0 beta 1 (from alpha 6) * navbar-brand CSS class don't need to set manually anymore for tc:links inside a brand-facet

This is an automated email from the ASF dual-hosted git repository.

hnoeth pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b56776  TOBAGO-1759 Update Bootstrap to 4.0.0 beta 1 (from alpha 6) * navbar-brand CSS class don't need to set manually anymore for tc:links inside a brand-facet
6b56776 is described below

commit 6b5677690255cb03147eda3bb55de0a9e54841ce
Author: Henning Noeth <hn...@apache.org>
AuthorDate: Thu Oct 12 17:56:40 2017 +0200

    TOBAGO-1759 Update Bootstrap to 4.0.0 beta 1 (from alpha 6)
    * navbar-brand CSS class don't need to set manually anymore for tc:links inside a brand-facet
---
 tobago-core/src/main/resources/scss/_tobago.scss   | 17 +++++++++
 .../20-component/050-container/60-bar/bar.xhtml    | 40 ++++++----------------
 .../tobago-example-demo/src/main/webapp/menu.xhtml |  4 +--
 3 files changed, 28 insertions(+), 33 deletions(-)

diff --git a/tobago-core/src/main/resources/scss/_tobago.scss b/tobago-core/src/main/resources/scss/_tobago.scss
index da6ff4a..f58f053 100644
--- a/tobago-core/src/main/resources/scss/_tobago.scss
+++ b/tobago-core/src/main/resources/scss/_tobago.scss
@@ -35,6 +35,9 @@ $white: #fff !default;
 $gray-dark: #292b2c !default;
 $gray-light: #636c72 !default;
 $gray-lightest: #f7f7f9 !default;
+$black: #000 !default;
+$navbar-dark-active-color: rgba($white, 1) !default;
+$navbar-light-active-color: rgba($black, .9) !default;
 $border-width: 1px !default;
 $input-btn-border-width: $border-width !default; // For form controls and buttons
 $input-btn-padding-y: .5rem !default;
@@ -86,6 +89,20 @@ Todo: check, if this is needed? (It doesn't work with the build system)
 
 /* bar -------------------------------------------------------------- */
 .tobago-bar {
+  &.navbar-light .navbar-brand > .tobago-link {
+    color: $navbar-light-active-color;
+
+    &:hover, &:focus {
+      text-decoration: none;
+    }
+  }
+  &.navbar-dark .navbar-brand > .tobago-link {
+    color: $navbar-dark-active-color;
+
+    &:hover, &:focus {
+      text-decoration: none;
+    }
+  }
 }
 
 /* box -------------------------------------------------------------- */
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/60-bar/bar.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/60-bar/bar.xhtml
index 3f04df1..50dd274 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/60-bar/bar.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/60-bar/bar.xhtml
@@ -147,9 +147,7 @@
     <tc:bar markup="large, dark">
       <tc:style customClass="bg-dark"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -165,9 +163,7 @@
     <tc:bar markup="large, light">
       <tc:style customClass="bg-light"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -183,9 +179,7 @@
     <tc:bar markup="large, dark">
       <tc:style customClass="bg-danger"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -201,9 +195,7 @@
     <tc:bar markup="large, dark">
       <tc:style customClass="bg-primary"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -219,9 +211,7 @@
     <tc:bar markup="large, light">
       <tc:style customClass="bg-warning"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -258,9 +248,7 @@
     <tc:bar markup="light">
       <tc:style customClass="bg-light"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -270,9 +258,7 @@
     <tc:bar markup="small, light">
       <tc:style customClass="bg-light"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -282,9 +268,7 @@
     <tc:bar markup="medium, light">
       <tc:style customClass="bg-light"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -294,9 +278,7 @@
     <tc:bar markup="large, light">
       <tc:style customClass="bg-light"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
@@ -306,9 +288,7 @@
     <tc:bar markup="extraLarge, light">
       <tc:style customClass="bg-light"/>
       <f:facet name="brand">
-        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+        <tc:link label="BRAND" outcome="/content/10-intro/intro.xhtml"/>
       </f:facet>
       <tc:links>
         <tc:link label="Link One"/>
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
index 0f9e46a..da9625d 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/menu.xhtml
@@ -34,9 +34,7 @@
       <f:facet name="brand">
         <!-- label="Tobago Demo" contains a NO-BREAK SPACE character -->
         <tc:link image="#{request.contextPath}/image/feather-leaf.png" label="Tobago Demo" id="brand"
-                 link="http://tobago-vm.apache.org/">
-          <tc:style customClass="navbar-brand"/>
-        </tc:link>
+                 link="http://tobago-vm.apache.org/"/>
       </f:facet>
 
       <tc:form id="header">

-- 
To stop receiving notification emails like this one, please contact
['"commits@myfaces.apache.org" <co...@myfaces.apache.org>'].