Commit 714aba96fd529ec57c470e0900d829c1edb03af0

Authored by Silvan Calarco
1 parent 34a19d20ed
Exists in master

distroquery: fix width tag in img entries and add some css classes

Showing 1 changed file with 11 additions and 11 deletions Side-by-side Diff

1 1 /*
2 2 * distroquery - tool for querying data generated by distromatic
3 3 *
4   - * Copyright (C) 2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
  4 + * Copyright (C) 2013-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
5 5 *
6 6 * This program is free software; you can redistribute it and/or modify it under
7 7 * the terms of version 2 of the GNU General Public License as published by the
... ... @@ -152,7 +152,7 @@
152 152 int sqlite3_find_column_id(sqlite3_stmt *stmt, const char* table, const char* name) {
153 153 const char* colname;
154 154 int id = 0;
155   -
  155 +
156 156 while ((colname = sqlite3_column_name(stmt, id))) {
157 157 if (!strcmp(colname, name)) {
158 158 if (table) {
159 159  
... ... @@ -569,14 +569,14 @@
569 569 sqlite3_step(stmt1);
570 570 get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX);
571 571 if (query_compact)
572   - printf("<div style='position:relative'>");
  572 + printf("<div class=\"distroquerycompact\" style='position:relative'>");
573 573 else
574 574 printf("<div style='position:relative'><hr><br>");
575 575 printTagsLine(query_repositories[i]->arch[a],
576 576 query_repositories[i]->tag,
577 577 (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "groupdescr")),
578 578 (const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "license")));
579   - printf("<br><img src=\"%s\" width\"16\" height=\"16\">&nbsp;", buffer);
  579 + printf("<br><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\">&nbsp;", buffer);
580 580 sqlite3_finalize(stmt1);
581 581 }
582 582 if (query_compact) {
... ... @@ -768,7 +768,7 @@
768 768 (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "groupdescr")),
769 769 (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "license")));
770 770  
771   - printf("<br><img src=\"%s\" width\"16\" height=\"16\">&nbsp;", buffer);
  771 + printf("<br><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\">&nbsp;", buffer);
772 772 if (query_compact) {
773 773 printf("<b><a href='/distribution/search.html?"
774 774 "repository=%s&package=%s&searchbox=true' style=\"color:black\" target='distroquery'>"
775 775  
... ... @@ -996,10 +996,10 @@
996 996  
997 997 get_favicon_from_url((const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "url")),buffer,PATH_MAX);
998 998 if (is_update) {
999   - printf("<img src=\"%s/pkgup.png\" title=\"%s\" width=\"14\" height=\"14\">&nbsp;",
  999 + printf("<img class=\"distroqueryimg14\" src=\"%s/pkgup.png\" title=\"%s\" width=\"14\" height=\"14\">&nbsp;",
1000 1000 ct->configdefaults->url_dir, updates);
1001 1001 } else {
1002   - printf("<img src=\"%s/pkg.png\" width=\"14\" height=\"14\">&nbsp;", ct->configdefaults->url_dir);
  1002 + printf("<img class=\"distroqueryimg14\" src=\"%s/pkg.png\" width=\"14\" height=\"14\">&nbsp;", ct->configdefaults->url_dir);
1003 1003 }
1004 1004  
1005 1005 buildtime = sqlite3_column_int(statement,sqlite3_find_column_id(statement, NULL, "buildtime"));
... ... @@ -1009,7 +1009,7 @@
1009 1009 simpleTimeToTemplate(buildtime,"%m/%d",&strdate);
1010 1010 }
1011 1011  
1012   - printf("%s <img src=\"%s\" width\"12\" height=\"12\">&nbsp;", strdate, buffer);
  1012 + printf("%s <img class=\"distroqueryimg12\" src=\"%s\" width=\"12\" height=\"12\">&nbsp;", strdate, buffer);
1013 1013 printf("<b><a href='/distribution/search.html?"
1014 1014 "repository=%s&package=%s&searchbox=true' style=\"color:black\" target='distroquery' title=\"%s\">"
1015 1015 "%s</a></b> %s-%s",
... ... @@ -1020,7 +1020,7 @@
1020 1020 (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "version")),
1021 1021 (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "release")));
1022 1022 if (warning[0] != 0) {
1023   - printf("<img src=\"%s/warning-icon.png\" title=\"%s\" width=\"14\" height=\"14\">",
  1023 + printf("<img class=\"distroqueryimg14\" src=\"%s/warning-icon.png\" title=\"%s\" width=\"14\" height=\"14\">",
1024 1024 ct->configdefaults->url_dir, warning);
1025 1025  
1026 1026 }
... ... @@ -1098,7 +1098,7 @@
1098 1098 get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX);
1099 1099  
1100 1100 printf("<br><br>"
1101   - "<h1><img src=\"%s\" width\"16\" height=\"16\">&nbsp;"
  1101 + "<h1><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\">&nbsp;"
1102 1102 "%s - %s</h1>%s: %s-%s<br>URL: <a href=\"%s\" target=_new>%s</a><br>%s: %s",
1103 1103 buffer,
1104 1104 (const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),
... ... @@ -1362,7 +1362,7 @@
1362 1362 get_favicon_from_url((char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "url")),buffer,PATH_MAX);
1363 1363  
1364 1364 printf("<br><br>"
1365   - "<h1><img src=\"%s\" width\"16\" height=\"16\">&nbsp;"
  1365 + "<h1><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\">&nbsp;"
1366 1366 "%s - %s</h1>%s: %s-%s<br>URL: <a href=\"%s\" target=_new>%s</a><br>Size: %s",
1367 1367 buffer,
1368 1368 (char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),