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

This commit is contained in:
Silvan Calarco 2014-11-16 15:46:05 +01:00
parent 34a19d20ed
commit 714aba96fd

View File

@ -1,7 +1,7 @@
/*
* distroquery - tool for querying data generated by distromatic
*
* Copyright (C) 2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
* Copyright (C) 2013-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of version 2 of the GNU General Public License as published by the
@ -569,14 +569,14 @@ void printQueryResponse() {
sqlite3_step(stmt1);
get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX);
if (query_compact)
printf("<div style='position:relative'>");
printf("<div class=\"distroquerycompact\" style='position:relative'>");
else
printf("<div style='position:relative'><hr><br>");
printTagsLine(query_repositories[i]->arch[a],
query_repositories[i]->tag,
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "groupdescr")),
(const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "license")));
printf("<br><img src=\"%s\" width\"16\" height=\"16\">&nbsp;", buffer);
printf("<br><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\">&nbsp;", buffer);
sqlite3_finalize(stmt1);
}
if (query_compact) {
@ -768,7 +768,7 @@ void printQueryResponse() {
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "groupdescr")),
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "license")));
printf("<br><img src=\"%s\" width\"16\" height=\"16\">&nbsp;", buffer);
printf("<br><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\">&nbsp;", buffer);
if (query_compact) {
printf("<b><a href='/distribution/search.html?"
"repository=%s&package=%s&searchbox=true' style=\"color:black\" target='distroquery'>"
@ -996,10 +996,10 @@ void printSpecialQueryResponse() {
get_favicon_from_url((const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "url")),buffer,PATH_MAX);
if (is_update) {
printf("<img src=\"%s/pkgup.png\" title=\"%s\" width=\"14\" height=\"14\">&nbsp;",
printf("<img class=\"distroqueryimg14\" src=\"%s/pkgup.png\" title=\"%s\" width=\"14\" height=\"14\">&nbsp;",
ct->configdefaults->url_dir, updates);
} else {
printf("<img src=\"%s/pkg.png\" width=\"14\" height=\"14\">&nbsp;", ct->configdefaults->url_dir);
printf("<img class=\"distroqueryimg14\" src=\"%s/pkg.png\" width=\"14\" height=\"14\">&nbsp;", ct->configdefaults->url_dir);
}
buildtime = sqlite3_column_int(statement,sqlite3_find_column_id(statement, NULL, "buildtime"));
@ -1009,7 +1009,7 @@ void printSpecialQueryResponse() {
simpleTimeToTemplate(buildtime,"%m/%d",&strdate);
}
printf("%s <img src=\"%s\" width\"12\" height=\"12\">&nbsp;", strdate, buffer);
printf("%s <img class=\"distroqueryimg12\" src=\"%s\" width=\"12\" height=\"12\">&nbsp;", strdate, buffer);
printf("<b><a href='/distribution/search.html?"
"repository=%s&package=%s&searchbox=true' style=\"color:black\" target='distroquery' title=\"%s\">"
"%s</a></b> %s-%s",
@ -1020,7 +1020,7 @@ void printSpecialQueryResponse() {
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "version")),
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "release")));
if (warning[0] != 0) {
printf("<img src=\"%s/warning-icon.png\" title=\"%s\" width=\"14\" height=\"14\">",
printf("<img class=\"distroqueryimg14\" src=\"%s/warning-icon.png\" title=\"%s\" width=\"14\" height=\"14\">",
ct->configdefaults->url_dir, warning);
}
@ -1098,7 +1098,7 @@ void printPackageData() {
get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX);
printf("<br><br>"
"<h1><img src=\"%s\" width\"16\" height=\"16\">&nbsp;"
"<h1><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\">&nbsp;"
"%s - %s</h1>%s: %s-%s<br>URL: <a href=\"%s\" target=_new>%s</a><br>%s: %s",
buffer,
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),
@ -1362,7 +1362,7 @@ void printSourcePackageData() {
get_favicon_from_url((char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "url")),buffer,PATH_MAX);
printf("<br><br>"
"<h1><img src=\"%s\" width\"16\" height=\"16\">&nbsp;"
"<h1><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\">&nbsp;"
"%s - %s</h1>%s: %s-%s<br>URL: <a href=\"%s\" target=_new>%s</a><br>Size: %s",
buffer,
(char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),