aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bulma.sh66
-rw-r--r--scripts/fonts.sh27
-rw-r--r--scripts/icons.sh26
-rw-r--r--scripts/js.sh25
-rw-r--r--scripts/styles.sh72
5 files changed, 216 insertions, 0 deletions
diff --git a/scripts/bulma.sh b/scripts/bulma.sh
new file mode 100644
index 0000000..9875a86
--- /dev/null
+++ b/scripts/bulma.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# ==============================================================================
+# FUNCTIONS - START
+# ==============================================================================
+
+run_it()
+{
+
+ local _name="${1-bulma}"
+ local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+ local _src="${_dir%scripts}/src/sass/base/${_name}.sass" # input
+ local _dest="${_dir%scripts}/dist/css/${_name}.css" # output
+ local _options="${3---sourcemap=none}"
+
+ # ----------------------------------------------------------------------------
+ local _dest_dir
+ _dest_dir="$(dirname "${_dest}")"
+
+ if [ ! -d "${_dest_dir}" ]; then
+
+ mkdir -p "${_dest_dir}"
+
+ fi
+
+ # ----------------------------------------------------------------------------
+ sass "${_src}":"${_dest}" "${_options}" -t expanded
+
+}
+
+run_compress()
+{
+
+ local _name="${1-bulma}"
+ local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+ local _src="${_dir%scripts}/src/sass/base/${_name}.sass" # input
+ local _dest="${_dir%scripts}/dist/css/${_name}.min.css" # output
+ local _options="${3---sourcemap=none}"
+
+ # ----------------------------------------------------------------------------
+ local _dest_dir
+ _dest_dir="$(dirname "${_dest}")"
+
+ if [ ! -d "${_dest_dir}" ]; then
+
+ mkdir -p "${_dest_dir}"
+
+ fi
+
+ # ----------------------------------------------------------------------------
+ sass "${_src}":"${_dest}" "${_options}" -t compressed
+
+}
+# ==============================================================================
+# FUNCTIONS - END
+# ==============================================================================
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+
+run_it "$@" && run_compress "$@"
+
+# ==============================================================================
+# EXECUTION - END
+# ==============================================================================
diff --git a/scripts/fonts.sh b/scripts/fonts.sh
new file mode 100644
index 0000000..ede0645
--- /dev/null
+++ b/scripts/fonts.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# Copy fonts
+#
+
+run_roboto()
+{
+ local _name="${1-roboto-latin}"
+ local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+ local _src="${_dir%scripts}/src/fonts/roboto/${_name}.woff2" # input
+ local _dest="${_dir%scripts}/dist/fonts/roboto/" # output
+
+ # copy font Roboto
+
+ if [[ -n "${_src}" ]];
+ then
+ rm -rfv "${_dest}"
+ mkdir -p "${_dest}"
+ cp -fv "${_src}" "${_dest}"
+ # cp -fv "${_src}."{eot,svg,ttf,woff,woff2} "${_dest}"
+ fi
+
+}
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+run_roboto "$@"
diff --git a/scripts/icons.sh b/scripts/icons.sh
new file mode 100644
index 0000000..6b273bb
--- /dev/null
+++ b/scripts/icons.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+# copy icons
+#
+
+run_icons()
+{
+ local _name="${1-master}"
+ local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+ local _src="${_dir%scripts}/src/images/icons/${_name}.svg" # input
+ local _dest="${_dir%scripts}/dist/images/icons/" # output
+
+ # copy master.svg
+
+ if [[ -n "${_src}" ]];
+ then
+ rm -rfv "${_dest}"
+ mkdir -p "${_dest}"
+ cp -fv "${_src}" "${_dest}"
+ fi
+
+}
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+run_icons "$@"
diff --git a/scripts/js.sh b/scripts/js.sh
new file mode 100644
index 0000000..5b7424b
--- /dev/null
+++ b/scripts/js.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+
+run_navbar()
+{
+ local _name="${1-navbar-burger}"
+ local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+ local _src="${_dir%scripts}/src/js/${_name}.js" # input
+ local _dest="${_dir%scripts}/dist/js/" # output
+
+ # copy font Roboto
+
+ if [[ -n "${_src}" ]];
+ then
+ rm -rfv "${_dest}"
+ mkdir -p "${_dest}"
+ cp -fv "${_src}" "${_dest}"
+ fi
+
+}
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+run_navbar "$@"
diff --git a/scripts/styles.sh b/scripts/styles.sh
new file mode 100644
index 0000000..768cfb3
--- /dev/null
+++ b/scripts/styles.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+
+# ==============================================================================
+# FUNCTIONS - START
+# ==============================================================================
+
+run_it()
+{
+
+ local _name="${1-style}"
+ local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+ local _src="${_dir%scripts}/src/scss/custom/${_name}.scss" # input
+ local _dest="${_dir%scripts}/dist/css/${_name}.css" # output
+ local _options="${3---sourcemap=none}"
+
+ # ----------------------------------------------------------------------------
+ local _dest_dir
+ _dest_dir="$(dirname "${_dest}")"
+
+ if [ ! -d "${_dest_dir}" ]; then
+
+ mkdir -p "${_dest_dir}"
+
+ fi
+
+ # ----------------------------------------------------------------------------
+
+ sass "${_src}":"${_dest}" "${_options}" -t expanded
+
+}
+
+run_compress()
+{
+
+ local _name="${1-style}"
+ local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+ local _src="${_dir%scripts}/src/scss/custom/${_name}.scss" # input
+ local _dest="${_dir%scripts}/dist/css/${_name}.min.css" # output
+ local _options="${3---sourcemap=none}"
+
+ # ----------------------------------------------------------------------------
+ local _dest_dir
+ _dest_dir="$(dirname "${_dest}")"
+
+ if [ ! -d "${_dest_dir}" ]; then
+
+ mkdir -p "${_dest_dir}"
+
+ fi
+
+ # ----------------------------------------------------------------------------
+ sass "${_src}":"${_dest}" "${_options}" -t compressed
+
+}
+
+# run_it()
+
+# ==============================================================================
+# FUNCTIONS - END
+# ==============================================================================
+
+
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+
+run_it "$@" && run_compress "$@"
+
+# ==============================================================================
+# EXECUTION - END
+# ==============================================================================