소스 검색

Docs/Examples: Open panel on mobile when no page/example is selected (#32261)

mrdoob 1 개월 전
부모
커밋
1d641e759b
3개의 변경된 파일18개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      docs/index.html
  2. 6 0
      examples/index.html
  3. 6 0
      utils/docs/template/static/index.html

+ 6 - 0
docs/index.html

@@ -1913,6 +1913,12 @@
 
 			const selectedPage = window.location.hash.substring( 1 );
 
+			if ( selectedPage === '' ) {
+
+				panel.classList.add( 'open' );
+
+			}
+
 			const links = navigation.querySelectorAll( 'a' );
 
 			links.forEach( link => {

+ 6 - 0
examples/index.html

@@ -110,6 +110,12 @@
 
 			}
 
+			if ( selected === null ) {
+
+				panel.classList.add( 'open' );
+
+			}
+
 			if ( viewer.src === '' ) {
 
 				viewer.srcdoc = document.getElementById( 'PlaceholderHTML' ).innerHTML;

+ 6 - 0
utils/docs/template/static/index.html

@@ -188,6 +188,12 @@
 
 			const selectedPage = window.location.hash.substring( 1 );
 
+			if ( selectedPage === '' ) {
+
+				panel.classList.add( 'open' );
+
+			}
+
 			const links = navigation.querySelectorAll( 'a' );
 
 			links.forEach( link => {

粤ICP备19079148号