diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-16 12:08:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-16 16:42:40 +0200 |
commit | 6eca8a647c79e9a5b100672b55f5d02273a28772 (patch) | |
tree | 5361b9007cace2dfdf95c55b009abdcaab1ad60e /brep/page | |
parent | ba283a252267e0365408db3d6b7cf410edccac1b (diff) |
Implement 'about' web page
Diffstat (limited to 'brep/page')
-rw-r--r-- | brep/page | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -22,8 +22,7 @@ namespace brep class CSS_LINKS { public: - CSS_LINKS (const path& p, const dir_path& r): - path_ (p), root_ (r) {} + CSS_LINKS (const path& p, const dir_path& r): path_ (p), root_ (r) {} void operator() (xml::serializer& s) const; @@ -263,13 +262,15 @@ namespace brep class TR_LOCATION { public: - TR_LOCATION (const std::string& l): location_ (l) {} + TR_LOCATION (const std::string& n, const dir_path& r) + : name_ (n), root_ (r) {} void operator() (xml::serializer& s) const; private: - const std::string& location_; + const std::string& name_; + const dir_path& root_; }; // Generates package download URL element. @@ -307,13 +308,13 @@ namespace brep public: // Genereate full description. // - P_DESCRIPTION (const std::string& d) - : description_ (d), length_ (d.size ()), url_ (nullptr) {} + P_DESCRIPTION (const std::string& d, bool u = true) + : description_ (d), length_ (d.size ()), url_ (nullptr), unique_ (u) {} // Genereate brief description. // P_DESCRIPTION (const std::string& d, size_t l, const std::string& u) - : description_ (d), length_ (l), url_ (&u) {} + : description_ (d), length_ (l), url_ (&u), unique_ (false) {} void operator() (xml::serializer& s) const; @@ -322,6 +323,7 @@ namespace brep const std::string& description_; std::size_t length_; const std::string* url_; // Full page url. + bool unique_; }; // Generates package description element. @@ -369,6 +371,12 @@ namespace brep std::size_t page_number_count_; const std::string& url_; }; + + // Convert the argument to a string representing the valid HTML 5 'id' + // attribute value. + // + std::string + id_attribute (const std::string& v); } #endif // BREP_PAGE |