about summary refs log tree commit diff stats
path: root/src/main.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-03-17 12:20:05 +0100
committerbptato <nincsnevem662@gmail.com>2021-03-17 12:20:05 +0100
commit94a10242dca6181ef8f15a37e7083069ead09559 (patch)
treeccdb28c82535aa7cda25f2bfe26cbfa451eaecab /src/main.nim
parent97f19da347b27a4d12f54784fa8bcbf304aa4fea (diff)
downloadchawan-94a10242dca6181ef8f15a37e7083069ead09559.tar.gz
...
Diffstat (limited to 'src/main.nim')
-rw-r--r--src/main.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.nim b/src/main.nim
index bc212ef0..95f1f3cd 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -8,7 +8,9 @@ import termattrs
 import buffer
 import twtio
 import config
-import parser
+import htmlparser
+import dom
+import style
 
 let clientInstance = newHttpClient()
 proc loadRemotePage*(url: string): string =
@@ -44,6 +46,9 @@ proc main*() =
   let uri = parseUri(paramStr(1))
   buffers.add(buffer)
   buffer.document = parseHtml(getPageUri(uri))
+  #discard buffer.document.querySelector("#hi.a[title=\"test\"]")
+  var box = CSSBox()
+  applyProperties(box, "color: #090; line-height: 1.2")
   buffer.setLocation(uri)
   buffer.renderHtml()
   var lastUri = uri