Commit:    47329e8762a694a033074ef9ce440d125883ec74
Author:    Ruslan <[email protected]>         Fri, 6 Nov 2020 22:51:02 +0300
Committer: Sara Golemon <[email protected]>      Wed, 25 Nov 2020 20:28:13 +0000
Parents:   2efee112c23f570e1a96c213a05304ea4c17950b
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=47329e8762a694a033074ef9ce440d125883ec74

Log:
JS-13812 added anchors

Changed paths:
  A  images/anchor.svg
  M  php8.php
  M  styles/php8.css


Diff:
diff --git a/images/anchor.svg b/images/anchor.svg
new file mode 100644
index 000000000..aade786a7
--- /dev/null
+++ b/images/anchor.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg"; width="21" height="16" viewBox="0 0 21 
16">
+    <g fill="#505C90" fill-rule="evenodd">
+        <path d="M18.914 1.328c-1.771-1.77-4.643-1.77-6.414 0L8 5.828l1.414 
1.414 4.5-4.5c.99-.99 2.596-.99 3.586 0 .99.99.99 2.596 0 3.586l-4.5 4.5 1.414 
1.414 4.5-4.5c1.77-1.771 1.77-4.643 0-6.414z" transform="translate(-622 -1049) 
translate(622 1049)"/>
+        <path d="M6.328 
12.5c-.64.643-1.574.894-2.45.66-.877-.234-1.561-.919-1.796-1.795-.234-.876.018-1.81.66-2.45l4.5-4.5L5.828
 3l-4.5 4.5c-1.77 1.771-1.77 4.643 0 6.414 1.772 1.771 4.643 1.771 6.414 
0l4.5-4.5L10.828 8l-4.5 4.5z" transform="translate(-622 -1049) translate(622 
1049)"/>
+    </g>
+</svg>
diff --git a/php8.php b/php8.php
index 0c9f58f00..df6cf6204 100644
--- a/php8.php
+++ b/php8.php
@@ -2,7 +2,7 @@
 $_SERVER['BASE_PAGE'] = 'php8.php';
 include_once __DIR__ . '/include/prepend.inc';
 
-site_header("php 8", array("current" => "php8"));
+site_header("PHP 8", array("current" => "php8"));
 ?>
 <link rel="stylesheet" href="/styles/php8.css">
 <div class="php8">
@@ -25,7 +25,8 @@ site_header("php 8", array("current" => "php8"));
 
   <div class="php8-section center">
     <div class="php8-compare">
-      <h2 class="php8-h2">
+      <h2 class="php8-h2" id="named-arguments">
+        <a class="php8-anchor" href="#named-arguments"></a>
         Named arguments
         <a class="php8-rfc" 
href="https://wiki.php.net/rfc/named_params";>RFC</a>
       </h2>
@@ -54,7 +55,8 @@ site_header("php 8", array("current" => "php8"));
     </div>
 
     <div class="php8-compare">
-      <h2 class="php8-h2">
+      <h2 class="php8-h2" id="attributes">
+        <a class="php8-anchor" href="#attributes"></a>
         Attributes
         <a class="php8-rfc" 
href="https://wiki.php.net/rfc/attributes_v2";>RFC</a>
       </h2>
@@ -87,7 +89,8 @@ site_header("php 8", array("current" => "php8"));
     </div>
 
     <div class="php8-compare">
-      <h2 class="php8-h2">
+      <h2 class="php8-h2" id="constructor-property-promotion">
+        <a class="php8-anchor" href="#constructor-property-promotion"></a>
         Constructor property promotion
         <a class="php8-rfc" 
href="https://wiki.php.net/rfc/constructor_promotion";>RFC</a>
       </h2>
@@ -133,7 +136,8 @@ site_header("php 8", array("current" => "php8"));
     </div>
 
     <div class="php8-compare">
-      <h2 class="php8-h2">
+      <h2 class="php8-h2" id="union-types">
+        <a class="php8-anchor" href="#union-types"></a>
         Union types
         <a class="php8-rfc" 
href="https://wiki.php.net/rfc/union_types_v2";>RFC</a>
       </h2>
@@ -177,7 +181,8 @@ site_header("php 8", array("current" => "php8"));
     </div>
 
     <div class="php8-compare">
-      <h2 class="php8-h2">
+      <h2 class="php8-h2" id="match-expression">
+        <a class="php8-anchor" href="#match-expression"></a>
         Match expression
         <a class="php8-rfc" 
href="https://wiki.php.net/rfc/match_expression_v2";>RFC</a>
       </h2>
@@ -216,7 +221,8 @@ site_header("php 8", array("current" => "php8"));
     </div>
 
     <div class="php8-compare">
-      <h2 class="php8-h2">
+      <h2 class="php8-h2" id="nullsafe-operator">
+        <a class="php8-anchor" href="#nullsafe-operator"></a>
         Nullsafe operator
         <a class="php8-rfc" 
href="https://wiki.php.net/rfc/nullsafe_operator";>RFC</a>
       </h2>
@@ -254,7 +260,8 @@ site_header("php 8", array("current" => "php8"));
     </div>
 
     <div class="php8-compare">
-      <h2 class="php8-h2">
+      <h2 class="php8-h2" id="saner-string-to-number-comparisons">
+        <a class="php8-anchor" href="#saner-string-to-number-comparisons"></a>
         Saner string to number comparisons
         <a class="php8-rfc" 
href="https://wiki.php.net/rfc/string_to_number_comparison";>RFC</a>
       </h2>
@@ -280,7 +287,8 @@ site_header("php 8", array("current" => "php8"));
     </div>
 
     <div class="php8-compare">
-      <h2 class="php8-h2">
+      <h2 class="php8-h2" id="consistent-type-errors-for-internal-functions">
+        <a class="php8-anchor" 
href="#consistent-type-errors-for-internal-functions"></a>
         Consistent type errors for internal functions
         <a class="php8-rfc" 
href="https://wiki.php.net/rfc/consistent_type_errors";>RFC</a>
       </h2>
diff --git a/styles/php8.css b/styles/php8.css
index fa1a35287..fc6ba4997 100644
--- a/styles/php8.css
+++ b/styles/php8.css
@@ -101,6 +101,7 @@
 }
 
 .php8-h2 {
+  display: inline-block;
   font-size: 31px;
   font-weight: bold;
   font-stretch: normal;
@@ -108,6 +109,7 @@
   line-height: 1.29;
   letter-spacing: -0.5px;
   color: #27282c;
+  overflow: visible;
 }
 
 .php8-h2::after {
@@ -342,4 +344,20 @@
   .php8-column {
     width: 100%;
   }
+}
+
+.php8-anchor {
+  display: none;
+  float: left;
+  height: 30px;
+  width: 30px;
+  margin-top: 4px;
+  margin-left: -30px;
+  background: url("/images/anchor.svg") scroll no-repeat left center / 21px 
16px transparent;
+  text-decoration: none;
+  border-bottom: none;
+}
+
+h2:hover .php8-anchor {
+  display: block;
 }
\ No newline at end of file


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to