File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -654,7 +654,13 @@ <h2>Search Results</h2>
654
654
</ div >
655
655
< div id ="sectSearchNoResults " class ="hidden ">
656
656
< h2 > No Results Found</ h2 >
657
- < p > Press escape to exit search and then '?' to see more options.</ p >
657
+ < p > Here are some things you can try:</ p >
658
+ < ul >
659
+ < li > Check out the < a id ="langRefLink "> Language Reference</ a > for the language itself.</ li >
660
+ < li > Check out the < a href ="https://ziglang.org/learn/ "> Learn page</ a > for other helpful resources for learning Zig.</ li >
661
+ < li > Use your search engine.</ li >
662
+ </ ul >
663
+ < p > Press < kbd > ?</ kbd > to see keyboard shortcuts and < kbd > Esc</ kbd > to return.</ p >
658
664
</ div >
659
665
< div id ="sectFields " class ="hidden ">
660
666
< h2 > Fields</ h2 >
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ var zigAnalysis;
51
51
const domHdrName = document . getElementById ( "hdrName" ) ;
52
52
const domHelpModal = document . getElementById ( "helpModal" ) ;
53
53
const domSearchPlaceholder = document . getElementById ( "searchPlaceholder" ) ;
54
+ const domLangRefLink = document . getElementById ( "langRefLink" ) ;
54
55
55
56
let searchTimer = null ;
56
57
let searchTrimResults = true ;
@@ -161,6 +162,13 @@ var zigAnalysis;
161
162
window . addEventListener ( "keydown" , onWindowKeyDown , false ) ;
162
163
onHashChange ( ) ;
163
164
165
+ let langRefVersion = zigAnalysis . params . zigVersion ;
166
+ if ( ! / ^ \d + \. \d + \. \d + $ / . test ( langRefVersion ) ) {
167
+ // the version is probably not released yet
168
+ langRefVersion = "master" ;
169
+ }
170
+ domLangRefLink . href = `https://ziglang.org/documentation/${ langRefVersion } /` ;
171
+
164
172
function renderTitle ( ) {
165
173
let list = curNav . pkgNames . concat ( curNav . declNames ) ;
166
174
let suffix = " - Zig" ;
You can’t perform that action at this time.
0 commit comments