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

Commit

Permalink
allow the user to replace the entire header. updated styles for a fla…
Browse files Browse the repository at this point in the history
…tter look.
  • Loading branch information
davidhabib committed Dec 9, 2014
1 parent 1efaee8 commit b19a0e0
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 56 deletions.
68 changes: 27 additions & 41 deletions src/org/salesforce/apexdoc/ApexDoc.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
body{
font-family:Verdana, Arial, Helvetica, sans-serif;
/* font-family:Verdana, Arial, Helvetica, sans-serif; */
font-family: "ProximaNovaSoft-Regular", Calibri, "Gill Sans", "Gill Sans MT", Candara, Segoe, "Segoe UI", Arial, sans-serif;
font-size:100%;
margin:0px;
padding:0px;
}

/* the top page banner */
.topsection {
background-color:SteelBlue;
background-color: rgb(98,181,229);
width:100%;
height:100px;
height:110px;
color:white;
border:1px solid #000;
}
.topsection td{
color:white;
Expand All @@ -20,27 +20,28 @@ body{

/* section-title is the horizontal section headers that declare the classname, methods, etc. */
.section-title {
background-color:SteelBlue;
border:1px solid #000000;
background-color: rgb(155,203,236);
color:white;
padding:5px;
font-size:.9em;
font-size: 100%;
font-weight:bold;
margin-bottom:2px;
}
.section-title a {
color:white;
}

/* details is used for displaying the apexdoc values like author, date, description, params, return value, etc. */
.details {
border-color:lightgray;
font-size: .9em;
}
.details th{
background-color:whitesmoke;
/* border:1px solid gray; */
color:black;
font-size:.7em;
/* font-size:.7em; */
padding:3px;
text-align:right;
/* width:150px; */
}
.details th.paramHeader{
background-color:white;
Expand All @@ -53,7 +54,7 @@ body{
padding-left:10px;
}
.details td{
font-size:.7em;
/* font-size:.7em; */
}

/* properties is used to display the table of class properties */
Expand All @@ -64,41 +65,35 @@ body{
vertical-align: top;
}
.clsPropertyName {
font-size:.7em;
font-size:.8em;
font-weight:bold;
}
.clsPropertyDeclaration {
font-family:Courier;
font-size:.7em;
font-size:.8em;
font-weight:normal;
color:MediumBlue;
}
.clsPropertyDescription {
font-size:.7em;
font-size:.8em;
font-weight:normal;
}

/* trigger is the set of styles to provide the expand/collapse bar */
h2.trigger {
/* padding: 0 0 0 10px;*/
margin: 0 0 2 0;
/* background: url(h2_trigger_a.gif) no-repeat; */
background-color:gray;
border:1px solid #000000;
/* height: 46px; */
/* line-height: 300%; */
/* width: 450px; */
font-size: .8em;
font-weight: bold;
background-color: rgb(239,241,246);
color: black;
font-size: 100%;
font-weight: normal;
padding:2px;
}
h2.trigger a {
color: #fff;
color: black;
text-decoration: none;
/* display: block; */
}
h2.trigger a:hover {
color: #ccc;
color: darkgrey;
}
h2.active {
background-position: left bottom;
Expand All @@ -107,14 +102,6 @@ h2.active {

/* toggle_container is the section that gets shown/hidden when the trigger is expanded/collapsed */
.toggle_container {
/* margin: 0 0 5px; */
/* padding: 0; */
/* border-top: 1px solid #d6d6d6; */
/* background: #f0f0f0 url(toggle_block_stretch.gif) repeat-y left top; */
/* overflow: hidden; */
/* font-size: 1.2em; */
/* width: 800px; */
/* clear: both; */
padding: 10px; /*--Padding of Container--*/
}
.toggle_container_subtitle {
Expand All @@ -133,11 +120,15 @@ h2.active {
text-decoration: underline;
}

.contentTD {
width: 80%;
padding-left: 4px;
}

/* SIDEBAR CSS */
div.navbar {
font-size:.8em;
font-size:.9em;
font-weight: normal;
color: red;
}

div.navbar a:hover {
Expand All @@ -153,8 +144,6 @@ h2.active {
}

div.navbar ul li {
/* font-size:.9em; */
/* font-weight: bold; */
margin-bottom: 0px;
margin-left: 0px;
padding: 2px;
Expand Down Expand Up @@ -185,7 +174,6 @@ h2.active {
display: block;
text-decoration: none;
padding: 5px 5px 5px 10px;
/* font-size: .9em; */
color: black;
}

Expand All @@ -202,8 +190,6 @@ h2.active {
display: block;
text-decoration: none;
padding: 5px 5px 5px 10px;
/* font-size: .9em; */
/* font-weight: bold; */
color: black;
}

Expand Down
21 changes: 11 additions & 10 deletions src/org/salesforce/apexdoc/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,7 @@ public class Constants {

"</script>" +
"</head>" +
"<body>" +
"<div class='topsection'>" +
"<table>" +
"<tr><td>" +
"<img src='apex_doc_logo.png' style='border:1px solid #000;'/>" +
"</td>" +
"<td>";
"<body>";

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

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

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

public static String getHeader(String projectDetail){
String header;
if(projectDetail != null && projectDetail.trim().length() > 0){
header = Constants.HEADER_OPEN + projectDetail + Constants.HEADER_CLOSE;
header = Constants.HEADER_OPEN + projectDetail;
}else{
header = Constants.HEADER_OPEN + Constants.PROJECT_DETAIL + Constants.HEADER_CLOSE;
}
Expand Down
10 changes: 5 additions & 5 deletions src/org/salesforce/apexdoc/FileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ public void makeFile(Hashtable<String, ClassGroup> mapClassNameToClassGroup, Arr
links += getPageLinks(mapClassNameToClassGroup, cModels);

if(homeContents != null && homeContents.trim().length() > 0 ){
homeContents = links + "<td width='80%'>" + "<h2 class='section-title'>Home</h2>" + homeContents + "</td>";
homeContents = links + "<td class='contentTD'>" + "<h2 class='section-title'>Home</h2>" + homeContents + "</td>";
homeContents = Constants.getHeader(projectDetail) + homeContents + Constants.FOOTER;
//createHTML("index.php", homeContents);
}else{
homeContents = Constants.DEFAULT_HOME_CONTENTS;
homeContents = links + "<td width='80%'>" + "<h2 class='section-title'>Home</h2>" + homeContents + "</td>";
homeContents = links + "<td class='contentTD'>" + "<h2 class='section-title'>Home</h2>" + homeContents + "</td>";
homeContents = Constants.getHeader(projectDetail) + homeContents + Constants.FOOTER;
//createHTML("index.php", homeContents);
}
Expand All @@ -135,10 +135,10 @@ public void makeFile(Hashtable<String, ClassGroup> mapClassNameToClassGroup, Arr
String contents = links;
if(cModel.getNameLine() != null && cModel.getNameLine().length() > 0){
fileName = cModel.getClassName();
contents += "<td width='80%'>";
contents += "<td class='contentTD'>";
contents += "<h2 class='section-title'>" + strLinkfromModel(cModel, cModel.getClassName(), hostedSourceURL) +
cModel.getClassName() + "</a>" +
"<span style='float:right;margin-top:-5px;'><input type='button' value='+/- all' onclick='ToggleAll();' /></span>" +
"<span style='float:right;vertical-align:middle;'><input type='button' value='+/- all' onclick='ToggleAll();' /></span>" +
"</h2>" +
"<table class='details' rules='all' border='1' cellpadding='6'>" +
"<tr><th>Author</th><td>" + cModel.getAuthor() + "</td></tr>" +
Expand Down Expand Up @@ -227,7 +227,7 @@ private void createClassGroupContent(Hashtable<String, String> classHashTable, S
if (cg.getContentSource() != null) {
String cgContent = parseHTMLFile(cg.getContentSource());
if (cgContent != null) {
String strHtml = Constants.getHeader(projectDetail) + links + "<td width='80%'>" + "<h2 class='section-title'>" + cg.getName() + "</h2>" + cgContent + "</td>";
String strHtml = Constants.getHeader(projectDetail) + links + "<td class='contentTD'>" + "<h2 class='section-title'>" + cg.getName() + "</h2>" + cgContent + "</td>";
strHtml += Constants.FOOTER;
classHashTable.put(cg.getContentFilename(), strHtml);
if (monitor != null) monitor.worked(1);
Expand Down

0 comments on commit b19a0e0

Please sign in to comment.