Commit 84fb7aad authored by Leo Iannacone's avatar Leo Iannacone

Merge remote-tracking branch 'github/master' into portable

parents adcc48e9 3517b548
......@@ -127,7 +127,7 @@ function Page_Generic() {
};
this.preferences = function () {
var bootstrap_theme_css = '/external_libs/bootstrap-3.2.0-dist/css/bootstrap-theme.min.css';
var bootstrap_theme_css = '/external_libs/bootstrap-3.2.0/css/bootstrap-theme.min.css';
if (config.preferences.glossy_theme) {
if ($('head').find('link[href="' + bootstrap_theme_css + '"]').length === 0)
$('head').append('<link rel="stylesheet" href="' + bootstrap_theme_css + '">');
......
......@@ -2,6 +2,25 @@
EXT_LIBS_DIR="${SCRIPTS_DIR}/../public/external_libs"
get_github() {
USER=$1
NAME=$2
VERSION=$3
DIST=$4
ARCHIVE=v${VERSION}.zip
URL="https://github.com/${USER}/${NAME}/archive/${ARCHIVE}"
LIB_NAME="${NAME}-${VERSION}"
if [ -d ${EXT_LIBS_DIR}/${LIB_NAME} ] ; then return ; fi
echo "Downloading ${NAME} ${VERSION} ..."
curl -s -O -L ${URL} && \
unzip -q ${ARCHIVE} && rm ${ARCHIVE}
if [ "$DIST" != "" ] ; then
mv ${LIB_NAME} tmp
mv tmp/${DIST} ${LIB_NAME}
rm -r tmp
fi
}
get_bootstrap() {
VERSION="3.2.0"
NAME="bootstrap-${VERSION}-dist"
......@@ -37,27 +56,19 @@ get_tablesorter() {
cd ..
}
get_chartist() {
VERSION="0.1.12"
NAME="chartist-js-${VERSION}"
if [ -d ${EXT_LIBS_DIR}/${NAME} ] ; then return ; fi
ARCHIVE=v${VERSION}.zip
URL="https://github.com/gionkunz/chartist-js/archive/${ARCHIVE}"
echo "Downloading chartist-js ${VERSION} ..."
curl -s -O -L ${URL} && \
unzip -q ${ARCHIVE} && rm ${ARCHIVE}
}
if [ ! -d ${EXT_LIBS_DIR} ] ; then mkdir -p ${EXT_LIBS_DIR} ; fi
TMP_DIR="`mktemp -d`"
cd ${TMP_DIR}
get_jquery
get_bootstrap
get_tablesorter
get_chartist
# get boostrap
get_github "twbs" "bootstrap" "3.2.0" "dist"
# get chartist
get_github "gionkunz" "chartist-js" "0.2.1" "libdist"
if [ "`ls -1`" != "" ] ; then mv * ${EXT_LIBS_DIR} ; fi
cd && rm -r ${TMP_DIR}
......@@ -18,8 +18,8 @@
<script src="/external_libs/jquery/jquery-1.11.0.min.js"></script>
<script src="/external_libs/tablesorter/jquery.tablesorter.min.js"></script>
<script src="/external_libs/tablesorter/jquery.tablesorter.widgets.min.js"></script>
<script src="/external_libs/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
<script src="/external_libs/chartist-js-0.1.12/libdist/chartist.min.js"></script>
<script src="/external_libs/bootstrap-3.2.0/js/bootstrap.min.js"></script>
<script src="/external_libs/chartist-js-0.2.1/chartist.min.js"></script>
<script>
var config = <%- JSON.stringify(web) %>
......
......@@ -4,9 +4,9 @@
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.png" />
<title><%= web.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/external_libs/bootstrap-3.2.0-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/external_libs/bootstrap-3.2.0-dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="/external_libs/chartist-js-0.1.12/libdist/chartist.min.css">
<link rel="stylesheet" href="/external_libs/bootstrap-3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="/external_libs/bootstrap-3.2.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="/external_libs/chartist-js-0.2.1/chartist.min.css">
<link rel="stylesheet" href="/external_libs/tablesorter/theme.bootstrap.css">
<link rel="stylesheet" href="/stylesheets/style.css?<%= version %>">
</head>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment