Improve formatting

This commit is contained in:
2020-04-05 13:26:37 +01:00
parent cb87f5cbd5
commit 4761199617
5 changed files with 16 additions and 12 deletions

View File

@ -0,0 +1,2 @@
<div id="footer">
</div>

View File

@ -3,6 +3,7 @@
<head> <head>
<title>Wordsearch Builder: About</title> <title>Wordsearch Builder: About</title>
<link rel="stylesheet" type="text/css" href="base.css" /> <link rel="stylesheet" type="text/css" href="base.css" />
<link href="https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500&family=Roboto:wght@500&display=swap" rel="stylesheet">
</head> </head>
<body> <body>

View File

@ -19,10 +19,8 @@ table#grid td {
} }
#wrapper { #wrapper {
width: 80%; align-content: center;
margin: 0 auto 60px auto;
} }
#wordsearch { #wordsearch {
float: left; float: left;
} }
@ -35,8 +33,11 @@ table#grid td {
#footer { #footer {
position:absolute; position:absolute;
bottom:0; bottom:0;
width:100%; }
height:60px; /* Height of the footer */
textarea#textarea_words {
font-family: 'Fira Mono', monospace;
font-size: 10pt;
} }
@media only print { @media only print {

View File

@ -3,7 +3,7 @@
<head> <head>
<title>Wordsearch builder</title> <title>Wordsearch builder</title>
<link rel="stylesheet" type="text/css" href="base.css" /> <link rel="stylesheet" type="text/css" href="base.css" />
<link href="https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500&family=Roboto:wght@500&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500&family=Roboto:wght@500&display=swap" rel="stylesheet">
</head> </head>
<%@ page import="uk.org.mafoo.wordsearch.*" %> <%@ page import="uk.org.mafoo.wordsearch.*" %>
<%@ page import="java.util.*" %> <%@ page import="java.util.*" %>
@ -22,7 +22,7 @@
List<String> words = new ArrayList<String>(); List<String> words = new ArrayList<String>();
for ( String line : request.getParameter("words").split("\r\n")) { for ( String line : request.getParameter("words").split("\r\n")) {
words.add(line.trim()); words.add(line.trim().toLowerCase());
} }
Collections.sort(words); Collections.sort(words);
@ -48,18 +48,18 @@
<table id="grid"> <table id="grid">
<% for(char[] row : grid) { %> <% for(char[] row : grid) { %>
<tr> <tr>
<% for(char c : row) { <% for(char c : row) {
csv += "" + c + ','; csv += "" + c + ',';
%> %>
<td class="cell"><%= c %></td> <td class="cell"><%= c %></td>
<% } %> <% } %>
</tr> </tr>
<% <%
csv += "\\n"; csv += "\\n";
} }
%> %>
</table> </table>
</div> <!-- end wordsearch --> </div> <!-- end wordsearch -->
<div id="words"> <div id="words">
<h2>Words</h2> <h2>Words</h2>
@ -69,7 +69,7 @@
<% } %> <% } %>
</ul> </ul>
</div> <!-- end words --> </div> <!-- end words -->
</div> <!-- end wrapper --> </div> <!-- end wrapper -->
<br /> <br />
<br /> <br />
<%@include file="/WEB-INF/jspf/footer.jspf" %> <%@include file="/WEB-INF/jspf/footer.jspf" %>

View File

@ -12,7 +12,7 @@
<h2>Words</h2> <h2>Words</h2>
<form action="build.jsp" method="post"> <form action="build.jsp" method="post">
Name: <input type="text" size="25" name="name" value="Wordsearch"><br /> Name: <input type="text" size="25" name="name" value="Wordsearch"><br />
<textarea name="words" rows="10"> <textarea id="textarea_words" name="words" rows="10">
Kitchen Kitchen
Lounge Lounge
Study Study