├── .gitignore ├── .travis.yml ├── COPYING ├── Makefile ├── Readme.md ├── ahk-us.ahk ├── ergoemacs-advice.el ├── ergoemacs-calculate-bindings.el ├── ergoemacs-command-loop.el ├── ergoemacs-cua.el ├── ergoemacs-debug.el ├── ergoemacs-functions.el ├── ergoemacs-key-description.el ├── ergoemacs-layouts.el ├── ergoemacs-lib.el ├── ergoemacs-macros.el ├── ergoemacs-map-properties.el ├── ergoemacs-map.el ├── ergoemacs-mapkeymap.el ├── ergoemacs-mode.el ├── ergoemacs-test.el ├── ergoemacs-theme-engine.el ├── ergoemacs-themes.el ├── ergoemacs-translate.el ├── kbd-ergo.html ├── kbd-ergo.svg ├── kbd.svg ├── o-blog-template ├── blog_archives.html ├── blog_index_category.html ├── blog_index_month.html ├── blog_index_year.html ├── blog_post-by-tags.html ├── blog_post.html ├── blog_rss.html ├── blog_sitemap.html ├── blog_static.html ├── blog_static_no_title.html ├── blog_tags-details.html ├── blog_tags.html ├── debug.html ├── debug_blog.html ├── debug_post.html ├── debug_posts.html ├── debug_snippets.html ├── debug_static.html ├── debug_tag.html ├── debug_tags.html ├── index_archives.html ├── index_category.html ├── index_month.html ├── index_year.html ├── nav_breadcrumb.html ├── nav_tag-cloud.html ├── page_footer.html ├── page_header.html ├── page_redirect.html ├── plugin_analytics.html ├── plugin_disqus.html ├── plugin_qrcode.html ├── sitemap_post.html ├── sitemap_static.html ├── starter-template.html └── style │ ├── Font-Awesome │ ├── font │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.svgz │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ └── less │ │ ├── font-awesome-ie7.less │ │ └── font-awesome.less │ ├── basic.css │ ├── bootstrap │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ ├── js │ │ ├── .jshintrc │ │ ├── bootstrap-affix.js │ │ ├── bootstrap-alert.js │ │ ├── bootstrap-button.js │ │ ├── bootstrap-carousel.js │ │ ├── bootstrap-collapse.js │ │ ├── bootstrap-dropdown.js │ │ ├── bootstrap-modal.js │ │ ├── bootstrap-popover.js │ │ ├── bootstrap-scrollspy.js │ │ ├── bootstrap-tab.js │ │ ├── bootstrap-tooltip.js │ │ ├── bootstrap-transition.js │ │ └── bootstrap-typeahead.js │ └── less │ │ ├── accordion.less │ │ ├── alerts.less │ │ ├── badges.less │ │ ├── bootstrap.less │ │ ├── breadcrumbs.less │ │ ├── button-groups.less │ │ ├── buttons.less │ │ ├── carousel.less │ │ ├── close.less │ │ ├── code.less │ │ ├── component-animations.less │ │ ├── dropdowns.less │ │ ├── forms.less │ │ ├── grid.less │ │ ├── hero-unit.less │ │ ├── labels-badges.less │ │ ├── labels.less │ │ ├── layouts.less │ │ ├── mixins.less │ │ ├── modals.less │ │ ├── navbar.less │ │ ├── navs.less │ │ ├── pager.less │ │ ├── pagination.less │ │ ├── popovers.less │ │ ├── progress-bars.less │ │ ├── reset.less │ │ ├── responsive-1200px-min.less │ │ ├── responsive-767px-max.less │ │ ├── responsive-768px-979px.less │ │ ├── responsive-navbar.less │ │ ├── responsive-utilities.less │ │ ├── responsive.less │ │ ├── scaffolding.less │ │ ├── sprites.less │ │ ├── tables.less │ │ ├── thumbnails.less │ │ ├── tooltip.less │ │ ├── type.less │ │ ├── utilities.less │ │ ├── variables.less │ │ └── wells.less │ ├── font │ ├── Andika.woff │ ├── UbuntuMono-Bold.woff │ ├── UbuntuMono-BoldItalic.woff │ ├── UbuntuMono-Italic.woff │ ├── UbuntuMono-Regular.woff │ ├── YanoneKaffeesatz-Bold.woff │ ├── YanoneKaffeesatz-ExtraLight.woff │ ├── YanoneKaffeesatz-Light.woff │ └── YanoneKaffeesatz-Regular.woff │ ├── js │ ├── jquery-1.7.1.min.js │ ├── jquery.svg.min.js │ ├── keymap.js │ ├── less-1.3.0.min.js │ ├── o-blog-fix.js │ ├── o-blog.linenumber.js │ ├── prettify.js │ ├── sizzle.min.js │ └── tablefilter.js │ ├── keys.css │ └── less │ ├── font-Andika.less │ ├── font-Ubuntu-Mono.less │ ├── font-Yanone-Kaffeesatz.less │ ├── o-blog-default.less │ ├── o-blog-orig.less │ ├── o-blog.less │ └── oblog-min.less ├── os_x_qwerty.dict.txt ├── test └── .gitignore └── web.org /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | ~* 3 | out/* 4 | *.elc 5 | \#*\# 6 | .\#* 7 | /out/ 8 | *-autoloads.el 9 | *-pkg.el 10 | flycheck_* 11 | ergoemacs-global*.el 12 | ergoemacs-global*.el.gz 13 | ergoemacs-global*.elc.gz 14 | ergoemacs-global*.elc 15 | /.cask/ 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | ### 2 | ### Notes 3 | ### 4 | ### The travis web interface may choke silently and fail to 5 | ### update when there are issues with the .travis.yml file. 6 | ### 7 | ### The "travis-lint" command-line tool does not catch all 8 | ### errors which may lead to silent failure. 9 | ### 10 | ### Shell-style comments in this file must have "#" as the 11 | ### *first* character of the line. 12 | ### 13 | 14 | ### 15 | ### language 16 | ### 17 | 18 | language: emacs-lisp 19 | 20 | ### 21 | ### defining the build matrix 22 | ### 23 | ### ===> <=== 24 | ### ===> each variation in env/matrix will be built and tested <=== 25 | ### ===> <=== 26 | ### 27 | ### variables under env/global are available to the build process 28 | ### but don't cause the creation of a separate variation 29 | ### 30 | 31 | env: 32 | #- EMACS=emacs-23.4-bin METHOD=evm 33 | - EMACS=emacs-24.1-bin METHOD=evm 34 | - EMACS=emacs-24.2-bin METHOD=evm 35 | # - EMACS=emacs-24.2 METHOD=evm 36 | - EMACS=emacs-24.3-bin METHOD=evm 37 | - EMACS=emacs-24.4-bin METHOD=evm 38 | - EMACS=emacs-24.5-bin METHOD=evm 39 | #- EMACS=emacs-25.1-bin METHOD=evm 40 | - EMACS=emacs24 METHOD=manual 41 | - EMACS=emacs-snapshot METHOD=manual 42 | 43 | # matrix: 44 | # global: 45 | # - METHOD=manual 46 | 47 | ### 48 | ### allowing build failures 49 | ### 50 | 51 | matrix: 52 | allow_failures: 53 | - env: EMACS=emacs-24.1-bin METHOD=evm 54 | - env: EMACS=emacs-24.2-bin METHOD=evm 55 | - env: EMACS=emacs-snapshot METHOD=manual 56 | # - env: EMACS=xemacs21 57 | # - env: EMACS=emacs22 58 | # - env: EMACS=emacs-snapshot 59 | # - env: EMACS=emacs-23.4-bin 60 | 61 | ### 62 | ### limit build attempts to defined branches 63 | ### 64 | ### notes 65 | ### 66 | ### This controls which branches are built. 67 | ### 68 | ### You can also control which branches affect the web badge, by 69 | ### appending "?branch=master,staging,production" to the end of the 70 | ### image URL (replacing "master,staging,production" with a 71 | ### comma-separated list of branches to be reflected in the badge). 72 | ### 73 | # 74 | # branches: 75 | # only: 76 | # - master 77 | # 78 | 79 | ### 80 | ### runtime initialization 81 | ### 82 | ### notes 83 | ### 84 | ### emacs22 is extracted manually from Ubuntu Maverick. 85 | ### 86 | ### emacs23 is the stock default, but is updated anyway to 87 | ### a GUI-capable version, which will have certain additional 88 | ### functions compiled in. 89 | ### 90 | ### emacs24 (current stable release) is obtained from the 91 | ### cassou PPA: http://launchpad.net/~cassou/+archive/emacs 92 | ### 93 | ### emacs-snapshot (trunk) is obtained from the Ubuntu Emacs Lisp PPA: 94 | ### https://launchpad.net/~ubuntu-elisp/+archive/ppa 95 | ### For the emacs-snapshot build, bleeding-edge versions 96 | ### of all test dependencies are also used. 97 | ### 98 | 99 | before_install: 100 | - git submodule --quiet update --init --recursive 101 | 102 | install: 103 | - if [ "$EMACS" = 'emacs23' ]; then 104 | sudo apt-get -qq update && 105 | sudo apt-get -qq -f install && 106 | sudo apt-get -qq install emacs23-gtk emacs23-el; 107 | fi 108 | - if [ "$METHOD" = 'evm' ]; then 109 | sudo mkdir /usr/local/evm && 110 | sudo chown travis:travis /usr/local/evm && 111 | sudo add-apt-repository -y ppa:cassou/emacs && 112 | sudo apt-get update -qq && 113 | sudo apt-get build-dep -qq emacs23 && 114 | sudo apt-get build-dep -qq emacs24 && 115 | curl -fsSkL https://raw.github.com/rejeep/evm/master/go | bash && 116 | export PATH="~/.evm/bin:$PATH" && 117 | chmod +x ~/.evm/bin/evm && 118 | ~/.evm/bin/evm install $EMACS && 119 | ~/.evm/bin/evm use $EMACS && 120 | FULL_EMACS_PATH="/usr/local/evm/$EMACS/bin/emacs" && 121 | export EMACS="$FULL_EMACS_PATH" && 122 | EMACS="$FULL_EMACS_PATH"; 123 | fi 124 | - if [ "$EMACS" = 'emacs24' ]; then 125 | sudo add-apt-repository -y ppa:cassou/emacs && 126 | sudo apt-get -qq update && 127 | sudo apt-get -qq -f install && 128 | sudo apt-get -qq install emacs24 emacs24-el; 129 | fi 130 | - if [ "$EMACS" = 'emacs-snapshot' ]; then 131 | sudo add-apt-repository -y ppa:ubuntu-elisp/ppa && 132 | sudo apt-get -qq update && 133 | sudo apt-get -qq -f install && 134 | sudo apt-get -qq install emacs-snapshot && 135 | sudo apt-get -qq install emacs-snapshot-el; 136 | fi 137 | before_script: 138 | - if [ "$EMACS" = 'emacs-snapshot' ]; then 139 | make downloads-latest; 140 | else 141 | make downloads; 142 | fi 143 | ### 144 | ### the actual build/test command 145 | ### 146 | ### Use "make test-batch" to test without byte-compiling. 147 | ### The default command avoids byte-compiling on Emacs 22. 148 | ### 149 | 150 | script: 151 | echo "Method is $METHOD" && $EMACS --version && make test EMACS="$EMACS" 152 | 153 | ### 154 | ### settings 155 | ### 156 | 157 | notifications: 158 | email: false 159 | 160 | # 161 | # Emacs 162 | # 163 | # Local Variables: 164 | # indent-tabs-mode: nil 165 | # coding: utf-8 166 | # End: 167 | # -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | EMACS=emacs 2 | 3 | unexport EMACSLOADPATH 4 | unexport EMACSDOC 5 | unexport EMACSDATA 6 | unexport EMACS_SERVER_FILE 7 | 8 | EMACS_CLEAN=-Q 9 | EMACS_BATCH=$(EMACS_CLEAN) --batch 10 | TESTS=ergoemacs- 11 | SELECT= 12 | 13 | CURL=curl --silent 14 | TMP1=$(shell pwd) 15 | EMPTY= 16 | BACKSLASH=\$(EMPTY) 17 | SLASH=/ 18 | WORK_DIR=$(subst $(BACKSLASH),$(SLASH),$(TMP1)) 19 | PACKAGE_NAME=$(shell basename $(TMP1)) 20 | AUTOLOADS_FILE=$(PACKAGE_NAME)-autoloads.el 21 | TRAVIS_FILE=.travis.yml 22 | 23 | .PHONY : build downloads downloads-latest autoloads test-autoloads test-travis \ 24 | test test-interactive clean edit test-dep-1 test-dep-2 test-dep-3 \ 25 | test-dep-4 test-dep-5 test-dep-6 test-dep-7 test-dep-8 test-dep-9 26 | 27 | .DEFAULT_GOAL = compile 28 | 29 | 24.1 : 30 | $(eval EMACS:="c:\Users\fidlema3\EmacsPortable.App\App\emacs-24.1\bin\emacs.exe") 31 | 32 | 24.2 : 33 | $(eval EMACS:="c:\Users\fidlema3\EmacsPortable.App\App\emacs-24.2\bin\emacs.exe") 34 | 35 | 24.3 : 36 | $(eval EMACS:="c:\Users\fidlema3\EmacsPortable.App\App\emacs-24.3\bin\emacs.exe") 37 | 38 | 24.4 : 39 | $(eval EMACS:="c:\Users\fidlema3\EmacsPortable.App\App\emacs-24.4\bin\emacs.exe") 40 | 41 | 24.5 : 42 | $(eval EMACS:="c:\Users\fidlema3\EmacsPortable.App\App\emacs-24.5\bin\emacs.exe") 43 | 44 | 25.0 : 45 | $(eval EMACS:="c:\Users\fidlema3\EmacsPortable.App\App\emacs-24.5\bin\emacs.exe") 46 | 47 | 48 | search : 49 | $(eval SELECT:=(tag :search)) 50 | 51 | copy : 52 | $(eval SELECT:=(tag :copy)) 53 | 54 | slow : 55 | $(eval SELECT:=(tag :slow)) 56 | 57 | shift-select : 58 | $(eval SELECT:=(tag :shift-select)) 59 | 60 | translate : 61 | $(eval SELECT:=(tag :translate)) 62 | 63 | 64 | other : 65 | $(eval SELECT:=(not (tag :search)) (not (tag :copy)) (not (tag :slow)) (not (tag :shift-select)) (not (tag :translate))) 66 | 67 | default-select : 68 | $(eval SELECT:=) 69 | 70 | 71 | 72 | build : 73 | $(EMACS) $(EMACS_BATCH) -L . --eval \ 74 | "(progn \ 75 | (batch-byte-compile))" *.el 76 | 77 | build2 : 78 | $(EMACS) $(EMACS_BATCH) -L . -l ergoemacs-mode --eval \ 79 | "(progn \ 80 | (batch-byte-compile))" *.el 81 | 82 | autoloads : 83 | @cd $(WORK_DIR) 84 | $(EMACS) $(EMACS_BATCH) --eval \ 85 | "(progn \ 86 | (setq generated-autoload-file \"$(WORK_DIR)/$(AUTOLOADS_FILE)\") \ 87 | (update-directory-autoloads \"$(WORK_DIR)\"))" 88 | 89 | test-autoloads : autoloads 90 | @$(EMACS) $(EMACS_BATCH) -L . -l "./$(AUTOLOADS_FILE)" || \ 91 | ( echo "failed to load autoloads: $(AUTOLOADS_FILE)" && false ) 92 | 93 | test-travis : 94 | @if test -z "$$TRAVIS" && test -e $(TRAVIS_FILE); then travis-lint $(TRAVIS_FILE); fi 95 | 96 | 97 | test: source compile 98 | 99 | compile : clean build build2 test-autoloads erti 100 | 101 | source : clean ert 102 | 103 | start: clean build start0 104 | startel: clean start0 105 | 106 | start0: 107 | $(EMACS) -Q -L . -L .. -l ergoemacs-mode -l ergoemacs-test --eval "(ergoemacs-mode)" 108 | 109 | ert : 110 | $(EMACS) $(EMACS_BATCH) -L . -L .. -l cl-lib -l ergoemacs-mode -l ergoemacs-test --eval \ 111 | "(progn (setq ergoemacs-command-loop-type nil) \ 112 | (ert-run-tests-batch-and-exit '(and \"$(TESTS)\" $(SELECT) (not (tag :interactive)))))" || exit 1; \ 113 | 114 | erti : 115 | $(EMACS) $(EMACS_BATCH) -L . -L .. -l cl-lib -l ergoemacs-mode -l ergoemacs-test --eval \ 116 | "(progn (setq ergoemacs-command-loop-type nil) \ 117 | (fset 'ert--print-backtrace 'ignore) \ 118 | (ert-run-tests-batch-and-exit '(and \"$(TESTS)\" $(SELECT) (not (tag :interactive)))))" || exit 1; \ 119 | 120 | clean : 121 | @rm -f $(AUTOLOADS_FILE) 122 | @rm -f *.elc 123 | @rm -f *~ 124 | @rm -f \#*\# 125 | 126 | clean-global : 127 | @rm -f ergoemacs-global-*.el 128 | @rm -f ergoemacs-global-*.elc 129 | 130 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | [![MELPA Stable](http://stable.melpa.org/packages/ergoemacs-mode-badge.svg)](http://stable.melpa.org/#/ergoemacs-mode) 2 | [![MELPA](http://melpa.org/packages/ergoemacs-mode-badge.svg)](http://melpa.org/#/ergoemacs-mode) 3 | [![Build Status](https://secure.travis-ci.org/ergoemacs/ergoemacs-mode.png)](http://travis-ci.org/ergoemacs/ergoemacs-mode) 4 | 5 | # Ergoemacs Keybindings 6 | 7 | Xah Lee, David Capello, Kim Storm, Walter Landry and Matthew Fidler 8 | 9 | ## Library Information 10 | 11 | ErgoEmacs keybindings improve GNU Emacs for people who did not grew 12 | up with Emacs. User interface is based on common modern software 13 | interface familiar to most people today, such as using 【Ctrl+C】 key 14 | for Copy,【Ctrl+Z】 for undo, 【Ctrl+O】 for Open file, and also 15 | bundles many Emacs Lisp functions that are not in GNU Emacs by default. 16 | 17 | ```lisp 18 | (setq ergoemacs-theme nil) 19 | (setq ergoemacs-keyboard-layout "us") 20 | (require 'ergoemacs-mode) 21 | (ergoemacs-mode 1) 22 | ``` 23 | 24 | ## Changing your own bindings 25 | 26 | If you want to change your bindings, you can define keys in the `ergoemacs-user-keymap`. 27 | 28 | For example, if you want to change `C-a` you can use the following Emacs customization command: 29 | 30 | ```lisp 31 | (define-key ergoemacs-user-keymap (kbd "C-a") 'my-replacement-function) 32 | ``` 33 | 34 | If you wanted this to respect the keyboard layout for some reason, you can use: 35 | 36 | ```lisp 37 | (ergoemacs-define-key ergoemacs-user-keymap (kbd "M-i") 'my-other-function) 38 | ``` 39 | 40 | This defines the Alt+i key on QWERTY and Alt+u on colemak. 41 | 42 | You can also define keys that are partially layout dependent and partially fixed. 43 | 44 | For example if you wanted the ergoemacs-mode key ` n t` to start 45 | term-mode instead of `org-capture`, you can define the key as follows: 46 | 47 | ```lisp 48 | (ergoemacs-define-key ergoemacs-user-keymap (kbd " n") 'org-capture (kbd "t")) 49 | ``` 50 | 51 | In QWERTY, this key would be ` n t`, in Colemak, this key would be ` k t` 52 | 53 | 54 | ## Unbinding keys in `ergoemacs-mode` 55 | 56 | To unbind keys in `ergoemacs-mode` you can use code like: 57 | 58 | ```lisp 59 | (define-key ergoemacs-user-keymap (kbd "C-p") 'undefined) 60 | ``` 61 | 62 | This will unbind the printing interface. 63 | 64 | If you want to truly drop the `ergoemacs-mode` key and use `emacs`'s default you can also remove them from the `ergoemacs-mode` by: 65 | 66 | ```lisp 67 | (define-key ergoemacs-override-keymap (kbd "C-p") nil) 68 | ``` 69 | 70 | This will have `C-p` be previous line, like it is in emacs. 71 | 72 | ## How `ergoemacs-mode' works the "magic" 73 | 74 | `ergoemacs-mode` binds all of its keys in the 75 | `emulation-mode-map-alist`. As a reference, Emacs looks up keys from 76 | the active keymap following the lisp-like pseudo-code below: 77 | 78 | ```lisp 79 | (or (if overriding-terminal-local-map 80 | (find-in overriding-terminal-local-map) 81 | (if overriding-local-map 82 | (find-in overriding-local-map))) 83 | (or (find-in (get-char-property (point) 'keymap)) 84 | (find-in-any emulation-mode-map-alists) 85 | (find-in-any minor-mode-overriding-map-alist) 86 | (find-in-any minor-mode-map-alist) 87 | (if (get-text-property (point) 'local-map) 88 | (find-in (get-char-property (point) 'local-map)) 89 | (find-in (current-local-map)))) 90 | (find-in (current-global-map))) 91 | ``` 92 | This means that `ergoemacs-mode` overrides: 93 | - keybindings from minor modes 94 | - keybindings from major modes (which are contained in the `current-local-map`) 95 | 96 | While this seems useful, many major and minor modes make meaningful 97 | changes in Emacs keybindings. For example `gnus` binds the default 98 | key of `kill-line`, that is `C-k` to `gnus-summary-kill-same-subject` 99 | and sometimes other functions depending on what part of `gnus` you are 100 | in. The corresponding key in `ergoemacs-mode` in the "us" layout is `M-g`. 101 | If you make changes to the gnus keymap to bind `M-g` to 102 | `gnus-summary-kill-same-subject`, Emacs still overrides this key with 103 | whatever `ergoemacs-mode` has defined in the `gnus` keymap. 104 | 105 | To overcome this there `ergoemacs-mode` does the following: 106 | 107 | - Intercepts the `ergoemacs-mode` key for `kill-line` 108 | - Temporarily disables all `ergoemacs-mode` keys and adds the original 109 | key `C-k` to the unread events (and makes sure it isn't recorded) 110 | - Emacs then carries out the correct command by processing the unread keys 111 | - `ergoemacs-mode` re-enables the keybindings 112 | 113 | It will also keep the shift selection active by sending shifted keys if necessary. 114 | 115 | If you think this is too much magic, you can turn this off with the variable `ergoemacs-mode-send-emacs-keys` 116 | -------------------------------------------------------------------------------- /ergoemacs-advice.el: -------------------------------------------------------------------------------- 1 | ;;; ergoemacs-advice.el --- Ergoemacs advices -*- lexical-binding: t -*- 2 | 3 | ;; Copyright © 2013-2023 Free Software Foundation, Inc. 4 | 5 | ;; Filename: ergoemacs-advice.el 6 | ;; Description: 7 | ;; Author: Matthew L. Fidler 8 | ;; Maintainer: Matthew L. Fidler 9 | ;; Created: Sat Sep 28 20:10:56 2013 (-0500) 10 | ;; 11 | ;;; Commentary: 12 | ;; Advices for `ergoemacs-mode'. 13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 14 | ;; 15 | ;; This program is free software; you can redistribute it and/or 16 | ;; modify it under the terms of the GNU General Public License as 17 | ;; published by the Free Software Foundation; either version 3, or 18 | ;; (at your option) any later version. 19 | ;; 20 | ;; This program is distributed in the hope that it will be useful, 21 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 | ;; General Public License for more details. 24 | ;; 25 | ;; You should have received a copy of the GNU General Public License 26 | ;; along with this program. If not, see . 27 | ;; 28 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 29 | ;; 30 | ;;; Code: 31 | (require 'cl-lib) 32 | 33 | (eval-when-compile 34 | (require 'ergoemacs-macros)) 35 | 36 | (require 'mouse) 37 | (require 'nadvice) 38 | (require 'ergoemacs-command-loop) 39 | 40 | (defvar ergoemacs-mode) 41 | (defvar ergoemacs-keymap) 42 | (defvar ergoemacs-map--unbound-keys) 43 | (defvar ergoemacs-user-keymap) 44 | 45 | (declare-function ergoemacs-key-description--substitute-command-keys "ergoemacs-key-description") 46 | 47 | (declare-function ergoemacs-translate--define-key "ergoemacs-translate") 48 | (declare-function ergoemacs-translate--apply-key "ergoemacs-translate") 49 | (declare-function ergoemacs-major-mode-menu-map "ergoemacs-lib") 50 | (declare-function ergoemacs-translate--get "ergoemacs-translate") 51 | (declare-function ergoemacs-translate--keymap "ergoemacs-translate") 52 | (declare-function ergoemacs-command-loop--modal-p "ergoemacs-command-loop") 53 | (declare-function ergoemacs-translation-struct-keymap-modal "ergoemacs-translate") 54 | (declare-function ergoemacs-command-loop--internal "ergoemacs-command-loop") 55 | (declare-function ergoemacs-command-loop--temp-message "ergoemacs-command-loop") 56 | (declare-function ergoemacs-key-description "ergoemacs-key-description") 57 | 58 | (defun ergoemacs-advice-substitute-command-keys (orig-fun &rest args) 59 | "Use `ergoemacs-substitute-command-keys' when `ergoemacs-mode' is enabled" 60 | (if ergoemacs-mode 61 | (ergoemacs-key-description--substitute-command-keys (nth 0 args)) 62 | (funcall orig-fun args))) 63 | 64 | 65 | (defun ergoemacs-mode--undefined-advice (&optional type) 66 | "Advice for undefined. 67 | 68 | TYPE is the type of translation installed." 69 | (let* ((keys (this-single-command-keys)) 70 | (type (or type :normal)) 71 | (translation (ergoemacs-translate--get type)) 72 | (local-keymap (ergoemacs-translate--keymap translation)) 73 | (local-key (substring keys -1)) 74 | modal-p) 75 | (when (setq modal-p (ergoemacs :modal-p)) 76 | (setq local-keymap (ergoemacs-translation-struct-keymap-modal modal-p))) 77 | ;; This starts the command loop when DEL or MENU is replaced in the proper place. 78 | (if (and (not (eq ergoemacs-command-loop-type :emacs)) (lookup-key local-keymap local-key)) 79 | (let ((i 1)) ;; Setup history 80 | (setq ergoemacs-command-loop--history nil) 81 | (while (<= i (- (length keys) 1)) 82 | (push (list (substring keys 0 i) :normal nil 83 | current-prefix-arg (aref (substring keys (- i 1) i) 0)) 84 | ergoemacs-command-loop--history) 85 | (setq i (+ 1 i))) 86 | (ergoemacs-command-loop--internal keys nil nil nil ergoemacs-command-loop--history)) 87 | (ding) 88 | (ergoemacs-command-loop--temp-message "%s does not do anything!" 89 | (ergoemacs-key-description (this-single-command-keys))) 90 | (setq defining-kbd-macro nil) 91 | (force-mode-line-update) 92 | ;; If this is a down-mouse event, don't reset prefix-arg; 93 | ;; pass it to the command run by the up event. 94 | (setq prefix-arg 95 | (when (memq 'down (event-modifiers last-command-event)) 96 | current-prefix-arg))))) 97 | 98 | (defvar ergoemacs--temporary-disable) 99 | (defun ergoemacs-advice-undefined (orig-fun) 100 | "Allow `ergoemacs-mode' to display keys, and intercept ending keys." 101 | (if (and ergoemacs-mode (not ergoemacs--temporary-disable)) 102 | (ergoemacs-mode--undefined-advice) 103 | (call-interactively orig-fun))) 104 | 105 | (defun ergoemacs-read-key (orig-fun &rest args) 106 | "Allow `ergoemacs-mode' to add put prompt into original keys." 107 | (if (not (and ergoemacs-mode (not ergoemacs--temporary-disable))) 108 | (apply orig-fun args) 109 | (if (not (= 1 (length args))) 110 | (apply orig-fun args) 111 | (setq ergoemacs-command-loop--read-key-prompt 112 | (nth 0 args)) 113 | (unwind-protect 114 | (apply orig-fun args) 115 | (setq ergoemacs-command-loop--read-key-prompt ""))))) 116 | 117 | (provide 'ergoemacs-advice) 118 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 119 | ;;; ergoemacs-advice.el ends here 120 | ;; Local Variables: 121 | ;; coding: utf-8-emacs 122 | ;; End: 123 | -------------------------------------------------------------------------------- /ergoemacs-calculate-bindings.el: -------------------------------------------------------------------------------- 1 | ;;; ergoemacs-calculate-bindings.el --- Keyboard keybinding translation -*- lexical-binding: t -*- 2 | 3 | ;; Copyright © 2013-2021 Free Software Foundation, Inc. 4 | 5 | ;; Filename: ergoemacs-calculate-bindings.el 6 | ;; Description: 7 | ;; Author: Matthew L. Fidler 8 | ;; Maintainer: 9 | ;; Created: Sat Sep 28 20:08:09 2013 (-0500) 10 | ;; Version: 11 | ;; Last-Updated: 12 | ;; By: 13 | ;; Update #: 0 14 | ;; URL: 15 | ;; Doc URL: 16 | ;; Keywords: 17 | ;; Compatibility: 18 | ;; 19 | ;; Features that might be required by this library: 20 | ;; 21 | ;; None 22 | ;; 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 24 | ;; 25 | ;;; Commentary: 26 | ;; 27 | ;; 28 | ;; 29 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 30 | ;; 31 | ;;; Change Log: 32 | ;; 33 | ;; 34 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 35 | ;; 36 | ;; This program is free software; you can redistribute it and/or 37 | ;; modify it under the terms of the GNU General Public License as 38 | ;; published by the Free Software Foundation; either version 3, or 39 | ;; (at your option) any later version. 40 | ;; 41 | ;; This program is distributed in the hope that it will be useful, 42 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 43 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | ;; General Public License for more details. 45 | ;; 46 | ;; You should have received a copy of the GNU General Public License 47 | ;; along with this program. If not, see . 48 | ;; 49 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 50 | ;; 51 | ;;; Code: 52 | (defcustom ergoemacs-lookup-bindings-list 53 | '(("C-x o" other-window) 54 | ("C-b" backward-char) 55 | ("C-f" forward-char) 56 | ("M-b" backward-word) 57 | ("M-f" foward-word) 58 | ("C-p" previous-line) 59 | ("C-n" next-line) 60 | ("M-s o" occur) 61 | ("C-SPC" set-mark-command) 62 | ("DEL" delete-backward-char) 63 | ("C-d" delete-char ) 64 | ("M-d" kill-word) 65 | ("M-DEL" backward-kill-word) 66 | ("M-{" backward-paragraph) 67 | ("M-}" forward-paragraph) 68 | ("M-{" ergoemacs-backward-block) 69 | ("M-}" ergoemacs-forward-block) 70 | ("C-e" ergoemacs-end-of-line-or-what) 71 | ("C-a" ergoemacs-beginning-of-line-or-what) 72 | ("C-e" ergoemacs-end-of-line-or-what) 73 | ("C-a" move-beginning-of-line) 74 | ("C-e" move-end-of-line) 75 | ("C-v" scroll-down-command) 76 | ("M-v" scroll-up-command) 77 | ("" beginning-of-buffer) 78 | ("" end-of-buffer) 79 | ("C-M-b" ergoemacs-backward-open-bracket) 80 | ("C-M-f" ergoemacs-backward-open-bracket) 81 | ("M-w" ergoemacs-copy-line-or-region) 82 | ("C-y" ergoemacs-paste) 83 | ("M-y" ergoemacs-paste-cycle) 84 | ("C-_" ergoemacs-undo) 85 | ;("C-/" ergoemacs-undo) 86 | ("M-%" query-replace) 87 | ("C-s" isearch-forward) 88 | ("C-M-s" isearch-forward-regexp) 89 | ("C-r" isearch-backward) 90 | ("C-M-r" isearch-backward-regexp) 91 | ("C-x 1" delete-other-windows) 92 | ("C-x 0" delete-window) 93 | ("C-x 2" split-window-below) 94 | ("C-x 3" split-window-right) 95 | ("C-x b" switch-to-buffer) 96 | ("C-x C-b" ibuffer) 97 | ("C-x C-b" execute-extended-command) 98 | ("C-k" kill-line) 99 | ("M-TAB" ergoemacs-call-keyword-completion)) 100 | "Ergoemacs short command names." 101 | :group 'ergoemacs-themes 102 | :type '(repeat :tag "Command abbreviation" 103 | (list 104 | (string :tag "original keybinding in Emacs") 105 | (sexp :tag "Ergoemacs Command")))) 106 | 107 | (defvar ergoemacs-override-keymap) 108 | (defvar ergoemacs-keyboard-layout) 109 | 110 | (declare-function ergoemacs-translate--event-layout "ergoemacs-translate") 111 | (declare-function help--symbol-completion-table "help-fns") 112 | 113 | (defun ergoemacs-calculate-bindings-for-current-binding (keymap space cb) 114 | "Calculate ergoemcs keybindings for a KEYMAP and dislay in another buffer. 115 | SPACE represents the amount of sacing to add 116 | CB is the buffer to use for keymap" 117 | (dolist (elt ergoemacs-lookup-bindings-list) 118 | (let* ((command (nth 1 elt)) 119 | (key (nth 0 elt)) 120 | (key-code (read-kbd-macro key)) 121 | (bind (with-current-buffer cb 122 | (lookup-key (symbol-value keymap) key-code)))) 123 | (when (commandp bind) 124 | (dolist (ergoemacs-command (where-is-internal command ergoemacs-override-keymap nil t t)) 125 | (insert (format "%s(ergoemacs-define-key %s (kbd \"%s\") '%s)" space (symbol-name keymap) 126 | (key-description (ergoemacs-translate--event-layout ergoemacs-command "us" ergoemacs-keyboard-layout)) 127 | (symbol-name bind)))))))) 128 | 129 | 130 | (defvar ergoemacs-calculate-bindings-for-both-theme--tmp nil) 131 | (defun ergoemacs-calculate-bindings-for-both-themes (keymap) 132 | "Calculates ergoemacs-style bindings for KEYMAP." 133 | (interactive 134 | (save-excursion 135 | (let* ((v (variable-at-point)) 136 | (enable-recursive-minibuffers t) 137 | (orig-buffer (current-buffer)) 138 | val) 139 | (setq val (completing-read 140 | (if (and (symbolp v) (keymapp (symbol-value v))) 141 | (format 142 | "Calculate egoemacs-mode keybindings for keymap (default %s): " v) 143 | "Calculate ergoemacs-mode keybindings: ") 144 | #'help--symbol-completion-table 145 | (lambda (vv) 146 | ;; In case the variable only exists in the buffer 147 | ;; the command we switch back to that buffer before 148 | ;; we examine the variable. 149 | (with-current-buffer orig-buffer 150 | (and (boundp vv) (keymapp (symbol-value vv))))) 151 | t nil nil 152 | (if (and (symbolp v) (keymapp (symbol-value v))) 153 | (symbol-name v)))) 154 | (list (if (equal val "") v (intern val)))))) 155 | (let ((cb (current-buffer))) 156 | (unless cb 157 | (error "Cannot determine the buffer")) 158 | (prin1 (type-of keymap)) 159 | (setq ergoemacs-calculate-bindings-for-both-theme--tmp 160 | (copy-keymap ergoemacs-override-keymap) 161 | ergoemacs-override-keymap (make-sparse-keymap)) 162 | (let ((buf (get-buffer-create (format "*ergoemacs keybindings for keymap %s*" (symbol-name keymap))))) 163 | (with-output-to-temp-buffer buf 164 | (with-current-buffer buf 165 | (insert "(ergoemacs-save-key-state '") 166 | (insert (symbol-name keymap)) 167 | (insert " (if (string-equal ergoemacs-theme \"reduction\")\n (progn") 168 | (ergoemacs-install-reduction-theme) 169 | (ergoemacs-calculate-bindings-for-current-binding keymap "\n " cb) 170 | (insert ")") 171 | (setq ergoemacs-override-keymap (make-sparse-keymap)) 172 | (ergoemacs-install-standard-theme) 173 | (ergoemacs-calculate-bindings-for-current-binding keymap "\n " cb) 174 | (insert "))"))))) 175 | (setq ergoemacs-override-keymap ergoemacs-calculate-bindings-for-both-theme--tmp 176 | ergoemacs-calculate-bindings-for-both-theme--tmp nil)) 177 | 178 | (provide 'ergoemacs-calculate-bindings) 179 | ;;; ergoemacs-calculate-binding.el ends here 180 | -------------------------------------------------------------------------------- /ergoemacs-debug.el: -------------------------------------------------------------------------------- 1 | ;;; ergoemacs-debug.el --- Ergoemacs map interface -*- lexical-binding: t -*- 2 | 3 | ;; Copyright © 2013-2023 Free Software Foundation, Inc. 4 | 5 | ;; Filename: ergoemacs-debug.el 6 | ;; Description: 7 | ;; Author: Matthew L. Fidler 8 | ;; Maintainer: Matthew L. Fidler 9 | ;; Created: Sat Sep 28 20:10:56 2013 (-0500) 10 | ;; 11 | ;;; Commentary: 12 | ;; 13 | ;; Debugging messages for ergoemacs-mode 14 | ;; 15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 16 | ;; 17 | ;; This program is free software; you can redistribute it and/or 18 | ;; modify it under the terms of the GNU General Public License as 19 | ;; published by the Free Software Foundation; either version 3, or 20 | ;; (at your option) any later version. 21 | ;; 22 | ;; This program is distributed in the hope that it will be useful, 23 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25 | ;; General Public License for more details. 26 | ;; 27 | ;; You should have received a copy of the GNU General Public License 28 | ;; along with this program. If not, see . 29 | ;; 30 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 31 | 32 | (require 'cl-lib) 33 | 34 | (eval-when-compile 35 | (require 'ergoemacs-macros)) 36 | 37 | (defvar ergoemacs-debug "" 38 | "Debugging for `ergoemacs-mode'.") 39 | 40 | (defvar ergoemacs-debug-buffer " *ErgoEmacs-mode Debug Log*" 41 | "Variable for ergoemacs debugging buffer.") 42 | 43 | (defvar ergoemacs-debug-keymap--temp-map nil) 44 | (defun ergoemacs-debug-keymap (keymap) 45 | "Print keymap bindings." 46 | (if (not (ignore-errors (symbolp (symbol-name keymap)))) 47 | (progn 48 | (setq ergoemacs-debug-keymap--temp-map keymap) 49 | (ergoemacs-debug "%s" (substitute-command-keys "\\{ergoemacs-debug-keymap--temp-map}"))) 50 | (ergoemacs-debug-heading "%s" 51 | (format "Keymap Description: %s" (symbol-name keymap))) 52 | (ergoemacs-debug "%s" (substitute-command-keys (format "\\{%s}" (symbol-name keymap)))))) 53 | 54 | (defvar ergoemacs-debug-heading-start-time (float-time)) 55 | (defvar ergoemacs-debug-heading-last-time (float-time)) 56 | 57 | (defun ergoemacs-debug-heading (&rest arg) 58 | "Ergoemacs debugging heading." 59 | (ergoemacs-debug (concat "** " 60 | (condition-case err 61 | (apply #'format arg) 62 | (error (format "Bad format string: %s (%s)" arg err))))) 63 | (ergoemacs-debug "Time Since Start ergoemacs-mode: %1f sec" (- (float-time) ergoemacs-debug-heading-start-time)) 64 | (ergoemacs-debug "Time Since Last Heading: %1f sec" (- (float-time) ergoemacs-debug-heading-last-time)) 65 | (setq ergoemacs-debug-heading-last-time (float-time))) 66 | 67 | (defun ergoemacs-debug (&rest arg) 68 | "Ergoemacs debugging facility." 69 | (interactive) 70 | (if (called-interactively-p 'any) 71 | (progn 72 | (ergoemacs-debug-flush) 73 | (switch-to-buffer-other-window (get-buffer-create ergoemacs-debug-buffer)) 74 | (setq ergoemacs-debug-buffer (replace-regexp-in-string "^ +" "" ergoemacs-debug-buffer)) 75 | (rename-buffer ergoemacs-debug-buffer) 76 | (unless (eq major-mode 'org-mode) 77 | (call-interactively 'org-mode))) 78 | (setq ergoemacs-debug 79 | (format "%s\n%s" 80 | ergoemacs-debug 81 | (condition-case err 82 | (apply #'format arg) 83 | (error (format "Bad Format String: %s (%s)" arg err))))))) 84 | 85 | (defun ergoemacs-debug-clear () 86 | "Clears the variable `ergoemacs-debug' and `ergoemacs-debug-buffer'" 87 | (setq ergoemacs-debug "") 88 | (save-excursion 89 | (with-current-buffer (get-buffer-create ergoemacs-debug-buffer) 90 | (delete-region (point-min) (point-max))))) 91 | 92 | (defun ergoemacs-debug-flush () 93 | "Flushes ergoemacs debug to `ergoemacs-debug-buffer'" 94 | (save-excursion 95 | (with-current-buffer (get-buffer-create ergoemacs-debug-buffer) 96 | (goto-char (point-max)) 97 | (unless (looking-back "\n" nil) 98 | (insert "\n")) 99 | (insert ergoemacs-debug) 100 | (delete-region (save-excursion (skip-chars-backward "\n\t ") (point)) (point)))) 101 | (setq ergoemacs-debug "")) 102 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 103 | ;;; ergoemacs-debug.el ends here 104 | ;; Local Variables: 105 | ;; coding: utf-8-emacs 106 | ;; End: 107 | -------------------------------------------------------------------------------- /ergoemacs-map-properties.el: -------------------------------------------------------------------------------- 1 | ;;; ergoemacs-map-properties.el --- Ergoemacs map interface -*- lexical-binding: t -*- 2 | 3 | ;; Copyright © 2013-2021 Free Software Foundation, Inc. 4 | 5 | ;; Filename: ergoemacs-map-properties.el 6 | ;; Description: 7 | ;; Author: Matthew L. Fidler 8 | ;; Maintainer: Matthew L. Fidler 9 | ;; Created: Sat Sep 28 20:10:56 2013 (-0500) 10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 11 | ;; 12 | ;;; Commentary: 13 | ;; 14 | ;; These are functions that determine various properties of keymaps. 15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 16 | ;; 17 | ;; This program is free software; you can redistribute it and/or 18 | ;; modify it under the terms of the GNU General Public License as 19 | ;; published by the Free Software Foundation; either version 3, or 20 | ;; (at your option) any later version. 21 | ;; 22 | ;; This program is distributed in the hope that it will be useful, 23 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 25 | ;; General Public License for more details. 26 | ;; 27 | ;; You should have received a copy of the GNU General Public License 28 | ;; along with this program. If not, see . 29 | ;; 30 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 31 | ;; 32 | ;;; Code: 33 | 34 | (require 'cl-lib) 35 | (eval-when-compile 36 | (require 'ergoemacs-macros)) 37 | 38 | (defun ergoemacs-map-properties--movement-p (command) 39 | "Determines if COMMAND is a movement command. 40 | This is done by checking if this is a command that supports shift 41 | selection or cua-mode's movement." 42 | (let (tmp) 43 | (prog1 (and (commandp command) 44 | (or (and (symbolp command) (eq (get command 'CUA) 'move)) 45 | (setq tmp (let ((intf (ignore-errors (car (cdr (interactive-form command)))))) 46 | (and intf (stringp intf) (string-match "^[@*]*\\^" intf)))))) 47 | ;; Put 'CUA movement command if it wasn't there. 48 | (when (and tmp (symbolp command)) 49 | (put command 'CUA 'move))))) 50 | (defun ergoemacs-map-properties--key-lessp (key1 key2) 51 | "Compares KEY1 and KEY2, and determines if KEY1 is \"less than\" key2. 52 | Used for sorting keys in displays." 53 | (cond 54 | ((and (not key1) (not key2)) t) 55 | ((and key1 (not key2)) nil) 56 | ((and key2 (not key1)) t) 57 | (t 58 | (let* ((seq1 (or (and (or (stringp key1) (vectorp key1)) 59 | (listify-key-sequence 60 | (or (ergoemacs-translate--escape-to-meta 61 | (vconcat key1)) 62 | (vconcat key1)))) 63 | key1)) 64 | (seq2 (or (and (or (stringp key2) (vectorp key2)) 65 | (listify-key-sequence 66 | (or (ergoemacs-translate--escape-to-meta 67 | (vconcat key2)) 68 | (vconcat key2)))) 69 | key2) ) 70 | (c1 (car seq1)) 71 | (c2 (car seq2)) 72 | (e1 (event-basic-type c1)) 73 | (e2 (event-basic-type c2)) 74 | (m1 (event-modifiers c1)) 75 | (m2 (event-modifiers c2))) 76 | (cond 77 | ;; Modifier lengths are different 78 | ((< (length m1) (length m2)) t) 79 | ((> (length m1) (length m2)) nil) 80 | 81 | ;; meta first 82 | ((and (not (memq 'meta m1)) (memq 'meta m2)) t) 83 | ((and (memq 'meta m1) (not (memq 'meta m2))) nil) 84 | 85 | ;; control next 86 | ((and (not (memq 'control m1)) (memq 'control m2)) t) 87 | ((and (memq 'control m1) (not (memq 'control m2))) nil) 88 | 89 | ;; shift next 90 | ((and (not (memq 'shift m1)) (memq 'shift m2)) t) 91 | ((and (memq 'shift m1) (not (memq 'shift m2))) nil) 92 | 93 | ;; hyper 94 | ((and (not (memq 'hyper m1)) (memq 'hyper m2)) t) 95 | ((and (memq 'hyper m1) (not (memq 'hyper m2))) nil) 96 | 97 | ;; super 98 | ((and (not (memq 'super m1)) (memq 'super m2)) t) 99 | ((and (memq 'super m1) (not (memq 'super m2))) nil) 100 | 101 | ;; 102 | ((and (integerp e1) (symbolp e2)) t) 103 | ((and (symbolp e1) (integerp e2)) nil) 104 | 105 | ((or (and (symbolp e1) (symbolp e2) 106 | (string= (symbol-name e1) (symbol-name e2))) 107 | (and (integerp e1) (integerp e2) (= e1 e2))) 108 | (ergoemacs-map-properties--key-lessp (cdr seq1) (cdr seq2))) 109 | 110 | ((and (symbolp e1) (symbolp e2) 111 | (string= "f" (substring (symbol-name e1) 0 1)) 112 | (string= "f" (substring (symbol-name e2) 0 1))) 113 | (< (string-to-number (substring (symbol-name e1) 1)) (string-to-number (substring (symbol-name e2) 1)))) 114 | 115 | ((and (symbolp e1) (symbolp e2)) 116 | (string-lessp (ergoemacs-key-description (vector e1)) (ergoemacs-key-description (vector e2)))) 117 | 118 | ((and (integerp e1) (integerp e2)) 119 | (< e1 e2)) 120 | (t t)))))) 121 | 122 | (provide 'ergoemacs-map-properties) 123 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 124 | ;;; ergoemacs-map-properties.el ends here 125 | ;; Local Variables: 126 | ;; coding: utf-8-emacs 127 | ;; End: 128 | -------------------------------------------------------------------------------- /o-blog-template/blog_archives.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 | 7 |
8 |
9 | (ob:insert-template "page_footer.html") 10 | -------------------------------------------------------------------------------- /o-blog-template/blog_index_category.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 | 7 |
8 |
9 | (ob:insert-template "page_footer.html") 10 | -------------------------------------------------------------------------------- /o-blog-template/blog_index_month.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 | 7 |
8 |
9 | (ob:insert-template "page_footer.html") 10 | -------------------------------------------------------------------------------- /o-blog-template/blog_index_year.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 | 7 |
8 |
9 | (ob:insert-template "page_footer.html") 10 | -------------------------------------------------------------------------------- /o-blog-template/blog_post-by-tags.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 |
5 |
6 |
7 | (ob:insert-template "plugin_qrcode.html") 8 |
9 |

(ob:post-title POST)

10 |
11 |
12 |
13 | 14 |
15 | 30 |
31 |
32 | (ob:insert-template "page_footer.html") 33 | -------------------------------------------------------------------------------- /o-blog-template/blog_post.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 | 5 |
6 |
7 |
8 |
(ob:format-date (ob:post-timestamp POST) "%d")
9 |
10 | (format "%s" 11 | (ob:path-to-root) 12 | (ob:category-safe (ob:post-category POST)) 13 | (ob:format-date (ob:post-timestamp POST) "%Y") 14 | (ob:format-date (ob:post-timestamp POST) "%m") 15 | (ob:format-date (ob:post-timestamp POST) "%b"))
16 |
17 | 18 | (format "%s" 19 | (ob:path-to-root) 20 | (ob:category-safe (ob:post-category POST)) 21 | (ob:format-date (ob:post-timestamp POST) "%Y") 22 | (ob:format-date (ob:post-timestamp POST) "%Y")) 23 | 24 |
25 |
26 |
27 | (ob:insert-template "plugin_qrcode.html") 28 |
29 |

(ob:post-title POST)

30 |
31 | 52 |
53 | 54 |
55 |
56 | (ob:post-content-html POST) 57 |
58 | 59 |
60 | (ob:gettext :posted-on) . 61 | 71 |
72 |
73 | (ob:insert-template "plugin_disqus.html") 74 | (ob:insert-template "page_footer.html") 75 | -------------------------------------------------------------------------------- /o-blog-template/blog_rss.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | <lisp>(ob:blog-title BLOG)</lisp> 4 | index.xml" rel="self" /> 5 | "/> 6 | (ob:format-date (ob:get-header "DATE")) 7 | (ob:get-header "URL")index.xml 8 | 9 | (loop for p in (ob:get-posts nil 10) 10 | do (progn 11 | (insert "" 12 | (format "%s" (ob:post-title p)) 13 | (format "%s" (ob:get-header "AUTHOR")) 14 | (format "" (ob:get-header "URL") (ob:post-htmlfile p)) 15 | (format "%s" (ob:format-date (ob:post-timestamp p))) 16 | (format "%s" (ob:format-date (ob:post-timestamp p))) 17 | (format "%s" (ob:post-htmlfile p))) 18 | 19 | (loop for tag in (ob:post-tags p) 20 | do (insert (format "" 21 | (ob:tags-safe tag) (ob:tags-name tag) (ob:tags-name tag)))) 22 | 23 | (insert 24 | (format "%s" (htmlize-protect-string(ob:post-content-html p))) 25 | ""))) 26 | 27 | 28 | -------------------------------------------------------------------------------- /o-blog-template/blog_sitemap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (ob:get-header "URL")/ 5 | (ob:format-date (ob:get-header "DATE")) 6 | daily 7 | 1.0 8 | 9 | 10 | (loop for POST in STATIC 11 | do (when (not (ob:post-sitemap POST)) 12 | (ob:insert-template "sitemap_static.html"))) 13 | 14 | 15 | (loop for POST in POSTS 16 | do (when (not (ob:post-sitemap POST)) 17 | (ob:insert-template "sitemap_post.html"))) 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /o-blog-template/blog_static.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 |
5 |
6 |
7 | (ob:insert-template "plugin_qrcode.html") 8 |
9 |

(ob:post-title POST)

10 |
11 |
12 |
13 |
14 | 15 | (ob:post-content-html POST) 16 | 17 |
18 |
19 | (ob:insert-template "page_footer.html") 20 | -------------------------------------------------------------------------------- /o-blog-template/blog_static_no_title.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 | 5 | (ob:post-content-html POST) 6 | 7 |
8 |
9 | (ob:insert-template "page_footer.html") 10 | -------------------------------------------------------------------------------- /o-blog-template/blog_tags-details.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 | 17 | (ob:insert-template "page_footer.html") 18 | -------------------------------------------------------------------------------- /o-blog-template/blog_tags.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 |
4 | 7 |
8 |
9 | (ob:insert-template "page_footer.html") 10 | -------------------------------------------------------------------------------- /o-blog-template/debug.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 |
3 | 4 | 16 | 17 | 38 | 39 |
40 |

(ob:gettext :debug-blog-header)

41 | (ob:insert-template "debug_blog.html") 42 |

(ob:gettext :debug-posts-header)

43 | (ob:insert-template "debug_posts.html") 44 |

(ob:gettext :debug-static-pages-header)

45 | (ob:insert-template "debug_static.html") 46 |

(ob:gettext :debug-snippets-header)

47 | (ob:insert-template "debug_snippets.html") 48 |

(ob:gettext :debug-tags-header)

49 | (ob:insert-template "debug_tags.html") 50 |
51 | (ob:insert-template "page_footer.html") 52 | -------------------------------------------------------------------------------- /o-blog-template/debug_blog.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
(ob:gettext :debug-blog)
(ob:gettext :debug-property)(ob:gettext :debug-value)
file
(htmlize-protect-string (format "%S" (ob:blog-file BLOG)))
buffer
(htmlize-protect-string (format "%S" (ob:blog-buffer BLOG)))
publish-dir
(htmlize-protect-string (format "%S" (ob:blog-publish-dir BLOG)))
template-dir
(htmlize-protect-string (format "%S" (ob:blog-template-dir BLOG)))
style-dir
(htmlize-protect-string (format "%S" (ob:blog-style-dir BLOG)))
posts-filter
(htmlize-protect-string (format "%S" (ob:blog-posts-filter BLOG)))
static-filter
(htmlize-protect-string (format "%S" (ob:blog-static-filter BLOG)))
snippet-filter
(htmlize-protect-string (format "%S" (ob:blog-snippet-filter BLOG)))
title
(htmlize-protect-string (format "%S" (ob:blog-title BLOG)))
description
(htmlize-protect-string (format "%S" (ob:blog-description BLOG)))
post-build-shell
(htmlize-protect-string (format "%S" (ob:blog-post-build-shell BLOG)))
19 |
20 | -------------------------------------------------------------------------------- /o-blog-template/debug_post.html: -------------------------------------------------------------------------------- 1 |
2 |

(ob:post-title POST)

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
(ob:gettext :debug-post) (ob:post-title POST)
(ob:gettext :debug-property)(ob:gettext :debug-value)
id
(htmlize-protect-string (format "%S" (ob:post-id POST)))
title
(htmlize-protect-string (format "%S" (ob:post-title POST)))
timespamp
(htmlize-protect-string (format "%S" (ob:post-timestamp POST)))
year
(htmlize-protect-string (format "%S" (ob:post-year POST)))
month
(htmlize-protect-string (format "%S" (ob:post-month POST)))
day
(htmlize-protect-string (format "%S" (ob:post-day POST)))
category
(htmlize-protect-string (format "%S" (ob:post-category POST)))
tags
(htmlize-protect-string (format "%S" (ob:post-tags POST)))
template
(htmlize-protect-string (format "%S" (ob:post-template POST)))
filepath
(htmlize-protect-string (format "%S" (ob:post-filepath POST)))
filename
(htmlize-protect-string (format "%S" (ob:post-filename POST)))
htmlfile
(htmlize-protect-string (format "%S" (ob:post-htmlfile POST)))
path-to-root
(htmlize-protect-string (format "%S" (ob:post-path-to-root POST)))
sitemap
(htmlize-protect-string (format "%S" (ob:post-sitemap POST)))
content
(htmlize-protect-string (format "%S" (ob:post-content POST)))
content-html
(htmlize-protect-string (format "%S" (ob:post-content-html POST)))
25 |
26 | -------------------------------------------------------------------------------- /o-blog-template/debug_posts.html: -------------------------------------------------------------------------------- 1 |
2 | (loop for POST in POSTS 3 | do (ob:insert-template "debug_post.html")) 4 | 5 |
6 | -------------------------------------------------------------------------------- /o-blog-template/debug_snippets.html: -------------------------------------------------------------------------------- 1 |
2 | (loop for POST in SNIPPETS 3 | do (ob:insert-template "debug_post.html")) 4 | 5 |
6 | -------------------------------------------------------------------------------- /o-blog-template/debug_static.html: -------------------------------------------------------------------------------- 1 |
2 | (loop for POST in STATIC 3 | do (ob:insert-template "debug_post.html")) 4 | 5 |
6 | -------------------------------------------------------------------------------- /o-blog-template/debug_tag.html: -------------------------------------------------------------------------------- 1 |
2 |

(ob:tags-name TAG)

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
(ob:gettext :debug-tag) (htmlize-protect-string (format "%S" (ob:tags-name TAG)))
(ob:gettext :debug-property)(ob:gettext :debug-value)
name
(htmlize-protect-string (format "%S" (ob:tags-name TAG)))
safe
(htmlize-protect-string (format "%S" (ob:tags-safe TAG)))
count
(htmlize-protect-string (format "%S" (ob:tags-count TAG)))
size
(htmlize-protect-string (format "%S" (ob:tags-size TAG)))
13 |
14 | -------------------------------------------------------------------------------- /o-blog-template/debug_tags.html: -------------------------------------------------------------------------------- 1 |
2 | (loop for TAG in TAGS 3 | do (ob:insert-template "debug_tag.html")) 4 | 5 |
6 | -------------------------------------------------------------------------------- /o-blog-template/index_archives.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | (loop for CATEGORY in (ob:get-posts nil nil nil 'category) 4 | do (progn 5 | (insert (format "
  • %s" (ob:path-to-root) (ob:category-safe CATEGORY) (ob:category-name CATEGORY))) 6 | (let ((POSTS (ob:get-posts (lambda(x) (equal (ob:category-name CATEGORY) (ob:category-name (ob:post-category x))))))) 7 | (ob:insert-template "index_category.html") 8 | ) 9 | (insert "
  • "))) 10 |
    11 |
12 | -------------------------------------------------------------------------------- /o-blog-template/index_category.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | (loop for YEAR in (ob:get-posts nil nil nil 'year) 4 | do (progn 5 | (insert (format "
  • %.2d" (ob:path-to-root) (ob:category-safe CATEGORY) YEAR YEAR)) 6 | (let ((POSTS (ob:get-posts (lambda(x) (= YEAR (ob:post-year x)))))) 7 | (ob:insert-template "index_year.html") 8 | ) 9 | (insert "
  • "))) 10 |
    11 |
12 | -------------------------------------------------------------------------------- /o-blog-template/index_month.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | (loop for post in POSTS 4 | do (insert (format "
  • %s %s
  • " 5 | (ob:format-date (ob:post-timestamp post) "%d") 6 | (ob:path-to-root) 7 | (or (ob:post-htmlfile post) "htmlfile") 8 | (or (ob:post-title post) "title")))) 9 |
    10 |
11 | -------------------------------------------------------------------------------- /o-blog-template/index_year.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | (loop for MONTH in (ob:get-posts nil nil nil 'month) 4 | do (progn 5 | (insert (format "
  • %.2d" (ob:path-to-root) (ob:category-safe CATEGORY) YEAR MONTH MONTH)) 6 | (let ((POSTS (ob:get-posts (lambda(x) (= MONTH (ob:post-month x)))))) 7 | (ob:insert-template "index_month.html") 8 | ) 9 | (insert "
  • "))) 10 |
    11 |
12 | -------------------------------------------------------------------------------- /o-blog-template/nav_breadcrumb.html: -------------------------------------------------------------------------------- 1 | 63 | -------------------------------------------------------------------------------- /o-blog-template/nav_tag-cloud.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | (loop for tag in TAGS 4 | do (insert (format "
  • %s
  • " (ob:tags-size tag) (ob:path-to-root) (ob:tags-safe tag) (ob:tags-name tag)))) 5 |
    6 |
7 | -------------------------------------------------------------------------------- /o-blog-template/page_footer.html: -------------------------------------------------------------------------------- 1 | 2 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /o-blog-template/page_header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <lisp>(if (boundp 'POST) (ob:post-title POST) (ob:blog-title BLOG))</lisp> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | (when (boundp 'org-export-xhtml-scripts) org-export-xhtml-scripts) 22 | (when (ob:blog-analytics BLOG) (ob:insert-template "plugin_analytics.html")) 23 | 24 | 25 | 26 | 41 | 46 |
47 | -------------------------------------------------------------------------------- /o-blog-template/page_redirect.html: -------------------------------------------------------------------------------- 1 | (ob:insert-template "page_header.html") 2 | 21 | 26 | (ob:insert-template "page_footer.html") 27 | -------------------------------------------------------------------------------- /o-blog-template/plugin_analytics.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /o-blog-template/plugin_disqus.html: -------------------------------------------------------------------------------- 1 |
2 | 13 | 14 | blog comments powered by Disqus 15 | -------------------------------------------------------------------------------- /o-blog-template/plugin_qrcode.html: -------------------------------------------------------------------------------- 1 |
2 | " 5 | alt="qr-code" /> 6 |
7 | -------------------------------------------------------------------------------- /o-blog-template/sitemap_post.html: -------------------------------------------------------------------------------- 1 | 2 | (format "%s/%s" (ob:get-header "URL") (ob:post-htmlfile POST)) 3 | (format "%s" (ob:format-date (ob:post-timestamp POST))) 4 | weekly 5 | 0.6 6 | 7 | -------------------------------------------------------------------------------- /o-blog-template/sitemap_static.html: -------------------------------------------------------------------------------- 1 | 2 | (format "%s/%s" (ob:get-header "URL") (ob:post-htmlfile POST)) 3 | (format "%s" (ob:format-date (ob:post-timestamp POST))) 4 | weekly 5 | 0.8 6 | 7 | 8 | -------------------------------------------------------------------------------- /o-blog-template/starter-template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <lisp>(if (boundp 'POST) (ob:post-title POST) (ob:blog-title BLOG))</lisp> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | (when (boundp 'org-export-xhtml-scripts) org-export-xhtml-scripts) 21 | 22 | 23 | 24 | 25 | 40 | 41 |
42 |
43 | 44 | (ob:post-content-html POST) 45 | 46 |
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /o-blog-template/style/Font-Awesome/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/Font-Awesome/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /o-blog-template/style/Font-Awesome/font/fontawesome-webfont.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/Font-Awesome/font/fontawesome-webfont.svgz -------------------------------------------------------------------------------- /o-blog-template/style/Font-Awesome/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/Font-Awesome/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /o-blog-template/style/Font-Awesome/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/Font-Awesome/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /o-blog-template/style/basic.css: -------------------------------------------------------------------------------- 1 | 2 | /*==================================================== 3 | - HTML Table Filter Generator v1.6 4 | elements and classes 5 | - edit classes below to change filter grid style 6 | =====================================================*/ 7 | 8 | .fltrow{ /* filter grid row appearance */ 9 | height:20px; 10 | background-color:#f4f4f4; 11 | } 12 | .btnflt{ /* button appearance */ 13 | font-size:11px; 14 | margin:0 2px 0 2px; padding:0 1px 0 1px; 15 | text-decoration:none; color: #fff; 16 | background-color:#666; 17 | } 18 | .flt{ /* filter (input) appearance */ 19 | background-color:#f4f4f4; border:1px inset #ccc; 20 | margin:0; width:100%; 21 | } 22 | .flt_s{ /* small filter (input) appearance */ 23 | background-color:#f4f4f4; border:1px inset #ccc; 24 | margin:0; width:80%; 25 | } 26 | .inf{ /* div containing left, middle and right divs */ 27 | clear:both; width:auto; height:20px; 28 | background:#f4f4f4; font-size:11px; 29 | margin:0; padding:1px 3px 1px 3px; 30 | border:1px solid #ccc; 31 | } 32 | .ldiv{ /* left div */ 33 | float:left; width:30%; position:inherit; 34 | } 35 | .mdiv{ /* middle div */ 36 | float:left; width:30%; position:inherit; text-align:center; 37 | } 38 | .rdiv{ /* right div */ 39 | float:right; width:30%; position:inherit; text-align:right; 40 | } 41 | .loader{ /* loader appearance */ 42 | position:absolute; padding: 15px 0 15px 0; 43 | margin-top:7%; width:200px; left:40%; 44 | z-index:1000; font-size:14px; font-weight:bold; 45 | border:1px solid #666; background:#f4f4f4; 46 | text-align:center; vertical-align:middle; 47 | } 48 | div.mdiv select{ height:20px; }/*paging drop-down list*/ 49 | div.inf a{ color:#CC0000; }/*link appearence in .inf div*/ 50 | div.inf a:hover{ text-decoration:none; }/*link appearence in .inf div*/ 51 | .tot{ font-weight:bold; }/*rows counter*/ 52 | .even{ background-color:#fff; }/*row bg alternating color*/ 53 | .odd{ background-color:#f4f4f4; }/*row bg alternating color*/ 54 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "validthis": true, 3 | "laxcomma" : true, 4 | "laxbreak" : true, 5 | "browser" : true, 6 | "eqnull" : true, 7 | "debug" : true, 8 | "devel" : true, 9 | "boss" : true, 10 | "expr" : true, 11 | "asi" : true 12 | } -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-affix.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-affix.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#affix 4 | * ========================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* AFFIX CLASS DEFINITION 27 | * ====================== */ 28 | 29 | var Affix = function (element, options) { 30 | this.options = $.extend({}, $.fn.affix.defaults, options) 31 | this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) 32 | this.$element = $(element) 33 | this.checkPosition() 34 | } 35 | 36 | Affix.prototype.checkPosition = function () { 37 | if (!this.$element.is(':visible')) return 38 | 39 | var scrollHeight = $(document).height() 40 | , scrollTop = this.$window.scrollTop() 41 | , position = this.$element.offset() 42 | , offset = this.options.offset 43 | , offsetBottom = offset.bottom 44 | , offsetTop = offset.top 45 | , reset = 'affix affix-top affix-bottom' 46 | , affix 47 | 48 | if (typeof offset != 'object') offsetBottom = offsetTop = offset 49 | if (typeof offsetTop == 'function') offsetTop = offset.top() 50 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() 51 | 52 | affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? 53 | false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 54 | 'bottom' : offsetTop != null && scrollTop <= offsetTop ? 55 | 'top' : false 56 | 57 | if (this.affixed === affix) return 58 | 59 | this.affixed = affix 60 | this.unpin = affix == 'bottom' ? position.top - scrollTop : null 61 | 62 | this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) 63 | } 64 | 65 | 66 | /* AFFIX PLUGIN DEFINITION 67 | * ======================= */ 68 | 69 | $.fn.affix = function (option) { 70 | return this.each(function () { 71 | var $this = $(this) 72 | , data = $this.data('affix') 73 | , options = typeof option == 'object' && option 74 | if (!data) $this.data('affix', (data = new Affix(this, options))) 75 | if (typeof option == 'string') data[option]() 76 | }) 77 | } 78 | 79 | $.fn.affix.Constructor = Affix 80 | 81 | $.fn.affix.defaults = { 82 | offset: 0 83 | } 84 | 85 | 86 | /* AFFIX DATA-API 87 | * ============== */ 88 | 89 | $(window).on('load', function () { 90 | $('[data-spy="affix"]').each(function () { 91 | var $spy = $(this) 92 | , data = $spy.data() 93 | 94 | data.offset = data.offset || {} 95 | 96 | data.offsetBottom && (data.offset.bottom = data.offsetBottom) 97 | data.offsetTop && (data.offset.top = data.offsetTop) 98 | 99 | $spy.affix(data) 100 | }) 101 | }) 102 | 103 | 104 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-alert.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-alert.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#alerts 4 | * ========================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* ALERT CLASS DEFINITION 27 | * ====================== */ 28 | 29 | var dismiss = '[data-dismiss="alert"]' 30 | , Alert = function (el) { 31 | $(el).on('click', dismiss, this.close) 32 | } 33 | 34 | Alert.prototype.close = function (e) { 35 | var $this = $(this) 36 | , selector = $this.attr('data-target') 37 | , $parent 38 | 39 | if (!selector) { 40 | selector = $this.attr('href') 41 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 42 | } 43 | 44 | $parent = $(selector) 45 | 46 | e && e.preventDefault() 47 | 48 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) 49 | 50 | $parent.trigger(e = $.Event('close')) 51 | 52 | if (e.isDefaultPrevented()) return 53 | 54 | $parent.removeClass('in') 55 | 56 | function removeElement() { 57 | $parent 58 | .trigger('closed') 59 | .remove() 60 | } 61 | 62 | $.support.transition && $parent.hasClass('fade') ? 63 | $parent.on($.support.transition.end, removeElement) : 64 | removeElement() 65 | } 66 | 67 | 68 | /* ALERT PLUGIN DEFINITION 69 | * ======================= */ 70 | 71 | $.fn.alert = function (option) { 72 | return this.each(function () { 73 | var $this = $(this) 74 | , data = $this.data('alert') 75 | if (!data) $this.data('alert', (data = new Alert(this))) 76 | if (typeof option == 'string') data[option].call($this) 77 | }) 78 | } 79 | 80 | $.fn.alert.Constructor = Alert 81 | 82 | 83 | /* ALERT DATA-API 84 | * ============== */ 85 | 86 | $(function () { 87 | $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) 88 | }) 89 | 90 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-button.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-button.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#buttons 4 | * ============================================================ 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* BUTTON PUBLIC CLASS DEFINITION 27 | * ============================== */ 28 | 29 | var Button = function (element, options) { 30 | this.$element = $(element) 31 | this.options = $.extend({}, $.fn.button.defaults, options) 32 | } 33 | 34 | Button.prototype.setState = function (state) { 35 | var d = 'disabled' 36 | , $el = this.$element 37 | , data = $el.data() 38 | , val = $el.is('input') ? 'val' : 'html' 39 | 40 | state = state + 'Text' 41 | data.resetText || $el.data('resetText', $el[val]()) 42 | 43 | $el[val](data[state] || this.options[state]) 44 | 45 | // push to event loop to allow forms to submit 46 | setTimeout(function () { 47 | state == 'loadingText' ? 48 | $el.addClass(d).attr(d, d) : 49 | $el.removeClass(d).removeAttr(d) 50 | }, 0) 51 | } 52 | 53 | Button.prototype.toggle = function () { 54 | var $parent = this.$element.parent('[data-toggle="buttons-radio"]') 55 | 56 | $parent && $parent 57 | .find('.active') 58 | .removeClass('active') 59 | 60 | this.$element.toggleClass('active') 61 | } 62 | 63 | 64 | /* BUTTON PLUGIN DEFINITION 65 | * ======================== */ 66 | 67 | $.fn.button = function (option) { 68 | return this.each(function () { 69 | var $this = $(this) 70 | , data = $this.data('button') 71 | , options = typeof option == 'object' && option 72 | if (!data) $this.data('button', (data = new Button(this, options))) 73 | if (option == 'toggle') data.toggle() 74 | else if (option) data.setState(option) 75 | }) 76 | } 77 | 78 | $.fn.button.defaults = { 79 | loadingText: 'loading...' 80 | } 81 | 82 | $.fn.button.Constructor = Button 83 | 84 | 85 | /* BUTTON DATA-API 86 | * =============== */ 87 | 88 | $(function () { 89 | $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { 90 | var $btn = $(e.target) 91 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 92 | $btn.button('toggle') 93 | }) 94 | }) 95 | 96 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-carousel.js: -------------------------------------------------------------------------------- 1 | /* ========================================================== 2 | * bootstrap-carousel.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#carousel 4 | * ========================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* CAROUSEL CLASS DEFINITION 27 | * ========================= */ 28 | 29 | var Carousel = function (element, options) { 30 | this.$element = $(element) 31 | this.options = options 32 | this.options.slide && this.slide(this.options.slide) 33 | this.options.pause == 'hover' && this.$element 34 | .on('mouseenter', $.proxy(this.pause, this)) 35 | .on('mouseleave', $.proxy(this.cycle, this)) 36 | } 37 | 38 | Carousel.prototype = { 39 | 40 | cycle: function (e) { 41 | if (!e) this.paused = false 42 | this.options.interval 43 | && !this.paused 44 | && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 45 | return this 46 | } 47 | 48 | , to: function (pos) { 49 | var $active = this.$element.find('.item.active') 50 | , children = $active.parent().children() 51 | , activePos = children.index($active) 52 | , that = this 53 | 54 | if (pos > (children.length - 1) || pos < 0) return 55 | 56 | if (this.sliding) { 57 | return this.$element.one('slid', function () { 58 | that.to(pos) 59 | }) 60 | } 61 | 62 | if (activePos == pos) { 63 | return this.pause().cycle() 64 | } 65 | 66 | return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) 67 | } 68 | 69 | , pause: function (e) { 70 | if (!e) this.paused = true 71 | if (this.$element.find('.next, .prev').length && $.support.transition.end) { 72 | this.$element.trigger($.support.transition.end) 73 | this.cycle() 74 | } 75 | clearInterval(this.interval) 76 | this.interval = null 77 | return this 78 | } 79 | 80 | , next: function () { 81 | if (this.sliding) return 82 | return this.slide('next') 83 | } 84 | 85 | , prev: function () { 86 | if (this.sliding) return 87 | return this.slide('prev') 88 | } 89 | 90 | , slide: function (type, next) { 91 | var $active = this.$element.find('.item.active') 92 | , $next = next || $active[type]() 93 | , isCycling = this.interval 94 | , direction = type == 'next' ? 'left' : 'right' 95 | , fallback = type == 'next' ? 'first' : 'last' 96 | , that = this 97 | , e = $.Event('slide', { 98 | relatedTarget: $next[0] 99 | }) 100 | 101 | this.sliding = true 102 | 103 | isCycling && this.pause() 104 | 105 | $next = $next.length ? $next : this.$element.find('.item')[fallback]() 106 | 107 | if ($next.hasClass('active')) return 108 | 109 | if ($.support.transition && this.$element.hasClass('slide')) { 110 | this.$element.trigger(e) 111 | if (e.isDefaultPrevented()) return 112 | $next.addClass(type) 113 | $next[0].offsetWidth // force reflow 114 | $active.addClass(direction) 115 | $next.addClass(direction) 116 | this.$element.one($.support.transition.end, function () { 117 | $next.removeClass([type, direction].join(' ')).addClass('active') 118 | $active.removeClass(['active', direction].join(' ')) 119 | that.sliding = false 120 | setTimeout(function () { that.$element.trigger('slid') }, 0) 121 | }) 122 | } else { 123 | this.$element.trigger(e) 124 | if (e.isDefaultPrevented()) return 125 | $active.removeClass('active') 126 | $next.addClass('active') 127 | this.sliding = false 128 | this.$element.trigger('slid') 129 | } 130 | 131 | isCycling && this.cycle() 132 | 133 | return this 134 | } 135 | 136 | } 137 | 138 | 139 | /* CAROUSEL PLUGIN DEFINITION 140 | * ========================== */ 141 | 142 | $.fn.carousel = function (option) { 143 | return this.each(function () { 144 | var $this = $(this) 145 | , data = $this.data('carousel') 146 | , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) 147 | , action = typeof option == 'string' ? option : options.slide 148 | if (!data) $this.data('carousel', (data = new Carousel(this, options))) 149 | if (typeof option == 'number') data.to(option) 150 | else if (action) data[action]() 151 | else if (options.interval) data.cycle() 152 | }) 153 | } 154 | 155 | $.fn.carousel.defaults = { 156 | interval: 5000 157 | , pause: 'hover' 158 | } 159 | 160 | $.fn.carousel.Constructor = Carousel 161 | 162 | 163 | /* CAROUSEL DATA-API 164 | * ================= */ 165 | 166 | $(function () { 167 | $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { 168 | var $this = $(this), href 169 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 170 | , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) 171 | $target.carousel(options) 172 | e.preventDefault() 173 | }) 174 | }) 175 | 176 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-collapse.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-collapse.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#collapse 4 | * ============================================================= 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* COLLAPSE PUBLIC CLASS DEFINITION 27 | * ================================ */ 28 | 29 | var Collapse = function (element, options) { 30 | this.$element = $(element) 31 | this.options = $.extend({}, $.fn.collapse.defaults, options) 32 | 33 | if (this.options.parent) { 34 | this.$parent = $(this.options.parent) 35 | } 36 | 37 | this.options.toggle && this.toggle() 38 | } 39 | 40 | Collapse.prototype = { 41 | 42 | constructor: Collapse 43 | 44 | , dimension: function () { 45 | var hasWidth = this.$element.hasClass('width') 46 | return hasWidth ? 'width' : 'height' 47 | } 48 | 49 | , show: function () { 50 | var dimension 51 | , scroll 52 | , actives 53 | , hasData 54 | 55 | if (this.transitioning) return 56 | 57 | dimension = this.dimension() 58 | scroll = $.camelCase(['scroll', dimension].join('-')) 59 | actives = this.$parent && this.$parent.find('> .accordion-group > .in') 60 | 61 | if (actives && actives.length) { 62 | hasData = actives.data('collapse') 63 | if (hasData && hasData.transitioning) return 64 | actives.collapse('hide') 65 | hasData || actives.data('collapse', null) 66 | } 67 | 68 | this.$element[dimension](0) 69 | this.transition('addClass', $.Event('show'), 'shown') 70 | $.support.transition && this.$element[dimension](this.$element[0][scroll]) 71 | } 72 | 73 | , hide: function () { 74 | var dimension 75 | if (this.transitioning) return 76 | dimension = this.dimension() 77 | this.reset(this.$element[dimension]()) 78 | this.transition('removeClass', $.Event('hide'), 'hidden') 79 | this.$element[dimension](0) 80 | } 81 | 82 | , reset: function (size) { 83 | var dimension = this.dimension() 84 | 85 | this.$element 86 | .removeClass('collapse') 87 | [dimension](size || 'auto') 88 | [0].offsetWidth 89 | 90 | this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') 91 | 92 | return this 93 | } 94 | 95 | , transition: function (method, startEvent, completeEvent) { 96 | var that = this 97 | , complete = function () { 98 | if (startEvent.type == 'show') that.reset() 99 | that.transitioning = 0 100 | that.$element.trigger(completeEvent) 101 | } 102 | 103 | this.$element.trigger(startEvent) 104 | 105 | if (startEvent.isDefaultPrevented()) return 106 | 107 | this.transitioning = 1 108 | 109 | this.$element[method]('in') 110 | 111 | $.support.transition && this.$element.hasClass('collapse') ? 112 | this.$element.one($.support.transition.end, complete) : 113 | complete() 114 | } 115 | 116 | , toggle: function () { 117 | this[this.$element.hasClass('in') ? 'hide' : 'show']() 118 | } 119 | 120 | } 121 | 122 | 123 | /* COLLAPSIBLE PLUGIN DEFINITION 124 | * ============================== */ 125 | 126 | $.fn.collapse = function (option) { 127 | return this.each(function () { 128 | var $this = $(this) 129 | , data = $this.data('collapse') 130 | , options = typeof option == 'object' && option 131 | if (!data) $this.data('collapse', (data = new Collapse(this, options))) 132 | if (typeof option == 'string') data[option]() 133 | }) 134 | } 135 | 136 | $.fn.collapse.defaults = { 137 | toggle: true 138 | } 139 | 140 | $.fn.collapse.Constructor = Collapse 141 | 142 | 143 | /* COLLAPSIBLE DATA-API 144 | * ==================== */ 145 | 146 | $(function () { 147 | $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { 148 | var $this = $(this), href 149 | , target = $this.attr('data-target') 150 | || e.preventDefault() 151 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 152 | , option = $(target).data('collapse') ? 'toggle' : $this.data() 153 | $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') 154 | $(target).collapse(option) 155 | }) 156 | }) 157 | 158 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-dropdown.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns 4 | * ============================================================ 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* DROPDOWN CLASS DEFINITION 27 | * ========================= */ 28 | 29 | var toggle = '[data-toggle=dropdown]' 30 | , Dropdown = function (element) { 31 | var $el = $(element).on('click.dropdown.data-api', this.toggle) 32 | $('html').on('click.dropdown.data-api', function () { 33 | $el.parent().removeClass('open') 34 | }) 35 | } 36 | 37 | Dropdown.prototype = { 38 | 39 | constructor: Dropdown 40 | 41 | , toggle: function (e) { 42 | var $this = $(this) 43 | , $parent 44 | , isActive 45 | 46 | if ($this.is('.disabled, :disabled')) return 47 | 48 | $parent = getParent($this) 49 | 50 | isActive = $parent.hasClass('open') 51 | 52 | clearMenus() 53 | 54 | if (!isActive) { 55 | $parent.toggleClass('open') 56 | $this.focus() 57 | } 58 | 59 | return false 60 | } 61 | 62 | , keydown: function (e) { 63 | var $this 64 | , $items 65 | , $active 66 | , $parent 67 | , isActive 68 | , index 69 | 70 | if (!/(38|40|27)/.test(e.keyCode)) return 71 | 72 | $this = $(this) 73 | 74 | e.preventDefault() 75 | e.stopPropagation() 76 | 77 | if ($this.is('.disabled, :disabled')) return 78 | 79 | $parent = getParent($this) 80 | 81 | isActive = $parent.hasClass('open') 82 | 83 | if (!isActive || (isActive && e.keyCode == 27)) return $this.click() 84 | 85 | $items = $('[role=menu] li:not(.divider) a', $parent) 86 | 87 | if (!$items.length) return 88 | 89 | index = $items.index($items.filter(':focus')) 90 | 91 | if (e.keyCode == 38 && index > 0) index-- // up 92 | if (e.keyCode == 40 && index < $items.length - 1) index++ // down 93 | if (!~index) index = 0 94 | 95 | $items 96 | .eq(index) 97 | .focus() 98 | } 99 | 100 | } 101 | 102 | function clearMenus() { 103 | getParent($(toggle)) 104 | .removeClass('open') 105 | } 106 | 107 | function getParent($this) { 108 | var selector = $this.attr('data-target') 109 | , $parent 110 | 111 | if (!selector) { 112 | selector = $this.attr('href') 113 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 114 | } 115 | 116 | $parent = $(selector) 117 | $parent.length || ($parent = $this.parent()) 118 | 119 | return $parent 120 | } 121 | 122 | 123 | /* DROPDOWN PLUGIN DEFINITION 124 | * ========================== */ 125 | 126 | $.fn.dropdown = function (option) { 127 | return this.each(function () { 128 | var $this = $(this) 129 | , data = $this.data('dropdown') 130 | if (!data) $this.data('dropdown', (data = new Dropdown(this))) 131 | if (typeof option == 'string') data[option].call($this) 132 | }) 133 | } 134 | 135 | $.fn.dropdown.Constructor = Dropdown 136 | 137 | 138 | /* APPLY TO STANDARD DROPDOWN ELEMENTS 139 | * =================================== */ 140 | 141 | $(function () { 142 | $('html') 143 | .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) 144 | $('body') 145 | .on('click.dropdown touchstart.dropdown.data-api', '.dropdown', function (e) { e.stopPropagation() }) 146 | .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) 147 | .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) 148 | }) 149 | 150 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-popover.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * bootstrap-popover.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#popovers 4 | * =========================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * =========================================================== */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* POPOVER PUBLIC CLASS DEFINITION 27 | * =============================== */ 28 | 29 | var Popover = function (element, options) { 30 | this.init('popover', element, options) 31 | } 32 | 33 | 34 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js 35 | ========================================== */ 36 | 37 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { 38 | 39 | constructor: Popover 40 | 41 | , setContent: function () { 42 | var $tip = this.tip() 43 | , title = this.getTitle() 44 | , content = this.getContent() 45 | 46 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 47 | $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content) 48 | 49 | $tip.removeClass('fade top bottom left right in') 50 | } 51 | 52 | , hasContent: function () { 53 | return this.getTitle() || this.getContent() 54 | } 55 | 56 | , getContent: function () { 57 | var content 58 | , $e = this.$element 59 | , o = this.options 60 | 61 | content = $e.attr('data-content') 62 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) 63 | 64 | return content 65 | } 66 | 67 | , tip: function () { 68 | if (!this.$tip) { 69 | this.$tip = $(this.options.template) 70 | } 71 | return this.$tip 72 | } 73 | 74 | , destroy: function () { 75 | this.hide().$element.off('.' + this.type).removeData(this.type) 76 | } 77 | 78 | }) 79 | 80 | 81 | /* POPOVER PLUGIN DEFINITION 82 | * ======================= */ 83 | 84 | $.fn.popover = function (option) { 85 | return this.each(function () { 86 | var $this = $(this) 87 | , data = $this.data('popover') 88 | , options = typeof option == 'object' && option 89 | if (!data) $this.data('popover', (data = new Popover(this, options))) 90 | if (typeof option == 'string') data[option]() 91 | }) 92 | } 93 | 94 | $.fn.popover.Constructor = Popover 95 | 96 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { 97 | placement: 'right' 98 | , trigger: 'click' 99 | , content: '' 100 | , template: '

' 101 | }) 102 | 103 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-scrollspy.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-scrollspy.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#scrollspy 4 | * ============================================================= 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================== */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* SCROLLSPY CLASS DEFINITION 27 | * ========================== */ 28 | 29 | function ScrollSpy(element, options) { 30 | var process = $.proxy(this.process, this) 31 | , $element = $(element).is('body') ? $(window) : $(element) 32 | , href 33 | this.options = $.extend({}, $.fn.scrollspy.defaults, options) 34 | this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process) 35 | this.selector = (this.options.target 36 | || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 37 | || '') + ' .nav li > a' 38 | this.$body = $('body') 39 | this.refresh() 40 | this.process() 41 | } 42 | 43 | ScrollSpy.prototype = { 44 | 45 | constructor: ScrollSpy 46 | 47 | , refresh: function () { 48 | var self = this 49 | , $targets 50 | 51 | this.offsets = $([]) 52 | this.targets = $([]) 53 | 54 | $targets = this.$body 55 | .find(this.selector) 56 | .map(function () { 57 | var $el = $(this) 58 | , href = $el.data('target') || $el.attr('href') 59 | , $href = /^#\w/.test(href) && $(href) 60 | return ( $href 61 | && $href.length 62 | && [[ $href.position().top, href ]] ) || null 63 | }) 64 | .sort(function (a, b) { return a[0] - b[0] }) 65 | .each(function () { 66 | self.offsets.push(this[0]) 67 | self.targets.push(this[1]) 68 | }) 69 | } 70 | 71 | , process: function () { 72 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 73 | , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight 74 | , maxScroll = scrollHeight - this.$scrollElement.height() 75 | , offsets = this.offsets 76 | , targets = this.targets 77 | , activeTarget = this.activeTarget 78 | , i 79 | 80 | if (scrollTop >= maxScroll) { 81 | return activeTarget != (i = targets.last()[0]) 82 | && this.activate ( i ) 83 | } 84 | 85 | for (i = offsets.length; i--;) { 86 | activeTarget != targets[i] 87 | && scrollTop >= offsets[i] 88 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 89 | && this.activate( targets[i] ) 90 | } 91 | } 92 | 93 | , activate: function (target) { 94 | var active 95 | , selector 96 | 97 | this.activeTarget = target 98 | 99 | $(this.selector) 100 | .parent('.active') 101 | .removeClass('active') 102 | 103 | selector = this.selector 104 | + '[data-target="' + target + '"],' 105 | + this.selector + '[href="' + target + '"]' 106 | 107 | active = $(selector) 108 | .parent('li') 109 | .addClass('active') 110 | 111 | if (active.parent('.dropdown-menu').length) { 112 | active = active.closest('li.dropdown').addClass('active') 113 | } 114 | 115 | active.trigger('activate') 116 | } 117 | 118 | } 119 | 120 | 121 | /* SCROLLSPY PLUGIN DEFINITION 122 | * =========================== */ 123 | 124 | $.fn.scrollspy = function (option) { 125 | return this.each(function () { 126 | var $this = $(this) 127 | , data = $this.data('scrollspy') 128 | , options = typeof option == 'object' && option 129 | if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options))) 130 | if (typeof option == 'string') data[option]() 131 | }) 132 | } 133 | 134 | $.fn.scrollspy.Constructor = ScrollSpy 135 | 136 | $.fn.scrollspy.defaults = { 137 | offset: 10 138 | } 139 | 140 | 141 | /* SCROLLSPY DATA-API 142 | * ================== */ 143 | 144 | $(window).on('load', function () { 145 | $('[data-spy="scroll"]').each(function () { 146 | var $spy = $(this) 147 | $spy.scrollspy($spy.data()) 148 | }) 149 | }) 150 | 151 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-tab.js: -------------------------------------------------------------------------------- 1 | /* ======================================================== 2 | * bootstrap-tab.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#tabs 4 | * ======================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ======================================================== */ 19 | 20 | 21 | !function ($) { 22 | 23 | "use strict"; // jshint ;_; 24 | 25 | 26 | /* TAB CLASS DEFINITION 27 | * ==================== */ 28 | 29 | var Tab = function (element) { 30 | this.element = $(element) 31 | } 32 | 33 | Tab.prototype = { 34 | 35 | constructor: Tab 36 | 37 | , show: function () { 38 | var $this = this.element 39 | , $ul = $this.closest('ul:not(.dropdown-menu)') 40 | , selector = $this.attr('data-target') 41 | , previous 42 | , $target 43 | , e 44 | 45 | if (!selector) { 46 | selector = $this.attr('href') 47 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 48 | } 49 | 50 | if ( $this.parent('li').hasClass('active') ) return 51 | 52 | previous = $ul.find('.active a').last()[0] 53 | 54 | e = $.Event('show', { 55 | relatedTarget: previous 56 | }) 57 | 58 | $this.trigger(e) 59 | 60 | if (e.isDefaultPrevented()) return 61 | 62 | $target = $(selector) 63 | 64 | this.activate($this.parent('li'), $ul) 65 | this.activate($target, $target.parent(), function () { 66 | $this.trigger({ 67 | type: 'shown' 68 | , relatedTarget: previous 69 | }) 70 | }) 71 | } 72 | 73 | , activate: function ( element, container, callback) { 74 | var $active = container.find('> .active') 75 | , transition = callback 76 | && $.support.transition 77 | && $active.hasClass('fade') 78 | 79 | function next() { 80 | $active 81 | .removeClass('active') 82 | .find('> .dropdown-menu > .active') 83 | .removeClass('active') 84 | 85 | element.addClass('active') 86 | 87 | if (transition) { 88 | element[0].offsetWidth // reflow for transition 89 | element.addClass('in') 90 | } else { 91 | element.removeClass('fade') 92 | } 93 | 94 | if ( element.parent('.dropdown-menu') ) { 95 | element.closest('li.dropdown').addClass('active') 96 | } 97 | 98 | callback && callback() 99 | } 100 | 101 | transition ? 102 | $active.one($.support.transition.end, next) : 103 | next() 104 | 105 | $active.removeClass('in') 106 | } 107 | } 108 | 109 | 110 | /* TAB PLUGIN DEFINITION 111 | * ===================== */ 112 | 113 | $.fn.tab = function ( option ) { 114 | return this.each(function () { 115 | var $this = $(this) 116 | , data = $this.data('tab') 117 | if (!data) $this.data('tab', (data = new Tab(this))) 118 | if (typeof option == 'string') data[option]() 119 | }) 120 | } 121 | 122 | $.fn.tab.Constructor = Tab 123 | 124 | 125 | /* TAB DATA-API 126 | * ============ */ 127 | 128 | $(function () { 129 | $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { 130 | e.preventDefault() 131 | $(this).tab('show') 132 | }) 133 | }) 134 | 135 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/js/bootstrap-transition.js: -------------------------------------------------------------------------------- 1 | /* =================================================== 2 | * bootstrap-transition.js v2.1.0 3 | * http://twitter.github.com/bootstrap/javascript.html#transitions 4 | * =================================================== 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================== */ 19 | 20 | 21 | !function ($) { 22 | 23 | $(function () { 24 | 25 | "use strict"; // jshint ;_; 26 | 27 | 28 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) 29 | * ======================================================= */ 30 | 31 | $.support.transition = (function () { 32 | 33 | var transitionEnd = (function () { 34 | 35 | var el = document.createElement('bootstrap') 36 | , transEndEventNames = { 37 | 'WebkitTransition' : 'webkitTransitionEnd' 38 | , 'MozTransition' : 'transitionend' 39 | , 'OTransition' : 'oTransitionEnd otransitionend' 40 | , 'transition' : 'transitionend' 41 | } 42 | , name 43 | 44 | for (name in transEndEventNames){ 45 | if (el.style[name] !== undefined) { 46 | return transEndEventNames[name] 47 | } 48 | } 49 | 50 | }()) 51 | 52 | return transitionEnd && { 53 | end: transitionEnd 54 | } 55 | 56 | })() 57 | 58 | }) 59 | 60 | }(window.jQuery); -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/accordion.less: -------------------------------------------------------------------------------- 1 | // 2 | // Accordion 3 | // -------------------------------------------------- 4 | 5 | 6 | // Parent container 7 | .accordion { 8 | margin-bottom: @baseLineHeight; 9 | } 10 | 11 | // Group == heading + body 12 | .accordion-group { 13 | margin-bottom: 2px; 14 | border: 1px solid #e5e5e5; 15 | .border-radius(4px); 16 | } 17 | .accordion-heading { 18 | border-bottom: 0; 19 | } 20 | .accordion-heading .accordion-toggle { 21 | display: block; 22 | padding: 8px 15px; 23 | } 24 | 25 | // General toggle styles 26 | .accordion-toggle { 27 | cursor: pointer; 28 | } 29 | 30 | // Inner needs the styles because you can't animate properly with any styles on the element 31 | .accordion-inner { 32 | padding: 9px 15px; 33 | border-top: 1px solid #e5e5e5; 34 | } 35 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: 8px 35px 8px 14px; 11 | margin-bottom: @baseLineHeight; 12 | text-shadow: 0 1px 0 rgba(255,255,255,.5); 13 | background-color: @warningBackground; 14 | border: 1px solid @warningBorder; 15 | .border-radius(4px); 16 | color: @warningText; 17 | } 18 | .alert h4 { 19 | margin: 0; 20 | } 21 | 22 | // Adjust close link position 23 | .alert .close { 24 | position: relative; 25 | top: -2px; 26 | right: -21px; 27 | line-height: @baseLineHeight; 28 | } 29 | 30 | 31 | // Alternate styles 32 | // ------------------------- 33 | 34 | .alert-success { 35 | background-color: @successBackground; 36 | border-color: @successBorder; 37 | color: @successText; 38 | } 39 | .alert-danger, 40 | .alert-error { 41 | background-color: @errorBackground; 42 | border-color: @errorBorder; 43 | color: @errorText; 44 | } 45 | .alert-info { 46 | background-color: @infoBackground; 47 | border-color: @infoBorder; 48 | color: @infoText; 49 | } 50 | 51 | 52 | // Block alerts 53 | // ------------------------- 54 | 55 | .alert-block { 56 | padding-top: 14px; 57 | padding-bottom: 14px; 58 | } 59 | .alert-block > p, 60 | .alert-block > ul { 61 | margin-bottom: 0; 62 | } 63 | .alert-block p + p { 64 | margin-top: 5px; 65 | } 66 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/badges.less: -------------------------------------------------------------------------------- 1 | // BADGES 2 | // ------ 3 | 4 | // Base 5 | .badge { 6 | padding: 1px 9px 2px; 7 | font-size: @baseFontSize * .925; 8 | font-weight: bold; 9 | white-space: nowrap; 10 | color: @white; 11 | background-color: @grayLight; 12 | .border-radius(9px); 13 | } 14 | 15 | // Hover state 16 | .badge:hover { 17 | color: @white; 18 | text-decoration: none; 19 | cursor: pointer; 20 | } 21 | 22 | // Colors 23 | .badge-error { background-color: @errorText; } 24 | .badge-error:hover { background-color: darken(@errorText, 10%); } 25 | 26 | .badge-warning { background-color: @orange; } 27 | .badge-warning:hover { background-color: darken(@orange, 10%); } 28 | 29 | .badge-success { background-color: @successText; } 30 | .badge-success:hover { background-color: darken(@successText, 10%); } 31 | 32 | .badge-info { background-color: @infoText; } 33 | .badge-info:hover { background-color: darken(@infoText, 10%); } 34 | 35 | .badge-inverse { background-color: @grayDark; } 36 | .badge-inverse:hover { background-color: darken(@grayDark, 10%); } -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v2.1.0 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | 11 | // CSS Reset 12 | @import "reset.less"; 13 | 14 | // Core variables and mixins 15 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc 16 | @import "mixins.less"; 17 | 18 | // Grid system and page structure 19 | @import "scaffolding.less"; 20 | @import "grid.less"; 21 | @import "layouts.less"; 22 | 23 | // Base CSS 24 | @import "type.less"; 25 | @import "code.less"; 26 | @import "forms.less"; 27 | @import "tables.less"; 28 | 29 | // Components: common 30 | @import "../../Font-Awesome/less/font-awesome.less"; 31 | @import "dropdowns.less"; 32 | @import "wells.less"; 33 | @import "component-animations.less"; 34 | @import "close.less"; 35 | 36 | // Components: Buttons & Alerts 37 | @import "buttons.less"; 38 | @import "button-groups.less"; 39 | @import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less 40 | 41 | // Components: Nav 42 | @import "navs.less"; 43 | @import "navbar.less"; 44 | @import "breadcrumbs.less"; 45 | @import "pagination.less"; 46 | @import "pager.less"; 47 | 48 | // Components: Popovers 49 | @import "modals.less"; 50 | @import "tooltip.less"; 51 | @import "popovers.less"; 52 | 53 | // Components: Misc 54 | @import "thumbnails.less"; 55 | @import "labels-badges.less"; 56 | @import "progress-bars.less"; 57 | @import "accordion.less"; 58 | @import "carousel.less"; 59 | @import "hero-unit.less"; 60 | 61 | // Utility classes 62 | @import "utilities.less"; // Has to be last to override when necessary 63 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: 8px 15px; 8 | margin: 0 0 @baseLineHeight; 9 | list-style: none; 10 | background-color: #f5f5f5; 11 | .border-radius(4px); 12 | li { 13 | display: inline-block; 14 | .ie7-inline-block(); 15 | text-shadow: 0 1px 0 @white; 16 | } 17 | .divider { 18 | padding: 0 5px; 19 | color: #ccc; 20 | } 21 | .active { 22 | color: @grayLight; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/button-groups.less: -------------------------------------------------------------------------------- 1 | // 2 | // Button groups 3 | // -------------------------------------------------- 4 | 5 | 6 | // Make the div behave like a button 7 | .btn-group { 8 | position: relative; 9 | font-size: 0; // remove as part 1 of font-size inline-block hack 10 | white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page) 11 | .ie7-restore-left-whitespace(); 12 | } 13 | 14 | // Space out series of button groups 15 | .btn-group + .btn-group { 16 | margin-left: 5px; 17 | } 18 | 19 | // Optional: Group multiple button groups together for a toolbar 20 | .btn-toolbar { 21 | font-size: 0; // Hack to remove whitespace that results from using inline-block 22 | margin-top: @baseLineHeight / 2; 23 | margin-bottom: @baseLineHeight / 2; 24 | .btn-group { 25 | display: inline-block; 26 | .ie7-inline-block(); 27 | } 28 | .btn + .btn, 29 | .btn-group + .btn, 30 | .btn + .btn-group { 31 | margin-left: 5px; 32 | } 33 | } 34 | 35 | // Float them, remove border radius, then re-add to first and last elements 36 | .btn-group > .btn { 37 | position: relative; 38 | .border-radius(0); 39 | } 40 | .btn-group > .btn + .btn { 41 | margin-left: -1px; 42 | } 43 | .btn-group > .btn, 44 | .btn-group > .dropdown-menu { 45 | font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack 46 | } 47 | 48 | // Reset fonts for other sizes 49 | .btn-group > .btn-mini { 50 | font-size: 11px; 51 | } 52 | .btn-group > .btn-small { 53 | font-size: 12px; 54 | } 55 | .btn-group > .btn-large { 56 | font-size: 16px; 57 | } 58 | 59 | // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match 60 | .btn-group > .btn:first-child { 61 | margin-left: 0; 62 | -webkit-border-top-left-radius: 4px; 63 | -moz-border-radius-topleft: 4px; 64 | border-top-left-radius: 4px; 65 | -webkit-border-bottom-left-radius: 4px; 66 | -moz-border-radius-bottomleft: 4px; 67 | border-bottom-left-radius: 4px; 68 | } 69 | // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it 70 | .btn-group > .btn:last-child, 71 | .btn-group > .dropdown-toggle { 72 | -webkit-border-top-right-radius: 4px; 73 | -moz-border-radius-topright: 4px; 74 | border-top-right-radius: 4px; 75 | -webkit-border-bottom-right-radius: 4px; 76 | -moz-border-radius-bottomright: 4px; 77 | border-bottom-right-radius: 4px; 78 | } 79 | // Reset corners for large buttons 80 | .btn-group > .btn.large:first-child { 81 | margin-left: 0; 82 | -webkit-border-top-left-radius: 6px; 83 | -moz-border-radius-topleft: 6px; 84 | border-top-left-radius: 6px; 85 | -webkit-border-bottom-left-radius: 6px; 86 | -moz-border-radius-bottomleft: 6px; 87 | border-bottom-left-radius: 6px; 88 | } 89 | .btn-group > .btn.large:last-child, 90 | .btn-group > .large.dropdown-toggle { 91 | -webkit-border-top-right-radius: 6px; 92 | -moz-border-radius-topright: 6px; 93 | border-top-right-radius: 6px; 94 | -webkit-border-bottom-right-radius: 6px; 95 | -moz-border-radius-bottomright: 6px; 96 | border-bottom-right-radius: 6px; 97 | } 98 | 99 | // On hover/focus/active, bring the proper btn to front 100 | .btn-group > .btn:hover, 101 | .btn-group > .btn:focus, 102 | .btn-group > .btn:active, 103 | .btn-group > .btn.active { 104 | z-index: 2; 105 | } 106 | 107 | // On active and open, don't show outline 108 | .btn-group .dropdown-toggle:active, 109 | .btn-group.open .dropdown-toggle { 110 | outline: 0; 111 | } 112 | 113 | 114 | 115 | // Split button dropdowns 116 | // ---------------------- 117 | 118 | // Give the line between buttons some depth 119 | .btn-group > .btn + .dropdown-toggle { 120 | padding-left: 8px; 121 | padding-right: 8px; 122 | .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); 123 | *padding-top: 5px; 124 | *padding-bottom: 5px; 125 | } 126 | .btn-group > .btn-mini + .dropdown-toggle { 127 | padding-left: 5px; 128 | padding-right: 5px; 129 | *padding-top: 2px; 130 | *padding-bottom: 2px; 131 | } 132 | .btn-group > .btn-small + .dropdown-toggle { 133 | *padding-top: 5px; 134 | *padding-bottom: 4px; 135 | } 136 | .btn-group > .btn-large + .dropdown-toggle { 137 | padding-left: 12px; 138 | padding-right: 12px; 139 | *padding-top: 7px; 140 | *padding-bottom: 7px; 141 | } 142 | 143 | .btn-group.open { 144 | 145 | // The clickable button for toggling the menu 146 | // Remove the gradient and set the same inset shadow as the :active state 147 | .dropdown-toggle { 148 | background-image: none; 149 | .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); 150 | } 151 | 152 | // Keep the hover's background when dropdown is open 153 | .btn.dropdown-toggle { 154 | background-color: @btnBackgroundHighlight; 155 | } 156 | .btn-primary.dropdown-toggle { 157 | background-color: @btnPrimaryBackgroundHighlight; 158 | } 159 | .btn-warning.dropdown-toggle { 160 | background-color: @btnWarningBackgroundHighlight; 161 | } 162 | .btn-danger.dropdown-toggle { 163 | background-color: @btnDangerBackgroundHighlight; 164 | } 165 | .btn-success.dropdown-toggle { 166 | background-color: @btnSuccessBackgroundHighlight; 167 | } 168 | .btn-info.dropdown-toggle { 169 | background-color: @btnInfoBackgroundHighlight; 170 | } 171 | .btn-inverse.dropdown-toggle { 172 | background-color: @btnInverseBackgroundHighlight; 173 | } 174 | } 175 | 176 | 177 | // Reposition the caret 178 | .btn .caret { 179 | margin-top: 8px; 180 | margin-left: 0; 181 | } 182 | // Carets in other button sizes 183 | .btn-mini .caret, 184 | .btn-small .caret, 185 | .btn-large .caret { 186 | margin-top: 6px; 187 | } 188 | .btn-large .caret { 189 | border-left-width: 5px; 190 | border-right-width: 5px; 191 | border-top-width: 5px; 192 | } 193 | // Upside down carets for .dropup 194 | .dropup .btn-large .caret { 195 | border-bottom: 5px solid @black; 196 | border-top: 0; 197 | } 198 | 199 | 200 | 201 | // Account for other colors 202 | .btn-primary, 203 | .btn-warning, 204 | .btn-danger, 205 | .btn-info, 206 | .btn-success, 207 | .btn-inverse { 208 | .caret { 209 | border-top-color: @white; 210 | border-bottom-color: @white; 211 | } 212 | } 213 | 214 | 215 | 216 | // Vertical button groups 217 | // ---------------------- 218 | 219 | .btn-group-vertical { 220 | display: inline-block; // makes buttons only take up the width they need 221 | .ie7-inline-block(); 222 | } 223 | .btn-group-vertical .btn { 224 | display: block; 225 | float: none; 226 | width: 100%; 227 | .border-radius(0); 228 | } 229 | .btn-group-vertical .btn + .btn { 230 | margin-left: 0; 231 | margin-top: -1px; 232 | } 233 | .btn-group-vertical .btn:first-child { 234 | .border-radius(4px 4px 0 0); 235 | } 236 | .btn-group-vertical .btn:last-child { 237 | .border-radius(0 0 4px 4px); 238 | } 239 | .btn-group-vertical .btn-large:first-child { 240 | .border-radius(6px 6px 0 0); 241 | } 242 | .btn-group-vertical .btn-large:last-child { 243 | .border-radius(0 0 6px 6px); 244 | } 245 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/buttons.less: -------------------------------------------------------------------------------- 1 | // 2 | // Buttons 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // -------------------------------------------------- 8 | 9 | // Core 10 | .btn { 11 | display: inline-block; 12 | .ie7-inline-block(); 13 | padding: 4px 14px; 14 | margin-bottom: 0; // For input.btn 15 | font-size: @baseFontSize; 16 | line-height: @baseLineHeight; 17 | *line-height: @baseLineHeight; 18 | text-align: center; 19 | vertical-align: middle; 20 | cursor: pointer; 21 | .buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75)); 22 | border: 1px solid @btnBorder; 23 | *border: 0; // Remove the border to prevent IE7's black border on input:focus 24 | border-bottom-color: darken(@btnBorder, 10%); 25 | .border-radius(4px); 26 | .ie7-restore-left-whitespace(); // Give IE7 some love 27 | .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); 28 | 29 | // Hover state 30 | &:hover { 31 | color: @grayDark; 32 | text-decoration: none; 33 | background-color: darken(@white, 10%); 34 | *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */ 35 | background-position: 0 -15px; 36 | 37 | // transition is only when going to hover, otherwise the background 38 | // behind the gradient (there for IE<=9 fallback) gets mismatched 39 | .transition(background-position .1s linear); 40 | } 41 | 42 | // Focus state for keyboard and accessibility 43 | &:focus { 44 | .tab-focus(); 45 | } 46 | 47 | // Active state 48 | &.active, 49 | &:active { 50 | background-color: darken(@white, 10%); 51 | background-color: darken(@white, 15%) e("\9"); 52 | background-image: none; 53 | outline: 0; 54 | .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); 55 | } 56 | 57 | // Disabled state 58 | &.disabled, 59 | &[disabled] { 60 | cursor: default; 61 | background-color: darken(@white, 10%); 62 | background-image: none; 63 | .opacity(65); 64 | .box-shadow(none); 65 | } 66 | 67 | } 68 | 69 | 70 | 71 | // Button Sizes 72 | // -------------------------------------------------- 73 | 74 | // Large 75 | .btn-large { 76 | padding: 9px 14px; 77 | font-size: @baseFontSize + 2px; 78 | line-height: normal; 79 | .border-radius(5px); 80 | } 81 | .btn-large [class^="icon-"] { 82 | margin-top: 2px; 83 | } 84 | 85 | // Small 86 | .btn-small { 87 | padding: 3px 9px; 88 | font-size: @baseFontSize - 2px; 89 | line-height: @baseLineHeight - 2px; 90 | } 91 | .btn-small [class^="icon-"] { 92 | margin-top: 0; 93 | } 94 | 95 | // Mini 96 | .btn-mini { 97 | padding: 2px 6px; 98 | font-size: @baseFontSize - 3px; 99 | line-height: @baseLineHeight - 4px; 100 | } 101 | 102 | // Block button 103 | .btn-block { 104 | display: block; 105 | width: 100%; 106 | padding-left: 0; 107 | padding-right: 0; 108 | .box-sizing(border-box); 109 | } 110 | .btn-block + .btn-block { 111 | margin-top: 5px; 112 | } 113 | 114 | 115 | // Alternate buttons 116 | // -------------------------------------------------- 117 | 118 | // Provide *some* extra contrast for those who can get it 119 | .btn-primary.active, 120 | .btn-warning.active, 121 | .btn-danger.active, 122 | .btn-success.active, 123 | .btn-info.active, 124 | .btn-inverse.active { 125 | color: rgba(255,255,255,.75); 126 | } 127 | 128 | // Set the backgrounds 129 | // ------------------------- 130 | .btn { 131 | // reset here as of 2.0.3 due to Recess property order 132 | border-color: #c5c5c5; 133 | border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25); 134 | } 135 | .btn-primary { 136 | .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight); 137 | } 138 | // Warning appears are orange 139 | .btn-warning { 140 | .buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight); 141 | } 142 | // Danger and error appear as red 143 | .btn-danger { 144 | .buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight); 145 | } 146 | // Success appears as green 147 | .btn-success { 148 | .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight); 149 | } 150 | // Info appears as a neutral blue 151 | .btn-info { 152 | .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight); 153 | } 154 | // Inverse appears as dark gray 155 | .btn-inverse { 156 | .buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight); 157 | } 158 | 159 | 160 | // Cross-browser Jank 161 | // -------------------------------------------------- 162 | 163 | button.btn, 164 | input[type="submit"].btn { 165 | 166 | // Firefox 3.6 only I believe 167 | &::-moz-focus-inner { 168 | padding: 0; 169 | border: 0; 170 | } 171 | 172 | // IE7 has some default padding on button controls 173 | *padding-top: 3px; 174 | *padding-bottom: 3px; 175 | 176 | &.btn-large { 177 | *padding-top: 7px; 178 | *padding-bottom: 7px; 179 | } 180 | &.btn-small { 181 | *padding-top: 3px; 182 | *padding-bottom: 3px; 183 | } 184 | &.btn-mini { 185 | *padding-top: 1px; 186 | *padding-bottom: 1px; 187 | } 188 | } 189 | 190 | 191 | // Link buttons 192 | // -------------------------------------------------- 193 | 194 | // Make a button look and behave like a link 195 | .btn-link, 196 | .btn-link:active { 197 | background-color: transparent; 198 | background-image: none; 199 | .box-shadow(none); 200 | } 201 | .btn-link { 202 | border-color: transparent; 203 | cursor: pointer; 204 | color: @linkColor; 205 | .border-radius(0); 206 | } 207 | .btn-link:hover { 208 | color: @linkColorHover; 209 | text-decoration: underline; 210 | background-color: transparent; 211 | } 212 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/carousel.less: -------------------------------------------------------------------------------- 1 | // 2 | // Carousel 3 | // -------------------------------------------------- 4 | 5 | 6 | .carousel { 7 | position: relative; 8 | margin-bottom: @baseLineHeight; 9 | line-height: 1; 10 | } 11 | 12 | .carousel-inner { 13 | overflow: hidden; 14 | width: 100%; 15 | position: relative; 16 | } 17 | 18 | .carousel { 19 | 20 | .item { 21 | display: none; 22 | position: relative; 23 | .transition(.6s ease-in-out left); 24 | } 25 | 26 | // Account for jankitude on images 27 | .item > img { 28 | display: block; 29 | line-height: 1; 30 | } 31 | 32 | .active, 33 | .next, 34 | .prev { display: block; } 35 | 36 | .active { 37 | left: 0; 38 | } 39 | 40 | .next, 41 | .prev { 42 | position: absolute; 43 | top: 0; 44 | width: 100%; 45 | } 46 | 47 | .next { 48 | left: 100%; 49 | } 50 | .prev { 51 | left: -100%; 52 | } 53 | .next.left, 54 | .prev.right { 55 | left: 0; 56 | } 57 | 58 | .active.left { 59 | left: -100%; 60 | } 61 | .active.right { 62 | left: 100%; 63 | } 64 | 65 | } 66 | 67 | // Left/right controls for nav 68 | // --------------------------- 69 | 70 | .carousel-control { 71 | position: absolute; 72 | top: 40%; 73 | left: 15px; 74 | width: 40px; 75 | height: 40px; 76 | margin-top: -20px; 77 | font-size: 60px; 78 | font-weight: 100; 79 | line-height: 30px; 80 | color: @white; 81 | text-align: center; 82 | background: @grayDarker; 83 | border: 3px solid @white; 84 | .border-radius(23px); 85 | .opacity(50); 86 | 87 | // we can't have this transition here 88 | // because webkit cancels the carousel 89 | // animation if you trip this while 90 | // in the middle of another animation 91 | // ;_; 92 | // .transition(opacity .2s linear); 93 | 94 | // Reposition the right one 95 | &.right { 96 | left: auto; 97 | right: 15px; 98 | } 99 | 100 | // Hover state 101 | &:hover { 102 | color: @white; 103 | text-decoration: none; 104 | .opacity(90); 105 | } 106 | } 107 | 108 | 109 | // Caption for text below images 110 | // ----------------------------- 111 | 112 | .carousel-caption { 113 | position: absolute; 114 | left: 0; 115 | right: 0; 116 | bottom: 0; 117 | padding: 15px; 118 | background: @grayDark; 119 | background: rgba(0,0,0,.75); 120 | } 121 | .carousel-caption h4, 122 | .carousel-caption p { 123 | color: @white; 124 | line-height: @baseLineHeight; 125 | } 126 | .carousel-caption h4 { 127 | margin: 0 0 5px; 128 | } 129 | .carousel-caption p { 130 | margin-bottom: 0; 131 | } 132 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: 20px; 9 | font-weight: bold; 10 | line-height: @baseLineHeight; 11 | color: @black; 12 | text-shadow: 0 1px 0 rgba(255,255,255,1); 13 | .opacity(20); 14 | &:hover { 15 | color: @black; 16 | text-decoration: none; 17 | cursor: pointer; 18 | .opacity(40); 19 | } 20 | } 21 | 22 | // Additional properties for button version 23 | // iOS requires the button element instead of an anchor tag. 24 | // If you want the anchor version, it requires `href="#"`. 25 | button.close { 26 | padding: 0; 27 | cursor: pointer; 28 | background: transparent; 29 | border: 0; 30 | -webkit-appearance: none; 31 | } -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and blocK) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | pre { 9 | padding: 0 3px 2px; 10 | #font > #family > .monospace; 11 | font-size: @baseFontSize - 2; 12 | color: @grayDark; 13 | .border-radius(3px); 14 | } 15 | 16 | // Inline code 17 | code { 18 | padding: 2px 4px; 19 | color: #d14; 20 | background-color: #f7f7f9; 21 | border: 1px solid #e1e1e8; 22 | } 23 | 24 | // Blocks of code 25 | pre { 26 | display: block; 27 | padding: (@baseLineHeight - 1) / 2; 28 | margin: 0 0 @baseLineHeight / 2; 29 | font-size: @baseFontSize - 1; // 14px to 13px 30 | line-height: @baseLineHeight; 31 | word-break: break-all; 32 | word-wrap: break-word; 33 | white-space: pre; 34 | white-space: pre-wrap; 35 | background-color: #f5f5f5; 36 | border: 1px solid #ccc; // fallback for IE7-8 37 | border: 1px solid rgba(0,0,0,.15); 38 | .border-radius(4px); 39 | 40 | // Make prettyprint styles more spaced out for readability 41 | &.prettyprint { 42 | margin-bottom: @baseLineHeight; 43 | } 44 | 45 | // Account for some code outputs that place code tags in pre tags 46 | code { 47 | padding: 0; 48 | color: inherit; 49 | background-color: transparent; 50 | border: 0; 51 | } 52 | } 53 | 54 | // Enable scrollable blocks of code 55 | .pre-scrollable { 56 | max-height: 340px; 57 | overflow-y: scroll; 58 | } -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | 6 | .fade { 7 | opacity: 0; 8 | .transition(opacity .15s linear); 9 | &.in { 10 | opacity: 1; 11 | } 12 | } 13 | 14 | .collapse { 15 | position: relative; 16 | height: 0; 17 | overflow: hidden; 18 | overflow: visible \9; 19 | .transition(height .35s ease); 20 | &.in { 21 | height: auto; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/dropdowns.less: -------------------------------------------------------------------------------- 1 | // 2 | // Dropdown menus 3 | // -------------------------------------------------- 4 | 5 | 6 | // Use the .menu class on any
  • element within the topbar or ul.tabs and you'll get some superfancy dropdowns 7 | .dropup, 8 | .dropdown { 9 | position: relative; 10 | } 11 | .dropdown-toggle { 12 | // The caret makes the toggle a bit too tall in IE7 13 | *margin-bottom: -3px; 14 | } 15 | .dropdown-toggle:active, 16 | .open .dropdown-toggle { 17 | outline: 0; 18 | } 19 | 20 | // Dropdown arrow/caret 21 | // -------------------- 22 | .caret { 23 | display: inline-block; 24 | width: 0; 25 | height: 0; 26 | vertical-align: top; 27 | border-top: 4px solid @black; 28 | border-right: 4px solid transparent; 29 | border-left: 4px solid transparent; 30 | content: ""; 31 | } 32 | 33 | // Place the caret 34 | .dropdown .caret { 35 | margin-top: 8px; 36 | margin-left: 2px; 37 | } 38 | 39 | // The dropdown menu (ul) 40 | // ---------------------- 41 | .dropdown-menu { 42 | position: absolute; 43 | top: 100%; 44 | left: 0; 45 | z-index: @zindexDropdown; 46 | display: none; // none by default, but block on "open" of the menu 47 | float: left; 48 | min-width: 160px; 49 | padding: 5px 0; 50 | margin: 2px 0 0; // override default ul 51 | list-style: none; 52 | background-color: @dropdownBackground; 53 | border: 1px solid #ccc; // Fallback for IE7-8 54 | border: 1px solid @dropdownBorder; 55 | *border-right-width: 2px; 56 | *border-bottom-width: 2px; 57 | .border-radius(6px); 58 | .box-shadow(0 5px 10px rgba(0,0,0,.2)); 59 | -webkit-background-clip: padding-box; 60 | -moz-background-clip: padding; 61 | background-clip: padding-box; 62 | 63 | // Aligns the dropdown menu to right 64 | &.pull-right { 65 | right: 0; 66 | left: auto; 67 | } 68 | 69 | // Dividers (basically an hr) within the dropdown 70 | .divider { 71 | .nav-divider(@dropdownDividerTop, @dropdownDividerBottom); 72 | } 73 | 74 | // Links within the dropdown menu 75 | a { 76 | display: block; 77 | padding: 3px 20px; 78 | clear: both; 79 | font-weight: normal; 80 | line-height: @baseLineHeight; 81 | color: @dropdownLinkColor; 82 | white-space: nowrap; 83 | } 84 | } 85 | 86 | // Hover state 87 | // ----------- 88 | .dropdown-menu li > a:hover, 89 | .dropdown-menu li > a:focus, 90 | .dropdown-submenu:hover > a { 91 | text-decoration: none; 92 | color: @dropdownLinkColorHover; 93 | background-color: @dropdownLinkBackgroundHover; 94 | #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%)); 95 | } 96 | 97 | // Active state 98 | // ------------ 99 | .dropdown-menu .active > a, 100 | .dropdown-menu .active > a:hover { 101 | color: @dropdownLinkColorHover; 102 | text-decoration: none; 103 | outline: 0; 104 | background-color: @dropdownLinkBackgroundActive; 105 | #gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%)); 106 | } 107 | 108 | // Disabled state 109 | // -------------- 110 | // Gray out text and ensure the hover state remains gray 111 | .dropdown-menu .disabled > a, 112 | .dropdown-menu .disabled > a:hover { 113 | color: @grayLight; 114 | } 115 | // Nuke hover effects 116 | .dropdown-menu .disabled > a:hover { 117 | text-decoration: none; 118 | background-color: transparent; 119 | cursor: default; 120 | } 121 | 122 | // Open state for the dropdown 123 | // --------------------------- 124 | .open { 125 | // IE7's z-index only goes to the nearest positioned ancestor, which would 126 | // make the menu appear below buttons that appeared later on the page 127 | *z-index: @zindexDropdown; 128 | 129 | & > .dropdown-menu { 130 | display: block; 131 | } 132 | } 133 | 134 | // Right aligned dropdowns 135 | // --------------------------- 136 | .pull-right > .dropdown-menu { 137 | right: 0; 138 | left: auto; 139 | } 140 | 141 | // Allow for dropdowns to go bottom up (aka, dropup-menu) 142 | // ------------------------------------------------------ 143 | // Just add .dropup after the standard .dropdown class and you're set, bro. 144 | // TODO: abstract this so that the navbar fixed styles are not placed here? 145 | .dropup, 146 | .navbar-fixed-bottom .dropdown { 147 | // Reverse the caret 148 | .caret { 149 | border-top: 0; 150 | border-bottom: 4px solid @black; 151 | content: "\2191"; 152 | } 153 | // Different positioning for bottom up menu 154 | .dropdown-menu { 155 | top: auto; 156 | bottom: 100%; 157 | margin-bottom: 1px; 158 | } 159 | } 160 | 161 | // Sub menus 162 | // --------------------------- 163 | .dropdown-submenu { 164 | position: relative; 165 | } 166 | .dropdown-submenu > .dropdown-menu { 167 | top: 0; 168 | left: 100%; 169 | margin-top: -6px; 170 | margin-left: -1px; 171 | -webkit-border-radius: 0 6px 6px 6px; 172 | -moz-border-radius: 0 6px 6px 6px; 173 | border-radius: 0 6px 6px 6px; 174 | } 175 | .dropdown-submenu:hover .dropdown-menu { 176 | display: block; 177 | } 178 | 179 | .dropdown-submenu > a:after { 180 | display: block; 181 | content: " "; 182 | float: right; 183 | width: 0; 184 | height: 0; 185 | border-color: transparent; 186 | border-style: solid; 187 | border-width: 5px 0 5px 5px; 188 | border-left-color: darken(@dropdownBackground, 20%); 189 | margin-top: 5px; 190 | margin-right: -10px; 191 | } 192 | .dropdown-submenu:hover > a:after { 193 | border-left-color: @dropdownLinkColorHover; 194 | } 195 | 196 | 197 | // Tweak nav headers 198 | // ----------------- 199 | // Increase padding from 15px to 20px on sides 200 | .dropdown .dropdown-menu .nav-header { 201 | padding-left: 20px; 202 | padding-right: 20px; 203 | } 204 | 205 | // Typeahead 206 | // --------- 207 | .typeahead { 208 | margin-top: 2px; // give it some space to breathe 209 | .border-radius(4px); 210 | } 211 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Fixed (940px) 7 | #grid > .core(@gridColumnWidth, @gridGutterWidth); 8 | 9 | // Fluid (940px) 10 | #grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth); 11 | 12 | // Reset utility classes due to specificity 13 | [class*="span"].hide, 14 | .row-fluid [class*="span"].hide { 15 | display: none; 16 | } 17 | 18 | [class*="span"].pull-right, 19 | .row-fluid [class*="span"].pull-right { 20 | float: right; 21 | } 22 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/hero-unit.less: -------------------------------------------------------------------------------- 1 | // 2 | // Hero unit 3 | // -------------------------------------------------- 4 | 5 | 6 | .hero-unit { 7 | padding: 60px; 8 | margin-bottom: 30px; 9 | background-color: @heroUnitBackground; 10 | .border-radius(6px); 11 | h1 { 12 | margin-bottom: 0; 13 | font-size: 60px; 14 | line-height: 1; 15 | color: @heroUnitHeadingColor; 16 | letter-spacing: -1px; 17 | } 18 | p { 19 | font-size: 18px; 20 | font-weight: 200; 21 | line-height: @baseLineHeight * 1.5; 22 | color: @heroUnitLeadColor; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/labels-badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels and badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .label, 8 | .badge { 9 | font-size: @baseFontSize * .846; 10 | font-weight: bold; 11 | line-height: 14px; // ensure proper line-height if floated 12 | color: @white; 13 | vertical-align: baseline; 14 | white-space: nowrap; 15 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 16 | background-color: @grayLight; 17 | } 18 | // Set unique padding and border-radii 19 | .label { 20 | padding: 1px 4px 2px; 21 | .border-radius(3px); 22 | } 23 | .badge { 24 | padding: 1px 9px 2px; 25 | .border-radius(9px); 26 | } 27 | 28 | // Hover state, but only for links 29 | a { 30 | &.label:hover, 31 | &.badge:hover { 32 | color: @white; 33 | text-decoration: none; 34 | cursor: pointer; 35 | } 36 | } 37 | 38 | // Colors 39 | // Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute) 40 | .label, 41 | .badge { 42 | // Important (red) 43 | &-important { background-color: @errorText; } 44 | &-important[href] { background-color: darken(@errorText, 10%); } 45 | // Warnings (orange) 46 | &-warning { background-color: @orange; } 47 | &-warning[href] { background-color: darken(@orange, 10%); } 48 | // Success (green) 49 | &-success { background-color: @successText; } 50 | &-success[href] { background-color: darken(@successText, 10%); } 51 | // Info (turquoise) 52 | &-info { background-color: @infoText; } 53 | &-info[href] { background-color: darken(@infoText, 10%); } 54 | // Inverse (black) 55 | &-inverse { background-color: @grayDark; } 56 | &-inverse[href] { background-color: darken(@grayDark, 10%); } 57 | } 58 | 59 | // Quick fix for labels/badges in buttons 60 | .btn { 61 | .label, 62 | .badge { 63 | position: relative; 64 | top: -1px; 65 | } 66 | } 67 | .btn-mini { 68 | .label, 69 | .badge { 70 | top: 0; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/labels.less: -------------------------------------------------------------------------------- 1 | // LABELS 2 | // ------ 3 | 4 | // Base 5 | .label { 6 | padding: 1px 4px 2px; 7 | font-size: @baseFontSize * .846; 8 | font-weight: bold; 9 | line-height: 13px; // ensure proper line-height if floated 10 | color: @white; 11 | vertical-align: middle; 12 | white-space: nowrap; 13 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 14 | background-color: @grayLight; 15 | .border-radius(3px); 16 | } 17 | 18 | // Hover state 19 | .label:hover { 20 | color: @white; 21 | text-decoration: none; 22 | } 23 | 24 | // Colors 25 | .label-important { background-color: @errorText; } 26 | .label-important:hover { background-color: darken(@errorText, 10%); } 27 | 28 | .label-warning { background-color: @orange; } 29 | .label-warning:hover { background-color: darken(@orange, 10%); } 30 | 31 | .label-success { background-color: @successText; } 32 | .label-success:hover { background-color: darken(@successText, 10%); } 33 | 34 | .label-info { background-color: @infoText; } 35 | .label-info:hover { background-color: darken(@infoText, 10%); } 36 | 37 | .label-inverse { background-color: @grayDark; } 38 | .label-inverse:hover { background-color: darken(@grayDark, 10%); } -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/layouts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Layouts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container (centered, fixed-width layouts) 7 | .container { 8 | .container-fixed(); 9 | } 10 | 11 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 12 | .container-fluid { 13 | padding-right: @gridGutterWidth; 14 | padding-left: @gridGutterWidth; 15 | .clearfix(); 16 | } -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/modals.less: -------------------------------------------------------------------------------- 1 | // 2 | // Modals 3 | // -------------------------------------------------- 4 | 5 | 6 | // Recalculate z-index where appropriate 7 | .modal-open { 8 | .dropdown-menu { z-index: @zindexDropdown + @zindexModal; } 9 | .dropdown.open { *z-index: @zindexDropdown + @zindexModal; } 10 | .popover { z-index: @zindexPopover + @zindexModal; } 11 | .tooltip { z-index: @zindexTooltip + @zindexModal; } 12 | } 13 | 14 | // Background 15 | .modal-backdrop { 16 | position: fixed; 17 | top: 0; 18 | right: 0; 19 | bottom: 0; 20 | left: 0; 21 | z-index: @zindexModalBackdrop; 22 | background-color: @black; 23 | // Fade for backdrop 24 | &.fade { opacity: 0; } 25 | } 26 | 27 | .modal-backdrop, 28 | .modal-backdrop.fade.in { 29 | .opacity(80); 30 | } 31 | 32 | // Base modal 33 | .modal { 34 | position: fixed; 35 | top: 50%; 36 | left: 50%; 37 | z-index: @zindexModal; 38 | overflow: auto; 39 | width: 560px; 40 | margin: -250px 0 0 -280px; 41 | background-color: @white; 42 | border: 1px solid #999; 43 | border: 1px solid rgba(0,0,0,.3); 44 | *border: 1px solid #999; /* IE6-7 */ 45 | .border-radius(6px); 46 | .box-shadow(0 3px 7px rgba(0,0,0,0.3)); 47 | .background-clip(padding-box); 48 | &.fade { 49 | .transition(e('opacity .3s linear, top .3s ease-out')); 50 | top: -25%; 51 | } 52 | &.fade.in { top: 50%; } 53 | } 54 | .modal-header { 55 | padding: 9px 15px; 56 | border-bottom: 1px solid #eee; 57 | // Close icon 58 | .close { margin-top: 2px; } 59 | // Heading 60 | h3 { 61 | margin: 0; 62 | line-height: 30px; 63 | } 64 | } 65 | 66 | // Body (where all modal content resides) 67 | .modal-body { 68 | overflow-y: auto; 69 | max-height: 400px; 70 | padding: 15px; 71 | } 72 | // Remove bottom margin if need be 73 | .modal-form { 74 | margin-bottom: 0; 75 | } 76 | 77 | // Footer (for actions) 78 | .modal-footer { 79 | padding: 14px 15px 15px; 80 | margin-bottom: 0; 81 | text-align: right; // right align buttons 82 | background-color: #f5f5f5; 83 | border-top: 1px solid #ddd; 84 | .border-radius(0 0 6px 6px); 85 | .box-shadow(inset 0 1px 0 @white); 86 | .clearfix(); // clear it in case folks use .pull-* classes on buttons 87 | 88 | // Properly space out buttons 89 | .btn + .btn { 90 | margin-left: 5px; 91 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs 92 | } 93 | // but override that for button groups 94 | .btn-group .btn + .btn { 95 | margin-left: -1px; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | margin: @baseLineHeight 0; 8 | list-style: none; 9 | text-align: center; 10 | .clearfix(); 11 | } 12 | .pager li { 13 | display: inline; 14 | } 15 | .pager a { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: #fff; 19 | border: 1px solid #ddd; 20 | .border-radius(15px); 21 | } 22 | .pager a:hover { 23 | text-decoration: none; 24 | background-color: #f5f5f5; 25 | } 26 | .pager .next a { 27 | float: right; 28 | } 29 | .pager .previous a { 30 | float: left; 31 | } 32 | .pager .disabled a, 33 | .pager .disabled a:hover { 34 | color: @grayLight; 35 | background-color: #fff; 36 | cursor: default; 37 | } -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | 5 | 6 | .pagination { 7 | height: @baseLineHeight * 2; 8 | margin: @baseLineHeight 0; 9 | } 10 | .pagination ul { 11 | display: inline-block; 12 | .ie7-inline-block(); 13 | margin-left: 0; 14 | margin-bottom: 0; 15 | .border-radius(3px); 16 | .box-shadow(0 1px 2px rgba(0,0,0,.05)); 17 | } 18 | .pagination li { 19 | display: inline; 20 | } 21 | .pagination a, 22 | .pagination span { 23 | float: left; 24 | padding: 0 14px; 25 | line-height: (@baseLineHeight * 2) - 2; 26 | text-decoration: none; 27 | background-color: @paginationBackground; 28 | border: 1px solid @paginationBorder; 29 | border-left-width: 0; 30 | } 31 | .pagination a:hover, 32 | .pagination .active a, 33 | .pagination .active span { 34 | background-color: #f5f5f5; 35 | } 36 | .pagination .active a, 37 | .pagination .active span { 38 | color: @grayLight; 39 | cursor: default; 40 | } 41 | .pagination .disabled span, 42 | .pagination .disabled a, 43 | .pagination .disabled a:hover { 44 | color: @grayLight; 45 | background-color: transparent; 46 | cursor: default; 47 | } 48 | .pagination li:first-child a, 49 | .pagination li:first-child span { 50 | border-left-width: 1px; 51 | .border-radius(3px 0 0 3px); 52 | } 53 | .pagination li:last-child a, 54 | .pagination li:last-child span { 55 | .border-radius(0 3px 3px 0); 56 | } 57 | 58 | // Centered 59 | .pagination-centered { 60 | text-align: center; 61 | } 62 | .pagination-right { 63 | text-align: right; 64 | } 65 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/popovers.less: -------------------------------------------------------------------------------- 1 | // 2 | // Popovers 3 | // -------------------------------------------------- 4 | 5 | 6 | .popover { 7 | position: absolute; 8 | top: 0; 9 | left: 0; 10 | z-index: @zindexPopover; 11 | display: none; 12 | width: 236px; 13 | padding: 1px; 14 | background-color: @popoverBackground; 15 | -webkit-background-clip: padding-box; 16 | -moz-background-clip: padding; 17 | background-clip: padding-box; 18 | border: 1px solid #ccc; 19 | border: 1px solid rgba(0,0,0,.2); 20 | .border-radius(6px); 21 | .box-shadow(0 5px 10px rgba(0,0,0,.2)); 22 | 23 | // Offset the popover to account for the popover arrow 24 | &.top { margin-bottom: 10px; } 25 | &.right { margin-left: 10px; } 26 | &.bottom { margin-top: 10px; } 27 | &.left { margin-right: 10px; } 28 | 29 | } 30 | 31 | .popover-title { 32 | margin: 0; // reset heading margin 33 | padding: 8px 14px; 34 | font-size: 14px; 35 | font-weight: normal; 36 | line-height: 18px; 37 | background-color: @popoverTitleBackground; 38 | border-bottom: 1px solid darken(@popoverTitleBackground, 5%); 39 | .border-radius(5px 5px 0 0); 40 | } 41 | 42 | .popover-content { 43 | padding: 9px 14px; 44 | p, ul, ol { 45 | margin-bottom: 0; 46 | } 47 | } 48 | 49 | // Arrows 50 | .popover .arrow, 51 | .popover .arrow:after { 52 | position: absolute; 53 | display: inline-block; 54 | width: 0; 55 | height: 0; 56 | border-color: transparent; 57 | border-style: solid; 58 | } 59 | .popover .arrow:after { 60 | content: ""; 61 | z-index: -1; 62 | } 63 | 64 | .popover { 65 | &.top .arrow { 66 | bottom: -@popoverArrowWidth; 67 | left: 50%; 68 | margin-left: -@popoverArrowWidth; 69 | border-width: @popoverArrowWidth @popoverArrowWidth 0; 70 | border-top-color: @popoverArrowColor; 71 | &:after { 72 | border-width: @popoverArrowOuterWidth @popoverArrowOuterWidth 0; 73 | border-top-color: @popoverArrowOuterColor; 74 | bottom: -1px; 75 | left: -@popoverArrowOuterWidth; 76 | } 77 | } 78 | &.right .arrow { 79 | top: 50%; 80 | left: -@popoverArrowWidth; 81 | margin-top: -@popoverArrowWidth; 82 | border-width: @popoverArrowWidth @popoverArrowWidth @popoverArrowWidth 0; 83 | border-right-color: @popoverArrowColor; 84 | &:after { 85 | border-width: @popoverArrowOuterWidth @popoverArrowOuterWidth @popoverArrowOuterWidth 0; 86 | border-right-color: @popoverArrowOuterColor; 87 | bottom: -@popoverArrowOuterWidth; 88 | left: -1px; 89 | } 90 | } 91 | &.bottom .arrow { 92 | top: -@popoverArrowWidth; 93 | left: 50%; 94 | margin-left: -@popoverArrowWidth; 95 | border-width: 0 @popoverArrowWidth @popoverArrowWidth; 96 | border-bottom-color: @popoverArrowColor; 97 | &:after { 98 | border-width: 0 @popoverArrowOuterWidth @popoverArrowOuterWidth; 99 | border-bottom-color: @popoverArrowOuterColor; 100 | top: -1px; 101 | left: -@popoverArrowOuterWidth; 102 | } 103 | } 104 | &.left .arrow { 105 | top: 50%; 106 | right: -@popoverArrowWidth; 107 | margin-top: -@popoverArrowWidth; 108 | border-width: @popoverArrowWidth 0 @popoverArrowWidth @popoverArrowWidth; 109 | border-left-color: @popoverArrowColor; 110 | &:after { 111 | border-width: @popoverArrowOuterWidth 0 @popoverArrowOuterWidth @popoverArrowOuterWidth; 112 | border-left-color: @popoverArrowOuterColor; 113 | bottom: -@popoverArrowOuterWidth; 114 | right: -1px; 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // ANIMATIONS 7 | // ---------- 8 | 9 | // Webkit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Firefox 16 | @-moz-keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | // IE9 22 | @-ms-keyframes progress-bar-stripes { 23 | from { background-position: 40px 0; } 24 | to { background-position: 0 0; } 25 | } 26 | 27 | // Opera 28 | @-o-keyframes progress-bar-stripes { 29 | from { background-position: 0 0; } 30 | to { background-position: 40px 0; } 31 | } 32 | 33 | // Spec 34 | @keyframes progress-bar-stripes { 35 | from { background-position: 40px 0; } 36 | to { background-position: 0 0; } 37 | } 38 | 39 | 40 | 41 | // THE BARS 42 | // -------- 43 | 44 | // Outer container 45 | .progress { 46 | overflow: hidden; 47 | height: @baseLineHeight; 48 | margin-bottom: @baseLineHeight; 49 | #gradient > .vertical(#f5f5f5, #f9f9f9); 50 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 51 | .border-radius(4px); 52 | } 53 | 54 | // Bar of progress 55 | .progress .bar { 56 | width: 0%; 57 | height: 100%; 58 | color: @white; 59 | float: left; 60 | font-size: 12px; 61 | text-align: center; 62 | text-shadow: 0 -1px 0 rgba(0,0,0,.25); 63 | #gradient > .vertical(#149bdf, #0480be); 64 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 65 | .box-sizing(border-box); 66 | .transition(width .6s ease); 67 | } 68 | .progress .bar + .bar { 69 | .box-shadow(~"inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15)"); 70 | } 71 | 72 | // Striped bars 73 | .progress-striped .bar { 74 | #gradient > .striped(#149bdf); 75 | .background-size(40px 40px); 76 | } 77 | 78 | // Call animation for the active one 79 | .progress.active .bar { 80 | -webkit-animation: progress-bar-stripes 2s linear infinite; 81 | -moz-animation: progress-bar-stripes 2s linear infinite; 82 | -ms-animation: progress-bar-stripes 2s linear infinite; 83 | -o-animation: progress-bar-stripes 2s linear infinite; 84 | animation: progress-bar-stripes 2s linear infinite; 85 | } 86 | 87 | 88 | 89 | // COLORS 90 | // ------ 91 | 92 | // Danger (red) 93 | .progress-danger .bar, .progress .bar-danger { 94 | #gradient > .vertical(#ee5f5b, #c43c35); 95 | } 96 | .progress-danger.progress-striped .bar, .progress-striped .bar-danger { 97 | #gradient > .striped(#ee5f5b); 98 | } 99 | 100 | // Success (green) 101 | .progress-success .bar, .progress .bar-success { 102 | #gradient > .vertical(#62c462, #57a957); 103 | } 104 | .progress-success.progress-striped .bar, .progress-striped .bar-success { 105 | #gradient > .striped(#62c462); 106 | } 107 | 108 | // Info (teal) 109 | .progress-info .bar, .progress .bar-info { 110 | #gradient > .vertical(#5bc0de, #339bb9); 111 | } 112 | .progress-info.progress-striped .bar, .progress-striped .bar-info { 113 | #gradient > .striped(#5bc0de); 114 | } 115 | 116 | // Warning (orange) 117 | .progress-warning .bar, .progress .bar-warning { 118 | #gradient > .vertical(lighten(@orange, 15%), @orange); 119 | } 120 | .progress-warning.progress-striped .bar, .progress-striped .bar-warning { 121 | #gradient > .striped(lighten(@orange, 15%)); 122 | } 123 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/reset.less: -------------------------------------------------------------------------------- 1 | // 2 | // Modals 3 | // Adapted from http://github.com/necolas/normalize.css 4 | // -------------------------------------------------- 5 | 6 | 7 | // Display in IE6-9 and FF3 8 | // ------------------------- 9 | 10 | article, 11 | aside, 12 | details, 13 | figcaption, 14 | figure, 15 | footer, 16 | header, 17 | hgroup, 18 | nav, 19 | section { 20 | display: block; 21 | } 22 | 23 | // Display block in IE6-9 and FF3 24 | // ------------------------- 25 | 26 | audio, 27 | canvas, 28 | video { 29 | display: inline-block; 30 | *display: inline; 31 | *zoom: 1; 32 | } 33 | 34 | // Prevents modern browsers from displaying 'audio' without controls 35 | // ------------------------- 36 | 37 | audio:not([controls]) { 38 | display: none; 39 | } 40 | 41 | // Base settings 42 | // ------------------------- 43 | 44 | html { 45 | font-size: 100%; 46 | -webkit-text-size-adjust: 100%; 47 | -ms-text-size-adjust: 100%; 48 | } 49 | // Focus states 50 | a:focus { 51 | .tab-focus(); 52 | } 53 | // Hover & Active 54 | a:hover, 55 | a:active { 56 | outline: 0; 57 | } 58 | 59 | // Prevents sub and sup affecting line-height in all browsers 60 | // ------------------------- 61 | 62 | sub, 63 | sup { 64 | position: relative; 65 | font-size: 75%; 66 | line-height: 0; 67 | vertical-align: baseline; 68 | } 69 | sup { 70 | top: -0.5em; 71 | } 72 | sub { 73 | bottom: -0.25em; 74 | } 75 | 76 | // Img border in a's and image quality 77 | // ------------------------- 78 | 79 | img { 80 | max-width: 100%; // Make images inherently responsive 81 | height: auto; // Make images inherently responsive 82 | vertical-align: middle; 83 | border: 0; 84 | -ms-interpolation-mode: bicubic; 85 | } 86 | 87 | // Prevent max-width from affecting Google Maps 88 | #map_canvas img { 89 | max-width: none; 90 | } 91 | 92 | // Forms 93 | // ------------------------- 94 | 95 | // Font size in all browsers, margin changes, misc consistency 96 | button, 97 | input, 98 | select, 99 | textarea { 100 | margin: 0; 101 | font-size: 100%; 102 | vertical-align: middle; 103 | } 104 | button, 105 | input { 106 | *overflow: visible; // Inner spacing ie IE6/7 107 | line-height: normal; // FF3/4 have !important on line-height in UA stylesheet 108 | } 109 | button::-moz-focus-inner, 110 | input::-moz-focus-inner { // Inner padding and border oddities in FF3/4 111 | padding: 0; 112 | border: 0; 113 | } 114 | button, 115 | input[type="button"], 116 | input[type="reset"], 117 | input[type="submit"] { 118 | cursor: pointer; // Cursors on all buttons applied consistently 119 | -webkit-appearance: button; // Style clickable inputs in iOS 120 | } 121 | input[type="search"] { // Appearance in Safari/Chrome 122 | -webkit-box-sizing: content-box; 123 | -moz-box-sizing: content-box; 124 | box-sizing: content-box; 125 | -webkit-appearance: textfield; 126 | } 127 | input[type="search"]::-webkit-search-decoration, 128 | input[type="search"]::-webkit-search-cancel-button { 129 | -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5 130 | } 131 | textarea { 132 | overflow: auto; // Remove vertical scrollbar in IE6-9 133 | vertical-align: top; // Readability and alignment cross-browser 134 | } 135 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/responsive-1200px-min.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Large desktop and up 3 | // -------------------------------------------------- 4 | 5 | 6 | @media (min-width: 1200px) { 7 | 8 | // Fixed grid 9 | #grid > .core(@gridColumnWidth1200, @gridGutterWidth1200); 10 | 11 | // Fluid grid 12 | #grid > .fluid(@fluidGridColumnWidth1200, @fluidGridGutterWidth1200); 13 | 14 | // Input grid 15 | #grid > .input(@gridColumnWidth1200, @gridGutterWidth1200); 16 | 17 | // Thumbnails 18 | .thumbnails { 19 | margin-left: -@gridGutterWidth1200; 20 | } 21 | .thumbnails > li { 22 | margin-left: @gridGutterWidth1200; 23 | } 24 | .row-fluid .thumbnails { 25 | margin-left: 0; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/responsive-767px-max.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Landscape phone to desktop/tablet 3 | // -------------------------------------------------- 4 | 5 | 6 | @media (max-width: 767px) { 7 | 8 | // Padding to set content in a bit 9 | body { 10 | padding-left: 20px; 11 | padding-right: 20px; 12 | } 13 | // Negative indent the now static "fixed" navbar 14 | .navbar-fixed-top, 15 | .navbar-fixed-bottom { 16 | margin-left: -20px; 17 | margin-right: -20px; 18 | } 19 | // Remove padding on container given explicit padding set on body 20 | .container-fluid { 21 | padding: 0; 22 | } 23 | 24 | // TYPOGRAPHY 25 | // ---------- 26 | // Reset horizontal dl 27 | .dl-horizontal { 28 | dt { 29 | float: none; 30 | clear: none; 31 | width: auto; 32 | text-align: left; 33 | } 34 | dd { 35 | margin-left: 0; 36 | } 37 | } 38 | 39 | // GRID & CONTAINERS 40 | // ----------------- 41 | // Remove width from containers 42 | .container { 43 | width: auto; 44 | } 45 | // Fluid rows 46 | .row-fluid { 47 | width: 100%; 48 | } 49 | // Undo negative margin on rows and thumbnails 50 | .row, 51 | .thumbnails { 52 | margin-left: 0; 53 | } 54 | .thumbnails > li { 55 | float: none; 56 | margin-left: 0; // Reset the default margin for all li elements when no .span* classes are present 57 | } 58 | // Make all grid-sized elements block level again 59 | [class*="span"], 60 | .row-fluid [class*="span"] { 61 | float: none; 62 | display: block; 63 | width: auto; 64 | margin-left: 0; 65 | } 66 | .span12, 67 | .row-fluid .span12 { 68 | width: 100%; 69 | .box-sizing(border-box); 70 | } 71 | 72 | // FORM FIELDS 73 | // ----------- 74 | // Make span* classes full width 75 | .input-large, 76 | .input-xlarge, 77 | .input-xxlarge, 78 | input[class*="span"], 79 | select[class*="span"], 80 | textarea[class*="span"], 81 | .uneditable-input { 82 | .input-block-level(); 83 | } 84 | // But don't let it screw up prepend/append inputs 85 | .input-prepend input, 86 | .input-append input, 87 | .input-prepend input[class*="span"], 88 | .input-append input[class*="span"] { 89 | display: inline-block; // redeclare so they don't wrap to new lines 90 | width: auto; 91 | } 92 | 93 | // Modals 94 | .modal { 95 | position: fixed; 96 | top: 20px; 97 | left: 20px; 98 | right: 20px; 99 | width: auto; 100 | margin: 0; 101 | &.fade.in { top: auto; } 102 | } 103 | 104 | } 105 | 106 | 107 | 108 | // UP TO LANDSCAPE PHONE 109 | // --------------------- 110 | 111 | @media (max-width: 480px) { 112 | 113 | // Smooth out the collapsing/expanding nav 114 | .nav-collapse { 115 | -webkit-transform: translate3d(0, 0, 0); // activate the GPU 116 | } 117 | 118 | // Block level the page header small tag for readability 119 | .page-header h1 small { 120 | display: block; 121 | line-height: @baseLineHeight; 122 | } 123 | 124 | // Update checkboxes for iOS 125 | input[type="checkbox"], 126 | input[type="radio"] { 127 | border: 1px solid #ccc; 128 | } 129 | 130 | // Remove the horizontal form styles 131 | .form-horizontal .control-group > label { 132 | float: none; 133 | width: auto; 134 | padding-top: 0; 135 | text-align: left; 136 | } 137 | // Move over all input controls and content 138 | .form-horizontal .controls { 139 | margin-left: 0; 140 | } 141 | // Move the options list down to align with labels 142 | .form-horizontal .control-list { 143 | padding-top: 0; // has to be padding because margin collaspes 144 | } 145 | // Move over buttons in .form-actions to align with .controls 146 | .form-horizontal .form-actions { 147 | padding-left: 10px; 148 | padding-right: 10px; 149 | } 150 | 151 | // Modals 152 | .modal { 153 | top: 10px; 154 | left: 10px; 155 | right: 10px; 156 | } 157 | .modal-header .close { 158 | padding: 10px; 159 | margin: -10px; 160 | } 161 | 162 | // Carousel 163 | .carousel-caption { 164 | position: static; 165 | } 166 | 167 | } 168 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/responsive-768px-979px.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Tablet to desktop 3 | // -------------------------------------------------- 4 | 5 | 6 | @media (min-width: 768px) and (max-width: 979px) { 7 | 8 | // Fixed grid 9 | #grid > .core(@gridColumnWidth768, @gridGutterWidth768); 10 | 11 | // Fluid grid 12 | #grid > .fluid(@fluidGridColumnWidth768, @fluidGridGutterWidth768); 13 | 14 | // Input grid 15 | #grid > .input(@gridColumnWidth768, @gridGutterWidth768); 16 | 17 | // No need to reset .thumbnails here since it's the same @gridGutterWidth 18 | 19 | } 20 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/responsive-navbar.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Navbar 3 | // -------------------------------------------------- 4 | 5 | 6 | // TABLETS AND BELOW 7 | // ----------------- 8 | @media (max-width: @navbarCollapseWidth) { 9 | 10 | // UNFIX THE TOPBAR 11 | // ---------------- 12 | // Remove any padding from the body 13 | body { 14 | padding-top: 0; 15 | } 16 | // Unfix the navbars 17 | .navbar-fixed-top, 18 | .navbar-fixed-bottom { 19 | position: static; 20 | } 21 | .navbar-fixed-top { 22 | margin-bottom: @baseLineHeight; 23 | } 24 | .navbar-fixed-bottom { 25 | margin-top: @baseLineHeight; 26 | } 27 | .navbar-fixed-top .navbar-inner, 28 | .navbar-fixed-bottom .navbar-inner { 29 | padding: 5px; 30 | } 31 | .navbar .container { 32 | width: auto; 33 | padding: 0; 34 | } 35 | // Account for brand name 36 | .navbar .brand { 37 | padding-left: 10px; 38 | padding-right: 10px; 39 | margin: 0 0 0 -5px; 40 | } 41 | 42 | // COLLAPSIBLE NAVBAR 43 | // ------------------ 44 | // Nav collapse clears brand 45 | .nav-collapse { 46 | clear: both; 47 | } 48 | // Block-level the nav 49 | .nav-collapse .nav { 50 | float: none; 51 | margin: 0 0 (@baseLineHeight / 2); 52 | } 53 | .nav-collapse .nav > li { 54 | float: none; 55 | } 56 | .nav-collapse .nav > li > a { 57 | margin-bottom: 2px; 58 | } 59 | .nav-collapse .nav > .divider-vertical { 60 | display: none; 61 | } 62 | .nav-collapse .nav .nav-header { 63 | color: @navbarText; 64 | text-shadow: none; 65 | } 66 | // Nav and dropdown links in navbar 67 | .nav-collapse .nav > li > a, 68 | .nav-collapse .dropdown-menu a { 69 | padding: 9px 15px; 70 | font-weight: bold; 71 | color: @navbarLinkColor; 72 | .border-radius(3px); 73 | } 74 | // Buttons 75 | .nav-collapse .btn { 76 | padding: 4px 10px 4px; 77 | font-weight: normal; 78 | .border-radius(4px); 79 | } 80 | .nav-collapse .dropdown-menu li + li a { 81 | margin-bottom: 2px; 82 | } 83 | .nav-collapse .nav > li > a:hover, 84 | .nav-collapse .dropdown-menu a:hover { 85 | background-color: @navbarBackground; 86 | } 87 | .navbar-inverse .nav-collapse .nav > li > a:hover, 88 | .navbar-inverse .nav-collapse .dropdown-menu a:hover { 89 | background-color: @navbarInverseBackground; 90 | } 91 | // Buttons in the navbar 92 | .nav-collapse.in .btn-group { 93 | margin-top: 5px; 94 | padding: 0; 95 | } 96 | // Dropdowns in the navbar 97 | .nav-collapse .dropdown-menu { 98 | position: static; 99 | top: auto; 100 | left: auto; 101 | float: none; 102 | display: block; 103 | max-width: none; 104 | margin: 0 15px; 105 | padding: 0; 106 | background-color: transparent; 107 | border: none; 108 | .border-radius(0); 109 | .box-shadow(none); 110 | } 111 | .nav-collapse .dropdown-menu:before, 112 | .nav-collapse .dropdown-menu:after { 113 | display: none; 114 | } 115 | .nav-collapse .dropdown-menu .divider { 116 | display: none; 117 | } 118 | // Forms in navbar 119 | .nav-collapse .navbar-form, 120 | .nav-collapse .navbar-search { 121 | float: none; 122 | padding: (@baseLineHeight / 2) 15px; 123 | margin: (@baseLineHeight / 2) 0; 124 | border-top: 1px solid @navbarBackground; 125 | border-bottom: 1px solid @navbarBackground; 126 | .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1)"); 127 | } 128 | // Pull right (secondary) nav content 129 | .navbar .nav-collapse .nav.pull-right { 130 | float: none; 131 | margin-left: 0; 132 | } 133 | // Hide everything in the navbar save .brand and toggle button */ 134 | .nav-collapse, 135 | .nav-collapse.collapse { 136 | overflow: hidden; 137 | height: 0; 138 | } 139 | // Navbar button 140 | .navbar .btn-navbar { 141 | display: block; 142 | } 143 | 144 | // STATIC NAVBAR 145 | // ------------- 146 | .navbar-static .navbar-inner { 147 | padding-left: 10px; 148 | padding-right: 10px; 149 | } 150 | 151 | 152 | } 153 | 154 | 155 | // DEFAULT DESKTOP 156 | // --------------- 157 | 158 | @media (min-width: 980px) { 159 | 160 | // Required to make the collapsing navbar work on regular desktops 161 | .nav-collapse.collapse { 162 | height: auto !important; 163 | overflow: visible !important; 164 | } 165 | 166 | } 167 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/responsive-utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Hide from screenreaders and browsers 7 | // Credit: HTML5 Boilerplate 8 | .hidden { 9 | display: none; 10 | visibility: hidden; 11 | } 12 | 13 | // Visibility utilities 14 | 15 | // For desktops 16 | .visible-phone { display: none !important; } 17 | .visible-tablet { display: none !important; } 18 | .hidden-phone { } 19 | .hidden-tablet { } 20 | .hidden-desktop { display: none !important; } 21 | .visible-desktop { display: inherit !important; } 22 | 23 | // Tablets & small desktops only 24 | @media (min-width: 768px) and (max-width: 979px) { 25 | // Hide everything else 26 | .hidden-desktop { display: inherit !important; } 27 | .visible-desktop { display: none !important ; } 28 | // Show 29 | .visible-tablet { display: inherit !important; } 30 | // Hide 31 | .hidden-tablet { display: none !important; } 32 | } 33 | 34 | // Phones only 35 | @media (max-width: 767px) { 36 | // Hide everything else 37 | .hidden-desktop { display: inherit !important; } 38 | .visible-desktop { display: none !important; } 39 | // Show 40 | .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior 41 | // Hide 42 | .hidden-phone { display: none !important; } 43 | } 44 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/responsive.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.1.0 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | 11 | 12 | // Responsive.less 13 | // For phone and tablet devices 14 | // ------------------------------------------------------------- 15 | 16 | 17 | // REPEAT VARIABLES & MIXINS 18 | // ------------------------- 19 | // Required since we compile the responsive stuff separately 20 | 21 | @import "variables.less"; // Modify this for custom colors, font-sizes, etc 22 | @import "mixins.less"; 23 | 24 | 25 | // RESPONSIVE CLASSES 26 | // ------------------ 27 | 28 | @import "responsive-utilities.less"; 29 | 30 | 31 | // MEDIA QUERIES 32 | // ------------------ 33 | 34 | // Large desktops 35 | @import "responsive-1200px-min.less"; 36 | 37 | // Tablets to regular desktops 38 | @import "responsive-768px-979px.less"; 39 | 40 | // Phones to portrait tablets and narrow desktops 41 | @import "responsive-767px-max.less"; 42 | 43 | 44 | // RESPONSIVE NAVBAR 45 | // ------------------ 46 | 47 | // From 979px and below, show a button to toggle navbar contents 48 | @import "responsive-navbar.less"; 49 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/scaffolding.less: -------------------------------------------------------------------------------- 1 | // 2 | // Scaffolding 3 | // -------------------------------------------------- 4 | 5 | 6 | // Body reset 7 | // ------------------------- 8 | 9 | body { 10 | margin: 0; 11 | font-family: @baseFontFamily; 12 | font-size: @baseFontSize; 13 | line-height: @baseLineHeight; 14 | color: @textColor; 15 | background-color: @bodyBackground; 16 | } 17 | 18 | 19 | // Links 20 | // ------------------------- 21 | 22 | a { 23 | color: @linkColor; 24 | text-decoration: none; 25 | } 26 | a:hover { 27 | color: @linkColorHover; 28 | text-decoration: underline; 29 | } 30 | 31 | 32 | // Images 33 | // ------------------------- 34 | 35 | .img-rounded { 36 | .border-radius(6px); 37 | } 38 | 39 | .img-polaroid { 40 | padding: 4px; 41 | background-color: #fff; 42 | border: 1px solid #ccc; 43 | border: 1px solid rgba(0,0,0,.2); 44 | -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.1); 45 | -moz-box-shadow: 0 1px 3px rgba(0,0,0,.1); 46 | box-shadow: 0 1px 3px rgba(0,0,0,.1); 47 | } 48 | 49 | .img-circle { 50 | .border-radius(500px); 51 | } 52 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/tables.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tables 3 | // -------------------------------------------------- 4 | 5 | 6 | // BASE TABLES 7 | // ----------------- 8 | 9 | table { 10 | max-width: 100%; 11 | background-color: @tableBackground; 12 | border-collapse: collapse; 13 | border-spacing: 0; 14 | } 15 | 16 | // BASELINE STYLES 17 | // --------------- 18 | 19 | .table { 20 | width: 100%; 21 | margin-bottom: @baseLineHeight; 22 | // Cells 23 | th, 24 | td { 25 | padding: 8px; 26 | line-height: @baseLineHeight; 27 | text-align: left; 28 | vertical-align: top; 29 | border-top: 1px solid @tableBorder; 30 | } 31 | th { 32 | font-weight: bold; 33 | } 34 | // Bottom align for column headings 35 | thead th { 36 | vertical-align: bottom; 37 | } 38 | // Remove top border from thead by default 39 | caption + thead tr:first-child th, 40 | caption + thead tr:first-child td, 41 | colgroup + thead tr:first-child th, 42 | colgroup + thead tr:first-child td, 43 | thead:first-child tr:first-child th, 44 | thead:first-child tr:first-child td { 45 | border-top: 0; 46 | } 47 | // Account for multiple tbody instances 48 | tbody + tbody { 49 | border-top: 2px solid @tableBorder; 50 | } 51 | } 52 | 53 | 54 | 55 | // CONDENSED TABLE W/ HALF PADDING 56 | // ------------------------------- 57 | 58 | .table-condensed { 59 | th, 60 | td { 61 | padding: 4px 5px; 62 | } 63 | } 64 | 65 | 66 | // BORDERED VERSION 67 | // ---------------- 68 | 69 | .table-bordered { 70 | border: 1px solid @tableBorder; 71 | border-collapse: separate; // Done so we can round those corners! 72 | *border-collapse: collapse; // IE7 can't round corners anyway 73 | border-left: 0; 74 | .border-radius(4px); 75 | th, 76 | td { 77 | border-left: 1px solid @tableBorder; 78 | } 79 | // Prevent a double border 80 | caption + thead tr:first-child th, 81 | caption + tbody tr:first-child th, 82 | caption + tbody tr:first-child td, 83 | colgroup + thead tr:first-child th, 84 | colgroup + tbody tr:first-child th, 85 | colgroup + tbody tr:first-child td, 86 | thead:first-child tr:first-child th, 87 | tbody:first-child tr:first-child th, 88 | tbody:first-child tr:first-child td { 89 | border-top: 0; 90 | } 91 | // For first th or td in the first row in the first thead or tbody 92 | thead:first-child tr:first-child th:first-child, 93 | tbody:first-child tr:first-child td:first-child { 94 | -webkit-border-top-left-radius: 4px; 95 | border-top-left-radius: 4px; 96 | -moz-border-radius-topleft: 4px; 97 | } 98 | thead:first-child tr:first-child th:last-child, 99 | tbody:first-child tr:first-child td:last-child { 100 | -webkit-border-top-right-radius: 4px; 101 | border-top-right-radius: 4px; 102 | -moz-border-radius-topright: 4px; 103 | } 104 | // For first th or td in the first row in the first thead or tbody 105 | thead:last-child tr:last-child th:first-child, 106 | tbody:last-child tr:last-child td:first-child, 107 | tfoot:last-child tr:last-child td:first-child { 108 | .border-radius(0 0 0 4px); 109 | -webkit-border-bottom-left-radius: 4px; 110 | border-bottom-left-radius: 4px; 111 | -moz-border-radius-bottomleft: 4px; 112 | } 113 | thead:last-child tr:last-child th:last-child, 114 | tbody:last-child tr:last-child td:last-child, 115 | tfoot:last-child tr:last-child td:last-child { 116 | -webkit-border-bottom-right-radius: 4px; 117 | border-bottom-right-radius: 4px; 118 | -moz-border-radius-bottomright: 4px; 119 | } 120 | 121 | // Special fixes to round the left border on the first td/th 122 | caption + thead tr:first-child th:first-child, 123 | caption + tbody tr:first-child td:first-child, 124 | colgroup + thead tr:first-child th:first-child, 125 | colgroup + tbody tr:first-child td:first-child { 126 | -webkit-border-top-left-radius: 4px; 127 | border-top-left-radius: 4px; 128 | -moz-border-radius-topleft: 4px; 129 | } 130 | caption + thead tr:first-child th:last-child, 131 | caption + tbody tr:first-child td:last-child, 132 | colgroup + thead tr:first-child th:last-child, 133 | colgroup + tbody tr:first-child td:last-child { 134 | -webkit-border-top-right-radius: 4px; 135 | border-top-right-radius: 4px; 136 | -moz-border-right-topleft: 4px; 137 | } 138 | 139 | } 140 | 141 | 142 | 143 | 144 | // ZEBRA-STRIPING 145 | // -------------- 146 | 147 | // Default zebra-stripe styles (alternating gray and transparent backgrounds) 148 | .table-striped { 149 | tbody { 150 | tr:nth-child(odd) td, 151 | tr:nth-child(odd) th { 152 | background-color: @tableBackgroundAccent; 153 | } 154 | } 155 | } 156 | 157 | 158 | // HOVER EFFECT 159 | // ------------ 160 | // Placed here since it has to come after the potential zebra striping 161 | .table-hover { 162 | tbody { 163 | tr:hover td, 164 | tr:hover th { 165 | background-color: @tableBackgroundHover; 166 | } 167 | } 168 | } 169 | 170 | 171 | // TABLE CELL SIZING 172 | // ----------------- 173 | 174 | // Reset default grid behavior 175 | table [class*=span], 176 | .row-fluid table [class*=span] { 177 | display: table-cell; 178 | float: none; // undo default grid column styles 179 | margin-left: 0; // undo default grid column styles 180 | } 181 | 182 | // Change the column widths to account for td/th padding 183 | table { 184 | .span1 { .tableColumns(1); } 185 | .span2 { .tableColumns(2); } 186 | .span3 { .tableColumns(3); } 187 | .span4 { .tableColumns(4); } 188 | .span5 { .tableColumns(5); } 189 | .span6 { .tableColumns(6); } 190 | .span7 { .tableColumns(7); } 191 | .span8 { .tableColumns(8); } 192 | .span9 { .tableColumns(9); } 193 | .span10 { .tableColumns(10); } 194 | .span11 { .tableColumns(11); } 195 | .span12 { .tableColumns(12); } 196 | .span13 { .tableColumns(13); } 197 | .span14 { .tableColumns(14); } 198 | .span15 { .tableColumns(15); } 199 | .span16 { .tableColumns(16); } 200 | .span17 { .tableColumns(17); } 201 | .span18 { .tableColumns(18); } 202 | .span19 { .tableColumns(19); } 203 | .span20 { .tableColumns(20); } 204 | .span21 { .tableColumns(21); } 205 | .span22 { .tableColumns(22); } 206 | .span23 { .tableColumns(23); } 207 | .span24 { .tableColumns(24); } 208 | } 209 | 210 | 211 | // TABLE BACKGROUNDS 212 | // ----------------- 213 | // Exact selectors below required to override .table-striped 214 | 215 | .table { 216 | tbody tr.success td { 217 | background-color: @successBackground; 218 | } 219 | tbody tr.error td { 220 | background-color: @errorBackground; 221 | } 222 | tbody tr.info td { 223 | background-color: @infoBackground; 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files 7 | 8 | // Make wrapper ul behave like the grid 9 | .thumbnails { 10 | margin-left: -@gridGutterWidth; 11 | list-style: none; 12 | .clearfix(); 13 | } 14 | // Fluid rows have no left margin 15 | .row-fluid .thumbnails { 16 | margin-left: 0; 17 | } 18 | 19 | // Float li to make thumbnails appear in a row 20 | .thumbnails > li { 21 | float: left; // Explicity set the float since we don't require .span* classes 22 | margin-bottom: @baseLineHeight; 23 | margin-left: @gridGutterWidth; 24 | } 25 | 26 | // The actual thumbnail (can be `a` or `div`) 27 | .thumbnail { 28 | display: block; 29 | padding: 4px; 30 | line-height: @baseLineHeight; 31 | border: 1px solid #ddd; 32 | .border-radius(4px); 33 | .box-shadow(0 1px 3px rgba(0,0,0,.055)); 34 | .transition(all .2s ease-in-out); 35 | } 36 | // Add a hover state for linked versions only 37 | a.thumbnail:hover { 38 | border-color: @linkColor; 39 | .box-shadow(0 1px 4px rgba(0,105,214,.25)); 40 | } 41 | 42 | // Images and captions 43 | .thumbnail > img { 44 | display: block; 45 | max-width: 100%; 46 | margin-left: auto; 47 | margin-right: auto; 48 | } 49 | .thumbnail .caption { 50 | padding: 9px; 51 | color: @gray; 52 | } 53 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tooltips 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .tooltip { 8 | position: absolute; 9 | z-index: @zindexTooltip; 10 | display: block; 11 | visibility: visible; 12 | padding: 5px; 13 | font-size: 11px; 14 | .opacity(0); 15 | &.in { .opacity(80); } 16 | &.top { margin-top: -3px; } 17 | &.right { margin-left: 3px; } 18 | &.bottom { margin-top: 3px; } 19 | &.left { margin-left: -3px; } 20 | } 21 | 22 | // Wrapper for the tooltip content 23 | .tooltip-inner { 24 | max-width: 200px; 25 | padding: 3px 8px; 26 | color: @tooltipColor; 27 | text-align: center; 28 | text-decoration: none; 29 | background-color: @tooltipBackground; 30 | .border-radius(4px); 31 | } 32 | 33 | // Arrows 34 | .tooltip-arrow { 35 | position: absolute; 36 | width: 0; 37 | height: 0; 38 | border-color: transparent; 39 | border-style: solid; 40 | } 41 | .tooltip { 42 | &.top .tooltip-arrow { 43 | bottom: 0; 44 | left: 50%; 45 | margin-left: -@tooltipArrowWidth; 46 | border-width: @tooltipArrowWidth @tooltipArrowWidth 0; 47 | border-top-color: @tooltipArrowColor; 48 | } 49 | &.right .tooltip-arrow { 50 | top: 50%; 51 | left: 0; 52 | margin-top: -@tooltipArrowWidth; 53 | border-width: @tooltipArrowWidth @tooltipArrowWidth @tooltipArrowWidth 0; 54 | border-right-color: @tooltipArrowColor; 55 | } 56 | &.left .tooltip-arrow { 57 | top: 50%; 58 | right: 0; 59 | margin-top: -@tooltipArrowWidth; 60 | border-width: @tooltipArrowWidth 0 @tooltipArrowWidth @tooltipArrowWidth; 61 | border-left-color: @tooltipArrowColor; 62 | } 63 | &.bottom .tooltip-arrow { 64 | top: 0; 65 | left: 50%; 66 | margin-left: -@tooltipArrowWidth; 67 | border-width: 0 @tooltipArrowWidth @tooltipArrowWidth; 68 | border-bottom-color: @tooltipArrowColor; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/type.less: -------------------------------------------------------------------------------- 1 | // 2 | // Typography 3 | // -------------------------------------------------- 4 | 5 | 6 | // Body text 7 | // ------------------------- 8 | 9 | p { 10 | margin: 0 0 @baseLineHeight / 2; 11 | } 12 | .lead { 13 | margin-bottom: @baseLineHeight; 14 | font-size: 20px; 15 | font-weight: 200; 16 | line-height: @baseLineHeight * 1.5; 17 | } 18 | 19 | 20 | // Emphasis & misc 21 | // ------------------------- 22 | 23 | small { 24 | font-size: 85%; // Ex: 14px base font * 85% = about 12px 25 | } 26 | strong { 27 | font-weight: bold; 28 | } 29 | em { 30 | font-style: italic; 31 | } 32 | cite { 33 | font-style: normal; 34 | } 35 | .muted { 36 | color: @grayLight; 37 | } 38 | 39 | 40 | // Headings 41 | // ------------------------- 42 | 43 | h1, h2, h3, h4, h5, h6 { 44 | margin: (@baseLineHeight / 2) 0; 45 | font-family: @headingsFontFamily; 46 | font-weight: @headingsFontWeight; 47 | line-height: 1; 48 | color: @headingsColor; 49 | text-rendering: optimizelegibility; // Fix the character spacing for headings 50 | small { 51 | font-weight: normal; 52 | line-height: 1; 53 | color: @grayLight; 54 | } 55 | } 56 | h1 { font-size: 36px; line-height: 40px; } 57 | h2 { font-size: 30px; line-height: 40px; } 58 | h3 { font-size: 24px; line-height: 40px; } 59 | h4 { font-size: 18px; line-height: 20px; } 60 | h5 { font-size: 14px; line-height: 20px; } 61 | h6 { font-size: 12px; line-height: 20px; } 62 | 63 | h1 small { font-size: 24px; } 64 | h2 small { font-size: 18px; } 65 | h3 small { font-size: 14px; } 66 | h4 small { font-size: 14px; } 67 | 68 | 69 | // Page header 70 | // ------------------------- 71 | 72 | .page-header { 73 | padding-bottom: (@baseLineHeight / 2) - 1; 74 | margin: @baseLineHeight 0 (@baseLineHeight * 1.5); 75 | border-bottom: 1px solid @grayLighter; 76 | } 77 | 78 | 79 | 80 | // Lists 81 | // -------------------------------------------------- 82 | 83 | // Unordered and Ordered lists 84 | ul, ol { 85 | padding: 0; 86 | margin: 0 0 @baseLineHeight / 2 25px; 87 | } 88 | ul ul, 89 | ul ol, 90 | ol ol, 91 | ol ul { 92 | margin-bottom: 0; 93 | } 94 | li { 95 | line-height: @baseLineHeight; 96 | } 97 | ul.unstyled, 98 | ol.unstyled { 99 | margin-left: 0; 100 | list-style: none; 101 | } 102 | 103 | // Description Lists 104 | dl { 105 | margin-bottom: @baseLineHeight; 106 | } 107 | dt, 108 | dd { 109 | line-height: @baseLineHeight; 110 | } 111 | dt { 112 | font-weight: bold; 113 | } 114 | dd { 115 | margin-left: @baseLineHeight / 2; 116 | } 117 | // Horizontal layout (like forms) 118 | .dl-horizontal { 119 | dt { 120 | float: left; 121 | width: 120px; 122 | clear: left; 123 | text-align: right; 124 | .text-overflow(); 125 | } 126 | dd { 127 | margin-left: 130px; 128 | } 129 | } 130 | 131 | // MISC 132 | // ---- 133 | 134 | // Horizontal rules 135 | hr { 136 | margin: @baseLineHeight 0; 137 | border: 0; 138 | border-top: 1px solid @hrBorder; 139 | border-bottom: 1px solid @white; 140 | } 141 | 142 | // Abbreviations and acronyms 143 | abbr[title] { 144 | cursor: help; 145 | border-bottom: 1px dotted @grayLight; 146 | } 147 | abbr.initialism { 148 | font-size: 90%; 149 | text-transform: uppercase; 150 | } 151 | 152 | // Blockquotes 153 | blockquote { 154 | padding: 0 0 0 15px; 155 | margin: 0 0 @baseLineHeight; 156 | border-left: 5px solid @grayLighter; 157 | p { 158 | margin-bottom: 0; 159 | #font > .shorthand(16px,300,@baseLineHeight * 1.25); 160 | } 161 | small { 162 | display: block; 163 | line-height: @baseLineHeight; 164 | color: @grayLight; 165 | &:before { 166 | content: '\2014 \00A0'; 167 | } 168 | } 169 | 170 | // Float right with text-align: right 171 | &.pull-right { 172 | float: right; 173 | padding-right: 15px; 174 | padding-left: 0; 175 | border-right: 5px solid @grayLighter; 176 | border-left: 0; 177 | p, 178 | small { 179 | text-align: right; 180 | } 181 | small { 182 | &:before { 183 | content: ''; 184 | } 185 | &:after { 186 | content: '\00A0 \2014'; 187 | } 188 | } 189 | } 190 | } 191 | 192 | // Quotes 193 | q:before, 194 | q:after, 195 | blockquote:before, 196 | blockquote:after { 197 | content: ""; 198 | } 199 | 200 | // Addresses 201 | address { 202 | display: block; 203 | margin-bottom: @baseLineHeight; 204 | font-style: normal; 205 | line-height: @baseLineHeight; 206 | } 207 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Quick floats 7 | .pull-right { 8 | float: right; 9 | } 10 | .pull-left { 11 | float: left; 12 | } 13 | 14 | // Toggling content 15 | .hide { 16 | display: none; 17 | } 18 | .show { 19 | display: block; 20 | } 21 | 22 | // Visibility 23 | .invisible { 24 | visibility: hidden; 25 | } 26 | 27 | // For Affix plugin 28 | .affix { 29 | position: fixed; 30 | } 31 | -------------------------------------------------------------------------------- /o-blog-template/style/bootstrap/less/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @wellBackground; 12 | border: 1px solid darken(@wellBackground, 7%); 13 | .border-radius(4px); 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-large { 23 | padding: 24px; 24 | .border-radius(6px); 25 | } 26 | .well-small { 27 | padding: 9px; 28 | .border-radius(3px); 29 | } 30 | -------------------------------------------------------------------------------- /o-blog-template/style/font/Andika.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/Andika.woff -------------------------------------------------------------------------------- /o-blog-template/style/font/UbuntuMono-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/UbuntuMono-Bold.woff -------------------------------------------------------------------------------- /o-blog-template/style/font/UbuntuMono-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/UbuntuMono-BoldItalic.woff -------------------------------------------------------------------------------- /o-blog-template/style/font/UbuntuMono-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/UbuntuMono-Italic.woff -------------------------------------------------------------------------------- /o-blog-template/style/font/UbuntuMono-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/UbuntuMono-Regular.woff -------------------------------------------------------------------------------- /o-blog-template/style/font/YanoneKaffeesatz-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/YanoneKaffeesatz-Bold.woff -------------------------------------------------------------------------------- /o-blog-template/style/font/YanoneKaffeesatz-ExtraLight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/YanoneKaffeesatz-ExtraLight.woff -------------------------------------------------------------------------------- /o-blog-template/style/font/YanoneKaffeesatz-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/YanoneKaffeesatz-Light.woff -------------------------------------------------------------------------------- /o-blog-template/style/font/YanoneKaffeesatz-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ergoemacs/ergoemacs-mode/97d856bbf081de1d387ec646d06aac7bcce3f675/o-blog-template/style/font/YanoneKaffeesatz-Regular.woff -------------------------------------------------------------------------------- /o-blog-template/style/js/o-blog-fix.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Fix some org-mode html export 3 | */ 4 | 5 | $(document).ready( 6 | function() { 7 | 8 | /* create the top menu bar */ 9 | var dropdown = $('.navbar-inner .nav-collapse > ul li ul').parent(); 10 | dropdown.parent().addClass("nav"); 11 | 12 | /* find sub menu items */ 13 | dropdown.addClass("dropdown"); 14 | 15 | /* and add dropdown features */ 16 | dropdown.find('> a').addClass('dropdown-toggle') 17 | .attr("data-toggle", "dropdown") 18 | .append(' '); 19 | 20 | dropdown.find('> ul').addClass("dropdown-menu"); 21 | 22 | /* Add divider class if menu item is empty */ 23 | dropdown.parent().find('.dropdown-menu li').each(function() { 24 | if ( $(this).text() == '\n') $(this).addClass('divider') 25 | }); 26 | 27 | /* Compute page min height */ 28 | $('div#page').css('min-height', $(window).innerHeight() - 29 | $('#footer').outerHeight() - 30 | $('div.navbar-fixed-top.navbar').outerHeight() - 31 | parseInt($('div#page').css('padding-top')) - 32 | parseInt($('div#page').css('padding-bottom'))); 33 | 34 | 35 | /* 36 | * Org exports html starting from h3. 37 | * This promotes all nodes 2 steps up. 38 | */ 39 | var article_content = $('#page.container div.article-content'); 40 | for (var i=1; i<=6; i++) { 41 | article_content.find('h'+(i+2)).each(function() { 42 | $(this).replaceWith($('').html($(this).html())); 43 | }); 44 | /* Do not forget outline classes */ 45 | article_content.find('.outline-' + (i+2)) 46 | .removeClass('outline-' + (i+2)) 47 | .addClass('outline-'+i); 48 | 49 | article_content.find('.outline-text-' + (i+2)) 50 | .removeClass('outline-text-' + (i+2)) 51 | .addClass('outline-text-'+i); 52 | 53 | } 54 | 55 | 56 | $("i").each(function() { 57 | if (/^icon-/.exec($(this).text())) { 58 | $(this).replaceWith(' '); 59 | } 60 | }); 61 | 62 | 63 | 64 | } 65 | ) 66 | -------------------------------------------------------------------------------- /o-blog-template/style/js/o-blog.linenumber.js: -------------------------------------------------------------------------------- 1 | // Number lines 2 | 3 | 4 | 5 | 6 | 7 | $(document).ready( 8 | function() { 9 | $(".modal .modal-body > pre").addClass('prettyprint').addClass('linenums'); 10 | prettyPrint(); 11 | $(".modal").css('width', ''); 12 | } 13 | ); 14 | -------------------------------------------------------------------------------- /o-blog-template/style/keys.css: -------------------------------------------------------------------------------- 1 | /** 2 | * KEYS.css 3 | * 4 | * A simple stylesheet for rendering beautiful keyboard-style elements. 5 | * 6 | * Author: Michael Hüneburg 7 | * Website: http://michaelhue.com/keyscss 8 | * License: MIT License (see LICENSE.txt) 9 | */ 10 | 11 | /* Base style, essential for every key. */ 12 | kbd, .key { 13 | display: inline; 14 | display: inline-block; 15 | min-width: 1em; 16 | padding: .2em .3em; 17 | font: normal .85em/1 "Lucida Grande", Lucida, Arial, sans-serif; 18 | text-align: center; 19 | text-decoration: none; 20 | -moz-border-radius: .3em; 21 | -webkit-border-radius: .3em; 22 | border-radius: .3em; 23 | border: none; 24 | cursor: default; 25 | -moz-user-select: none; 26 | -webkit-user-select: none; 27 | user-select: none; 28 | } 29 | kbd[title], .key[title] { 30 | cursor: help; 31 | } 32 | 33 | /* Dark style for display on light background. This is the default style. */ 34 | kbd, kbd.dark, .dark-keys kbd, .key, .key.dark, .dark-keys .key { 35 | background: rgb(80, 80, 80); 36 | background: -moz-linear-gradient(top, rgb(60, 60, 60), rgb(80, 80, 80)); 37 | background: -webkit-gradient(linear, left top, left bottom, from(rgb(60, 60, 60)), to(rgb(80, 80, 80))); 38 | color: rgb(250, 250, 250); 39 | text-shadow: -1px -1px 0 rgb(70, 70, 70); 40 | -moz-box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3); 41 | -webkit-box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3); 42 | box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3); 43 | } 44 | 45 | /* Light style for display on dark background. */ 46 | kbd.light, .light-keys kbd, .key.light, .light-keys .key { 47 | background: rgb(250, 250, 250); 48 | background: -moz-linear-gradient(top, rgb(210, 210, 210), rgb(255, 255, 255)); 49 | background: -webkit-gradient(linear, left top, left bottom, from(rgb(210, 210, 210)), to(rgb(255, 255, 255))); 50 | color: rgb(50, 50, 50); 51 | text-shadow: 0 0 2px rgb(255, 255, 255); 52 | -moz-box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); 53 | -webkit-box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); 54 | box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); 55 | } -------------------------------------------------------------------------------- /o-blog-template/style/less/font-Andika.less: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Andika'; 3 | font-style: normal; 4 | font-weight: normal; 5 | src: local('Andika'), url('../font/Andika.woff') format('woff'); 6 | } 7 | -------------------------------------------------------------------------------- /o-blog-template/style/less/font-Ubuntu-Mono.less: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Ubuntu Mono'; 3 | font-style: italic; 4 | font-weight: bold; 5 | src: local('Ubuntu Mono Bold Italic'), local('UbuntuMono-BoldItalic'), url('../font/UbuntuMono-BoldItalic.woff') format('woff'); 6 | } 7 | @font-face { 8 | font-family: 'Ubuntu Mono'; 9 | font-style: italic; 10 | font-weight: normal; 11 | src: local('Ubuntu Mono Italic'), local('UbuntuMono-Italic'), url('../font/UbuntuMono-Italic.woff') format('woff'); 12 | } 13 | @font-face { 14 | font-family: 'Ubuntu Mono'; 15 | font-style: normal; 16 | font-weight: bold; 17 | src: local('Ubuntu Mono Bold'), local('UbuntuMono-Bold'), url('../font/UbuntuMono-Bold.woff') format('woff'); 18 | } 19 | @font-face { 20 | font-family: 'Ubuntu Mono'; 21 | font-style: normal; 22 | font-weight: normal; 23 | src: local('Ubuntu Mono'), local('UbuntuMono-Regular'), url('../font/UbuntuMono-Regular.woff') format('woff'); 24 | } 25 | -------------------------------------------------------------------------------- /o-blog-template/style/less/font-Yanone-Kaffeesatz.less: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Yanone Kaffeesatz'; 3 | font-style: normal; 4 | font-weight: 200; 5 | src: local('Yanone Kaffeesatz ExtraLight'), local('YanoneKaffeesatz-ExtraLight'), url('../font/YanoneKaffeesatz-ExtraLight.woff') format('woff'); 6 | } 7 | @font-face { 8 | font-family: 'Yanone Kaffeesatz'; 9 | font-style: normal; 10 | font-weight: 700; 11 | src: local('Yanone Kaffeesatz Bold'), local('YanoneKaffeesatz-Bold'), url('../font/YanoneKaffeesatz-Bold.woff') format('woff'); 12 | } 13 | @font-face { 14 | font-family: 'Yanone Kaffeesatz'; 15 | font-style: normal; 16 | font-weight: 400; 17 | src: local('Yanone Kaffeesatz Regular'), local('YanoneKaffeesatz-Regular'), url('../font/YanoneKaffeesatz-Regular.woff') format('woff'); 18 | } 19 | @font-face { 20 | font-family: 'Yanone Kaffeesatz'; 21 | font-style: normal; 22 | font-weight: 300; 23 | src: local('Yanone Kaffeesatz Light'), local('YanoneKaffeesatz-Light'), url('../font/YanoneKaffeesatz-Light.woff') format('woff'); 24 | } 25 | -------------------------------------------------------------------------------- /o-blog-template/style/less/o-blog-default.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Define you own style here (overrides bootstrap's variables.less) 3 | */ 4 | 5 | 6 | @linkColor: #933; 7 | 8 | /* @media (min-width: 768px) { */ 9 | 10 | 11 | @baseFontSize: 18px; 12 | @baseLineHeight: @baseFontSize * (18/13); 13 | 14 | 15 | @gridColumns: 12; 16 | @gridColumnWidth: 70px; 17 | @gridGutterWidth: 20px; 18 | 19 | 20 | 21 | @import "font-Yanone-Kaffeesatz.less"; 22 | @import "font-Ubuntu-Mono.less"; 23 | @import "font-Andika.less"; 24 | 25 | 26 | h1, h2, h3, h4, h5, h6 { 27 | font-family: "Yanone Kaffeesatz", "Helvetica Neue", Helvetica, Arial, sans-serif; 28 | } 29 | 30 | 31 | @monoFontFamily: "Ubuntu Mono", Menlo, Monaco, Consolas, "Courier New"; 32 | @sansFontFamily: "Andika", "Helvetica Neue", Helvetica, Arial, sans-serif; 33 | 34 | .navbar-fixed-top { 35 | li { 36 | line-height: @baseLineHeight; 37 | } 38 | } 39 | 40 | nav a:hover { 41 | zoom: 1.1; 42 | } 43 | 44 | .navbar, .breadcrumb { 45 | font-size: @baseFontSize / (18/13); 46 | line-height: 0.76 * @baseLineHeight / (18/13); 47 | } 48 | 49 | .breadcrumb { 50 | padding: 3px 14px; 51 | li { 52 | line-height: @baseLineHeight; 53 | } 54 | } 55 | 56 | .modal { 57 | left: 15%; 58 | width: 70% /*@gridRowWidth*/; 59 | margin-left: auto; 60 | margin-right: auto; 61 | li { 62 | line-height: @baseLineHeight; 63 | } 64 | } 65 | 66 | li { 67 | line-height: 1.5 * @baseLineHeight; 68 | } 69 | 70 | #disqus_thread { 71 | 72 | font-size: @baseFontSize * (13/18); 73 | line-height: @baseLineHeight * (13/18); 74 | 75 | input, 76 | textarea, 77 | .uneditable-input { 78 | font-size: @baseFontSize * (13/18); 79 | line-height: @baseLineHeight * (13/18); 80 | height: @baseLineHeight * (13/18); 81 | } 82 | 83 | select { 84 | font-size: @baseFontSize * (13/18); 85 | line-height: @baseLineHeight * (13/18); 86 | height: 2 * @baseLineHeight * (13/18); 87 | 88 | } 89 | } 90 | /* } */ -------------------------------------------------------------------------------- /o-blog-template/style/less/o-blog.less: -------------------------------------------------------------------------------- 1 | @media (min-width: 768px) { 2 | @import "font-Yanone-Kaffeesatz.less"; 3 | @import "font-Ubuntu-Mono.less"; 4 | @import "font-Andika.less"; 5 | @monoFontFamily: "Ubuntu Mono", Menlo, Monaco, Consolas, "Courier New"; 6 | @sansFontFamily: "Andika", "Helvetica Neue", Helvetica, Arial, sans-serif; 7 | 8 | } 9 | @import "../bootstrap/less/bootstrap.less"; 10 | @import "../bootstrap/less/responsive.less"; 11 | @import "o-blog-default.less"; 12 | 13 | @ob-background: #2e3436; 14 | @ob-foreground: #eeeeec; 15 | 16 | 17 | .text-left() {text-align: left;} 18 | .text-center() {text-align: center;} 19 | .text-right() {text-align: right;} 20 | 21 | 22 | .buffer-color() { 23 | background: @ob-background; 24 | color: @ob-foreground; 25 | } 26 | 27 | 28 | .buffer() { 29 | .resizable(both); 30 | .box-shadow(0 3px 7px rgba(0,0,0,0.3)); 31 | border: 1px solid @grayLighter; 32 | .buffer-color(); 33 | } 34 | 35 | 36 | .navtags(@fontSize) { 37 | nav { 38 | &.tags{ 39 | ul { 40 | font-size: @fontSize; 41 | margin: 2em auto; 42 | line-height: 2; 43 | .text-center(); 44 | li { 45 | display: inline; 46 | } 47 | } 48 | } 49 | } 50 | } 51 | 52 | 53 | html { 54 | height: 100%; 55 | background: @black; 56 | } 57 | 58 | 59 | .icon-white { 60 | opacity: 0.5; 61 | } 62 | 63 | 64 | 65 | .subnav-fixed { 66 | position: fixed; 67 | top: @navbarHeight; 68 | left: 0; 69 | right: 0; 70 | z-index: 999; 71 | border-color: #D5D5D5; 72 | border-width: 0 0 1px; 73 | .border-radius(4px); 74 | -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); 75 | -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); 76 | box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); 77 | } 78 | 79 | .subnav { 80 | width: 100%; 81 | height: @navbarHeight - 9; 82 | 83 | background-color: #EEE; 84 | #gradient > .vertical(#f5f5f5, #eeeeee); 85 | border: 1px solid #E5E5E5; 86 | .border-radius(4px); 87 | } 88 | 89 | 90 | #page { 91 | 92 | padding-top: 3 * @navbarHeight; 93 | marging-top: @navbarHeight; 94 | 95 | 96 | .article-header{ 97 | 98 | .date { 99 | border: 1px solid @grayLight; 100 | display: inline-block; 101 | width: 3em; 102 | .text-center(); 103 | a { 104 | display: block; 105 | color: fade(@linkColor, 50%); 106 | } 107 | .date-d { 108 | font-size: 1.5em; 109 | } 110 | .date-m { 111 | text-transform: uppercase; 112 | font-size: 1em; 113 | font-weight: bolder; 114 | } 115 | .date-y { 116 | background: @grayLight; 117 | font-size: 1em; 118 | font-weight: bolder; 119 | } 120 | } 121 | 122 | .pager { 123 | margin-bottom: 0; 124 | margin-top: @baseLineHeight; 125 | } 126 | } 127 | 128 | 129 | .article-content { 130 | @outlineShift: 1em; 131 | .outline-1 { margin-left: 1 * @outlineShift; } 132 | .outline-2 { margin-left: 2 * @outlineShift; } 133 | .outline-3 { margin-left: 3 * @outlineShift; } 134 | .outline-4 { margin-left: 4 * @outlineShift; } 135 | .outline-5 { margin-left: 5 * @outlineShift; } 136 | .outline-6 { margin-left: 6 * @outlineShift; } 137 | 138 | 139 | .alert-heading { 140 | font-weight: bolder; 141 | } 142 | 143 | img {.center-block()} 144 | 145 | .show-grid [class*="span"] { 146 | background-color: @grayLighter; 147 | .border-radius(3px); 148 | .show-grid [class*="span"] { 149 | background-color: darken(@grayLighter, 10%); 150 | .show-grid [class*="span"] { 151 | background-color: darken(@grayLighter, 20%); 152 | } 153 | 154 | } 155 | } 156 | 157 | 158 | .o-blog-source { 159 | display: inline-block; 160 | .btn { 161 | margin-top: @baseLineHeight / 4; 162 | margin-bottom: @baseLineHeight / 4; 163 | } 164 | } 165 | 166 | #footnotes { 167 | min-height: @baseLineHeight; 168 | padding-left: @baseLineHeight; 169 | padding-right: @baseLineHeight; 170 | margin-bottom: @baseLineHeight; 171 | background: lighten(#f5f5f5, 2%); 172 | border: 1px solid #eee; 173 | border: 1px solid rgba(0,0,0,.05); 174 | .border-radius(4px); 175 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 176 | font-size: 75%; 177 | 178 | h2 { 179 | &.footnotes {font-size: 90%;} 180 | } 181 | div { 182 | &.text-footnotes { 183 | p { 184 | font-size: 90%; 185 | &.footnote { 186 | a { 187 | &.footnum {} 188 | } 189 | } 190 | } 191 | } 192 | } 193 | 194 | } 195 | 196 | } 197 | 198 | .modal { 199 | .resizable(both) 200 | } 201 | 202 | .modal-body { 203 | ol.linenums { 204 | margin-left: 4 * @baseFontSize; 205 | } 206 | } 207 | 208 | pre.src, pre.example, .modal-body > pre { 209 | .buffer(); 210 | span { 211 | &.coderef-off { } 212 | &.linenr { 213 | font-style: italic; 214 | font-weight: bold; 215 | } 216 | &.code-highlighted {background: darkolivegreen;} 217 | 218 | } 219 | } 220 | 221 | 222 | .navtags(350%); 223 | 224 | 225 | .article-footer { 226 | &.well { 227 | background: lighten(#f5f5f5, 1%); 228 | 229 | h1 { 230 | font-size: 1.0em; 231 | margin: 0; 232 | } 233 | .tag-cloud ul { 234 | margin-bottom: 0; 235 | li { 236 | display: inline; 237 | padding-right: 0.5em; 238 | margin-left: 0.5em; 239 | font-size: 0.80 * @baseFontSize / (18/13); 240 | line-height: 0.92 * @baseLineHeight / (18/13); 241 | a { 242 | color: lighten(#f5f5f5, 1%); 243 | } 244 | a:hover { 245 | zoom: 1; 246 | } 247 | } 248 | } 249 | } 250 | } 251 | 252 | 253 | } 254 | 255 | .footer-font-size() { 256 | font-size: 0.85 * @baseFontSize / (18/13); 257 | line-height: 0.95 * @baseLineHeight / (18/13); 258 | } 259 | 260 | #footer { 261 | #gradient > .vertical(lighten(@black, 15%), @black); 262 | color: darken(@gray, 2%); 263 | 264 | .footer-font-size(); 265 | 266 | padding-top: @baseLineHeight * 3 / (18/13); 267 | 268 | a { 269 | color: lighten(@gray, 15%); 270 | } 271 | 272 | h1 { 273 | color: darken(@blue, 20%); 274 | a { 275 | color: darken(@blue, 20%); 276 | } 277 | a:hover { 278 | zoom: 1.1; 279 | } 280 | } 281 | 282 | .copyright { 283 | opacity: 0.35; 284 | margin-top: 3em; 285 | p { 286 | font-size: 80%; 287 | } 288 | } 289 | 290 | ul { 291 | list-style-type: none; 292 | margin: 0; 293 | li { 294 | .footer-font-size(); 295 | } 296 | } 297 | 298 | .navtags(100%); 299 | 300 | } 301 | 302 | 303 | .multicolumn(@cols, @gap) { 304 | -moz-column-count: @cols; 305 | -moz-column-gap: @gap; 306 | -webkit-column-count: @cols; 307 | -webkit-column-gap: @gap; 308 | column-count: @cols; 309 | column-gap: @gap; 310 | } 311 | 312 | .multicolumn3 { 313 | .multicolumn(3, 20px) 314 | } 315 | 316 | #toc { 317 | a { 318 | font-size: 75%; 319 | line-height: 15px; 320 | } 321 | } -------------------------------------------------------------------------------- /o-blog-template/style/less/oblog-min.less: -------------------------------------------------------------------------------- 1 | 2 | @import "../bootstrap/less/bootstrap.less"; 3 | @import "../bootstrap/less/responsive.less"; 4 | -------------------------------------------------------------------------------- /os_x_qwerty.dict.txt: -------------------------------------------------------------------------------- 1 | /* 2 | DATE: 2010-06-15 3 | VERSION: 1.0 4 | AUTHOR: Xah Lee 5 | DESCRIPTION: Mac OS X keybinding file for the ErgoEmacs keybinding for QWERTY layout. 6 | 7 | INSTALL: 8 | Rename this file to “DefaultKeyBinding.dict” 9 | Then, place the file in this dir: 10 | “~/Library/KeyBindings/DefaultKeyBinding.dict” 11 | Create the “KeyBindings” dir if you don't have it already. 12 | 13 | Go to your system preference, “Keyboard & Mouse” panel, and swap 14 | Control and Command key positions. So, Control is right under your 15 | thumb. 16 | 17 | Now, launch or re-launch any Cocoa application, such as TextEdit. The app should now use ErgoEmacs keybinding. 18 | 19 | If you are using emacs, you might want to put the following lines in your “.emacs”: 20 | (setq mac-control-modifier 'meta) 21 | (setq mac-command-modifier 'control) 22 | These lines works for Cocoa emacs, may not work for Carbon Emacs. 23 | 24 | Some references: 25 | 26 | • How To Create Keybinding In Mac OS X 27 | http://xahlee.org/emacs/osx_keybinding.html 28 | 29 | • ErgoEmacs Keybinding 30 | http://xahlee.org/emacs/ergonomic_emacs_keybinding.html 31 | 32 | • How to Swap Modifier Keys on OS X 33 | http://xahlee.org/emacs/osx_swapping_modifier_keys.html 34 | 35 | If you like to use Option key instead of Control, you can change all ^ 36 | to ~ in this file. However, due to some limitations of the OS X 37 | keybinding system, the following won't work: 38 | 39 | • Opt+n for move cursor right 40 | • Opt+e for deleting a char to the left 41 | • Opt+u for deleting a char to the right 42 | 43 | */ 44 | 45 | { 46 | "^i" = "moveUp:"; 47 | "^k" = "moveDown:"; 48 | "^j" = "moveLeft:"; 49 | "^l" = "moveRight:"; 50 | 51 | "^o" = "moveWordRight:"; 52 | "^u" = "moveWordLeft:"; 53 | "^h" = "moveToBeginningOfLine:"; 54 | "^H" = "moveToEndOfLine:"; 55 | 56 | "^I" = "pageUp:"; 57 | "^K" = "pageDown:"; 58 | 59 | "^U" = "moveToBeginningOfParagraph:"; 60 | "^O" = "moveToEndOfParagraph:"; 61 | 62 | "^J" = "moveToBeginningOfDocument:"; 63 | "^L" = "moveToEndOfDocument:"; 64 | 65 | "^d" = "deleteBackward:"; 66 | "^f" = "deleteForward:"; 67 | "^e" = "deleteWordBackward:"; 68 | "^r" = "deleteWordForward:"; 69 | 70 | "^Z" = "redo:"; 71 | "^z" = "undo:"; 72 | "^x" = "cut:"; 73 | "^X" = ("selectAll:", "cut:"); 74 | "^c" = "copy:"; 75 | "^C" = ("selectAll:", "copy:"); 76 | "^v" = "paste:"; 77 | 78 | "^8" = "selectWord:"; 79 | "^ " = "setMark:"; 80 | } 81 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | *~ --------------------------------------------------------------------------------