Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add viewport meta in head #32

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/irclog2html/irclog2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ def head(self, title, prev=None, index=None, next=None, searchbox=False):
\t<meta name="generator" content="irclog2html.py %(VERSION)s by Marius Gedminas">
\t<meta name="version" content="%(VERSION)s - %(RELEASE)s">
\t<meta http-equiv="Content-Type" content="text/html; charset=%(charset)s">
\t<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body text="#000000" bgcolor="#ffffff"><tt>""" % {
'VERSION': VERSION,
Expand Down Expand Up @@ -571,6 +572,7 @@ def head(self, title, prev=('', ''), index=('', ''), next=('', ''),
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%(charset)s" />
<meta name="viewport" content="width=device-width, initial-scale=1">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, XHTML style should be using /> for standalone tags.

(I'm not sure I care, XHTML is dead.)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I fixed it after merging in the end.)

<title>%(title)s</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclog2html.py %(VERSION)s by Marius Gedminas" />
Expand Down
1 change: 1 addition & 0 deletions src/irclog2html/irclogsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%(charset)s" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>%(title)s</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclogsearch.py %(VERSION)s by Marius Gedminas" />
Expand Down
1 change: 1 addition & 0 deletions src/irclog2html/irclogserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{title}</title>
<link rel="stylesheet" href="irclog.css">
<meta name="generator" content="irclogserver.py {version} by Marius Gedminas">
Expand Down
1 change: 1 addition & 0 deletions src/irclog2html/logs2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def write_index(outfile, title, logfiles, searchbox=False, latest_log_link=None)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%(charset)s" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>%(title)s</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="logs2html.py %(VERSION)s by Marius Gedminas" />
Expand Down
8 changes: 8 additions & 0 deletions src/irclog2html/tests/test_irclog2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def doctest_SimpleTextStyle():
<meta name="generator" content="irclog2html.py ... by Marius Gedminas">
<meta name="version" content="...">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body text="#000000" bgcolor="#ffffff"><tt>

Expand Down Expand Up @@ -364,6 +365,7 @@ def doctest_SimpleTextStyle_colourful():
<meta name="generator" content="irclog2html.py ... by Marius Gedminas">
<meta name="version" content="...">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body text="#000000" bgcolor="#ffffff"><tt>

Expand Down Expand Up @@ -401,6 +403,7 @@ def doctest_TextStyle_colourful():
<meta name="generator" content="irclog2html.py ... by Marius Gedminas">
<meta name="version" content="...">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body text="#000000" bgcolor="#ffffff"><tt>

Expand Down Expand Up @@ -437,6 +440,7 @@ def doctest_SimpleTableStyle():
<meta name="generator" content="irclog2html.py ... by Marius Gedminas">
<meta name="version" content="...">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body text="#000000" bgcolor="#ffffff"><tt>
<table cellspacing=3 cellpadding=2 border=0>
Expand Down Expand Up @@ -475,6 +479,7 @@ def doctest_TableStyle():
<meta name="generator" content="irclog2html.py ... by Marius Gedminas">
<meta name="version" content="...">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body text="#000000" bgcolor="#ffffff"><tt>
<table cellspacing=3 cellpadding=2 border=0>
Expand Down Expand Up @@ -511,6 +516,7 @@ def doctest_XHTMLStyle():
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IRC logs of #channel for Monday, 2008-06-10</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclog2html.py ... by Marius Gedminas" />
Expand Down Expand Up @@ -568,6 +574,7 @@ def doctest_XHTMLStyle_with_navigation_and_searchbox():
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IRC logs of #channel for Monday, 2008-06-10</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclog2html.py ... by Marius Gedminas" />
Expand Down Expand Up @@ -599,6 +606,7 @@ def doctest_XHTMLTableStyle():
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IRC logs of #channel for Monday, 2008-06-10</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclog2html.py ... by Marius Gedminas" />
Expand Down
4 changes: 4 additions & 0 deletions src/irclog2html/tests/test_irclogsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def doctest_print_search_form():
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search IRC logs</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclogsearch.py ... by Marius Gedminas" />
Expand Down Expand Up @@ -205,6 +206,7 @@ def doctest_print_search_results():
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search IRC logs</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclogsearch.py ... by Marius Gedminas" />
Expand Down Expand Up @@ -294,6 +296,7 @@ def doctest_main_prints_form():
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search IRC logs</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclogsearch.py ... by Marius Gedminas" />
Expand Down Expand Up @@ -332,6 +335,7 @@ def doctest_main_searches():
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search IRC logs</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="irclogsearch.py ... by Marius Gedminas" />
Expand Down
1 change: 1 addition & 0 deletions src/irclog2html/tests/test_logs2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ def doctest_write_index():
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IRC logs for somechannel</title>
<link rel="stylesheet" href="irclog.css" />
<meta name="generator" content="logs2html.py ... by Marius Gedminas" />
Expand Down