Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit b19a0e0

Browse files
author
davidhabib
committed
allow the user to replace the entire header. updated styles for a flatter look.
1 parent 1efaee8 commit b19a0e0

File tree

3 files changed

+43
-56
lines changed

3 files changed

+43
-56
lines changed

src/org/salesforce/apexdoc/ApexDoc.css

+27-41
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
body{
2-
font-family:Verdana, Arial, Helvetica, sans-serif;
2+
/* font-family:Verdana, Arial, Helvetica, sans-serif; */
3+
font-family: "ProximaNovaSoft-Regular", Calibri, "Gill Sans", "Gill Sans MT", Candara, Segoe, "Segoe UI", Arial, sans-serif;
34
font-size:100%;
45
margin:0px;
56
padding:0px;
67
}
78

89
/* the top page banner */
910
.topsection {
10-
background-color:SteelBlue;
11+
background-color: rgb(98,181,229);
1112
width:100%;
12-
height:100px;
13+
height:110px;
1314
color:white;
14-
border:1px solid #000;
1515
}
1616
.topsection td{
1717
color:white;
@@ -20,27 +20,28 @@ body{
2020

2121
/* section-title is the horizontal section headers that declare the classname, methods, etc. */
2222
.section-title {
23-
background-color:SteelBlue;
24-
border:1px solid #000000;
23+
background-color: rgb(155,203,236);
2524
color:white;
2625
padding:5px;
27-
font-size:.9em;
26+
font-size: 100%;
2827
font-weight:bold;
2928
margin-bottom:2px;
3029
}
30+
.section-title a {
31+
color:white;
32+
}
3133

3234
/* details is used for displaying the apexdoc values like author, date, description, params, return value, etc. */
3335
.details {
3436
border-color:lightgray;
37+
font-size: .9em;
3538
}
3639
.details th{
3740
background-color:whitesmoke;
38-
/* border:1px solid gray; */
3941
color:black;
40-
font-size:.7em;
42+
/* font-size:.7em; */
4143
padding:3px;
4244
text-align:right;
43-
/* width:150px; */
4445
}
4546
.details th.paramHeader{
4647
background-color:white;
@@ -53,7 +54,7 @@ body{
5354
padding-left:10px;
5455
}
5556
.details td{
56-
font-size:.7em;
57+
/* font-size:.7em; */
5758
}
5859

5960
/* properties is used to display the table of class properties */
@@ -64,41 +65,35 @@ body{
6465
vertical-align: top;
6566
}
6667
.clsPropertyName {
67-
font-size:.7em;
68+
font-size:.8em;
6869
font-weight:bold;
6970
}
7071
.clsPropertyDeclaration {
7172
font-family:Courier;
72-
font-size:.7em;
73+
font-size:.8em;
7374
font-weight:normal;
7475
color:MediumBlue;
7576
}
7677
.clsPropertyDescription {
77-
font-size:.7em;
78+
font-size:.8em;
7879
font-weight:normal;
7980
}
8081

8182
/* trigger is the set of styles to provide the expand/collapse bar */
8283
h2.trigger {
83-
/* padding: 0 0 0 10px;*/
8484
margin: 0 0 2 0;
85-
/* background: url(h2_trigger_a.gif) no-repeat; */
86-
background-color:gray;
87-
border:1px solid #000000;
88-
/* height: 46px; */
89-
/* line-height: 300%; */
90-
/* width: 450px; */
91-
font-size: .8em;
92-
font-weight: bold;
85+
background-color: rgb(239,241,246);
86+
color: black;
87+
font-size: 100%;
88+
font-weight: normal;
9389
padding:2px;
9490
}
9591
h2.trigger a {
96-
color: #fff;
92+
color: black;
9793
text-decoration: none;
98-
/* display: block; */
9994
}
10095
h2.trigger a:hover {
101-
color: #ccc;
96+
color: darkgrey;
10297
}
10398
h2.active {
10499
background-position: left bottom;
@@ -107,14 +102,6 @@ h2.active {
107102

108103
/* toggle_container is the section that gets shown/hidden when the trigger is expanded/collapsed */
109104
.toggle_container {
110-
/* margin: 0 0 5px; */
111-
/* padding: 0; */
112-
/* border-top: 1px solid #d6d6d6; */
113-
/* background: #f0f0f0 url(toggle_block_stretch.gif) repeat-y left top; */
114-
/* overflow: hidden; */
115-
/* font-size: 1.2em; */
116-
/* width: 800px; */
117-
/* clear: both; */
118105
padding: 10px; /*--Padding of Container--*/
119106
}
120107
.toggle_container_subtitle {
@@ -133,11 +120,15 @@ h2.active {
133120
text-decoration: underline;
134121
}
135122

123+
.contentTD {
124+
width: 80%;
125+
padding-left: 4px;
126+
}
127+
136128
/* SIDEBAR CSS */
137129
div.navbar {
138-
font-size:.8em;
130+
font-size:.9em;
139131
font-weight: normal;
140-
color: red;
141132
}
142133

143134
div.navbar a:hover {
@@ -153,8 +144,6 @@ h2.active {
153144
}
154145

155146
div.navbar ul li {
156-
/* font-size:.9em; */
157-
/* font-weight: bold; */
158147
margin-bottom: 0px;
159148
margin-left: 0px;
160149
padding: 2px;
@@ -185,7 +174,6 @@ h2.active {
185174
display: block;
186175
text-decoration: none;
187176
padding: 5px 5px 5px 10px;
188-
/* font-size: .9em; */
189177
color: black;
190178
}
191179

@@ -202,8 +190,6 @@ h2.active {
202190
display: block;
203191
text-decoration: none;
204192
padding: 5px 5px 5px 10px;
205-
/* font-size: .9em; */
206-
/* font-weight: bold; */
207193
color: black;
208194
}
209195

src/org/salesforce/apexdoc/Constants.java

+11-10
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,7 @@ public class Constants {
5050

5151
"</script>" +
5252
"</head>" +
53-
"<body>" +
54-
"<div class='topsection'>" +
55-
"<table>" +
56-
"<tr><td>" +
57-
"<img src='apex_doc_logo.png' style='border:1px solid #000;'/>" +
58-
"</td>" +
59-
"<td>";
53+
"<body>";
6054

6155
public static final String HEADER_CLOSE =
6256
"</td>" +
@@ -65,19 +59,26 @@ public class Constants {
6559
"</div>";
6660

6761
public static final String FOOTER = "</div></div></td></tr></table><hr/>" +
68-
"<center style='font-size:10px;'><a href='http://code.google.com/p/apexdoc/'>Powered By ApexDoc </a>" +
62+
"<center style='font-size:.8em;'><a href='http://github.com/SalesforceFoundation/ApexDoc' target='_blank'>Powered By ApexDoc</a>" +
6963
"</center></body></html>";
7064

7165
public static final String ROOT_DIRECTORY = "ApexDocumentation";
7266
public static final String DEFAULT_HOME_CONTENTS = "<h1>Project Home</h2>";
73-
public static final String PROJECT_DETAIL = "<h2 style='margin:0px;'>Project Demo</h2>" +
67+
public static final String PROJECT_DETAIL =
68+
"<div class='topsection'>" +
69+
"<table>" +
70+
"<tr><td>" +
71+
"<img src='apex_doc_logo.png' style='border:1px solid #000;'/>" +
72+
"</td>" +
73+
"<td>" +
74+
"<h2 style='margin:0px;'>Project Demo</h2>" +
7475
"Check out the gitHub project at:<br/>" +
7576
"<a href='http://github.com/SalesforceFoundation/ApexDoc'>http://github.com/SalesforceFoundation/ApexDoc</a><br/>";
7677

7778
public static String getHeader(String projectDetail){
7879
String header;
7980
if(projectDetail != null && projectDetail.trim().length() > 0){
80-
header = Constants.HEADER_OPEN + projectDetail + Constants.HEADER_CLOSE;
81+
header = Constants.HEADER_OPEN + projectDetail;
8182
}else{
8283
header = Constants.HEADER_OPEN + Constants.PROJECT_DETAIL + Constants.HEADER_CLOSE;
8384
}

src/org/salesforce/apexdoc/FileManager.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ public void makeFile(Hashtable<String, ClassGroup> mapClassNameToClassGroup, Arr
113113
links += getPageLinks(mapClassNameToClassGroup, cModels);
114114

115115
if(homeContents != null && homeContents.trim().length() > 0 ){
116-
homeContents = links + "<td width='80%'>" + "<h2 class='section-title'>Home</h2>" + homeContents + "</td>";
116+
homeContents = links + "<td class='contentTD'>" + "<h2 class='section-title'>Home</h2>" + homeContents + "</td>";
117117
homeContents = Constants.getHeader(projectDetail) + homeContents + Constants.FOOTER;
118118
//createHTML("index.php", homeContents);
119119
}else{
120120
homeContents = Constants.DEFAULT_HOME_CONTENTS;
121-
homeContents = links + "<td width='80%'>" + "<h2 class='section-title'>Home</h2>" + homeContents + "</td>";
121+
homeContents = links + "<td class='contentTD'>" + "<h2 class='section-title'>Home</h2>" + homeContents + "</td>";
122122
homeContents = Constants.getHeader(projectDetail) + homeContents + Constants.FOOTER;
123123
//createHTML("index.php", homeContents);
124124
}
@@ -135,10 +135,10 @@ public void makeFile(Hashtable<String, ClassGroup> mapClassNameToClassGroup, Arr
135135
String contents = links;
136136
if(cModel.getNameLine() != null && cModel.getNameLine().length() > 0){
137137
fileName = cModel.getClassName();
138-
contents += "<td width='80%'>";
138+
contents += "<td class='contentTD'>";
139139
contents += "<h2 class='section-title'>" + strLinkfromModel(cModel, cModel.getClassName(), hostedSourceURL) +
140140
cModel.getClassName() + "</a>" +
141-
"<span style='float:right;margin-top:-5px;'><input type='button' value='+/- all' onclick='ToggleAll();' /></span>" +
141+
"<span style='float:right;vertical-align:middle;'><input type='button' value='+/- all' onclick='ToggleAll();' /></span>" +
142142
"</h2>" +
143143
"<table class='details' rules='all' border='1' cellpadding='6'>" +
144144
"<tr><th>Author</th><td>" + cModel.getAuthor() + "</td></tr>" +
@@ -227,7 +227,7 @@ private void createClassGroupContent(Hashtable<String, String> classHashTable, S
227227
if (cg.getContentSource() != null) {
228228
String cgContent = parseHTMLFile(cg.getContentSource());
229229
if (cgContent != null) {
230-
String strHtml = Constants.getHeader(projectDetail) + links + "<td width='80%'>" + "<h2 class='section-title'>" + cg.getName() + "</h2>" + cgContent + "</td>";
230+
String strHtml = Constants.getHeader(projectDetail) + links + "<td class='contentTD'>" + "<h2 class='section-title'>" + cg.getName() + "</h2>" + cgContent + "</td>";
231231
strHtml += Constants.FOOTER;
232232
classHashTable.put(cg.getContentFilename(), strHtml);
233233
if (monitor != null) monitor.worked(1);

0 commit comments

Comments
 (0)