git.fiddlerwoaroof.com
Browse code

splitting cl-oid-connect to set it free of cruft

fiddlerwoaroof authored on 04/11/2015 23:45:11
Showing 37 changed files
1 1
deleted file mode 100644
... ...
@@ -1,5 +0,0 @@
1
-*-secrets.json
2
-.*.sw?
3
-*.fasl
4
-bin/*
5
-[#]*[#]
6 0
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-[submodule "colors"]
2
-        path = colors
3
-        url = gitolite@localhost:u/edwlan/colorscheme
4 0
deleted file mode 100644
... ...
@@ -1,29 +0,0 @@
1
-Copyright (c) 2015 Edward Langley
2
-All rights reserved.
3
-
4
-Redistribution and use in source and binary forms, with or without
5
-modification, are permitted provided that the following conditions
6
-are met:
7
-
8
-Redistributions of source code must retain the above copyright notice,
9
-this list of conditions and the following disclaimer.
10
-
11
-Redistributions in binary form must reproduce the above copyright
12
-notice, this list of conditions and the following disclaimer in the
13
-documentation and/or other materials provided with the distribution.
14
-
15
-Neither the name of the project's author nor the names of its
16
-contributors may be used to endorse or promote products derived from
17
-this software without specific prior written permission.
18
-
19
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
25
-TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 0
deleted file mode 100644
... ...
@@ -1,23 +0,0 @@
1
-# Introduction
2
-
3
-Eventually, this repository will just contain an implementation of various social
4
-authentication protocols in common lisp.  Right now, the only supported protocols
5
-are OpenID Connect and Facebook Login.  The OpenID Connect implementation has only
6
-been tested against Google.  More testing to follow.
7
-
8
-This repository also contains a "demo" application that uses the openid-connect
9
-library: a self-hostable rss reader. Eventually, this project will be split into its
10
-own repository, leaving this one for the authentication part.  Also, eventually this
11
-library will have a better name.
12
-
13
-# Installation notes
14
-
15
-This project implements the OpenId Connect API. In its current state, it can
16
-authenticate a user against Google and display the informaiton Google sends
17
-back. The only tricky requirement it has is cljwt, a library for parsing JSON
18
-Web Tokens, which is not in quicklisp but can be gotten from
19
-<https://github.com/fiddlerwoaroof/cljwt>. (This is my fork, I've made a couple
20
-changes since the original library didn't support the signature algorithm Google
21
-uses).
22
-
23
-(c) 2015 Edward Langley, distributed under a 2-clause BSD License
24 0
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-This is the stub README.txt for the "whitespace.rss" project.
2 0
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-- Make get-dao-for leave id unbound in rss-feeds
2
-
3
-- Implement sorting by pub date, rather than by id --- or someting
4 0
deleted file mode 100644
... ...
@@ -1,104 +0,0 @@
1
-(ql:quickload :parenscript)
2
-(ql:quickload :cl-markup)
3
-
4
-(defpackage :angular
5
-  (:use :parenscript :cl)
6
-  (:export main))
7
-(declaim (optimize (speed 0) (safety 2) (debug 2)))
8
-
9
-(in-package :angular)
10
-
11
-(defpsmacro macros (&body body)
12
-  `(lisp (progn
13
-           ,@(loop for form in body
14
-                   collect `(defpsmacro ,@form))
15
-           "")))
16
-
17
-
18
-(defmacro+ps scope-vars (&rest bindings)
19
-  `(progn ,@(loop for (n v) in bindings collect `(scope-var ,n ,v))))
20
-
21
-(defmacro+ps scope-var (name value)
22
-  `(setf ($s ,name) ,value))
23
-
24
-(defmacro+ps scope-function (name arguments &body body)
25
-  `(scope-var ,name (lambda ,arguments
26
-                      ,@body)))
27
-
28
-(defmacro+ps $s (&rest values) `(chain $scope ,@values))
29
-
30
-(defun build-lambda (dependencies body)
31
-  `(list ,@(mapcar #'symbol-to-js-string dependencies)
32
-         (lambda ,(loop for x in dependencies
33
-                        collect x)
34
-           ,@body
35
-           )))
36
-
37
-
38
-; This is just for slimv's sake
39
-(defmacro defcontroller (name dependencies &body body)
40
-  (declare (ignore name dependencies body)))
41
-
42
-
43
-(defmacro+ps resource (name url params &body body)
44
-  `(var ,name
45
-        ($resource ,url ,(cons 'create params)
46
-                   ,(cons 'create (loop for (name form) in body
47
-                                         append (list name (cons 'create form)))))))
48
-
49
-
50
-(defpsmacro defdirective (module-name name dependencies &body body)
51
-  (let ((dependencies (cons '$scope dependencies)))
52
-    `(chain ,module-name
53
-            (directive ,(symbol-to-js-string name)
54
-                       ,(build-lambda dependencies
55
-                                      `((create
56
-                                          ,@body)))))))
57
-(defpsmacro markup (&body body)
58
-  `(lisp (cl-markup:markup ,@body)))
59
-
60
-(defun def-module-function (module-name block-name function-name)
61
-  `(,block-name (name dependencies &body body)
62
-                (let ((dependencies (cons '$scope dependencies)))
63
-                  `(chain ,',module-name
64
-                          (,',function-name ,(symbol-to-js-string name)
65
-                                            ,(build-lambda dependencies body))))))
66
-
67
-(defmacro+ps defmodule (module-name dependencies &body body)
68
-  `(macrolet ((defdirective (name dependencies &body body)
69
-                (let ((dependencies (cons '$scope dependencies)))
70
-                  `(chain ,',module-name
71
-                          (directive ,(symbol-to-js-string name)
72
-                                     ,(build-lambda dependencies
73
-                                                    `((create
74
-                                                        ,@body)))))))
75
-
76
-              ,(def-module-function module-name 'defservice 'service)
77
-              ,(def-module-function module-name 'defcontroller 'controller))
78
-     (progn (var ,module-name ((@ angular module) ,(symbol-to-js-string module-name) ,dependencies))
79
-            ,@body)))
80
-
81
-(defmacro+ps select-> (selector)
82
-  `(chain document (query-selector ,selector)))
83
-
84
-(defmacro+ps select->element (selector)
85
-  `(chain angular (element (select-> ,selector))))
86
-
87
-
88
-(defmacro+ps ng-ajax (mthd endpoint data resultS &body callback)
89
-  `(chain $http
90
-          (,mthd ,endpoint ,data)
91
-          (success (lambda (,resultS)
92
-                     ,@callback))))
93
-
94
-(defun translate-file (infile outfile)
95
-  (let ((*JS-TARGET-VERSION* 1.9))
96
-    (with-open-file (o outfile :direction :output :if-exists :supersede)
97
-      (with-open-file (i infile :direction :input)
98
-        (write-line (ps-compile-file i) o)))))
99
-
100
-(defun main (args)
101
-  (in-package :angular)
102
-  (apply #'translate-file (cdr args)))
103
-
104
-
105 0
deleted file mode 100644
... ...
@@ -1,54 +0,0 @@
1
-(in-package :whitespace)
2
-(defun base-template-f (&optional demo)
3
-  (cl-markup:xhtml5
4
-    (:head
5
-      (:title "Whitespace")
6
-      (:script :src "https://code.jquery.com/jquery-2.1.4.min.js" :type "text/javascript" "")
7
-      (:script :src "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular.js" :type "text/javascript" "")
8
-      (:script :src "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular-resource.js" :type "text/javascript" "")
9
-      (:script :src "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.5/angular-sanitize.js" :type "text/javascript" "")
10
-      (:script :src "/static/js/fold.js" :type "text/javascript" "")
11
-      (:script :src "/static/js/whitespace-angular.js" :type "text/javascript" "")
12
-      (:link :rel "stylesheet" :href "/static/css/reset.css")
13
-      (:link :rel "stylesheet" :href "/static/css/baseline_post.css")
14
-      (:link :rel "stylesheet" :href "/static/css/formalize.css")
15
-      (:link :rel "stylesheet" :href "/static/css/main.css")
16
-      (:link :rel "stylesheet" :href "/static/css/content.css")
17
-      (:link :rel "stylesheet" :href "/theme/light.css")
18
-      (:link :rel "icon" :href "/static/images/Whitespace_favicon.png" :type "image/x-icon")
19
-      (:link :rel "shortcut icon" :href "/static/images/Whitespace_favicon.png" :type "image/x-icon"))
20
-
21
-    (:body :ng-app "whitespace" :ng-controller "MainCtrl"
22
-     (:header
23
-       (:button :class "flip-button" "…")
24
-       (:h1 "Whitespace")
25
-       )
26
-     (:section :id "content"
27
-      (:section :id "sidebar"
28
-       (:ul :class "menu" 
29
-        (:li :ng-repeat "feed in feeds.result"
30
-         (:a :ng-click "toggleClosed(feed)" "{{ feed.title }}"))))
31
-      (:main
32
-        (cl-markup:raw
33
-          (unless demo
34
-            (cl-markup:markup
35
-              (:form :name "add-form" :id "add-form" :ng-submit "addFeed()"
36
-               (:input :type "text" :name "url" :class "urltext" :ng-model "addForm.url" :placeholder "http://example.com/feed.rss . . ." "")
37
-               (:input :type "hidden" :name "api" :value "yes" "")
38
-               (:button :type "submit" :class "fsub" "+")))))
39
-        (:img :ng-class "{spinner: true, hide: feeds.result !== undefined}" :src "/static/images/spinner.gif" "")
40
-        (:div :class "hide" :ng-class "{hide: feeds.result === undefined}"
41
-         (:section :ng-class "{feed: true, closed: !feed.closed}" :ng-repeat "feed in feeds.result"
42
-          (:section :class "feed-header" :ng-click "toggleClosed(feed)"
43
-           (:h2 "{{ feed.title }}")
44
-           (:h3 "{{ feed.description }}"))
45
-          (:ul :class "post-list"
46
-           (:li :ng-class "{link: true, closed: !item.closed}" :ng-repeat "item in feed.items"
47
-            (:section :class "link-header" :ng-click "toggleClosed(item)"
48
-             (:h4 "{{item.title}}")
49
-             (:p :class "link-info"
50
-              (:a :target "_blank" :ng-href "{{item.link}}" :class "link-url" "{{item.link}}")
51
-              (:span :class "link-date" "{{item.date}}")))
52
-            (:section :class "link-content"
53
-             (:div :ng-bind-html "renderHtml(item.description)" ""))))))))
54
-     (:footer))))
56 1
deleted file mode 160000
... ...
@@ -1 +0,0 @@
1
-Subproject commit 15a9ca8dd67e8033bd62b559ffee86606fc67e9d
2 0
deleted file mode 100644
... ...
@@ -1,410 +0,0 @@
1
-(in-package :cl-user)
2
-(ql:quickload :clack-middleware-postmodern)
3
-
4
-(ql:quickload :cl-markup)
5
-(ql:quickload :cl-oid-connect)
6
-(ql:quickload :colors)
7
-(ql:quickload :lquery)
8
-(ql:quickload :plump)
9
-(ql:quickload :postmodern)
10
-(ql:quickload :sxql)
11
-(ql:quickload :clack-middleware-postmodern)
12
-(ql:quickload :dexador)
13
-(ql:quickload :spinneret)
14
-(ql:quickload :ubiquitous)
15
-(ql:quickload :iterate)
16
-(ql:quickload :jonathan)
17
-(ql:quickload :cl-actors)
18
-(ql:quickload :simple-tasks)
19
-
20
-(declaim (optimize (speed 0) (safety 3) (debug 2)))
21
-
22
-(push (cons "application" "rdf+xml") drakma:*text-content-types*)
23
-(push (cons "application" "rss+xml") drakma:*text-content-types*)
24
-(push (cons "text" "rss+xml") drakma:*text-content-types*)
25
-
26
-;(load "utils.lisp")
27
-(load "rss.lisp")
28
-
29
-(defpackage :whitespace
30
-  (:use #:cl #:anaphora #:whitespace.utils #:whitespace.feeds.rss #:whitespace.tables))
31
-
32
-(in-package plump-dom)
33
-
34
-(defmethod serialize-object :around ((node element))
35
-  (when (string= (tag-name node) "iframe")
36
-    (make-text-node node))
37
-  (call-next-method))
38
-
39
-
40
-(in-package :whitespace)
41
-(ubiquitous:restore :whitespace)
42
-
43
-
44
-(defparameter *app* (make-instance 'ningle:<app>))
45
-
46
-(cl-oid-connect:def-route ("/login" (params) :app *app*)
47
-  (cl-who:with-html-output-to-string (s)
48
-    (:html
49
-      (:head (:title "Login"))
50
-      (:body
51
-        (:div
52
-          :class "login-button facebook"
53
-          (:a :href "/login/facebook" "Facebook"))
54
-        (:div
55
-          :class "login-button google"
56
-          (:a :href "/login/google" "Google"))))))
57
-
58
-
59
-(handler-bind ((warning #'sb-ext::muffle-warning))
60
-  (let* ((feed-urls (ubiquitous:value 'feed 'urls))
61
-         (plump-parser:*tag-dispatchers* plump:*xml-tags*)
62
-         (docs (map 'vector (lambda (x) (plump:parse (drakma:http-request x))) feed-urls)))
63
-    (defparameter *feeds* (map 'vector (lambda (x) (make-rss-feed x)) docs))))
64
-
65
-(defparameter *db-connection-info* (ubiquitous:value 'db 'connection 'info))
66
-(defmacro with-whitespace-db (&body body)
67
-  `(postmodern:with-connection *db-connection-info*
68
-     ,@body))
69
-(defmacro wc (&body body)
70
-  `(with-whitespace-db ,@body))
71
-
72
-(defmacro with-xml-tags (&body body)
73
-  `(let ((plump:*tag-dispatchers* plump:*xml-tags*))
74
-     ,@body))
75
-
76
-(defmacro def-markup (name (&rest args) &body body)
77
-  `(defmacro ,name ,args
78
-     (alexandria:once-only ,args
79
-      `(cl-markup:markup
80
-         ,,@body))))
81
-
82
-(defmacro item-markup (item)
83
-  (alexandria:once-only (item)
84
-    `(let ((,item ,item))
85
-       (cl-markup:markup
86
-         (:li :class "link closed"
87
-          (:section :class "link-header"
88
-           (:h4 (rss-item-title ,item))
89
-           (:p :class "link-info"
90
-            (:a :target "_blank" :href (rss-item-link ,item)
91
-             (:span :class "link-url" (rss-item-link ,item)))
92
-            (:span :class "link-date") (rss-item-pub-date ,item)))
93
-          (:section :class "link-content"
94
-           (:div
95
-             (cl-markup:raw (rss-item-description-raw ,item)))))))))
96
-
97
-(defmacro feed-markup (feed-v fc-v)
98
-  (alexandria:with-gensyms (feed fc)
99
-    `(let ((,feed ,feed-v)
100
-           (,fc ,fc-v))
101
-       (cl-markup:markup
102
-         (:section :class "feed closed" :id (format nil "feed-~a" ,fc)
103
-          (:section :class "feed-header"
104
-           (:h2 (rss-feed-title ,feed))
105
-           (:h3 (rss-feed-description ,feed)))
106
-          (:ul :class "post-list"
107
-           (:li :class "link closed" :ng-repeat (format nil "item in feeds.result[~d].items" (- ,fc 1))
108
-            (:section :class "link-header"
109
-             (:h4 "{{item.title}}")
110
-             (:p :class "link-info"
111
-              (:a :target "_blank" :ng-href "{{item.link}}" :class "link-url" "{{item.link}}")
112
-              (:span :class "link-date" "{{item.date}}")))
113
-            (:section :class "link-content"
114
-             (:div
115
-               "{{item.description}}")))
116
-           ))))))
117
-
118
-(defmacro feedlist-markup (feedlist)
119
-  (alexandria:once-only (feedlist)
120
-    `(cl-markup:markup*
121
-       `(:ul :class "menu"
122
-         ,@(loop for feed across ,feedlist
123
-                 count feed into feed-count
124
-                 collect
125
-                 (list :li
126
-                       (list :a
127
-                             :href (format nil "#feed-~a" feed-count)
128
-                             (rss-feed-title feed))))))))
129
-
130
-(load "base-template.lisp")
131
-
132
-(defmacro defun-from-value (name value)
133
-  `(setf (symbol-function ',name) ,value))
134
-
135
-(defun-from-value jsonapi-encoder
136
-                  (jonathan.helper:compile-encoder () (success result)
137
-                    (list :|success| success
138
-                          :|result| result)))
139
-
140
-(defmacro neither (&rest forms) `(not (or ,@forms)))
141
-(defmacro neither-null (&rest forms)
142
-  `(neither ,@(loop for form in forms collecting `(null ,form))))
143
-
144
-; ; ;  Ultimately, this will only serialize the feed if the client
145
-(cl-oid-connect:def-route ("/feeds/add" (params) :method :post :app *app*)
146
-  (ningle.context:with-context-variables (session)
147
-    (let ((user-info (gethash :app-user session))
148
-          (result '(302 (:location "/")))
149
-          (api (string= (cl-oid-connect:assoc-cdr "api" params 'string=) "yes"))
150
-          (url (cl-oid-connect:assoc-cdr "url" params 'string=))
151
-          (plump-parser:*tag-dispatchers* plump-parser:*xml-tags*))
152
-      (cl-oid-connect:require-login
153
-        (when (neither-null params user-info)
154
-          (handler-case
155
-            (let* ((doc (plump:parse (drakma:http-request url)))
156
-                   (uid (slot-value user-info 'id)))
157
-              (multiple-value-bind (added-feed dao-feed) (store-feed doc)
158
-                (subscribe-to-feed uid (slot-value dao-feed 'id))
159
-                (when api
160
-                  (setf result `(200 (:Content-Type "application/json") ,(jsonapi-encoder t added-feed))))))
161
-            (cl-postgres-error:unique-violation
162
-              ()
163
-              (when api
164
-                (setf result
165
-                      `(400 () ,(jsonapi-encoder nil "Feed already saved"))))))))
166
-      result)))
167
-
168
-;;; TODO: add needs to return the new content, so that angular can append it
169
-
170
-(cl-oid-connect:def-route ("/feeds/json" (params) :app *app*)
171
-  (ningle.context:with-context-variables (session)
172
-    (let* ((user-info (gethash :app-user session))
173
-           (*feeds* (if user-info (deserialize user-info) *feeds*)))
174
-      `(200 (:content-type "application/json" :cache-control "private, max-age=300") ,(jsonapi-encoder t *feeds*)))))
175
-
176
-(cl-oid-connect:def-route ("/feeds/:feeds/html" (params) :app *app*)
177
-  (ningle.context:with-context-variables (session)
178
-    (cl-oid-connect:require-login
179
-      (let* ((feedlist-s (cdr (assoc :feeds params)))
180
-             (feedlist (mapcar #'parse-integer (split-sequence:split-sequence #\SPACE feedlist-s)))
181
-             (*feeds* (gethash :feeds session *feeds*))
182
-             (*feeds* (make-array (list (length feedlist))
183
-                                  :initial-contents (loop for x in feedlist
184
-                                                          collect (elt *feeds* x)))))
185
-        (base-template-f)))))
186
-
187
-
188
-
189
-(cl-oid-connect:def-route ("/demo" (params) :app *app*)
190
-  (base-template-f t))
191
-
192
-(cl-oid-connect:def-route ("/" (params) :app *app*)
193
-  (ningle:with-context-variables (session)
194
-    (cl-oid-connect:require-login
195
-      (cl-oid-connect:redirect-if-necessary session
196
-        (let* ((user-info (gethash :app-user session))
197
-               (*feeds* (deserialize user-info)))
198
-          (base-template-f))))))
199
-
200
-;;; this will be bound by calls to with-palette
201
-;;; probably should be refactored out
202
-(defparameter *palette* nil)
203
-
204
-(defparameter *colorscheme* (make-instance 'colors:colorscheme))
205
-
206
-(defun get-theme-css ()
207
-  (colors:with-palette (*palette*)
208
-    (flet ((combine-unit-q (quant unit) (format nil "~d~a" quant unit)))
209
-      (let* ((header-height 9)
210
-             (main-right-margin (* 0.618 (- 100 header-height)))
211
-             (height-units "vh")
212
-             (ss (lass:compile-and-write
213
-                   `(* :color ,(colors:colorscheme-fg *colorscheme*))
214
-
215
-                   `(body
216
-                      :background-color ,(colors:colorscheme-bg *colorscheme*))
217
-
218
-                   `((:or h1 h2 h3)
219
-                     :color ,(colors:colorscheme-fg-highlight *colorscheme*))
220
-                   `(.feed-header
221
-                      :background-color ,(colors:colorscheme-bg-highlight *colorscheme*))
222
-
223
-                   `((:or h4 h5 h6) :color ,(colors:colorscheme-fg-highlight *colorscheme*))
224
-
225
-                   `(header
226
-                      :border-bottom "thin" "solid" ,(colors:colorscheme-accent *colorscheme*)
227
-                      :height ,(combine-unit-q header-height height-units)
228
-                      :font-size ,(combine-unit-q (* 0.75 header-height) height-units)
229
-                      :line-height ,(combine-unit-q header-height height-units)
230
-                      (.flip-button
231
-                        :background-color ,(colors:colorscheme-fg *colorscheme*)
232
-                        :color ,(colors:colorscheme-bg *colorscheme*))
233
-                      ((:and .flip-button :focus)
234
-                       :outline none)
235
-                      ((:and .flip-button :hover)
236
-                       :font-size ,(combine-unit-q (* 0.25 header-height) height-units)))
237
-
238
-                   `(main
239
-                      :border-left medium solid ,(colors:colorscheme-accent *colorscheme*)
240
-                      :height ,(combine-unit-q (- 100 header-height) height-units)
241
-                      ("#add-form"
242
-                        :box-shadow "0em" "0em" "0.2em" "0.2em" ,(colors:colorscheme-accent *colorscheme*)
243
-                        ((:or input button)
244
-                         :background-color ,(colors:colorscheme-bg *colorscheme*)
245
-                         :color ,(colors:colorscheme-fg *colorscheme*))
246
-                        )
247
-                      )
248
-
249
-                   `((:or a (:and a :visited) (:and a :active) code.url)
250
-                     :color ,(colors:colorscheme-fg-highlight *colorscheme*))
251
-
252
-                   `(section#sidebar
253
-                      :transition opacity "0.5s" ease
254
-                      (ul.menu
255
-                        ((li + li)
256
-                         :border-top "thin" "solid" ,(colors:colorscheme-fg-highlight *colorscheme*))
257
-                        ((:and li :hover)
258
-                         :background-color ,(colors:colorscheme-hover-highlight *colorscheme*)
259
-                         :color ,(colors:colorscheme-fg-highlight *colorscheme*))))
260
-
261
-                   `(.feed
262
-                      :border-bottom thick solid ,(colors:colorscheme-accent *colorscheme*)
263
-                      :border-left none)
264
-
265
-                   `(.link-header :background-color ,(colors:colorscheme-bg-highlight *colorscheme*))
266
-                   `(.link
267
-                      :border-top thin solid ,(colors:colorscheme-fg *colorscheme*)
268
-                      :border-bottom none
269
-
270
-
271
-                      (.link-info
272
-                        :color ,(colors:colorscheme-fg-deemph *colorscheme*)
273
-                        :border-bottom "thin" "solid" ,(colors:colorscheme-fg *colorscheme*)
274
-                        ((:or a span)
275
-                         :color inherit)
276
-                        ((:and a :hover)
277
-                         :color ,(colors:colorscheme-fg *colorscheme*))
278
-                        ))
279
-
280
-                   `((:and .feed-header :hover)
281
-                     :background-color ,(colors:colorscheme-hover-highlight *colorscheme*))
282
-
283
-                   `((.link.closed .link-header)
284
-                     :background-color ,(colors:colorscheme-bg *colorscheme*))
285
-
286
-                   `((:or (:and .link-header :hover) (.link.closed (:and .link-header :hover)))
287
-                     :background-color ,(colors:colorscheme-hover-highlight *colorscheme*)))))
288
-        (declare (ignorable main-right-margin)) ; TODO: use this!!!
289
-        `(200 (:content-type "text/css") ,ss)))))
290
-
291
-(cl-oid-connect:def-route ("/theme/dark.css" (params) :app *app*)
292
-  (colors:let-palette (make-instance 'colors:palette)
293
-    (eval '(get-theme-css))))
294
-
295
-(cl-oid-connect:def-route ("/theme/light.css" (params) :app *app*)
296
-  (colors:let-palette (colors:invert-palette (make-instance 'colors:palette))
297
-    (eval '(get-theme-css))))
298
-
299
-(cl-oid-connect:def-route ("/userinfo.json" (params) :app *app*)
300
-  (declare (ignore params))
301
-  (ningle:with-context-variables (session)
302
-    (cl-oid-connect:require-login
303
-      (cl-oid-connect::with-endpoints (gethash :endpoint-schema session)
304
-        `(200 (:content-type "application/json") ,(cl-json:encode-json-to-string (gethash :userinfo session)))))))
305
-
306
-(cl-oid-connect:def-route ("/logout" (params) :app *app*)
307
-  (declare (ignore params))
308
-  (ningle:with-context-variables (session)
309
-    (setf (gethash :userinfo session) nil)
310
-    '(302 (:location "/"))))
311
-
312
-(defun assoc-cdr-alternatives (alist alt1 alt2 &optional (test #'eql))
313
-  (aif (cl-oid-connect:assoc-cdr alt1 alist test)
314
-    it
315
-    (cl-oid-connect:assoc-cdr alt2 alist test)))
316
-
317
-(cl-oid-connect::setup-oid-connect *app* (userinfo &rest args)
318
-  (declare (ignore args) (optimize (speed 0) (safety 3) (debug 3)))
319
-  (flet ((get-received-id (userinfo) (assoc-cdr-alternatives userinfo :id :sub))
320
-         (get-db-user (received-id) (car (postmodern:select-dao 'reader_user (:= :foreign-id received-id)))) 
321
-         (get-first-name (userinfo) (assoc-cdr-alternatives userinfo :first--name :given--name))
322
-         (get-last-name (userinfo) (assoc-cdr-alternatives userinfo :last--name :family--name))
323
-         (get-link (userinfo) (assoc-cdr-alternatives userinfo :link :profile)))
324
-
325
-    (postmodern:with-transaction ()
326
-      (let ((received-id (get-received-id userinfo)))
327
-        (aif (get-db-user received-id) it
328
-          (postmodern:make-dao
329
-            'reader_user
330
-            :foreign-id received-id
331
-            :first-name (get-first-name userinfo)
332
-            :last-name (get-last-name userinfo)
333
-            :name (cl-oid-connect:assoc-cdr :name userinfo)
334
-            :email (cl-oid-connect:assoc-cdr :email userinfo)
335
-            :gender (cl-oid-connect:assoc-cdr :gender userinfo)
336
-            :link (get-link userinfo)
337
-            :locale (cl-oid-connect:assoc-cdr :locale userinfo)))))))
338
-
339
-(defun update-feed (url)
340
-  (with-whitespace-db
341
-    (postmodern:with-transaction ()
342
-      (upsert-feed (make-rss-feed (with-xml-tags (plump:parse (drakma:http-request url))))))))
343
-
344
-(defmacro amapcar-with-body (list &body forms)
345
-  (alexandria:once-only (list)
346
-    `(mapcar (lambda (it) ,@forms)
347
-             ,list)))
348
-
349
-(defun update-all-feeds ()
350
-  (with-whitespace-db
351
-    (let ((urls (postmodern:query (:select 'fetch-url :from 'rss-feed-store))))
352
-      (amapcar-with-body urls
353
-        (restart-case
354
-          (apply #'update-feed it)
355
-          (continue-updates () (warn (format nil "Skipping feed with fetch-url: ~s" it)))
356
-          (use-value (v) (update-feed v)))))))
357
-
358
-(defun minutes (minutes) (* minutes 60))
359
-
360
-(defun continue-updates (e)
361
-  (declare (ignore e))
362
-  (let ((restart (find-restart 'continue-updates)))
363
-    (when restart
364
-      (format t "continuing")
365
-      (invoke-restart restart))))
366
-
367
-(let (update-thread stop)
368
-  (defun start-update-thread ()
369
-    (setf update-thread
370
-          (bordeaux-threads:make-thread
371
-            (lambda ()
372
-              (loop
373
-                (handler-bind ((drakma:parameter-error #'continue-updates))
374
-                  (update-all-feeds))
375
-                (sleep (ubiquitous:value 'update-frequency))
376
-                (when stop
377
-                  (return-from nil nil))))
378
-            :name "Whitespace Update Thread")))
379
-  (defun stop-update-thread ()
380
-    (setf stop t)
381
-    (setf update-thread nil)))
382
-
383
-(let ((handler nil))
384
-  (defun stop () (clack:stop (pop handler)))
385
-
386
-  (defun start (&optional tmp)
387
-    (cl-oid-connect:initialize-oid-connect
388
-      (ubiquitous:value 'facebook 'secrets)
389
-      (ubiquitous:value 'google 'secrets))
390
-    (let ((server (if (> (length tmp) 1)
391
-                    (intern (string-upcase (elt tmp 1)) 'keyword)
392
-                    :hunchentoot)))
393
-      (push (clack:clackup
394
-              (lack.builder:builder
395
-                :backtrace
396
-                :session
397
-                ;:csrf
398
-                (lambda (app) (lambda (env)
399
-                                (postmodern:with-connection *db-connection-info*
400
-                                                            (funcall app env))))
401
-                (:static :path "/static/" :root #p"./static/")
402
-                *app*) :port 9090 :server server)
403
-            handler)))
404
-
405
-  (defun restart-clack ()
406
-    (do () ((null handler)) (stop))
407
-    (start)))
408
-
409
-
410
-; vim: foldmethod=marker foldmarker=(,) foldminlines=3 :
411 0
deleted file mode 100644
... ...
@@ -1,4 +0,0 @@
1
-{
2
-  "client-id": "<secret>",
3
-  "secret": "<secret>"
4
-}
5 0
deleted file mode 100644
... ...
@@ -1,5 +0,0 @@
1
-{
2
-  "client-id": "XXX",
3
-  "secret": "XXX"
4
-}
5
-
6 0
deleted file mode 100644
... ...
@@ -1,9 +0,0 @@
1
-(:import (url "http://fonts.googleapis.com/css?family=Source+Code+Pro"))
2
-(.link-content
3
-  :font-size "1rem"
4
-  ((p + p)
5
-   :margin-top "1em")
6
-  (pre
7
-    :font-family "Source Code Pro"
8
-    )
9
-  )
10 0
deleted file mode 100644
... ...
@@ -1,207 +0,0 @@
1
-(:import "url(https://fonts.googleapis.com/css?family=Lato:400,100,300,400italic,300italic,700,700italic,900&subset=latin,latin-ext)")
2
-(:import "url(https://fonts.googleapis.com/css?family=Caudex)")
3
-
4
-;((:or .feed main)
5
-;  :-webkit-backface-visibility hidden;
6
-;  :-webkit-transform "translateZ(0)")
7
-
8
-(*
9
-  :box-sizing "border-box"
10
-  :margin "0px"
11
-  :padding "0px")
12
-
13
-(body
14
-  :transition "background-color .5s ease"
15
-  :font-family "Lato")
16
-
17
-(((:or main "#sidebar" .feed) > (:or ul ol))
18
- :list-style "none"
19
- :margin "0px")
20
-
21
-(ul
22
-  :margin "1em"
23
-  )
24
-
25
-((:or h1 h2)
26
- :font-size "153.9%")
27
-(:h3
28
-  :font-size "146.5%")
29
-((:or h4 h5 h6)
30
- :font-size "138.5%")
31
-
32
-(((:or ul) + (:or h1 h2 h3 h4 h5 h6))
33
- :width "initial")
34
-
35
-(header
36
-  :color "white"
37
-  (h1
38
-    :font-family "Caudex"
39
-    :font-size inherit
40
-    :margin-top "0em"
41
-    :padding-left "10vw"
42
-    :font-weight 200))
43
-
44
-((:or "#sidebar" main)
45
- :border-top none)
46
-
47
-(section#sidebar
48
-  :width "38vw"
49
-  :height "90vh"
50
-  :position "fixed"
51
-  :overflow "auto"
52
-  (ul.menu
53
-    :text-align right
54
-    :font-variant small-caps
55
-    (li
56
-      :transition "all .5s ease"
57
-      (a
58
-        :color inherit
59
-        :display block
60
-        :font-size "125%"
61
-        :font-weight 700
62
-        :padding "0.5em"
63
-        :text-decoration none
64
-        :width "100%"
65
-        ))))
66
-
67
-(main
68
-  :width "62vw"
69
-  :float "right"
70
-  :clear "right"
71
-  :overflow "hidden"
72
-  :position "relative"
73
-  ((> div)
74
-   :position "absolute"
75
-   :top "2em"
76
-   :bottom "0em"
77
-   :width "100%"
78
-   :overflow-y "scroll")
79
-  )
80
-
81
-(img.spinner
82
-  :position "absolute"
83
-  :top "50%"
84
-  :left "50%"
85
-  :transform "translate(-50%,-50%)"
86
-  )
87
-
88
-(.hide
89
-  :display none
90
-  )
91
-
92
-(.feed-header
93
-  ((:or h2 h3) :padding "0.62em")
94
-  (h2 :padding-bottom "0.38em")
95
-  (h3 :padding-top "0.38em")
96
-  :transition "background-color .5s ease"
97
-  :padding-bottom "0em")
98
-
99
-((.link.closed .link-content) 
100
- :max-height "0px"
101
- :padding "0em")  
102
-
103
-(.link.closed
104
-  :padding-bottom "0em")
105
-
106
-(.link
107
-  :text-decoration none
108
-  :display block
109
-  :overflow hidden
110
-  :font-size "0.8em"
111
-  (.link-header 
112
-    :padding "1em"
113
-    :padding-bottom "0em"
114
-    :cursor pointer
115
-    :transition "background-color .5s ease"
116
-    (h4
117
-      :margin-bottom "0.5em"
118
-      :display "inline-block")) 
119
-  (.link-info
120
-    :margin-left "-1em"
121
-    :margin-right "-1em"
122
-    :padding-left "1em"
123
-    :padding-right "1em"
124
-    :padding-bottom "0.32em"
125
-    (.link-url 
126
-      :float "left")
127
-    (.link-date
128
-      :float "right"
129
-      :display block))
130
-  ((:and .link-info :after)
131
-   :content "\" \""
132
-   :display block
133
-   :clear both)
134
-  (.link-content
135
-    :overflow hidden
136
-
137
-    (img
138
-      :margin "1em" "0%" "1em" "10%"
139
-      :max-width "80%"
140
-      :max-height "70vh"
141
-      )
142
-    ((> div)
143
-     :padding "1em"
144
-     :font-size "12pt")
145
-    :transition "max-height 0.5s ease"))
146
-
147
-(.feed.closed
148
-  :border-bottom-width thin
149
-  (.post-list 
150
-    :max-height "0px"
151
-    :padding "0em")
152
-  (h3
153
-    :display none))
154
-
155
-((:and .feed :first-child)
156
- :border-top none)
157
-
158
-(.feed
159
-  :overflow "hidden"
160
-  (.post-list
161
-    :transition "max-height 0.5s ease"))
162
-
163
-("#add-form"
164
- :transition "background-color .5s ease"
165
- :font-size "1em"
166
- :height "1.8em"
167
- :display block
168
- :overflow hidden
169
- :width "100%"
170
- :position absolute
171
- :z-index 3
172
-
173
- ((:or input button)
174
-  :transition "background-color .5s ease"
175
-  )
176
-
177
- (input
178
-   :border "none"
179
-   :width "95%"
180
-   :height "100%"
181
-   :font-size "0.8em"
182
-   :line-height "1.8em"
183
-   :padding "1em" "0.5em"
184
-   )
185
- (button
186
-   :border none
187
-   :border-radius 0px
188
-   :font-size inherit
189
-   :width "5%" 
190
-   :height "100%"
191
-   ))
192
-
193
-
194
-(.flip-button
195
-  :position absolute
196
-  :right "0em"
197
-  :top "0em"
198
-  :z-index 1000
199
-  :width "3em"
200
-  :height "3em"
201
-  :padding-left "1em"
202
-  :padding-bottom "1em"
203
-  :border-bottom-left-radius "100%"
204
-  :border none
205
-  :transition "all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275)"
206
-  :background-image none
207
-  )
208 0
deleted file mode 100644
... ...
@@ -1,29 +0,0 @@
1
-(in-package :angular)
2
-
3
-;:action "/feeds/add?api=yes" :name "add-form" :id "add-form" :method "post" 
4
-(defmodule whitespace '(ng-resource ng-sanitize)
5
-  (defcontroller -Main-Ctrl ($http $resource $sce)
6
-    (resource feeds "/feeds" nil
7
-              (json (method "GET" url "/feeds/json"))
8
-              (add  (method "POST" url "/feeds/add")))
9
-
10
-    (scope-var feeds (chain feeds (json)))
11
-    (scope-var data "hello world!")
12
-    (scope-var add-form (create url ""))
13
-
14
-    (scope-function render-html (html-code)
15
-      (chain $sce (trust-as-html html-code)))
16
-
17
-    (scope-function toggle-closed (ent)
18
-      (setf (@ ent closed) (not (@ ent closed))))
19
-
20
-    (scope-function add-feed ()
21
-      (chain feeds (add (create "url" ($s add-form url)
22
-                                "api" "yes"))
23
-             $promise
24
-             (then
25
-               (lambda (feed)
26
-                 ($s feeds result (unshift (@ feed result)))))))
27
-    ))
28
-
29
-; vim: ft=lisp
30 0
deleted file mode 100644
... ...
@@ -1,42 +0,0 @@
1
-(in-package :ps_translator)
2
-
3
-(macros 
4
-  (getOffset (el) `($ (,el) (offset) top)))
5
-
6
-(def-event document ready ()
7
-  (def-event ".link-header, .feed-header" click ()
8
-    ($ (".menu") (add-class "open")) t)
9
-
10
-  (def-event ".link-header" click ()
11
-
12
-    ($each (this (siblings ".link-content"))
13
-      (if (= ($this (css "max-height")) "0px")
14
-
15
-        (let ((added-height ($this (children) (outer-height)))
16
-              (parent-height ($this (parents ".post-list") (css "max-height"))))
17
-          ($this (css "max-height" added-height))
18
-
19
-          ($this (parents ".post-list")
20
-                 (css "max-height" (+ added-height parent-height))))
21
-
22
-        ($this (css "max-height" "0px"))))
23
-    ($this (parent) (toggle-class "closed")))
24
-
25
-  (def-event ".feed-header" click ()
26
-    ($each (this (siblings ".post-list"))
27
-      (if (= ($this (css "max-height")) "0px")
28
-        ($this (css "max-height" (@ this scroll-height)))
29
-        ($this (css "max-height" "0px"))))
30
-    ($this (parent) (toggle-class "closed")))
31
-
32
-  (def-event ".flip-button" click ()
33
-    (let* ((style-sheet ($ ("link[href^=\"/theme\"]")))
34
-           (style-sheet-name (chain style-sheet (attr "href"))))
35
-      (chain style-sheet
36
-             (attr "href"
37
-                   (if (chain style-sheet-name (match (regex |dark|)))
38
-                     (chain style-sheet-name (replace (regex |dark|) "light"))
39
-                     (chain style-sheet-name (replace (regex |light|) "dark")))))))
40
-  nil)
41
-
42
-; vim: set ft=lisp :
43 0
deleted file mode 100644
... ...
@@ -1,284 +0,0 @@
1
-(in-package :cl-user)
2
-(use-package :lquery)
3
-(declaim (optimize (safety 3) (speed 0) (debug 3)))
4
-
5
-(define-lquery-list-function where-attr (els attr &key is)
6
-  (remove-if-not (lambda (y) (string= (plump:attribute y attr) is))
7
-                 els))
8
-
9
-(define-lquery-list-function tag-name (nodes &rest tags)
10
-  "Manipulate elements on the basis of their tag-name.  With no arguments,
11
-   return their names else return the corresponding tags."
12
-  (if (null tags)
13
-    (map 'vector #'plump:tag-name nodes)
14
-    (apply #'vector
15
-           (loop for node across nodes
16
-                 if (find (plump:tag-name node) tags :test #'string=)
17
-                 collect node))))
18
-
19
-
20
-
21
-(load "tables.lisp")
22
-
23
-(defpackage :whitespace.feeds.autodiscovery
24
-  (:use #:cl #:alexandria #:postmodern #:lquery #:cl-syntax #:cl-annot.syntax #:cl-annot.class
25
-        #:whitespace.tables #:iterate #:whitespace.utils)
26
-  (:import-from anaphora it))
27
-(in-package #:whitespace.feeds.autodiscovery)
28
-
29
-(defun discover-feeds (doc)
30
-  "Given a plump DOM element, discover any feeds in the document using the link tags.
31
-   Returns a vector "
32
-  (coerce
33
-    (lquery:$ (inline doc)
34
-            "link"
35
-            (where-attr "rel" :is "alternate")
36
-            (combine (attr "href")
37
-                     (attr "type")))
38
-    'list))
39
-(export 'discover-feeds)
40
-
41
-(defpackage :whitespace.feeds.opml
42
-  (:use #:cl #:alexandria #:postmodern #:lquery #:cl-syntax #:cl-annot.syntax #:cl-annot.class
43
-        #:whitespace.tables #:iterate #:whitespace.utils)
44
-  (:import-from anaphora it))
45
-(in-package #:whitespace.feeds.opml)
46
-
47
-
48
-
49
-(in-package :cl-user)
50
-(defpackage :whitespace.feeds.rss
51
-  (:use #:cl #:alexandria #:postmodern #:lquery #:cl-syntax #:cl-annot.syntax #:cl-annot.class
52
-        #:whitespace.tables #:iterate #:whitespace.utils #:whitespace.feeds.autodiscovery)
53
-  (:import-from anaphora it))
54
-
55
-
56
-(in-package :whitespace.feeds.rss)
57
-(cl-annot.syntax:enable-annot-syntax)
58
-
59
-@export
60
-(defmacro get-elements (feed &optional (filter nil))
61
-  (let ((feed-sym (gensym))
62
-        (filter-lis `(lambda (x) (and (plump-dom:element-p x) ,@(loop for x in filter
63
-                                                                      collect `(funcall ,x x))))))
64
-    `(let ((,feed-sym ,feed))
65
-       (remove-if-not ,filter-lis (plump:children ,feed-sym)))))
66
-
67
-@export
68
-(defmacro get-elements-by-tagname (feed tagname)
69
-  `(get-elements ,feed ((lambda (x) (string= ,tagname (plump:tag-name x))))))
70
-
71
-@export
72
-(defmacro extract-text (selector &optional (default ""))
73
-  `(or (lquery:$ ,selector (text) (node)) ,default))
74
-
75
-@export
76
-(defmacro xml-text-bind (syms &body body)
77
-  "Bind the symbols passed in the second arg to the text of the matching
78
-   elements in the document lquery has been initialized with and then run the
79
-   body in the resulting lexical scope.  This assumes that lquery:initialize
80
-   has already been passed the proper xml document"
81
-  `(let* ,(loop for sym in syms
82
-           collect `(,sym (or (lquery:$ ,(symbol-name sym) (text) (node)) "")))
83
-     ,@body))
84
-
85
-(defmacro make-instance-from-symbols (class &rest initargs)
86
-  `(make-instance ,class ,@(iterate (for (to from) in (ensure-mapping initargs))
87
-                                    (appending (list (make-keyword (symbol-name to)) from)))))
88
-
89
-@export-class
90
-(defclass rss-feed ()
91
-  ((feed :accessor rss-feed-feed :initarg :feed)
92
-   (channel :accessor rss-feed-channel :initarg :channel)
93
-   (title :accessor rss-feed-title :initarg :title)
94
-   (link :accessor rss-feed-link :initarg :link)
95
-   (description :accessor rss-feed-description :initarg :description)
96
-   (items :accessor rss-feed-items :initarg :items)
97
-   (fetch-url :accessor fetch-url :initarg :fetch-url)))
98
-
99
-@export-class
100
-(defclass rss-item ()
101
-  ((item :accessor rss-item-item  :initarg :item)
102
-   (title :accessor rss-item-title :initarg :title)
103
-   (link :accessor rss-item-link :initarg :link)
104
-   (description-raw :accessor rss-item-description-raw :initarg :description-raw)
105
-   (description :accessor rss-item-description :initarg :description)
106
-   (category :accessor rss-item-category :initarg :category)
107
-   (comments :accessor rss-item-comments :initarg :comments)
108
-   (enclosure :accessor rss-item-enclosure :initarg :enclosure)
109
-   (guid :accessor rss-item-guid :initarg :guid)
110
-   (pub-date :accessor rss-item-pub-date :initarg :pub-date)
111
-   (source :accessor rss-item-source  :initarg :source)))
112
-
113
-@export
114
-(defun make-rss-item (item fallback-date)
115
-  (lquery:initialize item)
116
-  (flet ((dehtml (h) (plump:text (plump:parse h)))
117
-         (get-category-names (it) ;;; TODO: simplify this---Ask Shinmera on IRC
118
-           (if (not (equalp #() it))
119
-             (map 'vector
120
-                  (lambda (x) (plump:text (elt (plump:children x) 0)))
121
-                  it)
122
-             #())))
123
-    (let* ((content-encoded (lquery:$ (children) (tag-name "content:encoded")))
124
-
125
-           (description-element (default-when content-encoded (emptyp content-encoded)
126
-                                  (lquery:$ (children "description"))))
127
-
128
-           (description-raw (normalize-html
129
-                              (default-when description-element (emptyp description-element)
130
-                                (extract-text "description")))))
131
-           ;(enclosure) --- TODO: implement comment / enclosure handling
132
-
133
-      (xml-text-bind (title link guid pubdate source comments)
134
-        (when (string= pubdate "")
135
-          (setf pubdate fallback-date))
136
-        (make-instance-from-symbols 'rss-item
137
-                                    item title link
138
-                                    description-raw
139
-                                    (description (dehtml description-raw))
140
-                                    (category (get-category-names (lquery:$ "category")))
141
-                                    guid (pub-date pubdate) source comments)))))
142
-      ;(setf (rss-item-enclosure result) enclosure)      -- TODO: comment/enclosure . . .
143
-
144
-
145
-@export
146
-(defun make-rss-feed (feed)
147
-  (lquery:initialize feed)
148
-  (let* ((channel (lquery:$ "channel" (node)))
149
-         (fetch-url (lquery:$ "channel" (children) (tag-name "atom:link") (filter "[rel=self]") (attr :href) (node)))
150
-         (link (lquery:$ "channel > link" (text) (node)))
151
-         (link (if (string= link "") (lquery:$ "channel" (children) (tag-name "atom:link") (attr :href) (node)) link))
152
-         (items (lquery:$ "item"))
153
-         (last-build (or (lquery:$ "lastBuildDate" (text) (node)) ""))
154
-         (pub-date (default-when last-build (string= last-build "")
155
-                     (lquery:$ "pubDate" (text) (node))))
156
-         (fallback-date (if (string= pub-date "") "2015-01-01 0:0:0+00" pub-date)))
157
-    (format t "fallback-date: ~a~%" fallback-date)
158
-    (xml-text-bind (title description)
159
-      (make-instance-from-symbols 'rss-feed
160
-                                  feed title link description channel fetch-url
161
-                                  (items (iterate (for it in-sequence items)
162
-                                                  (collecting (make-rss-item it fallback-date))))))))
163
-
164
-; These are the interface I'm planning to remove as duplicate
165
-(defserializer (rss-feed)
166
-  title link description fetch-url
167
-  (items (iterate (for item in items)
168
-                  (collect item))))
169
-
170
-(defserializer (rss-item)
171
-  title link (description description-raw :bind-from description-raw) guid pub-date source)
172
-
173
-(defmethod jonathan:%to-json ((obj rss-feed))
174
-  (jonathan:%to-json (serialize obj #'alexandria:alist-hash-table #'%json-pair-transform)))
175
-
176
-(defmethod jonathan:%to-json ((obj rss-item))
177
-  (jonathan:%to-json (serialize obj #'alexandria:alist-hash-table #'%json-pair-transform)))
178
-
179
-(defmacro get-id-for-object ((table key-column &optional (id-column :id)) key &body body)
180
-  "Anaphoric macro: binds id to the id it retrieves!"
181
-  (once-only (id-column key)
182
-    `(let ((id (anaphora:awhen (postmodern:query (:select ,id-column :from ',table :where (:= ',key-column ,key)))
183
-                 (caar it))))
184
-       ,@body)))
185
-
186
-; NOTE: this won't make dao objects for the _items_ when called on the feed!
187
-; also NOTE: this _prefers_ the passed object
188
-(defmethod get-dao-for ((obj rss-feed) &optional linked-objects)
189
- (declare (ignore linked-objects))
190
- (with-slots (title link description fetch-url) obj
191
-   (get-id-for-object (rss_feed_store link) link
192
-     (make-instance-from-symbols 'rss_feed_store id title link description fetch-url (fetch-defaults t))) ))
193
-
194
-(defmethod get-dao-for ((obj rss-item) &optional feed)
195
- (with-slots (title link description-raw guid pub-date source) obj
196
-   (get-id-for-object (rss_item_store guid) guid
197
-     (let ((result (make-instance-from-symbols 'rss_item_store title link (description description-raw)
198
-                                 guid pub-date source feed (fetch-defaults t))))
199
-       (unless (null id)
200
-         (setf (ris-id result) id))
201
-       result))))
202
-
203
-(defun get-and-possibly-store-feed (rss-feed)
204
-  "Given an rss-feed, return the db's feed-id, persisting it if it doesn't already exist."
205
-  (postmodern:ensure-transaction
206
-    (anaphora:aif (postmodern:select-dao 'rss_feed_store (:= 'link (rss-feed-link rss-feed)))
207
-      (car anaphora:it) ;; The postmodern query returns a nested list
208
-      (store-feed-dao (serialize rss-feed)))))
209
-
210
-@export
211
-(defun store-feed (doc)
212
-  (postmodern:with-transaction ()
213
-    (let ((rss-feed (make-rss-feed doc)))
214
-      (values rss-feed
215
-              (get-and-possibly-store-feed rss-feed)))))
216
-
217
-@export ; TODO: this should eventually take a username/userobject rather than ids . . .
218
-(defun subscribe-to-feed (uid feedid)
219
-  (postmodern:query
220
-    (:insert-into 'subscriptions :set 'uid uid 'feedid feedid)))
221
-
222
-#|
223
-(:documentation
224
-  "Store a serialized rss object into rhe database: the basic idea here is
225
-   that the quasi-quoted expression generates a form that would insert the
226
-   item and then we eval it.")
227
-|#
228
-
229
-@export
230
-(defun deserialize-item (item)
231
-  (let ((result (make-instance 'rss-item)))
232
-    (copy-slots (title link (description description-raw) comments enclosure guid pub-date source)
233
-                item
234
-                result)
235
-    result))
236
-
237
-@export
238
-(defun deserialize-items (feed-id)
239
-  (let ((items (postmodern:query-dao 'rss_item_store
240
-                                     (:order-by
241
-                                       (:select :* :from 'rss_item_store
242
-                                        :where (:= :feed feed-id))
243
-                                       (:desc 'pub-date)))))
244
-    (loop for item in items collect (deserialize-item item))))
245
-
246
-@export
247
-(defun deserialize-feed (feed)
248
-  (let ((result (make-instance 'rss-feed)))
249
-    (copy-slots (title link description fetch-url) feed result)
250
-    (setf (rss-feed-items result) (deserialize-items (rfs-id feed)))
251
-    result))
252
-
253
-@export
254
-(defun deserialize (&optional user-info)
255
-  (default-when #() (not (null user-info))
256
-    (let ((feeds
257
-            (postmodern:query-dao 'rss_feed_store
258
-                                  (:select 'rss_feed_store.*
259
-                                   :from 'rss_feed_store
260
-                                   :inner-join  'subscriptions :on (:= 'rss_feed_store.id  'subscriptions.feedid)
261
-                                   :inner-join  'reader_user :on (:= 'reader_user.id  'subscriptions.uid)
262
-                                   :where (:= 'reader_user.foreign_id (user-foreign-id user-info))))))
263
-      (apply #'vector (loop for feed in feeds collect (deserialize-feed feed))))))
264
-
265
-(export
266
-  (defun get-feed-from-dao (rss-feed)
267
-    (let ((feed-dao (get-dao-for rss-feed)))
268
-      (list feed-dao
269
-            (with-slots (items) rss-feed
270
-              (iterate (for item in items)
271
-                       (collect (get-dao-for item (slot-value feed-dao 'id)))))))))
272
-
273
-
274
-@export
275
-(defun upsert-feed (rss-feed)
276
-  (postmodern:ensure-transaction
277
-    (destructuring-bind (feed items) (get-feed-from-dao rss-feed)
278
-      (postmodern:upsert-dao feed)
279
-      (mapcar #'postmodern:upsert-dao items))))
280
-
281
-
282
-; \o/
283
-;  | Arrr
284
-; / \
285 0
deleted file mode 100644
... ...
@@ -1,84 +0,0 @@
1
-/*
2
-Baseline - a designer framework
3
-Copyright (C) 2009 Stephane Curzi, ProjetUrbain.com
4
-Creative Commons Attribution-Share Alike 3.0 License
5
-version 0.5.2
6
-*/
7
-
8
-li.link > section.link-content > div {
9
-
10
-  /******************** Base ********************/
11
-  h1, h2, h3, h4, h5, h6							{ line-height: 1.2; }
12
-  h4, h5, h6										{ font-weight: bold; }
13
-  b, strong, caption, th, thead, dt, legend		{ font-weight: bold; }
14
-  cite, dfn, em, i								{ font-style: italic; }
15
-  code, kbd, samp, pre, tt, var					{ font-family: mono-space, monospace; }
16
-  h1, h2, h3, h4, h5, h6							{ word-spacing: -0.125em; }
17
-  p												{ word-spacing: 0.125em; hyphenate: auto; hyphenate-lines: 3; }
18
-  p+p												{ text-indent: 1.5em; }
19
-  p+p.no-indent									{ text-indent: 0; }
20
-  pre												{ white-space: pre; }
21
-  del												{ text-decoration: line-through; }
22
-  mark											{ background: rgba(255, 255, 0, 0.4); padding: 0 .25em; }
23
-  ins												{ color: #f00; }
24
-  small, sup, sub									{ font-size: 80%; }
25
-  big												{ font-size: 125%; line-height: 80%; }
26
-  abbr, acronym									{ font-size: 85%; text-transform: uppercase; letter-spacing: .1em; }
27
-  abbr[title], acronym[title], dfn[title]			{ border-bottom: 1px dotted black; cursor: help; }
28
-  sup, sub										{ line-height: 0; }
29
-  sup												{ vertical-align: super; }
30
-  sub												{ vertical-align: sub; }
31
-  blockquote										{ padding: 1.5em; }
32
-  hr												{ border: none; background: #ddd; width: 100%; }
33
-  ul, ol											{ margin-left: 1.5em; }
34
-  ul												{ list-style: disc outside; }
35
-  ol												{ list-style: decimal outside; }
36
-  input, select, button							{ cursor: pointer; }
37
-  table											{ font: inherit; width: 100%; }
38
-
39
-  /* html 5 */
40
-  article, aside, header, hgroup,
41
-  nav, figure, section, footer					{ display: block; }
42
-
43
-  /* Debug */
44
-  .debug											{ outline: solid gold 1px; }
45
-  .debug-background								{ background: rgba(255, 215, 0, 0.2) !important; }/*
46
-  Baseline - a designer framework
47
-  Copyright (C) 2009 Stephane Curzi, ProjetUrbain.com
48
-  Creative Commons Attribution-Share Alike 3.0 License
49
-  version 0.5
50
-                                                                                             */
51
-
52
-/******************** Baseline grid: 13/18px ********************/
53
-body								{ font-size: 75%; line-height: 1.5; /*12/18*/ }
54
-
55
-h1, h2, h3, h4, h5, h6				{ position: relative; }
56
-h1, h2								{ line-height: 36px; margin-bottom: 18px; }
57
-h1, h2, h3, h4						{ margin-top: 18px; }
58
-h3, h4, h5, h6						{ line-height: 18px; }
59
-h1									{ font-size: 36px; top: 5px; }
60
-h2									{ font-size: 28px; top: 8px; }
61
-h3									{ font-size: 22px; top: 1px; }
62
-h4									{ font-size: 18px; top: 2px; }
63
-h5									{ font-size: 15px; top: 4px; }
64
-h6									{ font-size: 13px; top: 5px; }
65
-h1:first-child,
66
-h2:first-child,
67
-h3:first-child,
68
-h4:first-child						{ margin-top: 0; }
69
-
70
-p, pre, address						{ font-size: 13px; line-height: 18px; position: relative; top: 5px; }
71
-small								{ font-size: 11px; }
72
-abbr, code, kbd,
73
-samp, small, var					{ line-height: 15px; }
74
-ul, ol, dl, dialog					{ font-size: 13px; line-height: 18px; position: relative; top: 5px; margin-top: 18px; margin-bottom: 18px; }
75
-li ul, li ol, ul ul, ol ol			{ top: 0; margin-top: 0; margin-bottom: 0; }
76
-li h1, li h2, li h3,
77
-li h4, li h5, li h6,
78
-li p								{ top: 0; }
79
-form, legend, label					{ font-size: 13px; line-height: 18px; }
80
-legend								{ position: relative; top: 5px; }
81
-table								{ font-size: 13px; }
82
-caption								{ font-size: 13px; line-height: 18px; position: relative; }
83
-hr									{ position: relative; height: 4px; margin: 18px 0 14px 0; }
84
-}
85 0
deleted file mode 100644
... ...
@@ -1,165 +0,0 @@
1
-/*
2
-Baseline - a designer framework
3
-Copyright (C) 2009 Stephane Curzi, ProjetUrbain.com
4
-Creative Commons Attribution-Share Alike 3.0 License
5
-version 0.5.2
6
-*/
7
-li.link > section.link-content > div {
8
-  /******************** Base ********************/
9
-  /* html 5 */
10
-  /* Debug */
11
-                 								                                                  /*
12
-Baseline - a designer framework
13
-Copyright (C) 2009 Stephane Curzi, ProjetUrbain.com
14
-Creative Commons Attribution-Share Alike 3.0 License
15
-version 0.5
16
-                                                                                           */
17
-  /******************** Baseline grid: 13/18px ********************/ }
18
-  li.link > section.link-content > div h1, li.link > section.link-content > div h2, li.link > section.link-content > div h3, li.link > section.link-content > div h4, li.link > section.link-content > div h5, li.link > section.link-content > div h6 {
19
-    line-height: 1.2; }
20
-  li.link > section.link-content > div h4, li.link > section.link-content > div h5, li.link > section.link-content > div h6 {
21
-    font-weight: bold; }
22
-  li.link > section.link-content > div b, li.link > section.link-content > div strong, li.link > section.link-content > div caption, li.link > section.link-content > div th, li.link > section.link-content > div thead, li.link > section.link-content > div dt, li.link > section.link-content > div legend {
23
-    font-weight: bold; }
24
-  li.link > section.link-content > div cite, li.link > section.link-content > div dfn, li.link > section.link-content > div em, li.link > section.link-content > div i {
25
-    font-style: italic; }
26
-  li.link > section.link-content > div code, li.link > section.link-content > div kbd, li.link > section.link-content > div samp, li.link > section.link-content > div pre, li.link > section.link-content > div tt, li.link > section.link-content > div var {
27
-    font-family: mono-space, monospace; }
28
-  li.link > section.link-content > div h1, li.link > section.link-content > div h2, li.link > section.link-content > div h3, li.link > section.link-content > div h4, li.link > section.link-content > div h5, li.link > section.link-content > div h6 {
29
-    word-spacing: -0.125em; }
30
-  li.link > section.link-content > div p {
31
-    word-spacing: 0.125em;
32
-    hyphenate: auto;
33
-    hyphenate-lines: 3; }
34
-  li.link > section.link-content > div p + p {
35
-    text-indent: 1.5em; }
36
-  li.link > section.link-content > div p + p.no-indent {
37
-    text-indent: 0; }
38
-  li.link > section.link-content > div pre {
39
-    white-space: pre; }
40
-  li.link > section.link-content > div del {
41
-    text-decoration: line-through; }
42
-  li.link > section.link-content > div mark {
43
-    background: rgba(255, 255, 0, 0.4);
44
-    padding: 0 .25em; }
45
-  li.link > section.link-content > div ins {
46
-    color: #f00; }
47
-  li.link > section.link-content > div small, li.link > section.link-content > div sup, li.link > section.link-content > div sub {
48
-    font-size: 80%; }
49
-  li.link > section.link-content > div big {
50
-    font-size: 125%;
51
-    line-height: 80%; }
52
-  li.link > section.link-content > div abbr, li.link > section.link-content > div acronym {
53
-    font-size: 85%;
54
-    text-transform: uppercase;
55
-    letter-spacing: .1em; }
56
-  li.link > section.link-content > div abbr[title], li.link > section.link-content > div acronym[title], li.link > section.link-content > div dfn[title] {
57
-    border-bottom: 1px dotted black;
58
-    cursor: help; }
59
-  li.link > section.link-content > div sup, li.link > section.link-content > div sub {
60
-    line-height: 0; }
61
-  li.link > section.link-content > div sup {
62
-    vertical-align: super; }
63
-  li.link > section.link-content > div sub {
64
-    vertical-align: sub; }
65
-  li.link > section.link-content > div blockquote {
66
-    padding: 1.5em; }
67
-  li.link > section.link-content > div hr {
68
-    border: none;
69
-    background: #ddd;
70
-    width: 100%; }
71
-  li.link > section.link-content > div ul, li.link > section.link-content > div ol {
72
-    margin-left: 1.5em; }
73
-  li.link > section.link-content > div ul {
74
-    list-style: disc outside; }
75
-  li.link > section.link-content > div ol {
76
-    list-style: decimal outside; }
77
-  li.link > section.link-content > div input, li.link > section.link-content > div select, li.link > section.link-content > div button {
78
-    cursor: pointer; }
79
-  li.link > section.link-content > div table {
80
-    font: inherit;
81
-    width: 100%; }
82
-  li.link > section.link-content > div article, li.link > section.link-content > div aside, li.link > section.link-content > div header, li.link > section.link-content > div hgroup,
83
-  li.link > section.link-content > div nav, li.link > section.link-content > div figure, li.link > section.link-content > div section, li.link > section.link-content > div footer {
84
-    display: block; }
85
-  li.link > section.link-content > div .debug {
86
-    outline: solid gold 1px; }
87
-  li.link > section.link-content > div .debug-background {
88
-    background: rgba(255, 215, 0, 0.2) !important; }
89
-  li.link > section.link-content > div body {
90
-    font-size: 75%;
91
-    line-height: 1.5;
92
-    /*12/18*/ }
93
-  li.link > section.link-content > div h1, li.link > section.link-content > div h2, li.link > section.link-content > div h3, li.link > section.link-content > div h4, li.link > section.link-content > div h5, li.link > section.link-content > div h6 {
94
-    position: relative; }
95
-  li.link > section.link-content > div h1, li.link > section.link-content > div h2 {
96
-    line-height: 36px;
97
-    margin-bottom: 18px; }
98
-  li.link > section.link-content > div h1, li.link > section.link-content > div h2, li.link > section.link-content > div h3, li.link > section.link-content > div h4 {
99
-    margin-top: 18px; }
100
-  li.link > section.link-content > div h3, li.link > section.link-content > div h4, li.link > section.link-content > div h5, li.link > section.link-content > div h6 {
101
-    line-height: 18px; }
102
-  li.link > section.link-content > div h1 {
103
-    font-size: 36px;
104
-    top: 5px; }
105
-  li.link > section.link-content > div h2 {
106
-    font-size: 28px;
107
-    top: 8px; }
108
-  li.link > section.link-content > div h3 {
109
-    font-size: 22px;
110
-    top: 1px; }
111
-  li.link > section.link-content > div h4 {
112
-    font-size: 18px;
113
-    top: 2px; }
114
-  li.link > section.link-content > div h5 {
115
-    font-size: 15px;
116
-    top: 4px; }
117
-  li.link > section.link-content > div h6 {
118
-    font-size: 13px;
119
-    top: 5px; }
120
-  li.link > section.link-content > div h1:first-child,
121
-  li.link > section.link-content > div h2:first-child,
122
-  li.link > section.link-content > div h3:first-child,
123
-  li.link > section.link-content > div h4:first-child {
124
-    margin-top: 0; }
125
-  li.link > section.link-content > div p, li.link > section.link-content > div pre, li.link > section.link-content > div address {
126
-    font-size: 13px;
127
-    line-height: 18px;
128
-    position: relative;
129
-    top: 5px; }
130
-  li.link > section.link-content > div small {
131
-    font-size: 11px; }
132
-  li.link > section.link-content > div abbr, li.link > section.link-content > div code, li.link > section.link-content > div kbd,
133
-  li.link > section.link-content > div samp, li.link > section.link-content > div small, li.link > section.link-content > div var {
134
-    line-height: 15px; }
135
-  li.link > section.link-content > div ul, li.link > section.link-content > div ol, li.link > section.link-content > div dl, li.link > section.link-content > div dialog {
136
-    font-size: 13px;
137
-    line-height: 18px;
138
-    position: relative;
139
-    top: 5px;
140
-    margin-top: 18px;
141
-    margin-bottom: 18px; }
142
-  li.link > section.link-content > div li ul, li.link > section.link-content > div li ol, li.link > section.link-content > div ul ul, li.link > section.link-content > div ol ol {
143
-    top: 0;
144
-    margin-top: 0;
145
-    margin-bottom: 0; }
146
-  li.link > section.link-content > div li h1, li.link > section.link-content > div li h2, li.link > section.link-content > div li h3,
147
-  li.link > section.link-content > div li h4, li.link > section.link-content > div li h5, li.link > section.link-content > div li h6,
148
-  li.link > section.link-content > div li p {
149
-    top: 0; }
150
-  li.link > section.link-content > div form, li.link > section.link-content > div legend, li.link > section.link-content > div label {
151
-    font-size: 13px;
152
-    line-height: 18px; }
153
-  li.link > section.link-content > div legend {
154
-    position: relative;
155
-    top: 5px; }
156
-  li.link > section.link-content > div table {
157
-    font-size: 13px; }
158
-  li.link > section.link-content > div caption {
159
-    font-size: 13px;
160
-    line-height: 18px;
161
-    position: relative; }
162
-  li.link > section.link-content > div hr {
163
-    position: relative;
164
-    height: 4px;
165
-    margin: 18px 0 14px 0; }
166 0
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-@import url(http://fonts.googleapis.com/css?family=Source+Code+Pro);.link-content{font-size:1rem;}.link-content p + p{margin-top:1em;}.link-content pre{font-family:Source Code Pro;}
2 0
\ No newline at end of file
3 1
deleted file mode 100644
... ...
@@ -1,654 +0,0 @@
1
-a,
2
-abbr,
3
-acronym,
4
-address,
5
-applet,
6
-article,
7
-aside,
8
-audio,
9
-b,
10
-big,
11
-blockquote,
12
-body,
13
-canvas,
14
-caption,
15
-center,
16
-cite,
17
-code,
18
-dd,
19
-del,
20
-details,
21
-dfn,
22
-dialog,
23
-div,
24
-dl,
25
-dt,
26
-em,
27
-embed,
28
-fieldset,
29
-figcaption,
30
-figure,
31
-font,
32
-footer,
33
-form,
34
-h1,
35
-h2,
36
-h3,
37
-h4,
38
-h5,
39
-h6,
40
-header,
41
-hgroup,
42
-hr,
43
-html,
44
-i,
45
-iframe,
46
-img,
47
-ins,
48
-kbd,
49
-label,
50
-legend,
51
-li,
52
-mark,
53
-menu,
54
-meter,
55
-nav,
56
-object,
57
-ol,
58
-output,
59
-p,
60
-pre,
61
-progress,
62
-q,
63
-rp,
64
-rt,
65
-ruby,
66
-s,
67
-samp,
68
-section,
69
-small,
70
-span,
71
-strike,
72
-strong,
73
-sub,
74
-summary,
75
-sup,
76
-table,
77
-tbody,
78
-td,
79
-tfoot,
80
-th,
81
-thead,
82
-time,
83
-tr,
84
-tt,
85
-u,
86
-ul,
87
-var,
88
-video,
89
-xmp {
90
-  border: 0;
91
-  margin: 0;
92
-  padding: 0;
93
-  font-size: 100%;
94
-}
95
-
96
-html,
97
-body {
98
-  height: 100%;
99
-}
100
-
101
-article,
102
-aside,
103
-details,
104
-figcaption,
105
-figure,
106
-footer,
107
-header,
108
-hgroup,
109
-menu,
110
-nav,
111
-section {
112
-  display: block;
113
-}
114
-
115
-b,
116
-strong {
117
-  font-weight: bold;
118
-}
119
-
120
-img {
121
-  color: transparent;
122
-  font-size: 0;
123
-  vertical-align: middle;
124
-  -ms-interpolation-mode: bicubic;
125
-}
126
-
127
-ul,
128
-ol {
129
-  list-style: none;
130
-}
131
-
132
-li {
133
-  display: list-item;
134
-}
135
-
136
-table {
137
-  border-collapse: collapse;
138
-  border-spacing: 0;
139
-}
140
-
141
-th,
142
-td,
143
-caption {
144
-  font-weight: normal;
145
-  vertical-align: top;
146
-  text-align: left;
147
-}
148
-
149
-q {
150
-  quotes: none;
151
-}
152
-
153
-q:before,
154
-q:after {
155
-  content: "";
156
-  content: none;
157
-}
158
-
159
-sub,
160
-sup,
161
-small {
162
-  font-size: 75%;
163
-}
164
-
165
-sub,
166
-sup {
167
-  line-height: 0;
168
-  position: relative;
169
-  vertical-align: baseline;
170
-}
171
-
172
-sub {
173
-  bottom: -0.25em;
174
-}
175
-
176
-sup {
177
-  top: -0.5em;
178
-}
179
-
180
-svg {
181
-  overflow: hidden;
182
-}
183
-
184
-body {
185
-  font: 13px/1.5 "Helvetica Neue", Arial, "Liberation Sans", FreeSans, sans-serif;
186
-}
187
-
188
-pre,
189
-code {
190
-  font-family: "DejaVu Sans Mono", Monaco, Consolas, monospace;
191
-}
192
-
193
-hr {
194
-  border: 0 #cccccc solid;
195
-  border-top-width: 1px;
196
-  clear: both;
197
-  height: 0;
198
-}
199
-
200
-h1 {
201
-  font-size: 25px;
202
-}
203
-
204
-h2 {
205
-  font-size: 23px;
206
-}
207
-
208
-h3 {
209
-  font-size: 21px;
210
-}
211
-
212
-h4 {
213
-  font-size: 19px;
214
-}
215
-
216
-h5 {
217
-  font-size: 17px;
218
-}
219
-
220
-h6 {
221
-  font-size: 15px;
222
-}
223
-
224
-ol {
225
-  list-style: decimal;
226
-}
227
-
228
-ul {
229
-  list-style: disc;
230
-}
231
-
232
-li {
233
-  margin-left: 30px;
234
-}
235
-
236
-p,
237
-dl,
238
-hr,
239
-h1,
240
-h2,
241
-h3,
242
-h4,
243
-h5,
244
-h6,
245
-ol,
246
-ul,
247
-pre,
248
-table,
249
-address,
250
-fieldset,
251
-figure {
252
-  margin-bottom: 20px;
253
-}
254
-
255
-.input_tiny {
256
-  width: 50px;
257
-}
258
-
259
-.input_small {
260
-  width: 100px;
261
-}
262
-
263
-.input_medium {
264
-  width: 150px;
265
-}
266
-
267
-.input_large {
268
-  width: 200px;
269
-}
270
-
271
-.input_xlarge {
272
-  width: 250px;
273
-}
274
-
275
-.input_xxlarge {
276
-  width: 300px;
277
-}
278
-
279
-.input_full {
280
-  width: 100%;
281
-}
282
-
283
-.input_full_wrap {
284
-  display: block;
285
-  padding-right: 8px;
286
-}
287
-
288
-input[type="search"]::-webkit-search-decoration {
289
-  display: none;
290
-}
291
-
292
-input:invalid,
293
-button:invalid,
294
-a.button:invalid,
295
-select:invalid,
296
-textarea:invalid {
297
-  -webkit-box-shadow: none;
298
-  -moz-box-shadow: none;
299
-  box-shadow: none;
300
-}
301
-input:focus,
302
-button:focus,
303
-a.button:focus,
304
-select:focus,
305
-textarea:focus {
306
-  -webkit-box-shadow: #0066ff 0 0 5px 0;
307
-  -moz-box-shadow: #0066ff 0 0 5px 0;
308
-  box-shadow: #0066ff 0 0 5px 0;
309
-  z-index: 1;
310
-}
311
-
312
-input[type="file"]:focus, input[type="file"]:active,
313
-input[type="radio"]:focus,
314
-input[type="radio"]:active,
315
-input[type="checkbox"]:focus,
316
-input[type="checkbox"]:active {
317
-  -webkit-box-shadow: none;
318
-  -moz-box-shadow: none;
319
-  box-shadow: none;
320
-}
321
-
322
-button,
323
-a.button,
324
-input[type="reset"],
325
-input[type="submit"],
326
-input[type="button"] {
327
-  -webkit-appearance: none;
328
-  -webkit-border-radius: 4px;
329
-  -moz-border-radius: 4px;
330
-  -ms-border-radius: 4px;
331
-  -o-border-radius: 4px;
332
-  border-radius: 4px;
333
-  -webkit-background-clip: padding;
334
-  -moz-background-clip: padding;
335
-  background-clip: padding-box;
336
-  background: #dddddd url('../images/button.png?1298351022') repeat-x;
337
-  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #dddddd));
338
-  background-image: -webkit-linear-gradient(#ffffff, #dddddd);
339
-  background-image: -moz-linear-gradient(#ffffff, #dddddd);
340
-  background-image: -o-linear-gradient(#ffffff, #dddddd);
341
-  background-image: -ms-linear-gradient(#ffffff, #dddddd);
342
-  background-image: linear-gradient(#ffffff, #dddddd);
343
-  border: 1px solid;
344
-  border-color: #dddddd #bbbbbb #999999;
345
-  cursor: pointer;
346
-  color: #333333;
347
-  display: inline-block;
348
-  font: bold 12px/1.3 "Helvetica Neue", Arial, "Liberation Sans", FreeSans, sans-serif;
349
-  outline: 0;
350
-  overflow: visible;
351
-  margin: 0;
352
-  padding: 3px 10px;
353
-  text-shadow: white 0 1px 1px;
354
-  text-decoration: none;
355
-  vertical-align: top;
356
-  width: auto;
357
-  *padding-top: 2px;
358
-  *padding-bottom: 0;
359
-}
360
-button:hover,
361
-a.button:hover,
362
-input[type="reset"]:hover,
363
-input[type="submit"]:hover,
364
-input[type="button"]:hover {
365
-  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(1px, #eeeeee), color-stop(100%, #cccccc));
366
-  background-image: -webkit-linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
367
-  background-image: -moz-linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
368
-  background-image: -o-linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
369
-  background-image: -ms-linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
370
-  background-image: linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
371
-}
372
-button:active,
373
-a.button:active,
374
-input[type="reset"]:active,
375
-input[type="submit"]:active,
376
-input[type="button"]:active {
377
-  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(1px, #dddddd), color-stop(100%, #eeeeee));
378
-  background-image: -webkit-linear-gradient(#ffffff, #dddddd 1px, #eeeeee);
379
-  background-image: -moz-linear-gradient(#ffffff, #dddddd 1px, #eeeeee);
380
-  background-image: -o-linear-gradient(#ffffff, #dddddd 1px, #eeeeee);
381
-  background-image: -ms-linear-gradient(#ffffff, #dddddd 1px, #eeeeee);
382
-  background-image: linear-gradient(#ffffff, #dddddd 1px, #eeeeee);
383
-  -webkit-box-shadow: inset rgba(0, 0, 0, 0.25) 0 1px 2px 0;
384
-  -moz-box-shadow: inset rgba(0, 0, 0, 0.25) 0 1px 2px 0;
385
-  box-shadow: inset rgba(0, 0, 0, 0.25) 0 1px 2px 0;
386
-  border-color: #999999 #bbbbbb #dddddd;
387
-}
388
-button::-moz-focus-inner,
389
-a.button::-moz-focus-inner,
390
-input[type="reset"]::-moz-focus-inner,
391
-input[type="submit"]::-moz-focus-inner,
392
-input[type="button"]::-moz-focus-inner {
393
-  border: 0;
394
-  padding: 0;
395
-}
396
-
397
-a.button {
398
-  *padding-bottom: 3px;
399
-}
400
-
401
-button {
402
-  *padding-top: 1px;
403
-  *padding-bottom: 1px;
404
-}
405
-
406
-textarea,
407
-select,
408
-input[type="date"],
409
-input[type="datetime"],
410
-input[type="datetime-local"],
411
-input[type="email"],
412
-input[type="month"],
413
-input[type="number"],
414
-input[type="password"],
415
-input[type="search"],
416
-input[type="tel"],
417
-input[type="text"],
418
-input[type="time"],
419
-input[type="url"],
420
-input[type="week"] {
421
-  -webkit-box-sizing: border-box;
422
-  -moz-box-sizing: border-box;
423
-  box-sizing: border-box;
424
-  -webkit-background-clip: padding;
425
-  -moz-background-clip: padding;
426
-  background-clip: padding-box;
427
-  -webkit-border-radius: 0;
428
-  -moz-border-radius: 0;
429
-  -ms-border-radius: 0;
430
-  -o-border-radius: 0;
431
-  border-radius: 0;
432
-  -webkit-appearance: none;
433
-  background-color: white;
434
-  border: 1px solid;
435
-  border-color: #848484 #c1c1c1 #e1e1e1;
436
-  color: black;
437
-  outline: 0;
438
-  margin: 0;
439
-  padding: 2px 3px;
440
-  text-align: left;
441
-  font-size: 13px;
442
-  font-family: Arial, "Liberation Sans", FreeSans, sans-serif;
443
-  height: 1.8em;
444
-  vertical-align: top;
445
-  *padding-top: 2px;
446
-  *padding-bottom: 1px;
447
-  *height: auto;
448
-}
449
-textarea[disabled],
450
-select[disabled],
451
-input[type="date"][disabled],
452
-input[type="datetime"][disabled],
453
-input[type="datetime-local"][disabled],
454
-input[type="email"][disabled],
455
-input[type="month"][disabled],
456
-input[type="number"][disabled],
457
-input[type="password"][disabled],
458
-input[type="search"][disabled],
459
-input[type="tel"][disabled],
460
-input[type="text"][disabled],
461
-input[type="time"][disabled],
462
-input[type="url"][disabled],
463
-input[type="week"][disabled] {
464
-  background-color: #eeeeee;
465
-}
466
-
467
-button[disabled],
468
-input[disabled],
469
-select[disabled],
470
-select[disabled] option,
471
-select[disabled] optgroup,
472
-textarea[disabled],
473
-a.button_disabled {
474
-  -webkit-box-shadow: none;
475
-  -moz-box-shadow: none;
476
-  box-shadow: none;
477
-  -moz-user-select: -moz-none;
478
-  -webkit-user-select: none;
479
-  -khtml-user-select: none;
480
-  user-select: none;
481
-  color: #888888;
482
-  cursor: default;
483
-}
484
-
485
-input::-webkit-input-placeholder,
486
-textarea::-webkit-input-placeholder {
487
-  color: #888888;
488
-}
489
-
490
-input:-moz-placeholder,
491
-textarea:-moz-placeholder {
492
-  color: #888888;
493
-}
494
-
495
-input.placeholder_text,
496
-textarea.placeholder_text {
497
-  color: #888888;
498
-}
499
-
500
-textarea,
501
-select[size],
502
-select[multiple] {
503
-  height: auto;
504
-}
505
-
506
-select[size="0"],
507
-select[size="1"] {
508
-  height: 1.8em;
509
-  *height: auto;
510
-}
511
-
512
-@media (-webkit-min-device-pixel-ratio: 0) {
513
-  select[size],
514
-  select[multiple],
515
-  select[multiple][size] {
516
-    background-image: none;
517
-    padding-right: 3px;
518
-  }
519
-
520
-  select,
521
-  select[size="0"],
522
-  select[size="1"] {
523
-    background-image: url(data:image/png;base64,R0lGODlhDQAEAIAAAAAAAP8A/yH5BAEHAAEALAAAAAANAAQAAAILhA+hG5jMDpxvhgIAOw==);
524
-    background-repeat: no-repeat;
525
-    background-position: right center;
526
-    padding-right: 20px;
527
-  }
528
-
529
-  ::-webkit-validation-bubble-message {
530
-    -webkit-box-shadow: none;
531
-    box-shadow: none;
532
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #666666), color-stop(1, black));
533
-    border: 1px solid;
534
-    border-color: #747474 #5e5e5e #4f4f4f;
535
-    color: white;
536
-    font: 13px/17px "Lucida Grande", Arial, "Liberation Sans", FreeSans, sans-serif;
537
-    overflow: hidden;
538
-    padding: 15px 15px 17px;
539
-    text-shadow: black 0 0 1px;
540
-    height: 16px;
541
-  }
542
-
543
-  ::-webkit-validation-bubble-arrow,
544
-  ::-webkit-validation-bubble-top-outer-arrow,
545
-  ::-webkit-validation-bubble-top-inner-arrow {
546
-    -webkit-box-shadow: none;
547
-    box-shadow: none;
548
-    background: #666666;
549
-    border: 0;
550
-  }
551
-}
552
-textarea {
553
-  min-height: 40px;
554
-  overflow: auto;
555
-  resize: vertical;
556
-  width: 100%;
557
-}
558
-
559
-optgroup {
560
-  color: black;
561
-  font-style: normal;
562
-  font-weight: normal;
563
-  font-family: Arial, "Liberation Sans", FreeSans, sans-serif;
564
-}
565
-optgroup::-moz-focus-inner {
566
-  border: 0;
567
-  padding: 0;
568
-}
569
-
570
-.ie6_button,
571
-* html button,
572
-* html a.button {
573
-  background: #dddddd url('../images/button.png?1298351022') repeat-x;
574
-  border: 1px solid;
575
-  border-color: #dddddd #bbbbbb #999999;
576
-  cursor: pointer;
577
-  color: #333333;
578
-  font: bold 12px/1.2 Arial, sans-serif;
579
-  padding: 2px 10px 0px;
580
-  text-decoration: none;
581
-  overflow: visible;
582
-  vertical-align: top;
583
-  width: auto;
584
-}
585
-
586
-* html a.button {
587
-  position: relative;
588
-  top: 3px;
589
-  padding-bottom: 2px;
590
-}
591
-
592
-* html button {
593
-  padding-top: 1px;
594
-  padding-bottom: 1px;
595
-}
596
-
597
-.ie6_input,
598
-* html textarea,
599
-* html select {
600
-  background: white;
601
-  border: 1px solid;
602
-  border-color: #848484 #c1c1c1 #e1e1e1;
603
-  color: black;
604
-  padding: 2px 3px 1px;
605
-  font-size: 13px;
606
-  font-family: Arial, sans-serif;
607
-  vertical-align: top;
608
-}
609
-
610
-* html select {
611
-  margin-top: 1px;
612
-}
613
-
614
-.placeholder_text,
615
-.ie6_input_disabled,
616
-.ie6_button_disabled {
617
-  color: #888888;
618
-}
619
-
620
-.ie6_input_disabled {
621
-  background: #eeeeee;
622
-}
623
-
624
-body {
625
-  background: white;
626
-  color: black;
627
-}
628
-
629
-#wrapper {
630
-  margin: 0 auto;
631
-  padding: 20px;
632
-  width: 800px;
633
-}
634
-
635
-label.error {
636
-  background: #ffffcc;
637
-  color: #cc0000;
638
-  font-style: italic;
639
-}
640
-
641
-input.error,
642
-select.error,
643
-textarea.error {
644
-  background-color: #ffeeee;
645
-}
646
-
647
-.horiz {
648
-  margin-top: -20px;
649
-  margin-left: -20px;
650
-}
651
-
652
-.horiz td {
653
-  padding: 20px 0 0 20px;
654
-}
655 0
deleted file mode 100644
... ...
@@ -1,365 +0,0 @@
1
-.input_tiny {
2
-  width: 50px;
3
-}
4
-
5
-.input_small {
6
-  width: 100px;
7
-}
8
-
9
-.input_medium {
10
-  width: 150px;
11
-}
12
-
13
-.input_large {
14
-  width: 200px;
15
-}
16
-
17
-.input_xlarge {
18
-  width: 250px;
19
-}
20
-
21
-.input_xxlarge {
22
-  width: 300px;
23
-}
24
-
25
-.input_full {
26
-  width: 100%;
27
-}
28
-
29
-.input_full_wrap {
30
-  display: block;
31
-  padding-right: 8px;
32
-}
33
-
34
-input[type="search"]::-webkit-search-decoration {
35
-  display: none;
36
-}
37
-
38
-input:invalid,
39
-button:invalid,
40
-a.button:invalid,
41
-select:invalid,
42
-textarea:invalid {
43
-  -webkit-box-shadow: none;
44
-  -moz-box-shadow: none;
45
-  box-shadow: none;
46
-}
47
-input:focus,
48
-button:focus,
49
-a.button:focus,
50
-select:focus,
51
-textarea:focus {
52
-  -webkit-box-shadow: #0066ff 0 0 5px 0;
53
-  -moz-box-shadow: #0066ff 0 0 5px 0;
54
-  box-shadow: #0066ff 0 0 5px 0;
55
-  z-index: 1;
56
-}
57
-
58
-input[type="file"]:focus, input[type="file"]:active,
59
-input[type="radio"]:focus,
60
-input[type="radio"]:active,
61
-input[type="checkbox"]:focus,
62
-input[type="checkbox"]:active {
63
-  -webkit-box-shadow: none;
64
-  -moz-box-shadow: none;
65
-  box-shadow: none;
66
-}
67
-
68
-button,
69
-a.button,
70
-input[type="reset"],
71
-input[type="submit"],
72
-input[type="button"] {
73
-  -webkit-appearance: none;
74
-  -webkit-border-radius: 4px;
75
-  -moz-border-radius: 4px;
76
-  -ms-border-radius: 4px;
77
-  -o-border-radius: 4px;
78
-  border-radius: 4px;
79
-  -webkit-background-clip: padding;
80
-  -moz-background-clip: padding;
81
-  background-clip: padding-box;
82
-  background: #dddddd url('../images/button.png?1298351022') repeat-x;
83
-  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #dddddd));
84
-  background-image: -webkit-linear-gradient(#ffffff, #dddddd);
85
-  background-image: -moz-linear-gradient(#ffffff, #dddddd);
86
-  background-image: -o-linear-gradient(#ffffff, #dddddd);
87
-  background-image: linear-gradient(#ffffff, #dddddd);
88
-  border: 1px solid;
89
-  border-color: #dddddd #bbbbbb #999999;
90
-  cursor: pointer;
91
-  color: #333333;
92
-  display: inline-block;
93
-  font: bold 12px/1.3 "Helvetica Neue", Arial, "Liberation Sans", FreeSans, sans-serif;
94
-  outline: 0;
95
-  overflow: visible;
96
-  margin: 0;
97
-  padding: 3px 10px;
98
-  text-shadow: white 0 1px 1px;
99
-  text-decoration: none;
100
-  vertical-align: top;
101
-  width: auto;
102
-  *padding-top: 2px;
103
-  *padding-bottom: 0;
104
-}
105
-button:hover,
106
-a.button:hover,
107
-input[type="reset"]:hover,
108
-input[type="submit"]:hover,
109
-input[type="button"]:hover {
110
-  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(1px, #eeeeee), color-stop(100%, #cccccc));
111
-  background-image: -webkit-linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
112
-  background-image: -moz-linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
113
-  background-image: -o-linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
114
-  background-image: linear-gradient(#ffffff, #eeeeee 1px, #cccccc);
115
-  text-decoration: none;
116
-}
117
-button:active,
118
-a.button:active,
119
-input[type="reset"]:active,
120
-input[type="submit"]:active,
121
-input[type="button"]:active {
122
-  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dddddd), color-stop(100%, #eeeeee));
123
-  background-image: -webkit-linear-gradient(#dddddd, #eeeeee);
124
-  background-image: -moz-linear-gradient(#dddddd, #eeeeee);
125
-  background-image: -o-linear-gradient(#dddddd, #eeeeee);
126
-  background-image: linear-gradient(#dddddd, #eeeeee);
127
-  -webkit-box-shadow: inset rgba(0, 0, 0, 0.25) 0 1px 2px 0;
128
-  -moz-box-shadow: inset rgba(0, 0, 0, 0.25) 0 1px 2px 0;
129
-  box-shadow: inset rgba(0, 0, 0, 0.25) 0 1px 2px 0;
130
-  border-color: #999999 #bbbbbb #dddddd;
131
-}
132
-button::-moz-focus-inner,
133
-a.button::-moz-focus-inner,
134
-input[type="reset"]::-moz-focus-inner,
135
-input[type="submit"]::-moz-focus-inner,
136
-input[type="button"]::-moz-focus-inner {
137
-  border: 0;
138
-  padding: 0;
139
-}
140
-
141
-a.button {
142
-  *padding-bottom: 3px;
143
-}
144
-
145
-button {
146
-  *padding-top: 1px;
147
-  *padding-bottom: 1px;
148
-}
149
-
150
-textarea,
151
-select,
152
-input[type="date"],
153
-input[type="datetime"],
154
-input[type="datetime-local"],
155
-input[type="email"],
156
-input[type="month"],
157
-input[type="number"],
158
-input[type="password"],
159
-input[type="search"],
160
-input[type="tel"],
161
-input[type="text"],
162
-input[type="time"],
163
-input[type="url"],
164
-input[type="week"] {
165
-  -webkit-box-sizing: border-box;
166
-  -moz-box-sizing: border-box;
167
-  box-sizing: border-box;
168
-  -webkit-background-clip: padding;
169
-  -moz-background-clip: padding;
170
-  background-clip: padding-box;
171
-  -webkit-border-radius: 0;
172
-  -moz-border-radius: 0;
173
-  -ms-border-radius: 0;
174
-  -o-border-radius: 0;
175
-  border-radius: 0;
176
-  -webkit-appearance: none;
177
-  background-color: white;
178
-  border: 1px solid;
179
-  border-color: #848484 #c1c1c1 #e1e1e1;
180
-  color: black;
181
-  outline: 0;
182
-  margin: 0;
183
-  padding: 2px 3px;
184
-  text-align: left;
185
-  font-size: 13px;
186
-  font-family: Arial, "Liberation Sans", FreeSans, sans-serif;
187
-  height: 1.8em;
188
-  vertical-align: top;
189
-  *padding-top: 2px;
190
-  *padding-bottom: 1px;
191
-  *height: auto;
192
-}
193
-textarea[disabled],
194
-select[disabled],
195
-input[type="date"][disabled],
196
-input[type="datetime"][disabled],
197
-input[type="datetime-local"][disabled],
198
-input[type="email"][disabled],
199
-input[type="month"][disabled],
200
-input[type="number"][disabled],
201
-input[type="password"][disabled],
202
-input[type="search"][disabled],
203
-input[type="tel"][disabled],
204
-input[type="text"][disabled],
205
-input[type="time"][disabled],
206
-input[type="url"][disabled],
207
-input[type="week"][disabled] {
208
-  background-color: #eeeeee;
209
-}
210
-
211
-button[disabled],
212
-input[disabled],
213
-select[disabled],
214
-select[disabled] option,
215
-select[disabled] optgroup,
216
-textarea[disabled],
217
-a.button_disabled {
218
-  -webkit-box-shadow: none;
219
-  -moz-box-shadow: none;
220
-  box-shadow: none;
221
-  -moz-user-select: -moz-none;
222
-  -webkit-user-select: none;
223
-  -khtml-user-select: none;
224
-  user-select: none;
225
-  color: #888888;
226
-  cursor: default;
227
-}
228
-
229
-input::-webkit-input-placeholder,
230
-textarea::-webkit-input-placeholder {
231
-  color: #888888;
232
-}
233
-
234
-input:-moz-placeholder,
235
-textarea:-moz-placeholder {
236
-  color: #888888;
237
-}
238
-
239
-input.placeholder_text,
240
-textarea.placeholder_text {
241
-  color: #888888;
242
-}
243
-
244
-textarea,
245
-select[size],
246
-select[multiple] {
247
-  height: auto;
248
-}
249
-
250
-select[size="0"],
251
-select[size="1"] {
252
-  height: 1.8em;
253
-  *height: auto;
254
-}
255
-
256
-@media (-webkit-min-device-pixel-ratio: 0) {
257
-  select[size],
258
-  select[multiple],
259
-  select[multiple][size] {
260
-    background-image: none;
261
-    padding-right: 3px;
262
-  }
263
-
264
-  select,
265
-  select[size="0"],
266
-  select[size="1"] {
267
-    background-image: url(data:image/png;base64,R0lGODlhDQAEAIAAAAAAAP8A/yH5BAEHAAEALAAAAAANAAQAAAILhA+hG5jMDpxvhgIAOw==);
268
-    background-repeat: no-repeat;
269
-    background-position: right center;
270
-    padding-right: 20px;
271
-  }
272
-
273
-  ::-webkit-validation-bubble-message {
274
-    -webkit-box-shadow: none;
275
-    box-shadow: none;
276
-    background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #666666), color-stop(1, black));
277
-    border: 0;
278
-    color: white;
279
-    font: 13px/17px "Lucida Grande", Arial, "Liberation Sans", FreeSans, sans-serif;
280
-    overflow: hidden;
281
-    padding: 15px 15px 17px;
282
-    text-shadow: black 0 0 1px;
283
-    min-height: 16px;
284
-  }
285
-
286
-  ::-webkit-validation-bubble-arrow,
287
-  ::-webkit-validation-bubble-top-outer-arrow,
288
-  ::-webkit-validation-bubble-top-inner-arrow {
289
-    -webkit-box-shadow: none;
290
-    box-shadow: none;
291
-    background: #666666;
292
-    border-color: #666666;
293
-  }
294
-}
295
-textarea {
296
-  min-height: 40px;
297
-  overflow: auto;
298
-  resize: vertical;
299
-  width: 100%;
300
-}
301
-
302
-optgroup {
303
-  color: black;
304
-  font-style: normal;
305
-  font-weight: normal;
306
-  font-family: Arial, "Liberation Sans", FreeSans, sans-serif;
307
-}
308
-optgroup::-moz-focus-inner {
309
-  border: 0;
310
-  padding: 0;
311
-}
312
-
313
-.ie6_button,
314
-* html button,
315
-* html a.button {
316
-  background: #dddddd url('../images/button.png?1298351022') repeat-x;
317
-  border: 1px solid;
318
-  border-color: #dddddd #bbbbbb #999999;
319
-  cursor: pointer;
320
-  color: #333333;
321
-  font: bold 12px/1.2 Arial, sans-serif;
322
-  padding: 2px 10px 0;
323
-  text-decoration: none;
324
-  overflow: visible;
325
-  vertical-align: top;
326
-  width: auto;
327
-}
328
-
329
-* html a.button {
330
-  position: relative;
331
-  top: 3px;
332
-  padding-bottom: 2px;
333
-}
334
-
335
-* html button {
336
-  padding-top: 1px;
337
-  padding-bottom: 1px;
338
-}
339
-
340
-.ie6_input,
341
-* html textarea,
342
-* html select {
343
-  background: white;
344
-  border: 1px solid;
345
-  border-color: #848484 #c1c1c1 #e1e1e1;
346
-  color: black;
347
-  padding: 2px 3px 1px;
348
-  font-size: 13px;
349
-  font-family: Arial, sans-serif;
350
-  vertical-align: top;
351
-}
352
-
353
-* html select {
354
-  margin-top: 1px;
355
-}
356
-
357
-.placeholder_text,
358
-.ie6_input_disabled,
359
-.ie6_button_disabled {
360
-  color: #888888;
361
-}
362
-
363
-.ie6_input_disabled {
364
-  background: #eeeeee;
365
-}
366 0
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-@import url(https://fonts.googleapis.com/css?family=Lato:400,100,300,400italic,300italic,700,700italic,900&subset=latin,latin-ext);@import url(https://fonts.googleapis.com/css?family=Caudex);*{box-sizing:border-box;margin:0px;padding:0px;}body{-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;-webkit-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease;font-family:Lato;}main > ul,main > ol,#sidebar > ul,#sidebar > ol,.feed > ul,.feed > ol{list-style:none;margin:0px;}ul{margin:1em;}h1,h2{font-size:153.9%;}:h3{font-size:146.5%;}h4,h5,h6{font-size:138.5%;}ul + h1,ul + h2,ul + h3,ul + h4,ul + h5,ul + h6{width:initial;}header{color:white;}header h1{font-family:Caudex;font-size:inherit;margin-top:0em;padding-left:10vw;font-weight:200;}#sidebar,main{border-top:none;}section#sidebar{width:38vw;height:90vh;position:fixed;overflow:auto;}section#sidebar ul.menu{text-align:right;font-variant:small-caps;}section#sidebar ul.menu li{-moz-transition:all .5s ease;-o-transition:all .5s ease;-webkit-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease;}section#sidebar ul.menu li a{color:inherit;display:block;font-size:125%;font-weight:700;padding:0.5em;text-decoration:none;width:100%;}main{width:62vw;float:right;clear:right;overflow:hidden;position:relative;}main > div{position:absolute;top:2em;bottom:0em;width:100%;overflow-y:scroll;}img.spinner{position:absolute;top:50%;left:50%;-moz-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);}.hide{display:none;}.feed-header{-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;-webkit-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease;padding-bottom:0em;}.feed-header h2,.feed-header h3{padding:0.62em;}.feed-header h2{padding-bottom:0.38em;}.feed-header h3{padding-top:0.38em;}.link.closed .link-content{max-height:0px;padding:0em;}.link.closed{padding-bottom:0em;}.link{text-decoration:none;display:block;overflow:hidden;font-size:0.8em;}.link .link-header{padding:1em;padding-bottom:0em;cursor:pointer;-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;-webkit-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease;}.link .link-header h4{margin-bottom:0.5em;display:inline-block;}.link .link-info{margin-left:-1em;margin-right:-1em;padding-left:1em;padding-right:1em;padding-bottom:0.32em;}.link .link-info .link-url{float:left;}.link .link-info .link-date{float:right;display:block;}.link .link-info:after{content:" ";display:block;clear:both;}.link .link-content{overflow:hidden;-moz-transition:max-height 0.5s ease;-o-transition:max-height 0.5s ease;-webkit-transition:max-height 0.5s ease;-ms-transition:max-height 0.5s ease;transition:max-height 0.5s ease;}.link .link-content img{margin:1em 0% 1em 10%;max-width:80%;max-height:70vh;}.link .link-content > div{padding:1em;font-size:12pt;}.feed.closed{border-bottom-width:thin;}.feed.closed .post-list{max-height:0px;padding:0em;}.feed.closed h3{display:none;}.feed:first-child{border-top:none;}.feed{overflow:hidden;}.feed .post-list{-moz-transition:max-height 0.5s ease;-o-transition:max-height 0.5s ease;-webkit-transition:max-height 0.5s ease;-ms-transition:max-height 0.5s ease;transition:max-height 0.5s ease;}#add-form{-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;-webkit-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease;font-size:1em;height:1.8em;display:block;overflow:hidden;width:100%;position:absolute;z-index:3;}#add-form input,#add-form button{-moz-transition:background-color .5s ease;-o-transition:background-color .5s ease;-webkit-transition:background-color .5s ease;-ms-transition:background-color .5s ease;transition:background-color .5s ease;}#add-form input{border:none;width:95%;height:100%;font-size:0.8em;line-height:1.8em;padding:1em 0.5em;}#add-form button{border:none;border-radius:0px;font-size:inherit;width:5%;height:100%;}.flip-button{position:absolute;right:0em;top:0em;z-index:1000;width:3em;height:3em;padding-left:1em;padding-bottom:1em;border-bottom-left-radius:100%;border:none;-moz-transition:all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);-o-transition:all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transition:all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);-ms-transition:all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);background-image:none;}
2 0
\ No newline at end of file
3 1
deleted file mode 100644
... ...
@@ -1,213 +0,0 @@
1
-/* `XHTML, HTML4, HTML5 Reset
2
-
3
-a,
4
-abbr,
5
-acronym,
6
-address,
7
-applet,
8
-article,
9
-aside,
10
-audio,
11
-b,
12
-big,
13
-blockquote,
14
-body,
15
-canvas,
16
-caption,
17
-center,
18
-cite,
19
-code,
20
-dd,
21
-del,
22
-details,
23
-dfn,
24
-dialog,
25
-div,
26
-dl,
27
-dt,
28
-em,
29
-embed,
30
-fieldset,
31
-figcaption,
32
-figure,
33
-font,
34
-footer,
35
-form,
36
-h1,
37
-h2,
38
-h3,
39
-h4,
40
-h5,
41
-h6,
42
-header,
43
-hgroup,
44
-hr,
45
-html,
46
-i,
47
-iframe,
48
-img,
49
-ins,
50
-kbd,
51
-label,
52
-legend,
53
-li,
54
-main,
55
-mark,
56
-menu,
57
-meter,
58
-nav,
59
-object,
60
-ol,
61
-output,
62
-p,
63
-pre,
64
-progress,
65
-q,
66
-rp,
67
-rt,
68
-ruby,
69
-s,
70
-samp,
71
-section,
72
-small,
73
-span,
74
-strike,
75
-strong,
76
-sub,
77
-summary,
78
-sup,
79
-table,
80
-tbody,
81
-td,
82
-tfoot,
83
-th,
84
-thead,
85
-time,
86
-tr,
87
-tt,
88
-u,
89
-ul,
90
-var,
91
-video,
92
-xmp {
93
-  border: 0;
94
-  margin: 0;
95
-  padding: 0;
96
-  font-size: 100%;
97
-}
98
-
99
-html,
100
-body {
101
-  height: 100%;
102
-}
103
-
104
-article,
105
-aside,
106
-details,
107
-figcaption,
108
-figure,
109
-footer,
110
-header,
111
-hgroup,
112
-main,
113
-menu,
114
-nav,
115
-section {
116
-/*
117
-  Override the default (display: inline) for
118
-  browsers that do not recognize HTML5 tags.
119
-
120
-  IE8 (and lower) requires a shiv:
121
-  http://ejohn.org/blog/html5-shiv
122
-*/
123
-  display: block;
124
-}
125
-
126
-b,
127
-strong {
128
-/*
129
-  Makes browsers agree.
130
-  IE + Opera = font-weight: bold.
131
-  Gecko + WebKit = font-weight: bolder.
132
-*/
133
-  font-weight: bold;
134
-}
135
-
136
-img {
137
-  color: transparent;
138
-  font-size: 0;
139
-  vertical-align: middle;
140
-/*
141
-  For IE.
142
-  http://css-tricks.com/ie-fix-bicubic-scaling-for-images
143
-*/
144
-  -ms-interpolation-mode: bicubic;
145
-}
146
-
147
-ul,
148
-ol {
149
-  list-style: none;
150
-}
151
-
152
-li {
153
-/*
154
-  For IE6 + IE7:
155
-
156
-  "display: list-item" keeps bullets from
157
-  disappearing if hasLayout is triggered.
158
-*/
159
-  display: list-item;
160
-}
161
-
162
-table {
163
-  border-collapse: collapse;
164
-  border-spacing: 0;
165
-}
166
-
167
-th,
168
-td,
169
-caption {
170
-  font-weight: normal;
171
-  vertical-align: top;
172
-  text-align: left;
173
-}
174
-
175
-q {
176
-  quotes: none;
177
-}
178
-
179
-q:before,
180
-q:after {
181
-  content: '';
182
-  content: none;
183
-}
184
-
185
-sub,
186
-sup,
187
-small {
188
-  font-size: 75%;
189
-}
190
-
191
-sub,
192
-sup {
193
-  line-height: 0;
194
-  position: relative;
195
-  vertical-align: baseline;
196
-}
197
-
198
-sub {
199
-  bottom: -0.25em;
200
-}
201
-
202
-sup {
203
-  top: -0.5em;
204
-}
205
-
206
-svg {
207
-/*
208
-  For IE9. Without, occasionally draws shapes
209
-  outside the boundaries of <svg> rectangle.
210
-*/
211
-  overflow: hidden;
212
-}
213 0
\ No newline at end of file
214 1
deleted file mode 100644
... ...
@@ -1,81 +0,0 @@
1
-/*
2
-  960 Grid System ~ Text CSS.
3
-  Learn more ~ http://960.gs/
4
-
5
-  Licensed under GPL and MIT.
6
-*/
7
-
8
-/* `Basic HTML
9
-
10
-body {
11
-  font: 13px/1.5 'Helvetica Neue', Arial, 'Liberation Sans', FreeSans, sans-serif;
12
-}
13
-
14
-hr {
15
-  border: 0 #ccc solid;
16
-  border-top-width: 1px;
17
-  clear: both;
18
-  height: 0;
19
-}
20
-
21
-/* `Headings
22
-
23
-h1 {
24
-  font-size: 25px;
25
-}
26
-
27
-h2 {
28
-  font-size: 23px;
29
-}
30
-
31
-h3 {
32
-  font-size: 21px;
33
-}
34
-
35
-h4 {
36
-  font-size: 19px;
37
-}
38
-
39
-h5 {
40
-  font-size: 17px;
41
-}
42
-
43
-h6 {
44
-  font-size: 15px;
45
-}
46
-
47
-/* `Spacing
48
-
49
-ol {
50
-  list-style: decimal;
51
-}
52
-
53
-ul {
54
-  list-style: disc;
55
-}
56
-
57
-li {
58
-  margin-left: 30px;
59
-}
60
-
61
-p,
62
-dl,
63
-hr,
64
-h1,
65
-h2,
66
-h3,
67
-h4,
68
-h5,
69
-h6,
70
-ol,
71
-ul,
72
-pre,
73
-table,
74
-address,
75
-fieldset,
76
-figure {
77
-  margin-bottom: 20px;
78
-}
79 0
\ No newline at end of file
80 1
deleted file mode 100644
81 2
Binary files a/static/images/Whitespace_favicon.png and /dev/null differ
82 3
deleted file mode 100644
83 4
Binary files a/static/images/button.png and /dev/null differ
84 5
deleted file mode 100644
85 6
Binary files a/static/images/select_arrow.gif and /dev/null differ
86 7
deleted file mode 100644
87 8
Binary files a/static/images/spinner.gif and /dev/null differ
88 9
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-'';
2
-jQuery(document).ready(function () {
3
-    jQuery('.link-header, .feed-header').click(function () {
4
-        jQuery('.menu').addClass('open');
5
-        return true;
6
-    });
7
-    jQuery('.link-header').click(function () {
8
-        jQuery(this).siblings('.link-content').each(function () {
9
-            if (jQuery(this).css('max-height') === '0px') {
10
-                var addedHeight = jQuery(this).children().outerHeight();
11
-                var parentHeight = jQuery(this).parents('.post-list').css('max-height');
12
-                jQuery(this).css('max-height', addedHeight);
13
-                return jQuery(this).parents('.post-list').css('max-height', addedHeight + parentHeight);
14
-            } else {
15
-                return jQuery(this).css('max-height', '0px');
16
-            };
17
-        });
18
-        return jQuery(this).parent().toggleClass('closed');
19
-    });
20
-    jQuery('.feed-header').click(function () {
21
-        jQuery(this).siblings('.post-list').each(function () {
22
-            return jQuery(this).css('max-height') === '0px' ? jQuery(this).css('max-height', this.scrollHeight) : jQuery(this).css('max-height', '0px');
23
-        });
24
-        return jQuery(this).parent().toggleClass('closed');
25
-    });
26
-    jQuery('.flip-button').click(function () {
27
-        var styleSheet = jQuery('link[href^="/theme"]');
28
-        var styleSheetName = styleSheet.attr('href');
29
-        return styleSheet.attr('href', styleSheetName.match(/dark/) ? styleSheetName.replace(/dark/, 'light') : styleSheetName.replace(/light/, 'dark'));
30
-    });
31
-    return null;
32
-});
33
-
34 0
deleted file mode 100644
... ...
@@ -1 +0,0 @@
1
-var FORMALIZE=function(e,t,n,r){function i(e){var t=n.createElement("b");return t.innerHTML="<!--[if IE "+e+"]><br><![endif]-->",!!t.getElementsByTagName("br").length}var s="placeholder"in n.createElement("input"),o="autofocus"in n.createElement("input"),u=i(6),a=i(7);return{go:function(){var e,t=this.init;for(e in t)t.hasOwnProperty(e)&&t[e]()},init:{disable_link_button:function(){e(n.documentElement).on("click","a.button_disabled",function(){return!1})},full_input_size:function(){if(!a||!e("textarea, input.input_full").length)return;e("textarea, input.input_full").wrap('<span class="input_full_wrap"></span>')},ie6_skin_inputs:function(){if(!u||!e("input, select, textarea").length)return;var t=/button|submit|reset/,n=/date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;e("input").each(function(){var r=e(this);this.getAttribute("type").match(t)?(r.addClass("ie6_button"),this.disabled&&r.addClass("ie6_button_disabled")):this.getAttribute("type").match(n)&&(r.addClass("ie6_input"),this.disabled&&r.addClass("ie6_input_disabled"))}),e("textarea, select").each(function(){this.disabled&&e(this).addClass("ie6_input_disabled")})},autofocus:function(){if(o||!e(":input[autofocus]").length)return;var t=e("[autofocus]")[0];t.disabled||t.focus()},placeholder:function(){if(s||!e(":input[placeholder]").length)return;FORMALIZE.misc.add_placeholder(),e(":input[placeholder]").each(function(){if(this.type==="password")return;var t=e(this),n=t.attr("placeholder");t.focus(function(){t.val()===n&&t.val("").removeClass("placeholder_text")}).blur(function(){FORMALIZE.misc.add_placeholder()}),t.closest("form").submit(function(){t.val()===n&&t.val("").removeClass("placeholder_text")}).on("reset",function(){setTimeout(FORMALIZE.misc.add_placeholder,50)})})}},misc:{add_placeholder:function(){if(s||!e(":input[placeholder]").length)return;e(":input[placeholder]").each(function(){if(this.type==="password")return;var t=e(this),n=t.attr("placeholder");(!t.val()||t.val()===n)&&t.val(n).addClass("placeholder_text")})}}}}(jQuery,this,this.document);jQuery(document).ready(function(){FORMALIZE.go()});
2 0
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-var whitespace = angular.module('whitespace', ['ngResource', 'ngSanitize']);
2
-whitespace.controller('MainCtrl', ['$scope', '$http', '$resource', '$sce', function ($scope, $http, $resource, $sce) {
3
-    var feeds = $resource('/feeds', {  }, { json : { method : 'GET', url : '/feeds/json' }, add : { method : 'POST', url : '/feeds/add' } });
4
-    $scope.feeds = feeds.json();
5
-    $scope.data = 'hello world!';
6
-    $scope.addForm = { url : '' };
7
-    $scope.renderHtml = function (htmlCode) {
8
-        return $sce.trustAsHtml(htmlCode);
9
-    };
10
-    $scope.toggleClosed = function (ent) {
11
-        return ent.closed = !ent.closed;
12
-    };
13
-    return $scope.addFeed = function () {
14
-        return feeds.add({ 'url' : $scope.addForm.url, 'api' : 'yes' }).$promise.then(function (feed) {
15
-            return $scope.feeds.result.unshift(feed.result);
16
-        });
17
-    };
18
-}]);
19
-
20 0
deleted file mode 100644
... ...
@@ -1,139 +0,0 @@
1
-(in-package :cl-user)
2
-(defpackage :whitespace.tables
3
-  (:use #:cl #:alexandria #:postmodern #:annot.class #:iterate #:whitespace.utils))
4
-(in-package :whitespace.tables)
5
-(cl-annot.syntax:enable-annot-syntax)
6
-
7
-@export-class
8
-(defclass rss_feed_store ()
9
-  ((id          :col-type serial :initarg :id          :accessor rfs-id)
10
-   (title       :col-type text   :initarg :title       :accessor rfs-title       :col-default "")
11
-   (link        :col-type text   :initarg :link        :accessor rfs-link        :col-default "")
12
-   (description :col-type text   :initarg :description :accessor rfs-description :col-default "")
13
-   (fetch-url   :col-type text   :initarg :fetch-url :accessor rfs-fetch-url   :col-default ""))
14
-  (:metaclass dao-class)
15
-  (:keys id))
16
-
17
-(deftable rss_feed_store
18
-  (!dao-def)
19
-  (!unique "link"))
20
-
21
-
22
-@export-class
23
-(defclass rss_item_store ()
24
-  ((id          :col-type serial  :initarg :id          :accessor ris-id)
25
-   (title       :col-type text    :initarg :title       :accessor ris-title       :col-default "")
26
-   (link        :col-type text    :initarg :link        :accessor ris-link        :col-default "")
27
-   (description :col-type text    :initarg :description :accessor ris-description :col-default "")
28
-   (comments    :col-type text    :initarg :comments    :accessor ris-comments    :col-default "")
29
-   (enclosure   :col-type text    :initarg :enclosure   :accessor ris-enclosure   :col-default "")
30
-   (guid        :col-type text    :initarg :guid        :accessor ris-guid        :col-default "")
31
-   (pub-date    :col-type text    :initarg :pub-date    :accessor ris-pub-date    :col-default "")
32
-   (source      :col-type text    :initarg :source      :accessor ris-source      :col-default "")
33
-   (feed        :col-type integer :initarg :feed        :accessor ris-feed))
34
-  (:metaclass dao-class)
35
-  (:keys id))
36
-
37
-(deftable rss_item_store
38
-  (!dao-def)
39
-  (!foreign "rss_feed_store" "feed" "id" :on-delete :cascade :on-update :cascade)
40
-  (!unique "guid"))
41
-
42
-
43
-@export-class
44
-(defclass reader_user ()
45
-  ((id :col-type serial)
46
-   (join-date :col-type timestamp :accessor join-date :col-default (:now))
47
-   (foreign-id :col-type string :initarg :foreign-id :accessor user-foreign-id :unique t)
48
-   (name :col-type string :initarg :name :accessor user-name)
49
-   (email :col-type string :initarg :email :accessor user-email)
50
-   (first-name :col-type (or string s-sql:db-null) :initarg :first-name :accessor user-first-name)
51
-   (gender :col-type (or string s-sql:db-null) :initarg :gender :accessor user-gender)
52
-   (last-name :col-type (or string s-sql:db-null) :initarg :last-name :accessor user-last-name)
53
-   (link :col-type (or string s-sql:db-null) :initarg :link :accessor user-link)
54
-   (locale :col-type (or string s-sql:db-null) :initarg :locale :accessor user-locale))
55
-  (:metaclass dao-class)
56
-  (:keys id))
57
-
58
-(deftable reader_user
59
-  (!dao-def))
60
-
61
-@export-class
62
-(defclass subscriptions ()
63
-  ((id :col-type serial)
64
-   (uid :col-type integer :initarg :uid :accessor subscription-uid)
65
-   (feedid :col-type integer :initarg :feedid :accessor subscription-feedid))
66
-  (:unique (uid feedid))
67
-  (!foreign "rss_feed_store" "feedid" "id" :on-delete :cascade :on-update :cascade)
68
-  (:metaclass dao-class)
69
-  (:keys id))
70
-
71
-(deftable subscriptions
72
-  (!dao-def)
73
-  (!foreign "rss_feed_store" "feedid" "id" :on-delete :cascade :on-update :cascade)
74
-  (!foreign "reader_user" "uid" "id" :on-delete :cascade :on-update :cascade)
75
-  (!unique '(uid feedid)))
76
-
77
-
78
-@export
79
-(defgeneric get-dao-for (obj &optional link)
80
-  (:documentation "Take an object an return the equivalent dao object. Use link to specify a single
81
-                   foreign key relationship---this probably should be generalized further"))
82
-
83
-@export
84
-(defgeneric serialize (cls &optional output-transform pair-transform))
85
-
86
-@export
87
-(defmacro defserializer ((specializes) &body slots)
88
-  (with-gensyms (obj o-t p-t)
89
-    `(defmethod serialize ((,obj ,specializes) &optional (,o-t #'identity) (,p-t #'%default-pair-transform))
90
-      (transform-result (,o-t ,p-t)
91
-        (slots-to-pairs ,obj ,slots)))))
92
-
93
-(defmethod serialize ((obj sequence) &optional (o-t #'identity) (p-t #'%default-pair-transform))
94
-  (iterate (for item in-sequence obj)
95
-           (collect (serialize item o-t p-t))))
96
-
97
-; this is the interface to be used
98
-(defserializer (rss_feed_store)
99
-  title link description fetch-url)
100
-
101
-(defserializer (rss_item_store)
102
-  title link description fetch-url)
103
-
104
-@export
105
-(defun store-item-dao (serialized-rss-item link)
106
-  (pomo:ensure-transaction
107
-    (apply #'postmodern:make-dao
108
-           (list* 'rss_item_store :feed link
109
-                  (iterate (for (k . v) in-sequence serialized-rss-item)
110
-                           (appending (list k v)))))))
111
-
112
-@export
113
-(defun store-feed-dao (serialized-rss-feed &optional link)
114
-  (declare (ignore link))
115
-  (pomo:ensure-transaction
116
-    (let* ((items nil)
117
-           (rss_feed (apply #'postmodern:make-dao
118
-                            (cons 'rss_feed_store
119
-                                  (iterate (for (k . v) in-sequence serialized-rss-feed)
120
-                                           (if (eql k :items)
121
-                                             (setf items v)
122
-                                             (appending (list k v))))))))
123
-      (iterate (for item in items)
124
-               (handler-case (pomo:with-savepoint store-item
125
-                               (store-item-dao (serialize item) (slot-value rss_feed 'id)))
126
-                 (cl-postgres-error:unique-violation ())))
127
-      rss_feed)))
128
-
129
-
130
-#|
131
-
132
-(with-connection whitespace::*db-connection-info* 
133
-  (with-transaction ()
134
-    (create-table 'rss_feed_store)
135
-    (create-table 'rss_item_store)
136
-    (create-table 'reader_user)
137
-    (create-table 'subscriptions)))
138
-
139
-|#
141 1
deleted file mode 100644
... ...
@@ -1,41 +0,0 @@
1
-(ql:quickload :parenscript)
2
-
3
-(defpackage :ps_translator
4
-  (:use :parenscript :cl)
5
-  (:export main))
6
-
7
-(in-package :ps_translator)
8
-(use-package :parenscript)
9
-
10
-(defpsmacro macros (&body body)
11
-  `(lisp (progn
12
-           ,@(loop for form in body
13
-                   collect `(defpsmacro ,@form))
14
-           "")))
15
-
16
-(defmacro+ps $ ( (selector) &rest values) `(chain (j-query ,selector) ,@values))
17
-
18
-(defmacro+ps $this (&rest values) `($ (this) ,@values))
19
-
20
-(defmacro+ps $each ((selector &rest actions) &body code)
21
-  `($ (,selector) ,@actions
22
-      (each (lambda ()
23
-              ,@code))))
24
-
25
-(defmacro+ps def-event (target event args &body run)
26
- `($ (,target)
27
-          (,event
28
-            (lambda ,args
29
-              ,@run))))
30
-
31
-(defun translate-file (infile outfile)
32
-  (let ((*JS-TARGET-VERSION* 1.9))
33
-    (with-open-file (o outfile :direction :output :if-exists :supersede)
34
-      (with-open-file (i infile :direction :input)
35
-        (write-line (ps-compile-file i) o)))))
36
-
37
-(defun main (args)
38
-  (in-package :ps_translator)
39
-  (apply #'translate-file (cdr args)))
40
-
41
-