distroquery: fix width tag in img entries and add some css classes
This commit is contained in:
parent
34a19d20ed
commit
714aba96fd
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* distroquery - tool for querying data generated by distromatic
|
* 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
|
* 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
|
* the terms of version 2 of the GNU General Public License as published by the
|
||||||
@ -569,14 +569,14 @@ void printQueryResponse() {
|
|||||||
sqlite3_step(stmt1);
|
sqlite3_step(stmt1);
|
||||||
get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX);
|
get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX);
|
||||||
if (query_compact)
|
if (query_compact)
|
||||||
printf("<div style='position:relative'>");
|
printf("<div class=\"distroquerycompact\" style='position:relative'>");
|
||||||
else
|
else
|
||||||
printf("<div style='position:relative'><hr><br>");
|
printf("<div style='position:relative'><hr><br>");
|
||||||
printTagsLine(query_repositories[i]->arch[a],
|
printTagsLine(query_repositories[i]->arch[a],
|
||||||
query_repositories[i]->tag,
|
query_repositories[i]->tag,
|
||||||
(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, "groupdescr")),
|
||||||
(const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "license")));
|
(const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "license")));
|
||||||
printf("<br><img src=\"%s\" width\"16\" height=\"16\"> ", buffer);
|
printf("<br><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\"> ", buffer);
|
||||||
sqlite3_finalize(stmt1);
|
sqlite3_finalize(stmt1);
|
||||||
}
|
}
|
||||||
if (query_compact) {
|
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, "groupdescr")),
|
||||||
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "license")));
|
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "license")));
|
||||||
|
|
||||||
printf("<br><img src=\"%s\" width\"16\" height=\"16\"> ", buffer);
|
printf("<br><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\"> ", buffer);
|
||||||
if (query_compact) {
|
if (query_compact) {
|
||||||
printf("<b><a href='/distribution/search.html?"
|
printf("<b><a href='/distribution/search.html?"
|
||||||
"repository=%s&package=%s&searchbox=true' style=\"color:black\" target='distroquery'>"
|
"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);
|
get_favicon_from_url((const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "url")),buffer,PATH_MAX);
|
||||||
if (is_update) {
|
if (is_update) {
|
||||||
printf("<img src=\"%s/pkgup.png\" title=\"%s\" width=\"14\" height=\"14\"> ",
|
printf("<img class=\"distroqueryimg14\" src=\"%s/pkgup.png\" title=\"%s\" width=\"14\" height=\"14\"> ",
|
||||||
ct->configdefaults->url_dir, updates);
|
ct->configdefaults->url_dir, updates);
|
||||||
} else {
|
} else {
|
||||||
printf("<img src=\"%s/pkg.png\" width=\"14\" height=\"14\"> ", ct->configdefaults->url_dir);
|
printf("<img class=\"distroqueryimg14\" src=\"%s/pkg.png\" width=\"14\" height=\"14\"> ", ct->configdefaults->url_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
buildtime = sqlite3_column_int(statement,sqlite3_find_column_id(statement, NULL, "buildtime"));
|
buildtime = sqlite3_column_int(statement,sqlite3_find_column_id(statement, NULL, "buildtime"));
|
||||||
@ -1009,7 +1009,7 @@ void printSpecialQueryResponse() {
|
|||||||
simpleTimeToTemplate(buildtime,"%m/%d",&strdate);
|
simpleTimeToTemplate(buildtime,"%m/%d",&strdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s <img src=\"%s\" width\"12\" height=\"12\"> ", strdate, buffer);
|
printf("%s <img class=\"distroqueryimg12\" src=\"%s\" width=\"12\" height=\"12\"> ", strdate, buffer);
|
||||||
printf("<b><a href='/distribution/search.html?"
|
printf("<b><a href='/distribution/search.html?"
|
||||||
"repository=%s&package=%s&searchbox=true' style=\"color:black\" target='distroquery' title=\"%s\">"
|
"repository=%s&package=%s&searchbox=true' style=\"color:black\" target='distroquery' title=\"%s\">"
|
||||||
"%s</a></b> %s-%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, "version")),
|
||||||
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "release")));
|
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "release")));
|
||||||
if (warning[0] != 0) {
|
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);
|
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);
|
get_favicon_from_url((const char*)sqlite3_column_text(stmt1,sqlite3_find_column_id(stmt1, NULL, "url")),buffer,PATH_MAX);
|
||||||
|
|
||||||
printf("<br><br>"
|
printf("<br><br>"
|
||||||
"<h1><img src=\"%s\" width\"16\" height=\"16\"> "
|
"<h1><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\"> "
|
||||||
"%s - %s</h1>%s: %s-%s<br>URL: <a href=\"%s\" target=_new>%s</a><br>%s: %s",
|
"%s - %s</h1>%s: %s-%s<br>URL: <a href=\"%s\" target=_new>%s</a><br>%s: %s",
|
||||||
buffer,
|
buffer,
|
||||||
(const char*)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),
|
(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);
|
get_favicon_from_url((char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "url")),buffer,PATH_MAX);
|
||||||
|
|
||||||
printf("<br><br>"
|
printf("<br><br>"
|
||||||
"<h1><img src=\"%s\" width\"16\" height=\"16\"> "
|
"<h1><img class=\"distroqueryimg16\" src=\"%s\" width=\"16\" height=\"16\"> "
|
||||||
"%s - %s</h1>%s: %s-%s<br>URL: <a href=\"%s\" target=_new>%s</a><br>Size: %s",
|
"%s - %s</h1>%s: %s-%s<br>URL: <a href=\"%s\" target=_new>%s</a><br>Size: %s",
|
||||||
buffer,
|
buffer,
|
||||||
(char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),
|
(char *)sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),
|
||||||
|
Loading…
Reference in New Issue
Block a user