Ticket #4692: 4692.patch
| File 4692.patch, 3.8 KB (added by , 7 years ago) |
|---|
-
inc/table-of-contents-lite/assets/css/style.css
2 2 .content-area h2, 3 3 .content-area h3, 4 4 .content-area h4 { 5 margin: 0.4em 0 1.1em 0;5 margin: 0.4em 0 1.1em 0; 6 6 font-weight: 400; 7 7 border-bottom: 0 none; 8 8 padding: 0; … … 38 38 float: right; 39 39 width: 250px; 40 40 background-color: #fff; 41 box-shadow: 0 0 8px rgba(0, 0,0,0.1);41 box-shadow: 0 0 8px rgba(0, 0, 0, 0.1); 42 42 border: 1px solid #eee; 43 43 border-radius: 3px; 44 44 margin: 0 0 15px 15px; … … 45 45 z-index: 1; 46 46 position: relative; 47 47 color: #555d66; 48 line-height: 1.278rem; 48 49 } 49 50 50 51 @media (min-width: 971px) { 51 52 52 div.table-of-contents {53 div.table-of-contents { 53 54 margin: -15px -30px 15px 15px; 54 55 } 55 56 } … … 62 63 } 63 64 64 65 .table-of-contents h2.toc-title { 66 65 67 /** 66 68 * originally font-size is 1.3em defined in wporg-breathe theme, 67 69 * which is correctly 17px but in HelpHub style this inheritance is wrong … … 70 72 * 71 73 * Recently edited to use rem values instead of pixels. 72 74 */ 75 font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; 73 76 margin: 0; 74 padding: 7px 12px; 75 font-size: 0.95rem; 76 font-weight: 400; 77 color: #32373c; 77 font-size: 0.94rem; 78 padding: 0.39rem 0.67rem; 79 border-bottom: 1px solid #eee; 78 80 text-transform: uppercase; 79 border-bottom: 1px solid #eee;80 81 } 81 82 82 83 /** … … 83 84 * Same thing with font-size and line-height as above 84 85 */ 85 86 .table-of-contents .items { 86 font-size: 0. 8rem;87 font-size: 0.754rem; 87 88 margin: 0; 88 89 list-style-type: none; 89 padding: 1rem;90 padding: 0.67rem; 90 91 } 91 92 92 93 .table-of-contents .items li { 93 padding: 4px;94 padding: 0.2222rem; 94 95 } 95 96 96 97 .table-of-contents .items li ul li, … … 99 100 } 100 101 101 102 /** 102 * Hiding second level table of contents links.103 * With the second level, things looks too messy and104 * information in the small area is too overwhelming.105 */106 .table-of-contents .items li ul {107 display: none;108 }109 110 /**111 103 * This should be inherited from p2-breathe 112 104 */ 113 .table-of-contents .items li a {114 word-break: break-word;115 }116 117 105 .table-of-contents .items li a, 118 106 .table-of-contents .items li a:visited { 119 107 text-decoration: none; … … 128 116 * This should be inherited from p2-breathe 129 117 */ 130 118 .table-of-contents .items li ul { 131 list-style: disc;132 margin-left: 16px;119 list-style: circle; 120 margin-left: 1.1944rem; 133 121 } 134 122 135 .table-of-contents .items li ul li {136 list-style: disc;137 }138 139 123 /* Highlight current heading and adjust scroll position for fixed toolbar */ 140 124 .toc-heading:target { 141 125 border-left: 5px solid #0073aa; 142 padding-left: 5px;143 margin-left: - 10px;126 padding-left: 0.278rem; 127 margin-left: -0.556rem; 144 128 } 145 129 146 130 p.toc-jump { 147 131 position: relative; 148 132 height: 50px; 149 text-align: right;150 font-size: 12px;133 text-align: right; 134 font-size: 0.67rem; 151 135 } 152 136 153 p.toc-jump: after {154 content: '';137 p.toc-jump::after { 138 content: ""; 155 139 display: table; 156 140 clear: both; 157 141 } -
inc/table-of-contents-lite/includes/class-table-of-contents-lite.php
244 244 $toc .= '<ul class="items">'; 245 245 $last_item = false; 246 246 foreach ( $items as $item ) { 247 $last_item = $item[2];248 247 if ( $last_item ) { 249 248 if ( $last_item < $item[2] ) { 250 249 $toc .= '<ul>'; … … 254 253 $toc .= '</li>'; 255 254 } 256 255 } 256 $last_item = $item[2]; 257 257 $toc .= sprintf( '<li><a href="#%1s">%2s</a>', sanitize_title_with_dashes( $item[3] ), $item[3] ); 258 258 } 259 259 $toc .= '</ul></div>';
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)