├── .gitignore ├── README.org ├── about.org ├── ego-config.el ├── ego-export.el ├── ego-git.el ├── ego-pkg.el ├── ego-resource.el ├── ego-template.el ├── ego-util.el ├── ego.el └── themes ├── DarkSun ├── readme.org ├── resources │ ├── css │ │ ├── font.css │ │ ├── kdComment.css │ │ ├── main.css │ │ └── org-src-fontify.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ ├── glyphicons-halflings-regular.woff2 │ │ └── pixelated │ │ │ ├── SFPixelate-Bold.ttf │ │ │ ├── SFPixelate-BoldOblique.ttf │ │ │ ├── SFPixelate-Oblique.ttf │ │ │ ├── SFPixelate.ttf │ │ │ ├── SFPixelateShaded-Bold.ttf │ │ │ ├── SFPixelateShaded-BoldObliqu.ttf │ │ │ ├── SFPixelateShaded-Oblique.ttf │ │ │ └── SFPixelateShaded.ttf │ ├── img │ │ └── search.png │ └── js │ │ ├── jquery-2.1.3.min.js │ │ ├── kdComment.js │ │ ├── main.js │ │ └── md5.min.js └── templates │ ├── about.mustache │ ├── author-index.mustache │ ├── author.mustache │ ├── category-index.mustache │ ├── container.mustache │ ├── footer.mustache │ ├── header.mustache │ ├── index.mustache │ ├── nav.mustache │ ├── post.mustache │ ├── tag-index.mustache │ └── tag.mustache ├── default ├── readme.org ├── resources │ ├── css │ │ ├── comment.css │ │ └── main.css │ ├── img │ │ └── search.png │ └── js │ │ ├── jquery-2.1.3.min.js │ │ ├── main.js │ │ └── md5.min.js └── templates │ ├── about.mustache │ ├── category-index.mustache │ ├── container.mustache │ ├── footer.mustache │ ├── header.mustache │ ├── index.mustache │ ├── nav.mustache │ ├── post.mustache │ ├── summary-index.mustache │ └── summary.mustache ├── kactus ├── 1.png ├── 2.png ├── 3.png ├── README.md ├── README.org ├── resources │ ├── css │ │ ├── highlight.css │ │ └── style.css │ ├── images │ │ └── logo.png │ └── js │ │ └── main.js └── templates │ ├── about.mustache │ ├── category-index.mustache │ ├── container.mustache │ ├── footer.mustache │ ├── header.mustache │ ├── index.mustache │ ├── nav.mustache │ ├── post.mustache │ ├── tag-index.mustache │ └── tag.mustache ├── kd_mdo ├── readme.txt ├── resources │ ├── css │ │ ├── font.css │ │ ├── kdComment.css │ │ ├── main.css │ │ └── prettify.css │ ├── fonts │ │ └── pixelated │ │ │ ├── SFPixelate-Bold.ttf │ │ │ ├── SFPixelate-BoldOblique.ttf │ │ │ ├── SFPixelate-Oblique.ttf │ │ │ ├── SFPixelate.ttf │ │ │ ├── SFPixelateShaded-Bold.ttf │ │ │ ├── SFPixelateShaded-BoldObliqu.ttf │ │ │ ├── SFPixelateShaded-Oblique.ttf │ │ │ └── SFPixelateShaded.ttf │ ├── img │ │ └── search.png │ └── js │ │ ├── jquery-2.1.3.min.js │ │ ├── kdComment.js │ │ ├── main.js │ │ └── prettify.js └── templates │ ├── about.mustache │ ├── category-index.mustache │ ├── container.mustache │ ├── footer.mustache │ ├── header.mustache │ ├── index.mustache │ ├── nav.mustache │ ├── post.mustache │ ├── tag-index.mustache │ └── tag.mustache ├── mdo ├── resources │ ├── css │ │ ├── main.css │ │ └── prettify.css │ ├── img │ │ └── search.png │ └── js │ │ └── main.js └── templates │ ├── about.mustache │ ├── category-index.mustache │ ├── container.mustache │ ├── footer.mustache │ ├── header.mustache │ ├── index.mustache │ ├── nav.mustache │ ├── post.mustache │ ├── tag-index.mustache │ └── tag.mustache ├── phaer ├── resources │ └── css │ │ ├── main.css │ │ └── prettify.css └── templates │ ├── category-index.mustache │ ├── container.mustache │ ├── footer.mustache │ ├── header.mustache │ ├── index.mustache │ ├── nav.mustache │ ├── post.mustache │ ├── tag-index.mustache │ └── tag.mustache ├── worg ├── resources │ ├── css │ │ └── main.css │ └── img │ │ └── horse.jpg └── templates │ └── nav.mustache └── wy ├── 1.png ├── 2.png ├── README.org ├── resources └── css │ ├── main.css │ └── posts.css └── templates ├── about.mustache ├── category-index.mustache ├── container.mustache ├── footer.mustache ├── header.mustache ├── index.mustache ├── nav.mustache ├── post.mustache ├── tag-index.mustache └── tag.mustache /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.elc 3 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+TITLE: README of EGO-lite 2 | #+AUTHOR: Feng Shu, Kuangdash, Darksun 3 | #+EMAIL: emacs-china@googlegroups.com 4 | #+DATE: 2015-07-02 5 | 6 | [[https://melpa.org/#/ego][file:https://melpa.org/packages/ego-badge.svg]] 7 | 8 | * 介绍 9 | :PROPERTIES: 10 | :ID: efd66v31lbi0 11 | :END: 12 | 13 | EGO 的简化版本,去掉了很多感觉不必要的东西,跟之前的版本比有如下改动 14 | 15 | 16 | ** 不保存上一次发布的项目 17 | 合并了 =ego-current-project-name= 和 =ego-default-project-name= 这两个变量,目前 =ego-current-project-name= 的作用就是以前的 =ego-default-project-name=. 18 | 19 | 而ego不再保存上一次发布的项目是什么,因为上一次发布的项目不见得就是这次要发布的项目,我觉得保存上一次发布项目反而使代码变得复杂。 20 | ** 用另一个单独的目录存储html结果 21 | 在同一个目录里面通过不同分支存储html和org文件,意味着要使用一个临时目录保存html再拷贝回原目录,我觉得这个拷贝的操作完全是费操作,而且当博客内容很多的时候拷贝速度也不快。 22 | 23 | 另外在目录中切换分支也容易把仓库搞乱,索性简单点使用单独的一个目录来存储html,该目录和原目录分别对应远程仓库中的不同分支。这样不仅节省了拷贝操作,而且无需在进行分支的切换了。 24 | ** 发布前先git pull同步一次上游仓库 25 | 有的时候会在另一台机器上写博客,而在本机上忘了同步上游仓库导致合并仓库时出现冲突 26 | ** 去掉Emacs中的静态web服务 27 | 根据UNIX哲学,只做一件事情,把这件事情做好。我觉得EGO只需要实现把org文件转换成html博客就好,预览功能作用不大。 28 | 29 | 而且Emacs上实现的web静态服务器太过简陋,如果真的想要预览,可以用专业的web服务器来实现,比如 30 | #+begin_src shell 31 | docker run -dit --name my-apache-app -p 8080:80 -v "${STORE-DIR}":/usr/local/apache2/htdocs/ httpd:2.4 32 | #+end_src 33 | ** 根据修改的内容增量更新tag文件 34 | ** 尝试用vc库代替git 35 | vc-git本身实现了很多git操作,可以复用这些操作而无需自己实现。 36 | ** gitalk替换评论系统 37 | ** water.css改配色 38 | ** 实现delete org file处理 39 | ** repo-dir切换到org branch前先用stash保存未提交内容,切回原branch后再unstash,这要比直接commit好 40 | 41 | * 使用方法 42 | 43 | ** 安装 44 | 可以从 [[http://melpa.milkbox.net/][melpa]] 安装,或者用 =git clone= 后处理。 45 | 46 | ** 设置 47 | 48 | 下面是 emacs-china 的设置,安装好 [[https://github.com/emacs-china/EGO][EGO]] 后,将该设置写入配置即可管理 emacs-china。 49 | 50 | CAUTION: 直接 clone emacs-china 后,需要 checkout master 和 source 后才能使用 emacs-china,否则会导致意外情况。 51 | 52 | #+BEGIN_SRC emacs-lisp 53 | ;; the following is only needed if you install EGO manually 54 | (add-to-list 'load-path "path/to/EGO") 55 | 56 | (require 'ego) 57 | 58 | (ego-add-to-alist 'ego-project-config-alist 59 | `(("emacs-china" ; 站点工程的名字 60 | :repository-directory "~/github/emacs-china.github.io" ; 站点的本地目录 61 | :site-domain "http://emacs-china.github.io/" ; 站点的网址 62 | :site-main-title "EMACS-CHINA" ; 站点的标题 63 | :site-sub-title "=============>集思广益" ; 站点的副标题 64 | :theme (default) ; 使用的主题 65 | :summary (("years" :year :updates 10) ("authors" :authors) ("tags" :tags)) ; 导航栏的设置,有 category 和 summary 两种 66 | :source-browse-url ("Github" "https://github.com/emacs-china") ; 你的工程源代码所在的位置 67 | :personal-disqus-shortname "emacs-china" ; 使用 disqus 评论功能的话,它的短名称 68 | ;; :personal-duoshuo-shortname "emacs-china" ; 使用 多说 评论功能的话,它的短名称(由于多说已经关闭,这里就此废置) 69 | :confound-email nil ; 是否保护邮件名称呢?t 是保护,nil 是不保护,默认是保护 70 | :ignore-file-name-regexp "readme.org" ; 有些不想发布成 html 的 org 文件(但是又想被导入 git 进行管理),可以用这种正则表达的方式排除 71 | :store-dir "~/webRoot/emacs-china.github.io" ; 本地测试的目录 72 | ) 73 | 74 | ;; 你可以在此添加更多的站点设置 75 | )) 76 | #+END_SRC 77 | 78 | TIP: 你可以仿照上面来设置自己的站点。 79 | 80 | 你可以通过以下方式发现 EGO 的设置方法(英文) 81 | 82 | #+BEGIN_EXAMPLE 83 | C-h v ego-project-config-alist 84 | C-h v ego-config-fallback 85 | #+END_EXAMPLE 86 | 87 | ** 新建 Repository 88 | 通过以下方式创建新的 Repository(也就是一个新站点了): 89 | 90 | #+BEGIN_EXAMPLE 91 | M-x ego-new-repository 92 | #+END_EXAMPLE 93 | 94 | 这种方式只能进行一个初级的设置,要想让它正常工作,还是需要设置 =ego-project-config-alist= 变量。 95 | 96 | ** 新建文章 97 | 用以下方式创建新文章: 98 | 99 | #+BEGIN_EXAMPLE 100 | M-x ego-new-post 101 | #+END_EXAMPLE 102 | 103 | ** 测试单独文章的 html 页面 104 | 使用以下命令可以生成当前 org 文件所对应的 html 文件,并浏览: 105 | 106 | #+BEGIN_EXAMPLE 107 | M-x ego-test-current-page 108 | #+END_EXAMPLE 109 | 110 | ** 发布 111 | 用以下命令生成 html 文件,并按需传送到远程端: 112 | 113 | #+BEGIN_EXAMPLE 114 | M-x ego-do-publication 115 | #+END_EXAMPLE 116 | 117 | 这条命令会问你如下几个问题: 118 | 1) Which project do you want to publish? \\ 119 | ~ *发布哪个站点?* 120 | 2) Choose a job from the jobs below: \\ 121 | ~ "1. Test partial publish" \\ 122 | ~ "2. Partial publish" \\ 123 | ~ "3. Test full publish" \\ 124 | ~ "4. Full publish" \\ 125 | ~ *从以下四个选项里选择一种发布方式:* \\ 126 | ~ "1. 增量发布测试" \\ 127 | ~ "2. 增量发布" \\ 128 | ~ "3. 完全发布测试" \\ 129 | ~ "4. 完全发布" \\ 130 | ~ 测试即意味着发布到 store-dir 文件夹下用 emacs 自带的 web server 查看,是本地的并不传送到远端。 131 | 3) (when (2) is partial) Base git commit: HEAD~1 ? \\ 132 | ~ *将哪些提交视为改变文件?(当第三项选了带了 “partial” 字符串时出现的选项,不懂得话回车即可)* 133 | 4) Input checkin messages. (The message won't be inputted if you have checkined before.) \\ 134 | ~ *输入 checkin 信息,了解 git 的话应该知道* 135 | 5) (when (2) is not "test") There will be some questions for "publish-config" \\ 136 | ~ *对发布到远端的设置进行具体询问(在第二项没有 “test” 字符串时出现)* 137 | 138 | *注意*: 当进行没测试过的发布时,任何未经测试的内容变化都不会被发布。也即,任何内容变化在真正发布之前必须经过测试发布。 139 | 140 | 你可以在 *message* buffer 和 *EGO OUTPUT* buffer 里跟踪整个过程。 141 | 142 | ** 异步发布 143 | 你可以使用 =async.el= 包来包裹 =ego-do-publication= 命令,使得该命令异步执行。 144 | 145 | 关于 =async.el= 包的用法可以参看这里(英文) : [[https://github.com/jwiegley/emacs-async][Async]]. 146 | 147 | 这里是一个例子: (你当然不能直接使用它,但是可以参考它进行自己的设置,就当是一个使用 async 的作业吧) 148 | 149 | #+BEGIN_SRC emacs-lisp 150 | (require 'ego) 151 | (require 'async) 152 | (defun ego-async-do-publish (&optional project-name 153 | test-and-not-publish 154 | force-all 155 | base-git-commit 156 | checkin-all 157 | publish-config) 158 | (interactive 159 | (let* ((j (or ego--default-project-name 160 | (completing-read "Which project do you want to publish? " 161 | (delete-dups 162 | (mapcar 'car ego-project-config-alist)) 163 | nil t nil nil ego--last-project-name))) 164 | (p (y-or-n-p "Action: [Yes] Test, [No] Tested Publish. ")) 165 | (f (y-or-n-p (format "Publish all org files of \"%s\" project? " j))) 166 | (b (unless f (read-string "Base git commit: " "HEAD~1"))) 167 | (c (read-string "checkin message (won't show in 'git log' if you have committed all): ")) 168 | (a nil)) 169 | (list j p f b c a))) 170 | ;; set ego remote push (publish-config) 171 | (unless test-and-not-publish 172 | (setq ego--current-project-name project-name) 173 | (setq ego--last-project-name project-name) 174 | (setq publish-config 175 | (ego--git-get-publish-config (ego--get-repository-directory) 176 | (ego--get-config-option :repository-org-branch) 177 | (ego--get-config-option :repository-html-branch)))) 178 | 179 | (message "See *EGO OUTPUT* buffer and *emacs* buffer for information") 180 | (async-start 181 | `(lambda () 182 | ;; load packages and set load-path 183 | (setq package-user-dir ,(expand-file-name "~/.emacs.d/elpa/")) 184 | (package-initialize) 185 | (add-to-list 'load-path ,(expand-file-name "~/github/org-mode/lisp")) 186 | (add-to-list 'load-path ,(expand-file-name "~/github/org-mode/contrib/lisp" t)) 187 | (add-to-list 'load-path ,ego-load-directory) 188 | 189 | ;;set color-theme 190 | (add-to-list 'load-path ,(expand-file-name "~/.emacs.d/color-theme-6.6.0")) 191 | (require 'color-theme-autoloads "color-theme-autoloads") 192 | (color-theme-initialize) 193 | (color-theme-dark-blue2) 194 | 195 | ;; set coding-system 196 | (set-terminal-coding-system 'utf-8-unix) 197 | (set-keyboard-coding-system 'utf-8-unix) 198 | (prefer-coding-system 'utf-8-unix) 199 | (setq save-buffer-coding-system 'utf-8-unix 200 | coding-system-for-write 'utf-8-unix) 201 | 202 | ;; pre-set ego configurations 203 | (require 'cl-lib) 204 | (require 'ego) 205 | (setq ego-project-config-alist ',ego-project-config-alist) 206 | 207 | ;; Make EGO show svg images 208 | (require 'ox-html) 209 | (defun kd/org-html--format-image (source attributes info) 210 | "Return \"img\" tag with given SOURCE and ATTRIBUTES. 211 | SOURCE is a string specifying the location of the image. 212 | ATTRIBUTES is a plist, as returned by 213 | `org-export-read-attribute'. INFO is a plist used as 214 | a communication channel." 215 | (org-html-close-tag 216 | "img" 217 | (org-html--make-attribute-string 218 | (org-combine-plists 219 | (list :src source 220 | :alt (if (string-match-p "^ltxpng/" source) 221 | (org-html-encode-plain-text 222 | (org-find-text-property-in-string 'org-latex-src source)) 223 | (file-name-nondirectory source))) 224 | attributes)) 225 | info)) 226 | (advice-add 'org-html--format-image :override #'kd/org-html--format-image) 227 | 228 | ;; without org-to-html if possible 229 | (unless ,test-and-not-publish 230 | (if ,base-git-commit 231 | (setq ego--publish-without-org-to-html 1) 232 | (setq ego--publish-without-org-to-html 2))) 233 | 234 | ;; ego-do-publication here 235 | (ego-do-publication ,project-name 236 | ,test-and-not-publish 237 | ,force-all 238 | ,base-git-commit 239 | ,checkin-all 240 | ',publish-config) 241 | 242 | ;; waiting for push remote success or just wait http-server in which case you have to close *emacs* buffer manually 243 | (while (not ego--async-publish-success) 244 | (sit-for 1)) 245 | 246 | ;; return the result 247 | (with-current-buffer (get-buffer-create ,ego--temp-buffer-name) 248 | (buffer-string)) 249 | ) 250 | `(lambda (result) 251 | (with-current-buffer (get-buffer-create ego--temp-buffer-name) 252 | (insert (format "*EGO output* should be :\n %s \nego-async-do-publish done!" result)))))) 253 | #+END_SRC 254 | 255 | 你可以在 *emacs* buffer 和 *EGO OUTPUT* buffer 里跟踪整个过程。 256 | 257 | * 依赖 258 | 259 | 1. [[http://www.gnu.org/software/emacs/][emacs]]: this is an "of-course" dependency, "version >= 24.5" is required. 260 | 2. [[http://orgmode.org/][org mode]]: v8.0 is required, please use =M-x org-version = to make sure you org mode version is not less than 8.0 261 | 3. [[http://git-scm.com][git]]: a free and open source version control system 262 | 4. [[https://github.com/Wilfred/mustache.el][mustache.el]]: a mustache templating library for Emacs 263 | 5. [[http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi][htmlize.el]]: a library for syntax highlighting (usually this library is shipped with emacs) 264 | 6. [[https://github.com/magnars/dash.el][dash.el]]: a modern list library for Emacs 265 | 7. [[https://github.com/Wilfred/ht.el][ht.el]]: a modern hash-table library for Emacs 266 | 267 | * Known issues 268 | - *CAUTION* when there are opened directories in the repository (which 269 | don't contain the repository itself), =ego--git-change-branch= will 270 | mess up the files in the repository. So, close all opened directories 271 | in the repository before =ego-do-publication= . 272 | 273 | * Roadmap [7/10] 274 | 275 | 276 | - [X] 不保存上一次发布的项目 277 | - [X] 用另一个单独的目录存储html结果 278 | - [X] 发布前先git pull同步一次上游仓库 279 | - [X] 去掉Emacs中的静态web服务 280 | - [ ] 根据修改的内容增量更新tag文件 281 | - [ ] 尝试用vc库代替git 282 | - [X] gitalk替换评论系统 283 | - [ ] water.css改配色 284 | - [X] 实现delete org file处理 285 | - [X] repo-dir切换到org branch前先用stash保存未提交内容,切回原branch后再unstash,这要比直接commit好 286 | 287 | * FAQ 288 | ** 为什么没有发布那些包含中文的 org 文件? 289 | 请在 repo 目录下手工执行 src_sh{git ls-tree -r --name-only HEAD}, 若发现所有的中文都显示成乱码,那么请执行 290 | #+BEGIN_SRC sh 291 | git config --global core.quotepath false 292 | #+END_SRC 293 | 之后,再重新发布。 294 | -------------------------------------------------------------------------------- /about.org: -------------------------------------------------------------------------------- 1 | #+TITLE: EGO 项目说明 2 | #+AUTHOR: 皐月中二 3 | #+EMAIL: kuangdash@163.com 4 | 5 | #+URI: /about/ 6 | #+LANGUAGE: en 7 | #+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t 8 | #+DESCRIPTION: aboutMe 9 | 10 | *EGO* 目前是 [[http://emacs-china.github.io][emacs-china]] 在 github 上的静态站点生成器,同时也可以作为个人站点的静态站点生成器被使用,并且可以作为项目主页的静态站点生成器,支持多站点的管理,依赖于 [[http://www.gnu.org/software/emacs][Emacs]] 、[[http://git-scm.com][Git]] 和 [[http://orgmode.org/][Org-mode]] 这三样神器。 11 | 12 | 有兴趣可以尝试修改 *EGO* 的 default 主题,创造一个属于你自己的静态站点: 13 | 14 | #+BEGIN_CENTER 15 | *Powered by EGO* ! 16 | #+END_CENTER 17 | 18 | 19 | -------------------------------------------------------------------------------- /ego-pkg.el: -------------------------------------------------------------------------------- 1 | (define-package 2 | "ego" "0.9" 3 | "a static site generator based on org mode, forked from org-page." 4 | '((emacs "24.5") 5 | (ht "1.5") 6 | (mustache "0.22") 7 | (htmlize "1.47") 8 | (org "8.0") 9 | (dash "2.0.0"))) 10 | -------------------------------------------------------------------------------- /ego-resource.el: -------------------------------------------------------------------------------- 1 | ;;; ego-resource.el --- Functions dealing with ego theme resources 2 | 3 | ;; Copyright (C) 2015 Feng Shu, Kuangdash 4 | ;; 2012, 2013, 2014, 2015 Kelvin Hu 5 | 6 | ;; Author: Kelvin Hu 7 | ;; Feng Shu 8 | ;; Kuangdash 9 | ;; Keywords: org-mode, convenience, beautify 10 | ;; Homepage: https://github.com/emacs-china/EGO 11 | 12 | ;; This program is free software; you can redistribute it and/or modify 13 | ;; it under the terms of the GNU General Public License as published by 14 | ;; the Free Software Foundation, either version 3 of the License, or 15 | ;; (at your option) any later version. 16 | 17 | ;; This program is distributed in the hope that it will be useful, 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ;; GNU General Public License for more details. 21 | 22 | ;; You should have received a copy of the GNU General Public License 23 | ;; along with this program. If not, see . 24 | 25 | ;;; Commentary: 26 | 27 | ;; This file include functions which deal with ego theme resources 28 | 29 | ;;; Code: 30 | 31 | (require 'format-spec) 32 | (require 'ox) 33 | (require 'ht) 34 | (require 'ego-util) 35 | (require 'ego-config) 36 | 37 | (defun ego--prepare-theme-resources (pub-root-dir) 38 | "Copy theme resources files to PUB-ROOT-DIR." 39 | (let ((pub-theme-dir (expand-file-name "media/" pub-root-dir)) 40 | (theme-dirs (reverse (ego--get-theme-dirs nil nil 'resources)))) 41 | (when (file-directory-p pub-theme-dir) 42 | (delete-directory pub-theme-dir t)) 43 | (dolist (theme-dir theme-dirs) 44 | (copy-directory theme-dir pub-theme-dir t t t)))) 45 | 46 | 47 | (provide 'ego-resource) 48 | 49 | ;;; ego-resource.el ends here 50 | -------------------------------------------------------------------------------- /ego-template.el: -------------------------------------------------------------------------------- 1 | ;;; ego-template.el --- templating system based on mustache, required by ego 2 | 3 | ;; Copyright (C) 2015 Feng Shu, Kuangdash 4 | ;; 2012, 2013, 2014, 2015 Kelvin Hu 5 | 6 | ;; Author: Kelvin Hu 7 | ;; Feng Shu 8 | ;; Kuangdash 9 | ;; Keywords: org-mode, convenience, beautify 10 | ;; Homepage: https://github.com/emacs-china/EGO 11 | 12 | ;; This program is free software; you can redistribute it and/or modify 13 | ;; it under the terms of the GNU General Public License as published by 14 | ;; the Free Software Foundation, either version 3 of the License, or 15 | ;; (at your option) any later version. 16 | 17 | ;; This program is distributed in the hope that it will be useful, 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ;; GNU General Public License for more details. 21 | 22 | ;; You should have received a copy of the GNU General Public License 23 | ;; along with this program. If not, see . 24 | 25 | ;;; Commentary: 26 | 27 | ;; templating system based on mustache.el, to replace `format-spec'. 28 | 29 | ;;; Code: 30 | 31 | (require 'ox) 32 | ;; (require 'mustache) 33 | (autoload 'mustache-render "mustache") 34 | (require 'ego-util) 35 | (require 'ego-config) 36 | (require 'ego-git) 37 | 38 | 39 | (defun ego--get-template-file (template-file-name) 40 | "Get path of template file which name is `template-file-name'." 41 | (car (remove nil (mapcar 42 | (lambda (dir) 43 | (let ((file (concat (file-name-as-directory dir) 44 | template-file-name))) 45 | (when (file-exists-p file) 46 | file))) 47 | (ego--get-theme-dirs nil nil 'templates))))) 48 | 49 | (defun ego--get-title () 50 | "Get the title of org file." 51 | (or (ego--read-org-option "TITLE") 52 | (file-name-sans-extension (buffer-name)))) 53 | 54 | (defun ego--get-category (&optional org-file) 55 | "Get org file category presented by ORG-FILE, return all categories if 56 | ORG-FILE is nil. " 57 | (let ((func (ego--get-config-option :retrieve-category-function))) 58 | (if (functionp func) 59 | (funcall func org-file) 60 | (funcall 'ego--get-file-category org-file)))) 61 | 62 | (defun ego--get-cache-item (key) 63 | "Get the item associated with KEY in `ego--item-cache', if `ego--item-cache' is 64 | nil or there is no item associated with KEY in it, return nil." 65 | (and ego--item-cache 66 | (plist-get ego--item-cache key))) 67 | 68 | (defun ego--update-cache-item (key value) 69 | "Update the item associated with KEY in `ego--item-cache', if `ego--item-cache' is 70 | nil, initialize it." 71 | (if ego--item-cache 72 | (plist-put ego--item-cache key value) 73 | (setq ego--item-cache `(,key ,value))) 74 | value) 75 | 76 | (defmacro ego--get-cache-create (key &rest body) 77 | "Firstly get item from `ego--item-cache' with KEY, if item not found, evaluate 78 | BODY and push the result into cache and return it." 79 | `(or (ego--get-cache-item ,key) 80 | (ego--update-cache-item ,key (funcall (lambda () ,@body))))) 81 | 82 | (defun ego--render-header (&optional param-table) 83 | "Render the header on each page. PARAM-TABLE is the hash table from mustache 84 | to render the template. If it is not set or nil, this function will try to build 85 | a hash table accordint to current buffer." 86 | (mustache-render 87 | (ego--get-cache-create 88 | :header-template 89 | (message "EGO: Read header.mustache from file") 90 | (ego--file-to-string (ego--get-template-file "header.mustache"))) 91 | (or param-table 92 | (ht ("page-title" (concat (funcall (ego--get-config-option :get-title-function)) 93 | " - " (ego--get-config-option :site-main-title))) 94 | ("author" (or (ego--read-org-option "AUTHOR") 95 | user-full-name "Unknown Author")) 96 | ("description" (ego--read-org-option "DESCRIPTION")) 97 | ("keywords" (ego--read-org-option "TAGS")))))) 98 | 99 | (defun ego-get-category-show-list () 100 | (or ego--category-show-list 101 | (setq ego--category-show-list 102 | (sort (cl-remove-if 103 | (lambda (cat) 104 | (or (string= cat "index") 105 | (string= cat "about") 106 | (not (plist-get (cdr (or (assoc cat ego--category-config-alist) 107 | (ego--get-category-setting (ego--get-config-option :default-category)))) 108 | :category-index)))) 109 | (ego--get-category nil)) 110 | 'string-lessp)))) 111 | 112 | (defun ego--render-navigation-bar (&optional param-table) 113 | "Render the navigation bar on each page. it will be read firstly from 114 | `ego--item-cache', if there is no cached content, it will be rendered 115 | and pushed into cache from template. PARAM-TABLE is the hash table for mustache 116 | to render the template. If it is not set or nil, this function will try to 117 | render from a default hash table." 118 | (let ((site-domain (ego--get-site-domain)) 119 | (cat-real nil)) 120 | (ego--get-cache-create 121 | :nav-bar-html 122 | (message "EGO: Render navigation bar from template") 123 | (mustache-render 124 | (ego--get-cache-create 125 | :nav-bar-template 126 | (message "EGO: Read nav.mustache from file") 127 | (ego--file-to-string (ego--get-template-file "nav.mustache"))) 128 | (or param-table 129 | (ht ("site-main-title" (ego--get-config-option :site-main-title)) 130 | ("site-sub-title" (ego--get-config-option :site-sub-title)) 131 | ("nav-categories" 132 | (mapcar 133 | (lambda (cat) 134 | (ht ("category-uri" 135 | (concat "/" (ego--encode-string-to-url cat) "/")) 136 | ("category-name" (capitalize cat)))) 137 | (ego-get-category-show-list))) 138 | ("nav-summary" 139 | (mapcar 140 | (lambda (cat) 141 | (if (equal cat (caar (-filter (lambda (element) (equal :tags (cadr element))) 142 | (ego--get-config-option :summary)))) 143 | (setq cat-real "tags") 144 | (setq cat-real cat)) 145 | (ht ("summary-item-uri" 146 | (concat "/" (ego--encode-string-to-url cat-real) "/")) 147 | ("summary-item-name" (capitalize cat)))) 148 | (mapcar #'car (ego--get-config-option :summary)))) 149 | ("nav-source-browse" 150 | (let ((list (ego--get-config-option :source-browse-url))) 151 | (when list 152 | (ht ("source-browse-name" (car list)) 153 | ("source-browse-uri" (car (cdr list))))))) 154 | ("nav-about" 155 | (let ((list (ego--get-config-option :about))) 156 | (when list 157 | (ht ("about-name" (car list)) 158 | ("about-uri" (car (cdr list))))))) 159 | ("nav-rss" 160 | (let ((list (ego--get-config-option :rss))) 161 | (when list 162 | (ht ("rss-name" (car list)) 163 | ("rss-uri" (car (cdr list))))))) 164 | ("avatar" (ego--get-config-option :personal-avatar)) 165 | ("site-domain" (if (string-match 166 | "\\`https?://\\(.*[a-zA-Z]\\)/?\\'" 167 | site-domain) 168 | (match-string 1 site-domain) 169 | site-domain)))))))) 170 | 171 | (defun ego--render-content (&optional template param-table) 172 | "Render the content on each page. TEMPLATE is the template name for rendering, 173 | if it is not set of nil, will use default post.mustache instead. PARAM-TABLE is 174 | similar to `ego--render-header'." 175 | (mustache-render 176 | (ego--get-cache-create 177 | (if template 178 | (intern (replace-regexp-in-string "\\.mustache$" "-template" template)) 179 | :post-template) 180 | (message (concat "Read " (or template "post.mustache") " from file")) 181 | (ego--file-to-string (ego--get-template-file 182 | (or template "post.mustache")))) 183 | (or param-table 184 | (ht ("title" (funcall (ego--get-config-option :get-title-function))) 185 | ("content" (cl-flet ((org-html-fontify-code 186 | (code lang) 187 | (when code (org-html-encode-plain-text code)))) 188 | (let ((org-export-function (ego--get-config-option :org-export-function))) 189 | (when (functionp org-export-function) 190 | (funcall org-export-function))))))))) 191 | 192 | (defun ego--default-org-export () 193 | "A function with can export org file to html." 194 | (org-export-as 'html nil nil t nil)) 195 | 196 | (defun ego--render-footer (&optional param-table) 197 | "Render the footer on each page. PARAM-TABLE is similar to 198 | `ego--render-header'." 199 | (mustache-render 200 | (ego--get-cache-create 201 | :footer-template 202 | (message "EGO: Read footer.mustache from file") 203 | (ego--file-to-string (ego--get-template-file "footer.mustache"))) 204 | (or param-table 205 | (let* ((filename (buffer-file-name)) 206 | (title (funcall (ego--get-config-option :get-title-function))) 207 | (default-category (ego--get-config-option :default-category)) 208 | (date (ego--fix-timestamp-string 209 | (or (ego--read-org-option "DATE") 210 | (format-time-string "%Y-%m-%d")))) 211 | (tags (ego--read-org-option "TAGS")) 212 | (tags (if tags 213 | (mapcar 214 | (lambda (tag-name) 215 | (ht ("link" (ego--generate-summary-uri "tags" tag-name)) 216 | ("name" tag-name))) 217 | (delete "" (mapcar 'string-trim (split-string tags "[:,]+" t)))))) 218 | (category (ego--get-category filename)) 219 | (config (cdr (or (assoc category ego--category-config-alist) 220 | (ego--get-category-setting default-category)))) 221 | (uri (funcall (plist-get config :uri-generator) 222 | (plist-get config :uri-template) date title))) 223 | (ht ("show-meta" (plist-get config :show-meta)) 224 | ("show-comment" (plist-get config :show-comment)) 225 | ("date" date) 226 | ("mod-date" (if (not filename) 227 | (format-time-string "%Y-%m-%d") 228 | (or (ego-git-last-change-date 229 | (ego--get-repository-directory) 230 | filename) 231 | (format-time-string 232 | "%Y-%m-%d" 233 | (nth 5 (file-attributes filename)))))) 234 | ("tags" tags) 235 | ("tag-links" (if (not tags) "N/A" 236 | (mapconcat 237 | (lambda (tag) 238 | (mustache-render 239 | "{{name}}" tag)) 240 | tags " : "))) 241 | ("author" (or (ego--read-org-option "AUTHOR") 242 | user-full-name 243 | "Unknown Author")) 244 | ("disqus-id" uri) 245 | ("disqus-url" (ego--get-full-url uri)) 246 | ("disqus-comment" (ego--get-config-option :personal-disqus-shortname)) 247 | ("disqus-shortname" (ego--get-config-option :personal-disqus-shortname)) 248 | ("duoshuo-comment" (ego--get-config-option :personal-duoshuo-shortname)) 249 | ("duoshuo-shortname" (ego--get-config-option :personal-duoshuo-shortname)) 250 | ("google-analytics" (ego--get-config-option :personal-google-analytics-id)) 251 | ("google-analytics-id" (ego--get-config-option :personal-google-analytics-id)) 252 | ("creator-info" (ego--get-html-creator-string)) 253 | ("email" (ego--confound-email-address (or (ego--read-org-option "EMAIL") 254 | user-mail-address 255 | "Unknown Email")))))))) 256 | 257 | 258 | (provide 'ego-template) 259 | 260 | ;;; ego-template.el ends here 261 | -------------------------------------------------------------------------------- /ego-util.el: -------------------------------------------------------------------------------- 1 | ;;; ego-util.el --- Common utility functions required by ego 2 | 3 | ;; Copyright (C) 2015 Feng Shu, Kuangdash 4 | ;; 2012, 2013, 2014, 2015 Kelvin Hu 5 | 6 | ;; Author: Kelvin Hu 7 | ;; Feng Shu 8 | ;; Kuangdash 9 | ;; Keywords: org-mode, convenience, beautify 10 | ;; Homepage: https://github.com/emacs-china/EGO 11 | 12 | ;; This program is free software; you can redistribute it and/or modify 13 | ;; it under the terms of the GNU General Public License as published by 14 | ;; the Free Software Foundation, either version 3 of the License, or 15 | ;; (at your option) any later version. 16 | 17 | ;; This program is distributed in the hope that it will be useful, 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | ;; GNU General Public License for more details. 21 | 22 | ;; You should have received a copy of the GNU General Public License 23 | ;; along with this program. If not, see . 24 | 25 | ;;; Commentary: 26 | 27 | ;; ego-util.el contains several utility functions 28 | 29 | ;;; Code: 30 | 31 | (require 'ht) 32 | (require 'ego-config) 33 | (require 'cl-lib) 34 | 35 | (defun ego--compare-standard-date (date1 date2) 36 | "Compare two standard ISO 8601 format dates, format is as below: 37 | 2012-08-17 38 | 1. if date1 is earlier than date2, returns 1 39 | 2. if equal, returns 0 40 | 3. if date2 is earlier than date1, returns -1" 41 | (let* ((date-list1 (parse-time-string date1)) 42 | (year1 (nth 5 date-list1)) 43 | (month1 (nth 4 date-list1)) 44 | (day1 (nth 3 date-list1)) 45 | (date-list2 (parse-time-string date2)) 46 | (year2 (nth 5 date-list2)) 47 | (month2 (nth 4 date-list2)) 48 | (day2 (nth 3 date-list2))) 49 | (cond ((< year1 year2) 1) 50 | ((> year1 year2) -1) 51 | (t (cond ((< month1 month2) 1) 52 | ((> month1 month2) -1) 53 | (t (cond ((< day1 day2) 1) 54 | ((> day1 day2) -1) 55 | (t 0)))))))) 56 | 57 | (defun ego--fix-timestamp-string (date-string) 58 | "This is a piece of code copied from Xah Lee (I modified a little): 59 | Returns yyyy-mm-dd format of date-string 60 | For examples: 61 | [Nov. 28, 1994] => [1994-11-28] 62 | [November 28, 1994] => [1994-11-28] 63 | [11/28/1994] => [1994-11-28] 64 | Any \"day of week\", or \"time\" info, or any other parts of the string, are 65 | discarded. 66 | Code detail: URL `http://xahlee.org/emacs/elisp_parse_time.html'" 67 | (let ((date-str (string-trim date-string)) 68 | date-list year month date yyyy mm dd) 69 | (cond 70 | ;; USA convention of mm/dd/yyyy 71 | ((string-match 72 | "^\\([0-9][0-9]\\)/\\([0-9][0-9]\\)/\\([0-9][0-9][0-9][0-9]\\)$" 73 | date-str) 74 | (concat (match-string 3 date-str) "-" (match-string 1 date-str) "-" 75 | (match-string 2 date-str))) 76 | ((string-match 77 | "^\\([0-9]\\)/\\([0-9][0-9]\\)/\\([0-9][0-9][0-9][0-9]\\)$" 78 | date-str) 79 | (concat (match-string 3 date-str) "-" (match-string 1 date-str) "-" 80 | (match-string 2 date-str))) 81 | ;; some ISO 8601. yyyy-mm-dd 82 | ((string-match 83 | "^\\([0-9][0-9][0-9][0-9]\\)-\\([0-9][0-9]\\)-\\([0-9][0-9]\\)$\ 84 | T[0-9][0-9]:[0-9][0-9]" date-str) 85 | (concat (match-string 1 date-str) "-" (match-string 2 date-str) "-" 86 | (match-string 3 date-str))) 87 | ((string-match 88 | "^\\([0-9][0-9][0-9][0-9]\\)-\\([0-9][0-9]\\)-\\([0-9][0-9]\\)$" 89 | date-str) 90 | (concat (match-string 1 date-str) "-" (match-string 2 date-str) "-" 91 | (match-string 3 date-str))) 92 | ((string-match "^\\([0-9][0-9][0-9][0-9]\\)-\\([0-9][0-9]\\)$" date-str) 93 | (concat (match-string 1 date-str) "-" (match-string 2 date-str))) 94 | ((string-match "^\\([0-9][0-9][0-9][0-9]\\)$" date-str) 95 | (match-string 1 date-str)) 96 | (t (progn 97 | ;; 兼容 2018年 07月 20日 星期五 18:15:29 CST 这种格式 98 | (setq date-str 99 | (replace-regexp-in-string "年 " "-" date-str)) 100 | (setq date-str 101 | (replace-regexp-in-string "月 " "-" date-str)) 102 | (setq date-str 103 | (replace-regexp-in-string "January " "Jan. " date-str)) 104 | (setq date-str 105 | (replace-regexp-in-string "February " "Feb. " date-str)) 106 | (setq date-str 107 | (replace-regexp-in-string "March " "Mar. " date-str)) 108 | (setq date-str 109 | (replace-regexp-in-string "April " "Apr. " date-str)) 110 | (setq date-str 111 | (replace-regexp-in-string "May " "May. " date-str)) 112 | (setq date-str 113 | (replace-regexp-in-string "June " "Jun. " date-str)) 114 | (setq date-str 115 | (replace-regexp-in-string "July " "Jul. " date-str)) 116 | (setq date-str 117 | (replace-regexp-in-string "August " "Aug. " date-str)) 118 | (setq date-str 119 | (replace-regexp-in-string "September " "Sep. " date-str)) 120 | (setq date-str 121 | (replace-regexp-in-string "October " "Oct. " date-str)) 122 | (setq date-str 123 | (replace-regexp-in-string "November " "Nov. " date-str)) 124 | (setq date-str 125 | (replace-regexp-in-string "December " "Dec. " date-str)) 126 | (setq date-str 127 | (replace-regexp-in-string " 1st," " 1" date-str)) 128 | (setq date-str 129 | (replace-regexp-in-string " 2nd," " 2" date-str)) 130 | (setq date-str 131 | (replace-regexp-in-string " 3rd," " 3" date-str)) 132 | (setq date-str 133 | (replace-regexp-in-string "\\([0-9]\\)th," "\\1" date-str)) 134 | (setq date-str 135 | (replace-regexp-in-string " 1st " " 1 " date-str)) 136 | (setq date-str 137 | (replace-regexp-in-string " 2nd " " 2 " date-str)) 138 | (setq date-str 139 | (replace-regexp-in-string " 3rd " " 3 " date-str)) 140 | (setq date-str 141 | (replace-regexp-in-string "\\([0-9]\\)th " "\\1 " date-str)) 142 | (setq date-list (parse-time-string date-str)) 143 | (setq year (nth 5 date-list)) 144 | (setq month (nth 4 date-list)) 145 | (setq date (nth 3 date-list)) 146 | (setq yyyy (number-to-string year)) 147 | (setq mm (if month (format "%02d" month) "")) 148 | (setq dd (if date (format "%02d" date) "")) 149 | (concat yyyy "-" mm "-" dd)))))) 150 | 151 | (defun ego--confound-email-address (email) 152 | "Confound email to prevent spams using simple rule: 153 | replace . with , @ with , e.g. 154 | name@domain.com => name domain com" 155 | (if (not (ego--get-config-option :confound-email)) email 156 | (replace-regexp-in-string 157 | " +" " " (replace-regexp-in-string 158 | "@" " " (replace-regexp-in-string "\\." " " email))))) 159 | 160 | 161 | (defun ego--encode-string-to-url (string) 162 | "Encode STRING to legal URL. Why we do not use `url-encode-url' to encode the 163 | string, is that `url-encode-url' will convert all not allowed characters into 164 | encoded ones, like %3E, but we do NOT want this kind of url." 165 | (downcase (replace-regexp-in-string "[ :/\\\\?\\#]+" "-" string))) 166 | 167 | (defun ego--get-full-url (uri) 168 | "Get the full url of URI, by joining site-domain with URI." 169 | (concat (replace-regexp-in-string "/?$" "" (ego--get-site-domain)) uri)) 170 | 171 | (defun ego--file-to-string (file) 172 | "Read the content of FILE and return it as a string." 173 | (with-temp-buffer 174 | (insert-file-contents file) 175 | (buffer-string))) 176 | 177 | (defun ego--string-to-file (string file &optional mode) 178 | "Write STRING into FILE, only when FILE is writable. If MODE is a valid major mode, format the string with MODE's format settings." 179 | (when (file-writable-p file) 180 | (with-temp-buffer 181 | (insert string) 182 | (set-buffer-file-coding-system 'utf-8-unix) 183 | (when (and mode (functionp mode)) 184 | (funcall mode) 185 | (flush-lines "^[ \\t]*$" (point-min) (point-max)) 186 | (delete-trailing-whitespace (point-min) (point-max)) 187 | (indent-region (point-min) (point-max))) 188 | (write-region (point-min) (point-max) file)))) 189 | 190 | (defun ego--relative-url-to-absolute (html-content) 191 | "Force convert relative url of `html-content' to absolute url." 192 | (let ((site-domain (ego--get-site-domain)) 193 | url) 194 | (with-temp-buffer 195 | (insert html-content) 196 | (goto-char (point-min)) 197 | (while (re-search-forward 198 | ;;; TODO: not only links need to convert, but also inline 199 | ;;; images, may add others later 200 | ;; "]+href=\"\\([^\"]+\\)\"[^>]*>\\([^<]*\\)" nil t) 201 | "\\(<[a-zA-Z]+[^/>]+\\)\\(src\\|href\\)\\(=\"\\)\\([^\"]+\\)\\(\"[^>]*>\\)" nil t) 202 | (setq url (match-string 4)) 203 | (when (string-prefix-p "/" url) 204 | (setq url (concat 205 | (match-string 1) 206 | (match-string 2) 207 | (match-string 3) 208 | site-domain url 209 | (match-string 5))) 210 | (replace-match url))) 211 | (buffer-string)))) 212 | 213 | (defun ego--absolute-url-to-relative (html-content file-path) 214 | "Force convert relative url of `html-content' to absolute url." 215 | (let ((store-dir (file-name-as-directory (ego--get-config-option :store-dir))) 216 | (file-dir (file-name-directory (expand-file-name file-path))) 217 | url) 218 | (with-temp-buffer 219 | (insert html-content) 220 | (goto-char (point-min)) 221 | (while (re-search-forward 222 | ;;; TODO: not only links need to convert, but also inline 223 | ;;; images, may add others later 224 | ;; "]+href=\"\\([^\"]+\\)\"[^>]*>\\([^<]*\\)" nil t) 225 | "\\(<[a-zA-Z]+[^/>]+\\)\\(src\\|href\\)\\(=\"\\)\\([^\"]+\\)\\(\"[^>]*>\\)" nil t) 226 | (setq url (match-string 4)) 227 | (when (string-prefix-p "/" url) 228 | (let* ((url-in-store-path (concat store-dir (substring-no-properties url 1))) 229 | (relative-url (file-relative-name url-in-store-path file-dir)) 230 | (link (concat 231 | (match-string 1) 232 | (match-string 2) 233 | (match-string 3) 234 | relative-url 235 | (match-string 5)))) 236 | (replace-match link)))) 237 | (buffer-string)))) 238 | 239 | (defun ego--html-link-transformer (content file) 240 | "Transform links in the CONTENT." 241 | (if (ego--get-config-option :force-absolute-url) 242 | (ego--relative-url-to-absolute content) 243 | (ego--absolute-url-to-relative content file))) 244 | 245 | (defun ego--save-to-file (content file) 246 | "Save CONTENT into a html FILE, only when FILE is writable. Maybe do some transformation with the links. 247 | 248 | If MODE is a valid major mode, format the string with MODE's format settings." 249 | (let* ((case-fold-search t) 250 | (file (expand-file-name file)) 251 | (mode (and (string-match-p "html" (file-name-extension file)) 252 | 'html))) 253 | (ego--string-to-file 254 | (ego--html-link-transformer content file) 255 | file mode))) 256 | 257 | (defun ego--convert-plist-to-hashtable (plist) 258 | "Convert normal property list PLIST into hash table, keys of PLIST should be 259 | in format :key, and it will be converted into \"key\" in hash table. This is an 260 | alternative to `ht-from-plist'." 261 | (let ((h (ht-create))) 262 | (dolist (pair (ht/group-pairs plist) h) 263 | (let ((key (substring (symbol-name (car pair)) 1)) 264 | (value (cadr pair))) 265 | (ht-set h key value))))) 266 | 267 | (defun ego-add-to-alist (alist-var new-alist) 268 | "Add NEW-ALIST to the ALIST-VAR. 269 | If an element with the same key as the key of an element of 270 | NEW-ALIST is already present in ALIST-VAR, add the new values to 271 | it; if a matching element is not already present, append the new 272 | element to ALIST-VAR." 273 | ;; Loop over all elements of NEW-ALIST. 274 | (while new-alist 275 | (let* ((new-element (car new-alist)) 276 | ;; Get the element of ALIST-VAR with the same key of the current 277 | ;; element of NEW-ALIST, if any. 278 | (old-element (assoc (car new-element) (symbol-value alist-var)))) 279 | (if old-element 280 | (progn 281 | (set alist-var (delete old-element (symbol-value alist-var))) 282 | ;; Append to `old-element' the values of the current element of 283 | ;; NEW-ALIST. 284 | (mapc (lambda (elt) (add-to-list 'old-element elt t)) 285 | (cdr new-element)) 286 | (set alist-var (add-to-list alist-var old-element t))) 287 | (add-to-list alist-var new-element t))) 288 | ;; Next element of NEW-ALIST. 289 | (setq new-alist (cdr new-alist)))) 290 | 291 | (defun ego--completing-read-multiple (prompt choices &optional predicate require-match initial-input hist def sentinel) 292 | "Read multiple items with completing-read. Reading stops 293 | when the user enters SENTINEL. By default, SENTINEL is 294 | \"*done*\". SENTINEL is disambiguated with clashing completions 295 | by appending _ to SENTINEL until it becomes unique. So if there 296 | are multiple values that look like SENTINEL, the one with the 297 | most _ at the end is the actual sentinel value. See 298 | documentation for `completing-read' for details on the 299 | other parameters." 300 | (let 301 | ((sentinel (or sentinel 302 | "*done*")) 303 | (done-reading nil) 304 | (remain-choices choices) 305 | (res ())) 306 | 307 | ;; uniquify the SENTINEL value 308 | (while (cl-find sentinel choices) 309 | (setq sentinel (concat sentinel "_"))) 310 | (setq remain-choices (cons sentinel choices)) 311 | 312 | ;; read some choices 313 | (while (not done-reading) 314 | (let ((this-choice (completing-read prompt remain-choices predicate 315 | require-match initial-input hist def))) 316 | (if (equal this-choice sentinel) 317 | (setq done-reading t) 318 | (setq res (cons this-choice res)) 319 | (setq remain-choices (delete this-choice remain-choices))))) 320 | 321 | ;; return the result 322 | res 323 | )) 324 | 325 | (provide 'ego-util) 326 | 327 | ;;; ego-util.el ends here 328 | -------------------------------------------------------------------------------- /themes/DarkSun/readme.org: -------------------------------------------------------------------------------- 1 | 2 | * About 3 | The theme is created for a static sate generator: org-page --- which is served for [[http://emacs-china.github.io][emacs-china]]. 4 | 5 | * Introduction 6 | Referring to [[http://kuangdash.github.io/tags/org-page/][How to use org-page]] (written in chinese). 7 | -------------------------------------------------------------------------------- /themes/DarkSun/resources/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'SFPixelateBold'; 3 | src: url('/media/fonts/pixelated/SFPixelateBold.ttf') format('truetype'); 4 | font-weight: bold; 5 | font-style: normal; 6 | } 7 | @font-face { 8 | font-family: 'SFPixelateRegular'; 9 | src: url('/media/fonts/pixelated/SFPixelateRegular.ttf') format('truetype'); 10 | font-weight: normal; 11 | font-style: normal; 12 | } 13 | @font-face { 14 | font-family: 'SFPixelateShadedOblique'; 15 | src: url('/media/fonts/pixelated/SFPixelateShadedOblique.ttf') format('truetype'); 16 | font-weight: normal; 17 | font-style: italic; 18 | } 19 | @font-face { 20 | font-family: 'SFPixelateShadedBoldOblique'; 21 | src: url('/media/fonts/pixelated/SFPixelateShadedBoldOblique.ttf') format('truetype'); 22 | font-weight: bold; 23 | font-style: normal; 24 | } 25 | @font-face { 26 | font-family: 'SFPixelateShadedRegular'; 27 | src: url('/media/fonts/pixelated/SFPixelateShadedRegular.ttf') format('truetype'); 28 | font-weight: normal; 29 | font-style: normal; 30 | } 31 | @font-face { 32 | font-family: 'SFPixelateBoldOblique'; 33 | src: url('/media/fonts/pixelated/SFPixelateBoldOblique.ttf') format('truetype'); 34 | font-weight: bold; 35 | font-style: italic; 36 | } 37 | @font-face { 38 | font-family: 'SFPixelateShadedBold'; 39 | src: url('/media/fonts/pixelated/SFPixelateShadedBold.ttf') format('truetype'); 40 | font-weight: bold; 41 | font-style: normal; 42 | } 43 | @font-face { 44 | font-family: 'SFPixelateOblique'; 45 | src: url('/media/fonts/pixelated/SFPixelateOblique.ttf') format('truetype'); 46 | font-weight: normal; 47 | font-style: italic; 48 | } 49 | 50 | 51 | /* The following rules are deprecated. */ 52 | 53 | @font-face { 54 | font-family: 'SF Pixelate'; 55 | src: url('/media/fonts/pixelated/SFPixelateBold.ttf') format('truetype'); 56 | font-weight: bold; 57 | font-style: normal; 58 | } 59 | 60 | @font-face { 61 | font-family: 'SF Pixelate'; 62 | src: url('/media/fonts/pixelated/SFPixelateRegular.ttf') format('truetype'); 63 | font-weight: normal; 64 | font-style: normal; 65 | } 66 | 67 | @font-face { 68 | font-family: 'SF Pixelate Shaded'; 69 | src: url('/media/fonts/pixelated/SFPixelateShadedOblique.ttf') format('truetype'); 70 | font-weight: normal; 71 | font-style: italic; 72 | } 73 | 74 | @font-face { 75 | font-family: 'SF Pixelate Shaded'; 76 | src: url('/media/fonts/pixelated/SFPixelateShadedBoldOblique.ttf') format('truetype'); 77 | font-weight: bold; 78 | font-style: normal; 79 | } 80 | 81 | @font-face { 82 | font-family: 'SF Pixelate Shaded'; 83 | src: url('/media/fonts/pixelated/SFPixelateShadedRegular.ttf') format('truetype'); 84 | font-weight: normal; 85 | font-style: normal; 86 | } 87 | 88 | @font-face { 89 | font-family: 'SF Pixelate'; 90 | src: url('/media/fonts/pixelated/SFPixelateBoldOblique.ttf') format('truetype'); 91 | font-weight: bold; 92 | font-style: italic; 93 | } 94 | 95 | @font-face { 96 | font-family: 'SF Pixelate Shaded'; 97 | src: url('/media/fonts/pixelated/SFPixelateShadedBold.ttf') format('truetype'); 98 | font-weight: bold; 99 | font-style: normal; 100 | } 101 | 102 | @font-face { 103 | font-family: 'SF Pixelate'; 104 | src: url('/media/fonts/pixelated/SFPixelateOblique.ttf') format('truetype'); 105 | font-weight: normal; 106 | font-style: italic; 107 | } -------------------------------------------------------------------------------- /themes/DarkSun/resources/css/kdComment.css: -------------------------------------------------------------------------------- 1 | #comment-wrap {} 2 | /* #comment-wrap li { 3 | display: inline-block; 4 | } 5 | .comment-wrap li + li:before { 6 | display: inline-block; 7 | } 8 | */ 9 | #comment-wrap .disqus_label{ 10 | float:left; 11 | text-align:center; 12 | } 13 | 14 | #comment-wrap .ds-label{ 15 | float:right; 16 | text-align:center; 17 | } 18 | -------------------------------------------------------------------------------- /themes/DarkSun/resources/css/main.css: -------------------------------------------------------------------------------- 1 | /****************************************************** 2 | * I copied these styles from markdotto.com, who is 3 | * the creator of bootstrap, and I also did some 4 | * modification. Thanks Mark for the beautiful theme, 5 | * so I reserved the @mdo sign below. 6 | *****************************************************/ 7 | 8 | /* 9 | __ 10 | __ /\ \ 11 | /'_`\_ ___ ___ \_\ \ ___ 12 | /'/'_` \ /' __` __`\ /'_` \ / __`\ 13 | /\ \ \L\ \/\ \/\ \/\ \/\ \L\ \/\ \L\ \ 14 | \ \ `\__,_\ \_\ \_\ \_\ \___,_\ \____/ 15 | \ `\_____\\/_/\/_/\/_/\/__,_ /\/___/ 16 | `\/_____/ 17 | 18 | */ 19 | 20 | 21 | 22 | /* Body resets 23 | -------------------------------------------------- */ 24 | 25 | * { 26 | -webkit-box-sizing: border-box; 27 | -moz-box-sizing: border-box; 28 | box-sizing: border-box; 29 | } 30 | html, body { 31 | margin: 0; 32 | padding: 0; 33 | } 34 | html { 35 | font-size: 62.5%; 36 | } 37 | body { 38 | padding: 20px; 39 | font-family: "PT Sans","Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Microsoft YaHei",sans-serif; 40 | /*Menlo, Monaco, monospace*/ 41 | font-size: 14px; 42 | line-height: 1.5; 43 | color: #f0fff0; 44 | background-color: #10103f; 45 | } 46 | p { 47 | margin: 0 0 20px; 48 | } 49 | 50 | .title { 51 | margin-bottom: 20px; 52 | text-align: center; 53 | } 54 | h1 { 55 | font-size:20px; 56 | } 57 | h2, h3, h4 { 58 | font-size:18px; 59 | } 60 | h1, h2, h3, h4{ 61 | position: relative; 62 | margin: 30px 0 20px; 63 | font-weight: bold; 64 | line-height: 1.1; 65 | color: #ffaa00; 66 | text-rendering: optimizeLegibility; 67 | } 68 | h2:before, h3:before, h4:before { 69 | position: absolute; 70 | top: auto; 71 | color: #cfc; 72 | display: none; 73 | } 74 | h2:before { 75 | content: "*"; 76 | left: -1.25em; 77 | } 78 | h3:before { 79 | content: "**"; 80 | left: -2em; 81 | } 82 | h4:before { 83 | content: "***"; 84 | left: -2.5em; 85 | } 86 | i, em, b, strong { 87 | padding-left: .1em; 88 | padding-right: .1em; 89 | } 90 | b, strong { 91 | font-weight: bold; 92 | color: #00ffff; 93 | } 94 | b:before, b:after, strong:before, strong:after { 95 | content: "*"; 96 | } 97 | i:before, i:after, em:before, em:after { 98 | content: "/"; 99 | } 100 | hr { 101 | margin: 0; 102 | border: 0; 103 | border-bottom: 1px solid #e2e3e4; 104 | } 105 | 106 | ul, ol { 107 | padding: 0; 108 | margin: 0 0 20px; 109 | } 110 | code, pre { 111 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 112 | font-size: 0.9em; 113 | } 114 | .underline { 115 | text-decoration: underline; 116 | color: #3aff3a; 117 | } 118 | /* .underline:before, .underline:after { */ 119 | /* content: "_"; */ 120 | /* color: #3aff3a; */ 121 | /* } */ 122 | code { 123 | color: #d14; 124 | } 125 | /* code:before, code:after { */ 126 | /* content: "="; */ 127 | /* color: #cfc; */ 128 | /* } */ 129 | pre { 130 | display: block; 131 | margin: 0 0 14px; 132 | padding: 15px; 133 | border: 1px solid #e1e1e8; 134 | border-radius: 3px 3px 3px 3px; 135 | line-height: 28px; 136 | background-color: #000000; 137 | white-space: pre; 138 | white-space: pre-wrap; 139 | word-break: break-all; 140 | word-wrap: break-word; 141 | } 142 | pre.src { 143 | padding-top: 1.2em; 144 | position: relative; 145 | } 146 | pre.src:before { 147 | display: none; 148 | position: absolute; 149 | background-color: white; 150 | top: -18px; 151 | right: 10px; 152 | padding: 3px; 153 | border: 1px solid black; 154 | } 155 | pre.src:hover:before { 156 | display: inline; 157 | background-color: #000000; 158 | border: 1px solid #e1e1e8; 159 | } 160 | pre.src-sh:before { content: 'sh'; } 161 | pre.src-bash:before { content: 'sh'; } 162 | pre.src-emacs-lisp:before { content: 'Emacs Lisp'; } 163 | pre.src-C:before { content: 'C/C++'; } 164 | pre.src-matlab:before { content: 'matlab'; } 165 | pre.src-maxima:before { content: 'maxima'; } 166 | pre.src-lisp:before { content: 'common lisp'; } 167 | 168 | blockquote { 169 | padding: 0 0 0 20px; 170 | margin: 0 30px 20px -22.5px; 171 | color: #999; 172 | border-left: 8px solid #e5e5e5; 173 | } 174 | blockquote p:last-child { 175 | margin-bottom: 0; 176 | } 177 | img { 178 | display: block; 179 | margin: 0; 180 | border-radius: 5px; 181 | } 182 | a { 183 | font-weight: inherit; 184 | line-height: inherit; 185 | color: #ffff00; 186 | text-decoration: none; 187 | } 188 | sup a:before { 189 | content: "["; 190 | } 191 | sup a:after { 192 | content: "]"; 193 | } 194 | a:hover { 195 | text-decoration: underline; 196 | color: #00ffff; 197 | } 198 | table { 199 | line-height: 2.5; 200 | margin-bottom: 15px; 201 | max-width: 100%; 202 | width: 100%; 203 | } 204 | table td, table th { 205 | padding: 0 15px; 206 | } 207 | table th.left, table td.left { 208 | text-align: left; 209 | } 210 | table th.right, table td.right { 211 | text-align: right; 212 | } 213 | .figure p + p { 214 | text-align: center; 215 | } 216 | 217 | /******************************************************/ 218 | /* body */ 219 | .container { 220 | margin: 0 auto; 221 | max-width: 770px; 222 | } 223 | /* head */ 224 | .masthead { 225 | color: #ada; 226 | border-bottom: 1px solid #e2e3e4; 227 | } 228 | 229 | .masthead a { 230 | color: #ffff00; 231 | } 232 | .masthead a:hover { 233 | text-decoration: underline; 234 | color: #00ffff; 235 | } 236 | .masthead ul { 237 | list-style: none; 238 | margin: 8px 0; 239 | } 240 | .masthead li { 241 | display: inline-block; 242 | } 243 | .masthead li + li:before { 244 | display: inline-block; 245 | content: "\00B7 \00a0"; 246 | color: #cfc; 247 | } 248 | 249 | /*site-nav*/ 250 | .site-nav {border-top: 1px solid #e8e8e8;} 251 | .site-nav .menu-icon { display: none; } 252 | .site-nav li a {line-height: 1.5; } 253 | .site-nav li a:not(:first-child) { margin-left: 20px; } 254 | 255 | 256 | /* searchform*/ 257 | #searchform { 258 | position: absolute; 259 | top: 54px; 260 | right: 30.4%; 261 | } 262 | #searchform #s { 263 | background: url("/media/img/search.png") no-repeat 5px 6px; 264 | box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); 265 | border: 1px solid #dfd; 266 | border-radius: 2px; 267 | -moz-border-radius: 2px; 268 | width: 90px; 269 | height: 30px; 270 | line-height: 12px; 271 | padding: 4px 10px 4px 28px; 272 | 273 | -webkit-transition-duration: 400ms; 274 | -webkit-transition-property: width, background; 275 | -webkit-transition-timing-function: ease; 276 | -moz-transition-duration: 400ms; 277 | -moz-transition-property: width, background; 278 | -moz-transition-timing-function: ease; 279 | -o-transition-duration: 400ms; 280 | -o-transition-property: width, background; 281 | -o-transition-timing-function: ease; 282 | } 283 | #searchform #s:focus { 284 | background-color: #f9f9f9; 285 | width: 160px; 286 | } 287 | .masthead img.avatar { 288 | position: absolute; 289 | width: 150px; 290 | right: 2%; 291 | top: 2%; 292 | background-color: #fff; 293 | } 294 | /* post */ 295 | .post { 296 | position: relative; 297 | border-bottom: 1px solid #e2e3e4; 298 | } 299 | 300 | .post img { 301 | max-width: 100%; 302 | } 303 | .post li { 304 | list-style: none outside none; 305 | } 306 | .post ul > li:before { 307 | content: "- "; 308 | margin-left: -0.25em; 309 | color: #cfc; 310 | } 311 | .post ol { 312 | counter-reset: o-list; 313 | } 314 | .post ol > li:before { 315 | content: counter(o-list) ") "; 316 | counter-increment: o-list; 317 | color: #cfc; 318 | } 319 | 320 | /* special for li in pre */ 321 | .post pre li { 322 | list-style-type: decimal; 323 | } 324 | 325 | .post pre li:before { 326 | display: none; 327 | } 328 | 329 | /* meta info */ 330 | .post-info { 331 | display: inline-block; 332 | margin: -10px 0 -10px; 333 | color: #ffff00; 334 | } 335 | .post-info + .post-info:before { 336 | content: "\2223 \00a0"; 337 | } 338 | .post-meta { 339 | border-bottom: 1px solid #e2e3e4; 340 | } 341 | .center { margin-left: auto; margin-right: auto; text-align: center; } 342 | 343 | /* table of content */ 344 | #table-of-contents { 345 | position: fixed; 346 | right: 0em; 347 | top: 0em; 348 | background: black; 349 | border:1px solid #e1e1e8; 350 | -webkit-box-shadow: 0 0 1em #777777; 351 | -moz-box-shadow: 0 0 1em #777777; 352 | -webkit-border-bottom-left-radius: 5px; 353 | -moz-border-radius-bottomleft: 5px; 354 | text-align: center; 355 | /* ensure doesn't flow off the screen when expanded */ 356 | max-height: 80%; 357 | overflow: auto; 358 | z-index: 200; 359 | } 360 | 361 | #table-of-contents h2 { 362 | 363 | max-width: 20em; 364 | font-weight: normal; 365 | padding-left: 0.5em; 366 | padding-top: 0.05em; 367 | padding-bottom: 0.05em; 368 | } 369 | 370 | #table-of-contents ul { 371 | margin-left: 14pt; 372 | margin-bottom: 10pt; 373 | padding: 0 374 | } 375 | 376 | #table-of-contents li { 377 | padding: 0; 378 | margin: 1px; 379 | list-style: none; 380 | } 381 | 382 | #table-of-contents ul>:first-child { 383 | color: blue; 384 | } 385 | 386 | #table-of-contents #text-table-of-contents { 387 | display: none; 388 | text-align: left; 389 | } 390 | 391 | #table-of-contents:hover #text-table-of-contents { 392 | display: block; 393 | padding: 0.5em; 394 | margin-top: -1.5em; 395 | } 396 | 397 | 398 | /* footer */ 399 | .footer { 400 | margin: 80px 0 0; 401 | text-align: center; 402 | font-size: 15px; 403 | color: #cfc; 404 | } 405 | .footer > p { 406 | margin: 0; 407 | line-height: 1.5; 408 | } 409 | .footdef { 410 | margin: 0 0 20px; 411 | } 412 | .footpara { 413 | display: inline; 414 | } 415 | 416 | /* Responsive 417 | -------------------------------------------------- */ 418 | 419 | /* site-nav*/ 420 | @media screen and (max-width: 512px) { 421 | .site-nav {border-top: 1px solid #e8e8e8; text-align: left; } 422 | .site-nav .menu-icon { display: block; width: 36px; height: 21px; line-height: 0; margin-top: 10px; margin-bottom: 5px; text-align: center; 423 | } 424 | .site-nav .menu-icon > svg { width: 18px; height: 15px; } 425 | .site-nav .menu-icon > svg path { fill: #ffff00; } 426 | .site-nav .trigger { clear: both; display: none; } 427 | .site-nav:hover .trigger { display: block; padding-bottom: 5px; } 428 | .site-nav li{ display: block; padding: 5px 10px; } 429 | .site-nav li:before{ display: inline-block; content: "\00B7 \00a0"; color: #cfc;}} 430 | 431 | /* whole page */ 432 | @media (min-width: 768px) { 433 | /* Increase body padding and font-sizes */ 434 | body { 435 | padding: 30px; 436 | font-size: 18px; 437 | line-height: 1.75; 438 | } 439 | h1:before, h2:before, h3:before, h4:before{ 440 | display: inline; 441 | } 442 | } 443 | 444 | @media (min-width: 1024px) { 445 | body { 446 | padding: 30px; 447 | } 448 | } 449 | -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/pixelated/SFPixelate-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/pixelated/SFPixelate-Bold.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/pixelated/SFPixelate-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/pixelated/SFPixelate-BoldOblique.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/pixelated/SFPixelate-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/pixelated/SFPixelate-Oblique.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/pixelated/SFPixelate.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/pixelated/SFPixelate.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/pixelated/SFPixelateShaded-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/pixelated/SFPixelateShaded-Bold.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/pixelated/SFPixelateShaded-BoldObliqu.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/pixelated/SFPixelateShaded-BoldObliqu.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/pixelated/SFPixelateShaded-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/pixelated/SFPixelateShaded-Oblique.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/fonts/pixelated/SFPixelateShaded.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/fonts/pixelated/SFPixelateShaded.ttf -------------------------------------------------------------------------------- /themes/DarkSun/resources/img/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/DarkSun/resources/img/search.png -------------------------------------------------------------------------------- /themes/DarkSun/resources/js/kdComment.js: -------------------------------------------------------------------------------- 1 | //(require 'jquery) 2 | 3 | /* comments */ 4 | var kd_disqus_thread=$('#disqus_thread'); 5 | var ds_label=$('.ds-thread'); 6 | 7 | $('.disqus_label').click(function(){ 8 | kd_disqus_thread.show(); 9 | ds_label.hide(); 10 | }); 11 | 12 | $('.ds-label').click(function(){ 13 | kd_disqus_thread.hide(); 14 | ds_label.show(); 15 | }); 16 | 17 | /* navigate */ 18 | var kd_toc = $('#text-table-of-contents ul li'); 19 | var kd_n = 1; 20 | var kd_tmp = kd_n; 21 | var kd_head = $('div[id*=\'text-orgheadline\']'); 22 | var topArray = []; 23 | while(kd_n <= kd_head.length){ 24 | topArray.push(kd_head.eq(kd_n-1).offset().top); 25 | kd_n++; 26 | } 27 | $(window).scroll(function () { 28 | //kd_str="#orgheadline" + kd_n.toString(); 29 | //var top1=kd_head.find(kd_str).offset().top; 30 | var startPoint=0; 31 | var endPoint=topArray.length-1; 32 | var offsetValue=window.pageYOffset+60; 33 | if(topArray[kd_tmp]>offsetValue || offsetValue>topArray[kd_tmp+1]){ 34 | while((startPoint+1) < endPoint){ 35 | if(topArray[Math.floor((startPoint+endPoint)/2)] > offsetValue){ 36 | endPoint = Math.floor((startPoint+endPoint)/2); 37 | } 38 | else if(topArray[Math.floor((startPoint+endPoint)/2)] < offsetValue){ 39 | startPoint = Math.floor((startPoint+endPoint)/2); 40 | } 41 | else{ 42 | break; 43 | } 44 | } 45 | if(offsetValue>topArray[topArray.length-1]){ 46 | kd_n=topArray.length-1; 47 | } 48 | else if(offsetValue>topArray[topArray.length-2]){ 49 | kd_n=topArray.length-2; 50 | } 51 | else{ 52 | kd_n = startPoint; 53 | } 54 | 55 | kd_toc.eq(kd_tmp).children('a').css('color', '#ffff00'); 56 | kd_tmp = kd_n; 57 | kd_toc.eq(kd_tmp).children('a').css('color', '#22ff22'); 58 | //kd_n = parseInt(kd_str.slice(-1)); 59 | } 60 | }); 61 | 62 | /* floating card */ 63 | function popupActivate (evt) { 64 | var boundBox = evt.target.getBoundingClientRect(); 65 | var coordX = boundBox.left; 66 | var coordY = boundBox.top; 67 | balloon.style.position="fixed"; 68 | balloon.style.left= (coordX + 30).toString() + "px"; 69 | balloon.style.top= (coordY + 30).toString() + "px"; 70 | 71 | if(evt.target.firstChild.parentNode.nextSibling.tagName == "SUP"){ 72 | var footRef = evt.target.nextSibling.childNodes[0].id; 73 | var docNode = document.getElementById("fn."+footRef.slice(-1)); 74 | var nodeNew = docNode.parentNode.parentNode.lastChild.cloneNode(true); 75 | balloon.replaceChild(nodeNew,balloon.lastChild); 76 | balloon.style.visibility="visible"; 77 | } 78 | } 79 | 80 | function popupOff(evt) { 81 | balloon.style.visibility="hidden"; 82 | } 83 | 84 | function ls_init () { 85 | 86 | // create balloon element, insert as first child of refNode 87 | function createBalloon (refNode) { 88 | // create balloon element to display info 89 | balloon = document.createElement("div"); 90 | balloon.style.visibility="hidden"; 91 | balloon.style.position="fixed"; 92 | balloon.style.top=".5ex"; 93 | balloon.style.left=".5ex"; 94 | balloon.style.padding=".5ex"; 95 | balloon.style.textAlign="left"; 96 | balloon.style.border="solid thin green"; 97 | balloon.style.borderRadius="1ex"; 98 | balloon.style.backgroundColor="hsla(240,80%,50%,0.8)"; 99 | balloon.style.boxShadow="3px 3px 8px black"; 100 | balloon.style.zIndex="341"; 101 | balloon.innerHTML="

