You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2018/01/18 07:11:52 UTC

[2/4] cayenne-website git commit: docs styles improvements (tables, .admonitionblock, etc.) docs side_nav improvement

docs styles improvements (tables, .admonitionblock, etc.)
docs side_nav improvement


Project: http://git-wip-us.apache.org/repos/asf/cayenne-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne-website/commit/6d656287
Tree: http://git-wip-us.apache.org/repos/asf/cayenne-website/tree/6d656287
Diff: http://git-wip-us.apache.org/repos/asf/cayenne-website/diff/6d656287

Branch: refs/heads/master
Commit: 6d65628723da1d306ec4ea1759771c783b31eb52
Parents: 11d328b
Author: AbleOne <ev...@gmail.com>
Authored: Wed Jan 17 22:10:00 2018 +0300
Committer: AbleOne <ev...@gmail.com>
Committed: Wed Jan 17 22:10:00 2018 +0300

----------------------------------------------------------------------
 src/main/assets/styles/_cd.scss                 | 90 ++++++++++++++++----
 src/main/assets/styles/main.scss                | 18 ++--
 .../site/layouts/_default/contributors.html     |  4 +-
 src/main/site/layouts/partials/header.html      |  6 +-
 4 files changed, 86 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/6d656287/src/main/assets/styles/_cd.scss
----------------------------------------------------------------------
diff --git a/src/main/assets/styles/_cd.scss b/src/main/assets/styles/_cd.scss
index 5c27932..54fbd29 100644
--- a/src/main/assets/styles/_cd.scss
+++ b/src/main/assets/styles/_cd.scss
@@ -37,7 +37,7 @@
 		}
 
 		.dropdown-toggle {
-			color: #444;
+			color: $headings-color;
 			font-weight: $font-weight-normal;
 			padding: $cd-top-sidebar-padding-y $cd-top-sidebar-padding-r $cd-top-sidebar-padding-y $cd-top-sidebar-padding-l;
 		}
@@ -55,7 +55,7 @@
 			color: #666;
 
 			@include hover-focus {
-				color: #444;
+				color: $headings-color;
 			}
 		}
 
@@ -65,6 +65,7 @@
 	#cd-docs-nav {
 		position: sticky;
 		overflow-y: auto;
+		overflow-x: hidden;
 		left: 0;
 		top: $cd-docs-nav-offset; //11.5rem;
 		@include media-breakpoint-up(lg) {
@@ -84,24 +85,44 @@
 			display: inline-block;
 	        padding: .5rem $cd-top-sidebar-padding-r .5rem $cd-top-sidebar-padding-l;
     		line-height: 1.5;
+    		font-weight: $font-weight-medium;
 
 			&.active {
 				padding-bottom: 0;
 
-				+ .toc-side {
-					padding-bottom: .5rem;
-				}
+				// + .toc-side {
+				// 	padding-bottom: .5rem;
+				// }
 			}
 
 		}
 	    
 	    // Active states
-	    .cd-toc-link,
+	    // .cd-toc-link,
 	    .nav-link {
 
 		    &.active {
-		    	color: #444;
-		    	font-weight: $font-weight-medium;
+		    	color: $headings-color;
+		    	// font-weight: $font-weight-bold;
+		    	position: relative;
+
+		    	&:before {
+					content: '';
+					position: absolute;
+					z-index: -1;
+
+					top: -.2em;
+					right: -20.4em; // 8.4em
+					bottom: -.2em;
+					left: -.4em;
+					background: rgba(#000, 0.04); //rgba($primary, 0.1); //#ffd9d9
+		    	}
+
+
+		    	// sublevels
+		    	+ .nav .nav-link.active:before {
+		    		left: -0.4em - 1.587em;
+		    	}
 		    }
 	    }
 	    
@@ -140,15 +161,22 @@
 
 			li {
 				padding-left: 0;
-			}
 
-			li:not(:last-child) a {
-				margin-top: .5em;
-				margin-bottom: .5em;
+				&:not(:last-child) a {
+					margin-top: .5em;
+					margin-bottom: 0; // .5em;
+				}
+				
+				// instead of .5em; above
+				a {
+					margin-top: .5em;
+				}
 			}
 
 			a {
 				padding: 0;
+				font-size: .9em;
+				font-weight: $font-weight-normal;
 
 				// text truncate by ellipsis
 				// display: block;
@@ -198,7 +226,7 @@
 
 			a {
 			    display: inline-block;
-			    line-height: 1.5;
+			    line-height: 1.6;
 			    // margin-bottom: .4rem;
 			}
 		}
@@ -277,18 +305,37 @@
 				}
 			}
 
+
 			.admonitionblock {
+				margin-bottom: 2rem;
+				
 				td {
-					padding: $table-cell-padding;
+					padding: 0 $table-cell-padding;
 				}
+				
 				// Icon in admonition block
-				td.icon {
+				.icon {
 					text-align: center;
 					border-right: $table-border-width solid $table-border-color;
 					i {
 						vertical-align: middle;
 					}
 				}
+				
+				// Сontent in admonition block
+				.content {
+				    font-size: .75em;
+				    font-weight: $font-weight-normal;
+				    color: $text-muted;
+
+				    p {
+				    	margin-bottom: 0;
+
+				    	& + p {
+				    		margin-bottom: 1em;
+				    	}
+				    }
+				}
 			}
 
 
@@ -311,34 +358,41 @@
 					color: #fff !important;
 				}
 			}
