File tree Expand file tree Collapse file tree 2 files changed +36
-3
lines changed
Expand file tree Collapse file tree 2 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ aside .module-name:hover,
190190}
191191
192192.breadcrumbs > a : hover {
193- color : black;
193+ color : # 0275d8 ;
194+ text-decoration : underline;
194195}
195196
196197.breadcrumbs > span {
@@ -255,9 +256,20 @@ footer {
255256
256257footer a ,
257258footer a : visited {
258- color : # 3377c0 ;
259+ color : # 0275d8 ;
259260}
260261
261262footer a : hover {
262- color : # 2f6cb6 ;
263+ color : # 0275d8 ;
264+ text-decoration : underline;
265+ }
266+
267+ .meta a ,
268+ .meta a : visited {
269+ color : # 0275d8 ;
270+ }
271+
272+ .meta a : hover {
273+ color : # 0275d8 ;
274+ text-decoration : underline;
263275}
Original file line number Diff line number Diff line change @@ -37,6 +37,26 @@ const nameFragment = (name, pathParts) =>
3737 ) } <span>/</span><a href="${ getPath ( pathParts , name ) } ">${ name } </a></h3>`
3838 : "" ;
3939
40+ const blobUrl = "https://github.com/sandstreamdev/std/blob/master" ;
41+
42+ const sourcePath = ( name , partPaths , extension ) =>
43+ `${ [ blobUrl , partPaths , name ] . join ( "/" ) } ${ extension } ` ;
44+
45+ const metaFragment = ( name , pathParts ) =>
46+ name
47+ ? `<p class="meta">
48+ <a href="${ sourcePath (
49+ name ,
50+ pathParts ,
51+ ".ts"
52+ ) } ">TypeScript source</a> • <a href="${ sourcePath (
53+ name ,
54+ pathParts ,
55+ ".js"
56+ ) } ">JavaScript source</a>
57+ </p>`
58+ : "" ;
59+
4060const descriptionFragment = description => {
4161 if ( ! description || description . startsWith ( "TODO" ) ) {
4262 return "" ;
@@ -115,6 +135,7 @@ const funcTemplate = (
115135 ${ signatureFragment ( signature ) }
116136 ${ examplesFragment ( examples , pathParts , name ) }
117137 ${ questionsFragment ( questions ) }
138+ ${ metaFragment ( name , pathParts ) }
118139 </article>` . trimLeft ( ) ;
119140
120141 return content ;
You can’t perform that action at this time.
0 commit comments