Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ignorePatterns": [
"**/gulpfile.js/*.js",
"dist/**/*.js"
]
}
File renamed without changes.
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"semi": true,
"arrowParens": "always",
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 120,
"proseWrap": "preserve",
"bracketSameLine": true,
"bracketSpacing": true,
"endOfLine": "lf",
"useTabs": false
}
216 changes: 216 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
{
"plugins": [
"stylelint-scss"
],
"extends": [
"stylelint-config-standard-scss"
],
"customSyntax": "postcss-scss",
"rules": {
"rule-empty-line-before": [
"always",
{
"except": [
"after-single-line-comment",
"inside-block-and-after-rule",
"inside-block",
"first-nested"
],
"ignore": [
"after-comment",
"first-nested",
"inside-block"
]
}
],
"declaration-empty-line-before": [
"always",
{
"ignore": [
"after-comment",
"after-declaration",
"first-nested"
]
}
],
"import-notation": [
"string"
],
"block-no-empty": true,
"color-no-invalid-hex": true,
"comment-no-empty": true,
"declaration-block-no-duplicate-custom-properties": true,
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
}
],
"function-no-unknown": [
true,
{
"ignoreFunctions": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
"calc-interpolation",
"/^rem-/",
"append",
"-",
"/^map-/"
]
}
],
"annotation-no-unknown": [
true,
{
"ignoreAnnotations": [
"default"
]
}
],
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"mixin",
"include",
"extend",
"if",
"else",
"use",
"function",
"for",
"return",
"warn",
"each",
"debug"
]
}
],
"declaration-block-no-shorthand-property-overrides": true,
"font-family-no-duplicate-names": true,
"font-family-no-missing-generic-family-keyword": true,
"function-calc-no-unspaced-operator": true,
"function-linear-gradient-no-nonstandard-direction": true,
"keyframe-declaration-no-important": true,
"media-feature-name-no-unknown": true,
"named-grid-areas-no-invalid": true,
"no-descending-specificity": null,
"no-duplicate-at-import-rules": true,
"no-duplicate-selectors": true,
"no-empty-source": true,
"no-invalid-double-slash-comments": true,
"no-invalid-position-at-import-rule": true,
"no-irregular-whitespace": true,
"property-no-unknown": true,
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-element-no-unknown": true,
"selector-type-no-unknown": [
true,
{
"ignore": [
"custom-elements"
]
}
],
"string-no-newline": true,
"unit-no-unknown": true,
"alpha-value-notation": [
"percentage",
{
"exceptProperties": [
"opacity"
]
}
],
"at-rule-no-vendor-prefix": true,
"color-function-notation": [
"legacy",
{
"disableFix": true
}
],
"color-hex-length": "short",
"comment-empty-line-before": [
"always",
{
"except": [
"first-nested"
],
"ignore": [
"stylelint-commands"
]
}
],
"comment-whitespace-inside": "always",
"custom-property-empty-line-before": [
"always",
{
"except": [
"after-custom-property",
"first-nested"
],
"ignore": [
"after-comment",
"inside-single-line-block"
]
}
],
"custom-media-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
"message": "Expected custom media query name to be kebab-case"
}
],
"custom-property-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
"message": "Expected custom property name to be kebab-case"
}
],
"declaration-block-single-line-max-declarations": 1,
"font-family-name-quotes": "always-where-recommended",
"function-name-case": "lower",
"function-url-quotes": "always",
"hue-degree-notation": "angle",
"keyframes-name-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
"message": "Expected keyframe name to be kebab-case"
}
],
"length-zero-no-unit": [
true,
{
"ignoreFunctions": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
"calc-interpolation",
"/^rem-/",
"append",
"-",
"/^map-/",
"var",
"/^--/",
"xs"
]
}
],
"media-feature-name-no-vendor-prefix": true,
"number-max-precision": 4,
"property-no-vendor-prefix": true,
"selector-attribute-quotes": "always",
"selector-id-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
"message": "Expected id selector to be kebab-case"
}
],
"selector-no-vendor-prefix": true,
"selector-pseudo-element-colon-notation": "double",
"selector-type-case": "lower",
"shorthand-property-no-redundant-values": true,
"value-keyword-case": "lower",
"value-no-vendor-prefix": true
}
}
105 changes: 49 additions & 56 deletions dev/scripts/modules/app.js
Original file line number Diff line number Diff line change
@@ -1,67 +1,60 @@
import 'popper.js';
// import 'bootstrap/js/dist/button';
import 'bootstrap/js/dist/modal';
// import 'bootstrap/js/dist/dropdown';
// import 'bootstrap/js/dist/modal';
// import 'bootstrap/js/dist/tab';
// import 'bootstrap/js/dist/collapse';
// import 'bootstrap-select';
// import 'bootstrap/js/dist/modal';


class global {
constructor() {
this.myModal = document.getElementById('exampleModal')
this.stickyHeader();
this.megamenuPopup();
this.toggleContent();
this.readMore();
}

stickyHeader() {
var elemBody = $('body');
var pageHeader = $('.theme-header');
if ($(elemBody).hasClass('home')) {
$(pageHeader).addClass('theme-header--dark');
}

$(window).scroll(function () {
if ($(this).scrollTop() > 50) {
$('.theme-header').addClass('sticky');
} else {
$('.theme-header').removeClass('sticky');
}
});
}

megamenuPopup() {
var toggleBar = $('.navbar-toggle');
var popupMenu = $('.megamenu-popup');
var closePopup = $('.close-menu');
$(toggleBar).click(function () {
$(popupMenu).addClass('active');
});
$(closePopup).click(function () {
$(popupMenu).removeClass('active');
});
}

toggleContent() {
var toggleContent = $('.toggle-text');
var viewBtn = $('.toggleRead');
$(viewBtn).click(function () {
$(this).toggleClass('active');
$(toggleContent).toggleClass('active');
});
}

readMore() {
$('.readmore').click(function () {
$('.collapse-text').addClass('expand');
$(this).hide();
});
constructor() {
this.myModal = document.getElementById('exampleModal');
this.stickyHeader();
this.megamenuPopup();
this.toggleContent();
this.readMore();
}

stickyHeader() {
var elemBody = $('body');
var pageHeader = $('.theme-header');
if ($(elemBody).hasClass('home')) {
$(pageHeader).addClass('theme-header--dark');
}

$(window).scroll(function () {
if ($(this).scrollTop() > 50) {
$('.theme-header').addClass('sticky');
} else {
$('.theme-header').removeClass('sticky');
}
});
}

megamenuPopup() {
var toggleBar = $('.navbar-toggle');
var popupMenu = $('.megamenu-popup');
var closePopup = $('.close-menu');
$(toggleBar).click(function () {
$(popupMenu).addClass('active');
});
$(closePopup).click(function () {
$(popupMenu).removeClass('active');
});
}

toggleContent() {
var toggleContent = $('.toggle-text');
var viewBtn = $('.toggleRead');
$(viewBtn).click(function () {
$(this).toggleClass('active');
$(toggleContent).toggleClass('active');
});
}

readMore() {
$('.readmore').click(function () {
$('.collapse-text').addClass('expand');
$(this).hide();
});
}
}

export default global;
Expand Down
Loading