Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
f8a86910
Commit
f8a86910
authored
Nov 22, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved main page rendering via template engine
parent
5d266c5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
18 deletions
+66
-18
context.cpp
src/context.cpp
+7
-3
htmllayout.tpl
templates/html/htmllayout.tpl
+9
-9
htmlpage.tpl
templates/html/htmlpage.tpl
+42
-0
htmltabs.tpl
templates/html/htmltabs.tpl
+8
-6
No files found.
src/context.cpp
View file @
f8a86910
...
...
@@ -2946,7 +2946,7 @@ class PageContext::Private : public DefinitionContext<PageContext::Private>
}
TemplateVariant
relPath
()
const
{
if
(
m_
pageDef
==
Doxygen
::
m
ainPage
)
if
(
m_
isM
ainPage
)
{
return
""
;
}
...
...
@@ -2957,7 +2957,7 @@ class PageContext::Private : public DefinitionContext<PageContext::Private>
}
TemplateVariant
highlight
()
const
{
if
(
m_
pageDef
==
Doxygen
::
m
ainPage
)
if
(
m_
isM
ainPage
)
{
return
"main"
;
}
...
...
@@ -8197,7 +8197,11 @@ void generateOutputViaTemplate()
}
else
{
ctx
->
set
(
"mainPage"
,
FALSE
);
// TODO: for LaTeX output index should be main... => solve in template
Doxygen
::
mainPage
=
new
PageDef
(
"[generated]"
,
1
,
"index"
,
""
,
theTranslator
->
trMainPage
());
Doxygen
::
mainPage
->
setFileName
(
"index"
,
TRUE
);
SharedPtr
<
PageContext
>
mainPage
(
PageContext
::
alloc
(
Doxygen
::
mainPage
,
TRUE
));
ctx
->
set
(
"mainPage"
,
mainPage
.
get
());
}
//%% GlobalsIndex globalsIndex:
ctx
->
set
(
"globalsIndex"
,
globalsIndex
.
get
());
...
...
templates/html/htmllayout.tpl
View file @
f8a86910
{
%
msg
%
}
----- Start generating HTML output for from template ----{% endmsg %}
{
%
msg
%
}
----- Start generating HTML output for
{{ config.PROJECT_NAME }}
from template ----{% endmsg %}
{
#
----
copy
fixed
resources
to
the
output
-----
#
}
...
...
@@ -67,11 +67,9 @@
{
#
-----------
HTML
DOCUMENTATION
PAGES
------------
#
}
{
#
write
main
page
documentation
#
}
{% if mainPage %}
{% with page=mainPage compound=mainPage %}
{% create mainPage.fileName|append:config.HTML_FILE_EXTENSION from 'htmlpage.tpl' %}
{% endwith %}
{% endif %}
{% with page=mainPage compound=mainPage isMainPage=True %}
{% create mainPage.fileName|append:config.HTML_FILE_EXTENSION from 'htmlpage.tpl' %}
{% endwith %}
{
#
write
namespace
documentation
pages
#
}
{% for compound in namespaceList %}
...
...
@@ -110,7 +108,7 @@
{
#
write
related
page
documentation
#
}
{% for compound in pageList %}
{% with page=compound %}
{% with page=compound
isMainPage=False
%}
{% create compound.fileName|append:config.HTML_FILE_EXTENSION from 'htmlpage.tpl' %}
{% endwith %}
{% endfor %}
...
...
@@ -122,6 +120,8 @@
{% endwith %}
{% endfor %}
{
#
TODO
:
write
example
documentation
#
}
{
#
-----------
INDEXES
------------
#
}
{
#
---
related
pages
---
#
}
...
...
@@ -179,7 +179,7 @@
{
#
TODO
:
write
the
class
inheritance
hierarchy
#
}
{% if classHierarchy.tree %}
{% with page=classHierarchy %}
{% create classHierarchy.fileName|append:config.HTML_FILE_EXTENSION from 'hierarchy.tpl' %
}
{
#
{
%
create
classHierarchy
.
fileName
|
append
:
config
.
HTML_FILE_EXTENSION
from
'hierarchy.tpl'
%
}
#
}
{% endwith %}
{% endif %}
...
...
@@ -229,4 +229,4 @@
{% create 'navtreedata.js' from 'htmljsnavtree.tpl' %}
{% endif %}
{% msg %}----- End generating HTML output for from template ----{% endmsg %}
{% msg %}----- End generating HTML output for
{{ config.PROJECT_NAME }}
from template ----{% endmsg %}
templates/html/htmlpage.tpl
View file @
f8a86910
...
...
@@ -9,6 +9,48 @@
{% block content %}
<div
class=
"contents"
>
{% if isMainPage and config.DISABLE_INDEX %}
{
#
no
other
navigation
means
,
so
we
produce
the
links
on
the
main
page
#
}
<ul>
{% if pageTree.tree %}
<li><a
href=
"{{ page.relPath }}pages{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.pages }}
</span></a></li>
{% endif %}
{% if moduleTree.tree %}
<li><a
href=
"{{ page.relPath }}modules{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.modules }}
</span></a></li>
{% endif %}
{% if namespaceList %}
<li><a
href=
"{{ page.relPath }}namespaces{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.namespaces }}
</span></a>
<ul>
<li><a
href=
"{{ page.relPath }}namespaces{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.namespaceList }}
</span></a></li>
<li><a
href=
"{{ page.relPath }}namespacemembers{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.namespaceMembers }}
</span></a></li>
</ul>
</li>
{% endif %}
{% if classList %}
<li><a
href=
"{{ page.relPath }}annotated{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classes }}
</span></a>
<ul>
<li><a
href=
"{{ page.relPath }}annotated{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classList }}
</span></a></li>
<li><a
href=
"{{ page.relPath }}classes{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classIndex }}
</span></a></li>
{% if classHierarchy.tree %}
<li><a
href=
"{{ page.relPath }}hierarchy{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classHierarchy }}
</span></a></li>
{% endif %}
<li><a
href=
"{{ page.relPath }}functions{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classMembers }}
</span></a></li>
</ul>
</li>
{% endif %}
{% if fileList %}
<li><a
href=
"{{ page.relPath }}files{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.files }}
</span></a>
<ul>
<li><a
href=
"{{ page.relPath }}files{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.fileList }}
</span></a></li>
<li><a
href=
"{{ page.relPath }}globals{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.fileMembers }}
</span></a></li>
</ul>
</li>
{% endif %}
{% if exampleList.items %}
<li><a
href=
"{{ page.relPath }}examples{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.examples }}
</span></a>
{% endif %}
</ul>
{% endif %}
{{ compound.details }}
</div>
{% endblock %}
templates/html/htmltabs.tpl
View file @
f8a86910
...
...
@@ -4,27 +4,27 @@
{
#
main
tab
#
}
<li
{%
if
page
.
highlight=
='main'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}index{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.mainPage|nowrap }}
</span></a></li>
{
#
pages
tab
#
}
{% if pageTree.tree
|length>0
%}
{% if pageTree.tree %}
<li
{%
if
page
.
highlight=
='pages'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}pages{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.pages|nowrap }}
</span></a></li>
{% endif %}
{
#
modules
tab
#
}
{% if moduleTree.tree
|length>0
%}
{% if moduleTree.tree %}
<li
{%
if
page
.
highlight=
='modules'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}modules{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.modules|nowrap }}
</span></a></li>
{% endif %}
{
#
namespaces
tab
#
}
{% if namespaceList
|length>0
%}
{% if namespaceList %}
<li
{%
if
page
.
highlight=
='namespaces'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}namespaces{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.namespaces|nowrap }}
</span></a></li>
{% endif %}
{
#
classes
tab
#
}
{% if classList
|length>0
%}
{% if classList %}
<li
{%
if
page
.
highlight=
='classes'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}annotated{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classes|nowrap }}
</span></a></li>
{% endif %}
{
#
files
tab
#
}
{% if fileList
|length>0
%}
{% if fileList %}
<li
{%
if
page
.
highlight=
='files'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}files{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.files|nowrap }}
</span></a></li>
{% endif %}
{
#
examples
tab
#
}
{% if exampleList
|length>0
%}
{% if exampleList
.items
%}
<li
{%
if
page
.
highlight=
='examples'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}examples{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.examples|nowrap }}
</span></a></li>
{% endif %}
{
#
search
box
#
}
...
...
@@ -80,7 +80,9 @@
{% if page.highlight=='classes' %}
<li
{%
if
page
.
subhighlight=
='classlist'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}annotated{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classList|nowrap }}
</span></a></li>
<li
{%
if
page
.
subhighlight=
='classindex'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}classes{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classIndex|nowrap }}
</span></a></li>
{% if classHierarchy.tree %}
<li
{%
if
page
.
subhighlight=
='classhierarchy'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}hierarchy{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classHierarchy|nowrap }}
</span></a></li>
{% endif %}
<li
{%
if
page
.
subhighlight=
='classmembers'
%}
class=
"current"
{%
endif
%}
><a
href=
"{{ page.relPath }}functions{{ config.HTML_FILE_EXTENSION }}"
><span>
{{ tr.classMembers|nowrap }}
</span></a></li>
{% endif %}
{
#
file
subtabs
#
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment