first commit

This commit is contained in:
root
2026-03-14 09:49:00 +00:00
commit 708ff116e1
1958 changed files with 1718027 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
{
"name": "bootstrap-rtl-ondemand",
"description": "Right-to-left (RTL) theme for Twitter Bootstrap 3.x activated with html dir=\"rtl\" attribute on-the-fly.",
"version": "3.3.4-ondemand",
"homepage": "https://github.com/bright/bootstrap-rtl",
"authors": [
"Morteza Ansarinia (https://github.com/morteza)",
"Michał Jastrzębowski (https://github.com/mjastrzebowski)",
"Adam Bar (https://github.com/NOtherDev)"
],
"main": [
"dist/css/bootstrap-rtl-ondemand.css"
],
"ignore": [
"**/.*",
"_config.yml",
"CNAME",
"composer.json",
"CONTRIBUTING.md",
"docs",
"js/tests"
],
"dependencies": {
"bootstrap": ">=3.3.0"
},
"license": "Unlicensed Public Domain",
"_release": "3.3.4-ondemand",
"_resolution": {
"type": "version",
"tag": "v3.3.4-ondemand",
"commit": "804fc517c3b45d88c11e8ed3e558878dc97f74c3"
},
"_source": "https://github.com/bright/bootstrap-rtl.git",
"_target": "^3.3.4-ondemand",
"_originalSource": "bootstrap-rtl-ondemand"
}

View File