tips

"; 102 | // insert into DOM 103 | refNode.insertBefore(balloon, refNode.firstChild); 104 | } 105 | 106 | var myList = document.querySelectorAll(".underline"); 107 | 108 | // assign handler to hot hoover elements 109 | if ( myList.length > 0 ) { 110 | for (var ii = 0; ii < myList.length; ii++) { 111 | var myNode = myList[ii]; 112 | myNode.addEventListener("mouseover", popupActivate , false); 113 | myNode.addEventListener("mouseout", popupOff , false); 114 | } 115 | } 116 | 117 | createBalloon(document.body); 118 | } 119 | 120 | var balloon; 121 | 122 | ls_init(); 123 | 124 | /* editable */ 125 | 126 | 127 | /* backgroundImage */ 128 | -------------------------------------------------------------------------------- /themes/DarkSun/resources/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | /******************************************************************* 3 | * 1. replace css class "src" and "example" with "prettyprint", for 4 | * prettify.js to render 5 | * 2. replace detail language css class, e.g. "src-scheme" to 6 | * "lang-scheme" per the description of prettify.js 7 | ******************************************************************/ 8 | var $blocks = $('pre.src'); 9 | $blocks.each(function(index) { 10 | var self = $(this); 11 | var classes = self.removeClass('src').attr('class').split(/\s+/); 12 | $.each(classes, function(idx, cls) { 13 | if (cls.substring(0, 4) === 'src-') { 14 | var lang = cls.substring(4); 15 | self.removeClass(cls).addClass('lang-' + lang); 16 | } 17 | }); 18 | self.addClass('prettyprint'); 19 | }); 20 | $('pre.example').removeClass('example').addClass('prettyprint'); 21 | 22 | /******************************************************************* 23 | * 1. remove all org exported line number spans 24 | * 2. add css class "linenums" to code block per the description of 25 | * prettify.js 26 | ******************************************************************/ 27 | var $lines = $('span.linenr'); 28 | var $linedBlocks = $lines.parent(); 29 | $lines.remove(); 30 | $linedBlocks.each(function(index) { 31 | $(this).addClass('linenums'); 32 | }); 33 | 34 | /******************************************************************* 35 | * pretty print all code blocks 36 | ******************************************************************/ 37 | prettyPrint(); 38 | }); 39 | -------------------------------------------------------------------------------- /themes/DarkSun/resources/js/md5.min.js: -------------------------------------------------------------------------------- 1 | !function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}"function"==typeof define&&define.amd?define(function(){return A}):"object"==typeof module&&module.exports?module.exports=A:n.md5=A}(this); 2 | //# sourceMappingURL=md5.min.js.map -------------------------------------------------------------------------------- /themes/DarkSun/templates/about.mustache: -------------------------------------------------------------------------------- 1 |
2 |