+
 			.conum[data-value] + b {
 				display: none;
 			}
+
 			.conum[data-value]:after {
 				content: attr(data-value)
 			}
+
 			pre .conum[data-value] {
 				position: relative;
 				top: -.125rem;
 			}
+
 			b.conum * {
 				color: inherit !important;
 			}
+
 			.conum:not([data-value]):empty {
 				display: none;
 			}
 
-			.colist>table {
-				tr>td:first-of-type {
+			.colist > table tr > td {
+				
+				&:first-of-type {
 					padding: .35rem .5rem 1rem 1rem;
 					line-height: 1rem;
 					vertical-align: top;
+					
 					img {
 						max-width:initial
 					}
 				}
 
-				tr>td:last-of-type {
+				&:last-of-type {
 					padding: 0 0 1rem 0;
 				}
 			}

http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/6d656287/src/main/assets/styles/main.scss
----------------------------------------------------------------------
diff --git a/src/main/assets/styles/main.scss b/src/main/assets/styles/main.scss
index fec8851..91a21b7 100644
--- a/src/main/assets/styles/main.scss
+++ b/src/main/assets/styles/main.scss
@@ -78,6 +78,7 @@
 	.mw-50 { max-width: 50% !important; }
 	.mw-75 { max-width: 75% !important; }
 
+	.mw-15px { max-width: 15px !important; }
 	.mw-500px { max-width: 500px !important; }
 	// max height
 	.mh-26px {max-height: 26px;}
@@ -116,8 +117,11 @@
 		}
 
 		// size `sm`
-		.breadcrumb-sm * {
-			font-size: $small-font-size;
+		.breadcrumb-sm {
+			.breadcrumb-item,
+			.dropdown-item {
+				font-size: $small-font-size;
+			}
 		}
 
 	// _type.scss
@@ -437,10 +441,10 @@
 			}
 			
 			.symbol {
-				font-size: 18px;
+				font-size: 1.125rem;
 				margin-left: 1rem;
-				// vertical-align: middle;
-				// display: inline-block;
+				position: relative;
+				top: .0625rem;
 			}
 
 			.fa-lg.fa-long-arrow-right {
@@ -522,8 +526,4 @@
 			td, th {
 				padding: $table-cell-padding-sm;
 			}
-		}
-
-		.mw-20px {
-			max-width: 20px;
 		}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/6d656287/src/main/site/layouts/_default/contributors.html
----------------------------------------------------------------------
diff --git a/src/main/site/layouts/_default/contributors.html b/src/main/site/layouts/_default/contributors.html
index 5cbbb09..7227f36 100644
--- a/src/main/site/layouts/_default/contributors.html
+++ b/src/main/site/layouts/_default/contributors.html
@@ -8,7 +8,7 @@
         {{ .Content }}
                 
         <h3 class="text-center">Committers and Project Management Committee</h3>
-        <div class="table-responsive  mt-2 pb-5">
+        <div class="table-responsive  mt-2 mb-5">
             <table class="table table-bordered">
                 <thead>
                 <tr>
@@ -33,7 +33,7 @@
 
         <h3 class="text-center">Emeritus Committers</h3>
         <p class="text-center">Committers who are no longer active in the community. We wish them well and hope to see them return.</p>
-        <div class="table-responsive  mt-2 pb-5">
+        <div class="table-responsive  mt-2 mb-5">
             <table class="table table-bordered ">
                 <thead>
                 <tr>

http://git-wip-us.apache.org/repos/asf/cayenne-website/blob/6d656287/src/main/site/layouts/partials/header.html
----------------------------------------------------------------------
diff --git a/src/main/site/layouts/partials/header.html b/src/main/site/layouts/partials/header.html
index e9f2968..6758961 100644
--- a/src/main/site/layouts/partials/header.html
+++ b/src/main/site/layouts/partials/header.html
@@ -1,9 +1,9 @@
 <header class="page-header">
     <nav id="topbar" class="bg-dark" aria-label="breadcrumb" role="navigation">
       <ul class="breadcrumb breadcrumb-sm breadcrumb-dark  container  mb-0">
-        <img class="mh-26px mw-20px  mr-1" src="/img/feather.svg" />
         <li class="breadcrumb-item dropdown">
-          <a class="dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Apache Software Foundation</a>
+          <a class="dropdown-toggle  text-nowrap  pr-1" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+            <img class="mw-15px  mr-1" src="/img/feather.svg" />Apache Software Foundation</a>
           <div class="dropdown-menu" aria-labelledby="navbarDropdown">
             <a class="dropdown-item" href="http://www.apache.org">Apache Homepage</a>
             <a class="dropdown-item" href="http://www.apache.org/licenses/">License</a>
@@ -12,7 +12,7 @@
             <a class="dropdown-item" href="http://www.apache.org/security/">Security</a>
           </div>
         </li>
-        <li class="breadcrumb-item d-none d-lg-inline-block">Apache Cayenne</li>
+        <li class="breadcrumb-item d-none d-lg-flex"><span>Apache Cayenne</span></li>
       </ul>
     </nav>
     <nav class="navbar navbar-expand-lg navbar-dark bg-primary">