@@ -0,0 +1,60 @@
module.exports = function(grunt) {
"use strict";
// Project configuration
grunt.initConfig({
// Read package.json Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*******************************************************************************\n' +
' * <%= pkg.name %> (version <%= pkg.version %>)\n' +
' * Author: <%= pkg.author %>\n' +
' * Created on: <%= grunt.template.today("mmmm dd,yyyy") %>\n' +
' * Project: <%= pkg.name %>\n' +
' * Copyright: Unlicensed Public Domain\n' +
' *******************************************************************************/\n',
less: {
rtl: {
options: {
strictMath: true,
cleancss: false,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>.css.map',
sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
},
files: {
'dist/css/<%= pkg.name %>.css': 'less/bootstrap-rtl.less'
}
},
minify: {
options: {
cleancss: true
},
files: {
'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css',
}
}
},
usebanner: {
options: {
position: 'top',
banner: '<%= banner %>',
linebreak: true
},
files: {
src: ['dist/css/<%= pkg.name %>.css',
'dist/css/<%= pkg.name %>.min.css']
}
}
});
// Load uglify plugin
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-banner');
// Default Task
grunt.registerTask('default', ['less', 'usebanner']);
};

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2011-2014 Twitter, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,48 @@
# Bootstrap 3 with on-demand RTL support
---
This is a fork of [morteza's bootstrap-rtl](https://github.com/morteza/bootstrap-rtl/fork) theme. Contrary to the original, it doesn't override the default LTR direction and enforce RTL direction by default. It relies on `<html dir="ltr|rtl">` attribute and enables RTL direction only when `dir="rtl"` is set.
Bootstrap RTL provides simple yet robust right-to-left capability for Bootstrap 3, by employing new theming feature of it. Simply put its CSS after bootstrap's original CSS, to the pages designed by Bootstrap 3. It works just like an extension on top of the original Bootstrap:
```html
<!-- Original Bootstrap 3.x -->
<link rel="stylesheet" href="bootstrap.css">
<!-- Bootstrap RTL Theme -->
<link rel="stylesheet" href="bootstrap-rtl.css">
```
## Quick start
It's just like Bootstrap 3, nothing special. You can install it via bower:
* Run `bower install bootstrap-rtl-ondemand` and latest version will be installed under *bower_components/bootstrap-rtl/* directory.
In addition to bootstrap distribution, LESS codes for RTL theme and compiled CSS (`bootstrap-rtl.css`) are provided, as well as minified CSS (`bootstrap-rtl.min.css`). Check `dist/` directory for all the codes you need.
#### Auto Flip (`.flip`)
To automatically flip placements from right to left and vice versa (in bilingual pages), use `.flip` alongside `.pull-right` and `.pull-left`. This is a custom class and is not available in the original Bootstrap 3.
## Building CSS and JavaScript
Bootstrap RTL uses [Grunt](http://gruntjs.com/) for working with the framework. Follow these simple steps to prepare and compile:
1. Run `npm install` to download and prepare dependencies.
2. Run `grunt`, and check `dist/` directory for outputs.
## Author
**Morteza Ansarinia**
+ [https://github.com/morteza](https://github.com/morteza)
**Michał Jastrzębowski**
+ [https://github.com/mjastrzebowski](https://github.com/mjastrzebowski)

View File

@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

View File

@@ -0,0 +1,500 @@
/*
Holder - 2.2 - client side image placeholders
(c) 2012-2013 Ivan Malopinsky / http://imsky.co
Provided under the MIT License.
Commercial use requires attribution.
*/
var Holder = Holder || {};
(function (app, win) {
var preempted = false,
fallback = false,
canvas = document.createElement('canvas');
var dpr = 1, bsr = 1;
var resizable_images = [];
if (!canvas.getContext) {
fallback = true;
} else {
if (canvas.toDataURL("image/png")
.indexOf("data:image/png") < 0) {
//Android doesn't support data URI
fallback = true;
} else {
var ctx = canvas.getContext("2d");
}
}
if(!fallback){
dpr = window.devicePixelRatio || 1,
bsr = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
}
var ratio = dpr / bsr;
var settings = {
domain: "holder.js",
images: "img",
bgnodes: ".holderjs",
themes: {
"gray": {
background: "#eee",
foreground: "#aaa",
size: 12
},
"social": {
background: "#3a5a97",
foreground: "#fff",
size: 12
},
"industrial": {
background: "#434A52",
foreground: "#C2F200",
size: 12
},
"sky": {
background: "#0D8FDB",
foreground: "#fff",
size: 12
},
"vine": {
background: "#39DBAC",
foreground: "#1E292C",
size: 12
},
"lava": {
background: "#F8591A",
foreground: "#1C2846",
size: 12
}
},
stylesheet: ""
};
app.flags = {
dimensions: {
regex: /^(\d+)x(\d+)$/,
output: function (val) {
var exec = this.regex.exec(val);
return {
width: +exec[1],
height: +exec[2]
}
}
},
fluid: {
regex: /^([0-9%]+)x([0-9%]+)$/,
output: function (val) {
var exec = this.regex.exec(val);
return {
width: exec[1],
height: exec[2]
}
}
},
colors: {
regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,
output: function (val) {
var exec = this.regex.exec(val);
return {
size: settings.themes.gray.size,
foreground: "#" + exec[2],
background: "#" + exec[1]
}
}
},
text: {
regex: /text\:(.*)/,
output: function (val) {
return this.regex.exec(val)[1];
}
},
font: {
regex: /font\:(.*)/,
output: function (val) {
return this.regex.exec(val)[1];
}
},
auto: {
regex: /^auto$/
},
textmode: {
regex: /textmode\:(.*)/,
output: function(val){
return this.regex.exec(val)[1];
}
}
}
//getElementsByClassName polyfill
document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i<n.length;i++)r.test(n[i].className)&&s.push(n[i])}return s})
//getComputedStyle polyfill
window.getComputedStyle||(window.getComputedStyle=function(e){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this})
//http://javascript.nwbox.com/ContentLoaded by Diego Perini with modifications
function contentLoaded(n,t){var l="complete",s="readystatechange",u=!1,h=u,c=!0,i=n.document,a=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",v=i.addEventListener?"removeEventListener":"detachEvent",f=i.addEventListener?"":"on",r=function(e){(e.type!=s||i.readyState==l)&&((e.type=="load"?n:i)[v](f+e.type,r,u),!h&&(h=!0)&&t.call(n,null))},o=function(){try{a.doScroll("left")}catch(n){setTimeout(o,50);return}r("poll")};if(i.readyState==l)t.call(n,"lazy");else{if(i.createEventObject&&a.doScroll){try{c=!n.frameElement}catch(y){}c&&o()}i[e](f+"DOMContentLoaded",r,u),i[e](f+s,r,u),n[e](f+"load",r,u)}}
//https://gist.github.com/991057 by Jed Schmidt with modifications
function selector(a){
a=a.match(/^(\W)?(.*)/);var b=document["getElement"+(a[1]?a[1]=="#"?"ById":"sByClassName":"sByTagName")](a[2]);
var ret=[]; b!==null&&(b.length?ret=b:b.length===0?ret=b:ret=[b]); return ret;
}
//shallow object property extend
function extend(a,b){
var c={};
for(var i in a){
if(a.hasOwnProperty(i)){
c[i]=a[i];
}
}
for(var i in b){
if(b.hasOwnProperty(i)){
c[i]=b[i];
}
}
return c
}
//hasOwnProperty polyfill
if (!Object.prototype.hasOwnProperty)
/*jshint -W001, -W103 */
Object.prototype.hasOwnProperty = function(prop) {
var proto = this.__proto__ || this.constructor.prototype;
return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
}
/*jshint +W001, +W103 */
function text_size(width, height, template) {
height = parseInt(height, 10);
width = parseInt(width, 10);
var bigSide = Math.max(height, width)
var smallSide = Math.min(height, width)
var scale = 1 / 12;
var newHeight = Math.min(smallSide * 0.75, 0.75 * bigSide * scale);
return {
height: Math.round(Math.max(template.size, newHeight))
}
}
function draw(args) {
var ctx = args.ctx;
var dimensions = args.dimensions;
var template = args.template;
var ratio = args.ratio;
var holder = args.holder;
var literal = holder.textmode == "literal";
var exact = holder.textmode == "exact";
var ts = text_size(dimensions.width, dimensions.height, template);
var text_height = ts.height;
var width = dimensions.width * ratio,
height = dimensions.height * ratio;
var font = template.font ? template.font : "sans-serif";
canvas.width = width;
canvas.height = height;
ctx.textAlign = "center";
ctx.textBaseline = "middle";
ctx.fillStyle = template.background;
ctx.fillRect(0, 0, width, height);
ctx.fillStyle = template.foreground;
ctx.font = "bold " + text_height + "px " + font;
var text = template.text ? template.text : (Math.floor(dimensions.width) + "x" + Math.floor(dimensions.height));
if (literal) {
var dimensions = holder.dimensions;
text = dimensions.width + "x" + dimensions.height;
}
else if(exact && holder.exact_dimensions){
var dimensions = holder.exact_dimensions;
text = (Math.floor(dimensions.width) + "x" + Math.floor(dimensions.height));
}
var text_width = ctx.measureText(text).width;
if (text_width / width >= 0.75) {
text_height = Math.floor(text_height * 0.75 * (width / text_width));
}
//Resetting font size if necessary
ctx.font = "bold " + (text_height * ratio) + "px " + font;
ctx.fillText(text, (width / 2), (height / 2), width);
return canvas.toDataURL("image/png");
}
function render(mode, el, holder, src) {
var dimensions = holder.dimensions,
theme = holder.theme,
text = holder.text ? decodeURIComponent(holder.text) : holder.text;
var dimensions_caption = dimensions.width + "x" + dimensions.height;
theme = (text ? extend(theme, {
text: text
}) : theme);
theme = (holder.font ? extend(theme, {
font: holder.font
}) : theme);
el.setAttribute("data-src", src);
holder.theme = theme;
el.holder_data = holder;
if (mode == "image") {
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
if (fallback || !holder.auto) {
el.style.width = dimensions.width + "px";
el.style.height = dimensions.height + "px";
}
if (fallback) {
el.style.backgroundColor = theme.background;
} else {
el.setAttribute("src", draw({ctx: ctx, dimensions: dimensions, template: theme, ratio:ratio, holder: holder}));
if(holder.textmode && holder.textmode == "exact"){
resizable_images.push(el);
resizable_update(el);
}
}
} else if (mode == "background") {
if (!fallback) {
el.style.backgroundImage = "url(" + draw({ctx:ctx, dimensions: dimensions, template: theme, ratio: ratio, holder: holder}) + ")";
el.style.backgroundSize = dimensions.width + "px " + dimensions.height + "px";
}
} else if (mode == "fluid") {
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
if (dimensions.height.slice(-1) == "%") {
el.style.height = dimensions.height
} else {
el.style.height = dimensions.height + "px"
}
if (dimensions.width.slice(-1) == "%") {
el.style.width = dimensions.width
} else {
el.style.width = dimensions.width + "px"
}
if (el.style.display == "inline" || el.style.display === "" || el.style.display == "none") {
el.style.display = "block";
}
if (fallback) {
el.style.backgroundColor = theme.background;
} else {
resizable_images.push(el);
resizable_update(el);
}
}
}
function dimension_check(el, callback) {
var dimensions = {
height: el.clientHeight,
width: el.clientWidth
};
if (!dimensions.height && !dimensions.width) {
if (el.hasAttribute("data-holder-invisible")) {
throw new Error("Holder: placeholder is not visible");
} else {
el.setAttribute("data-holder-invisible", true)
setTimeout(function () {
callback.call(this, el)
}, 1)
return null;
}
} else {
el.removeAttribute("data-holder-invisible")
}
return dimensions;
}
function resizable_update(element) {
var images;
if (element.nodeType == null) {
images = resizable_images;
} else {
images = [element]
}
for (var i in images) {
if (!images.hasOwnProperty(i)) {
continue;
}
var el = images[i]
if (el.holder_data) {
var holder = el.holder_data;
var dimensions = dimension_check(el, resizable_update)
if(dimensions){
if(holder.fluid){
el.setAttribute("src", draw({
ctx: ctx,
dimensions: dimensions,
template: holder.theme,
ratio: ratio,
holder: holder
}))
}
if(holder.textmode && holder.textmode == "exact"){
holder.exact_dimensions = dimensions;
el.setAttribute("src", draw({
ctx: ctx,
dimensions: holder.dimensions,
template: holder.theme,
ratio: ratio,
holder: holder
}))
}
}
}
}
}
function parse_flags(flags, options) {
var ret = {
theme: extend(settings.themes.gray, {})
};
var render = false;
for (sl = flags.length, j = 0; j < sl; j++) {
var flag = flags[j];
if (app.flags.dimensions.match(flag)) {
render = true;
ret.dimensions = app.flags.dimensions.output(flag);
} else if (app.flags.fluid.match(flag)) {
render = true;
ret.dimensions = app.flags.fluid.output(flag);
ret.fluid = true;
} else if (app.flags.textmode.match(flag)) {
ret.textmode = app.flags.textmode.output(flag)
} else if (app.flags.colors.match(flag)) {
ret.theme = app.flags.colors.output(flag);
} else if (options.themes[flag]) {
//If a theme is specified, it will override custom colors
if(options.themes.hasOwnProperty(flag)){
ret.theme = extend(options.themes[flag], {});
}
} else if (app.flags.font.match(flag)) {
ret.font = app.flags.font.output(flag);
} else if (app.flags.auto.match(flag)) {
ret.auto = true;
} else if (app.flags.text.match(flag)) {
ret.text = app.flags.text.output(flag);
}
}
return render ? ret : false;
}
for (var flag in app.flags) {
if (!app.flags.hasOwnProperty(flag)) continue;
app.flags[flag].match = function (val) {
return val.match(this.regex)
}
}
app.add_theme = function (name, theme) {
name != null && theme != null && (settings.themes[name] = theme);
return app;
};
app.add_image = function (src, el) {
var node = selector(el);
if (node.length) {
for (var i = 0, l = node.length; i < l; i++) {
var img = document.createElement("img")
img.setAttribute("data-src", src);
node[i].appendChild(img);
}
}
return app;
};
app.run = function (o) {
preempted = true;
var options = extend(settings, o),
images = [],
imageNodes = [],
bgnodes = [];
if (typeof (options.images) == "string") {
imageNodes = selector(options.images);
} else if (window.NodeList && options.images instanceof window.NodeList) {
imageNodes = options.images;
} else if (window.Node && options.images instanceof window.Node) {
imageNodes = [options.images];
}
if (typeof (options.bgnodes) == "string") {
bgnodes = selector(options.bgnodes);
} else if (window.NodeList && options.elements instanceof window.NodeList) {
bgnodes = options.bgnodes;
} else if (window.Node && options.bgnodes instanceof window.Node) {
bgnodes = [options.bgnodes];
}
for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
var holdercss = document.getElementById("holderjs-style");
if (!holdercss) {
holdercss = document.createElement("style");
holdercss.setAttribute("id", "holderjs-style");
holdercss.type = "text/css";
document.getElementsByTagName("head")[0].appendChild(holdercss);
}
if (!options.nocss) {
if (holdercss.styleSheet) {
holdercss.styleSheet.cssText += options.stylesheet;
} else {
holdercss.appendChild(document.createTextNode(options.stylesheet));
}
}
var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
for (var l = bgnodes.length, i = 0; i < l; i++) {
var src = window.getComputedStyle(bgnodes[i], null)
.getPropertyValue("background-image");
var flags = src.match(cssregex);
var bgsrc = bgnodes[i].getAttribute("data-background-src");
if (flags) {
var holder = parse_flags(flags[1].split("/"), options);
if (holder) {
render("background", bgnodes[i], holder, src);
}
} else if (bgsrc != null) {
var holder = parse_flags(bgsrc.substr(bgsrc.lastIndexOf(options.domain) + options.domain.length + 1)
.split("/"), options);
if (holder) {
render("background", bgnodes[i], holder, src);
}
}
}
for (l = images.length, i = 0; i < l; i++) {
var attr_data_src, attr_src;
attr_src = attr_data_src = src = null;
try {
attr_src = images[i].getAttribute("src");
attr_datasrc = images[i].getAttribute("data-src");
} catch (e) {}
if (attr_datasrc == null && !! attr_src && attr_src.indexOf(options.domain) >= 0) {
src = attr_src;
} else if ( !! attr_datasrc && attr_datasrc.indexOf(options.domain) >= 0) {
src = attr_datasrc;
}
if (src) {
var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1)
.split("/"), options);
if (holder) {
if (holder.fluid) {
render("fluid", images[i], holder, src)
} else {
render("image", images[i], holder, src);
}
}
}
}
return app;
};
contentLoaded(win, function () {
if (window.addEventListener) {
window.addEventListener("resize", resizable_update, false);
window.addEventListener("orientationchange", resizable_update, false);
} else {
window.attachEvent("onresize", resizable_update)
}
preempted || app.run();
});
if (typeof define === "function" && define.amd) {
define([], function () {
return app;
});
}
})(Holder, window);

