Browse Source

* Add some styling

michael 5 năm trước cách đây
mục cha
commit
ee357bfdff

+ 36 - 0
demo/resources/css/stylejs.css

@@ -0,0 +1,36 @@
+@import url('https://fonts.googleapis.com/css?family=Nunito+Sans&display=swap');
+* {
+  margin: 0;
+  padding: 0;
+  box-sizing: border-box;
+}
+body {
+  font-family: 'Nunito Sans', sans-serif;
+  margin: auto;
+  max-width: 900px;
+  padding: 0.5em 2em;
+  border: 1px dotted grey;
+  border-radius: 10px;
+}
+div {
+  font-size: 0.8em;
+}
+a {
+  color: blue;
+  text-decoration: none;
+}
+button {
+  display: inline-block;
+  background: #333;
+  color: #fff;
+  padding: 0.4rem 1.6rem;
+  margin-top: 1rem;
+  cursor: pointer;
+}
+button:hover {
+  opacity: 0.8;
+}
+h1 {
+  margin: 0.5em 0;
+}
+

+ 29 - 0
demo/resources/css/stylelink.css

@@ -0,0 +1,29 @@
+@import url('https://fonts.googleapis.com/css?family=Nunito+Sans&display=swap');
+* {
+  margin: 0;
+  padding: 0;
+  box-sizing: border-box;
+}
+body {
+  font-family: 'Nunito Sans', sans-serif;
+  margin: auto;
+  max-width: 600px;
+  padding: 2em;
+  border: 1px dotted grey;
+  border-radius: 10px;
+}
+a {
+  color: blue;
+  text-decoration: none;
+}
+a:hover {
+  color: coral;
+}
+div {
+  font-size: 0.8em;
+}
+img {
+  max-width: 100%;
+  margin: 3em;
+}
+

+ 2 - 1
demo/resources/htmldemo.html

@@ -4,6 +4,7 @@
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <title>Javascript resource demo</title>
     <script type="application/javascript" src="htmldemo.js"></script>
+    <link rel="stylesheet" href="css/stylejs.css"/>
   </head>
   <body>
     <h1>Javascript resource demo</h1>
@@ -14,7 +15,7 @@
   <button type="button" id="doinsert">Insert HTML from resource</button> 
   <h1 id="headertext">Press button to insert HTML below from resource data</h1>
   <div id="playarea">
-  </div>
+  </div><br>
   <p>
   <div>
     Created using &nbsp; <a target="_blank" href="https://wiki.freepascal.org/pas2js">pas2js.</a> &nbsp;&nbsp;Sources: &nbsp; 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 0
demo/resources/htmllinkdemo.html


+ 1 - 0
demo/resources/htmlloadlinkdemo.html

@@ -4,6 +4,7 @@
   <meta http-equiv="Content-type" content="text/html; charset=utf-8">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <title>Project1</title>
+  <link rel="stylesheet" href="css/stylelink.css">
   <script src="htmlloadlinkdemo.js"></script>
 </head>
 <body>

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác