Skip to content

Commit d1a8cfb

Browse files
committed
Add search support in the doxygen docs
1 parent 428bdda commit d1a8cfb

File tree

5 files changed

+71
-6
lines changed

5 files changed

+71
-6
lines changed

doc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ configure_file(${DOXYGEN_INPUT_DIR}/doc/doxyfile.in ${DOXYGEN_CONFIGURED_INPUT}
3434

3535
# copy the files needed by the documentation
3636
configure_file(${DOXYGEN_INPUT_DIR}/doc/doxygen.css ${DOXYGEN_OUTPUT_DIR}/html/doxygen.css COPYONLY)
37+
configure_file(${DOXYGEN_INPUT_DIR}/doc/searchOverrides.css ${DOXYGEN_OUTPUT_DIR}/html/searchOverrides.css COPYONLY)
3738

3839
# target setup
3940
add_custom_target(doc ALL

doc/doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ MATHJAX_CODEFILE =
18961896
# The default value is: YES.
18971897
# This tag requires that the tag GENERATE_HTML is set to YES.
18981898

1899-
SEARCHENGINE = NO
1899+
SEARCHENGINE = YES
19001900

19011901
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
19021902
# implemented using a web server instead of a web client using JavaScript. There

doc/doxygen.css

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,18 +1062,26 @@ tr.heading h2 {
10621062
display: table;
10631063
}
10641064

1065+
.tablist {
1066+
width: 100%;
1067+
}
1068+
10651069
.tablist li {
10661070
float: left;
10671071
display: table-cell;
10681072
list-style: none;
10691073
}
10701074

1075+
#navrow1 .tablist li:last-child {
1076+
float: right;
1077+
}
1078+
10711079
#navrow1 {
10721080
border-top: 1px solid #999;
10731081
margin-top: 2em;
10741082
}
10751083

1076-
#navrow1 .tablist a, #navrow2 .tablist a, #navrow3 .tablist a, #navrow4 .tablist a {
1084+
#navrow1 .tablist a:not(#MSearchClose), #navrow2 .tablist a, #navrow3 .tablist a, #navrow4 .tablist a {
10771085
display: block;
10781086
margin: 8px 0;
10791087
padding: 0 8px;
@@ -1246,7 +1254,7 @@ div.contents ul li {
12461254
width: 24px;
12471255
height: 18px;
12481256
margin-bottom: 4px;
1249-
background-image:url('ftv2folderopen.png');
1257+
background-image:url('folderopen.png');
12501258
background-position: 0px -4px;
12511259
background-repeat: repeat-y;
12521260
vertical-align:top;
@@ -1257,7 +1265,7 @@ div.contents ul li {
12571265
width: 24px;
12581266
height: 18px;
12591267
margin-bottom: 4px;
1260-
background-image:url('ftv2folderclosed.png');
1268+
background-image:url('folderclosed.png');
12611269
background-position: 0px -4px;
12621270
background-repeat: repeat-y;
12631271
vertical-align:top;
@@ -1268,7 +1276,7 @@ div.contents ul li {
12681276
width: 24px;
12691277
height: 18px;
12701278
margin-bottom: 4px;
1271-
background-image:url('ftv2doc.png');
1279+
background-image:url('doc.png');
12721280
background-position: 0px -4px;
12731281
background-repeat: repeat-y;
12741282
vertical-align:top;

doc/header.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22
<html xmlns="http://www.w3.org/1999/xhtml">
33
<head>
44
<title>CSFML - C binding of the Simple and Fast Multimedia Library</title>
5-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
5+
<meta http-equiv="Content-Type" content="text/html;"/>
6+
<meta charset="utf-8"/>
67
<!--<link rel='stylesheet' type='text/css' href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
78
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
9+
<script type="text/javascript" src="jquery.js"></script>
10+
<script type="text/javascript" src="dynsections.js"></script>
11+
<link rel="stylesheet" type="text/css" href="search/search.css" />
12+
<link rel="stylesheet" type="text/css" href="searchOverrides.css" /> <script type="text/javascript" src="search/searchdata.js"></script>
13+
<script type="text/javascript" src="search/search.js"></script>
14+
<script type="text/javascript">
15+
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
16+
$(document).ready(function() { init_search(); });
17+
/* @license-end */
18+
</script>
819
</head>
920
<body>
1021
<div id="banner-container">

doc/searchOverrides.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/* Override search/search.css rules to adjust seach box placement */
2+
#MSearchBox {
3+
position: relative;
4+
display: block;
5+
border-radius: 0;
6+
box-shadow: none;
7+
border-width: 1px;
8+
border-color: #BBB;
9+
border-style: solid;
10+
}
11+
.right #MSearchClose {
12+
margin: 0;
13+
right: auto;
14+
}
15+
#MSearchResultsWindow {
16+
background-color: #EAF5DB;
17+
border-color: #999;
18+
}
19+
#MSearchResults > .SRPage {
20+
background-color: #EAF5DB;
21+
}
22+
a.SRSymbol {
23+
color: rgb(70, 100, 30);
24+
}
25+
a.SRSymbol:hover {
26+
text-decoration: underline;
27+
}
28+
a.SRScope {
29+
color: rgb(70, 100, 30);
30+
}
31+
a.SRScope:hover {
32+
text-decoration: underline;
33+
}
34+
#MSearchSelectWindow {
35+
background-color: #EAF5DB;
36+
}
37+
#MSearchSelectWindow > a.SelectItem {
38+
color: #333;
39+
text-decoration: none;
40+
}
41+
#MSearchSelectWindow > a.SelectItem:hover {
42+
color: white;
43+
background-color: #8CC841;
44+
text-decoration: none;
45+
}

0 commit comments

Comments
 (0)