File tree 34 files changed +254
-143
lines changed
packages/typo3-docs-theme
template/structure/layoutParts
tests/Integration/tests-full
edit-on-github-directory/expected
next-prev-by-toctree/expected
page-with-subpages/expected 34 files changed +254
-143
lines changed Original file line number Diff line number Diff line change
1
+ ( ( ) => {
2
+ window . addEventListener ( "load" , ( ) => {
3
+ const SELECTOR_SEARCH_SCOPE_SELECT_LIST = 'searchscope' ;
4
+ const regex = / ^ \/ ( c | m | p | h | o t h e r ) \/ [ A - Z a - z 0 - 9 \- _ ] + \/ [ A - Z a - z 0 - 9 \- _ ] + \/ [ A - Z a - z 0 - 9 \- . ] + \/ [ A - Z a - z 0 - 9 \- ] + \/ ( C h a n g e l o g \/ [ A - Z a - z 0 - 9 \- . ] + \/ ) ? / ;
5
+ const path = window . location . pathname ;
6
+ const match = path . match ( regex ) ;
7
+ const manualPath = match ? match [ 0 ] : null ;
8
+
9
+ if ( manualPath ) {
10
+ const searchScopeSelectList = document . getElementById ( SELECTOR_SEARCH_SCOPE_SELECT_LIST ) ;
11
+ const newOption = document . createElement ( 'option' ) ;
12
+ newOption . value = manualPath ;
13
+ newOption . text = 'Search current' ;
14
+ // by default the first option (Search all) is selected
15
+ // newOption.setAttribute('selected', 'selected');
16
+ searchScopeSelectList . add ( newOption ) ;
17
+ }
18
+ } ) ;
19
+ } ) ( ) ;
Original file line number Diff line number Diff line change 1
1
.logo {
2
- display : flex ;
2
+ display : inline- flex ;
3
3
height : 70px ;
4
4
align-items : center ;
5
5
}
Original file line number Diff line number Diff line change
1
+ .search__scope {
2
+ flex : .4 !important ;
3
+ }
Original file line number Diff line number Diff line change 55
55
@import ' layout/logo' ;
56
56
@import ' layout/navigation/main_navigation' ;
57
57
@import ' layout/navigation/version_switcher' ;
58
+ @import ' layout/search' ;
58
59
@import ' layout/structure' ;
59
60
60
61
// misc
Original file line number Diff line number Diff line change @@ -24685,7 +24685,7 @@ dl.field-list ul {
24685
24685
}
24686
24686
}
24687
24687
.logo {
24688
- display : flex;
24688
+ display : inline- flex;
24689
24689
height : 70px ;
24690
24690
align-items : center;
24691
24691
}
@@ -24909,6 +24909,10 @@ a.toc-title-project:hover {
24909
24909
border-bottom-color : inherit;
24910
24910
}
24911
24911
24912
+ .search__scope {
24913
+ flex : 0.4 !important ;
24914
+ }
24915
+
24912
24916
.page {
24913
24917
display : flex;
24914
24918
flex-direction : column;
Original file line number Diff line number Diff line change 10
10
<div class =" page-header" >
11
11
<div class =" page-header-inner" >
12
12
<div class =" row" >
13
- <div class =" col-sm-6 col-lg-7 " >
13
+ <div class =" col-sm-3 col-md-4 col- lg-6 " >
14
14
<a class =" logo" href =" https://docs.typo3.org/" title =" TYPO3 Documentation" >
15
15
<img alt =" TYPO3 Logo" class =" logo-image" src =" {{ getRelativePath(' _resources/img/typo3-logo.svg' ) }}" width =" 484" height =" 130" >
16
16
</a >
17
17
</div >
18
- <div class =" col-sm-6 col-lg-5 " >
18
+ <div class =" col-sm-9 col-md-8 col- lg-6 " >
19
19
<search role =" search" >
20
20
<form action =" https://docs.typo3.org/search/search" id =" global-search-form" method =" get" >
21
- <div class =" sr-only" ><label for =" globalsearchinput" >Search all TYPO3 Documentation </label ></div >
21
+ <div class =" sr-only" ><label for =" globalsearchinput" >TYPO3 documentation... </label ></div >
22
22
<div class =" input-group mb-3 mt-sm-3" >
23
- <input autocomplete =" off" class =" form-control shadow-none" id =" globalsearchinput" name =" q" placeholder =" Search all TYPO3 documentation" type =" text" value =" " >
24
- <button class =" btn btn-primary" type =" submit" ><i class =" fa fa-search" ></i > Search</button >
23
+ <select class =" form-select search__scope" id =" searchscope" name =" scope" >
24
+ <option value =" " >Search all</option >
25
+ </select >
26
+ <input autocomplete =" off" class =" form-control shadow-none" id =" globalsearchinput" name =" q" placeholder =" TYPO3 documentation..." type =" text" value =" " >
27
+ <button class =" btn btn-primary" type =" submit" ><i class =" fa fa-search" ></i > <span class =" d-none d-md-inline" >Search</span ></button >
25
28
</div >
26
29
</form >
27
30
</search >
Original file line number Diff line number Diff line change 34
34
< div class ="page-header ">
35
35
< div class ="page-header-inner ">
36
36
< div class ="row ">
37
- < div class ="col-sm-6 col-lg-7 ">
37
+ < div class ="col-sm-3 col-md-4 col- lg-6 ">
38
38
< a class ="logo " href ="https://docs.typo3.org/ " title ="TYPO3 Documentation ">
39
39
< img alt ="TYPO3 Logo " class ="logo-image " src ="_resources/img/typo3-logo.svg " width ="484 " height ="130 ">
40
40
</ a >
41
41
</ div >
42
- < div class ="col-sm-6 col-lg-5 ">
42
+ < div class ="col-sm-9 col-md-8 col- lg-6 ">
43
43
< search role ="search ">
44
44
< form action ="https://docs.typo3.org/search/search " id ="global-search-form " method ="get ">
45
- < div class ="sr-only "> < label for ="globalsearchinput "> Search all TYPO3 Documentation </ label > </ div >
45
+ < div class ="sr-only "> < label for ="globalsearchinput "> TYPO3 documentation... </ label > </ div >
46
46
< div class ="input-group mb-3 mt-sm-3 ">
47
- < input autocomplete ="off " class ="form-control shadow-none " id ="globalsearchinput " name ="q " placeholder ="Search all TYPO3 documentation " type ="text " value ="">
48
- < button class ="btn btn-primary " type ="submit "> < i class ="fa fa-search "> </ i > Search</ button >
47
+ < select class ="form-select search__scope " id ="searchscope " name ="scope ">
48
+ < option value =""> Search all</ option >
49
+ </ select >
50
+ < input autocomplete ="off " class ="form-control shadow-none " id ="globalsearchinput " name ="q " placeholder ="TYPO3 documentation... " type ="text " value ="">
51
+ < button class ="btn btn-primary " type ="submit "> < i class ="fa fa-search "> </ i > < span class ="d-none d-md-inline "> Search</ span > </ button >
49
52
</ div >
50
53
</ form >
51
54
</ search >
Original file line number Diff line number Diff line change 35
35
< div class ="page-header ">
36
36
< div class ="page-header-inner ">
37
37
< div class ="row ">
38
- < div class ="col-sm-6 col-lg-7 ">
38
+ < div class ="col-sm-3 col-md-4 col- lg-6 ">
39
39
< a class ="logo " href ="https://docs.typo3.org/ " title ="TYPO3 Documentation ">
40
40
< img alt ="TYPO3 Logo " class ="logo-image " src ="_resources/img/typo3-logo.svg " width ="484 " height ="130 ">
41
41
</ a >
42
42
</ div >
43
- < div class ="col-sm-6 col-lg-5 ">
43
+ < div class ="col-sm-9 col-md-8 col- lg-6 ">
44
44
< search role ="search ">
45
45
< form action ="https://docs.typo3.org/search/search " id ="global-search-form " method ="get ">
46
- < div class ="sr-only "> < label for ="globalsearchinput "> Search all TYPO3 Documentation </ label > </ div >
46
+ < div class ="sr-only "> < label for ="globalsearchinput "> TYPO3 documentation... </ label > </ div >
47
47
< div class ="input-group mb-3 mt-sm-3 ">
48
- < input autocomplete ="off " class ="form-control shadow-none " id ="globalsearchinput " name ="q " placeholder ="Search all TYPO3 documentation " type ="text " value ="">
49
- < button class ="btn btn-primary " type ="submit "> < i class ="fa fa-search "> </ i > Search</ button >
48
+ < select class ="form-select search__scope " id ="searchscope " name ="scope ">
49
+ < option value =""> Search all</ option >
50
+ </ select >
51
+ < input autocomplete ="off " class ="form-control shadow-none " id ="globalsearchinput " name ="q " placeholder ="TYPO3 documentation... " type ="text " value ="">
52
+ < button class ="btn btn-primary " type ="submit "> < i class ="fa fa-search "> </ i > < span class ="d-none d-md-inline "> Search</ span > </ button >
50
53
</ div >
51
54
</ form >
52
55
</ search >
Original file line number Diff line number Diff line change 36
36
< div class ="page-header ">
37
37
< div class ="page-header-inner ">
38
38
< div class ="row ">
39
- < div class ="col-sm-6 col-lg-7 ">
39
+ < div class ="col-sm-3 col-md-4 col- lg-6 ">
40
40
< a class ="logo " href ="https://docs.typo3.org/ " title ="TYPO3 Documentation ">
41
41
< img alt ="TYPO3 Logo " class ="logo-image " src ="_resources/img/typo3-logo.svg " width ="484 " height ="130 ">
42
42
</ a >
43
43
</ div >
44
- < div class ="col-sm-6 col-lg-5 ">
44
+ < div class ="col-sm-9 col-md-8 col- lg-6 ">
45
45
< search role ="search ">
46
46
< form action ="https://docs.typo3.org/search/search " id ="global-search-form " method ="get ">
47
- < div class ="sr-only "> < label for ="globalsearchinput "> Search all TYPO3 Documentation </ label > </ div >
47
+ < div class ="sr-only "> < label for ="globalsearchinput "> TYPO3 documentation... </ label > </ div >
48
48
< div class ="input-group mb-3 mt-sm-3 ">
49
- < input autocomplete ="off " class ="form-control shadow-none " id ="globalsearchinput " name ="q " placeholder ="Search all TYPO3 documentation " type ="text " value ="">
50
- < button class ="btn btn-primary " type ="submit "> < i class ="fa fa-search "> </ i > Search</ button >
49
+ < select class ="form-select search__scope " id ="searchscope " name ="scope ">
50
+ < option value =""> Search all</ option >
51
+ </ select >
52
+ < input autocomplete ="off " class ="form-control shadow-none " id ="globalsearchinput " name ="q " placeholder ="TYPO3 documentation... " type ="text " value ="">
53
+ < button class ="btn btn-primary " type ="submit "> < i class ="fa fa-search "> </ i > < span class ="d-none d-md-inline "> Search</ span > </ button >
51
54
</ div >
52
55
</ form >
53
56
</ search >
Original file line number Diff line number Diff line change 36
36
< div class ="page-header ">
37
37
< div class ="page-header-inner ">
38
38
< div class ="row ">
39
- < div class ="col-sm-6 col-lg-7 ">
39
+ < div class ="col-sm-3 col-md-4 col- lg-6 ">
40
40
< a class ="logo " href ="https://docs.typo3.org/ " title ="TYPO3 Documentation ">
41
41
< img alt ="TYPO3 Logo " class ="logo-image " src ="../_resources/img/typo3-logo.svg " width ="484 " height ="130 ">
42
42
</ a >
43
43
</ div >
44
- < div class ="col-sm-6 col-lg-5 ">
44
+ < div class ="col-sm-9 col-md-8 col- lg-6 ">
45
45
< search role ="search ">
46
46
< form action ="https://docs.typo3.org/search/search " id ="global-search-form " method ="get ">
47
- < div class ="sr-only "> < label for ="globalsearchinput "> Search all TYPO3 Documentation </ label > </ div >
47
+ < div class ="sr-only "> < label for ="globalsearchinput "> TYPO3 documentation... </ label > </ div >
48
48
< div class ="input-group mb-3 mt-sm-3 ">
49
- < input autocomplete ="off " class ="form-control shadow-none " id ="globalsearchinput " name ="q " placeholder ="Search all TYPO3 documentation " type ="text " value ="">
50
- < button class ="btn btn-primary " type ="submit "> < i class ="fa fa-search "> </ i > Search</ button >
49
+ < select class ="form-select search__scope " id ="searchscope " name ="scope ">
50
+ < option value =""> Search all</ option >
51
+ </ select >
52
+ < input autocomplete ="off " class ="form-control shadow-none " id ="globalsearchinput " name ="q " placeholder ="TYPO3 documentation... " type ="text " value ="">
53
+ < button class ="btn btn-primary " type ="submit "> < i class ="fa fa-search "> </ i > < span class ="d-none d-md-inline "> Search</ span > </ button >
51
54
</ div >
52
55
</ form >
53
56
</ search >
You can’t perform that action at this time.
0 commit comments