Changeset 199
- Timestamp:
- Sep 9, 2006, 12:42:09 PM (17 years ago)
- Location:
- trunk/lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Directory.cc
r198 r199 125 125 std::cout << "Printing output for " << path_ << std::endl; 126 126 std::ofstream os(output.c_str()); 127 print_header(os); 127 print_header(os, name(), level_); 128 path_anchor(os); 128 129 os << "<p align=center>\n<img src='" 129 130 << file_name(stats_.plot(output_name()+"/index.png", output_name())) -
trunk/lib/File.cc
r198 r199 65 65 std::cout << "Printing output for " << path_ << std::endl; 66 66 std::ofstream os(output.c_str()); 67 print_header(os); 67 print_header(os, name(), level_); 68 path_anchor(os); 68 69 os << "<p align=center>\n<img src='" 69 70 << file_name(stats_.plot(output_name()+".png",output_name())) -
trunk/lib/Node.cc
r185 r199 54 54 void Node::path_anchor(std::ostream& os) const 55 55 { 56 os << "<h2 class=\"path\">\n"; 56 57 std::vector<std::string> words; 57 58 words.reserve(level_+1); … … 66 67 anchor(os,href(), words.back(), level_+2-words.size(), 67 68 "View " + words.back()); 69 os << "\n</h2>\n"; 68 70 } 69 71 … … 103 105 104 106 105 void Node::print_header(std::ostream& os) const106 {107 os << "<!DOCTYPE html\n"108 << "PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n"109 << "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"110 << "<html xmlns=\"http://www.w3.org/1999/xhtml\""111 << " xml:lang=\"en\" lang=\"en\"><head>\n"112 << "<head>\n"113 << "<title> svndigest " << name() << "</title>\n"114 << "</head>\n"115 << "<link rel=\"stylesheet\" "116 << "href=\"";117 for (u_int i=0; i<level_; ++i)118 os << "../";119 os << "svndigest.css\" type=\"text/css\" />\n"120 << "<body>\n"121 << "<div id=\"menu\">"122 << "<ul><li></li>"123 << "<li>";124 anchor(os, "index.html", "Home", level_, "Main page");125 os << "</li>"126 << "</ul></div>"127 << "<div id=\"main\">\n"128 << "<h2 class=\"path\">\n";129 path_anchor(os);130 os << "\n</h2>\n";131 }132 133 107 }} // end of namespace svndigest and namespace theplu -
trunk/lib/Node.h
r198 r199 156 156 157 157 /// 158 /// print path in html format (with anchors) to @a os 159 /// 160 void path_anchor(std::ostream& os) const; 161 162 /// 158 163 /// @brief print html footer of page 159 164 /// 160 165 void print_footer(std::ostream&) const; 161 166 162 ///163 /// @brief print html header of page164 ///165 void print_header(std::ostream&) const;166 167 167 u_int level_; 168 168 std::string output_name_; //without suffix … … 175 175 /// 176 176 Node(const Node&); 177 178 ///179 /// print path in html format (with anchors) to @a os180 ///181 void path_anchor(std::ostream& os) const;182 177 183 178 bool binary_; -
trunk/lib/html_utility.cc
r190 r199 177 177 178 178 179 void print_header(std::ostream& os, const std::string& title, u_int level) 180 { 181 os << "<!DOCTYPE html\n" 182 << "PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n" 183 << "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" 184 << "<html xmlns=\"http://www.w3.org/1999/xhtml\"" 185 << " xml:lang=\"en\" lang=\"en\"><head>\n" 186 << "<head>\n" 187 << "<title> svndigest " << title << "</title>\n" 188 << "</head>\n" 189 << "<link rel=\"stylesheet\" " 190 << "href=\""; 191 for (u_int i=0; i<level; ++i) 192 os << "../"; 193 os << "svndigest.css\" type=\"text/css\" />\n" 194 << "<body>\n" 195 << "<div id=\"menu\">" 196 << "<ul><li></li>" 197 << "<li>"; 198 anchor(os, "index.html", "Home", level, "Main page"); 199 os << "</li>" 200 << "</ul></div>" 201 << "<div id=\"main\">\n"; 202 } 203 204 179 205 }} // end of namespace svndigest and namespace theplu -
trunk/lib/html_utility.h
r179 r199 56 56 void print_css(std::ostream& s); 57 57 58 /// 59 /// @brief print html header of page 60 /// 61 void print_header(std::ostream&, const std::string& name, u_int level); 62 63 58 64 }} // end of namespace svndigest end of namespace theplu 59 65
Note: See TracChangeset
for help on using the changeset viewer.