About {{author}}

3 |
4 |

{{author}} 是个大懒虫

5 |
6 |
7 |
-------------------------------------------------------------------------------- /themes/DarkSun/templates/author-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Author Index

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/DarkSun/templates/author.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Author: {{author-name}}

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/DarkSun/templates/category-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{cat-name}} Index

4 |
    5 | {{#posts}} 6 |
  • {{date}}  »  {{post-title}}
  • 7 | {{/posts}} 8 |
9 |
10 |
-------------------------------------------------------------------------------- /themes/DarkSun/templates/container.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{{header}}} 4 | 5 | {{{nav}}} 6 | {{{content}}} 7 | {{{footer}}} 8 | 9 | 10 | -------------------------------------------------------------------------------- /themes/DarkSun/templates/footer.mustache: -------------------------------------------------------------------------------- 1 |
{{! footer}} 2 | {{#show-meta}} 3 | 9 | {{/show-meta}} 10 | 11 | 12 | 13 | 14 | 15 | {{#show-comment}} 16 |
17 |
18 | 31 |
32 | {{/show-comment}} 33 | 34 | {{#google-analytics}} 35 | 44 | {{/google-analytics}} 45 | 56 |
57 | -------------------------------------------------------------------------------- /themes/DarkSun/templates/header.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{page-title}} 3 | 4 | 5 | 7 | 8 | {{#description}} 9 | 10 | {{/description}} 11 | {{#keywords}} 12 | 13 | {{/keywords}} 14 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /themes/DarkSun/templates/index.mustache: -------------------------------------------------------------------------------- 1 | {{#categories}} 2 |
3 |

{{category}}

4 |
5 | 10 |
11 |
12 | {{/categories}} -------------------------------------------------------------------------------- /themes/DarkSun/templates/nav.mustache: -------------------------------------------------------------------------------- 1 |
{{! nav }} 2 |
3 |

{{site-main-title}}

4 |

{{site-sub-title}}

5 | 26 |
27 | 28 | 29 |
30 | {{#avatar}} 31 | 32 | {{/avatar}} 33 |
34 |
35 | -------------------------------------------------------------------------------- /themes/DarkSun/templates/post.mustache: -------------------------------------------------------------------------------- 1 |
{{! content, do NOT indent}} 2 |
3 | {{#title}} 4 |

{{title}}

5 | {{/title}} 6 | {{{content}}} 7 |
8 |
-------------------------------------------------------------------------------- /themes/DarkSun/templates/tag-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag Index

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/DarkSun/templates/tag.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag: {{tag-name}}

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/default/readme.org: -------------------------------------------------------------------------------- 1 | 2 | * About 3 | The theme is created for a static sate generator: ego --- which is served for [[http://emacs-china.github.io][emacs-china]]. 4 | 5 | * Introduction 6 | 7 | 8 | * If there is problem: 9 | Open an issue. 10 | 11 | Here is the issues solved: 12 | https://github.com/emacs-china/EGO/issues/9 13 | -------------------------------------------------------------------------------- /themes/default/resources/css/comment.css: -------------------------------------------------------------------------------- 1 | #comment-wrap {} 2 | /* #comment-wrap li { 3 | display: inline-block; 4 | } 5 | .comment-wrap li + li:before { 6 | display: inline-block; 7 | } 8 | */ 9 | #comment-wrap .disqus_label{ 10 | float:left; 11 | text-align:center; 12 | } 13 | 14 | #comment-wrap .ds-label{ 15 | float:right; 16 | text-align:center; 17 | } 18 | -------------------------------------------------------------------------------- /themes/default/resources/css/main.css: -------------------------------------------------------------------------------- 1 | /****************************************************** 2 | * I copied these styles from markdotto.com, who is 3 | * the creator of bootstrap, and I also did some 4 | * modification. Thanks Mark for the beautiful theme, 5 | * so I reserved the @mdo sign below. 6 | *****************************************************/ 7 | 8 | /* 9 | __ 10 | __ /\ \ 11 | /'_`\_ ___ ___ \_\ \ ___ 12 | /'/'_` \ /' __` __`\ /'_` \ / __`\ 13 | /\ \ \L\ \/\ \/\ \/\ \/\ \L\ \/\ \L\ \ 14 | \ \ `\__,_\ \_\ \_\ \_\ \___,_\ \____/ 15 | \ `\_____\\/_/\/_/\/_/\/__,_ /\/___/ 16 | `\/_____/ 17 | 18 | */ 19 | 20 | 21 | 22 | /* Body resets 23 | -------------------------------------------------- */ 24 | 25 | * { 26 | -webkit-box-sizing: border-box; 27 | -moz-box-sizing: border-box; 28 | box-sizing: border-box; 29 | } 30 | html, body { 31 | margin: 0; 32 | padding: 0; 33 | } 34 | html { 35 | font-size: 62.5%; 36 | } 37 | body { 38 | padding: 20px; 39 | font-family: "Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Microsoft YaHei",sans-serif; 40 | /*Menlo, Monaco, monospace*/ 41 | font-size: 14px; 42 | line-height: 1.5; 43 | color: #f0fff0; 44 | background-color: #1090c0; 45 | } 46 | p { 47 | margin: 0 0 20px; 48 | } 49 | 50 | .title { 51 | margin-bottom: 20px; 52 | text-align: center; 53 | } 54 | h1 { 55 | font-size:20px; 56 | } 57 | h2, h3, h4 { 58 | font-size:18px; 59 | } 60 | h1, h2, h3, h4{ 61 | position: relative; 62 | margin: 30px 0 20px; 63 | font-weight: bold; 64 | line-height: 1.1; 65 | color: #ffaa00; 66 | text-rendering: optimizeLegibility; 67 | } 68 | h2:before, h3:before, h4:before { 69 | position: absolute; 70 | top: auto; 71 | color: #cfc; 72 | display: inline; 73 | } 74 | h2:before { 75 | content: "*"; 76 | left: -1.25em; 77 | } 78 | h2 {left: 1.25em;} 79 | h3:before { 80 | content: "**"; 81 | left: -2em; 82 | } 83 | h3 {left: 2em;} 84 | h4:before { 85 | content: "***"; 86 | left: -2.5em; 87 | } 88 | h4 {left: 2.5em;} 89 | #table-of-contents > h2 { 90 | left: 0; 91 | } 92 | #table-of-contents > h2:before { 93 | content: none; 94 | } 95 | 96 | i, em, b, strong { 97 | padding-left: .1em; 98 | padding-right: .1em; 99 | } 100 | b, strong { 101 | font-weight: bold; 102 | color: #00ffff; 103 | } 104 | b:before, b:after, strong:before, strong:after { 105 | content: "*"; 106 | } 107 | i:before, i:after, em:before, em:after { 108 | content: "/"; 109 | } 110 | hr { 111 | margin: 0; 112 | border: 0; 113 | border-bottom: 1px solid #e2e3e4; 114 | } 115 | ul, ol { 116 | padding: 0; 117 | margin: 0 0 20px; 118 | } 119 | code, pre { 120 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 121 | font-size: 0.9em; 122 | } 123 | .underline { 124 | text-decoration: underline; 125 | color: #3aff3a; 126 | } 127 | .underline:before, .underline:after { 128 | content: "_"; 129 | color: #3aff3a; 130 | } 131 | code { 132 | background: #008f0f; 133 | border-radius: 5px; 134 | color: #ffa0f0; 135 | } 136 | code:before, code:after { 137 | content: "="; 138 | color: #cfc; 139 | } 140 | pre { 141 | display: block; 142 | margin: 0 0 14px; 143 | padding: 15px; 144 | border: 1px solid #e1e1e8; 145 | border-radius: 3px 3px 3px 3px; 146 | line-height: 28px; 147 | background-color: #000000; 148 | white-space: pre; 149 | white-space: pre-wrap; 150 | word-break: break-all; 151 | word-wrap: break-word; 152 | } 153 | pre.src { 154 | padding-top: 1.2em; 155 | position: relative; 156 | } 157 | pre.src:before { 158 | display: none; 159 | position: absolute; 160 | background-color: white; 161 | top: -18px; 162 | right: 10px; 163 | padding: 3px; 164 | border: 1px solid black; 165 | } 166 | pre.src:hover:before { 167 | display: inline; 168 | background-color: #000000; 169 | border: 1px solid #e1e1e8; 170 | } 171 | pre.src-sh:before { content: 'sh'; } 172 | pre.src-bash:before { content: 'sh'; } 173 | pre.src-shell:before { content: 'sh'; } 174 | pre.src-emacs-lisp:before { content: 'Emacs Lisp'; } 175 | pre.src-C:before { content: 'C/C++'; } 176 | pre.src-js:before { content: 'js'} 177 | pre.src-matlab:before { content: 'matlab'; } 178 | pre.src-maxima:before { content: 'maxima'; } 179 | pre.src-lisp:before { content: 'common lisp'; } 180 | 181 | pre.example { background-color: #008f0f; color: #ffa0f0;} 182 | 183 | .verse { 184 | color: #afa; 185 | text-indent: 0; 186 | } 187 | 188 | blockquote { 189 | padding: 0 0 0 20px; 190 | margin: 0 30px 20px -22.5px; 191 | color: #afa; 192 | border-left: 8px solid #e5e5e5; 193 | } 194 | blockquote p:last-child { 195 | margin-bottom: 0; 196 | } 197 | img { 198 | display: block; 199 | margin: 0; 200 | border-radius: 5px; 201 | } 202 | span img{ 203 | display: inline; 204 | } 205 | a { 206 | font-weight: inherit; 207 | line-height: inherit; 208 | color: #ffff00; 209 | text-decoration: none; 210 | } 211 | sup a:before { 212 | content: "["; 213 | } 214 | sup a:after { 215 | content: "]"; 216 | } 217 | a:hover { 218 | text-decoration: underline; 219 | color: #00ffff; 220 | } 221 | table { 222 | line-height: 2.5; 223 | margin-bottom: 15px; 224 | max-width: 100%; 225 | width: 100%; 226 | } 227 | table td, table th { 228 | padding: 0 15px; 229 | } 230 | table th.left, table td.left { 231 | text-align: left; 232 | } 233 | table th.right, table td.right { 234 | text-align: right; 235 | } 236 | .figure p + p { 237 | text-align: center; 238 | } 239 | 240 | /******************************************************/ 241 | /* body */ 242 | .container { 243 | margin: 0 auto; 244 | max-width: 770px; 245 | } 246 | /* head */ 247 | .masthead { 248 | color: #ada; 249 | border-bottom: 1px solid #e2e3e4; 250 | } 251 | 252 | .masthead a { 253 | color: #ffff00; 254 | } 255 | .masthead a:hover { 256 | text-decoration: underline; 257 | color: #00ffff; 258 | } 259 | .masthead ul { 260 | list-style: none; 261 | margin: 8px 0; 262 | } 263 | .masthead li { 264 | display: inline-block; 265 | } 266 | .masthead li + li:before { 267 | display: inline-block; 268 | content: "\00B7 \00a0"; 269 | color: #cfc; 270 | } 271 | 272 | /*site-nav*/ 273 | .site-nav {border-top: 1px solid #e8e8e8;} 274 | .site-nav .menu-icon { display: none; } 275 | .site-nav li a {line-height: 1.5; } 276 | .site-nav li a:not(:first-child) { margin-left: 20px; } 277 | 278 | 279 | /* searchform*/ 280 | #searchform { 281 | position: absolute; 282 | top: 54px; 283 | right: 30.4%; 284 | } 285 | #searchform #s { 286 | background: url("/media/img/search.png") no-repeat 5px 6px; 287 | box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); 288 | border: 1px solid #dfd; 289 | border-radius: 2px; 290 | -moz-border-radius: 2px; 291 | width: 90px; 292 | height: 30px; 293 | line-height: 12px; 294 | padding: 4px 10px 4px 28px; 295 | 296 | -webkit-transition-duration: 400ms; 297 | -webkit-transition-property: width, background; 298 | -webkit-transition-timing-function: ease; 299 | -moz-transition-duration: 400ms; 300 | -moz-transition-property: width, background; 301 | -moz-transition-timing-function: ease; 302 | -o-transition-duration: 400ms; 303 | -o-transition-property: width, background; 304 | -o-transition-timing-function: ease; 305 | } 306 | #searchform #s:focus { 307 | background-color: #f9f9f9; 308 | width: 160px; 309 | } 310 | .masthead img.avatar { 311 | position: absolute; 312 | width: 200px; 313 | top: 100px; 314 | right: 29%; 315 | background-color: #fff; 316 | } 317 | /* post */ 318 | .post { 319 | position: relative; 320 | border-bottom: 1px solid #e2e3e4; 321 | } 322 | 323 | .post img { 324 | max-width: 100%; 325 | } 326 | .post li { 327 | list-style: none outside none; 328 | } 329 | .post ul > li:before { 330 | content: "- "; 331 | margin-left: -0.25em; 332 | color: #cfc; 333 | } 334 | .post .org-ul-up > li:before { 335 | content: ""; 336 | } 337 | .post .org-ul-up > li > span { 338 | position:relative; 339 | float:left; 340 | width:100%; 341 | } 342 | .post .org-ul-up > li > span > span { 343 | float:right; 344 | text-align:right; 345 | } 346 | .post .org-ul-down > li { 347 | display: inline-block; 348 | } 349 | .post .org-ul-down > li:before { 350 | content: " : "; 351 | margin-left: 0em; 352 | } 353 | .post .org-ul-down > li a { 354 | background: #008f0f; 355 | } 356 | .post ol { 357 | counter-reset: o-list; 358 | } 359 | .post ol > li:before { 360 | content: counter(o-list) ") "; 361 | counter-increment: o-list; 362 | color: #cfc; 363 | } 364 | 365 | /* special for li in pre */ 366 | .post pre li { 367 | list-style-type: decimal; 368 | } 369 | 370 | .post pre li:before { 371 | display: none; 372 | } 373 | 374 | /* meta info */ 375 | .post-info { 376 | display: inline-block; 377 | margin: -10px 0 -10px; 378 | color: #ffff00; 379 | } 380 | .post-info + .post-info:before { 381 | content: "\2223 \00a0"; 382 | } 383 | 384 | .center { margin-left: auto; margin-right: auto; text-align: center; } 385 | .org-center { margin-left: auto; margin-right: auto; text-align: center; } 386 | 387 | /* table of content */ 388 | #table-of-contents { 389 | position: fixed; 390 | right: 0em; 391 | top: 0em; 392 | background: black; 393 | border:1px solid #e1e1e8; 394 | -webkit-box-shadow: 0 0 1em #777777; 395 | -moz-box-shadow: 0 0 1em #777777; 396 | -webkit-border-bottom-left-radius: 5px; 397 | -moz-border-radius-bottomleft: 5px; 398 | text-align: center; 399 | /* ensure doesn't flow off the screen when expanded */ 400 | max-height: 80%; 401 | overflow: auto; 402 | z-index: 100; 403 | } 404 | 405 | #table-of-contents h2 { 406 | 407 | max-width: 20em; 408 | font-weight: normal; 409 | padding-left: 0.5em; 410 | padding-top: 0.05em; 411 | padding-bottom: 0.05em; 412 | } 413 | 414 | #table-of-contents ul { 415 | margin-left: 14pt; 416 | margin-bottom: 10pt; 417 | padding: 0 418 | } 419 | 420 | #table-of-contents li { 421 | padding: 0; 422 | margin: 1px; 423 | list-style: none; 424 | } 425 | 426 | #table-of-contents ul>:first-child { 427 | color: blue; 428 | } 429 | 430 | #table-of-contents #text-table-of-contents { 431 | display: none; 432 | text-align: left; 433 | } 434 | 435 | #table-of-contents:hover #text-table-of-contents { 436 | display: block; 437 | padding: 0.5em; 438 | margin-top: -1.5em; 439 | } 440 | 441 | 442 | /* footer */ 443 | .footer { 444 | margin: 80px 0 0; 445 | text-align: center; 446 | font-size: 15px; 447 | color: #cfc; 448 | } 449 | .footer > p { 450 | margin: 0; 451 | line-height: 1.5; 452 | } 453 | .footdef { 454 | margin: 0 0 20px; 455 | } 456 | .footpara { 457 | display: inline; 458 | } 459 | 460 | /* Responsive 461 | -------------------------------------------------- */ 462 | 463 | /* site-nav*/ 464 | @media screen and (max-width: 512px) { 465 | .site-nav {border-top: 1px solid #e8e8e8; text-align: left; } 466 | .site-nav .menu-icon { display: block; width: 36px; height: 21px; line-height: 0; margin-top: 10px; margin-bottom: 5px; text-align: center; 467 | } 468 | .site-nav .menu-icon > svg { width: 18px; height: 15px; } 469 | .site-nav .menu-icon > svg path { fill: #ffff00; } 470 | .site-nav .trigger { clear: both; display: none; } 471 | .site-nav:hover .trigger { display: block; padding-bottom: 5px; } 472 | .site-nav li{ display: block; padding: 5px 10px; } 473 | .site-nav li:before{ display: inline-block; content: "\00B7 \00a0"; color: #cfc;}} 474 | 475 | /* whole page */ 476 | @media (min-width: 768px) { 477 | /* Increase body padding and font-sizes */ 478 | body { 479 | padding: 30px; 480 | font-size: 18px; 481 | line-height: 1.75; 482 | } 483 | } 484 | 485 | @media (min-width: 1024px) { 486 | body { 487 | padding: 30px; 488 | } 489 | } 490 | -------------------------------------------------------------------------------- /themes/default/resources/img/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/default/resources/img/search.png -------------------------------------------------------------------------------- /themes/default/resources/js/main.js: -------------------------------------------------------------------------------- 1 | //(require 'jquery) 2 | 3 | /* table-of-contents */ 4 | window.ego_toc = $('#text-table-of-contents ul li'); 5 | if(0 != window.ego_toc.length){ 6 | window.ego_toc_h = $('#table-of-contents h2'); 7 | window.ego_toc_h_text = $('#table-of-contents h2').text(); 8 | window.ego_n = 0; 9 | window.ego_tmp = ego_n; 10 | window.ego_head = $(':header').filter('[id*=org]'); 11 | $(window).scroll(function () { 12 | var startPoint=0; 13 | var endPoint=ego_head.length-1; 14 | var offsetValue=window.pageYOffset+60; 15 | if(ego_head.eq(ego_tmp).offset().top>offsetValue || offsetValue>ego_head.eq((ego_tmp+1)>(ego_head.length-1)?(ego_head.length-1):(ego_tmp+1)).offset().top){ 16 | while((startPoint+1) < endPoint){ 17 | if(ego_head.eq(Math.floor((startPoint+endPoint)/2)).offset().top > offsetValue){ 18 | endPoint = Math.floor((startPoint+endPoint)/2); 19 | } 20 | else if(ego_head.eq(Math.floor((startPoint+endPoint)/2)).offset().top < offsetValue){ 21 | startPoint = Math.floor((startPoint+endPoint)/2); 22 | } 23 | else{ 24 | break; 25 | } 26 | } 27 | if(offsetValue>ego_head.eq(ego_head.length-1).offset().top){ 28 | ego_n=ego_head.length-1; 29 | } 30 | else{ 31 | ego_n = startPoint; 32 | } 33 | 34 | ego_toc.eq(ego_tmp).children('a').css('color', '#ffff00'); 35 | ego_tmp = ego_n; 36 | ego_toc.eq(ego_tmp).children('a').css('color', '#22ff22'); 37 | if(window.pageYOffset < 10){ 38 | ego_toc_h[0].textContent = ego_toc_h_text; 39 | } 40 | else{ 41 | ego_toc_h[0].textContent = ego_toc.eq(ego_tmp)[0].children.item(0).textContent; 42 | } 43 | //ego_n = parseInt(ego_str.slice(-1)); 44 | } 45 | });} 46 | 47 | /* floating card */ 48 | function popupActivate (evt) { 49 | var boundBox = evt.target.getBoundingClientRect(); 50 | var coordX = boundBox.left; 51 | var coordY = boundBox.top; 52 | balloon.style.position="fixed"; 53 | balloon.style.left= coordX.toString() + "px"; 54 | balloon.style.top= (coordY + 30).toString() + "px"; 55 | 56 | if(evt.target.firstChild.parentNode.nextSibling.tagName == "SUP"){ 57 | var footRef = evt.target.nextSibling.childNodes[0].id; 58 | var docNode = document.getElementById("fn."+footRef.slice(4)); 59 | var nodeNew = docNode.parentNode.parentNode.cloneNode(true); 60 | balloon.replaceChild(nodeNew,balloon.lastChild); 61 | balloon.style.visibility="visible"; 62 | } 63 | if(balloon.getBoundingClientRect().right > window.innerWidth){ 64 | balloon.style.width=(window.innerWidth-coordX-5).toString()+"px"; 65 | } 66 | } 67 | 68 | function popupOff(evt) { 69 | balloon.style.visibility="hidden"; 70 | } 71 | 72 | function ls_init () { 73 | 74 | // create balloon element, insert as first child of refNode 75 | function createBalloon (refNode) { 76 | // create balloon element to display info 77 | balloon = document.createElement("div"); 78 | balloon.style.visibility="hidden"; 79 | balloon.style.position="fixed"; 80 | balloon.style.top=".5ex"; 81 | balloon.style.left=".5ex"; 82 | balloon.style.padding=".5ex"; 83 | balloon.style.textAlign="left"; 84 | balloon.style.border="solid thin green"; 85 | balloon.style.borderRadius="1ex"; 86 | balloon.style.backgroundColor="hsla(182, 80%, 20%, 0.8)"; 87 | balloon.style.boxShadow="3px 3px 8px black"; 88 | balloon.style.zIndex="341"; 89 | balloon.innerHTML="

tips

"; 90 | // insert into DOM 91 | refNode.insertBefore(balloon, refNode.firstChild); 92 | } 93 | 94 | var myList = document.querySelectorAll(".underline"); 95 | 96 | // assign handler to hot hoover elements 97 | if ( myList.length > 0 ) { 98 | for (var ii = 0; ii < myList.length; ii++) { 99 | var myNode = myList[ii]; 100 | myNode.addEventListener("mouseover", popupActivate , false); 101 | myNode.addEventListener("mouseout", popupOff , false); 102 | } 103 | } 104 | 105 | createBalloon(document.body); 106 | } 107 | 108 | var balloon; 109 | 110 | ls_init(); 111 | 112 | /* change style*/ 113 | 114 | $('.post-meta').insertAfter('.title').css('margin-bottom','15px').css('text-align','center'); 115 | -------------------------------------------------------------------------------- /themes/default/resources/js/md5.min.js: -------------------------------------------------------------------------------- 1 | !function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255);return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1)u[r]=909522486^o[r],c[r]=1549556828^o[r];return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t);return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}"function"==typeof define&&define.amd?define(function(){return A}):"object"==typeof module&&module.exports?module.exports=A:n.md5=A}(this); 2 | //# sourceMappingURL=md5.min.js.map -------------------------------------------------------------------------------- /themes/default/templates/about.mustache: -------------------------------------------------------------------------------- 1 |
2 |

About {{author}}

3 |
4 |

{{author}} is so lazy that there is nothing!

5 |
6 |
7 |
-------------------------------------------------------------------------------- /themes/default/templates/category-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{cat-name}} Index

4 |
    5 | {{#posts}} 6 |
  • 7 | {{date}}  »   8 | {{post-title}} 9 | {{{tag-links}}} 10 | 11 |
  • 12 | {{/posts}} 13 |
14 |

  

15 |
16 |
-------------------------------------------------------------------------------- /themes/default/templates/container.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{{header}}} 4 |
5 | {{{nav}}} 6 | {{{content}}} 7 | {{{footer}}} 8 |
9 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /themes/default/templates/footer.mustache: -------------------------------------------------------------------------------- 1 |
{{! footer}} 2 | {{#show-meta}} 3 | 9 | {{/show-meta}} 10 | 11 | 12 | {{#show-comment}} 13 |
14 |
15 | 28 |
29 | {{/show-comment}} 30 | 31 | {{#google-analytics}} 32 | 41 | {{/google-analytics}} 42 | 52 |
53 | 56 | 59 | 60 | -------------------------------------------------------------------------------- /themes/default/templates/header.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{page-title}} 3 | 4 | 5 | 7 | 8 | {{#description}} 9 | 10 | {{/description}} 11 | {{#keywords}} 12 | 13 | {{/keywords}} 14 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /themes/default/templates/index.mustache: -------------------------------------------------------------------------------- 1 | {{#categories}} 2 |
3 |

{{category}}

4 |
5 | 10 |
11 |
12 | {{/categories}} -------------------------------------------------------------------------------- /themes/default/templates/nav.mustache: -------------------------------------------------------------------------------- 1 |
{{! nav }} 2 |
3 |

{{site-main-title}}

4 |

{{site-sub-title}}

5 | 24 |
25 | 26 | 27 |
28 | {{#avatar}} 29 | 30 | {{/avatar}} 31 |
32 |
33 | -------------------------------------------------------------------------------- /themes/default/templates/post.mustache: -------------------------------------------------------------------------------- 1 |
{{! content, do NOT indent}} 2 |
3 | {{#title}} 4 |

{{title}}

5 | {{/title}} 6 | {{{content}}} 7 |
8 |
-------------------------------------------------------------------------------- /themes/default/templates/summary-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{#updates-p}} 4 |

Updates

5 |
    6 | {{#updates}} 7 |
  • 8 | {{post-date}}  »   9 | {{post-title}} 10 | {{{tag-links}}} 11 | 12 |
  • 13 | {{/updates}} 14 |
15 | {{/updates-p}} 16 |

{{summary-name}}: Index

17 | 22 |
23 |
-------------------------------------------------------------------------------- /themes/default/templates/summary.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{summary-name}}: {{summary-item-name}}

4 |
    5 | {{#posts}} 6 |
  • 7 | {{post-date}}  »   8 | {{post-title}} 9 | {{{tag-links}}} 10 | 11 |
  • 12 | {{/posts}} 13 |
14 |
15 |

{{summary-name}}: Index

16 | 22 |
23 |
-------------------------------------------------------------------------------- /themes/kactus/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kactus/1.png -------------------------------------------------------------------------------- /themes/kactus/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kactus/2.png -------------------------------------------------------------------------------- /themes/kactus/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kactus/3.png -------------------------------------------------------------------------------- /themes/kactus/README.md: -------------------------------------------------------------------------------- 1 | 2 | from https://github.com/nickbalestra/kactus 3 | 4 | delete your index.org 5 | 6 | git clone https://github.com/venmos/org-page-theme-kactus.git 7 | 8 | cp -r org-page-theme-kactus ~/.emacs.d/elpa/org-page-xxxx.xx/themes/ or ln -s ~/Github/org-page-theme-kactus ~/.emacs.d/elpa/org-page-xxxx.xx/themes/org-page-theme-kactus 9 | 10 | add your logo.png to org-page-theme-kactus/resources/images/ 11 | 12 | edit org-page-theme-kactus/templates/index.mustache , find "Your Name" and "Your Sub Title", modify them. 13 | 14 | change org-page config 15 | 16 | add (setq op/theme 'org-page-theme-kactus) 17 | 18 | ![image](https://dn-assets-gitcafe-com.qbox.me/venmos/org-page-theme-kactus/raw/master/1.png) 19 | 20 | ![image](https://dn-assets-gitcafe-com.qbox.me/venmos/org-page-theme-kactus/raw/master/2.png) 21 | 22 | ![image](https://dn-assets-gitcafe-com.qbox.me/venmos/org-page-theme-kactus/raw/master/3.png) 23 | -------------------------------------------------------------------------------- /themes/kactus/README.org: -------------------------------------------------------------------------------- 1 | from https://github.com/nickbalestra/kactus 2 | 3 | delete your index.org 4 | 5 | git clone https://github.com/venmos/org-page-theme-kactus.git 6 | 7 | cp -r org-page-theme-kactus ~/.emacs.d/elpa/org-page-xxxx.xx/themes/ or ln -s ~/Github/org-page-theme-kactus ~/.emacs.d/elpa/org-page-xxxx.xx/themes/org-page-theme-kactus 8 | 9 | add your logo.png to org-page-theme-kactus/resources/images/ 10 | 11 | edit org-page-theme-kactus/templates/index.mustache , find "Your Name" and "Your Sub Title", modify them. 12 | 13 | change org-page config 14 | 15 | add (setq op/theme 'org-page-theme-kactus) 16 | 17 | [[file:1.png]] 18 | 19 | [[file:2.png]] 20 | 21 | [[file:3.png]] 22 | -------------------------------------------------------------------------------- /themes/kactus/resources/css/highlight.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* -------------------------------------*/ 4 | /* Syntax Coloring */ 5 | /* -------------------------------------*/ 6 | .highlight pre { 7 | font-size: 13px; 8 | word-wrap: break-word; 9 | -webkit-font-smoothing: subpixel-antialiased; 10 | -moz-osx-font-smoothing: auto; 11 | padding: 16px; 12 | padding-left: 21px; 13 | padding-bottom: 14px; 14 | display: block; 15 | color: #788D9E; 16 | background: #fff; 17 | border: none; 18 | box-shadow: inset 0 0 0 1px #E4EBF2, inset 49px 0 0 #FBFDFE, inset 50px 0 0 #E4EBF2; 19 | border-radius: 4px; 20 | overflow: hidden; 21 | font-family: 'Menlo', 'Monaco', Courier, monospace; 22 | 23 | } 24 | 25 | .post .highlight pre ol li { 26 | font-size: 13px; 27 | list-style: none; 28 | line-height: 1.6; } 29 | 30 | .post .highlight pre ol li + li { 31 | margin-top: 0; } 32 | 33 | /* Inline code*/ 34 | .inline { 35 | font-size: 14px; 36 | color: #333; 37 | font-family: 'Menlo', 'Monaco', Courier, monospace; 38 | border-bottom: 1px dotted #ddd; 39 | padding-bottom: 2px; } 40 | 41 | .o, 42 | .nf, 43 | .highlight pre ol li { 44 | color: #788D9E; 45 | /* Default */ } 46 | 47 | .k, 48 | .kc, 49 | .k + .nx { 50 | color: #FF9740; 51 | /* Orange */ 52 | /* k + nx = followed by "New" */ } 53 | 54 | .c, 55 | .cm, 56 | .cp, 57 | .c1, 58 | .cs { 59 | color: #A4BDD1; } 60 | 61 | /* Comment */ 62 | .mi, .mf { 63 | color: #5BC1F0; } 64 | 65 | /* Blue */ 66 | .s { 67 | color: #8DDE19; 68 | /* Original Green */ 69 | color: #6ED300; 70 | /* Darker Green */ } 71 | 72 | /*# String escaping in Framer 73 | "myString,..." */ 74 | .s + .si, 75 | .si + .nx, 76 | .si + .s, 77 | .nx + .si { 78 | color: #6ED300; } 79 | 80 | /* Lighter, following dots like ".states.add etc" */ 81 | .p + .nx { 82 | color: #79A3C4; } 83 | 84 | /* Custom LineNumbers */ 85 | .highlight pre ol { 86 | counter-reset: linenumbers; 87 | margin-left: 50px; } 88 | 89 | .highlight pre ol li { 90 | line-height: 1.6; 91 | text-align: left; } 92 | 93 | /* Line-height bug in FF */ 94 | .is-firefox .highlight pre ol li { 95 | line-height: 1.55; } 96 | 97 | .highlight pre ol li:before { 98 | content: counter(linenumbers); 99 | counter-increment: linenumbers; 100 | float: left; 101 | margin-left: -50px; 102 | font-size: 10px; 103 | color: #B7CADA; 104 | position: relative; 105 | top: 3px; 106 | -webkit-user-select: none; 107 | -moz-user-select: none; 108 | -ms-user-select: none; 109 | text-align: right; 110 | width: 12px; 111 | left: -4px; 112 | white-space: nowrap; } 113 | 114 | .highlight .lineno { 115 | color: #B7CADA; 116 | font-size: 10px; 117 | display:inline-block; 118 | padding: 0 30px 0 0px; 119 | /*border-right:1px solid #ccc;*/ 120 | position: relative; 121 | 122 | -webkit-user-select: none; 123 | -moz-user-select: none; 124 | -ms-user-select: none; 125 | text-align: right; 126 | 127 | white-space: nowrap; 128 | } 129 | 130 | .highlight pre code { 131 | display: block; 132 | white-space: pre; 133 | overflow-x: auto; 134 | word-wrap: normal; 135 | } 136 | -------------------------------------------------------------------------------- /themes/kactus/resources/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kactus/resources/images/logo.png -------------------------------------------------------------------------------- /themes/kactus/resources/js/main.js: -------------------------------------------------------------------------------- 1 | // To make images retina, add a class "2x" to the img element 2 | // and add a @2x.png image. Assumes jquery is loaded. 3 | 4 | function isRetina() { 5 | var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\ 6 | (min--moz-device-pixel-ratio: 1.5),\ 7 | (-o-min-device-pixel-ratio: 3/2),\ 8 | (min-resolution: 1.5dppx)"; 9 | 10 | if (window.devicePixelRatio > 1) 11 | return true; 12 | 13 | if (window.matchMedia && window.matchMedia(mediaQuery).matches) 14 | return true; 15 | 16 | return false; 17 | }; 18 | 19 | 20 | function retina() { 21 | 22 | if (!isRetina()) 23 | return; 24 | 25 | $("img.2x").map(function(i, image) { 26 | 27 | var path = $(image).attr("src"); 28 | 29 | path = path.replace(".png", "@2x.png"); 30 | path = path.replace(".jpg", "@2x.jpg"); 31 | 32 | $(image).attr("src", path); 33 | }); 34 | }; 35 | 36 | $(document).ready(retina); 37 | 38 | $(document).ready(function() { 39 | /******************************************************************* 40 | * 1. replace css class "src" and "example" with "prettyprint", for 41 | * prettify.js to render 42 | * 2. replace detail language css class, e.g. "src-scheme" to 43 | * "lang-scheme" per the description of prettify.js 44 | ******************************************************************/ 45 | var $blocks = $('pre.src'); 46 | $blocks.each(function(index) { 47 | var self = $(this); 48 | var classes = self.removeClass('src').attr('class').split(/\s+/); 49 | $.each(classes, function(idx, cls) { 50 | if (cls.substring(0, 4) === 'src-') { 51 | var lang = cls.substring(4); 52 | self.removeClass(cls).addClass('lang-' + lang); 53 | } 54 | }); 55 | self.addClass('prettyprint'); 56 | }); 57 | $('pre.example').removeClass('example').addClass('prettyprint'); 58 | 59 | /******************************************************************* 60 | * 1. remove all org exported line number spans 61 | * 2. add css class "linenums" to code block per the description of 62 | * prettify.js 63 | ******************************************************************/ 64 | var $lines = $('span.linenr'); 65 | var $linedBlocks = $lines.parent(); 66 | $lines.remove(); 67 | $linedBlocks.each(function(index) { 68 | $(this).addClass('linenums'); 69 | }); 70 | 71 | /******************************************************************* 72 | * pretty print all code blocks 73 | ******************************************************************/ 74 | prettyPrint(); 75 | }); 76 | -------------------------------------------------------------------------------- /themes/kactus/templates/about.mustache: -------------------------------------------------------------------------------- 1 |
2 |

About {{author}}

3 |
4 |

{{author}} is a little lazy, he/she leaves nothing here. :-p

5 |
6 |

This page is automatically generated by EGO.

7 |
8 |
-------------------------------------------------------------------------------- /themes/kactus/templates/category-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Archive

5 |
6 |
    7 | {{#posts}} 8 |
  • {{date}}  »  {{post-title}}
  • 9 |
    10 | {{/posts}} 11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /themes/kactus/templates/container.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{{header}}} 4 | 5 | {{{nav}}} 6 | {{{content}}} 7 | {{{footer}}} 8 | 9 | 10 | -------------------------------------------------------------------------------- /themes/kactus/templates/footer.mustache: -------------------------------------------------------------------------------- 1 |
{{! footer}} 2 |
3 | {{#show-meta}} 4 | 8 | {{/show-meta}} 9 |
10 |
11 | {{#show-comment}} 12 |
13 |

Comments

14 | {{#disqus-comment}} 15 |
16 | 29 | 30 | comments powered by Disqus 31 | {{/disqus-comment}} 32 | {{#duoshuo-comment}} 33 |
34 | 45 | {{/duoshuo-comment}} 46 |
47 | {{/show-comment}} 48 | 49 | 50 | 51 | 52 | {{#google-analytics}} 53 | 64 | {{/google-analytics}} 65 |
66 |
67 |

68 | Copyright © 2012 - {{author}} 69 |   -   70 | Powered by EGO 71 | 72 |

73 |
74 |
75 |
76 |
77 |
78 | -------------------------------------------------------------------------------- /themes/kactus/templates/header.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{page-title}} 3 | 4 | 5 | {{#description}} 6 | 7 | {{/description}} 8 | {{#keywords}} 9 | 10 | {{/keywords}} 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /themes/kactus/templates/index.mustache: -------------------------------------------------------------------------------- 1 | {{#categories}} 2 | 3 |
4 |
5 | 6 | 7 | 8 | 9 |

Your Names

10 |

Your Sub Title

11 | 12 |

13 |
14 |
15 |
16 | {{#posts}} 17 |
18 | 26 |
27 | {{/posts}} 28 | 29 | 30 | 31 | 32 | {{/categories}} 33 | -------------------------------------------------------------------------------- /themes/kactus/templates/nav.mustache: -------------------------------------------------------------------------------- 1 | 7 | {{#avatar}} 8 | 9 | 10 | {{/avatar}} 11 | -------------------------------------------------------------------------------- /themes/kactus/templates/post.mustache: -------------------------------------------------------------------------------- 1 |
{{! content, do NOT indent}} 2 |
3 |
4 |
5 | {{#title}} 6 |

{{title}}

7 | {{/title}} 8 |
9 |
10 |
11 | {{{content}}} 12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /themes/kactus/templates/tag-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Tag

5 | 11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /themes/kactus/templates/tag.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag: {{tag-name}}

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/kd_mdo/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/readme.txt -------------------------------------------------------------------------------- /themes/kd_mdo/resources/css/font.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'SFPixelateBold'; 3 | src: url('/media/fonts/pixelated/SFPixelateBold.ttf') format('truetype'); 4 | font-weight: bold; 5 | font-style: normal; 6 | } 7 | @font-face { 8 | font-family: 'SFPixelateRegular'; 9 | src: url('/media/fonts/pixelated/SFPixelateRegular.ttf') format('truetype'); 10 | font-weight: normal; 11 | font-style: normal; 12 | } 13 | @font-face { 14 | font-family: 'SFPixelateShadedOblique'; 15 | src: url('/media/fonts/pixelated/SFPixelateShadedOblique.ttf') format('truetype'); 16 | font-weight: normal; 17 | font-style: italic; 18 | } 19 | @font-face { 20 | font-family: 'SFPixelateShadedBoldOblique'; 21 | src: url('/media/fonts/pixelated/SFPixelateShadedBoldOblique.ttf') format('truetype'); 22 | font-weight: bold; 23 | font-style: normal; 24 | } 25 | @font-face { 26 | font-family: 'SFPixelateShadedRegular'; 27 | src: url('/media/fonts/pixelated/SFPixelateShadedRegular.ttf') format('truetype'); 28 | font-weight: normal; 29 | font-style: normal; 30 | } 31 | @font-face { 32 | font-family: 'SFPixelateBoldOblique'; 33 | src: url('/media/fonts/pixelated/SFPixelateBoldOblique.ttf') format('truetype'); 34 | font-weight: bold; 35 | font-style: italic; 36 | } 37 | @font-face { 38 | font-family: 'SFPixelateShadedBold'; 39 | src: url('/media/fonts/pixelated/SFPixelateShadedBold.ttf') format('truetype'); 40 | font-weight: bold; 41 | font-style: normal; 42 | } 43 | @font-face { 44 | font-family: 'SFPixelateOblique'; 45 | src: url('/media/fonts/pixelated/SFPixelateOblique.ttf') format('truetype'); 46 | font-weight: normal; 47 | font-style: italic; 48 | } 49 | 50 | 51 | /* The following rules are deprecated. */ 52 | 53 | @font-face { 54 | font-family: 'SF Pixelate'; 55 | src: url('/media/fonts/pixelated/SFPixelateBold.ttf') format('truetype'); 56 | font-weight: bold; 57 | font-style: normal; 58 | } 59 | 60 | @font-face { 61 | font-family: 'SF Pixelate'; 62 | src: url('/media/fonts/pixelated/SFPixelateRegular.ttf') format('truetype'); 63 | font-weight: normal; 64 | font-style: normal; 65 | } 66 | 67 | @font-face { 68 | font-family: 'SF Pixelate Shaded'; 69 | src: url('/media/fonts/pixelated/SFPixelateShadedOblique.ttf') format('truetype'); 70 | font-weight: normal; 71 | font-style: italic; 72 | } 73 | 74 | @font-face { 75 | font-family: 'SF Pixelate Shaded'; 76 | src: url('/media/fonts/pixelated/SFPixelateShadedBoldOblique.ttf') format('truetype'); 77 | font-weight: bold; 78 | font-style: normal; 79 | } 80 | 81 | @font-face { 82 | font-family: 'SF Pixelate Shaded'; 83 | src: url('/media/fonts/pixelated/SFPixelateShadedRegular.ttf') format('truetype'); 84 | font-weight: normal; 85 | font-style: normal; 86 | } 87 | 88 | @font-face { 89 | font-family: 'SF Pixelate'; 90 | src: url('/media/fonts/pixelated/SFPixelateBoldOblique.ttf') format('truetype'); 91 | font-weight: bold; 92 | font-style: italic; 93 | } 94 | 95 | @font-face { 96 | font-family: 'SF Pixelate Shaded'; 97 | src: url('/media/fonts/pixelated/SFPixelateShadedBold.ttf') format('truetype'); 98 | font-weight: bold; 99 | font-style: normal; 100 | } 101 | 102 | @font-face { 103 | font-family: 'SF Pixelate'; 104 | src: url('/media/fonts/pixelated/SFPixelateOblique.ttf') format('truetype'); 105 | font-weight: normal; 106 | font-style: italic; 107 | } -------------------------------------------------------------------------------- /themes/kd_mdo/resources/css/kdComment.css: -------------------------------------------------------------------------------- 1 | #comment-wrap {} 2 | /* #comment-wrap li { 3 | display: inline-block; 4 | } 5 | .comment-wrap li + li:before { 6 | display: inline-block; 7 | } 8 | */ 9 | #comment-wrap .disqus_label{ 10 | float:left; 11 | text-align:center; 12 | } 13 | 14 | #comment-wrap .ds-label{ 15 | float:right; 16 | text-align:center; 17 | } 18 | -------------------------------------------------------------------------------- /themes/kd_mdo/resources/css/main.css: -------------------------------------------------------------------------------- 1 | /****************************************************** 2 | * I copied these styles from markdotto.com, who is 3 | * the creator of bootstrap, and I also did some 4 | * modification. Thanks Mark for the beautiful theme, 5 | * so I reserved the @mdo sign below. 6 | *****************************************************/ 7 | 8 | /* 9 | __ 10 | __ /\ \ 11 | /'_`\_ ___ ___ \_\ \ ___ 12 | /'/'_` \ /' __` __`\ /'_` \ / __`\ 13 | /\ \ \L\ \/\ \/\ \/\ \/\ \L\ \/\ \L\ \ 14 | \ \ `\__,_\ \_\ \_\ \_\ \___,_\ \____/ 15 | \ `\_____\\/_/\/_/\/_/\/__,_ /\/___/ 16 | `\/_____/ 17 | 18 | */ 19 | 20 | 21 | 22 | /* Body resets 23 | -------------------------------------------------- */ 24 | 25 | * { 26 | -webkit-box-sizing: border-box; 27 | -moz-box-sizing: border-box; 28 | box-sizing: border-box; 29 | } 30 | html, body { 31 | margin: 0; 32 | padding: 0; 33 | } 34 | html { 35 | font-size: 62.5%; 36 | } 37 | body { 38 | padding: 20px; 39 | font-family: "PT Sans","Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Microsoft YaHei",sans-serif; 40 | /*Menlo, Monaco, monospace*/ 41 | font-size: 14px; 42 | line-height: 1.5; 43 | color: #f0fff0; 44 | background-color: #10103f; 45 | } 46 | p { 47 | margin: 0 0 20px; 48 | } 49 | 50 | .title { 51 | margin-bottom: 20px; 52 | text-align: center; 53 | } 54 | h1 { 55 | font-size:20px; 56 | } 57 | h2, h3, h4 { 58 | font-size:18px; 59 | } 60 | h1, h2, h3, h4{ 61 | position: relative; 62 | margin: 30px 0 20px; 63 | font-weight: bold; 64 | line-height: 1.1; 65 | color: #ffaa00; 66 | text-rendering: optimizeLegibility; 67 | } 68 | h2:before, h3:before, h4:before { 69 | position: absolute; 70 | top: auto; 71 | color: #cfc; 72 | display: none; 73 | } 74 | h2:before { 75 | content: "*"; 76 | left: -1.25em; 77 | } 78 | h3:before { 79 | content: "**"; 80 | left: -2em; 81 | } 82 | h4:before { 83 | content: "***"; 84 | left: -2.5em; 85 | } 86 | i, em, b, strong { 87 | padding-left: .1em; 88 | padding-right: .1em; 89 | } 90 | b, strong { 91 | font-weight: bold; 92 | color: #00ffff; 93 | } 94 | b:before, b:after, strong:before, strong:after { 95 | content: "*"; 96 | } 97 | i:before, i:after, em:before, em:after { 98 | content: "/"; 99 | } 100 | hr { 101 | margin: 0; 102 | border: 0; 103 | border-bottom: 1px solid #e2e3e4; 104 | } 105 | 106 | ul, ol { 107 | padding: 0; 108 | margin: 0 0 20px; 109 | } 110 | code, pre { 111 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 112 | } 113 | .underline { 114 | text-decoration: underline; 115 | color: #3aff3a; 116 | } 117 | .underline:before, .underline:after { 118 | content: "_"; 119 | color: #3aff3a; 120 | } 121 | code { 122 | color: #d14; 123 | } 124 | code:before, code:after { 125 | content: "="; 126 | color: #cfc; 127 | } 128 | pre { 129 | display: block; 130 | margin: 0 0 14px; 131 | padding: 15px; 132 | border: 1px solid #e1e1e8; 133 | border-radius: 3px 3px 3px 3px; 134 | line-height: 28px; 135 | background-color: #000000; 136 | white-space: pre; 137 | white-space: pre-wrap; 138 | word-break: break-all; 139 | word-wrap: break-word; 140 | } 141 | pre.src { 142 | padding-top: 1.2em; 143 | position: relative; 144 | } 145 | pre.src:before { 146 | display: none; 147 | position: absolute; 148 | background-color: white; 149 | top: -18px; 150 | right: 10px; 151 | padding: 3px; 152 | border: 1px solid black; 153 | } 154 | pre.src:hover:before { 155 | display: inline; 156 | background-color: #000000; 157 | border: 1px solid #e1e1e8; 158 | } 159 | pre.src-sh:before { content: 'sh'; } 160 | pre.src-bash:before { content: 'sh'; } 161 | pre.src-emacs-lisp:before { content: 'Emacs Lisp'; } 162 | pre.src-C:before { content: 'C/C++'; } 163 | pre.src-matlab:before { content: 'matlab'; } 164 | pre.src-maxima:before { content: 'maxima'; } 165 | pre.src-lisp:before { content: 'common lisp'; } 166 | 167 | blockquote { 168 | padding: 0 0 0 20px; 169 | margin: 0 30px 20px -22.5px; 170 | color: #999; 171 | border-left: 8px solid #e5e5e5; 172 | } 173 | blockquote p:last-child { 174 | margin-bottom: 0; 175 | } 176 | img { 177 | display: block; 178 | margin: 0; 179 | border-radius: 5px; 180 | } 181 | a { 182 | font-weight: inherit; 183 | line-height: inherit; 184 | color: #ffff00; 185 | text-decoration: none; 186 | } 187 | sup a:before { 188 | content: "["; 189 | } 190 | sup a:after { 191 | content: "]"; 192 | } 193 | a:hover { 194 | text-decoration: underline; 195 | color: #00ffff; 196 | } 197 | table { 198 | line-height: 2.5; 199 | margin-bottom: 15px; 200 | max-width: 100%; 201 | width: 100%; 202 | } 203 | table td, table th { 204 | padding: 0 15px; 205 | } 206 | table th.left, table td.left { 207 | text-align: left; 208 | } 209 | table th.right, table td.right { 210 | text-align: right; 211 | } 212 | .figure p + p { 213 | text-align: center; 214 | } 215 | 216 | /******************************************************/ 217 | /* body */ 218 | .container { 219 | margin: 0 auto; 220 | max-width: 770px; 221 | } 222 | /* head */ 223 | .masthead { 224 | color: #ada; 225 | border-bottom: 1px solid #e2e3e4; 226 | } 227 | 228 | .masthead a { 229 | color: #ffff00; 230 | } 231 | .masthead a:hover { 232 | text-decoration: underline; 233 | color: #00ffff; 234 | } 235 | .masthead ul { 236 | list-style: none; 237 | margin: 8px 0; 238 | } 239 | .masthead li { 240 | display: inline-block; 241 | } 242 | .masthead li + li:before { 243 | display: inline-block; 244 | content: "\00B7 \00a0"; 245 | color: #cfc; 246 | } 247 | 248 | /*site-nav*/ 249 | .site-nav {border-top: 1px solid #e8e8e8;} 250 | .site-nav .menu-icon { display: none; } 251 | .site-nav li a {line-height: 1.5; } 252 | .site-nav li a:not(:first-child) { margin-left: 20px; } 253 | 254 | 255 | /* searchform*/ 256 | #searchform { 257 | position: absolute; 258 | top: 54px; 259 | right: 30.4%; 260 | } 261 | #searchform #s { 262 | background: url("/media/img/search.png") no-repeat 5px 6px; 263 | box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); 264 | border: 1px solid #dfd; 265 | border-radius: 2px; 266 | -moz-border-radius: 2px; 267 | width: 90px; 268 | height: 30px; 269 | line-height: 12px; 270 | padding: 4px 10px 4px 28px; 271 | 272 | -webkit-transition-duration: 400ms; 273 | -webkit-transition-property: width, background; 274 | -webkit-transition-timing-function: ease; 275 | -moz-transition-duration: 400ms; 276 | -moz-transition-property: width, background; 277 | -moz-transition-timing-function: ease; 278 | -o-transition-duration: 400ms; 279 | -o-transition-property: width, background; 280 | -o-transition-timing-function: ease; 281 | } 282 | #searchform #s:focus { 283 | background-color: #f9f9f9; 284 | width: 160px; 285 | } 286 | .masthead img.avatar { 287 | position: absolute; 288 | width: 200px; 289 | top: 100px; 290 | right: 29%; 291 | background-color: #fff; 292 | } 293 | /* post */ 294 | .post { 295 | position: relative; 296 | border-bottom: 1px solid #e2e3e4; 297 | } 298 | 299 | .post img { 300 | max-width: 100%; 301 | } 302 | .post li { 303 | list-style: none outside none; 304 | } 305 | .post ul > li:before { 306 | content: "- "; 307 | margin-left: -0.25em; 308 | color: #cfc; 309 | } 310 | .post ol { 311 | counter-reset: o-list; 312 | } 313 | .post ol > li:before { 314 | content: counter(o-list) ") "; 315 | counter-increment: o-list; 316 | color: #cfc; 317 | } 318 | 319 | /* special for li in pre */ 320 | .post pre li { 321 | list-style-type: decimal; 322 | } 323 | 324 | .post pre li:before { 325 | display: none; 326 | } 327 | 328 | /* meta info */ 329 | .post-info { 330 | display: inline-block; 331 | margin: -10px 0 -10px; 332 | color: #ffff00; 333 | } 334 | .post-info + .post-info:before { 335 | content: "\2223 \00a0"; 336 | } 337 | .post-meta { 338 | border-bottom: 1px solid #e2e3e4; 339 | } 340 | .center { margin-left: auto; margin-right: auto; text-align: center; } 341 | 342 | /* table of content */ 343 | #table-of-contents { 344 | position: fixed; 345 | right: 0em; 346 | top: 0em; 347 | background: black; 348 | border:1px solid #e1e1e8; 349 | -webkit-box-shadow: 0 0 1em #777777; 350 | -moz-box-shadow: 0 0 1em #777777; 351 | -webkit-border-bottom-left-radius: 5px; 352 | -moz-border-radius-bottomleft: 5px; 353 | text-align: center; 354 | /* ensure doesn't flow off the screen when expanded */ 355 | max-height: 80%; 356 | overflow: auto; 357 | z-index: 200; 358 | } 359 | 360 | #table-of-contents h2 { 361 | 362 | max-width: 20em; 363 | font-weight: normal; 364 | padding-left: 0.5em; 365 | padding-top: 0.05em; 366 | padding-bottom: 0.05em; 367 | } 368 | 369 | #table-of-contents ul { 370 | margin-left: 14pt; 371 | margin-bottom: 10pt; 372 | padding: 0 373 | } 374 | 375 | #table-of-contents li { 376 | padding: 0; 377 | margin: 1px; 378 | list-style: none; 379 | } 380 | 381 | #table-of-contents ul>:first-child { 382 | color: blue; 383 | } 384 | 385 | #table-of-contents #text-table-of-contents { 386 | display: none; 387 | text-align: left; 388 | } 389 | 390 | #table-of-contents:hover #text-table-of-contents { 391 | display: block; 392 | padding: 0.5em; 393 | margin-top: -1.5em; 394 | } 395 | 396 | 397 | /* footer */ 398 | .footer { 399 | margin: 80px 0 0; 400 | text-align: center; 401 | font-size: 15px; 402 | color: #cfc; 403 | } 404 | .footer > p { 405 | margin: 0; 406 | line-height: 1.5; 407 | } 408 | .footdef { 409 | margin: 0 0 20px; 410 | } 411 | .footpara { 412 | display: inline; 413 | } 414 | 415 | /* Responsive 416 | -------------------------------------------------- */ 417 | 418 | /* site-nav*/ 419 | @media screen and (max-width: 512px) { 420 | .site-nav {border-top: 1px solid #e8e8e8; text-align: left; } 421 | .site-nav .menu-icon { display: block; width: 36px; height: 21px; line-height: 0; margin-top: 10px; margin-bottom: 5px; text-align: center; 422 | } 423 | .site-nav .menu-icon > svg { width: 18px; height: 15px; } 424 | .site-nav .menu-icon > svg path { fill: #ffff00; } 425 | .site-nav .trigger { clear: both; display: none; } 426 | .site-nav:hover .trigger { display: block; padding-bottom: 5px; } 427 | .site-nav li{ display: block; padding: 5px 10px; } 428 | .site-nav li:before{ display: inline-block; content: "\00B7 \00a0"; color: #cfc;}} 429 | 430 | /* whole page */ 431 | @media (min-width: 768px) { 432 | /* Increase body padding and font-sizes */ 433 | body { 434 | padding: 30px; 435 | font-size: 18px; 436 | line-height: 1.75; 437 | } 438 | h1:before, h2:before, h3:before, h4:before{ 439 | display: inline; 440 | } 441 | } 442 | 443 | @media (min-width: 1024px) { 444 | body { 445 | padding: 30px; 446 | } 447 | } 448 | -------------------------------------------------------------------------------- /themes/kd_mdo/resources/css/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. 2 | * 3 | * This version is slight modified based on the original version. 4 | * 5 | * Name: Stanley Ng 6 | * Email: stanleyhlng@googlegroups.com 7 | * 8 | * Reference: 9 | * http://code.google.com/p/google-code-prettify/source/browse/trunk/src/prettify.css 10 | */ 11 | .pln { 12 | color: #bd3613; } 13 | 14 | .str { 15 | color: #48b3a8; } 16 | 17 | .kwd { 18 | color: #a7bb22; } 19 | 20 | .com { 21 | color: #7a8397; 22 | font-style: italic; } 23 | 24 | .typ { 25 | color: #b58900; } 26 | 27 | .lit { 28 | color: #2aa198; } 29 | 30 | .pun { 31 | color: #a5b6b8; } 32 | 33 | .opn { 34 | color: #a5b6b8; } 35 | 36 | .clo { 37 | color: #a5b6b8; } 38 | 39 | .tag { 40 | color: #48adf4; } 41 | 42 | .atn { 43 | color: #7a8397; } 44 | 45 | .atv { 46 | color: #2aa198; } 47 | 48 | .dec { 49 | color: #48adf4; } 50 | 51 | .var { 52 | color: #48adf4; } 53 | 54 | .fun { 55 | color: #FF2222; } 56 | 57 | /* Put a border around prettyprinted code snippets. */ 58 | pre.prettyprint { 59 | background-color: #000000; 60 | padding: 10px; 61 | border: 1px solid #E1E1E8; } 62 | 63 | /* Specify class=linenums on a pre to get line numbering */ 64 | ol.linenums { 65 | color: #4c666c; 66 | margin: 0 0 0 40px; } 67 | 68 | ol.linenums li { 69 | line-height: 18px; 70 | padding-left: 12px; } 71 | -------------------------------------------------------------------------------- /themes/kd_mdo/resources/fonts/pixelated/SFPixelate-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/fonts/pixelated/SFPixelate-Bold.ttf -------------------------------------------------------------------------------- /themes/kd_mdo/resources/fonts/pixelated/SFPixelate-BoldOblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/fonts/pixelated/SFPixelate-BoldOblique.ttf -------------------------------------------------------------------------------- /themes/kd_mdo/resources/fonts/pixelated/SFPixelate-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/fonts/pixelated/SFPixelate-Oblique.ttf -------------------------------------------------------------------------------- /themes/kd_mdo/resources/fonts/pixelated/SFPixelate.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/fonts/pixelated/SFPixelate.ttf -------------------------------------------------------------------------------- /themes/kd_mdo/resources/fonts/pixelated/SFPixelateShaded-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/fonts/pixelated/SFPixelateShaded-Bold.ttf -------------------------------------------------------------------------------- /themes/kd_mdo/resources/fonts/pixelated/SFPixelateShaded-BoldObliqu.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/fonts/pixelated/SFPixelateShaded-BoldObliqu.ttf -------------------------------------------------------------------------------- /themes/kd_mdo/resources/fonts/pixelated/SFPixelateShaded-Oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/fonts/pixelated/SFPixelateShaded-Oblique.ttf -------------------------------------------------------------------------------- /themes/kd_mdo/resources/fonts/pixelated/SFPixelateShaded.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/fonts/pixelated/SFPixelateShaded.ttf -------------------------------------------------------------------------------- /themes/kd_mdo/resources/img/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/kd_mdo/resources/img/search.png -------------------------------------------------------------------------------- /themes/kd_mdo/resources/js/kdComment.js: -------------------------------------------------------------------------------- 1 | //(require 'jquery) 2 | 3 | /* comments */ 4 | var kd_disqus_thread=$('#disqus_thread'); 5 | var ds_label=$('.ds-thread'); 6 | 7 | $('.disqus_label').click(function(){ 8 | kd_disqus_thread.show(); 9 | ds_label.hide(); 10 | }); 11 | 12 | $('.ds-label').click(function(){ 13 | kd_disqus_thread.hide(); 14 | ds_label.show(); 15 | }); 16 | 17 | /* navigate */ 18 | var kd_toc = $('#text-table-of-contents ul li'); 19 | var kd_n = 1; 20 | var kd_tmp = kd_n; 21 | var kd_head = $('div[id*=\'text-orgheadline\']'); 22 | var topArray = []; 23 | while(kd_n <= kd_head.length){ 24 | topArray.push(kd_head.eq(kd_n-1).offset().top); 25 | kd_n++; 26 | } 27 | $(window).scroll(function () { 28 | //kd_str="#orgheadline" + kd_n.toString(); 29 | //var top1=kd_head.find(kd_str).offset().top; 30 | var startPoint=0; 31 | var endPoint=topArray.length-1; 32 | var offsetValue=window.pageYOffset+60; 33 | if(topArray[kd_tmp]>offsetValue || offsetValue>topArray[kd_tmp+1]){ 34 | while((startPoint+1) < endPoint){ 35 | if(topArray[Math.floor((startPoint+endPoint)/2)] > offsetValue){ 36 | endPoint = Math.floor((startPoint+endPoint)/2); 37 | } 38 | else if(topArray[Math.floor((startPoint+endPoint)/2)] < offsetValue){ 39 | startPoint = Math.floor((startPoint+endPoint)/2); 40 | } 41 | else{ 42 | break; 43 | } 44 | } 45 | if(offsetValue>topArray[topArray.length-1]){ 46 | kd_n=topArray.length-1; 47 | } 48 | else if(offsetValue>topArray[topArray.length-2]){ 49 | kd_n=topArray.length-2; 50 | } 51 | else{ 52 | kd_n = startPoint; 53 | } 54 | 55 | kd_toc.eq(kd_tmp).children('a').css('color', '#ffff00'); 56 | kd_tmp = kd_n; 57 | kd_toc.eq(kd_tmp).children('a').css('color', '#22ff22'); 58 | //kd_n = parseInt(kd_str.slice(-1)); 59 | } 60 | }); 61 | 62 | /* floating card */ 63 | function popupActivate (evt) { 64 | var boundBox = evt.target.getBoundingClientRect(); 65 | var coordX = boundBox.left; 66 | var coordY = boundBox.top; 67 | balloon.style.position="fixed"; 68 | balloon.style.left= (coordX + 30).toString() + "px"; 69 | balloon.style.top= (coordY + 30).toString() + "px"; 70 | 71 | if(evt.target.firstChild.parentNode.nextSibling.tagName == "SUP"){ 72 | var footRef = evt.target.nextSibling.childNodes[0].id; 73 | var docNode = document.getElementById("fn."+footRef.slice(-1)); 74 | var nodeNew = docNode.parentNode.parentNode.lastChild.cloneNode(true); 75 | balloon.replaceChild(nodeNew,balloon.lastChild); 76 | balloon.style.visibility="visible"; 77 | } 78 | } 79 | 80 | function popupOff(evt) { 81 | balloon.style.visibility="hidden"; 82 | } 83 | 84 | function ls_init () { 85 | 86 | // create balloon element, insert as first child of refNode 87 | function createBalloon (refNode) { 88 | // create balloon element to display info 89 | balloon = document.createElement("div"); 90 | balloon.style.visibility="hidden"; 91 | balloon.style.position="fixed"; 92 | balloon.style.top=".5ex"; 93 | balloon.style.left=".5ex"; 94 | balloon.style.padding=".5ex"; 95 | balloon.style.textAlign="left"; 96 | balloon.style.border="solid thin green"; 97 | balloon.style.borderRadius="1ex"; 98 | balloon.style.backgroundColor="hsla(240,80%,50%,0.8)"; 99 | balloon.style.boxShadow="3px 3px 8px black"; 100 | balloon.style.zIndex="341"; 101 | balloon.innerHTML="

tips

"; 102 | // insert into DOM 103 | refNode.insertBefore(balloon, refNode.firstChild); 104 | } 105 | 106 | var myList = document.querySelectorAll(".underline"); 107 | 108 | // assign handler to hot hoover elements 109 | if ( myList.length > 0 ) { 110 | for (var ii = 0; ii < myList.length; ii++) { 111 | var myNode = myList[ii]; 112 | myNode.addEventListener("mouseover", popupActivate , false); 113 | myNode.addEventListener("mouseout", popupOff , false); 114 | } 115 | } 116 | 117 | createBalloon(document.body); 118 | } 119 | 120 | var balloon; 121 | 122 | ls_init(); 123 | 124 | /* editable */ 125 | 126 | 127 | /* backgroundImage */ 128 | -------------------------------------------------------------------------------- /themes/kd_mdo/resources/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | /******************************************************************* 3 | * 1. replace css class "src" and "example" with "prettyprint", for 4 | * prettify.js to render 5 | * 2. replace detail language css class, e.g. "src-scheme" to 6 | * "lang-scheme" per the description of prettify.js 7 | ******************************************************************/ 8 | var $blocks = $('pre.src'); 9 | $blocks.each(function(index) { 10 | var self = $(this); 11 | var classes = self.removeClass('src').attr('class').split(/\s+/); 12 | $.each(classes, function(idx, cls) { 13 | if (cls.substring(0, 4) === 'src-') { 14 | var lang = cls.substring(4); 15 | self.removeClass(cls).addClass('lang-' + lang); 16 | } 17 | }); 18 | self.addClass('prettyprint'); 19 | }); 20 | $('pre.example').removeClass('example').addClass('prettyprint'); 21 | 22 | /******************************************************************* 23 | * 1. remove all org exported line number spans 24 | * 2. add css class "linenums" to code block per the description of 25 | * prettify.js 26 | ******************************************************************/ 27 | var $lines = $('span.linenr'); 28 | var $linedBlocks = $lines.parent(); 29 | $lines.remove(); 30 | $linedBlocks.each(function(index) { 31 | $(this).addClass('linenums'); 32 | }); 33 | 34 | /******************************************************************* 35 | * pretty print all code blocks 36 | ******************************************************************/ 37 | prettyPrint(); 38 | }); 39 | -------------------------------------------------------------------------------- /themes/kd_mdo/resources/js/prettify.js: -------------------------------------------------------------------------------- 1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= 3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), 9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, 11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, 12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), 13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} 14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ 21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), 22 | ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", 23 | /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), 24 | ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", 25 | hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= 26 | !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p 2 |

About {{author}}

3 |
4 |

{{author}} 是个大懒虫

5 |
6 |
7 | -------------------------------------------------------------------------------- /themes/kd_mdo/templates/category-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{cat-name}} Index

4 |
    5 | {{#posts}} 6 |
  • {{date}}  »  {{post-title}}
  • 7 | {{/posts}} 8 |
9 |
10 |
-------------------------------------------------------------------------------- /themes/kd_mdo/templates/container.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{{header}}} 4 | 5 | {{{nav}}} 6 | {{{content}}} 7 | {{{footer}}} 8 | 9 | 10 | -------------------------------------------------------------------------------- /themes/kd_mdo/templates/footer.mustache: -------------------------------------------------------------------------------- 1 |
{{! footer}} 2 | {{#show-meta}} 3 | 9 | {{/show-meta}} 10 | 11 | {{#show-comment}} 12 |
13 |

Comments

14 |
15 | 使用Disqus评论 16 | 使用多说评论 17 | 18 | {{#disqus-comment}} 19 |
20 | 34 | 35 | comments powered by Disqus 36 | {{/disqus-comment}} 37 | {{#duoshuo-comment}} 38 |
39 | 51 | {{/duoshuo-comment}} 52 |
53 | {{/show-comment}} 54 | 55 | {{#google-analytics}} 56 | 67 | {{/google-analytics}} 68 | 78 |
79 | -------------------------------------------------------------------------------- /themes/kd_mdo/templates/header.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{page-title}} 3 | 4 | 5 | 7 | 8 | {{#description}} 9 | 10 | {{/description}} 11 | {{#keywords}} 12 | 13 | {{/keywords}} 14 | 18 | 19 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /themes/kd_mdo/templates/index.mustache: -------------------------------------------------------------------------------- 1 | {{#categories}} 2 |
3 |

{{category}}

4 |
5 | 10 |
11 |
12 | {{/categories}} -------------------------------------------------------------------------------- /themes/kd_mdo/templates/nav.mustache: -------------------------------------------------------------------------------- 1 |
{{! nav }} 2 |
3 |

{{site-main-title}}

4 |

{{site-sub-title}}

5 | 23 |
24 | 25 | 26 |
27 | {{#avatar}} 28 | 29 | {{/avatar}} 30 |
31 |
32 | -------------------------------------------------------------------------------- /themes/kd_mdo/templates/post.mustache: -------------------------------------------------------------------------------- 1 |
{{! content, do NOT indent}} 2 |
3 | {{#title}} 4 |

{{title}}

5 | {{/title}} 6 | {{{content}}} 7 |
8 |
-------------------------------------------------------------------------------- /themes/kd_mdo/templates/tag-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag Index

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/kd_mdo/templates/tag.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag: {{tag-name}}

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/mdo/resources/css/main.css: -------------------------------------------------------------------------------- 1 | /****************************************************** 2 | * I copied these styles from markdotto.com, who is 3 | * the creator of bootstrap, and I also did some 4 | * modification. Thanks Mark for the beautiful theme, 5 | * so I reserved the @mdo sign below. 6 | *****************************************************/ 7 | 8 | /* 9 | __ 10 | __ /\ \ 11 | /'_`\_ ___ ___ \_\ \ ___ 12 | /'/'_` \ /' __` __`\ /'_` \ / __`\ 13 | /\ \ \L\ \/\ \/\ \/\ \/\ \L\ \/\ \L\ \ 14 | \ \ `\__,_\ \_\ \_\ \_\ \___,_\ \____/ 15 | \ `\_____\\/_/\/_/\/_/\/__,_ /\/___/ 16 | `\/_____/ 17 | 18 | */ 19 | 20 | 21 | 22 | /* Body resets 23 | -------------------------------------------------- */ 24 | 25 | * { 26 | -webkit-box-sizing: border-box; 27 | -moz-box-sizing: border-box; 28 | box-sizing: border-box; 29 | } 30 | html, body { 31 | margin: 0; 32 | padding: 0; 33 | } 34 | html { 35 | font-size: 62.5%; 36 | } 37 | body { 38 | padding: 20px; 39 | font-family: Menlo, Monaco, monospace; 40 | font-size: 14px; 41 | line-height: 1.5; 42 | color: #666; 43 | background-color: #fff; 44 | } 45 | p { 46 | margin: 0 0 20px; 47 | } 48 | h1, h2, h3 { 49 | position: relative; 50 | margin: 30px 0 20px; 51 | font-size: 18px; 52 | font-weight: bold; 53 | line-height: 1.1; 54 | color: #111; 55 | text-rendering: optimizeLegibility; 56 | } 57 | h1:before, h2:before, h3:before { 58 | position: absolute; 59 | top: auto; 60 | color: #ccc; 61 | display: none; 62 | } 63 | h1:before { 64 | content: "*"; 65 | left: -1.25em; 66 | } 67 | h2:before { 68 | content: "**"; 69 | left: -2em; 70 | } 71 | h3:before { 72 | content: "***"; 73 | left: -2.5em; 74 | } 75 | i, em, b, strong { 76 | padding-left: .1em; 77 | padding-right: .1em; 78 | } 79 | b, strong { 80 | font-weight: bold; 81 | color: #333; 82 | } 83 | b:before, b:after, strong:before, strong:after { 84 | content: "*"; 85 | } 86 | i:before, i:after, em:before, em:after { 87 | content: "/"; 88 | } 89 | hr { 90 | margin: 0; 91 | border: 0; 92 | } 93 | hr:after { 94 | display: block; 95 | margin: 20px 0; 96 | content: "----------------------------------------------------------------"; 97 | color: #ccc; 98 | } 99 | ul, ol { 100 | padding: 0; 101 | margin: 0 0 20px; 102 | } 103 | code, pre { 104 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 105 | } 106 | code { 107 | color: #d14; 108 | } 109 | code:before, code:after { 110 | content: "="; 111 | color: #ccc; 112 | } 113 | pre { 114 | display: block; 115 | margin: 0 0 14px; 116 | padding: 15px; 117 | border-radius: 3px 3px 3px 3px; 118 | font-size: 18px; 119 | line-height: 28px; 120 | background-color: #f5f5f5; 121 | white-space: pre; 122 | white-space: pre-wrap; 123 | word-break: break-all; 124 | word-wrap: break-word; 125 | } 126 | blockquote { 127 | padding: 0 0 0 20px; 128 | margin: 0 30px 20px -22.5px; 129 | color: #999; 130 | border-left: 8px solid #e5e5e5; 131 | } 132 | blockquote p:last-child { 133 | margin-bottom: 0; 134 | } 135 | img { 136 | display: block; 137 | margin: 0; 138 | border-radius: 5px; 139 | } 140 | a { 141 | font-weight: inherit; 142 | line-height: inherit; 143 | color: #000; 144 | text-decoration: none; 145 | } 146 | sup a:before { 147 | content: "["; 148 | } 149 | sup a:after { 150 | content: "]"; 151 | } 152 | a:hover { 153 | text-decoration: underline; 154 | } 155 | table { 156 | line-height: 2.5; 157 | margin-bottom: 15px; 158 | max-width: 100%; 159 | width: 100%; 160 | } 161 | table td, table th { 162 | padding: 0 15px; 163 | } 164 | table th.left, table td.left { 165 | text-align: left; 166 | } 167 | table th.right, table td.right { 168 | text-align: right; 169 | } 170 | /******************************************************/ 171 | /* body */ 172 | .container { 173 | margin: 0 auto; 174 | max-width: 770px; 175 | } 176 | /* head */ 177 | .masthead { 178 | color: #888; 179 | } 180 | .masthead:after { 181 | display: block; 182 | content: '----------------------------------------------------------------'; 183 | margin: 10px 0; 184 | color: #ccc; 185 | } 186 | .masthead a { 187 | color: #333; 188 | } 189 | .masthead ul { 190 | list-style: none; 191 | } 192 | .masthead li { 193 | display: inline-block; 194 | } 195 | .masthead li + li:before { 196 | display: inline-block; 197 | content: "\00B7 \00a0"; 198 | color: #ccc; 199 | } 200 | /* searchform*/ 201 | #searchform { 202 | position: absolute; 203 | top: 54px; 204 | right: 30.4%; 205 | } 206 | #searchform #s { 207 | background: url("/media/img/search.png") no-repeat 5px 6px; 208 | box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); 209 | border: 1px solid #ddd; 210 | border-radius: 2px; 211 | -moz-border-radius: 2px; 212 | width: 90px; 213 | height: 30px; 214 | line-height: 12px; 215 | padding: 4px 10px 4px 28px; 216 | 217 | -webkit-transition-duration: 400ms; 218 | -webkit-transition-property: width, background; 219 | -webkit-transition-timing-function: ease; 220 | -moz-transition-duration: 400ms; 221 | -moz-transition-property: width, background; 222 | -moz-transition-timing-function: ease; 223 | -o-transition-duration: 400ms; 224 | -o-transition-property: width, background; 225 | -o-transition-timing-function: ease; 226 | } 227 | #searchform #s:focus { 228 | background-color: #f9f9f9; 229 | width: 160px; 230 | } 231 | .masthead img.avatar { 232 | position: relative; 233 | float: right; 234 | margin-top: -100px; 235 | margin-bottom: -100%; 236 | margin-right: 10%; 237 | width: 200px; 238 | background-color: #fff; 239 | } 240 | /* post */ 241 | .post { 242 | position: relative; 243 | } 244 | .post:after { 245 | display: block; 246 | content: "----------------------------------------------------------------"; 247 | color: #ccc; 248 | } 249 | .post img { 250 | max-width: 100%; 251 | } 252 | .post li { 253 | list-style: none outside none; 254 | } 255 | .post ul > li:before { 256 | content: "- "; 257 | margin-left: -1.25em; 258 | color: #ccc; 259 | } 260 | .post ol { 261 | counter-reset: o-list; 262 | } 263 | .post ol > li:before { 264 | content: counter(o-list) ") "; 265 | counter-increment: o-list; 266 | margin-left: -1.85em; 267 | color: #ccc; 268 | } 269 | 270 | /* special for li in pre */ 271 | .post pre li { 272 | list-style-type: decimal; 273 | } 274 | 275 | .post pre li:before { 276 | display: none; 277 | } 278 | 279 | /* meta info */ 280 | .post-info { 281 | display: inline-block; 282 | margin: -10px 0 -10px; 283 | color: #999; 284 | } 285 | .post-info + .post-info:before { 286 | content: "\2223 \00a0"; 287 | } 288 | .post-meta:after { 289 | content: "----------------------------------------------------------------"; 290 | display: block; 291 | margin-top: -1px; 292 | color: #ccc; 293 | } 294 | 295 | /* table of content */ 296 | #table-of-contents { 297 | position: fixed; 298 | right: 0em; 299 | top: 0em; 300 | border:1px solid #e1e1e8; 301 | -webkit-box-shadow: 0 0 1em #777777; 302 | -moz-box-shadow: 0 0 1em #777777; 303 | -webkit-border-bottom-left-radius: 5px; 304 | -moz-border-radius-bottomleft: 5px; 305 | text-align: right; 306 | /* ensure doesn't flow off the screen when expanded */ 307 | max-height: 80%; 308 | overflow: auto; 309 | z-index: 200; 310 | } 311 | 312 | #table-of-contents h2 { 313 | max-width: 20em; 314 | font-weight: normal; 315 | padding-left: 0.5em; 316 | padding-top: 0.05em; 317 | padding-bottom: 0.05em; 318 | } 319 | 320 | #table-of-contents ul { 321 | margin-left: 14pt; 322 | margin-bottom: 10pt; 323 | padding: 0 324 | } 325 | 326 | #table-of-contents li { 327 | padding: 0; 328 | margin: 1px; 329 | list-style: none; 330 | } 331 | 332 | #table-of-contents ul>:first-child { 333 | color: blue; 334 | } 335 | 336 | #table-of-contents #text-table-of-contents { 337 | display: none; 338 | text-align: left; 339 | } 340 | 341 | #table-of-contents:hover #text-table-of-contents { 342 | display: block; 343 | padding: 0.5em; 344 | margin-top: -1.5em; 345 | } 346 | 347 | /* footer */ 348 | .footer { 349 | margin: 80px 0 0; 350 | text-align: center; 351 | font-size: 15px; 352 | color: #999; 353 | } 354 | .footer > p { 355 | margin: 0; 356 | line-height: 1.5; 357 | } 358 | .footpara { 359 | display: inline; 360 | } 361 | 362 | /* Responsive 363 | -------------------------------------------------- */ 364 | 365 | @media (min-width: 768px) { 366 | /* Increase body padding and font-sizes */ 367 | body { 368 | padding: 30px; 369 | font-size: 18px; 370 | line-height: 1.75; 371 | } 372 | h1:before, h2:before, h3:before { 373 | display: inline; 374 | } 375 | } 376 | 377 | @media (min-width: 1024px) { 378 | body { 379 | padding: 30px; 380 | } 381 | } 382 | -------------------------------------------------------------------------------- /themes/mdo/resources/css/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. 2 | * 3 | * This version is slight modified based on the original version. 4 | * 5 | * Name: Stanley Ng 6 | * Email: stanleyhlng@googlegroups.com 7 | * 8 | * Reference: 9 | * http://code.google.com/p/google-code-prettify/source/browse/trunk/src/prettify.css 10 | */ 11 | .pln { 12 | color: #bd3613; } 13 | 14 | .str { 15 | color: #269186; } 16 | 17 | .kwd { 18 | color: #859900; } 19 | 20 | .com { 21 | color: #586175; 22 | font-style: italic; } 23 | 24 | .typ { 25 | color: #b58900; } 26 | 27 | .lit { 28 | color: #2aa198; } 29 | 30 | .pun { 31 | color: #839496; } 32 | 33 | .opn { 34 | color: #839496; } 35 | 36 | .clo { 37 | color: #839496; } 38 | 39 | .tag { 40 | color: #268bd2; } 41 | 42 | .atn { 43 | color: #586175; } 44 | 45 | .atv { 46 | color: #2aa198; } 47 | 48 | .dec { 49 | color: #268bd2; } 50 | 51 | .var { 52 | color: #268bd2; } 53 | 54 | .fun { 55 | color: #FF0000; } 56 | 57 | /* Put a border around prettyprinted code snippets. */ 58 | pre.prettyprint { 59 | background-color: #042029; 60 | padding: 10px; 61 | border: 1px solid #E1E1E8; } 62 | 63 | /* Specify class=linenums on a pre to get line numbering */ 64 | ol.linenums { 65 | color: #4c666c; 66 | margin: 0 0 0 40px; } 67 | 68 | ol.linenums li { 69 | line-height: 18px; 70 | padding-left: 12px; } -------------------------------------------------------------------------------- /themes/mdo/resources/img/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/mdo/resources/img/search.png -------------------------------------------------------------------------------- /themes/mdo/resources/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | /******************************************************************* 3 | * 1. replace css class "src" and "example" with "prettyprint", for 4 | * prettify.js to render 5 | * 2. replace detail language css class, e.g. "src-scheme" to 6 | * "lang-scheme" per the description of prettify.js 7 | ******************************************************************/ 8 | var $blocks = $('pre.src'); 9 | $blocks.each(function(index) { 10 | var self = $(this); 11 | var classes = self.removeClass('src').attr('class').split(/\s+/); 12 | $.each(classes, function(idx, cls) { 13 | if (cls.substring(0, 4) === 'src-') { 14 | var lang = cls.substring(4); 15 | self.removeClass(cls).addClass('lang-' + lang); 16 | } 17 | }); 18 | self.addClass('prettyprint'); 19 | }); 20 | $('pre.example').removeClass('example').addClass('prettyprint'); 21 | 22 | /******************************************************************* 23 | * 1. remove all org exported line number spans 24 | * 2. add css class "linenums" to code block per the description of 25 | * prettify.js 26 | ******************************************************************/ 27 | var $lines = $('span.linenr'); 28 | var $linedBlocks = $lines.parent(); 29 | $lines.remove(); 30 | $linedBlocks.each(function(index) { 31 | $(this).addClass('linenums'); 32 | }); 33 | 34 | /******************************************************************* 35 | * pretty print all code blocks 36 | ******************************************************************/ 37 | prettyPrint(); 38 | }); 39 | -------------------------------------------------------------------------------- /themes/mdo/templates/about.mustache: -------------------------------------------------------------------------------- 1 |
2 |

About {{author}}

3 |
4 |

{{author}} is a little lazy, he/she leaves nothing here. :-p

5 |
6 |

This page is automatically generated by EGO.

7 |
8 |
-------------------------------------------------------------------------------- /themes/mdo/templates/category-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{cat-name}} Index

4 |
    5 | {{#posts}} 6 |
  • {{date}}  »  {{post-title}}
  • 7 | {{/posts}} 8 |
9 |
10 |
-------------------------------------------------------------------------------- /themes/mdo/templates/container.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{{header}}} 4 | 5 | {{{nav}}} 6 | {{{content}}} 7 | {{{footer}}} 8 | 9 | 10 | -------------------------------------------------------------------------------- /themes/mdo/templates/footer.mustache: -------------------------------------------------------------------------------- 1 |
{{! footer}} 2 | {{#show-meta}} 3 | 9 | {{/show-meta}} 10 | {{#show-comment}} 11 |
12 |

Comments

13 | {{#disqus-comment}} 14 |
15 | 28 | 29 | comments powered by Disqus 30 | {{/disqus-comment}} 31 | {{#duoshuo-comment}} 32 |
33 | 44 | {{/duoshuo-comment}} 45 | {{#hashover-comment}} 46 |
47 | 48 | 49 | {{/hashover-comment}} 50 |
51 | {{/show-comment}} 52 | 53 | 54 | 55 | 56 | {{#google-analytics}} 57 | 68 | {{/google-analytics}} 69 | 78 |
79 | -------------------------------------------------------------------------------- /themes/mdo/templates/header.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{page-title}} 3 | 4 | 5 | {{#description}} 6 | 7 | {{/description}} 8 | {{#keywords}} 9 | 10 | {{/keywords}} 11 | 12 | 13 | -------------------------------------------------------------------------------- /themes/mdo/templates/index.mustache: -------------------------------------------------------------------------------- 1 | {{#categories}} 2 |
3 |

{{category}}

4 |
5 | 10 |
11 |
12 | {{/categories}} -------------------------------------------------------------------------------- /themes/mdo/templates/nav.mustache: -------------------------------------------------------------------------------- 1 |
{{! nav }} 2 |
3 |

{{site-main-title}}

4 |

{{site-sub-title}}

5 | 14 |
15 | 16 | 17 |
18 | {{#avatar}} 19 | 20 | {{/avatar}} 21 |
22 |
23 | -------------------------------------------------------------------------------- /themes/mdo/templates/post.mustache: -------------------------------------------------------------------------------- 1 |
{{! content, do NOT indent}} 2 |
3 | {{#title}} 4 |

{{title}}

5 | {{/title}} 6 | {{{content}}} 7 |
8 |
-------------------------------------------------------------------------------- /themes/mdo/templates/tag-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag Index

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/mdo/templates/tag.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag: {{tag-name}}

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/phaer/resources/css/main.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | body { 7 | font-size: 18px; 8 | font-family: Georgia, Palatino, "Palatino Linotype", FreeSerif, serif; 9 | line-height: 160%; 10 | } 11 | 12 | ul { 13 | padding-left: 0; 14 | } 15 | 16 | dt, dd { float: left; } 17 | dt { 18 | clear: left; 19 | font-weight: bold; 20 | } 21 | 22 | .contact div { clear: both; } 23 | .contact dt { width: 5em; } 24 | 25 | code { 26 | font-family: 'Inconsolata', monospace; 27 | font-size: 0.8em; 28 | } 29 | 30 | .title { 31 | font-size: 160%; 32 | line-height: 200%; 33 | } 34 | 35 | a:hover { text-decoration: none; } 36 | 37 | #header { 38 | margin: 0px auto; 39 | max-width: 42em; 40 | } 41 | 42 | #header ul { 43 | padding: 0; 44 | font-variant: small-caps; 45 | list-style-type: none; 46 | } 47 | #header ul li { 48 | display: inline; 49 | margin-right: 2em; 50 | } 51 | #header ul li a { 52 | font-size: 120%; 53 | text-decoration: none; 54 | border-bottom: 1px solid #ccc; 55 | color: black; 56 | } 57 | #header ul li a:hover { border-color: black; } 58 | 59 | #content { 60 | margin: 1em auto; 61 | padding: 0.5em 4em; 62 | max-width: 42em; 63 | box-shadow: 0px 0px 0.5em #aaa; 64 | 65 | line-height: 180%; 66 | } 67 | 68 | #footer { 69 | margin: 0.5em auto; 70 | padding: 0.5em 1.333em; 71 | max-width: 56em; 72 | 73 | color: #555; 74 | text-align: center; 75 | font-size: 75%; 76 | } 77 | #footer a { color: #555; } 78 | 79 | .tag span { 80 | font-size: 75%; 81 | color: #555; 82 | } 83 | -------------------------------------------------------------------------------- /themes/phaer/resources/css/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. 2 | * 3 | * This version is slight modified based on the original version. 4 | * 5 | * Name: Stanley Ng 6 | * Email: stanleyhlng@googlegroups.com 7 | * 8 | * Reference: 9 | * http://code.google.com/p/google-code-prettify/source/browse/trunk/src/prettify.css 10 | */ 11 | .pln { 12 | color: #bd3613; } 13 | 14 | .str { 15 | color: #269186; } 16 | 17 | .kwd { 18 | color: #859900; } 19 | 20 | .com { 21 | color: #586175; 22 | font-style: italic; } 23 | 24 | .typ { 25 | color: #b58900; } 26 | 27 | .lit { 28 | color: #2aa198; } 29 | 30 | .pun { 31 | color: #839496; } 32 | 33 | .opn { 34 | color: #839496; } 35 | 36 | .clo { 37 | color: #839496; } 38 | 39 | .tag { 40 | color: #268bd2; } 41 | 42 | .atn { 43 | color: #586175; } 44 | 45 | .atv { 46 | color: #2aa198; } 47 | 48 | .dec { 49 | color: #268bd2; } 50 | 51 | .var { 52 | color: #268bd2; } 53 | 54 | .fun { 55 | color: #FF0000; } 56 | 57 | /* Put a border around prettyprinted code snippets. */ 58 | pre.prettyprint { 59 | background-color: #042029; 60 | padding: 10px; 61 | border: 1px solid #E1E1E8; } 62 | 63 | /* Specify class=linenums on a pre to get line numbering */ 64 | ol.linenums { 65 | color: #4c666c; 66 | margin: 0 0 0 40px; } 67 | 68 | ol.linenums li { 69 | line-height: 18px; 70 | padding-left: 12px; } -------------------------------------------------------------------------------- /themes/phaer/templates/category-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |

{{cat-name}}

3 | 8 |
-------------------------------------------------------------------------------- /themes/phaer/templates/container.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{{header}}} 4 | 5 | {{{nav}}} 6 | {{{content}}} 7 | {{{footer}}} 8 | 9 | 10 | -------------------------------------------------------------------------------- /themes/phaer/templates/footer.mustache: -------------------------------------------------------------------------------- 1 | {{#show-meta-info}} 2 | 8 | {{/show-meta-info}} 9 | 10 |
11 | Send comments, critique and suggestions to {{author}}. 12 | Powered by EGO 13 |
14 | -------------------------------------------------------------------------------- /themes/phaer/templates/header.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{page-title}} 3 | 4 | 5 | {{#description}} 6 | 7 | {{/description}} 8 | {{#keywords}} 9 | 10 | {{/keywords}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /themes/phaer/templates/index.mustache: -------------------------------------------------------------------------------- 1 |
2 | {{#categories}} 3 |
4 |

{{category}}

5 |
6 | 11 |
12 |
13 | {{/categories}} 14 |
-------------------------------------------------------------------------------- /themes/phaer/templates/nav.mustache: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /themes/phaer/templates/post.mustache: -------------------------------------------------------------------------------- 1 |
2 | {{#title}} 3 |

{{title}}

4 | {{/title}} 5 | {{{content}}} 6 |
7 | -------------------------------------------------------------------------------- /themes/phaer/templates/tag-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |

Tags

3 |
    4 | {{#tags}} 5 |
  • {{tag-name}} {{count}}
  • 6 | {{/tags}} 7 |
8 |
-------------------------------------------------------------------------------- /themes/phaer/templates/tag.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag: {{tag-name}}

4 | 9 |
10 |
-------------------------------------------------------------------------------- /themes/worg/resources/img/horse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/worg/resources/img/horse.jpg -------------------------------------------------------------------------------- /themes/worg/templates/nav.mustache: -------------------------------------------------------------------------------- 1 |
{{! nav }} 2 |
3 |

{{site-main-title}} {{site-sub-title}}

4 | 21 |
22 | 23 | 24 |
25 | {{#avatar}} 26 | 27 | {{/avatar}} 28 |
29 |
30 | -------------------------------------------------------------------------------- /themes/wy/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/wy/1.png -------------------------------------------------------------------------------- /themes/wy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/emacs-china/EGO/211c4cb2af2582849d9df984fb2346deecaf79be/themes/wy/2.png -------------------------------------------------------------------------------- /themes/wy/README.org: -------------------------------------------------------------------------------- 1 | from http://www.yinwang.org 2 | 3 | delete your index.org 4 | 5 | git clone https://github.com/venmos/org-page-theme-wy.git 6 | 7 | cp -r org-page-theme-wy ~/.emacs.d/elpa/org-page-xxxx.xx/themes/ or ln -s ~/Github/org-page-theme-wy ~/.emacs.d/elpa/org-page-xxxx.xx/themes/org-page-theme-wy 8 | 9 | change org-page config 10 | 11 | add (setq op/theme 'org-page-theme-wy) 12 | 13 | [[file:1.png]] 14 | 15 | [[file:2.png]] 16 | -------------------------------------------------------------------------------- /themes/wy/resources/css/posts.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family:"lucida grande", "lucida sans unicode", lucida, helvetica, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; 3 | font-size: 18px; 4 | } 5 | 6 | post-wy { 7 | margin: 10% 30% 10% 30%; 8 | padding: 4% 10% 10% 10%; 9 | width: 50%; 10 | line-height: 150%; 11 | border: 1px solid LightGrey; 12 | } 13 | 14 | H1 { 15 | font-family: "Palatino Linotype", "Book Antiqua", Palatino, Helvetica, STKaiti, SimSun, serif; 16 | text-align: center; 17 | } 18 | 19 | H2 { 20 | font-family: "Palatino Linotype", "Book Antiqua", Palatino, Helvetica, STKaiti, SimSun, serif; 21 | margin-bottom: 60px; 22 | margin-bottom: 40px; 23 | padding: 5px; 24 | border-bottom: 2px LightGrey solid; 25 | width: 98%; 26 | line-height: 150%; 27 | color: #666666; 28 | } 29 | 30 | 31 | H3 { 32 | font-family: "Palatino Linotype", "Book Antiqua", Palatino, Helvetica, STKaiti, SimSun, serif; 33 | margin-top: 40px; 34 | margin-bottom: 30px; 35 | width: 98%; 36 | line-height: 150%; 37 | color: #666666; 38 | } 39 | 40 | 41 | H4 { 42 | font-family: "Palatino Linotype", "Book Antiqua", Palatino, Helvetica, STKaiti, SimSun, serif; 43 | margin-top: 40px; 44 | margin-bottom: 30px; 45 | border-bottom: 1px LightGrey solid; 46 | width: 98%; 47 | line-height: 150%; 48 | color: #666666; 49 | } 50 | 51 | 52 | li { 53 | margin-left: 10px; 54 | } 55 | 56 | 57 | blockquote { 58 | border-left: 4px lightgrey solid; 59 | padding-left: 5px; 60 | margin-left: 20px; 61 | } 62 | 63 | 64 | pre { 65 | font-family: Inconsolata, Consolas, "DEJA VU SANS MONO", "DROID SANS MONO", Proggy, monospace; 66 | font-size: 75%; 67 | border: solid 1px lightgrey; 68 | background-color: Ivory; 69 | padding: 5px; 70 | line-height: 130%; 71 | margin-left: 10px; 72 | width: 95%; 73 | } 74 | 75 | 76 | code { 77 | font-family: Inconsolata, Consolas, "DEJA VU SANS MONO", "DROID SANS MONO", Proggy, monospace; 78 | font-size: 90%; 79 | } 80 | 81 | a:hover { 82 | background-color: LightGrey; 83 | } 84 | 85 | 86 | img { 87 | display: block; 88 | box-shadow: 0 0 10px #555; 89 | border-radius: 6px; 90 | margin-left: auto; 91 | margin-right: auto; 92 | margin-top: 10px; 93 | margin-bottom: 10px; 94 | -webkit-box-shadow: 0 0 10px #555; 95 | } 96 | 97 | 98 | hr { 99 | color: LightGrey; 100 | } 101 | -------------------------------------------------------------------------------- /themes/wy/templates/about.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

About {{author}}

7 |
8 |

{{author}} is a little lazy, he/she leaves nothing here. :-p

9 |
10 |

This page is automatically generated by EGO.

11 |
12 |
13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /themes/wy/templates/category-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |

{{cat-name}}

3 | 8 |
-------------------------------------------------------------------------------- /themes/wy/templates/container.mustache: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{{header}}} 4 | 5 | {{{nav}}} 6 | {{{content}}} 7 | {{{footer}}} 8 | 9 | 10 | -------------------------------------------------------------------------------- /themes/wy/templates/footer.mustache: -------------------------------------------------------------------------------- 1 | {{#show-meta}} 2 | 8 | {{/show-meta}} 9 |
10 |

Generated by {{{creator-info}}}

11 |

12 | Copyright © 2012 - {{author}} 13 |   -   14 | Powered by EGO 15 | 16 |

17 |
18 | -------------------------------------------------------------------------------- /themes/wy/templates/header.mustache: -------------------------------------------------------------------------------- 1 | 2 | {{page-title}} 3 | 4 | 5 | {{#description}} 6 | 7 | {{/description}} 8 | {{#keywords}} 9 | 10 | {{/keywords}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /themes/wy/templates/index.mustache: -------------------------------------------------------------------------------- 1 |
2 | {{#categories}} 3 |
4 |
5 |
6 |
7 |
8 |
9 |

{{category}}

10 |
11 | 16 |
17 |
18 |
19 |
20 |
21 | {{/categories}} 22 |
23 | -------------------------------------------------------------------------------- /themes/wy/templates/nav.mustache: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /themes/wy/templates/post.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

{{title}}

5 | {{{content}}} 6 |
7 |
8 | -------------------------------------------------------------------------------- /themes/wy/templates/tag-index.mustache: -------------------------------------------------------------------------------- 1 |
2 |

Tags

3 |
    4 | {{#tags}} 5 |
  • {{tag-name}} {{count}}
  • 6 | {{/tags}} 7 |
8 |
9 | -------------------------------------------------------------------------------- /themes/wy/templates/tag.mustache: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Tag: {{tag-name}}

4 | 9 |
10 |
--------------------------------------------------------------------------------