├── resources
├── public
│ ├── favicon.ico
│ ├── style.css
│ └── index.html
├── log4j.properties
├── server-config.edn
└── templates
│ ├── argument.html
│ ├── topiqs.html
│ └── tool.html
├── doc
└── intro.md
├── .gitignore
├── test
└── topiq
│ └── core_test.clj
├── src
└── topiq
│ ├── plugins.cljs
│ ├── db.cljs
│ ├── view.cljs
│ ├── core.clj
│ └── core.cljs
├── project.clj
└── README.md
/resources/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/replikativ/topiq/HEAD/resources/public/favicon.ico
--------------------------------------------------------------------------------
/doc/intro.md:
--------------------------------------------------------------------------------
1 | # Introduction to collective
2 |
3 | TODO: write [great documentation](http://jacobian.org/writing/great-documentation/what-to-write/)
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /classes
3 | /checkouts
4 | pom.xml
5 | pom.xml.asc
6 | *.jar
7 | *.class
8 | /.lein-*
9 | /.nrepl-port
10 | /resources/public/static
11 | /resources/public/js
12 | /out
13 | /.repl
14 |
--------------------------------------------------------------------------------
/test/topiq/core_test.clj:
--------------------------------------------------------------------------------
1 | (ns topiq.core-test
2 | (:require [clojure.test :refer :all]
3 | [topiq.core :refer :all]))
4 |
5 | #_(deftest a-test
6 | (testing "FIXME, I fail."
7 | (is (= 0 1))))
8 |
--------------------------------------------------------------------------------
/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=WARN, A1
2 | log4j.logger.topiq.core=DEBUG
3 | log4j.logger.clojure.core=DEBUG
4 | log4j.logger.user=DEBUG
5 | log4j.appender.A1=org.apache.log4j.ConsoleAppender
6 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout
7 | log4j.appender.A1.layout.ConversionPattern=%d %-5p %c: %m%n
8 |
--------------------------------------------------------------------------------
/resources/public/style.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-family: 'Ubuntu', sans-serif;
3 | }
4 |
5 | .selected-entry {
6 | border-left: 4px solid steelblue;
7 | }
8 |
9 | #post-btn,#argument-btn {
10 | height: 100%;
11 | line-height: 100%;
12 | padding-top: 0;
13 | padding-bottom: 0;
14 | padding-right: 20;
15 | padding-left: 20;
16 | }
17 |
18 | #general-input-btn{
19 | height: 100%;
20 | line-height: 100%;
21 | }
22 |
23 | .glyphicon-chevron-up, .glyphicon-chevron-down {
24 | cursor: pointer;
25 | }
26 |
--------------------------------------------------------------------------------
/resources/server-config.edn:
--------------------------------------------------------------------------------
1 | {:build :dev
2 | :behind-proxy false
3 | :proto "http"
4 | :port 8080
5 | :host "localhost" ;; adjust hostname
6 | :user "mail:eve@topiq.es"
7 | ;; only do this for CDVCS' you control and do it on one peer
8 | ;; to avoid conflict management!
9 | :hooks {[#".*"
10 | #uuid "26558dfe-59bb-4de4-95c3-4028c56eb5b5"]
11 | [["mail:eve@topiq.es"
12 | #uuid "26558dfe-59bb-4de4-95c3-4028c56eb5b5"]]}
13 | :connect [#_"wss://topiq.es/replikativ/ws" #_"ws://topiq.polyc0l0r.net:8080/replikativ/ws"]
14 | :mail-config {:host "smtp.topiq.es"}
15 | :trusted-hosts #{"topiq.es" "78.47.61.129" "topiq.polyc0l0r.net" "91.250.113.223" "127.0.0.1"}
16 | }
17 |
--------------------------------------------------------------------------------
/src/topiq/plugins.cljs:
--------------------------------------------------------------------------------
1 | (ns topiq.plugins
2 | (:require [topiq.db :refer [hashtag-regexp]]
3 | [markdown.core :as md]
4 | [clojure.string :as str]))
5 |
6 |
7 | ;; static pipline for now, will be factored out for js and runtime config later
8 |
9 |
10 | (def pre-markdown-plugins identity)
11 |
12 |
13 | (defn special-chars [s]
14 | (clojure.string/replace s #"\'" "’"))
15 |
16 | (defn replace-hashtags
17 | "Replace hashtags in string with html references"
18 | [s]
19 | (str/replace s hashtag-regexp "$1$2"))
20 |
21 | (defn img-responsive [s]
22 | (str/replace s " s
31 | replace-hashtags
32 | img-responsive
33 | new-tab-link))
34 |
35 | (defn render-content [s]
36 | (-> s
37 | pre-markdown-plugins
38 | md/md->html
39 | post-markdown-plugins))
40 |
--------------------------------------------------------------------------------
/resources/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
34 |
35 |
36 |
37 | ARGUMENT
52 | 53 | 54 |