Skip to content

Commit

Permalink
[FEATURE] Style update required by CodeMirror
Browse files Browse the repository at this point in the history
  • Loading branch information
maximesinclair committed Feb 28, 2014
1 parent 69fbe5d commit e01e0fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
17 changes: 11 additions & 6 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@
<link rel="stylesheet" href="${contextroot}/plantuml.css" />
<link rel="stylesheet" href="webjars/codemirror/3.21/lib/codemirror.css" />
<script src="webjars/codemirror/3.21/lib/codemirror.js"></script>
<script src="mode/plantuml.js"></script>
<script>
window.onload = function() {
var myCodeMirror = CodeMirror.fromTextArea(
document.getElementById("text"),
{lineNumbers: true}
);
};
</script>
<title>PlantUMLServer</title>
</head>
<body>
Expand All @@ -43,13 +52,12 @@
<%-- CONTENT --%>
<form method="post" accept-charset="UTF-8" action="${contextroot}/form">
<p>
<textarea id="diagtext" name="text" cols="120" rows="10"><c:out value="${decoded}"/></textarea>
<br/>
<textarea id="text" name="text" cols="120" rows="10"><c:out value="${decoded}"/></textarea>
<input type="submit" />
</p>
</form>
<hr/>
You can enter here a previously generated URL:
<p>You can enter here a previously generated URL:</p>
<form method="post" action="${contextroot}/form">
<p>
<input name="url" type="text" size="150" value="${imgurl}" />
Expand Down Expand Up @@ -84,8 +92,5 @@
</div>
<%-- FOOTER --%>
<%@ include file="footer.jspf" %>
<script>
var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("diagtext"), {lineNumbers: true});
</script>
</body>
</html>
12 changes: 6 additions & 6 deletions src/main/webapp/plantuml.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
******************************/

/* Font */
* {
h1, p, #content a {
font-family: arial,helvetica,sans-serif;
/* font-size: medium; */
}

/* Header */
Expand All @@ -22,16 +23,15 @@
}

/* Form inputs */
#content textarea, #content input[type=text] {
#content textarea, #content .CodeMirror, #content input[type=text] {
background-color: #ffc;
font-family: monospace;
font-size: medium;
width: 100%;
}

/* XHTML tag */
#content code {
font-family: 'courier new',courier,monospace;
letter-spacing: -1pt;
#content input[type=text] {
border: 0;
}

/* Diagram */
Expand Down

0 comments on commit e01e0fd

Please sign in to comment.