Skip to content

Commit ca1c492

Browse files
authored
Merge pull request #811 from mpourismaiel/v0.17.3
Release v0.17.3
2 parents edb375d + b8de576 commit ca1c492

File tree

120 files changed

+1626
-301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1626
-301
lines changed

.github/workflows/cypress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Hugo
1818
uses: peaceiris/actions-hugo@v2
1919
with:
20-
hugo-version: '0.60.1'
20+
hugo-version: '0.72.0'
2121

2222
- name: Cypress run
2323
uses: cypress-io/github-action@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules
22
yarn-error.log
33
exampleSite/public/*
4+
exampleSite/hugo_stats.json
45
cypress/videos
56
cypress/plugins
67
cypress/screenshots

.seed-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ project:
66
oneLiner: 'Highly customizable open source theme for Hugo based static websites'
77
description: |
88
Create your next website with Syna.
9-
version: 'v0.17.2'
9+
version: 'v0.17.3'
1010

1111
vision:
1212
type: 'community'

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,35 @@ _2018_
1515
1616
-->
1717

18+
# v0.17.3
19+
20+
_2020-07-25_
21+
22+
- [Downloads for v0.17.3](https://syna.okkur.org/releases/v0.17.3)
23+
- [Changelog since v0.17.2](#changes-since-v0172)
24+
25+
## Documentation for v0.17.3
26+
27+
[Documentation](https://syna.okkur.org/docs) _Documentation defaults to latest release_
28+
29+
## Changes since v0.17.2
30+
31+
- list: Update whitespace in list mode [776](https://github.com/okkur/syna/pull/776)
32+
- portfolio: Add support for background image on portfolio overlays [802](https://github.com/okkur/syna/pull/802)
33+
- repositories_hithub: Added new fragment to fetch and display user repositories from Github [803](https://github.com/okkur/syna/pull/803)
34+
- Update documentation
35+
- Added more tests
36+
37+
## Fixes since v0.17.2
38+
39+
- nav: Add support for nested menus by adding dropdowns [781](https://github.com/okkur/syna/pull/781)
40+
- nav: Fix the bug that prevented search from working if there were multiple nav fragments in one page [782](https://github.com/okkur/syna/pull/782)
41+
- content: Fix sticky sidebar issues [788](https://github.com/okkur/syna/pull/788)
42+
- items: Fix overflowing image issue [794](https://github.com/okkur/syna/pull/794)
43+
- Fix multilingual pages not showing subitems of fragments in non default language page [800](https://github.com/okkur/syna/pull/800)
44+
45+
---
46+
1847
# v0.17.2
1948

2049
_2020-06-01_

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.17.2
1+
v0.17.3

assets/js/content.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const sidebarContent = document.querySelector('.content-sidebar .sticky-top .content-sidebar-body');
2+
3+
if (sidebarContent) {
4+
const sidebarContentParent = sidebarContent.parentElement;
5+
const sidebarContentParentPadding = parseInt(getComputedStyle(sidebarContentParent).paddingTop, 10);
6+
const headerHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height'), 10);
7+
8+
document.addEventListener('scroll', function() {
9+
const sidebarTop = sidebarContentParent.getBoundingClientRect().top;
10+
let extraPadding = 0;
11+
12+
if (sidebarTop <= headerHeight) {
13+
extraPadding = headerHeight;
14+
}
15+
16+
sidebarContentParent.style.setProperty('padding-top', extraPadding + sidebarContentParentPadding + 'px', 'important');
17+
});
18+
}

assets/js/helpers/jq-helpers.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function $(selector) {
101101
submit: () => nodes.forEach((node) => node.submit()),
102102
serialize: (json = false) => {
103103
if (nodes.length > 1) {
104-
throw new Error("Can't serialize forms at once");
104+
throw new Error("Can't serialize multiple forms at once");
105105
}
106106

107107
if (json) {
@@ -158,4 +158,8 @@ $.ajax = function ajax({
158158

159159
$.post = (url, data, options) => $.ajax({ method: 'post', url, data, options });
160160

161+
if (window && window.testingMode) {
162+
window.jqHelpers = $
163+
}
164+
161165
export default $;

assets/js/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ $(document)
2525
.on('click', '.dropdown-item', (e) => {
2626
const dropdown = e.target.parentElement;
2727
const button = $(dropdown.parentElement).$('.dropdown-toggle');
28-
button.text(e.target.innerText);
29-
button.attr('data-value', e.target.dataset.value);
28+
if (!button.$nodes[0].classList.contains('nav-link')) {
29+
button.text(e.target.innerText);
30+
button.attr('data-value', e.target.dataset.value);
31+
}
3032
$(dropdown).removeClass('show');
3133
$(dropdown.parentElement).removeClass('show');
3234
})

assets/js/modal.js

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
1-
import $ from "./helpers/jq-helpers";
2-
import ModalTemplate from "./templates/modal";
1+
import $ from './helpers/jq-helpers';
2+
import ModalTemplate from './templates/modal';
33

4-
$("body").append(ModalTemplate);
4+
$('body').append(ModalTemplate);
5+
6+
const setImage = (image, element) => {
7+
if (image) {
8+
element.removeClass('hidden');
9+
element[0].src = image;
10+
} else {
11+
element.addClass('hidden');
12+
}
13+
};
514

615
setTimeout(() => {
7-
const modal = $(".modal");
8-
const dialog = $(".modal .modal-dialog");
16+
const modal = $('.modal');
17+
const dialog = $('.modal .modal-dialog');
918

1019
function closeDialog() {
11-
$("body").removeClass("modal-open");
12-
modal.removeClass("show");
20+
$('body').removeClass('modal-open');
21+
modal.removeClass('show');
1322
}
1423

15-
$('[data-dismiss="modal"]').on("click", closeDialog);
24+
$('[data-dismiss="modal"]').on('click', closeDialog);
1625

17-
modal.on("click", e => {
26+
modal.on('click', (e) => {
1827
if (!dialog[0].contains(e.target)) {
1928
closeDialog();
2029
}
@@ -23,46 +32,49 @@ setTimeout(() => {
2332
(window.syna || (window.syna = {})).showModal = function({
2433
title,
2534
subtitle,
35+
background,
2636
image,
2737
icon,
2838
content,
2939
labels,
30-
size = ""
40+
size = '',
3141
}) {
32-
$("body").addClass("modal-open");
33-
modal.addClass("show");
34-
dialog.$(".title").html(title || "");
35-
dialog.$(".subtitle").html(subtitle || "");
36-
if (image) {
37-
dialog.$("img").removeClass("hidden");
38-
dialog.$("img")[0].src = image;
39-
} else {
40-
dialog.$("img").addClass("hidden");
42+
$('body').addClass('modal-open');
43+
modal.addClass('show');
44+
dialog.$('.title').html(title || '');
45+
dialog.$('.subtitle').html(subtitle || '');
46+
47+
setImage(image, dialog.$('.modal-asset-image'));
48+
setImage(background, dialog.$('.modal-background-image'));
49+
50+
if (!background) {
51+
dialog.$('.modal-asset-image').addClass('hidden');
52+
setImage(image, dialog.$('.modal-background-image'));
4153
}
4254

4355
if (labels) {
44-
dialog.$(".badge-container").removeClass("hidden");
45-
dialog.$(".badge-container").html(labels || "");
56+
dialog.$('.badge-container').removeClass('hidden');
57+
dialog.$('.badge-container').html(labels || '');
4658
} else {
47-
dialog.$(".badge-container").addClass("hidden");
59+
dialog.$('.badge-container').addClass('hidden');
4860
}
4961

5062
if (icon) {
51-
dialog.$(".icon-container").removeClass("hidden");
52-
dialog.$(".icon-container").html(icon.replace(/fa-inverse/g, ""));
63+
dialog.$('.icon-container').removeClass('hidden');
64+
dialog.$('.icon-container').html(icon.replace(/fa-inverse/g, ''));
5365
} else {
54-
dialog.$(".icon-container").addClass("hidden");
66+
dialog.$('.icon-container').addClass('hidden');
5567
}
5668

5769
if (content) {
58-
dialog.$(".modal-body .content").html(content);
59-
dialog.$(".modal-body .content").removeClass("hidden");
70+
dialog.$('.modal-body .content').html(content);
71+
dialog.$('.modal-body .content').removeClass('hidden');
6072
} else {
61-
dialog.$(".modal-body .content").addClass("hidden");
73+
dialog.$('.modal-body .content').addClass('hidden');
6274
}
6375
dialog
64-
.removeClass("md")
65-
.removeClass("lg")
76+
.removeClass('md')
77+
.removeClass('lg')
6678
.addClass(size);
6779
};
6880
}, 0);

assets/js/portfolio.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ portfolioItem.on("click", function() {
88
title: (this.querySelector(".title") || _default).innerHTML,
99
subtitle: (this.querySelector(".subtitle") || _default).innerHTML,
1010
content: (this.querySelector(".content") || _default).innerHTML,
11+
background: (this.querySelector(".portfolio-background") || _default).src,
1112
image: (this.querySelector(".portfolio-image") || _default).src,
1213
icon: (this.querySelector(".portfolio-icon") || _default).innerHTML,
1314
labels: (this.querySelector(".badge-container") || _default).innerHTML,

0 commit comments

Comments
 (0)