View File

@@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
/*! Respond.js v1.4.0: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@.*keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]+\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);

View File

@@ -0,0 +1,27 @@
{
"name": "bootstrap-rtl-ondemand",
"description": "Right-to-left (RTL) theme for Twitter Bootstrap 3.x activated with html dir=\"rtl\" attribute on-the-fly.",
"version": "3.3.4-ondemand",
"homepage": "https://github.com/bright/bootstrap-rtl",
"authors": [
"Morteza Ansarinia (https://github.com/morteza)",
"Michał Jastrzębowski (https://github.com/mjastrzebowski)",
"Adam Bar (https://github.com/NOtherDev)"
],
"main": [
"dist/css/bootstrap-rtl-ondemand.css"
],
"ignore": [
"**/.*",
"_config.yml",
"CNAME",
"composer.json",
"CONTRIBUTING.md",
"docs",
"js/tests"
],
"dependencies": {
"bootstrap": ">=3.3.0"
},
"license": "Unlicensed Public Domain"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,500 @@
/*
Holder - 2.2 - client side image placeholders
(c) 2012-2013 Ivan Malopinsky / http://imsky.co
Provided under the MIT License.
Commercial use requires attribution.
*/
var Holder = Holder || {};
(function (app, win) {
var preempted = false,
fallback = false,
canvas = document.createElement('canvas');
var dpr = 1, bsr = 1;
var resizable_images = [];
if (!canvas.getContext) {
fallback = true;
} else {
if (canvas.toDataURL("image/png")
.indexOf("data:image/png") < 0) {
//Android doesn't support data URI
fallback = true;
} else {
var ctx = canvas.getContext("2d");
}
}
if(!fallback){
dpr = window.devicePixelRatio || 1,
bsr = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
}
var ratio = dpr / bsr;
var settings = {
domain: "holder.js",
images: "img",
bgnodes: ".holderjs",
themes: {
"gray": {
background: "#eee",
foreground: "#aaa",
size: 12
},
"social": {
background: "#3a5a97",
foreground: "#fff",
size: 12
},
"industrial": {
background: "#434A52",
foreground: "#C2F200",
size: 12
},
"sky": {
background: "#0D8FDB",
foreground: "#fff",
size: 12
},
"vine": {
background: "#39DBAC",
foreground: "#1E292C",
size: 12
},
"lava": {
background: "#F8591A",
foreground: "#1C2846",
size: 12
}
},
stylesheet: ""
};
app.flags = {
dimensions: {
regex: /^(\d+)x(\d+)$/,
output: function (val) {
var exec = this.regex.exec(val);
return {
width: +exec[1],
height: +exec[2]
}
}
},
fluid: {
regex: /^([0-9%]+)x([0-9%]+)$/,
output: function (val) {
var exec = this.regex.exec(val);
return {
width: exec[1],
height: exec[2]
}
}
},
colors: {
regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,
output: function (val) {
var exec = this.regex.exec(val);
return {
size: settings.themes.gray.size,
foreground: "#" + exec[2],
background: "#" + exec[1]
}
}
},
text: {
regex: /text\:(.*)/,
output: function (val) {
return this.regex.exec(val)[1];
}
},
font: {
regex: /font\:(.*)/,
output: function (val) {
return this.regex.exec(val)[1];
}
},
auto: {
regex: /^auto$/
},
textmode: {
regex: /textmode\:(.*)/,
output: function(val){
return this.regex.exec(val)[1];
}
}
}
//getElementsByClassName polyfill
document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i<n.length;i++)r.test(n[i].className)&&s.push(n[i])}return s})
//getComputedStyle polyfill
window.getComputedStyle||(window.getComputedStyle=function(e){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this})
//http://javascript.nwbox.com/ContentLoaded by Diego Perini with modifications
function contentLoaded(n,t){var l="complete",s="readystatechange",u=!1,h=u,c=!0,i=n.document,a=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",v=i.addEventListener?"removeEventListener":"detachEvent",f=i.addEventListener?"":"on",r=function(e){(e.type!=s||i.readyState==l)&&((e.type=="load"?n:i)[v](f+e.type,r,u),!h&&(h=!0)&&t.call(n,null))},o=function(){try{a.doScroll("left")}catch(n){setTimeout(o,50);return}r("poll")};if(i.readyState==l)t.call(n,"lazy");else{if(i.createEventObject&&a.doScroll){try{c=!n.frameElement}catch(y){}c&&o()}i[e](f+"DOMContentLoaded",r,u),i[e](f+s,r,u),n[e](f+"load",r,u)}}
//https://gist.github.com/991057 by Jed Schmidt with modifications
function selector(a){
a=a.match(/^(\W)?(.*)/);var b=document["getElement"+(a[1]?a[1]=="#"?"ById":"sByClassName":"sByTagName")](a[2]);
var ret=[]; b!==null&&(b.length?ret=b:b.length===0?ret=b:ret=[b]); return ret;
}
//shallow object property extend
function extend(a,b){
var c={};
for(var i in a){
if(a.hasOwnProperty(i)){
c[i]=a[i];
}
}
for(var i in b){
if(b.hasOwnProperty(i)){
c[i]=b[i];
}
}
return c
}
//hasOwnProperty polyfill
if (!Object.prototype.hasOwnProperty)
/*jshint -W001, -W103 */
Object.prototype.hasOwnProperty = function(prop) {
var proto = this.__proto__ || this.constructor.prototype;
return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
}
/*jshint +W001, +W103 */
function text_size(width, height, template) {
height = parseInt(height, 10);
width = parseInt(width, 10);
var bigSide = Math.max(height, width)
var smallSide = Math.min(height, width)
var scale = 1 / 12;
var newHeight = Math.min(smallSide * 0.75, 0.75 * bigSide * scale);
return {
height: Math.round(Math.max(template.size, newHeight))
}
}
function draw(args) {
var ctx = args.ctx;
var dimensions = args.dimensions;
var template = args.template;
var ratio = args.ratio;
var holder = args.holder;
var literal = holder.textmode == "literal";
var exact = holder.textmode == "exact";
var ts = text_size(dimensions.width, dimensions.height, template);
var text_height = ts.height;
var width = dimensions.width * ratio,
height = dimensions.height * ratio;
var font = template.font ? template.font : "sans-serif";
canvas.width = width;
canvas.height = height;
ctx.textAlign = "center";
ctx.textBaseline = "middle";
ctx.fillStyle = template.background;
ctx.fillRect(0, 0, width, height);
ctx.fillStyle = template.foreground;
ctx.font = "bold " + text_height + "px " + font;
var text = template.text ? template.text : (Math.floor(dimensions.width) + "x" + Math.floor(dimensions.height));
if (literal) {
var dimensions = holder.dimensions;
text = dimensions.width + "x" + dimensions.height;
}
else if(exact && holder.exact_dimensions){
var dimensions = holder.exact_dimensions;
text = (Math.floor(dimensions.width) + "x" + Math.floor(dimensions.height));
}
var text_width = ctx.measureText(text).width;
if (text_width / width >= 0.75) {
text_height = Math.floor(text_height * 0.75 * (width / text_width));
}
//Resetting font size if necessary
ctx.font = "bold " + (text_height * ratio) + "px " + font;
ctx.fillText(text, (width / 2), (height / 2), width);
return canvas.toDataURL("image/png");
}
function render(mode, el, holder, src) {
var dimensions = holder.dimensions,
theme = holder.theme,
text = holder.text ? decodeURIComponent(holder.text) : holder.text;
var dimensions_caption = dimensions.width + "x" + dimensions.height;
theme = (text ? extend(theme, {
text: text
}) : theme);
theme = (holder.font ? extend(theme, {
font: holder.font
}) : theme);
el.setAttribute("data-src", src);
holder.theme = theme;
el.holder_data = holder;
if (mode == "image") {
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
if (fallback || !holder.auto) {
el.style.width = dimensions.width + "px";
el.style.height = dimensions.height + "px";
}
if (fallback) {
el.style.backgroundColor = theme.background;
} else {
el.setAttribute("src", draw({ctx: ctx, dimensions: dimensions, template: theme, ratio:ratio, holder: holder}));
if(holder.textmode && holder.textmode == "exact"){
resizable_images.push(el);
resizable_update(el);
}
}
} else if (mode == "background") {
if (!fallback) {
el.style.backgroundImage = "url(" + draw({ctx:ctx, dimensions: dimensions, template: theme, ratio: ratio, holder: holder}) + ")";
el.style.backgroundSize = dimensions.width + "px " + dimensions.height + "px";
}
} else if (mode == "fluid") {
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
if (dimensions.height.slice(-1) == "%") {
el.style.height = dimensions.height
} else {
el.style.height = dimensions.height + "px"
}
if (dimensions.width.slice(-1) == "%") {
el.style.width = dimensions.width
} else {
el.style.width = dimensions.width + "px"
}
if (el.style.display == "inline" || el.style.display === "" || el.style.display == "none") {
el.style.display = "block";
}
if (fallback) {
el.style.backgroundColor = theme.background;
} else {
resizable_images.push(el);
resizable_update(el);
}
}
}
function dimension_check(el, callback) {
var dimensions = {
height: el.clientHeight,
width: el.clientWidth
};
if (!dimensions.height && !dimensions.width) {
if (el.hasAttribute("data-holder-invisible")) {
throw new Error("Holder: placeholder is not visible");
} else {
el.setAttribute("data-holder-invisible", true)
setTimeout(function () {
callback.call(this, el)
}, 1)
return null;
}
} else {
el.removeAttribute("data-holder-invisible")
}
return dimensions;
}
function resizable_update(element) {
var images;
if (element.nodeType == null) {
images = resizable_images;
} else {
images = [element]
}
for (var i in images) {
if (!images.hasOwnProperty(i)) {
continue;
}
var el = images[i]
if (el.holder_data) {
var holder = el.holder_data;
var dimensions = dimension_check(el, resizable_update)
if(dimensions){
if(holder.fluid){
el.setAttribute("src", draw({
ctx: ctx,
dimensions: dimensions,
template: holder.theme,
ratio: ratio,
holder: holder
}))
}
if(holder.textmode && holder.textmode == "exact"){
holder.exact_dimensions = dimensions;
el.setAttribute("src", draw({
ctx: ctx,
dimensions: holder.dimensions,
template: holder.theme,
ratio: ratio,
holder: holder
}))
}
}
}
}
}
function parse_flags(flags, options) {
var ret = {
theme: extend(settings.themes.gray, {})
};
var render = false;
for (sl = flags.length, j = 0; j < sl; j++) {
var flag = flags[j];
if (app.flags.dimensions.match(flag)) {
render = true;
ret.dimensions = app.flags.dimensions.output(flag);
} else if (app.flags.fluid.match(flag)) {
render = true;
ret.dimensions = app.flags.fluid.output(flag);
ret.fluid = true;
} else if (app.flags.textmode.match(flag)) {
ret.textmode = app.flags.textmode.output(flag)
} else if (app.flags.colors.match(flag)) {
ret.theme = app.flags.colors.output(flag);
} else if (options.themes[flag]) {
//If a theme is specified, it will override custom colors
if(options.themes.hasOwnProperty(flag)){
ret.theme = extend(options.themes[flag], {});
}
} else if (app.flags.font.match(flag)) {
ret.font = app.flags.font.output(flag);
} else if (app.flags.auto.match(flag)) {
ret.auto = true;
} else if (app.flags.text.match(flag)) {
ret.text = app.flags.text.output(flag);
}
}
return render ? ret : false;
}
for (var flag in app.flags) {
if (!app.flags.hasOwnProperty(flag)) continue;
app.flags[flag].match = function (val) {
return val.match(this.regex)
}
}
app.add_theme = function (name, theme) {
name != null && theme != null && (settings.themes[name] = theme);
return app;
};
app.add_image = function (src, el) {
var node = selector(el);
if (node.length) {
for (var i = 0, l = node.length; i < l; i++) {
var img = document.createElement("img")
img.setAttribute("data-src", src);
node[i].appendChild(img);
}
}
return app;
};
app.run = function (o) {
preempted = true;
var options = extend(settings, o),
images = [],
imageNodes = [],
bgnodes = [];
if (typeof (options.images) == "string") {
imageNodes = selector(options.images);
} else if (window.NodeList && options.images instanceof window.NodeList) {
imageNodes = options.images;
} else if (window.Node && options.images instanceof window.Node) {
imageNodes = [options.images];
}
if (typeof (options.bgnodes) == "string") {
bgnodes = selector(options.bgnodes);
} else if (window.NodeList && options.elements instanceof window.NodeList) {
bgnodes = options.bgnodes;
} else if (window.Node && options.bgnodes instanceof window.Node) {
bgnodes = [options.bgnodes];
}
for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
var holdercss = document.getElementById("holderjs-style");
if (!holdercss) {
holdercss = document.createElement("style");
holdercss.setAttribute("id", "holderjs-style");
holdercss.type = "text/css";
document.getElementsByTagName("head")[0].appendChild(holdercss);
}
if (!options.nocss) {
if (holdercss.styleSheet) {
holdercss.styleSheet.cssText += options.stylesheet;
} else {
holdercss.appendChild(document.createTextNode(options.stylesheet));
}
}
var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
for (var l = bgnodes.length, i = 0; i < l; i++) {
var src = window.getComputedStyle(bgnodes[i], null)
.getPropertyValue("background-image");
var flags = src.match(cssregex);
var bgsrc = bgnodes[i].getAttribute("data-background-src");
if (flags) {
var holder = parse_flags(flags[1].split("/"), options);
if (holder) {
render("background", bgnodes[i], holder, src);
}
} else if (bgsrc != null) {
var holder = parse_flags(bgsrc.substr(bgsrc.lastIndexOf(options.domain) + options.domain.length + 1)
.split("/"), options);
if (holder) {
render("background", bgnodes[i], holder, src);
}
}
}
for (l = images.length, i = 0; i < l; i++) {
var attr_data_src, attr_src;
attr_src = attr_data_src = src = null;
try {
attr_src = images[i].getAttribute("src");
attr_datasrc = images[i].getAttribute("data-src");
} catch (e) {}
if (attr_datasrc == null && !! attr_src && attr_src.indexOf(options.domain) >= 0) {
src = attr_src;
} else if ( !! attr_datasrc && attr_datasrc.indexOf(options.domain) >= 0) {
src = attr_datasrc;
}
if (src) {
var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1)
.split("/"), options);
if (holder) {
if (holder.fluid) {
render("fluid", images[i], holder, src)
} else {
render("image", images[i], holder, src);
}
}
}
}
return app;
};
contentLoaded(win, function () {
if (window.addEventListener) {
window.addEventListener("resize", resizable_update, false);
window.addEventListener("orientationchange", resizable_update, false);
} else {
window.attachEvent("onresize", resizable_update)
}
preempted || app.run();
});
if (typeof define === "function" && define.amd) {
define([], function () {
return app;
});
}
})(Holder, window);

