kopia lustrzana https://gitlab.com/tomaszg/geostat
Add a class to links of recommended caches, show a star via CSS
rodzic
8d548e7002
commit
2ed5aa1dfa
|
@ -20,7 +20,10 @@ std::string Cache::link() const {
|
|||
}
|
||||
|
||||
std::string Cache::link_name() const {
|
||||
return "<a href=\"" + link() + "\">" + safe_name() + " (" + code + ")</a>";
|
||||
if (recommended)
|
||||
return "<a class=\"fav\" href=\"" + link() + "\">" + safe_name() + " (" + code + ")</a>";
|
||||
else
|
||||
return "<a href=\"" + link() + "\">" + safe_name() + " (" + code + ")</a>";
|
||||
}
|
||||
|
||||
|
||||
|
|
6
geo.css
6
geo.css
|
@ -42,6 +42,12 @@ a:active {
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.fav {
|
||||
background-image: url("rating-star.png");
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
table,
|
||||
dl,
|
||||
.heatmap {
|
||||
|
|
|
@ -287,7 +287,7 @@ int main(int argc, char** argv) {
|
|||
std::cout << "<html>\n";
|
||||
std::cout << " <head>\n";
|
||||
std::cout << " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n";
|
||||
std::cout << " <link rel=\"stylesheet\" type=\"text/css\" href=\"geo.css?ver=6\">\n";
|
||||
std::cout << " <link rel=\"stylesheet\" type=\"text/css\" href=\"geo.css?ver=7\">\n";
|
||||
std::cout << " <title>Geocaching stats</title>\n";
|
||||
std::cout << "</head>\n";
|
||||
std::cout << "<body>\n";
|
||||
|
|
|
@ -53,4 +53,5 @@ configure_file(input: 'maps/USA.png', output: 'USA.png', copy: true, install: tr
|
|||
configure_file(input: 'maps/Europe.png', output: 'Europe.png', copy: true, install: true, install_dir: '.')
|
||||
configure_file(input: 'maps/World.png', output: 'World.png', copy: true, install: true, install_dir: '.')
|
||||
|
||||
configure_file(input: 'rating-star.png', output: 'rating-star.png', copy: true, install: true, install_dir: '.')
|
||||
configure_file(input: 'geo.css', output: 'geo.css', copy: true, install: true, install_dir: '.')
|
||||
|
|
Ładowanie…
Reference in New Issue