Skip to content

Commit

Permalink
chore: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
wei2912 committed Jul 16, 2024
1 parent 4d84fc6 commit 7f17de8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function sticky() {
'transform',
'translate3d(' +
(-100 + Math.min((st * 100) / contentOffset, 100)) +
'%,0,0)'
'%,0,0)',
);

lastSt = st;
Expand All @@ -87,7 +87,7 @@ function subMenu() {
if (separator.length) {
separator.nextAll('.menu-item').wrapAll('<div class="sub-menu" />');
separator.replaceWith(
'<button class="button-icon menu-item-button menu-item-more" aria-label="More"><svg class="icon"><use xlink:href="#dots-horizontal"></use></svg></button>'
'<button class="button-icon menu-item-button menu-item-more" aria-label="More"><svg class="icon"><use xlink:href="#dots-horizontal"></use></svg></button>',
);

var toggle = mainNav.find('.menu-item-more');
Expand All @@ -104,7 +104,7 @@ function subMenu() {

subMenu.on('animationend', function (e) {
subMenu.removeClass(
'animate__animated animate__bounceIn animate__zoomOut'
'animate__animated animate__bounceIn animate__zoomOut',
);
if (e.originalEvent.animationName == 'zoomOut') {
subMenu.hide();
Expand Down Expand Up @@ -334,7 +334,7 @@ function elasticSearch(query, callback) {
var payload = { query: query };
searchReq.open(
'POST',
`${baseUrl}/api/as/v1/engines/${engine}/search.json`
`${baseUrl}/api/as/v1/engines/${engine}/search.json`,
);
searchReq.addEventListener('load', callback);
searchReq.setRequestHeader('Content-Type', 'application/json');
Expand Down Expand Up @@ -407,7 +407,7 @@ function search() {
if (counter >= firstPost && counter <= lastPost) {
var searchValueRegex = new RegExp(
`(${searchValue})`,
'ig'
'ig',
);
var highlightedTitle =
post.title && post.title.raw
Expand All @@ -418,7 +418,7 @@ function search() {
.trim()
: post.title.raw.replaceAll(
searchValueRegex,
`<mark>$1</mark>`
`<mark>$1</mark>`,
)
: '';

Expand All @@ -431,7 +431,7 @@ function search() {
.trim()
: post.meta_description.raw.replaceAll(
searchValueRegex,
`<mark>$1</mark>`
`<mark>$1</mark>`,
)
: '';
var tooltipDescription =
Expand All @@ -445,7 +445,7 @@ function search() {
class="text-sm inline-flex items-center font-bold leading-sm uppercase px-3 py-1 bg-brand-light text-gray-800 rounded-full my-1 capitalize mr-1"
>
${tag}
</div>`
</div>`,
)
.reduce((a, b) => a + b, '');

Expand Down
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function hbs(done) {
]),
livereload(),
],
handleError(done)
handleError(done),
);
}

Expand All @@ -48,7 +48,7 @@ function css(done) {
dest("assets/built/", { sourcemaps: "." }),
livereload(),
],
handleError(done)
handleError(done),
);
}

Expand All @@ -60,7 +60,7 @@ function js(done) {
dest("assets/built/", { sourcemaps: "." }),
livereload(),
],
handleError(done)
handleError(done),
);
}

Expand All @@ -79,7 +79,7 @@ function zipper(done) {
zip(filename),
dest("dist/"),
],
handleError(done)
handleError(done),
);
}

Expand Down

0 comments on commit 7f17de8

Please sign in to comment.