176 |
177 |
178 |
179 |
180 |
181 |
--------------------------------------------------------------------------------
/js/Comments.coffee:
--------------------------------------------------------------------------------
1 | class Comments extends Class
2 | pagePost: (post_id, cb=false) ->
3 | @post_id = post_id
4 | @rules = {}
5 | $(".button-submit-comment").off("click").on "click", =>
6 | @submitComment()
7 | return false
8 | @loadComments("noanim", cb)
9 | @autoExpand $(".comment-textarea")
10 |
11 | $(".certselect").off("click").on "click", =>
12 | if Page.server_info.rev < 160
13 | Page.cmd "wrapperNotification", ["error", "Comments requires at least ZeroNet 0.3.0 Please upgade!"]
14 | else
15 | Page.cmd "certSelect", [["zeroid.bit"]]
16 | return false
17 |
18 |
19 | loadComments: (type="show", cb=false) ->
20 | query = "SELECT comment.*, json_content.json_id AS content_json_id, keyvalue.value AS cert_user_id, json.directory,
21 | (SELECT COUNT(*) FROM comment_vote WHERE comment_vote.comment_uri = comment.comment_id || '@' || json.directory)+1 AS votes
22 | FROM comment
23 | LEFT JOIN json USING (json_id)
24 | LEFT JOIN json AS json_content ON (json_content.directory = json.directory AND json_content.file_name='content.json')
25 | LEFT JOIN keyvalue ON (keyvalue.json_id = json_content.json_id AND key = 'cert_user_id')
26 | WHERE post_id = #{@post_id} ORDER BY date_added DESC"
27 |
28 | Page.cmd "dbQuery", query, (comments) =>
29 | $("#Comments_header").text(comments.length + if comments.length > 1 then " Comments:" else " Comment:")
30 | for comment in comments
31 | user_address = comment.directory.replace("users/", "")
32 | comment_address = "#{comment.comment_id}_#{user_address}"
33 | elem = $("#comment_"+comment_address)
34 | if elem.length == 0 # Create if not exits
35 | elem = $(".comment.template").clone().removeClass("template").attr("id", "comment_"+comment_address).data("post_id", @post_id)
36 | if type != "noanim"
37 | elem.cssSlideDown()
38 | $(".reply", elem).off("click").on "click", (e) => # Reply link
39 | return @buttonReply $(e.target).parents(".comment")
40 | @applyCommentData(elem, comment)
41 | elem.appendTo(".comments")
42 | setTimeout (->
43 | Page.addInlineEditors(".comments")
44 | ), 1000
45 |
46 |
47 | applyCommentData: (elem, comment) ->
48 | [user_name, cert_domain] = comment.cert_user_id.split("@")
49 | user_address = comment.directory.replace("users/", "")
50 | $(".comment-body", elem).html Text.renderMarked(comment.body, {"sanitize": true})
51 | $(".user_name", elem).text(user_name).css("color": Text.toColor(comment.cert_user_id)).attr("title", "#{user_name}@#{cert_domain}: #{user_address}")
52 | $(".added", elem).text(Time.since(comment.date_added)).attr("title", Time.date(comment.date_added, "long"))
53 | #$(".cert_domain", elem).html("@#{cert_domain}").css("display", "none")
54 | # Add inline editor
55 | if user_address == Page.site_info.auth_address
56 | $(elem).attr("data-object", "Comment:#{comment.comment_id}").attr("data-deletable", "yes")
57 | $(".comment-body", elem).attr("data-editable", "body").data("content", comment.body)
58 |
59 |
60 | buttonReply: (elem) ->
61 | @log "Reply to", elem
62 | user_name = $(".user_name", elem).text()
63 | post_id = elem.attr("id")
64 | body_add = "> [#{user_name}](\##{post_id}): "
65 | elem_quote = $(".comment-body", elem).clone()
66 | $("blockquote", elem_quote).remove() # Remove other people's quotes
67 | body_add+= elem_quote.text().trim("\n").replace(/\n/g, "\n> ")
68 | body_add+= "\n\n"
69 | $(".comment-new .comment-textarea").val( $(".comment-new .comment-textarea").val()+body_add )
70 | $(".comment-new .comment-textarea").trigger("input").focus() # Autosize
71 | return false
72 |
73 |
74 | submitComment: ->
75 | if not Page.site_info.cert_user_id # Not registered
76 | Page.cmd "wrapperNotification", ["info", "Please, select your account."]
77 | return false
78 |
79 | body = $(".comment-new .comment-textarea").val()
80 | if not body
81 | $(".comment-new .comment-textarea").focus()
82 | return false
83 |
84 | $(".comment-new .button-submit").addClass("loading")
85 | inner_path = "data/users/#{Page.site_info.auth_address}/data.json"
86 | Page.cmd "fileGet", {"inner_path": inner_path, "required": false}, (data) =>
87 | if data
88 | data = JSON.parse(data)
89 | else # Default data
90 | data = {"next_comment_id": 1, "comment": [], "comment_vote": {}, "topic_vote": {} }
91 |
92 | data.comment.push {
93 | "comment_id": data.next_comment_id,
94 | "body": body,
95 | "post_id": @post_id,
96 | "date_added": Time.timestamp()
97 | }
98 | data.next_comment_id += 1
99 | json_raw = unescape(encodeURIComponent(JSON.stringify(data, undefined, '\t')))
100 | Page.writePublish inner_path, btoa(json_raw), (res) =>
101 | $(".comment-new .button-submit").removeClass("loading")
102 | @loadComments()
103 | setTimeout (->
104 | Page.loadLastcomments()
105 | ), 1000
106 | @checkCert("updaterules")
107 | @log "Writepublish result", res
108 | if res != false
109 | $(".comment-new .comment-textarea").val("")
110 |
111 |
112 | checkCert: (type) ->
113 | last_cert_user_id = $(".comment-new .user_name").text()
114 | if Page.site_info.cert_user_id
115 | $(".comment-new").removeClass("comment-nocert")
116 | $(".comment-new .user_name").text(Page.site_info.cert_user_id)
117 | else
118 | $(".comment-new").addClass("comment-nocert")
119 | $(".comment-new .user_name").text("Please sign in")
120 |
121 | if $(".comment-new .user_name").text() != last_cert_user_id or type == "updaterules" # User changed
122 | # Update used/allowed space
123 | if Page.site_info.cert_user_id
124 | Page.cmd "fileRules", "data/users/#{Page.site_info.auth_address}/content.json", (rules) =>
125 | @rules = rules
126 | if rules.max_size
127 | @setCurrentSize(rules.current_size)
128 | else
129 | @setCurrentSize(0)
130 | else
131 | @setCurrentSize(0)
132 |
133 |
134 | setCurrentSize: (current_size) ->
135 | if current_size
136 | current_size_kb = current_size/1000
137 | $(".user-size").text("used: #{current_size_kb.toFixed(1)}k/#{Math.round(@rules.max_size/1000)}k")
138 | $(".user-size-used").css("width", Math.round(70*current_size/@rules.max_size))
139 | else
140 | $(".user-size").text("")
141 |
142 |
143 | autoExpand: (elem) ->
144 | editor = elem[0]
145 | # Autoexpand
146 | if elem.height() > 0 then elem.height(1)
147 |
148 | elem.off("input").on "input", =>
149 | if editor.scrollHeight > elem.height()
150 | old_height = elem.height()
151 | elem.height(1)
152 | new_height = editor.scrollHeight
153 | new_height += parseFloat elem.css("borderTopWidth")
154 | new_height += parseFloat elem.css("borderBottomWidth")
155 | new_height -= parseFloat elem.css("paddingTop")
156 | new_height -= parseFloat elem.css("paddingBottom")
157 |
158 | min_height = parseFloat(elem.css("lineHeight"))*2 # 2 line minimum
159 | if new_height < min_height then new_height = min_height+4
160 |
161 | elem.height(new_height-4)
162 | # Update used space
163 | if @rules.max_size
164 | if elem.val().length > 0
165 | current_size = @rules.current_size + elem.val().length + 90
166 | else
167 | current_size = @rules.current_size
168 | @setCurrentSize(current_size)
169 | if elem.height() > 0 then elem.trigger "input"
170 | else elem.height("48px")
171 |
172 |
173 | window.Comments = new Comments()
174 |
--------------------------------------------------------------------------------
/js/utils/CustomAlloyEditor.coffee:
--------------------------------------------------------------------------------
1 | class CustomAlloyEditor extends Class
2 | constructor: (@tag) ->
3 | editor = AlloyEditor.editable(@tag)
4 |
5 | # Add top padding to avoid toolbar movement
6 | el = editor._editor.element.$
7 | height_before = el.getClientRects()[0].height
8 | style = getComputedStyle(el)
9 | el.style.position = "relative"
10 | el.style.paddingTop = (parseInt(style["padding-top"]) + 20) + "px"
11 | height_added = el.getClientRects()[0].height - height_before
12 | el.style.top = (parseInt(style["marginTop"]) - 20 - height_added) + "px"
13 | el.style.marginBottom = (parseInt(style["marginBottom"]) + parseInt(el.style.top)) + "px"
14 |
15 | # Add listeners
16 | editor.get('nativeEditor').on "selectionChange", @handleSelectionChange
17 | editor.get('nativeEditor').on "focus", (e) =>
18 | setTimeout ( =>
19 | @handleSelectionChange(e)
20 | ), 100
21 | editor.get('nativeEditor').on "click", @handleSelectionChange
22 | editor.get('nativeEditor').on "change", @handleChange
23 | editor.get('nativeEditor').on 'imageAdd', (e) =>
24 | if e.data.el.$.width > 0
25 | @handleImageAdd(e)
26 | else
27 | setTimeout ( =>
28 | @handleImageAdd(e)
29 | ), 100
30 | editor.get('nativeEditor').on "actionPerformed", @handleAction
31 | editor.get('nativeEditor').on 'afterCommandExec', @handleCommand
32 |
33 | window.editor = editor
34 |
35 | @el_last_created = null
36 |
37 | @image_size_limit = 200*1024
38 | @image_resize_width = 1200
39 | @image_resize_height = 900
40 | @image_preverse_ratio = true
41 | @image_try_png = false
42 |
43 | return @
44 |
45 |
46 | calcSize: (source_width, source_height, target_width, target_height) ->
47 | if source_width <= target_width and source_height <= target_height
48 | return [source_width, source_height]
49 |
50 | width = target_width
51 | height = width * (source_height / source_width);
52 | if height > target_height
53 | height = target_height
54 | width = height * (source_width / source_height)
55 | return [Math.round(width), Math.round(height)]
56 |
57 |
58 | scaleHalf: (image) ->
59 | canvas = document.createElement("canvas")
60 | canvas.width = image.width / 1.5
61 | canvas.height = image.height / 1.5
62 | ctx = canvas.getContext("2d")
63 | ctx.drawImage(image, 0, 0, canvas.width, canvas.height)
64 | return canvas
65 |
66 |
67 | resizeImage: (image, width, height) =>
68 | canvas = document.createElement("canvas")
69 | if @image_preverse_ratio
70 | [canvas.width, canvas.height] = @calcSize(image.width, image.height, width, height)
71 | else
72 | canvas.width = width
73 | canvas.height = height
74 |
75 | ctx = canvas.getContext("2d")
76 | ctx.fillStyle = "#FFF"
77 | ctx.fillRect(0, 0, canvas.width, canvas.height)
78 | image_resized = image
79 | while image_resized.width > width * 1.5
80 | image_resized = @scaleHalf(image_resized)
81 | ctx.drawImage(image_resized, 0, 0, canvas.width, canvas.height)
82 |
83 | if @image_try_png and @getExtension(image.src) == "png" # and canvas.width < 1400 and canvas.height < 1000
84 | ###
85 | quant = new RgbQuant({colors: 256, method: 1})
86 | quant.sample(canvas)
87 | quant.palette(true)
88 | canvas_quant = drawPixels(quant.reduce(canvas), width)
89 | optimizer = new CanvasTool.PngEncoder(canvas_quant, { bitDepth: 8, colourType: CanvasTool.PngEncoder.ColourType.TRUECOLOR })
90 | image_base64uri = "data:image/png;base64," + btoa(optimizer.convert())
91 | ###
92 | image_base64uri = canvas.toDataURL("image/png", 0.1)
93 | if image_base64uri.length > @image_size_limit
94 | # Too large, convert to jpg
95 | @log "PNG too large (#{image_base64uri.length} bytes), convert to jpg instead"
96 | image_base64uri = canvas.toDataURL("image/jpeg", 0.7)
97 | else
98 | @log "Converted to PNG"
99 | else
100 | image_base64uri = canvas.toDataURL("image/jpeg", 0.7)
101 |
102 | @log "Resized #{image.width}x#{image.height} to #{canvas.width}x#{canvas.height} (#{image_base64uri.length} bytes)"
103 | return [image_base64uri, canvas.width, canvas.height]
104 |
105 | getExtension: (data) =>
106 | return data.match("/[a-z]+")[0].replace("/", "").replace("jpeg", "jpg")
107 |
108 | handleImageAdd: (e) =>
109 | if e.data.file.name
110 | name = e.data.file.name.replace(/[^\w\.-]/gi, "_")
111 | else
112 | name = Time.timestamp() + "." + @getExtension(e.data.file.type)
113 | e.data.el.$.style.maxWidth = "2400px" # Better resize quality
114 |
115 | if e.data.file.size > @image_size_limit
116 | @log "File size #{e.data.file.size} larger than allowed #{@image_size_limit}, resizing..."
117 | [image_base64uri, width, height] = @resizeImage(e.data.el.$, @image_resize_width, @image_resize_height)
118 | e.data.el.$.src = image_base64uri
119 | name = name.replace(/(png|gif|jpg)/, @getExtension(image_base64uri)) # Change extension if necessary
120 | else
121 | image_base64uri = e.data.el.$.src
122 | width = e.data.el.$.width
123 | height = e.data.el.$.height
124 | # e.data.el.remove() # Don't allow image upload yet
125 | e.data.el.$.style.maxWidth = "" # Show in standard size
126 | e.data.el.$.alt = "#{name} (#{width}x#{height})"
127 | @handleImageSave(name, image_base64uri, e.data.el.$)
128 |
129 |
130 | # Html fixes
131 | handleAction: (e) =>
132 | el = e.editor.getSelection().getStartElement()
133 | # Convert Pre to Pre > Code
134 | if el.getName() == "pre"
135 | @log("Fix pre")
136 | new_el = new CKEDITOR.dom.element("code")
137 | new_el.setHtml(el.getHtml().replace(/\u200B/g, ''))
138 | el.setHtml("")
139 |
140 | e.editor.insertElement(new_el)
141 | ranges = e.editor.getSelection().getRanges()
142 | ranges[0].startContainer = new_el
143 | e.editor.getSelection().selectRanges(ranges)
144 |
145 | # Remove Pre > Code
146 | if el.getName() == "pre" and e.data._style.hasOwnProperty("removeFromRange")
147 | @log("Remove pre")
148 | new_el = new CKEDITOR.dom.element("p");
149 | new_el.insertAfter(el)
150 | new_el.setHtml(el.getFirst().getHtml().replace(/\n/g, " ").replace(/\u200B/g, ''))
151 | el.remove()
152 | selectElement(e.editor, new_el)
153 |
154 | # Remove Pre > Code focused on code
155 | else if el.getName() == "code" and e.data._style.hasOwnProperty("removeFromRange")
156 | @log("Remove code")
157 | new_el = new CKEDITOR.dom.element("p")
158 | new_el.insertAfter(el.getParent())
159 | new_el.setHtml(el.getHtml().replace(/\n/g, " ").replace(/\u200B/g, ''))
160 | el.getParent().remove()
161 | selectElement(e.editor, new_el)
162 |
163 | # Convert multi-line code to Pre > Code
164 | else if el.getName() == "code" && el.getHtml().indexOf(" ") > 0
165 | @log("Fix multiline code")
166 | new_el = new CKEDITOR.dom.element("pre");
167 | new_el.insertAfter(el)
168 | el.appendTo(new_el)
169 | selectElement(e.editor, new_el)
170 |
171 | if el.getName() == "h2" or el.getName() == "h3"
172 | selectElement(e.editor, el)
173 |
174 | @handleChange(e)
175 |
176 |
177 | handleCommand: (e) =>
178 | # Reset style on enter
179 | if e.data.name == 'enter'
180 | el = e.editor.getSelection().getStartElement()
181 |
182 | if el.getText().replace(/\u200B/g, '') == "" and el.getName() != "p" and el.getParent().getName() == "p"
183 | el.remove()
184 |
185 | # Reset style on shift+enter within code
186 | else if e.data.name == 'shiftEnter'
187 | el = e.editor.getSelection().getStartElement();
188 | if el.getName() == "code" && el.getNext() && el.getNext().getName && el.getNext().getName() == "br"
189 | el.getNext().remove()
190 |
191 |
192 | handleChange: (e) =>
193 | @handleSelectionChange(e)
194 |
195 |
196 | handleSelectionChange: (e) =>
197 | if @el_last_created and @el_last_created.getText().replace(/\u200B/g, '').trim() != ""
198 | @el_last_created.removeClass("empty")
199 | @el_last_created = null
200 |
201 | el = e.editor.getSelection().getStartElement()
202 | if el.getName() == "br"
203 | el = el.getParent()
204 | toolbar_add = document.querySelector(".ae-toolbar-add")
205 | if !toolbar_add or !el
206 | return false
207 |
208 | if el.getText().replace(/\u200B/g, '').trim() == ""
209 | if el.getName() == "h2" or el.getName() == "h3"
210 | el.addClass("empty")
211 | @el_last_created = el
212 | toolbar_add.classList.remove("lineselected")
213 | toolbar_add.classList.add("emptyline")
214 | else
215 | toolbar_add.classList.add("lineselected")
216 | toolbar_add.classList.remove("emptyline")
217 |
218 | # Remove toolbar moving
219 | ###
220 | if e.editor.element.getPrivate().events.mouseout?.listeners.length
221 | e.editor.element.removeListener("mouseout", e.editor.element.getPrivate().events.mouseout.listeners[0].fn)
222 |
223 | if e.editor.element.getPrivate().events.mouseleave?.listeners.length
224 | # Keep only mouseout
225 | func = e.editor.element.getPrivate().events.mouseleave.listeners[0]
226 | console.log "remove", e.editor.element.removeListener("mouseleave", func.fn)
227 | e.editor.element.on "mouseleave", (e_leave) ->
228 | if document.querySelector(".ae-toolbar-styles") == null
229 | window.editor._mainUI.forceUpdate()
230 | func(e_leave, e_leave.data)
231 | ###
232 |
233 |
234 |
235 |
236 |
237 | window.CustomAlloyEditor = CustomAlloyEditor
--------------------------------------------------------------------------------
/js/lib/zoom.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * zoom.js - It's the best way to zoom an image
3 | * @version v0.0.2
4 | * @link https://github.com/fat/zoom.js
5 | * @license MIT
6 | */
7 |
8 | +function ($) { "use strict";
9 |
10 | /**
11 | * The zoom service
12 | */
13 | function ZoomService () {
14 | this._activeZoom =
15 | this._initialScrollPosition =
16 | this._initialTouchPosition =
17 | this._touchMoveListener = null
18 |
19 | this._$document = $(document)
20 | this._$window = $(window)
21 | this._$body = $(document.body)
22 |
23 | this._boundClick = $.proxy(this._clickHandler, this)
24 | }
25 |
26 | ZoomService.prototype.listen = function () {
27 | this._$body.on('click', '[data-action="zoom"]', $.proxy(this._zoom, this))
28 | }
29 |
30 | ZoomService.prototype._zoom = function (e) {
31 | var target = e.target
32 |
33 | if (!target || target.tagName != 'IMG') return
34 |
35 | if (this._$body.hasClass('zoom-overlay-open')) return
36 |
37 | if (e.metaKey || e.ctrlKey) {
38 | return window.open((e.target.getAttribute('data-original') || e.target.src), '_blank')
39 | }
40 |
41 | //if (target.width >= ($(window).width() - Zoom.OFFSET)) return
42 |
43 | this._activeZoomClose(true)
44 |
45 | this._activeZoom = new Zoom(target)
46 | this._activeZoom.zoomImage()
47 |
48 | // todo(fat): probably worth throttling this
49 | this._$window.on('scroll.zoom', $.proxy(this._scrollHandler, this))
50 |
51 | this._$document.on('keyup.zoom', $.proxy(this._keyHandler, this))
52 | this._$document.on('touchstart.zoom', $.proxy(this._touchStart, this))
53 |
54 | // we use a capturing phase here to prevent unintended js events
55 | // sadly no useCapture in jquery api (http://bugs.jquery.com/ticket/14953)
56 | if (document.addEventListener) {
57 | document.addEventListener('click', this._boundClick, true)
58 | } else {
59 | document.attachEvent('onclick', this._boundClick, true)
60 | }
61 |
62 | if ('bubbles' in e) {
63 | if (e.bubbles) e.stopPropagation()
64 | } else {
65 | // Internet Explorer before version 9
66 | e.cancelBubble = true
67 | }
68 | }
69 |
70 | ZoomService.prototype._activeZoomClose = function (forceDispose) {
71 | if (!this._activeZoom) return
72 |
73 | if (forceDispose) {
74 | this._activeZoom.dispose()
75 | } else {
76 | this._activeZoom.close()
77 | }
78 |
79 | this._$window.off('.zoom')
80 | this._$document.off('.zoom')
81 |
82 | document.removeEventListener('click', this._boundClick, true)
83 |
84 | this._activeZoom = null
85 | }
86 |
87 | ZoomService.prototype._scrollHandler = function (e) {
88 | if (this._initialScrollPosition === null) this._initialScrollPosition = $(window).scrollTop()
89 | var deltaY = this._initialScrollPosition - $(window).scrollTop()
90 | if (Math.abs(deltaY) >= 40) this._activeZoomClose()
91 | }
92 |
93 | ZoomService.prototype._keyHandler = function (e) {
94 | if (e.keyCode == 27) this._activeZoomClose()
95 | }
96 |
97 | ZoomService.prototype._clickHandler = function (e) {
98 | if (e.preventDefault) e.preventDefault()
99 | else event.returnValue = false
100 |
101 | if ('bubbles' in e) {
102 | if (e.bubbles) e.stopPropagation()
103 | } else {
104 | // Internet Explorer before version 9
105 | e.cancelBubble = true
106 | }
107 |
108 | this._activeZoomClose()
109 | }
110 |
111 | ZoomService.prototype._touchStart = function (e) {
112 | this._initialTouchPosition = e.touches[0].pageY
113 | $(e.target).on('touchmove.zoom', $.proxy(this._touchMove, this))
114 | }
115 |
116 | ZoomService.prototype._touchMove = function (e) {
117 | if (Math.abs(e.touches[0].pageY - this._initialTouchPosition) > 10) {
118 | this._activeZoomClose()
119 | $(e.target).off('touchmove.zoom')
120 | }
121 | }
122 |
123 |
124 | /**
125 | * The zoom object
126 | */
127 | function Zoom (img) {
128 | this._fullHeight =
129 | this._fullWidth =
130 | this._overlay =
131 | this._targetImageWrap = null
132 |
133 | this._targetImage = img
134 |
135 | this._$body = $(document.body)
136 | }
137 |
138 | Zoom.OFFSET = 80
139 | Zoom._MAX_WIDTH = 2560
140 | Zoom._MAX_HEIGHT = 4096
141 |
142 | Zoom.prototype.zoomImage = function () {
143 | var img = document.createElement('img')
144 | img.onload = $.proxy(function () {
145 | this._fullHeight = Number(img.height)
146 | this._fullWidth = Number(img.width)
147 | this._zoomOriginal()
148 | }, this)
149 | img.src = this._targetImage.src
150 | }
151 |
152 | Zoom.prototype._zoomOriginal = function () {
153 | this._targetImageWrap = document.createElement('div')
154 | this._targetImageWrap.className = 'zoom-img-wrap'
155 |
156 | this._targetImage.parentNode.insertBefore(this._targetImageWrap, this._targetImage)
157 | this._targetImageWrap.appendChild(this._targetImage)
158 |
159 | $(this._targetImage)
160 | .addClass('zoom-img')
161 | .attr('data-action', 'zoom-out')
162 |
163 | this._overlay = document.createElement('div')
164 | this._overlay.className = 'zoom-overlay'
165 |
166 | document.body.appendChild(this._overlay)
167 |
168 | this._calculateZoom()
169 | this._triggerAnimation()
170 | }
171 |
172 | Zoom.prototype._calculateZoom = function () {
173 | this._targetImage.offsetWidth // repaint before animating
174 |
175 | var originalFullImageWidth = this._fullWidth
176 | var originalFullImageHeight = this._fullHeight
177 |
178 | var scrollTop = $(window).scrollTop()
179 |
180 | var maxScaleFactor = originalFullImageWidth / this._targetImage.width
181 |
182 | var viewportHeight = ($(window).height() - Zoom.OFFSET)
183 | var viewportWidth = ($(window).width() - Zoom.OFFSET)
184 |
185 | var imageAspectRatio = originalFullImageWidth / originalFullImageHeight
186 | var viewportAspectRatio = viewportWidth / viewportHeight
187 |
188 | if (originalFullImageWidth < viewportWidth && originalFullImageHeight < viewportHeight) {
189 | this._imgScaleFactor = maxScaleFactor
190 |
191 | } else if (imageAspectRatio < viewportAspectRatio) {
192 | this._imgScaleFactor = (viewportHeight / originalFullImageHeight) * maxScaleFactor
193 |
194 | } else {
195 | this._imgScaleFactor = (viewportWidth / originalFullImageWidth) * maxScaleFactor
196 | }
197 | }
198 |
199 | Zoom.prototype._triggerAnimation = function () {
200 | this._targetImage.offsetWidth // repaint before animating
201 |
202 | var imageOffset = $(this._targetImage).offset()
203 | var scrollTop = $(window).scrollTop()
204 |
205 | var viewportY = scrollTop + ($(window).height() / 2)
206 | var viewportX = ($(window).width() / 2)
207 |
208 | var imageCenterY = imageOffset.top + (this._targetImage.height / 2)
209 | var imageCenterX = imageOffset.left + (this._targetImage.width / 2)
210 |
211 | this._translateY = viewportY - imageCenterY
212 | this._translateX = viewportX - imageCenterX
213 |
214 | var targetTransform = 'scale(' + this._imgScaleFactor + ')'
215 | var imageWrapTransform = 'translate(' + this._translateX + 'px, ' + this._translateY + 'px)'
216 |
217 | if ($.support.transition) {
218 | imageWrapTransform += ' translateZ(0)'
219 | }
220 |
221 | $(this._targetImage)
222 | .css({
223 | '-webkit-transform': targetTransform,
224 | '-ms-transform': targetTransform,
225 | 'transform': targetTransform
226 | })
227 |
228 | $(this._targetImageWrap)
229 | .css({
230 | '-webkit-transform': imageWrapTransform,
231 | '-ms-transform': imageWrapTransform,
232 | 'transform': imageWrapTransform
233 | })
234 |
235 | this._$body.addClass('zoom-overlay-open')
236 | }
237 |
238 | Zoom.prototype.close = function () {
239 | this._$body
240 | .removeClass('zoom-overlay-open')
241 | .addClass('zoom-overlay-transitioning')
242 |
243 | // we use setStyle here so that the correct vender prefix for transform is used
244 | $(this._targetImage)
245 | .css({
246 | '-webkit-transform': '',
247 | '-ms-transform': '',
248 | 'transform': ''
249 | })
250 |
251 | $(this._targetImageWrap)
252 | .css({
253 | '-webkit-transform': '',
254 | '-ms-transform': '',
255 | 'transform': ''
256 | })
257 |
258 | $(this._targetImage)
259 | .one("transitionend", $.proxy(this.dispose, this))
260 | }
261 |
262 | Zoom.prototype.dispose = function (e) {
263 | if (this._targetImageWrap && this._targetImageWrap.parentNode) {
264 | $(this._targetImage)
265 | .removeClass('zoom-img')
266 | .attr('data-action', 'zoom')
267 |
268 | this._targetImageWrap.parentNode.replaceChild(this._targetImage, this._targetImageWrap)
269 | this._overlay.parentNode.removeChild(this._overlay)
270 |
271 | this._$body.removeClass('zoom-overlay-transitioning')
272 | }
273 | }
274 |
275 | // wait for dom ready (incase script included before body)
276 | $(function () {
277 | new ZoomService().listen()
278 | })
279 |
280 | }(jQuery);
281 |
--------------------------------------------------------------------------------
/alloy-editor/alloy-editor-config.js:
--------------------------------------------------------------------------------
1 | CKEDITOR.lang['en'] = {"editor":"Rich Text Editor","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Press ALT 0 for help","browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","image":"Image","flash":"Flash","form":"Form","checkbox":"Checkbox","radio":"Radio Button","textField":"Text Field","textarea":"Textarea","hiddenField":"Hidden Field","button":"Button","select":"Selection Field","imageButton":"Image Button","notSet":"","id":"Id","name":"Name","langDir":"Language Direction","langDirLtr":"Left to Right (LTR)","langDirRtl":"Right to Left (RTL)","langCode":"Language Code","longDescr":"Long Description URL","cssClass":"Stylesheet Classes","advisoryTitle":"Advisory Title","cssStyle":"Style","ok":"OK","cancel":"Cancel","close":"Close","preview":"Preview","resize":"Resize","generalTab":"General","advancedTab":"Advanced","validateNumberFailed":"This value is not a number.","confirmNewPage":"Any unsaved changes to this content will be lost. Are you sure you want to load new page?","confirmCancel":"You have changed some options. Are you sure you want to close the dialog window?","options":"Options","target":"Target","targetNew":"New Window (_blank)","targetTop":"Topmost Window (_top)","targetSelf":"Same Window (_self)","targetParent":"Parent Window (_parent)","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","styles":"Style","cssClasses":"Stylesheet Classes","width":"Width","height":"Height","align":"Alignment","alignLeft":"Left","alignRight":"Right","alignCenter":"Center","alignJustify":"Justify","alignTop":"Top","alignMiddle":"Middle","alignBottom":"Bottom","alignNone":"None","invalidValue":"Invalid value.","invalidHeight":"Height must be a number.","invalidWidth":"Width must be a number.","invalidCssLength":"Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).","invalidHtmlLength":"Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).","invalidInlineStyle":"Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1, unavailable","keyboard":{"8":"Backspace","13":"Enter","16":"Shift","17":"Ctrl","18":"Alt","32":"Space","35":"End","36":"Home","46":"Delete","224":"Command"},"keyboardShortcut":"Keyboard shortcut"},"basicstyles":{"bold":"Bold","italic":"Italic","strike":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline"},"blockquote":{"toolbar":"Block Quote"},"clipboard":{"copy":"Copy","copyError":"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).","cut":"Cut","cutError":"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).","paste":"Paste","pasteArea":"Paste Area","pasteMsg":"Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK","securityMsg":"Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.","title":"Paste"},"horizontalrule":{"toolbar":"Insert Horizontal Line"},"indent":{"indent":"Increase Indent","outdent":"Decrease Indent"},"justify":{"block":"Justify","center":"Center","left":"Align Left","right":"Align Right"},"list":{"bulletedlist":"Insert/Remove Bulleted List","numberedlist":"Insert/Remove Numbered List"},"pastefromword":{"confirmCleanup":"The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?","error":"It was not possible to clean up the pasted data due to an internal error","title":"Paste from Word","toolbar":"Paste from Word"},"removeformat":{"toolbar":"Remove Format"},"undo":{"redo":"Redo","undo":"Undo"},"widget":{"move":"Click and drag to move","label":"%1 widget"}};
2 | CKEDITOR.config.stylesSet = []; // We don't need styles.js
3 | CKEDITOR.document.appendStyleSheet = function(e) { return e }; // We load editor.css manually
4 | AlloyEditor.Strings = {"alignCenter":"Center","alignJustify":"Justify","alignLeft":"Left","alignRight":"Right","bold":"Bold","bulletedlist":"Insert/Remove Bulleted List","cancel":"Cancel","horizontalrule":"Insert Horizontal Line","italic":"Italic","numberedlist":"Insert/Remove Numbered List","quote":"Block Quote","removeformat":"Remove Format","strike":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline","formatted":"Formatted","h1":"Heading 1","h2":"Heading 2","normal":"Normal","blockStyles":"Block Styles","inlineStyles":"Inline Styles","objectStyles":"Object Styles","styles":"Styles","cell":"Cell","cellDelete":"Delete Cells","cellInsertAfter":"Insert Cell After","cellInsertBefore":"Insert Cell Before","cellMerge":"Merge Cells","cellMergeDown":"Merge Down","cellMergeRight":"Merge Right","cellSplitHorizontal":"Split Cell Horizontally","cellSplitVertical":"Split Cell Vertically","column":"Column","columnDelete":"Delete Columns","columnInsertAfter":"Insert Column After","columnInsertBefore":"Insert Column Before","deleteTable":"Delete Table","row":"Row","rowDelete":"Delete Rows","rowInsertAfter":"Insert Row After","rowInsertBefore":"Insert Row Before","add":"Add","ariaUpdateNoToolbar":"No toolbars are available","ariaUpdateOneToolbar":"{toolbars} toolbar is available. Press ALT+F10 to focus.","ariaUpdateManyToolbars":"{toolbars} toolbars are available. Press ALT+F10 to focus.","camera":"Insert Image from Camera","cite":"Cite","code":"Code","clearInput":"Clear Input Field","confirm":"Confirm","editLink":"Type or paste link here","image":"Insert Image","link":"Link","removeLink":"Remove link","table":"Insert Table","twitter":"Twitter","headers":"Headers","headersBoth":"Both","headersColumn":"First column","headersNone":"None","headersRow":"First Row","linkTargetBlank":"_blank (new tab)","linkTargetDefault":"default","linkTargetParent":"_parent","linkTargetSelf":"_self (same tab)","linkTargetTop":"_top","cameraDisabled":"The browser does not support this action, or it is available on https only (Chrome).","indent":"Increase Indent","outdent":"Decrease Indent","deleteEmbed":"Delete embed","columns":"Cols","rows":"Rows"};
5 | AlloyEditor._langResourceRequested = true; // We include en.js
6 |
7 | // Inline code button
8 | React = AlloyEditor.React;
9 | var ButtonInlineCode = React.createClass({
10 | displayName: 'ButtonInlineCode',
11 | mixins: [AlloyEditor.ButtonStyle, AlloyEditor.ButtonStateClasses, AlloyEditor.ButtonActionStyle],
12 | propTypes: {
13 | editor: React.PropTypes.object.isRequired,
14 | label: React.PropTypes.string,
15 | tabIndex: React.PropTypes.number
16 | },
17 |
18 | statics: {
19 | key: 'inlinecode'
20 | },
21 |
22 | getDefaultProps: function getDefaultProps() {
23 | return {
24 | style: {
25 | element: 'code'
26 | }
27 | };
28 | },
29 |
30 | render: function render() {
31 | var cssClass = 'ae-button ' + this.getStateClasses();
32 |
33 | return React.createElement(
34 | 'button',
35 | { 'aria-label': AlloyEditor.Strings.code, 'aria-pressed': cssClass.indexOf('pressed') !== -1, className: cssClass, 'data-type': 'button-code', onClick: this.applyStyle, tabIndex: this.props.tabIndex, title: AlloyEditor.Strings.code },
36 | React.createElement('span', { className: 'ae-icon-code' })
37 | );
38 | }
39 | });
40 |
41 | AlloyEditor.Buttons[ButtonInlineCode.key] = AlloyEditor.ButtonInlineCode = ButtonInlineCode;
42 |
43 |
44 | var ButtonH3 = React.createClass({
45 | displayName: 'ButtonH3',
46 | mixins: [AlloyEditor.ButtonStyle, AlloyEditor.ButtonStateClasses, AlloyEditor.ButtonActionStyle],
47 | propTypes: {
48 | editor: React.PropTypes.object.isRequired,
49 | label: React.PropTypes.string,
50 | tabIndex: React.PropTypes.number
51 | },
52 |
53 | statics: {
54 | key: 'h3'
55 | },
56 |
57 | getDefaultProps: function getDefaultProps() {
58 | return {
59 | style: {
60 | element: 'h3'
61 | }
62 | };
63 | },
64 |
65 | render: function render() {
66 | var cssClass = 'ae-button ' + this.getStateClasses();
67 |
68 | return React.createElement(
69 | 'button',
70 | { 'aria-label': AlloyEditor.Strings.h3, 'aria-pressed': cssClass.indexOf('pressed') !== -1, className: cssClass, 'data-type': 'button-h3', onClick: this.applyStyle, tabIndex: this.props.tabIndex, title: "Heading 3" },
71 | React.createElement('span', { className: 'ae-icon-h3' })
72 | );
73 | }
74 | });
75 |
76 | AlloyEditor.Buttons[ButtonH3.key] = AlloyEditor.ButtonH3 = ButtonH3;
77 |
78 |
79 | selections = AlloyEditor.Selections
80 | selections.unshift({
81 | name: 'text',
82 | buttons: ['bold', 'italic', 'strike', 'inlinecode', 'link'],
83 | test: AlloyEditor.SelectionTest.text
84 | })
85 | // Remove Image toolbar
86 | AlloyEditor.Core.ATTRS.toolbars.value.styles.selections.forEach(
87 | function(selection, i, selections) {
88 | if (selection.name == "image") selections.splice(i, 1)
89 | }
90 | )
91 |
92 |
93 | // Other settings
94 | CKEDITOR.config.language = "en"
95 | CKEDITOR.config.title = ""
96 | CKEDITOR.config.fullPage = true
97 | CKEDITOR.config.pasteFromWordRemoveFontStyles = true
98 | CKEDITOR.config.removePlugins = "dragdrop"
99 | AlloyEditor.Core.ATTRS.removePlugins.value += ',ae_embed,ae_imagealignment,ae_dragresize'
100 | AlloyEditor.Buttons.linkEdit.defaultProps.appendProtocol = false
101 | CKEDITOR.config.buttonCfg = {
102 | buttonLinkEdit: {
103 | appendProtocol: false
104 | }
105 | }
106 | AlloyEditor.Core.ATTRS.toolbars.value = {
107 | add: {
108 | buttons: ['h2', 'h3', 'quote', 'code', 'hline', 'table', 'image'],
109 | tabIndex: 2
110 | },
111 | styles: {
112 | selections: selections,
113 | tabIndex: 1
114 | }
115 | }
116 | CKEDITOR.config.customConfig = "";
117 |
118 | // Helpers
119 |
120 | function createSelectionFromPoint(startX, startY, endX, endY) { // Select text based on x y coordinates
121 | var doc = document;
122 | var start, end, range = null;
123 | if (typeof doc.caretPositionFromPoint != "undefined") {
124 | start = doc.caretPositionFromPoint(startX, startY);
125 | end = doc.caretPositionFromPoint(endX, endY);
126 | range = doc.createRange();
127 | range.setStart(start.offsetNode, start.offset);
128 | range.setEnd(end.offsetNode, end.offset);
129 | } else if (typeof doc.caretRangeFromPoint != "undefined") {
130 | start = doc.caretRangeFromPoint(startX, startY);
131 | end = doc.caretRangeFromPoint(endX, endY);
132 | range = doc.createRange();
133 | range.setStart(start.startContainer, start.startOffset);
134 | range.setEnd(end.startContainer, end.startOffset);
135 | }
136 | if (range !== null && typeof window.getSelection != "undefined") {
137 | var sel = window.getSelection();
138 | sel.removeAllRanges();
139 | sel.addRange(range);
140 | } else if (typeof doc.body.createTextRange != "undefined") {
141 | range = doc.body.createTextRange();
142 | range.moveToPoint(startX, startY);
143 | var endRange = range.duplicate();
144 | endRange.moveToPoint(endX, endY);
145 | range.setEndPoint("EndToEnd", endRange);
146 | range.select();
147 | }
148 | }
149 |
150 | function selectElement(editor, elem) { // Select CKEditor element
151 | var range = new CKEDITOR.dom.range(editor.document);
152 | range.moveToElementEditablePosition(elem, true);
153 | range.setStart(elem, 0)
154 | range.setEnd(elem, elem.getChildCount())
155 | editor.getSelection().selectRanges([range]);
156 | }
--------------------------------------------------------------------------------
/css/ZeroBlog.css:
--------------------------------------------------------------------------------
1 | /* Design based on medium */
2 |
3 | body { background-color: white; color: #333332; margin: 10px; padding: 0px; font-family: 'Roboto Light', sans-serif; height: 15000px; overflow: hidden; backface-visibility: hidden }
4 | body.loaded { height: auto; overflow: auto }
5 | h1, h2, h3, h4 { font-family: 'Roboto Light', sans-serif; font-weight: normal; margin: 0px; padding: 0px }
6 | h1 { font-size: 32px; line-height: 1.2em; font-weight: bold; letter-spacing: -0.5px; margin-bottom: 5px }
7 | h2 { margin-top: 2em }
8 | h3 { font-size: 24px; margin-top: 2em }
9 | h1 + h2, h2 + h3 { margin-top: inherit }
10 |
11 | p { margin-top: 0.9em; margin-bottom: 0.9em }
12 | hr { margin: 20px 0px; border: none; border-bottom: 1px solid #eee; margin-left: auto; margin-right: auto; width: 120px; }
13 | small { font-size: 80%; color: #999; }
14 |
15 | a { border-bottom: 1px solid #3498db; text-decoration: none; color: black; font-weight: bold }
16 | a.nolink { border-bottom: none }
17 | a:hover { color: #3498db }
18 |
19 | .button {
20 | padding: 5px 10px; margin-left: 10px; background-color: #DDE0E0; border-bottom: 2px solid #999998; background-position: left center;
21 | border-radius: 2px; text-decoration: none; transition: all 0.5s ease-out; color: #333
22 | }
23 | .button:hover { background-color: #FFF400; border-color: white; border-bottom: 2px solid #4D4D4C; transition: none; color: inherit }
24 | .button:active { position: relative; top: 1px }
25 |
26 | /*.button-delete { background-color: #e74c3c; border-bottom-color: #A83F34; color: white }*/
27 | .button-outline { background-color: white; color: #CACACA; border: 1px solid #eee }
28 |
29 | .button-delete:hover { background-color: #FF5442; border: 1px solid #FF5442; color: white }
30 | .button-ok:hover { background-color: #27AE60; border: 1px solid #27AE60; color: white }
31 |
32 | .button.loading {
33 | color: rgba(0,0,0,0); background: #999 url(../img/loading.gif) no-repeat center center;
34 | transition: all 0.5s ease-out; pointer-events: none; border-bottom: 2px solid #666
35 | }
36 | .button.publish { background-color: #2ecc71; border-color: #2ecc71; color: white }
37 | .button.publish:hover { background-color: #35D679; border-color: #35D679 }
38 |
39 | .cancel { margin-left: 10px; font-size: 80%; color: #999; }
40 |
41 |
42 | .template { display: none }
43 |
44 | /* Editable */
45 | .editable { outline: none }
46 | .editable-edit:hover { opacity: 1; border: none; color: #333 }
47 | .editable-edit {
48 | opacity: 0; float: left; margin-top: 0px; margin-left: -40px; padding: 8px 20px; transition: all 0.3s; width: 0px; display: inline-block; padding-right: 0px;
49 | color: rgba(100,100,100,0.5); text-decoration: none; font-size: 18px; font-weight: normal; border: none;
50 | }
51 | /*.editing { white-space: pre-wrap; z-index: 1; position: relative; outline: 10000px solid rgba(255,255,255,0.9) !important; }
52 | .editing p { margin: 0px; padding: 0px }*/ /* IE FIX */
53 | .editor { width: 100%; display: block; overflow :hidden; resize: none; border: none; box-sizing: border-box; z-index: 900; position: relative }
54 | .editor:focus { border: 0px; outline-offset: 0px }
55 | .editbg {
56 | display: none; width: 100%; height: 100%; position: fixed; opacity: 0; background-color: white; transition: opacity 0.5s;
57 | left: 0px; top: 0px; z-index: 500; backface-visibility: hidden;
58 | }
59 |
60 | /* -- Editbar -- */
61 |
62 | .bottombar {
63 | display: none; position: fixed; padding: 10px 20px; opacity: 0; background-color: rgba(255,255,255,0.9);
64 | right: 30px; bottom: 0px; z-index: 1000; transition: all 0.3s; transform: translateY(50px)
65 | }
66 | .bottombar.visible { transform: translateY(0px); opacity: 1 }
67 | .publishbar { z-index: 990}
68 | .publishbar.visible { display: inline-block; }
69 | .editbar { perspective: 900px }
70 | .markdown-help {
71 | position: absolute; bottom: 30px; transform: translateX(0px) rotateY(-40deg); transform-origin: right; right: 0px;
72 | list-style-type: none; background-color: rgba(255,255,255,0.9); padding: 10px; opacity: 0; transition: all 0.6s; display: none
73 | }
74 | .markdown-help.visible { transform: none; opacity: 1 }
75 | .markdown-help li { margin: 10px 0px }
76 | .markdown-help code { font-size: 100% }
77 | .icon-help { border: 1px solid #EEE; padding: 2px; display: inline-block; width: 17px; text-align: center; font-size: 13px; margin-right: 6px; vertical-align: 1px }
78 | .icon-help.active { background-color: #EEE }
79 |
80 | /* -- Left -- */
81 |
82 | .left { float: left; position: absolute; width: 220px; padding-left: 20px; padding-right: 20px; margin-top: 60px; text-align: right }
83 | .right { float: left; padding-left: 60px; margin-left: 240px; max-width: 700px; padding-right: 60px; padding-top: 60px }
84 |
85 | .left .avatar {
86 | background-color: #F0F0F0; width: 60px; height: 60px; border-radius: 100%; margin-bottom: 10px;
87 | background-position: center center; background-size: 70%; display: inline-block; image-rendering: pixelated;
88 | }
89 | .left h1 a.nolink { font-family: Tinos; display: inline-block; padding: 1px }
90 | .left h1 a.editable-edit { float: none }
91 | .left h2 { font-size: 15px; font-family: Tinos; line-height: 1.6em; color: #AAA; margin-top: 14px; letter-spacing: 0.2px }
92 | .left ul, .left li { padding: 0px; margin: 0px; list-style-type: none; line-height: 2em }
93 | .left hr { margin-left: 100px; margin-right: 0px; width: auto }
94 | /*.left .links { width: 230px; margin-left: -60px }*/
95 | .left .links.editor { text-align: left !important }
96 |
97 | .lastcomments { background-color: #FAFAFA; margin-left: -25px; padding-right: 15px; padding-bottom: 5px; padding-top: 3px; margin-top: 40px; margin-right: -15px; display: none }
98 | .lastcomments h3 { margin-top: 20px; margin-left: 15px; }
99 | .lastcomments .lastcomment { font-size: 85%; margin-top: 20px; margin-bottom: 30px; margin-left: 20px; overflow: hidden; padding-right: 15px; }
100 | .lastcomments .lastcomment .user_name { font-weight: bold; }
101 | .lastcomments .lastcomment .details { font-size: 90%; }
102 | .lastcomments .lastcomment .details .at { color: #999 }
103 | .lastcomments .lastcomment .details .postlink { border-bottom: 1px solid #BBB; }
104 |
105 | /* -- Post -- */
106 |
107 | .posts .new { display: none; position: absolute; top: -50px; margin-left: 0px; left: 50%; transform: translateX(-50%) }
108 |
109 | .posts, .post-full { display: none; position: relative; }
110 | .page-main .posts { display: block }
111 | .page-post.loaded .post-full { display: block; border-bottom: none }
112 |
113 |
114 | .post { margin-bottom: 50px; padding-bottom: 50px; border-bottom: 1px solid #eee; min-width: 450px }
115 | .post .title a { text-decoration: none; color: inherit; display: inline-block; border-bottom: none; font-weight: inherit }
116 | .posts .title a:visited { color: #666969 }
117 | .post .details { color: #BBB; margin-top: 5px; margin-bottom: 20px }
118 | .post .details .comments-num { border: none; color: #BBB; font-weight: normal; }
119 | .post .details .comments-num .num { border-bottom: 1px solid #eee; color: #000; }
120 | .post .details .comments-num:hover .num { border-bottom: 1px solid #D6A1DE; }
121 | .post .details .like { display: inline-block; padding: 5px 5px; margin-top: -6px; border-radius: 7px; border: none; font-weight: normal; transition: all 0.3s }
122 | .post .details .like .icon-heart:before, .post .details .like .icon-heart:after { background-color: #CCC; transition: all 0.3s }
123 | .post .details .like .icon-heart { transform-style: preserve-3d; transition: all 0.3s }
124 | .post .details .like:hover .icon-heart { transform: scale(1.1) }
125 | .post .details .like:hover .icon-heart:before, .post .details .like:hover .icon-heart:after { background-color: #FF5442 }
126 | .post .details .like.active .icon-heart:before, .post .details .like.active .icon-heart:after { background-color: #FF5442 }
127 | .post .details .like.active .icon-heart-anim { transform: scale(1.8); opacity: 0; transition: all 1s ease-in-out }
128 | .post .details .like .num { margin-left: 21px; color: #CCC; transition: all 0.3s }
129 | .post .details .like:hover .num { color: #FA6C8D }
130 | .post .details .like.loading { pointer-events: none; animation: bounce .3s infinite alternate ease-out; animation-delay: 1s; }
131 | .post .body { font-size: 21.5px; line-height: 1.6; font-family: Tinos; margin-top: 20px; overflow-wrap: break-word; }
132 |
133 | .post .body h1 { text-align: center; margin-top: 50px }
134 | .post .body h1:before { content: " "; border-top: 1px solid #EEE; width: 120px; display: block; margin-left: auto; margin-right: auto; margin-bottom: 50px; }
135 |
136 | .post .body p + ul { margin-top: -0.5em }
137 | .post .body li { margin-top: 0.5em; margin-bottom: 0.5em }
138 | .post .body hr:first-of-type { display: none }
139 |
140 | .post .body a img { margin-bottom: -8px }
141 | .post .body img { max-width: 100% }
142 | .post .body table { border-collapse: collapse; margin-bottom: 10px; margin: auto }
143 | .post .body td, .post .body th { padding: 5px 10px; border: 1px solid #EEE; border-collapse: collapse; text-align: left }
144 |
145 | code {
146 | background-color: #f5f5f5; border: 1px solid #ccc; padding: 0px 5px; overflow: auto; border-radius: 2px; display: inline-block;
147 | color: #444; font-weight: normal; font-size: 13px; vertical-align: text-bottom; border-bottom-width: 2px;
148 | }
149 | .post .body pre { table-layout: fixed; width: 100%; box-sizing: border-box; display: table; white-space: normal; }
150 | .post .body pre code { padding: 10px 20px; white-space: pre; display: block; max-width: 100%; box-sizing: border-box; }
151 |
152 | blockquote { border-left: 3px solid #333; margin-left: 0px; padding-left: 1em }
153 | /*.post .more {
154 | display: inline-block; border: 1px solid #eee; padding: 10px 25px; border-radius: 26px; font-size: 11px; color: #AAA; font-weight: normal;
155 | left: 50%; position: relative; transform: translateX(-50%);
156 | }*/
157 |
158 | .post .more { border: 2px solid #333; padding: 10px 20px; font-size: 15px; margin-top: 30px; display: none; transition: all 0.3s }
159 | .post .more .readmore { }
160 | .post .more:hover { color: white; box-shadow: inset 150px 0px 0px 0px #333; }
161 | .post .more:active { color: white; box-shadow: inset 150px 0px 0px 0px #AF3BFF; transition: none; border-color: #AF3BFF }
162 |
163 | .pager { margin-bottom: 200px }
164 | .pager a { border: 2px solid #333; padding: 10px 20px; font-size: 15px; display: none; transition: all 0.3s }
165 | .pager a:hover { color: white; box-shadow: inset 150px 0px 0px 0px #333; }
166 | .pager a:active { color: white; box-shadow: inset 150px 0px 0px 0px #AF3BFF; transition: none; border-color: #AF3BFF }
167 | .pager .next { float: right }
168 | .pager .prev:hover { box-shadow: inset -150px 0px 0px 0px #333; }
169 | .pager .prev:active { box-shadow: inset -150px 0px 0px 0px #AF3BFF; }
170 |
171 | .zoom-img {
172 | filter: none; -webkit-filter: blur(0px); -moz-filter: blur(0px); -ms-filter: blur(0px); filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='0');
173 | backface-visibility: hidden; transform: translateZ(0); image-rendering: optimizeSpeed;
174 | }
175 | /* Score */
176 | /*
177 | .score {
178 | border: 1px solid #eee; margin-right: 5px; margin-left: 5px; padding: 2px 7px; border-radius: 10px; color: #AAA; background-position: left center; font-weight: bold; font-size: 12px;
179 | display: inline-block; height: 1.2em; overflow: hidden; vertical-align: -0.5em; line-height: 7px; transition: background-color 0.3s; height: 20px; box-sizing: border-box
180 | }
181 | .score-active, .score-inactive { transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: inline-block; margin-top: 3px }
182 | .score-active { display: block; margin-top: 5px }
183 | .score.active { background-color: #2ecc71; color: white }
184 | .score.loading {
185 | color: rgba(255,255,255,0) !important; background: #2ecc71 url(../img/loading.gif) no-repeat center center;
186 | transition: background 0.5s ease-out; pointer-events: none; border: 1px solid #2ecc71
187 | }
188 |
189 | .score.active .score-inactive, .score:hover .score-inactive { transform: translateY(-14px); opacity: 0.5 }
190 | .score.active .score-active, .score:hover .score-active { transform: translateY(-14px) }
191 | .score:hover, .score.active { border: 1px solid #2ecc71; color: #AAA; }
192 |
193 | .score:active { border: 1px solid #AAA !important; transform: translateY(1px) }
194 |
195 | .noscore .score-inactive .icon-up { margin-left: 6px }
196 | .noscore .score-inactive .score-num { display: none }
197 | */
198 |
199 | @keyframes bounce {
200 | 0% { transform: translateY(0); }
201 | 100% { transform: translateY(-3px); }
202 | }
203 |
--------------------------------------------------------------------------------
/content.json:
--------------------------------------------------------------------------------
1 | {
2 | "address": "1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8",
3 | "background-color": "white",
4 | "background-color-dark": "#30363c",
5 | "cloneable": true,
6 | "default_page": "index.html",
7 | "description": "Blogging platform Demo",
8 | "domain": "Blog.ZeroNetwork.bit",
9 | "files": {
10 | "LICENSE": {
11 | "sha512": "d281feecb7d1218e1aea8269f288fcd63385da1a130681fadae77262637cb65f",
12 | "size": 18027
13 | },
14 | "README.md": {
15 | "sha512": "07dbb7b8386b600d7eea237f237269ed705cf3d97a46edc02c8ba43fa63b59c2",
16 | "size": 312
17 | },
18 | "alloy-editor/all.css": {
19 | "sha512": "7f92b9206df4994b119df0123734193ad95c5961c2b5190aa1e60f394026d150",
20 | "size": 63384
21 | },
22 | "alloy-editor/all.js": {
23 | "sha512": "0c917acb6b3f7397d37263a8ee01100929e7aed3c752b2103cb884f65aef7b23",
24 | "size": 737537
25 | },
26 | "css/all.css": {
27 | "sha512": "7f5d792397331b71403edf67510b812c597bf200ae8ca538d0864b2eb098cb50",
28 | "size": 136196
29 | },
30 | "data-default/data.json": {
31 | "sha512": "c8952629acf0c47ac1a53c7b8910e3aae2eda34371cb5182b9c9a50e483a297c",
32 | "size": 437
33 | },
34 | "data-default/users/content-default.json": {
35 | "sha512": "0603ce08f7abb92b3840ad0cf40e95ea0b3ed3511b31524d4d70e88adba83daa",
36 | "size": 679
37 | },
38 | "data/data.json": {
39 | "sha512": "7da2160bce9f61cc52513f02fed7861e5e76a2fe4f6a235d79f4dcb9617c9f0b",
40 | "size": 187072
41 | },
42 | "data/files/ZeroFrame.coffee": {
43 | "sha512": "e9d440c26e858ff524313e60881714bcaf292470ce63d2b33b93d9920a21a7c4",
44 | "size": 1467
45 | },
46 | "data/img/allony.png": {
47 | "sha512": "2cf2ef70d1dbf2395384581ffb0e1cc9e8dfa5a64441e5ab7c08477127fb6d9a",
48 | "size": 1572
49 | },
50 | "data/img/autoupdate.png": {
51 | "sha512": "d2b4dc8e0da2861ea051c0c13490a4eccf8933d77383a5b43de447c49d816e71",
52 | "size": 24460
53 | },
54 | "data/img/clone.png": {
55 | "sha512": "07df9f39af99b2a4348f1f0984b0e8667add7821a689e0a737df49bd68411def",
56 | "size": 11539
57 | },
58 | "data/img/decentralized_web_summit.png": {
59 | "sha512": "90f83d91ea366eeb13c5874c0d25ef6efa6d20cc6e3f556fdc4de949d58248a4",
60 | "size": 25428
61 | },
62 | "data/img/direct_domains.png": {
63 | "sha512": "5f14b30c1852735ab329b22496b1e2ea751cb04704789443ad73a70587c59719",
64 | "size": 16185
65 | },
66 | "data/img/domain.png": {
67 | "sha512": "ce87e0831f4d1e95a95d7120ca4d33f8273c6fce9f5bbedf7209396ea0b57b6a",
68 | "size": 11881
69 | },
70 | "data/img/getd.png": {
71 | "sha512": "22987f498e2dd6e5dee9f6367fec22fa1d2ad3538b2455d1d9e3fc400d1933db",
72 | "size": 36735
73 | },
74 | "data/img/memory.png": {
75 | "sha512": "dd56515085b4a79b5809716f76f267ec3a204be3ee0d215591a77bf0f390fa4e",
76 | "size": 12775
77 | },
78 | "data/img/multiuser.png": {
79 | "sha512": "88e3f795f9b86583640867897de6efc14e1aa42f93e848ed1645213e6cc210c6",
80 | "size": 29480
81 | },
82 | "data/img/new_zeronet_logos.png": {
83 | "sha512": "a8685d5d8d9d84a83710a1316ee7b8f998f14918cef32e14217d5e45f156aa20",
84 | "size": 59816
85 | },
86 | "data/img/optional.png": {
87 | "sha512": "84df27a2ee59f18bc646ed4e6610a6ca7569fad2e85198ba9aa278a3258f35c3",
88 | "size": 104799
89 | },
90 | "data/img/optional_manager.png": {
91 | "sha512": "f0df2c1df5106f63e922ac0b65388d97bab1e7c26f6bf06469b44eae8b798cec",
92 | "size": 29008
93 | },
94 | "data/img/peers.jpg": {
95 | "sha512": "3142ae89ed2347953033068fd789ac316692a3bdcbbf01257326685fc1402be9",
96 | "size": 67768
97 | },
98 | "data/img/pocketchip.jpg": {
99 | "sha512": "05ddad3659e71dfbc6afbba3faaf680c810636ea2319e1e9950ed462cfa75d01",
100 | "size": 131607
101 | },
102 | "data/img/post_101_ezgif.com-f1dae34e05.gif": {
103 | "sha512": "ee45043be1c79a1ef952f2ab030d24b63592790b572750b8bf42544d80a228e3",
104 | "size": 15609
105 | },
106 | "data/img/post_101_plus.png": {
107 | "sha512": "e8d3bd6fe509e79389385389d66874a388a8474218c3ef5b3cf9339196d0633d",
108 | "size": 243
109 | },
110 | "data/img/post_102_1484303724.jpg": {
111 | "sha512": "1e75a71128f3675389ccef9748d071b779ef8635db826f933dffdccf2e6fed61",
112 | "size": 90260
113 | },
114 | "data/img/post_102_peers.jpg": {
115 | "sha512": "37c064e0b8fafa801a6264e9495d515b7468fa387566d329debd80e66cc7ebcf",
116 | "size": 79172
117 | },
118 | "data/img/post_103_publish.png": {
119 | "sha512": "ace77f3163cd0de7dc560d18cecd73b3e6cd8a5b32751d4038c65c400521e88c",
120 | "size": 1087
121 | },
122 | "data/img/post_104_mute.png": {
123 | "sha512": "6bdad39da3dfbc3db3a57e52fc10d9205cf0729a6cd124e7e5c8704a130161b4",
124 | "size": 15562
125 | },
126 | "data/img/post_107_1489106790.jpg": {
127 | "sha512": "d26b09e35853fe3d2b69ce2e1b3532af4fa830dff7fc8bf8248114a21a54aea0",
128 | "size": 97447
129 | },
130 | "data/img/post_108_tor_hs_limit.png": {
131 | "sha512": "f42e8b8e03856ede429c7bf97ce7490f33a541881a5943eedb9601b617696aab",
132 | "size": 4254
133 | },
134 | "data/img/post_109_blacklist.png": {
135 | "sha512": "d8211426370fe3ee03306b15c2896d1242dacf44d026d09953a42c13dd727876",
136 | "size": 6186
137 | },
138 | "data/img/post_110_zerosites.png": {
139 | "sha512": "07a87584e2f95b42bf0880594b4aab54809b04c3acc14ba297370bec444e9d4f",
140 | "size": 40366
141 | },
142 | "data/img/post_113_mavo.jpg": {
143 | "sha512": "174eb14349a5f6e9679b3acf7cb0545cd91544fb1058312c460e873fa5eb288e",
144 | "size": 121176
145 | },
146 | "data/img/post_115_mobile-sm.png": {
147 | "sha512": "e0b76406a9ef06d3f7fdc29036d77162e661efe063c9038b53f7611f432622b4",
148 | "size": 70656
149 | },
150 | "data/img/post_116_20785768_1658990647475567_7520728110450357066_o.jpg": {
151 | "sha512": "958bb514ec019267ca6c1c7f25d9950530728e04cc1eee33b571b9f8f1c3a58d",
152 | "size": 72858
153 | },
154 | "data/img/post_121_zeroup.png": {
155 | "sha512": "2cf2f8ed080534251a5ef4e454fe25674411391ec1b142e20bc4c20c755dbce9",
156 | "size": 51890
157 | },
158 | "data/img/post_124_chart_top.jpg": {
159 | "sha512": "6d4f6e8d72b8612bef0e62e4d36a72800344c834f72311ee5f9bb5e97718806a",
160 | "size": 170450
161 | },
162 | "data/img/post_131_blocklist.png": {
163 | "sha512": "27f3e449aa327b135b995b964e9191460968bb70201aaca1814e0d93a0e61ee4",
164 | "size": 14440
165 | },
166 | "data/img/post_132_Config.png": {
167 | "sha512": "fdba7451da4a782bdc1770cfd9a341314b2ffde01dddea63edfa97fca9616b40",
168 | "size": 20278
169 | },
170 | "data/img/post_134_dws2018.jpg": {
171 | "sha512": "959e1c4b1daddc4e62edeb6706934f4adfa14d9ac8c94243900c1525f314b797",
172 | "size": 93811
173 | },
174 | "data/img/post_139_TEDSalon.jpg": {
175 | "sha512": "dc884a044124d5ebe1d1cb98f52d41f5dfa50fb42014d6b7d0395a57a9e58ba5",
176 | "size": 67023
177 | },
178 | "data/img/post_140_dark-theme.png": {
179 | "sha512": "7de42c38798c8dc6b940ff679b3052f98aaecd1bfff42954cf05c9ab05b7161d",
180 | "size": 46002
181 | },
182 | "data/img/post_147_console.png": {
183 | "sha512": "3fcd9cf43f78513f2b2bfc3542ede0aa98a994fdd3ec3e92a0f1154578152138",
184 | "size": 34446
185 | },
186 | "data/img/post_151_benchmark.png": {
187 | "sha512": "4f238b57db77c55b080a3b63113c1bf94a6206e160f9726fd20c11eeb9536d49",
188 | "size": 5729
189 | },
190 | "data/img/progressbar.png": {
191 | "sha512": "23d592ae386ce14158cec34d32a3556771725e331c14d5a4905c59e0fe980ebf",
192 | "size": 13294
193 | },
194 | "data/img/search.png": {
195 | "sha512": "b5adf6562b0078bdda257d216a07b43fa6f81e0989fcabf83817ef072cbeb1f1",
196 | "size": 18735
197 | },
198 | "data/img/sidebar.png": {
199 | "sha512": "e5fdafcc7226f830eb27a1296236aa985625e27480e6829660db978ceae0bba9",
200 | "size": 98641
201 | },
202 | "data/img/slides.png": {
203 | "sha512": "1933db3b90ab93465befa1bd0843babe38173975e306286e08151be9992f767e",
204 | "size": 14439
205 | },
206 | "data/img/slots_memory.png": {
207 | "sha512": "82a250e6da909d7f66341e5b5c443353958f86728cd3f06e988b6441e6847c29",
208 | "size": 9488
209 | },
210 | "data/img/startup.png": {
211 | "sha512": "d9f4d652396bbb89f0508e3e3908bd03408e99681f33e47f790b53a9b1c4fafc",
212 | "size": 4257
213 | },
214 | "data/img/trayicon.png": {
215 | "sha512": "e7ae65bf280f13fb7175c1293dad7d18f1fcb186ebc9e1e33850cdaccb897b8f",
216 | "size": 19040
217 | },
218 | "data/img/tutorial-1.png": {
219 | "sha512": "885d322f4e189775cbacb6e7d4f9ee89554d5709077e3777f0d382b0e9d315f1",
220 | "size": 18729
221 | },
222 | "data/img/uipassword.png": {
223 | "sha512": "2f7ddb406cb318da51c36dc4e30e79aca17ef6730b9ba1fa5a9768127d3d0f02",
224 | "size": 5383
225 | },
226 | "data/img/xmas_tree.jpg": {
227 | "sha512": "fec017f87867f43d0f2b98e0b275b59a1997746e6cae9d322c551d7ab357488c",
228 | "size": 43706
229 | },
230 | "data/img/zeroblog-comments.png": {
231 | "sha512": "efe4e815a260e555303e5c49e550a689d27a8361f64667bd4a91dbcccb83d2b4",
232 | "size": 24001
233 | },
234 | "data/img/zerochat.png": {
235 | "sha512": "b1512ad6514a87d8052dac880b3ef0d9f2e70cf2e4605bfebd4a6c792d1c2ba9",
236 | "size": 12029
237 | },
238 | "data/img/zeroid.png": {
239 | "sha512": "b46d541a9e51ba2ddc8a49955b7debbc3b45fd13467d3c20ef104e9d938d052b",
240 | "size": 18875
241 | },
242 | "data/img/zeromail.png": {
243 | "sha512": "f2ced47d30bbf76549ae990b63dab00f3764ad48b6085464b122b108f31da368",
244 | "size": 34638
245 | },
246 | "data/img/zerome.png": {
247 | "sha512": "2b97eadf18d93c52c3316d14d8d54b1564a058e332fbf7bbb107bf24ad07e302",
248 | "size": 21698
249 | },
250 | "data/img/zeroname.png": {
251 | "sha512": "bab45a1bb2087b64e4f69f756b2ffa5ad39b7fdc48c83609cdde44028a7a155d",
252 | "size": 36031
253 | },
254 | "data/img/zerotalk-mark.png": {
255 | "sha512": "a335b2fedeb8d291ca68d3091f567c180628e80f41de4331a5feb19601d078af",
256 | "size": 44862
257 | },
258 | "data/img/zerotalk-upvote.png": {
259 | "sha512": "b1ffd7f948b4f99248dde7efe256c2efdfd997f7e876fb9734f986ef2b561732",
260 | "size": 41092
261 | },
262 | "data/img/zerotalk.png": {
263 | "sha512": "54d10497a1ffca9a4780092fd1bd158c15f639856d654d2eb33a42f9d8e33cd8",
264 | "size": 26606
265 | },
266 | "data/pdf/zeronet_presentation.pdf": {
267 | "sha512": "70274438cf2fbb63e1d3c75a74250ca5d968d63cadbb4426305b3b51f2608a01",
268 | "size": 472084
269 | },
270 | "data/video/local_peer_discovery.jpg": {
271 | "sha512": "a3d33cf1eba1560bf5c23d984053ea812aa83551752ee0f95125e3d6306756eb",
272 | "size": 64818
273 | },
274 | "dbschema.json": {
275 | "sha512": "fa70ee2fce3f8342c6909e0e9b853bca71fa996f23f85739f94c086f2bda5ceb",
276 | "size": 2571
277 | },
278 | "img/avatar.png": {
279 | "sha512": "a656c470967e27c2b385182a361db8bab1696fe3b2d79c86394236d02ce42eb8",
280 | "size": 87
281 | },
282 | "img/loading.gif": {
283 | "sha512": "8a42b98962faea74618113166886be488c09dad10ca47fe97005edc5fb40cc00",
284 | "size": 723
285 | },
286 | "index.html": {
287 | "sha512": "82b962d4c7ae0ece5bde1938f16431e4f8b44e84d857d4291fbcd6a7335c8c8c",
288 | "size": 6542
289 | },
290 | "js/all.js": {
291 | "sha512": "8f12f6a7eed48d004777d9546bedbc2a4228a4ad52c4c3d77072e5fc19386472",
292 | "size": 262515
293 | },
294 | "languages/de.json": {
295 | "sha512": "8fef5db6d592cc1d6baaf27489cdbaa2649c14ab5735fc18fd8c2506292b1289",
296 | "size": 2437
297 | },
298 | "languages/es.json": {
299 | "sha512": "9005bf63e41b2670af8eba0103badfe9ba24ae94b6cac64d00193cfbb2624d85",
300 | "size": 871
301 | },
302 | "languages/fr.json": {
303 | "sha512": "6e87d27a3ee084c8300642ac83133d9b967d8ba3997d7bb0dfbe104ee3e1b327",
304 | "size": 1773
305 | },
306 | "languages/it.json": {
307 | "sha512": "f5c15cf8f36984c29b38911946c18a0414bb2739fd95196bc42004d90979f43e",
308 | "size": 804
309 | },
310 | "languages/nl.json": {
311 | "sha512": "1844365e54a2a5b53fcff4f36ad2e870fe738ba033dbae77172de3126e72bcb7",
312 | "size": 912
313 | },
314 | "languages/pl.json": {
315 | "sha512": "f84ea772597afc947fb0e759318aaa3371a36efe542abdbd6b6411ea99468826",
316 | "size": 864
317 | },
318 | "languages/pt-br": {
319 | "sha512": "804a255da65cb8de0e425326bce69874aab03a6d58c05b95bf6c5102b337f9d1",
320 | "size": 822
321 | },
322 | "languages/zh.json": {
323 | "sha512": "fdc18e8db95603481f107036f77ed0e851afa3259fb4f3476117ceb98462f752",
324 | "size": 1963
325 | }
326 | },
327 | "files_optional": {
328 | "data/video/local_peer_discovery.mp4": {
329 | "piece_size": 1048576,
330 | "piecemap": "data/video/local_peer_discovery.mp4.piecemap.msgpack",
331 | "sha512": "06c34ee9a5e86ab6312e8676e6273dca77af5716e0ea549564fc961b8041d299",
332 | "size": 7809567
333 | },
334 | "data/video/local_peer_discovery.mp4.piecemap.msgpack": {
335 | "sha512": "6f8186658cc2aa27a2a91cf4f655bafcc4c39a8ee0d0d600c2865ca0fe48139c",
336 | "size": 322
337 | }
338 | },
339 | "ignore": "((js|css|alloy-editor)/(?!all.(js|css))|data/.*db|data/users/.*)",
340 | "includes": {
341 | "data/users/content.json": {
342 | "signers": [],
343 | "signers_required": 1
344 | }
345 | },
346 | "inner_path": "content.json",
347 | "modified": 1594422823,
348 | "optional": "data/video/.*mp4",
349 | "postmessage_nonce_security": true,
350 | "signers_sign": "G7W/oNvczE5nPTFYVOqv8+GOpQd23LS/Dc1Q6xQ1NRDDHlYzmoSE63UQ7Za05kD0rwIYXbuUSr8z8p6RhZmnUs8=",
351 | "signs": {"1BLogC9LN4oPDcruNz3qo1ysa133E9AGg8": "G8uuWUYFhzXWl5qolK3+EZTiCNpJHPI8G+vWDDLO8NOBRb9MlR1M4C7kOW8v24zTevWHYRuNHXk4Vl3ZsJj480k="},
352 | "signs_required": 1,
353 | "title": "ZeroBlog",
354 | "translate": ["index.html","js/all.js","alloy-editor/all.js"],
355 | "viewport": "width=device-width, initial-scale=0.8",
356 | "zeronet_version": "0.7.1"
357 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
341 |
--------------------------------------------------------------------------------
/js/lib/marked.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * marked 0.6.3 - a markdown parser
3 | * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed)
4 | * https://github.com/markedjs/marked
5 | */
6 | !function(e){"use strict";var x={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:f,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:f,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:f,lheading:/^([^\n]+)\n {0,3}(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||b.defaults,this.rules=x.normal,this.options.pedantic?this.rules=x.pedantic:this.options.gfm&&(this.options.tables?this.rules=x.tables:this.rules=x.gfm)}x._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,x._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,x.def=i(x.def).replace("label",x._label).replace("title",x._title).getRegex(),x.bullet=/(?:[*+-]|\d{1,9}\.)/,x.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,x.item=i(x.item,"gm").replace(/bull/g,x.bullet).getRegex(),x.list=i(x.list).replace(/bull/g,x.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+x.def.source+")").getRegex(),x._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",x._comment=//,x.html=i(x.html,"i").replace("comment",x._comment).replace("tag",x._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x.paragraph=i(x.paragraph).replace("hr",x.hr).replace("heading",x.heading).replace("lheading",x.lheading).replace("tag",x._tag).getRegex(),x.blockquote=i(x.blockquote).replace("paragraph",x.paragraph).getRegex(),x.normal=d({},x),x.gfm=d({},x.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),x.gfm.paragraph=i(x.paragraph).replace("(?!","(?!"+x.gfm.fences.source.replace("\\1","\\2")+"|"+x.list.source.replace("\\1","\\3")+"|").getRegex(),x.tables=d({},x.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),x.pedantic=d({},x.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",x._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),a.rules=x,a.lex=function(e,t){return new a(t).lex(e)},a.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},a.prototype.token=function(e,t){var n,r,s,i,l,o,a,h,p,u,c,g,f,d,m,b;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),1 ?/gm,""),this.token(s,t),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a={type:"list_start",ordered:d=1<(i=s[2]).length,start:d?+i:"",loose:!1},this.tokens.push(a),n=!(h=[]),f=(s=s[0].match(this.rules.item)).length,c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:f,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:f,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",n.em=i(n.em).replace(/punctuation/g,n._punctuation).getRegex(),n._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,n.autolink=i(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=i(n.tag).replace("comment",x._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/,n._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=i(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=i(n.reflink).replace("label",n._label).getRegex(),n.normal=d({},n),n.pedantic=d({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=d({},n.normal,{escape:i(n.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(i[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.inRawBlock=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):u(i[0]):i[0];else if(i=this.rules.link.exec(e)){var a=m(i[2],"()");if(-1$/,"$1"),o+=this.outputLink(i,{href:p.escapes(r),title:p.escapes(s)}),this.inLink=!1}else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[6]||i[5]||i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(u(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),r="@"===i[2]?"mailto:"+(n=u(this.mangle(i[1]))):n=u(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.inRawBlock?o+=this.renderer.text(i[0]):o+=this.renderer.text(u(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===i[2])r="mailto:"+(n=u(i[0]));else{for(;l=i[0],i[0]=this.rules._backpedal.exec(i[0])[0],l!==i[0];);n=u(i[0]),r="www."===i[1]?"http://"+n:n}e=e.substring(i[0].length),o+=this.renderer.link(r,null,n)}return o},p.escapes=function(e){return e?e.replace(p.rules._escapes,"$1"):e},p.prototype.outputLink=function(e,t){var n=t.href,r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},p.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},p.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s'+(n?e:u(e,!0))+"\n":"
Latest comments:
63 |64 |-
65 | nofish:
66 | WebGL under linux can be problematic, here is some tips...
67 |
68 | @
69 | Changelog, August 16, 2015
70 |
71 |
72 |
73 |