mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Experimental tidying up after vega introduction
None of this is very significant, but it is small improvements.
This commit is contained in:
parent
c289f10524
commit
fd5cd11024
5 changed files with 15 additions and 7 deletions
|
|
@ -33,7 +33,10 @@
|
||||||
[lein-bower "0.5.1"]
|
[lein-bower "0.5.1"]
|
||||||
[lein-ancient "0.5.5" :exclusions [org.clojure/clojure org.clojure/data.xml]]
|
[lein-ancient "0.5.5" :exclusions [org.clojure/clojure org.clojure/data.xml]]
|
||||||
[lein-marginalia "0.7.1" :exclusions [org.clojure/clojure]]]
|
[lein-marginalia "0.7.1" :exclusions [org.clojure/clojure]]]
|
||||||
:bower-dependencies [[simplemde "1.11.2"]]
|
:bower-dependencies [[simplemde "1.11.2"]
|
||||||
|
;; [vega-embed "3.0.0-beta.19"] vega-embed currently not loaded from Bower because of
|
||||||
|
;; dependency conflict which will hopefully be resolved soon.
|
||||||
|
[vega-lite "2.0.0-beta.10"]]
|
||||||
:ring {:handler smeagol.handler/app
|
:ring {:handler smeagol.handler/app
|
||||||
:init smeagol.handler/init
|
:init smeagol.handler/init
|
||||||
:destroy smeagol.handler/destroy}
|
:destroy smeagol.handler/destroy}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="{{servlet-context}}/content/stylesheet.css" media="screen" rel="stylesheet" type="text/css" />
|
{% style "/content/stylesheet.css" %}
|
||||||
<link href="{{servlet-context}}/css/print.css" media="print" rel="stylesheet" type="text/css" />
|
|
||||||
{% block extra-headers %}
|
{% block extra-headers %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{% extends "templates/base.html" %}
|
{% extends "templates/base.html" %}
|
||||||
{% block extra-headers %}
|
{% block extra-headers %}
|
||||||
<link rel="stylesheet" href="{{servlet-context}}/vendor/simplemde/dist/simplemde.min.css">
|
{% style "/vendor/simplemde/dist/simplemde.min.css" %}
|
||||||
<script src="{{servlet-context}}/vendor/simplemde/dist/simplemde.min.js"></script>
|
{% script "/vendor/simplemde/dist/simplemde.min.js" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
{% block extra-headers %}
|
{% block extra-headers %}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega/3.0.0-rc2/vega.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega/3.0.0-rc2/vega.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/2.0.0-beta.10/vega-lite.js"></script>
|
<!-- there's at the time of writing (20170731) a problem with the dependencies of the Bower
|
||||||
|
package for vega-embed, so we're currently not installing either it or Vega locally. TODO: fix -->
|
||||||
|
{% script "/vendor/vega-lite/build/vega-lite.js" %}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/3.0.0-beta.19/vega-embed.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/3.0.0-beta.19/vega-embed.js"></script>
|
||||||
|
|
||||||
<style media="screen">
|
<style media="screen">
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,11 @@
|
||||||
([index result fragments processed]
|
([index result fragments processed]
|
||||||
(cond
|
(cond
|
||||||
(empty? fragments)
|
(empty? fragments)
|
||||||
(assoc result :text (local-links (md/md-to-html-string (cs/join "\n\n" (reverse processed)))))
|
(assoc result :text
|
||||||
|
(local-links
|
||||||
|
(md/md-to-html-string
|
||||||
|
(cs/join "\n\n" (reverse processed))
|
||||||
|
:heading-anchors true)))
|
||||||
(clojure.string/starts-with? (first fragments) "vis")
|
(clojure.string/starts-with? (first fragments) "vis")
|
||||||
(let [kw (keyword (str "visualisation-" index))]
|
(let [kw (keyword (str "visualisation-" index))]
|
||||||
(process-text
|
(process-text
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue