]> jaekl.net Git - frank.git/commitdiff
Add viewport to pages, to score better on "Mobile Friendly". master
authorChris Jaekl <cejaekl@yahoo.com>
Fri, 10 Aug 2018 02:48:57 +0000 (22:48 -0400)
committerChris Jaekl <cejaekl@yahoo.com>
Fri, 10 Aug 2018 02:48:57 +0000 (22:48 -0400)
index.html
index_fr.html
index_jp.html
prod/net/jaekl/frank/Schedule.java
prod/net/jaekl/frank/Style.java
test/net/jaekl/frank/ScheduleTest.java

index e372d36d4f57da84d1635b2df11b58161ca3f93d..ae8fc81259c7db22a24fcbc23b79507aae708467 100644 (file)
@@ -1,6 +1,7 @@
 <HTML>
   <HEAD>
     <META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8"/>
 <HTML>
   <HEAD>
     <META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8"/>
+    <META NAME="viewport" content="width=device-width"/>
     <TITLE>Frank Welcome Page</TITLE>
     <STYLE>
       body {background-color: #F0F0C0; font-size: 1em; }
     <TITLE>Frank Welcome Page</TITLE>
     <STYLE>
       body {background-color: #F0F0C0; font-size: 1em; }
index 0832a6c699d2464a2f849204c7ff126fce327d17..912829b62ece516a75e6aeb6574e8654ba5dc92f 100644 (file)
@@ -1,6 +1,7 @@
 <HTML>
   <HEAD>
     <META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8"/>
 <HTML>
   <HEAD>
     <META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8"/>
+    <META NAME="viewport" content="width=device-width"/>
     <TITLE>Frank:  Page d'acceuil</TITLE>
     <STYLE>
       body {background-color: #F0F0C0; font-size: 1em; }
     <TITLE>Frank:  Page d'acceuil</TITLE>
     <STYLE>
       body {background-color: #F0F0C0; font-size: 1em; }
index 5cf98139b7300584f77e50c1878996752fb12174..67e4f2cd8e3d3aab5b44d022385ec8911be43901 100644 (file)
@@ -1,6 +1,7 @@
 <HTML>
   <HEAD>
     <META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8"/>
 <HTML>
   <HEAD>
     <META HTTP-EQUIV="Content-Type" content="text/html; charset=UTF-8"/>
+    <META NAME="viewport" content="width=device-width"/>
     <TITLE>フランクへようこそ</TITLE>
     <STYLE>
       body {background-color: #F0F0C0; font-size: 1em; }
     <TITLE>フランクへようこそ</TITLE>
     <STYLE>
       body {background-color: #F0F0C0; font-size: 1em; }
index eb8cb2bce26cee168d800d2baef13770ff96c580..8db11d5d0fd6a7ab332f74a25e3a2dce377c9c6a 100644 (file)
@@ -73,7 +73,8 @@ public class Schedule {
        void writeHeader(PrintWriter pw, String title) {
                pw.println("<HTML>");
                pw.println("<HEAD>");
        void writeHeader(PrintWriter pw, String title) {
                pw.println("<HTML>");
                pw.println("<HEAD>");
-               pw.println("<TITLE>" + title + "</TITLE>");
+               pw.println("  <META NAME=\"viewport\" content=\"width=device-width\"/>");
+               pw.println("  <TITLE>" + title + "</TITLE>");
                new Style().writeStyle(pw);
                pw.println("</HEAD>");
        }
                new Style().writeStyle(pw);
                pw.println("</HEAD>");
        }
index f3d58a9068802ddf8f4afdc49c653c4892b48e3a..e986e71e71591b9d9565ef1f1e3b912b02eb88a2 100644 (file)
@@ -5,13 +5,14 @@ import java.io.PrintWriter;
 public class Style {
        static final String CSS = 
                        "<STYLE>\n" +
 public class Style {
        static final String CSS = 
                        "<STYLE>\n" +
-                       "  body {background-color: #F0F0C0; font-size: 1em; }\n" +
+                       "  body {background-color: #F0F0C0; font-size: 100%; }\n" +
                        "  #errhead td {background-color: #D00000; color: #FFFFFF; font-size: 2em; padding: 3px 3px 3px 3px; text-align: left; }\n" +
                        "  #errtable table { border: 3px solid #D00000; border-collapse: collapse; background-color: #E0E080; }\n" +
                        "  #errtable table, tr, td { padding: 3px; }\n" +
                        "  #errtable tr.alt { background-color: #D0D070; }\n" +
                        "  #errtable td.head {text-align: right; background-color: #D00000; color: #FFFFFF; font-weight: bold; }\n" +
                        "  #errhead td {background-color: #D00000; color: #FFFFFF; font-size: 2em; padding: 3px 3px 3px 3px; text-align: left; }\n" +
                        "  #errtable table { border: 3px solid #D00000; border-collapse: collapse; background-color: #E0E080; }\n" +
                        "  #errtable table, tr, td { padding: 3px; }\n" +
                        "  #errtable tr.alt { background-color: #D0D070; }\n" +
                        "  #errtable td.head {text-align: right; background-color: #D00000; color: #FFFFFF; font-weight: bold; }\n" +
-                       "  #trips {border-collapse: collapse; font-size: 1.5em; }\n" +
+                       "  #trips {border-collapse: collapse; font-size: 80%;}\n" +
+                       "  #trips table {width: 100%;}\n" +
                        "  #trips td, #trips th {border: 1px solid #600000; padding: 3px 3px 3px 3px; text-align: center;}\n" +
                        "  #trips th {background-color: #800000; color: #FFFFFF; }\n" +
                        "  #trips tr.ghost td {background-color: #C0C0C0;}\n" +
                        "  #trips td, #trips th {border: 1px solid #600000; padding: 3px 3px 3px 3px; text-align: center;}\n" +
                        "  #trips th {background-color: #800000; color: #FFFFFF; }\n" +
                        "  #trips tr.ghost td {background-color: #C0C0C0;}\n" +
index 1e1a5176bb200a983ac3b5cc8dc50a801b3c13f4..020e27464a5dc8360e16ee7e2878974a869db763 100644 (file)
@@ -17,7 +17,9 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class ScheduleTest {
 import org.junit.Test;
 
 public class ScheduleTest {
-       static final String TITLE_PREFIX = "<HTML>\n<HEAD>\n<TITLE>";
+       static final String TITLE_PREFIX = "<HTML>\n<HEAD>\n"
+                       + "  <META NAME=\"viewport\" content=\"width=device-width\"/>\n"
+                       + "  <TITLE>";
        static final String TITLE_SUFFIX = "</TITLE>\n" + Style.CSS + "\n</HEAD>\n";
        
        
        static final String TITLE_SUFFIX = "</TITLE>\n" + Style.CSS + "\n</HEAD>\n";