View File

@@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,5 @@
/*! Respond.js v1.4.0: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@.*keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]+\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);

View File

@@ -0,0 +1,20 @@
//
// RTL Alerts
// --------------------------------------------------
// Dismissable alerts
//
// Expand the left padding and account for the close button's positioning.
.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
.alert-dismissible {
padding-left: (@alert-padding + 20);
padding-right: (@alert-padding);
// Adjust close link position
.close {
right: auto;
left: -21px;
}
}

View File

@@ -0,0 +1,21 @@
//
// RTL Badges
// --------------------------------------------------
// Base class
.badge {
.nav-pills > li > a > & {
margin-left: 0px;
margin-right: 3px;
}
.list-group-item > & {
float: left;
}
.list-group-item > & + & {
margin-left: 5px;
margin-right: auto;
}
}

View File

@@ -0,0 +1,59 @@
// --------------------------------------------------
// Right-to-Left (RTL) Theme for Bootstrap 3.x
// Morteza Ansarinia
// http://github.com/morteza/bootstrap-rtl
// --------------------------------------------------
// Core variables and mixins imported from the latest original bootstrap
@import "../bootstrap/less/variables.less";
@import "variables-rtl.less";
@import "mixins-rtl.less";
// Reset and dependencies
@import "normalize-rtl.less";
//@import "print.less";
//@import "glyphicons.less";
// Core CSS
@{rtl-prefix} {
//@import "scaffolding.less";
@import "type-rtl.less";
//@import "code.less";
@import "grid-rtl.less";
@import "tables-rtl.less";
@import "forms-rtl.less";
//@import "buttons.less";
// Components
//@import "component-animations.less";
@import "dropdowns-rtl.less";
@import "button-groups-rtl.less";
@import "input-groups-rtl.less";
@import "navs-rtl.less";
@import "navbar-rtl.less";
//@import "breadcrumbs.less";
@import "pagination-rtl.less";
@import "pager-rtl.less";
//@import "labels.less";
@import "badges-rtl.less";
//@import "jumbotron.less";
//@import "thumbnails.less";
@import "alerts-rtl.less";
@import "progress-bars-rtl.less";
@import "media-rtl.less";
@import "list-group-rtl.less";
@import "panels-rtl.less";
@import "responsive-embed-rtl.less";
//@import "wells.less";
@import "close-rtl.less";
// Components w/ JavaScript
@import "modals-rtl.less";
//@import "tooltip.less";
@import "popovers-rtl.less";
@import "carousel-rtl.less";
// Utility classes
@import "utilities-rtl.less";
//@import "responsive-utilities.less";
}

View File

@@ -0,0 +1,102 @@
//
// RTL Button groups
// --------------------------------------------------
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
> .btn {
float: right;
}
}
// Prevent double borders when buttons are next to each other
.btn-group {
.btn + .btn,
.btn + .btn-group,
.btn-group + .btn,
.btn-group + .btn-group {
margin-right: -1px;
margin-left: 0px;
}
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
margin-right: -5px; // Offset the first child's margin
margin-left: 0px;
.btn-group,
.input-group {
float: right;
}
> .btn,
> .btn-group,
> .input-group {
margin-right: 5px;
margin-left: 0px;
}
}
// 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
.btn-group > .btn:first-child {
margin-right: 0;
&:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
.border-left-radius(0);
}
}
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
.border-right-radius(0);
}
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
.btn-group > .btn-group {
float: right;
}
.btn-group.btn-group-justified > .btn,
.btn-group.btn-group-justified > .btn-group {
float: none;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:first-child {
> .btn:last-child,
> .dropdown-toggle {
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
.border-left-radius(0);
}
}
.btn-group > .btn-group:last-child > .btn:first-child {
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
.border-right-radius(0);
}
// Reposition the caret
.btn .caret {
margin-right: 0;
}
// Vertical button groups
// ----------------------
.btn-group-vertical {
> .btn + .btn,
> .btn + .btn-group,
> .btn-group + .btn,
> .btn-group + .btn-group {
margin-top: -1px;
margin-right: 0;
}
}

View File

@@ -0,0 +1,76 @@
//
// RTL Carousel
// --------------------------------------------------
// Left/right controls for nav
// ---------------------------
.carousel-control {
right: 0;
bottom: 0;
// Set gradients for backgrounds
&.left {
right: auto;
left: 0;
#gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
}
&.right {
left: auto;
right: 0;
#gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
}
.icon-prev,
.glyphicon-chevron-left {
left: 50%;
right: auto;
margin-right: -10px;
}
.icon-next,
.glyphicon-chevron-right {
right: 50%;
left: auto;
margin-left: -10px;
}
}
// Optional indicator pips
//
// Add an unordered list with the following class and add a list item for each
// slide your carousel holds.
.carousel-indicators {
right: 50%;
left: 0;
margin-right: -30%;
margin-left: 0;
padding-left: 0;
}
// Scale up controls for tablets and up
@media screen and (min-width: @screen-sm-min) {
// Scale up the controls a smidge
.carousel-control {
.glyphicon-chevron-left,
.icon-prev {
margin-left: 0;
margin-right: -15px;
}
.glyphicon-chevron-right,
.icon-next {
margin-left: 0;
margin-right: -15px;
}
}
// Show and left align the captions
.carousel-caption {
left: 20%;
right: 20%;
padding-bottom: 30px;
}
}

View File

@@ -0,0 +1,8 @@
//
// RTL Close icons
// --------------------------------------------------
.close {
float: left;
}

View File

@@ -0,0 +1,63 @@
//
// RTL Dropdown menus
// --------------------------------------------------
// Dropdown arrow/caret
.caret {
margin-right: 2px;
margin-left: 0;
}
// The dropdown menu (ul)
.dropdown-menu {
right: 0;
left: auto;
float: left;
text-align: right; // Ensures proper alignment if parent has it changed (e.g., modal footer)
// Aligns the dropdown menu to right
//
// Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
&.pull-right {
left: 0;
right: auto;
float: right;
}
}
// Menu positioning
//
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
// menu with the parent.
.dropdown-menu-right {
left: auto; // Reset the default from `.dropdown-menu`
right: 0;
}
// With v3, we enabled auto-flipping if you have a dropdown within a right
// aligned nav component. To enable the undoing of that, we provide an override
// to restore the default dropdown menu alignment.
//
// This is only for left-aligning a dropdown menu within a `.navbar-right` or
// `.pull-right` nav component.
.dropdown-menu-left {
left: 0;
right: auto;
}
// Component alignment
//
// Reiterate per navbar.less and the modified component alignment there.
@media (min-width: @grid-float-breakpoint) {
.navbar-right {
.dropdown-menu {
.dropdown-menu-right();
}
// Necessary for overrides of the default right aligned menu.
// Will remove come v4 in all likelihood.
.dropdown-menu-left {
.dropdown-menu-left();
}
}
}

View File

@@ -0,0 +1,85 @@
// ---------------------------------------------
// Flipped classes
// ---------------------------------------------
// ---- Utilities ----
.pull-right {
float: left !important;
}
.pull-left {
float: right !important;
}
//TODO carousel
//TODO Glyphicons
// ---- Dropdown ----
.dropdown-menu-left {
left: auto;
right: 0;
}
// ---- Media ----
.media-right,
.media > .pull-right {
padding-right: 10px;
padding-left: initial;
}
.media-left,
.media > .pull-left {
padding-left: 10px;
padding-right: initial;
}
// ---- Navbar ----
@media (min-width: @grid-float-breakpoint) {
.navbar-left { .pull-left(); }
.navbar-right {
.pull-right();
margin-left: -@navbar-padding-horizontal;
margin-right: initial;
~ .navbar-right {
margin-left: 0;
margin-right: initial;
}
}
}
// ---- Tooltip ----
.tooltip {
&.top-left .tooltip-arrow {
left: @tooltip-arrow-width;
}
&.top-right .tooltip-arrow {
right: @tooltip-arrow-width;
}
&.right .tooltip-arrow {
right: 0;
border-left-color: @tooltip-arrow-color;
}
&.left .tooltip-arrow {
left: 0;
border-right-color: @tooltip-arrow-color;
}
&.bottom-left .tooltip-arrow {
left: @tooltip-arrow-width;
}
&.bottom-right .tooltip-arrow {
right: @tooltip-arrow-width;
}
}
// ---- Type ----
.text-left { text-align: right; }
.text-right { text-align: left; }
//DEPRECATED
blockquote.pull-right {
padding-left: 15px;
padding-right: 0;
border-left: 5px solid @blockquote-border-color;
border-right: 0;
text-align: left;
}

View File

@@ -0,0 +1,102 @@
//
// RTL Forms
// --------------------------------------------------
.radio,
.checkbox {
label {
padding-right: 20px;
padding-left: initial;
}
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
margin-right: -20px;
margin-left: auto;
}
// Radios and checkboxes on same line
.radio-inline,
.checkbox-inline {
padding-right: 20px;
padding-left: 0;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
margin-right: 10px; // space out consecutive inline controls
margin-left: 0;
}
.has-feedback {
// Ensure icons don't overlap text
.form-control {
padding-left: (@input-height-base * 1.25);
padding-right: 12px;
}
}
// Feedback icon (requires .glyphicon classes)
.form-control-feedback {
left: 0;
right: auto;
}
// Inline forms
//
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
// forms begin stacked on extra small (mobile) devices and then go inline when
// viewports reach <768px.
//
// Requires wrapping inputs and labels with `.form-group` for proper display of
// default HTML form controls and our custom form controls (e.g., input groups).
//
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
.form-inline {
// Kick in the inline
@media (min-width: @screen-sm-min) {
label {
padding-right: 0;
padding-left: initial;
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
margin-right: 0;
margin-left: auto;
}
}
}
// Horizontal forms
//
// Horizontal forms are built on grid classes and allow you to create forms with
// labels on the left and inputs on the right.
.form-horizontal {
// Reset spacing and right align labels, but scope to media queries so that
// labels on narrow viewports stack the same as a default form example.
@media (min-width: @screen-sm-min) {
.control-label {
text-align: left;
}
}
// Validation states
//
// Reposition the icon because it's now within a grid column and columns have
// `position: relative;` on them. Also accounts for the grid gutter padding.
.has-feedback .form-control-feedback {
left: (@grid-gutter-width / 2);
right: auto;
}
}

View File

@@ -0,0 +1,45 @@
//
// RTL Grid system
// --------------------------------------------------
// Columns
//
// Common styles for small and large grid columns
.make-rtl-grid-columns(@rtl-prefix);
// Extra small grid
//
// Columns, offsets, pushes, and pulls for extra small devices like
// smartphones.
.make-rtl-grid(xs, @rtl-prefix);
// Small grid
//
// Columns, offsets, pushes, and pulls for the small device range, from phones
// to tablets.
@media (min-width: @screen-sm-min) {
.make-rtl-grid(sm, @rtl-prefix);
}
// Medium grid
//
// Columns, offsets, pushes, and pulls for the desktop device range.
@media (min-width: @screen-md-min) {
.make-rtl-grid(md, @rtl-prefix);
}
// Large grid
//
// Columns, offsets, pushes, and pulls for the large desktop device range.
@media (min-width: @screen-lg-min) {
.make-rtl-grid(lg, @rtl-prefix);
}

View File

@@ -0,0 +1,76 @@
//
// Input groups
// --------------------------------------------------
// Base styles
// -------------------------
.input-group {
.form-control {
// IE9 fubars the placeholder attribute in text inputs and the arrows on
// select elements in input groups. To fix it, we float the input. Details:
// https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
float: right;
}
}
// Reset rounded corners
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
.border-right-radius(@border-radius-base);
.border-left-radius(0);
}
.input-group-addon:first-child {
border-left: 0px;
border-right: 1px solid;
}
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
.border-left-radius(@border-radius-base);
.border-right-radius(0);
}
.input-group-addon:last-child {
border-left-width: 1px;
border-left-style: solid;
border-right: 0px;
}
// Button input groups
// -------------------------
.input-group-btn {
// Negative margin for spacing, position for bringing hovered/focused/actived
// element above the siblings.
> .btn {
+ .btn {
margin-right: -1px;
margin-left: auto;
}
}
// Negative margin to only have a 1px border between the two
&:first-child {
> .btn,
> .btn-group {
margin-left: -1px;
margin-right: auto;
}
}
&:last-child {
> .btn,
> .btn-group {
margin-right: -1px;
margin-left: auto;
}
}
}

View File

@@ -0,0 +1,14 @@
//
// List groups
// --------------------------------------------------
// Base class
//
// Easily usable on <ul>, <ol>, or <div>.
.list-group {
padding-right: 0; // reset padding because ul and ol
padding-left: initial;
}

View File

@@ -0,0 +1,47 @@
// RTL Media objects
// --------------------------------------------------
// Media image alignment
// -------------------------
.media {
> .pull-left {
margin-right: 10px;
&.flip {
margin-right: 0;
margin-left: 10px;
}
}
> .pull-right {
margin-left: 10px;
&.flip {
margin-left: 0;
margin-right: 10px;
}
}
}
.media-right,
.media > .pull-right {
padding-right: 10px;
padding-left: initial;
}
.media-left,
.media > .pull-left {
padding-left: 10px;
padding-right: initial;
}
// Media list variation
// -------------------------
// Undo default ul/ol styles
.media-list {
padding-right: 0;
padding-left: initial;
list-style: none;
}

View File

@@ -0,0 +1,39 @@
// Mixins
// --------------------------------------------------
// Utilities
@import "../bootstrap/less/mixins/hide-text.less";
@import "../bootstrap/less/mixins/opacity.less";
@import "../bootstrap/less/mixins/image.less";
@import "../bootstrap/less/mixins/labels.less";
@import "../bootstrap/less/mixins/reset-filter.less";
@import "../bootstrap/less/mixins/resize.less";
@import "../bootstrap/less/mixins/responsive-visibility.less";
@import "../bootstrap/less/mixins/size.less";
@import "../bootstrap/less/mixins/tab-focus.less";
@import "../bootstrap/less/mixins/text-emphasis.less";
@import "../bootstrap/less/mixins/text-overflow.less";
@import "../bootstrap/less/mixins/vendor-prefixes.less";
// Components
@import "../bootstrap/less/mixins/alerts.less";
@import "../bootstrap/less/mixins/buttons.less";
@import "../bootstrap/less/mixins/panels.less";
@import "mixins/pagination-rtl.less"; // RTL
@import "../bootstrap/less/mixins/list-group.less";
@import "../bootstrap/less/mixins/nav-divider.less";
@import "../bootstrap/less/mixins/forms.less";
@import "../bootstrap/less/mixins/progress-bar.less";
@import "../bootstrap/less/mixins/table-row.less";
// Skins
@import "../bootstrap/less/mixins/background-variant.less";
@import "mixins/border-radius-flipped.less"; //FLIPPED
@import "mixins/gradients-rtl.less"; // RTL
// Layout
@import "../bootstrap/less/mixins/clearfix.less";
@import "../bootstrap/less/mixins/center-block.less";
@import "../bootstrap/less/mixins/nav-vertical-align.less";
@import "mixins/grid-framework-rtl.less"; // RTL
@import "mixins/grid-rtl.less"; // RTL

View File

@@ -0,0 +1,39 @@
// Mixins
// --------------------------------------------------
// Utilities
@import "../bootstrap/less/mixins/hide-text.less";
@import "../bootstrap/less/mixins/opacity.less";
@import "../bootstrap/less/mixins/image.less";
@import "../bootstrap/less/mixins/labels.less";
@import "../bootstrap/less/mixins/reset-filter.less";
@import "../bootstrap/less/mixins/resize.less";
@import "../bootstrap/less/mixins/responsive-visibility.less";
@import "../bootstrap/less/mixins/size.less";
@import "../bootstrap/less/mixins/tab-focus.less";
@import "../bootstrap/less/mixins/text-emphasis.less";
@import "../bootstrap/less/mixins/text-overflow.less";
@import "../bootstrap/less/mixins/vendor-prefixes.less";
// Components
@import "../bootstrap/less/mixins/alerts.less";
@import "../bootstrap/less/mixins/buttons.less";
@import "../bootstrap/less/mixins/panels.less";
@import "mixins/pagination-rtl.less"; // RTL
@import "../bootstrap/less/mixins/list-group.less";
@import "../bootstrap/less/mixins/nav-divider.less";
@import "../bootstrap/less/mixins/forms.less";
@import "../bootstrap/less/mixins/progress-bar.less";
@import "../bootstrap/less/mixins/table-row.less";
// Skins
@import "../bootstrap/less/mixins/background-variant.less";
@import "../bootstrap/less/mixins/border-radius.less";
@import "mixins/gradients-rtl.less"; // RTL
// Layout
@import "../bootstrap/less/mixins/clearfix.less";
@import "../bootstrap/less/mixins/center-block.less";
@import "../bootstrap/less/mixins/nav-vertical-align.less";
@import "mixins/grid-framework-rtl.less"; // RTL
@import "mixins/grid-rtl.less"; // RTL

View File

@@ -0,0 +1,10 @@
// Single side flipped border-radius
.border-right-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
}
.border-left-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
}

View File

@@ -0,0 +1,24 @@
// RTL Gradients
#gradient {
// Horizontal gradient, from right to left
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
.horizontal(@start-color: #333; @end-color: #555; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
}
.horizontal-three-colors(@start-color: #c3325f; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #00b3ee) {
background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
}

View File

@@ -0,0 +1,96 @@
// RTL Framework grid generation
//
// Used only by Bootstrap to generate the correct number of grid classes given
// any value of `@grid-columns`.
.make-rtl-grid-columns(@rtl-prefix) {
// Common styles for all sizes of grid columns, widths 1-12
.col(@index) { // initial
@item: ~".col-xs-@{index}, @{rtl-prefix} .col-sm-@{index}, @{rtl-prefix} .col-md-@{index}, @{rtl-prefix} .col-lg-@{index}";
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
@item: ~"@{rtl-prefix} .col-xs-@{index}, @{rtl-prefix} .col-sm-@{index}, @{rtl-prefix} .col-md-@{index}, @{rtl-prefix} .col-lg-@{index}";
.col((@index + 1), ~"@{list}, @{rtl-prefix} @{item}");
}
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
}
.col(1); // kickstart it
}
.float-rtl-grid-columns(@class, @rtl-prefix) {
.col(@index) { // initial
@item: ~".col-@{class}-@{index}";
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) { // general
@item: ~".col-@{class}-@{index}";
.col((@index + 1), ~"@{list}, @{rtl-prefix} @{item}");
}
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
float: right;
}
}
.col(1); // kickstart it
}
.calc-rtl-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
.col-@{class}-@{index} {
width: percentage((@index / @grid-columns));
}
}
.calc-rtl-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
.col-@{class}-push-@{index} {
right: percentage((@index / @grid-columns));
left: 0;
}
}
.calc-rtl-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
.col-@{class}-push-0 {
right: auto;
left: 0;
}
}
.calc-rtl-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
.col-@{class}-pull-@{index} {
left: percentage((@index / @grid-columns));
right: auto;
}
}
.calc-rtl-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
.col-@{class}-pull-0 {
left: auto;
right: auto;
}
}
.calc-rtl-grid-column(@index, @class, @type) when (@type = offset) {
.col-@{class}-offset-@{index} {
margin-right: percentage((@index / @grid-columns));
margin-left: 0;
}
}
// Basic looping in LESS
.loop-rtl-grid-columns(@index, @class, @type) when (@index >= 0) {
.calc-rtl-grid-column(@index, @class, @type);
// next iteration
.loop-rtl-grid-columns((@index - 1), @class, @type);
}
// Create grid for specific class
.make-rtl-grid(@class, @rtl-prefix) {
.float-rtl-grid-columns(@class, @rtl-prefix);
.loop-rtl-grid-columns(@grid-columns, @class, width);
.loop-rtl-grid-columns(@grid-columns, @class, pull);
.loop-rtl-grid-columns(@grid-columns, @class, push);
.loop-rtl-grid-columns(@grid-columns, @class, offset);
}

View File

@@ -0,0 +1,98 @@
// RTL Grid system
//
// Generate semantic rtl grid columns with these mixins.
// Generate the extra small columns
.make-xs-column(@columns; @gutter: @grid-gutter-width) {
float: right;
}
.make-xs-column-offset(@columns) {
margin-right: percentage((@columns / @grid-columns));
margin-left: 0;
}
.make-xs-column-push(@columns) {
right: percentage((@columns / @grid-columns));
left: auto;
}
.make-xs-column-pull(@columns) {
left: percentage((@columns / @grid-columns));
right: auto;
}
// Generate the small columns
.make-sm-column(@columns; @gutter: @grid-gutter-width) {
@media (min-width: @screen-sm-min) {
float: right;
}
}
.make-sm-column-offset(@columns) {
@media (min-width: @screen-sm-min) {
margin-right: percentage((@columns / @grid-columns));
margin-left: 0;
}
}
.make-sm-column-push(@columns) {
@media (min-width: @screen-sm-min) {
right: percentage((@columns / @grid-columns));
left: auto;
}
}
.make-sm-column-pull(@columns) {
@media (min-width: @screen-sm-min) {
left: percentage((@columns / @grid-columns));
right: auto;
}
}
// Generate the medium columns
.make-md-column(@columns; @gutter: @grid-gutter-width) {
@media (min-width: @screen-md-min) {
float: right;
}
}
.make-md-column-offset(@columns) {
@media (min-width: @screen-md-min) {
margin-right: percentage((@columns / @grid-columns));
margin-left: 0;
}
}
.make-md-column-push(@columns) {
@media (min-width: @screen-md-min) {
right: percentage((@columns / @grid-columns));
left: auto;
}
}
.make-md-column-pull(@columns) {
@media (min-width: @screen-md-min) {
left: percentage((@columns / @grid-columns));
right: auto;
}
}
// Generate the large columns
.make-lg-column(@columns; @gutter: @grid-gutter-width) {
@media (min-width: @screen-lg-min) {
float: right;
}
}
.make-lg-column-offset(@columns) {
@media (min-width: @screen-lg-min) {
margin-right: percentage((@columns / @grid-columns));
margin-left: 0;
}
}
.make-lg-column-push(@columns) {
@media (min-width: @screen-lg-min) {
right: percentage((@columns / @grid-columns));
left: auto;
}
}
.make-lg-column-pull(@columns) {
@media (min-width: @screen-lg-min) {
left: percentage((@columns / @grid-columns));
right: auto;
}
}

View File

@@ -0,0 +1,18 @@
// Pagination
.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {
> li {
&:first-child {
> a,
> span {
.border-right-radius(@border-radius);
}
}
&:last-child {
> a,
> span {
.border-left-radius(@border-radius);
}
}
}
}

View File

@@ -0,0 +1,27 @@
//
// RTL Modals
// --------------------------------------------------
// Footer (for actions)
.modal-footer {
text-align: left; // right align buttons
&.flip {
text-align: right;
}
// Properly space out buttons
.btn + .btn {
margin-left: auto;
margin-right: 5px;
}
// but override that for button groups
.btn-group .btn + .btn {
margin-right: -1px;
margin-left: auto;
}
// and override it for block buttons as well
.btn-block + .btn-block {
margin-right: 0;
margin-left: auto;
}
}

View File

@@ -0,0 +1,134 @@
//
// RTL Navbars
// --------------------------------------------------
// Navbar heading
//
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
// styling of responsive aspects.
.navbar-header {
@media (min-width: @grid-float-breakpoint) {
float: right;
}
}
// Navbar collapse (body)
//
// Group your navbar content into this for easy collapsing and expanding across
// various device sizes. By default, this content is collapsed when <768px, but
// will expand past that for a horizontal display.
//
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
// vertically and include a `max-height` to overflow in case you have too much
// content for the user's viewport.
.navbar-collapse {
padding-right: @navbar-padding-horizontal;
padding-left: @navbar-padding-horizontal;
}
// Brand/project name
.navbar-brand {
float: right;
@media (min-width: @grid-float-breakpoint) {
.navbar > .container &,
.navbar > .container-fluid & {
margin-right: -@navbar-padding-horizontal;
margin-left: auto;
}
}
}
// Navbar toggle
//
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
// JavaScript plugin.
.navbar-toggle {
float: left;
margin-left: @navbar-padding-horizontal;
margin-right: auto;
}
// Navbar nav links
//
// Builds on top of the `.nav` components with its own modifier class to make
// the nav the full height of the horizontal nav (above 768px).
.navbar-nav {
@media (max-width: @grid-float-breakpoint-max) {
// Dropdowns get custom display when collapsed
.open .dropdown-menu {
> li > a,
.dropdown-header {
padding: 5px 25px 5px 15px;
}
}
}
// Uncollapse the nav
@media (min-width: @grid-float-breakpoint) {
float: right;
> li {
float: right;
}
}
}
@media (min-width: @grid-float-breakpoint) {
.navbar-left {
&.flip {
float: right !important;
}
}
.navbar-right {
&:last-child {
margin-left: -@navbar-padding-horizontal;
margin-right: auto;
}
&.flip {
float: left !important;
margin-left: -@navbar-padding-horizontal;
margin-right: auto;
}
.dropdown-menu {
left: 0;
right: auto;
}
}
}
// Text in navbars
//
// Add a class to make any element properly align itself vertically within the navbars.
.navbar-text {
@media (min-width: @grid-float-breakpoint) {
float: right;
// Outdent the form if last child to line up with content down the page
&.navbar-right:last-child {
margin-left: 0;
margin-right: auto;
}
}
}

View File

@@ -0,0 +1,92 @@
//
// Navs
// --------------------------------------------------
// Base class
// --------------------------------------------------
.nav {
padding-right: 0; // Override default ul/ol
padding-left: initial;
}
// Tabs
// -------------------------
// Give the tabs something to sit on
.nav-tabs {
> li {
float: right;
// Actual tabs (as links)
> a {
margin-left: auto;
margin-right: -2px;
border-radius: @border-radius-base @border-radius-base 0 0;
}
}
}
// Pills
// -------------------------
.nav-pills {
> li {
float: right;
// Links rendered as pills
> a {
border-radius: @nav-pills-border-radius;
}
+ li {
margin-right: 2px;
margin-left: auto;
}
}
}
// Stacked pills
.nav-stacked {
> li {
float: none;
+ li {
margin-right: 0; // no need for this gap between nav items
margin-left: auto;
}
}
}
// Nav variations
// --------------------------------------------------
// Justified nav links
// -------------------------
.nav-justified {
> .dropdown .dropdown-menu {
right: auto;
}
}
// Move borders to anchors instead of bottom of list
//
// Mixin for adding on top the shared `.nav-justified` styles for our tabs
.nav-tabs-justified {
> li > a {
// Override margin from .nav-tabs
margin-left: 0;
margin-right: auto;
}
@media (min-width: @screen-sm-min) {
> li > a {
border-radius: @border-radius-base @border-radius-base 0 0;
}
}
}

View File

@@ -0,0 +1,15 @@
//
// 1. Set direction to RTL
//
html@{rtl-prefix} {
direction: rtl;
}
//
// Remove default margin.
//
@{rtl-prefix} body {
direction: rtl;
}

View File

@@ -0,0 +1,24 @@
//
// RTL Pager pagination
// --------------------------------------------------
.pager {
padding-right: 0;
padding-left: initial;
.next {
> a,
> span {
float: left;
}
}
.previous {
> a,
> span {
float: right;
}
}
}

View File

@@ -0,0 +1,32 @@
//
// RTL Pagination (multiple pages)
// --------------------------------------------------
.pagination {
padding-right: 0;
> li {
> a,
> span {
float: right; // Collapse white-space
margin-right: -1px;
margin-left: 0px;
}
&:first-child {
> a,
> span {
margin-left: 0;
.border-right-radius(@border-radius-base);
.border-left-radius(0);
}
}
&:last-child {
> a,
> span {
margin-right: -1px;
.border-left-radius(@border-radius-base);
.border-right-radius(0);
}
}
}
}

View File

@@ -0,0 +1,70 @@
//
// RTL Panels
// --------------------------------------------------
// Tables in panels
//
// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
// watch it go full width.
.panel {
// Add border top radius for first one
> .table:first-child,
> .table-responsive:first-child > .table:first-child {
> thead:first-child,
> tbody:first-child {
> tr:first-child {
td:first-child,
th:first-child {
border-top-right-radius: (@panel-border-radius - 1);
border-top-left-radius: 0;
}
td:last-child,
th:last-child {
border-top-left-radius: (@panel-border-radius - 1);
border-top-right-radius: 0;
}
}
}
}
// Add border bottom radius for last one
> .table:last-child,
> .table-responsive:last-child > .table:last-child {
> tbody:last-child,
> tfoot:last-child {
> tr:last-child {
td:first-child,
th:first-child {
border-bottom-left-radius: (@panel-border-radius - 1);
border-top-right-radius: 0;
}
td:last-child,
th:last-child {
border-bottom-right-radius: (@panel-border-radius - 1);
border-top-left-radius: 0;
}
}
}
}
> .table-bordered,
> .table-responsive > .table-bordered {
> thead,
> tbody,
> tfoot {
> tr {
> th:first-child,
> td:first-child {
border-right: 0;
border-left: none;
}
> th:last-child,
> td:last-child {
border-right: none;
border-left: 0;
}
}
}
}
}

View File

@@ -0,0 +1,33 @@
//
// Popovers
// --------------------------------------------------
.popover {
left: auto;
text-align: right;
}
.popover {
&.top > .arrow {
right: 50%;
left: auto;
margin-right: -@popover-arrow-outer-width;
margin-left: auto;
&:after {
margin-right: -@popover-arrow-width;
margin-left: auto;
}
}
&.bottom > .arrow {
right: 50%;
left: auto;
margin-right: -@popover-arrow-outer-width;
margin-left: auto;
&:after {
margin-right: -@popover-arrow-width;
margin-left: auto;
}
}
}

View File

@@ -0,0 +1,8 @@
//
// RTL Progress bars
// --------------------------------------------------
// Bar of progress
.progress-bar {
float: right;
}

View File

@@ -0,0 +1,15 @@
// RTL Embeds responsive
//
// Credit: Nicolas Gallagher and SUIT CSS.
.embed-responsive {
.embed-responsive-item,
iframe,
embed,
object {
right: 0;
left: auto;
}
}

View File

@@ -0,0 +1,47 @@
//
// Tables
// --------------------------------------------------
//TODO
caption {
text-align: right;
}
th {
text-align: right;
}
// Responsive tables
//
// Wrap your tables in `.table-responsive` and we'll make them mobile friendly
// by enabling horizontal scrolling. Only applies <768px. Everything above that
// will display normally.
.table-responsive {
@media screen and (max-width: @screen-xs-max) {
// Special overrides for the bordered tables
> .table-bordered {
border: 0;
// Nuke the appropriate borders so that the parent can handle them
> thead,
> tbody,
> tfoot {
> tr {
> th:first-child,
> td:first-child {
border-right: 0;
border-left: initial;
}
> th:last-child,
> td:last-child {
border-left: 0;
border-right: initial;
}
}
}
}
}
}

View File

@@ -0,0 +1,65 @@
//
// RTL Typography
// --------------------------------------------------
// Flipped Alignment
.flip.text-left { text-align: right; }
.flip.text-right { text-align: left; }
// List options
// Unstyled keeps list items block level, just removes default browser padding and list-style
.list-unstyled {
padding-right: 0;
padding-left: initial;
}
// Inline turns list items into inline-block
.list-inline {
.list-unstyled();
margin-right: -5px;
margin-left: 0;
}
dd {
margin-right: 0; // Undo browser default
margin-left: initial;
}
// Horizontal description lists
//
// Defaults to being stacked without any of the below styles applied, until the
// grid breakpoint is reached (default of ~768px).
.dl-horizontal {
@media (min-width: @grid-float-breakpoint) {
dt {
float: right;
clear: right;
text-align: left;
}
dd {
margin-right: @component-offset-horizontal;
margin-left: 0;
}
}
}
// Blockquotes
blockquote {
border-right: 5px solid @blockquote-border-color;
border-left: 0;
}
// Opposite alignment of blockquote
//
// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.
.blockquote-reverse,
blockquote.pull-left {
padding-left: 15px;
padding-right: 0;
border-left: 5px solid @blockquote-border-color;
border-right: 0;
text-align: left;
}

View File

@@ -0,0 +1,15 @@
//
// Temporary RTL style to fix bugs rapidly.
// They will move to some place more appropriate later.
// --------------------------------------------------
.pull-right {
&.flip {
float: left !important;
}
}
.pull-left {
&.flip {
float: right !important;
}
}

View File

@@ -0,0 +1,5 @@
//
// RTL Variables
// --------------------------------------------------
@rtl-prefix: ~'[dir="rtl"]';

View File

@@ -0,0 +1,40 @@
{
"name": "bootstrap-rtl-ondemand",
"description": "Right-to-left (RTL) theme for Twitter Bootstrap 3.x activated with html dir=\"rtl\" attribute on-the-fly.",
"version": "3.3.4-ondemand",
"style": "dist/css/bootstrap-rtl.css",
"homepage": "http://github.com/morteza/bootstrap-rtl",
"author": "Morteza Ansarinia (http://github.com/morteza)",
"keywords": [
"twitter",
"bootstrap",
"rtl",
"css",
"persian",
"farsi",
"arabic",
"hebrew",
"theme"
],
"dependencies": {
"bootstrap": "^3.3.4"
},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-banner": "~0.2.3",
"grunt-contrib-less": "~0.12.0"
},
"engines": {
"node": "~0.10.1"
},
"repository": {
"type": "git",
"url": "https://github.com/bright/bootstrap-rtl.git"
},
"bugs": {
"url": "https://github.com/bright/bootstrap-rtl/issues"
},
"licenses": [{
"type": "Unlicensed Public Domain"
}]
}