File tree Expand file tree Collapse file tree 6 files changed +29
-39
lines changed
Expand file tree Collapse file tree 6 files changed +29
-39
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,14 @@ Error HTMLGenerator::setupTemplateFiles(const ClangDocContext &CDCtx) {
6868 ConvertToNative (CDCtx.MustacheTemplates .lookup (" enum-template" ));
6969 std::string HeadFilePath =
7070 ConvertToNative (CDCtx.MustacheTemplates .lookup (" head-template" ));
71+ std::string NavbarFilePath =
72+ ConvertToNative (CDCtx.MustacheTemplates .lookup (" navbar-template" ));
7173 std::vector<std::pair<StringRef, StringRef>> Partials = {
7274 {" Comments" , CommentFilePath},
7375 {" FunctionPartial" , FunctionFilePath},
7476 {" EnumPartial" , EnumFilePath},
75- {" HeadPartial" , HeadFilePath}};
77+ {" HeadPartial" , HeadFilePath},
78+ {" NavbarPartial" , NavbarFilePath}};
7679
7780 if (Error Err = setupTemplate (NamespaceTemplate, NamespaceFilePath, Partials))
7881 return Err;
Original file line number Diff line number Diff line change 99<html lang =" en-US" >
1010{ {> HeadPartial} }
1111<body >
12- <nav class =" navbar" >
13- <div class =" navbar__container" >
14- { {#ProjectName} }
15- <div class =" navbar__logo" >
16- { {ProjectName} }
17- </div >
18- { {/ProjectName} }
19- <div class =" navbar__menu" >
20- <ul class =" navbar__links" >
21- <li class =" navbar__item" >
22- <a href =" /" class =" navbar__link" >Namespace</a >
23- </li >
24- <li class =" navbar__item" >
25- <a href =" /" class =" navbar__link" >Class</a >
26- </li >
27- </ul >
28- </div >
29- </div >
30- </nav >
12+ { {> NavbarPartial} }
3113 <main >
3214 <div class =" container" >
3315 <div class =" sidebar" >
Original file line number Diff line number Diff line change 99<html lang =" en-US" >
1010{ {> HeadPartial} }
1111<body >
12- <nav class =" navbar" >
13- <div class =" navbar__container" >
14- { {#ProjectName} }
15- <div class =" navbar__logo" >
16- { {ProjectName} }
17- </div >
18- { {/ProjectName} }
19- <div class =" navbar__menu" >
20- <ul class =" navbar__links" >
21- <li class =" navbar__item" >
22- <a href =" /" class =" navbar__link" >Namespace</a >
23- </li >
24- <li class =" navbar__item" >
25- <a href =" /" class =" navbar__link" >Class</a >
26- </li >
27- </ul >
28- </div >
29- </div >
30- </nav >
12+ { {> NavbarPartial} }
3113 <main >
3214 <div class =" container" >
3315 <div class =" sidebar" >
Original file line number Diff line number Diff line change 1+ <nav class =" navbar" >
2+ <div class =" navbar__container" >
3+ { {#ProjectName} }
4+ <div class =" navbar__logo" >
5+ { {ProjectName} }
6+ </div >
7+ { {/ProjectName} }
8+ <div class =" navbar__menu" >
9+ <ul class =" navbar__links" >
10+ <li class =" navbar__item" >
11+ <a href =" /" class =" navbar__link" >Namespace</a >
12+ </li >
13+ <li class =" navbar__item" >
14+ <a href =" /" class =" navbar__link" >Class</a >
15+ </li >
16+ </ul >
17+ </div >
18+ </div >
19+ </nav >
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ void getHtmlFiles(StringRef AssetsPath, clang::doc::ClangDocContext &CDCtx) {
5858 appendPathPosix (AssetsPath, " comment-template.mustache" );
5959 SmallString<128 > HeadTemplate =
6060 appendPathPosix (AssetsPath, " head-template.mustache" );
61+ SmallString<128 > NavbarTemplate =
62+ appendPathPosix (AssetsPath, " navbar-template.mustache" );
6163
6264 CDCtx.MustacheTemplates .insert (
6365 {" namespace-template" , NamespaceTemplate.c_str ()});
@@ -67,4 +69,5 @@ void getHtmlFiles(StringRef AssetsPath, clang::doc::ClangDocContext &CDCtx) {
6769 {" function-template" , FunctionTemplate.c_str ()});
6870 CDCtx.MustacheTemplates .insert ({" comment-template" , CommentTemplate.c_str ()});
6971 CDCtx.MustacheTemplates .insert ({" head-template" , HeadTemplate.c_str ()});
72+ CDCtx.MustacheTemplates .insert ({" navbar-template" , NavbarTemplate.c_str ()});
7073}
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ set(assets
3232 namespace-template.mustache
3333 template.mustache
3434 head-template.mustache
35+ navbar-template.mustache
3536)
3637
3738set (asset_dir "${CMAKE_CURRENT_SOURCE_DIR} /../assets" )
You can’t perform that action at this time.
0 commit comments