Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorVicky <vicky@vickylai.com>2018-07-26 22:53:56 +0300
committerVicky <vicky@vickylai.com>2018-07-26 22:53:56 +0300
commita6f92dcc262bd37cd305f92e82a3af85d62bb392 (patch)
treee50ea4fac9a8bdb1680aa860fd02db59e5f4e5bb /assets
parent58804859f03fca978f60b2f32d5c43d6841b282a (diff)
parentc1a279a871edf6a3a6811d782681d07e9b466dd7 (diff)
Merge branch 'next_gen' of https://github.com/Hanzei/hugo-theme-introduction into Hanzei-next_gen
Diffstat (limited to 'assets')
-rw-r--r--assets/js/index.js28
-rw-r--r--assets/js/initMoment.js4
-rw-r--r--assets/js/initOwlCarousel.js9
-rw-r--r--assets/sass/_base-variables.sass6
-rw-r--r--assets/sass/_base.sass83
-rw-r--r--assets/sass/_fontawesome-import.sass3
-rw-r--r--assets/sass/_fonts.sass2
-rw-r--r--assets/sass/style.sass11
8 files changed, 59 insertions, 87 deletions
diff --git a/assets/js/index.js b/assets/js/index.js
index 03ab427..9f3fc27 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -1,3 +1,23 @@
+// Nav burger animation
+document.addEventListener('DOMContentLoaded', function () {
+ // Get all "navbar-burger" elements
+ var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
+ // Check if there are any navbar burgers
+ if ($navbarBurgers.length > 0) {
+ // Add a click event on each of them
+ $navbarBurgers.forEach(function ($el) {
+ $el.addEventListener('click', function () {
+ // Get the target from the "data-target" attribute
+ var target = $el.dataset.target;
+ var $target = document.getElementById(target);
+ // Toggle the class on both the "navbar-burger" and the "navbar-menu"
+ $el.classList.toggle('is-active');
+ $target.classList.toggle('is-active');
+ });
+ });
+ }
+});
+
// Bitty scrolling links script
$('a[href^="#"]').click(function(e) {
e.preventDefault();
@@ -20,12 +40,6 @@ $('.modal-close').click(function () {
$(document).keypress(function(e) {
if(e.which == 0) {
$('.modal.is-active').removeClass('is-active');
+ $("html").removeClass("modal-open");
}
});
-
-{{ if and .Site.Params.localTime .Page.IsHome }}
-$(document).ready(function() {
- var time = moment().tz("{{ .Site.Params.timeZone }}").format("h:mm A");
- $('#time').html(time);
-})
-{{ end }}
diff --git a/assets/js/initMoment.js b/assets/js/initMoment.js
new file mode 100644
index 0000000..20a0a4b
--- /dev/null
+++ b/assets/js/initMoment.js
@@ -0,0 +1,4 @@
+$(document).ready(function() {
+ var time = moment().tz("{{ .Site.Params.home.timeZone }}").format("h:mm A");
+ $('#time').html(time);
+})
diff --git a/assets/js/initOwlCarousel.js b/assets/js/initOwlCarousel.js
new file mode 100644
index 0000000..fad5b64
--- /dev/null
+++ b/assets/js/initOwlCarousel.js
@@ -0,0 +1,9 @@
+$(document).ready(function(){
+ $(".owl-carousel").owlCarousel({
+ loop: true,
+ nav: true,
+ margin: 10,
+ items: 1,
+ autoHeight: true
+ });
+});
diff --git a/assets/sass/_base-variables.sass b/assets/sass/_base-variables.sass
index fcefd6c..935ecd8 100644
--- a/assets/sass/_base-variables.sass
+++ b/assets/sass/_base-variables.sass
@@ -1,6 +1,6 @@
$family-sans-serif: Nunito Sans, sans-serif
-$title-stack: Nunito Sans, sans-serif
-$body-size: 16px
$code: $primary
-$code-background: $background
$title-weight: 300
+$navbar-background-color: $background
+$navbar-item-hover-background-color: $background
+$navbar-item-hover-color: $secondary
diff --git a/assets/sass/_base.sass b/assets/sass/_base.sass
index 859cecf..58ba830 100644
--- a/assets/sass/_base.sass
+++ b/assets/sass/_base.sass
@@ -1,10 +1,4 @@
-html
- background-color: $background
-
body
- font-size: $body-size
- font-family: $family-sans-serif
- color: $body-color
background-color: $background
html.modal-open
@@ -21,21 +15,12 @@ html.modal-open
animation: fadeIn ease-in 1
animation-fill-mode: forwards
animation-duration: 1s
-
-.fade-in.one
- animation-delay: 0.7s
-
-.fade-in.two
- animation-delay: 1.4s
-
-.fade-in.three
- animation-delay: 1.8s
-
-.section
- background-color: $background
-
-.hero
- background-color: $background
+ &.one
+ animation-delay: 0.7s
+ &.two
+ animation-delay: 1.4s
+ &.three
+ animation-delay: 1.8s
a
color: $primary
@@ -45,20 +30,11 @@ a
&:active
color: $primary
-.title
- color: $h-color
- font-weight: 400
-
-.subtitle
- color: $h-color
-
-h1
+h1, h2, .title, .subtitle
color: $h-color
- font-family: $title-stack
-h2
- color: $h-color
- font-family: $title-stack
+.title
+ font-weight: 400
ul
padding: 0
@@ -80,6 +56,9 @@ hr
border: none
box-shadow: none
+.hidden
+ display: none
+
.img-responsive
border-radius: 5px
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4)
@@ -100,23 +79,12 @@ hr
font-size: 3rem
text-align: center
-.tagline
- font-size: 2.5rem
- @include mobile
- font-size: 1.5rem
-
.top-pad
padding-top: 1rem
.bottom-pad
padding-bottom: 1rem
-.no-padding
- padding: 0
-
-.no-padding-top
- padding-top: 0
-
.strong-post-title
font-weight: $weight-bold
@@ -137,31 +105,16 @@ hr
vertical-align: baseline
margin: 0 5px
-.navbar
- background-color: $background
-
.navbar-burger
margin-right: auto
.navbar-burger:hover
- background-color: $background
+ background-color: $navbar-background-color
.navbar-item
text-transform: uppercase
font-size: 14px
-a.navbar-item:hover
- color: $secondary
-
-.expanding-menu
- ul
- list-style: none
- display: none
-
-.expanding-menu:hover ul
- display: block
- transition: height 1s ease
-
.social-icons
padding: 0 10px
@@ -185,7 +138,6 @@ a.navbar-item:hover
width: 70%
margin: 0 auto
text-align: center
- font-family: $h-color
font-size: 1.5rem
@include mobile
width: 100%
@@ -204,9 +156,6 @@ a.navbar-item:hover
background-color: $background
font-size: 1.5rem
-.hidden
- display: none
-
.markdown
p
margin-bottom: 1em
@@ -234,12 +183,8 @@ a.navbar-item:hover
h6
font-size: $size-6
a
- color: $primary
- :hover
+ &:hover
color: $secondary
- font-style: none
- :active
- color: $primary
ul
margin-bottom: 1.25rem
margin-left: 1.5em
diff --git a/assets/sass/_fontawesome-import.sass b/assets/sass/_fontawesome-import.sass
new file mode 100644
index 0000000..8b2d069
--- /dev/null
+++ b/assets/sass/_fontawesome-import.sass
@@ -0,0 +1,3 @@
+@import "../vendor/fontawesome-free/scss/fontawesome.scss"
+@import "../vendor/fontawesome-free/scss/fa-brands.scss"
+@import "../vendor/fontawesome-free/scss/fa-solid.scss"
diff --git a/assets/sass/_fonts.sass b/assets/sass/_fonts.sass
index d4dc17e..c6d5557 100644
--- a/assets/sass/_fonts.sass
+++ b/assets/sass/_fonts.sass
@@ -1,5 +1,3 @@
-$nunito-font-path: "/fonts/NunitoSans"
-
/* vietnamese */
@font-face
font-family: 'Nunito Sans'
diff --git a/assets/sass/style.sass b/assets/sass/style.sass
index 44fabd6..3f4ef03 100644
--- a/assets/sass/style.sass
+++ b/assets/sass/style.sass
@@ -1,12 +1,11 @@
{{ $themeStyle := .Site.Params.themeStyle | default "light" }}
-$fa-font-path: "/fonts/fontawesome-free/webfonts"
+$fa-font-path: {{ "/fonts/fontawesome-free/webfonts" | relURL }}
+$nunito-font-path: {{ "/fonts/NunitoSans" | relURL }}
-@import "bulma-import"
-@import "../vendor/fontawesome-free/scss/fontawesome.scss"
-@import "../vendor/fontawesome-free/scss/fa-brands.scss"
-@import "../vendor/fontawesome-free/scss/fa-solid.scss"
@import "fonts"
-@import "base-variables"
@import "{{ $themeStyle }}-variables"
+@import "base-variables"
+@import "bulma-import"
+@import "fontawesome-import"
@import "base"
@import "{{ $themeStyle }}-style"