Skip to content

Commit

Permalink
HTML Improvements 2
Browse files Browse the repository at this point in the history
Improve and modernise the HTML that is generated.
  • Loading branch information
cjee21 committed Jun 28, 2024
1 parent 547f070 commit 9c8fa6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/MediaInfo/MediaInfo_Inform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ Ztring MediaInfo_Internal::Inform()
#endif //defined(MEDIAINFO_CSV_YES)

if (HTML)
Retour+=__T("<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>MediaInfo</title>\n</head>\n<body>\n");
Retour+=__T("<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>MediaInfo</title>\n <style>\n :root {\n color-scheme: var(--color-scheme, light);\n @media (prefers-color-scheme: dark) { --color-scheme: dark; --border-color: blue; }\n }\n table { width: 100%; table-layout: fixed; padding: 1px; border-spacing: 2px; border:1px solid var(--border-color, navy); }\n td.properties { width: 25vw; min-width: 150px; max-width: 250px; }\n h2 { margin-top: 0px; }\n </style>\n</head>\n<body>\n");
#if defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_JSON_YES)
if (XML_0_7_78_MA || XML_0_7_78_MI || JSON)
{
Expand Down Expand Up @@ -469,7 +469,7 @@ Ztring MediaInfo_Internal::Inform()
for (size_t StreamPos=0; StreamPos<(size_t)Count_Get((stream_t)StreamKind); StreamPos++)
{
//Pour chaque stream
if (HTML) Retour+=__T("<table width=\"100%\" style=\"width: 100%; table-layout: fixed; padding: 1px; border-spacing: 2px; border:1px solid Navy\">\n <tr>\n <td width=\"150\" style=\"width: 20vw; min-width: 150px; max-width: 250px\"><h2 style=\"margin-top: 0px\">");
if (HTML) Retour+=__T("<table>\n <tr>\n <td class=\"properties\"><h2>");
#if defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_JSON_YES)
Node* Node_Current=NULL;
if (XML || XML_0_7_78_MA || XML_0_7_78_MI || JSON) Node_Current=Node_MI?Node_MI->Add_Child("track", true):Node_Main->Add_Child("track", true);
Expand All @@ -489,7 +489,7 @@ Ztring MediaInfo_Internal::Inform()
}
Retour+=A;
}
if (HTML) Retour+=__T("</h2></td>\n <td colspan=\"3\"></td>\n </tr>");
if (HTML) Retour+=__T("</h2></td>\n <td></td>\n </tr>");
#if defined(MEDIAINFO_XML_YES) || defined(MEDIAINFO_JSON_YES)
if (XML || XML_0_7_78_MA || XML_0_7_78_MI || JSON)
{
Expand Down Expand Up @@ -860,7 +860,7 @@ Ztring MediaInfo_Internal::Inform (stream_t StreamKind, size_t StreamPos, bool I

Retour+=__T(" <tr>\n <td><i>");
Retour+=Prefix+Nom.TrimLeft();
Retour+=__T(" :</i></td>\n <td colspan=\"3\">");
Retour+=__T(" :</i></td>\n <td>");
Retour+=Valeur;
Retour+=__T("</td>\n </tr>");
}
Expand Down

0 comments on commit 9c8fa6e

Please sign in to comment.