first commit
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="23" height="24" fill="none" xmlns:v="https://vecta.io/nano"><path d="M11.5.45a11.26 11.26 0 0 0-5.796 1.564 11.64 11.64 0 0 0-4.14 4.14A11.26 11.26 0 0 0 0 11.95a11.26 11.26 0 0 0 1.564 5.796 11.64 11.64 0 0 0 4.14 4.14c1.779 1.043 3.711 1.564 5.796 1.564s4.017-.521 5.796-1.564a11.64 11.64 0 0 0 4.14-4.14C22.479 15.967 23 14.035 23 11.95s-.521-4.017-1.564-5.796a11.64 11.64 0 0 0-4.14-4.14A11.26 11.26 0 0 0 11.5.45zM8.625 16.734H6.716V7.166h1.909v9.568zm7.659 0h-5.75v-1.909h5.75v1.909zm0-3.818h-5.75v-1.932h5.75v1.932zm0-3.841h-5.75V7.166h5.75v1.909z" fill="#93003f"/></svg>
|
||||
|
After Width: | Height: | Size: 625 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'wp-api', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => '8cbb1cf5cd11d04d2b7a');
|
||||
@@ -0,0 +1 @@
|
||||
#hello-elementor-settings .components-placeholder{background:#f1f1f1}#hello-elementor-settings .hello_elementor__header{background-color:#fff;box-shadow:0 1px 0 hsla(0,0%,84%,.5),0 1px 2px #eee;margin-inline-start:-2em;padding:20px 10px}#hello-elementor-settings .hello_elementor__header .hello_elementor__container{margin:0 auto;max-width:750px}#hello-elementor-settings .hello_elementor__header .hello_elementor__container .hello_elementor__title{align-items:center;display:flex;justify-content:center}#hello-elementor-settings .hello_elementor__header .hello_elementor__container .hello_elementor__title .dashicon{color:#757575}#hello-elementor-settings .hello_elementor__main{margin-inline-end:auto;margin-inline-start:auto;max-width:750px}#hello-elementor-settings .hello_elementor__main .components-panel{background:none;border:none}#hello-elementor-settings .hello_elementor__main .components-panel__body{background:#fff;border:1px solid #e2e4e7;margin:1rem 0}#hello-elementor-settings .hello_elementor__main .components-notice{margin:0;margin-block-end:20px}#hello-elementor-settings .hello_elementor__main .components-notice .dashicon{color:#f0b849;padding-inline-end:10px}#hello-elementor-settings .hello_elementor__main .components-notice button{display:none}#hello-elementor-settings .hello_elementor__main .code-example{border-radius:4px;display:inline-block;font-size:10px;margin-block-end:.25rem}#hello-elementor-settings .hello_elementor__main .code-example+:not(.code-example){margin-block-start:1.25rem}#hello-elementor-settings .components-base-control__help{margin-block-start:.5rem}#hello-elementor-settings .hello_elementor__notices .components-snackbar{bottom:.5rem;position:fixed}#hello-elementor-settings .hello_elementor__action_links{margin-block-end:20px;margin-block-start:50px;text-align:center}#hello-elementor-settings .hello_elementor__action_links__title{font-weight:700}#hello-elementor-settings .hello_elementor__action_links__message{font-weight:400}
|
||||
428
wp-content/themes/hello-elementor/assets/js/hello-admin.js
Normal file
@@ -0,0 +1,428 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 222:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.ActionLinks = void 0;
|
||||
const ActionLinks = ({
|
||||
image,
|
||||
alt,
|
||||
title,
|
||||
message,
|
||||
button,
|
||||
link
|
||||
}) => {
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__action_links"
|
||||
}, /*#__PURE__*/React.createElement("img", {
|
||||
src: image,
|
||||
alt: alt
|
||||
}), /*#__PURE__*/React.createElement("p", {
|
||||
className: "hello_elementor__action_links__title"
|
||||
}, title), /*#__PURE__*/React.createElement("p", {
|
||||
className: "hello_elementor__action_links__message"
|
||||
}, message), /*#__PURE__*/React.createElement("a", {
|
||||
className: "components-button is-secondary",
|
||||
href: link,
|
||||
target: "_blank",
|
||||
rel: "noreferrer"
|
||||
}, button));
|
||||
};
|
||||
exports.ActionLinks = ActionLinks;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(836);
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.SettingsPage = void 0;
|
||||
var _react = __webpack_require__(196);
|
||||
var _notices = __webpack_require__(961);
|
||||
var _data = __webpack_require__(818);
|
||||
var _i18n = __webpack_require__(736);
|
||||
var _api = _interopRequireDefault(__webpack_require__(101));
|
||||
var _components = __webpack_require__(609);
|
||||
var _settingsPanel = __webpack_require__(230);
|
||||
var _actionLinksPanel = __webpack_require__(995);
|
||||
const Notices = () => {
|
||||
const notices = (0, _data.useSelect)(select => select(_notices.store).getNotices().filter(notice => 'snackbar' === notice.type), []);
|
||||
const {
|
||||
removeNotice
|
||||
} = (0, _data.useDispatch)(_notices.store);
|
||||
return /*#__PURE__*/React.createElement(_components.SnackbarList, {
|
||||
className: "edit-site-notices",
|
||||
notices: notices,
|
||||
onRemove: removeNotice
|
||||
});
|
||||
};
|
||||
const SETTINGS = {
|
||||
DESCRIPTION_META_TAG: '_description_meta_tag',
|
||||
SKIP_LINK: '_skip_link',
|
||||
HEADER_FOOTER: '_header_footer',
|
||||
PAGE_TITLE: '_page_title',
|
||||
HELLO_STYLE: '_hello_style',
|
||||
HELLO_THEME: '_hello_theme'
|
||||
};
|
||||
const SettingsPage = () => {
|
||||
const [hasLoaded, setHasLoaded] = (0, _react.useState)(false);
|
||||
const [settingsData, setSettingsData] = (0, _react.useState)({});
|
||||
const settingsPrefix = 'hello_elementor_settings';
|
||||
|
||||
/**
|
||||
* Update settings data.
|
||||
*
|
||||
* @param {string} settingsName
|
||||
* @param {string} settingsValue
|
||||
*/
|
||||
const updateSettings = (settingsName, settingsValue) => {
|
||||
setSettingsData({
|
||||
...settingsData,
|
||||
[settingsName]: settingsValue
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Save settings to server.
|
||||
*/
|
||||
const saveSettings = () => {
|
||||
const data = {};
|
||||
Object.values(SETTINGS).forEach(value => data[`${settingsPrefix}${value}`] = settingsData[value] ? 'true' : '');
|
||||
const settings = new _api.default.models.Settings(data);
|
||||
settings.save();
|
||||
(0, _data.dispatch)('core/notices').createNotice('success', (0, _i18n.__)('Settings Saved', 'hello-elementor'), {
|
||||
type: 'snackbar',
|
||||
isDismissible: true
|
||||
});
|
||||
};
|
||||
(0, _react.useEffect)(() => {
|
||||
const fetchSettings = async () => {
|
||||
try {
|
||||
await _api.default.loadPromise;
|
||||
const settings = new _api.default.models.Settings();
|
||||
const response = await settings.fetch();
|
||||
const data = {};
|
||||
Object.values(SETTINGS).forEach(value => data[value] = response[`${settingsPrefix}${value}`]);
|
||||
setSettingsData(data);
|
||||
setHasLoaded(true);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
if (hasLoaded) {
|
||||
return;
|
||||
}
|
||||
fetchSettings();
|
||||
}, [settingsData]);
|
||||
if (!hasLoaded) {
|
||||
return /*#__PURE__*/React.createElement(_components.Placeholder, null, /*#__PURE__*/React.createElement(_components.Spinner, null));
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__header"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__container"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__title"
|
||||
}, /*#__PURE__*/React.createElement("h1", null, (0, _i18n.__)('Hello Theme Settings', 'hello-elementor'))))), /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__main"
|
||||
}, /*#__PURE__*/React.createElement(_components.Panel, null, /*#__PURE__*/React.createElement(_settingsPanel.SettingsPanel, {
|
||||
SETTINGS,
|
||||
settingsData,
|
||||
updateSettings
|
||||
}), /*#__PURE__*/React.createElement(_components.Button, {
|
||||
isPrimary: true,
|
||||
onClick: saveSettings
|
||||
}, (0, _i18n.__)('Save Settings', 'hello-elementor'))), /*#__PURE__*/React.createElement(_actionLinksPanel.ActionLinksPanel, null)), /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__notices"
|
||||
}, /*#__PURE__*/React.createElement(Notices, null)));
|
||||
};
|
||||
exports.SettingsPage = SettingsPage;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 995:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.ActionLinksPanel = void 0;
|
||||
var _i18n = __webpack_require__(736);
|
||||
var _actionLinks = __webpack_require__(222);
|
||||
const actionLinks = {
|
||||
'install-elementor': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Install Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Create cross-site header & footer using Elementor.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Install Elementor', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'activate-elementor': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Activate Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Create cross-site header & footer using Elementor.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Activate Elementor', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'activate-header-footer-experiment': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Style using Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Design your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Activate header & footer experiment', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'style-header-footer': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Style cross-site header & footer', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Customize your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Start Designing', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
}
|
||||
};
|
||||
const ActionLinksPanel = () => {
|
||||
if (!helloAdminData.actionLinkType) {
|
||||
return;
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(_actionLinks.ActionLinks, actionLinks[helloAdminData.actionLinkType]);
|
||||
};
|
||||
exports.ActionLinksPanel = ActionLinksPanel;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 230:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.SettingsPanel = void 0;
|
||||
var _i18n = __webpack_require__(736);
|
||||
var _components = __webpack_require__(609);
|
||||
const SettingsPanel = ({
|
||||
SETTINGS,
|
||||
settingsData,
|
||||
updateSettings
|
||||
}) => {
|
||||
const protocol = window.location.protocol || 'https:';
|
||||
const hostname = window.location.hostname || 'example.com';
|
||||
const prefix = protocol + '//' + hostname;
|
||||
return /*#__PURE__*/React.createElement(_components.PanelBody, {
|
||||
title: (0, _i18n.__)('Hello Theme Settings', 'hello-elementor')
|
||||
}, /*#__PURE__*/React.createElement(_components.Notice, {
|
||||
status: "warning",
|
||||
isDismissible: "false"
|
||||
}, /*#__PURE__*/React.createElement(_components.Dashicon, {
|
||||
icon: "flag"
|
||||
}), (0, _i18n.__)('Be cautious, disabling some of the following options may break your website.', 'hello-elementor')), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable description meta tag', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the description meta tag in singular content pages that contain an excerpt.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.DESCRIPTION_META_TAG] || false,
|
||||
onChange: value => updateSettings(SETTINGS.DESCRIPTION_META_TAG, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <meta name=\"description\" content=\"...\" /> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable skip link', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the "Skip to content" link used by screen-readers and users navigating with a keyboard.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.SKIP_LINK] || false,
|
||||
onChange: value => updateSettings(SETTINGS.SKIP_LINK, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <a class=\"skip-link screen-reader-text\" href=\"#content\"> Skip to content </a> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable cross-site header & footer', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the header & footer sections from all pages, and their CSS/JS files.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HEADER_FOOTER] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HEADER_FOOTER, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <header id=\"site-header\" class=\"site-header\"> ... </header> "), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <footer id=\"site-footer\" class=\"site-footer\"> ... </footer> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable page title', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the section above the content that contains the main heading of the page.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.PAGE_TITLE] || false,
|
||||
onChange: value => updateSettings(SETTINGS.PAGE_TITLE, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <header class=\"page-header\"> <h1 class=\"entry-title\"> Post title </h1> </header> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Unregister Hello style.css', 'hello-elementor'),
|
||||
help: (0, _i18n.__)("Disable Hello theme's style.css file which contains CSS reset rules for unified cross-browser view.", 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HELLO_STYLE] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HELLO_STYLE, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <link rel=\"stylesheet\" href=\"", prefix, "/wp-content/themes/hello-elementor/style.min.css\" /> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Unregister Hello theme.css', 'hello-elementor'),
|
||||
help: (0, _i18n.__)("Disable Hello theme's theme.css file which contains CSS rules that style WordPress elements.", 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HELLO_THEME] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HELLO_THEME, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <link rel=\"stylesheet\" href=\"", prefix, "/wp-content/themes/hello-elementor/theme.min.css\" /> "));
|
||||
};
|
||||
exports.SettingsPanel = SettingsPanel;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 100:
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 196:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["React"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 101:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["api"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 609:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 818:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["data"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 307:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["element"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 736:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 961:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["notices"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 836:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
"default": obj
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
|
||||
__webpack_require__(100);
|
||||
var _element = __webpack_require__(307);
|
||||
var _settingsPage = __webpack_require__(3);
|
||||
const App = () => {
|
||||
return /*#__PURE__*/React.createElement(_settingsPage.SettingsPage, null);
|
||||
};
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const rootElement = document.getElementById('hello-elementor-settings');
|
||||
if (rootElement) {
|
||||
(0, _element.render)( /*#__PURE__*/React.createElement(App, null), rootElement);
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
1
wp-content/themes/hello-elementor/assets/js/hello-admin.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
#hello-elementor-settings .components-placeholder{background:#f1f1f1}#hello-elementor-settings .hello_elementor__header{background-color:#fff;box-shadow:0 1px 0 hsla(0,0%,84%,.5),0 1px 2px #eee;margin-inline-start:-2em;padding:20px 10px}#hello-elementor-settings .hello_elementor__header .hello_elementor__container{margin:0 auto;max-width:750px}#hello-elementor-settings .hello_elementor__header .hello_elementor__container .hello_elementor__title{align-items:center;display:flex;justify-content:center}#hello-elementor-settings .hello_elementor__header .hello_elementor__container .hello_elementor__title .dashicon{color:#757575}#hello-elementor-settings .hello_elementor__main{margin-inline-end:auto;margin-inline-start:auto;max-width:750px}#hello-elementor-settings .hello_elementor__main .components-panel{background:none;border:none}#hello-elementor-settings .hello_elementor__main .components-panel__body{background:#fff;border:1px solid #e2e4e7;margin:1rem 0}#hello-elementor-settings .hello_elementor__main .components-notice{margin:0;margin-block-end:20px}#hello-elementor-settings .hello_elementor__main .components-notice .dashicon{color:#f0b849;padding-inline-end:10px}#hello-elementor-settings .hello_elementor__main .components-notice button{display:none}#hello-elementor-settings .hello_elementor__main .code-example{border-radius:4px;display:inline-block;font-size:10px;margin-block-end:.25rem}#hello-elementor-settings .hello_elementor__main .code-example+:not(.code-example){margin-block-start:1.25rem}#hello-elementor-settings .components-base-control__help{margin-block-start:.5rem}#hello-elementor-settings .hello_elementor__notices .components-snackbar{bottom:.5rem;position:fixed}#hello-elementor-settings .hello_elementor__action_links{margin-block-end:20px;margin-block-start:50px;text-align:center}#hello-elementor-settings .hello_elementor__action_links__title{font-weight:700}#hello-elementor-settings .hello_elementor__action_links__message{font-weight:400}
|
||||
428
wp-content/themes/hello-elementor/assets/js/hello-admin.min.js
vendored
Normal file
@@ -0,0 +1,428 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 222:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.ActionLinks = void 0;
|
||||
const ActionLinks = ({
|
||||
image,
|
||||
alt,
|
||||
title,
|
||||
message,
|
||||
button,
|
||||
link
|
||||
}) => {
|
||||
return /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__action_links"
|
||||
}, /*#__PURE__*/React.createElement("img", {
|
||||
src: image,
|
||||
alt: alt
|
||||
}), /*#__PURE__*/React.createElement("p", {
|
||||
className: "hello_elementor__action_links__title"
|
||||
}, title), /*#__PURE__*/React.createElement("p", {
|
||||
className: "hello_elementor__action_links__message"
|
||||
}, message), /*#__PURE__*/React.createElement("a", {
|
||||
className: "components-button is-secondary",
|
||||
href: link,
|
||||
target: "_blank",
|
||||
rel: "noreferrer"
|
||||
}, button));
|
||||
};
|
||||
exports.ActionLinks = ActionLinks;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(836);
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.SettingsPage = void 0;
|
||||
var _react = __webpack_require__(196);
|
||||
var _notices = __webpack_require__(961);
|
||||
var _data = __webpack_require__(818);
|
||||
var _i18n = __webpack_require__(736);
|
||||
var _api = _interopRequireDefault(__webpack_require__(101));
|
||||
var _components = __webpack_require__(609);
|
||||
var _settingsPanel = __webpack_require__(230);
|
||||
var _actionLinksPanel = __webpack_require__(995);
|
||||
const Notices = () => {
|
||||
const notices = (0, _data.useSelect)(select => select(_notices.store).getNotices().filter(notice => 'snackbar' === notice.type), []);
|
||||
const {
|
||||
removeNotice
|
||||
} = (0, _data.useDispatch)(_notices.store);
|
||||
return /*#__PURE__*/React.createElement(_components.SnackbarList, {
|
||||
className: "edit-site-notices",
|
||||
notices: notices,
|
||||
onRemove: removeNotice
|
||||
});
|
||||
};
|
||||
const SETTINGS = {
|
||||
DESCRIPTION_META_TAG: '_description_meta_tag',
|
||||
SKIP_LINK: '_skip_link',
|
||||
HEADER_FOOTER: '_header_footer',
|
||||
PAGE_TITLE: '_page_title',
|
||||
HELLO_STYLE: '_hello_style',
|
||||
HELLO_THEME: '_hello_theme'
|
||||
};
|
||||
const SettingsPage = () => {
|
||||
const [hasLoaded, setHasLoaded] = (0, _react.useState)(false);
|
||||
const [settingsData, setSettingsData] = (0, _react.useState)({});
|
||||
const settingsPrefix = 'hello_elementor_settings';
|
||||
|
||||
/**
|
||||
* Update settings data.
|
||||
*
|
||||
* @param {string} settingsName
|
||||
* @param {string} settingsValue
|
||||
*/
|
||||
const updateSettings = (settingsName, settingsValue) => {
|
||||
setSettingsData({
|
||||
...settingsData,
|
||||
[settingsName]: settingsValue
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Save settings to server.
|
||||
*/
|
||||
const saveSettings = () => {
|
||||
const data = {};
|
||||
Object.values(SETTINGS).forEach(value => data[`${settingsPrefix}${value}`] = settingsData[value] ? 'true' : '');
|
||||
const settings = new _api.default.models.Settings(data);
|
||||
settings.save();
|
||||
(0, _data.dispatch)('core/notices').createNotice('success', (0, _i18n.__)('Settings Saved', 'hello-elementor'), {
|
||||
type: 'snackbar',
|
||||
isDismissible: true
|
||||
});
|
||||
};
|
||||
(0, _react.useEffect)(() => {
|
||||
const fetchSettings = async () => {
|
||||
try {
|
||||
await _api.default.loadPromise;
|
||||
const settings = new _api.default.models.Settings();
|
||||
const response = await settings.fetch();
|
||||
const data = {};
|
||||
Object.values(SETTINGS).forEach(value => data[value] = response[`${settingsPrefix}${value}`]);
|
||||
setSettingsData(data);
|
||||
setHasLoaded(true);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
if (hasLoaded) {
|
||||
return;
|
||||
}
|
||||
fetchSettings();
|
||||
}, [settingsData]);
|
||||
if (!hasLoaded) {
|
||||
return /*#__PURE__*/React.createElement(_components.Placeholder, null, /*#__PURE__*/React.createElement(_components.Spinner, null));
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__header"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__container"
|
||||
}, /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__title"
|
||||
}, /*#__PURE__*/React.createElement("h1", null, (0, _i18n.__)('Hello Theme Settings', 'hello-elementor'))))), /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__main"
|
||||
}, /*#__PURE__*/React.createElement(_components.Panel, null, /*#__PURE__*/React.createElement(_settingsPanel.SettingsPanel, {
|
||||
SETTINGS,
|
||||
settingsData,
|
||||
updateSettings
|
||||
}), /*#__PURE__*/React.createElement(_components.Button, {
|
||||
isPrimary: true,
|
||||
onClick: saveSettings
|
||||
}, (0, _i18n.__)('Save Settings', 'hello-elementor'))), /*#__PURE__*/React.createElement(_actionLinksPanel.ActionLinksPanel, null)), /*#__PURE__*/React.createElement("div", {
|
||||
className: "hello_elementor__notices"
|
||||
}, /*#__PURE__*/React.createElement(Notices, null)));
|
||||
};
|
||||
exports.SettingsPage = SettingsPage;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 995:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.ActionLinksPanel = void 0;
|
||||
var _i18n = __webpack_require__(736);
|
||||
var _actionLinks = __webpack_require__(222);
|
||||
const actionLinks = {
|
||||
'install-elementor': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Install Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Create cross-site header & footer using Elementor.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Install Elementor', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'activate-elementor': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Activate Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Create cross-site header & footer using Elementor.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Activate Elementor', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'activate-header-footer-experiment': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Style using Elementor', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Design your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Activate header & footer experiment', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
},
|
||||
'style-header-footer': {
|
||||
image: helloAdminData.templateDirectoryURI + '/assets/images/elementor.svg',
|
||||
alt: (0, _i18n.__)('Elementor', 'hello-elementor'),
|
||||
title: (0, _i18n.__)('Style cross-site header & footer', 'hello-elementor'),
|
||||
message: (0, _i18n.__)('Customize your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor'),
|
||||
button: (0, _i18n.__)('Start Designing', 'hello-elementor'),
|
||||
link: helloAdminData.actionLinkURL
|
||||
}
|
||||
};
|
||||
const ActionLinksPanel = () => {
|
||||
if (!helloAdminData.actionLinkType) {
|
||||
return;
|
||||
}
|
||||
return /*#__PURE__*/React.createElement(_actionLinks.ActionLinks, actionLinks[helloAdminData.actionLinkType]);
|
||||
};
|
||||
exports.ActionLinksPanel = ActionLinksPanel;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 230:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports.SettingsPanel = void 0;
|
||||
var _i18n = __webpack_require__(736);
|
||||
var _components = __webpack_require__(609);
|
||||
const SettingsPanel = ({
|
||||
SETTINGS,
|
||||
settingsData,
|
||||
updateSettings
|
||||
}) => {
|
||||
const protocol = window.location.protocol || 'https:';
|
||||
const hostname = window.location.hostname || 'example.com';
|
||||
const prefix = protocol + '//' + hostname;
|
||||
return /*#__PURE__*/React.createElement(_components.PanelBody, {
|
||||
title: (0, _i18n.__)('Hello Theme Settings', 'hello-elementor')
|
||||
}, /*#__PURE__*/React.createElement(_components.Notice, {
|
||||
status: "warning",
|
||||
isDismissible: "false"
|
||||
}, /*#__PURE__*/React.createElement(_components.Dashicon, {
|
||||
icon: "flag"
|
||||
}), (0, _i18n.__)('Be cautious, disabling some of the following options may break your website.', 'hello-elementor')), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable description meta tag', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the description meta tag in singular content pages that contain an excerpt.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.DESCRIPTION_META_TAG] || false,
|
||||
onChange: value => updateSettings(SETTINGS.DESCRIPTION_META_TAG, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <meta name=\"description\" content=\"...\" /> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable skip link', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the "Skip to content" link used by screen-readers and users navigating with a keyboard.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.SKIP_LINK] || false,
|
||||
onChange: value => updateSettings(SETTINGS.SKIP_LINK, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <a class=\"skip-link screen-reader-text\" href=\"#content\"> Skip to content </a> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable cross-site header & footer', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the header & footer sections from all pages, and their CSS/JS files.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HEADER_FOOTER] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HEADER_FOOTER, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <header id=\"site-header\" class=\"site-header\"> ... </header> "), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <footer id=\"site-footer\" class=\"site-footer\"> ... </footer> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Disable page title', 'hello-elementor'),
|
||||
help: (0, _i18n.__)('Remove the section above the content that contains the main heading of the page.', 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.PAGE_TITLE] || false,
|
||||
onChange: value => updateSettings(SETTINGS.PAGE_TITLE, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <header class=\"page-header\"> <h1 class=\"entry-title\"> Post title </h1> </header> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Unregister Hello style.css', 'hello-elementor'),
|
||||
help: (0, _i18n.__)("Disable Hello theme's style.css file which contains CSS reset rules for unified cross-browser view.", 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HELLO_STYLE] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HELLO_STYLE, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <link rel=\"stylesheet\" href=\"", prefix, "/wp-content/themes/hello-elementor/style.min.css\" /> "), /*#__PURE__*/React.createElement(_components.ToggleControl, {
|
||||
label: (0, _i18n.__)('Unregister Hello theme.css', 'hello-elementor'),
|
||||
help: (0, _i18n.__)("Disable Hello theme's theme.css file which contains CSS rules that style WordPress elements.", 'hello-elementor'),
|
||||
checked: !!settingsData[SETTINGS.HELLO_THEME] || false,
|
||||
onChange: value => updateSettings(SETTINGS.HELLO_THEME, value)
|
||||
}), /*#__PURE__*/React.createElement("code", {
|
||||
className: "code-example"
|
||||
}, " <link rel=\"stylesheet\" href=\"", prefix, "/wp-content/themes/hello-elementor/theme.min.css\" /> "));
|
||||
};
|
||||
exports.SettingsPanel = SettingsPanel;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 100:
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 196:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["React"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 101:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["api"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 609:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["components"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 818:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["data"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 307:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["element"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 736:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["i18n"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 961:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = window["wp"]["notices"];
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 836:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
"default": obj
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
|
||||
__webpack_require__(100);
|
||||
var _element = __webpack_require__(307);
|
||||
var _settingsPage = __webpack_require__(3);
|
||||
const App = () => {
|
||||
return /*#__PURE__*/React.createElement(_settingsPage.SettingsPage, null);
|
||||
};
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const rootElement = document.getElementById('hello-elementor-settings');
|
||||
if (rootElement) {
|
||||
(0, _element.render)( /*#__PURE__*/React.createElement(App, null), rootElement);
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'e467b0db4be3ce9829ae');
|
||||
395
wp-content/themes/hello-elementor/assets/js/hello-editor.js
Normal file
@@ -0,0 +1,395 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 440:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(836);
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports["default"] = void 0;
|
||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(416));
|
||||
var _controlsHook = _interopRequireDefault(__webpack_require__(841));
|
||||
class _default extends $e.modules.ComponentBase {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
(0, _defineProperty2.default)(this, "pages", {});
|
||||
}
|
||||
getNamespace() {
|
||||
return 'hello-elementor';
|
||||
}
|
||||
defaultHooks() {
|
||||
return this.importHooks({
|
||||
ControlsHook: _controlsHook.default
|
||||
});
|
||||
}
|
||||
}
|
||||
exports["default"] = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 841:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports["default"] = void 0;
|
||||
class ControlsHook extends $e.modules.hookUI.After {
|
||||
getCommand() {
|
||||
// Command to listen.
|
||||
return 'document/elements/settings';
|
||||
}
|
||||
getId() {
|
||||
// Unique id for the hook.
|
||||
return 'hello-elementor-editor-controls-handler';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Hello Elementor Theme Controls
|
||||
*
|
||||
* Returns an object in which the keys are control IDs, and the values are the selectors of the elements that need
|
||||
* to be targeted in the apply() method.
|
||||
*
|
||||
* Example return value:
|
||||
* {
|
||||
* hello_elementor_show_logo: '.site-header .site-header-logo',
|
||||
* hello_elementor_show_menu: '.site-header .site-header-menu',
|
||||
* }
|
||||
*/
|
||||
getHelloThemeControls() {
|
||||
return {
|
||||
hello_header_logo_display: {
|
||||
selector: '.site-header .site-logo, .site-header .site-title',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_logo_display);
|
||||
}
|
||||
},
|
||||
hello_header_menu_display: {
|
||||
selector: '.site-header .site-navigation, .site-header .site-navigation-toggle-holder',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_menu_display);
|
||||
}
|
||||
},
|
||||
hello_header_tagline_display: {
|
||||
selector: '.site-header .site-description',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_tagline_display);
|
||||
}
|
||||
},
|
||||
hello_header_logo_type: {
|
||||
selector: '.site-header .site-branding',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'show-',
|
||||
inputOptions = args.container.controls.hello_header_logo_type.options,
|
||||
inputValue = args.settings.hello_header_logo_type;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_layout: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'header-',
|
||||
inputOptions = args.container.controls.hello_header_layout.options,
|
||||
inputValue = args.settings.hello_header_layout;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_width: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'header-',
|
||||
inputOptions = args.container.controls.hello_header_width.options,
|
||||
inputValue = args.settings.hello_header_width;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_menu_layout: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'menu-layout-',
|
||||
inputOptions = args.container.controls.hello_header_menu_layout.options,
|
||||
inputValue = args.settings.hello_header_menu_layout;
|
||||
|
||||
// No matter what, close the mobile menu
|
||||
$element.find('.site-navigation-toggle-holder').removeClass('elementor-active');
|
||||
$element.find('.site-navigation-dropdown').removeClass('show');
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_menu_dropdown: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'menu-dropdown-',
|
||||
inputOptions = args.container.controls.hello_header_menu_dropdown.options,
|
||||
inputValue = args.settings.hello_header_menu_dropdown;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_display: {
|
||||
selector: '.site-footer .site-logo, .site-footer .site-title',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_logo_display);
|
||||
}
|
||||
},
|
||||
hello_footer_tagline_display: {
|
||||
selector: '.site-footer .site-description',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_tagline_display);
|
||||
}
|
||||
},
|
||||
hello_footer_menu_display: {
|
||||
selector: '.site-footer .site-navigation',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_menu_display);
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_display: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: ($element, args) => {
|
||||
const $footerContainer = $element.closest('#site-footer'),
|
||||
inputValue = args.settings.hello_footer_copyright_display;
|
||||
this.toggleShowHideClass($element, inputValue);
|
||||
$footerContainer.toggleClass('footer-has-copyright', 'yes' === inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_type: {
|
||||
selector: '.site-footer .site-branding',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'show-',
|
||||
inputOptions = args.container.controls.hello_footer_logo_type.options,
|
||||
inputValue = args.settings.hello_footer_logo_type;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_layout: {
|
||||
selector: '.site-footer',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'footer-',
|
||||
inputOptions = args.container.controls.hello_footer_layout.options,
|
||||
inputValue = args.settings.hello_footer_layout;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_width: {
|
||||
selector: '.site-footer',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'footer-',
|
||||
inputOptions = args.container.controls.hello_footer_width.options,
|
||||
inputValue = args.settings.hello_footer_width;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_text: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: ($element, args) => {
|
||||
const inputValue = args.settings.hello_footer_copyright_text;
|
||||
$element.find('p').text(inputValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle show and hide classes on containers
|
||||
*
|
||||
* This will remove the .show and .hide clases from the element, then apply the new class
|
||||
*
|
||||
* @param {jQuery} element
|
||||
* @param {string} inputValue
|
||||
*/
|
||||
toggleShowHideClass(element, inputValue) {
|
||||
element.removeClass('hide').removeClass('show').addClass(inputValue ? 'show' : 'hide');
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle layout classes on containers
|
||||
*
|
||||
* This will cleanly set classes onto which ever container we want to target, removing the old classes and adding the new one
|
||||
*
|
||||
* @param {jQuery} element
|
||||
* @param {string} classPrefix
|
||||
* @param {Object} inputOptions
|
||||
* @param {string} inputValue
|
||||
*
|
||||
*/
|
||||
toggleLayoutClass(element, classPrefix, inputOptions, inputValue) {
|
||||
// Loop through the possible classes and remove the one that's not in use
|
||||
Object.entries(inputOptions).forEach(([key]) => {
|
||||
element.removeClass(classPrefix + key);
|
||||
});
|
||||
|
||||
// Append the class which we want to use onto the element
|
||||
if ('' !== inputValue) {
|
||||
element.addClass(classPrefix + inputValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the conditions under which the hook will run.
|
||||
*
|
||||
* @param {Object} args
|
||||
*/
|
||||
getConditions(args) {
|
||||
const isKit = 'kit' === elementor.documents.getCurrent().config.type,
|
||||
changedControls = Object.keys(args.settings),
|
||||
isSingleSetting = 1 === changedControls.length;
|
||||
|
||||
// If the document is not a kit, or there are no changed settings, or there is more than one single changed
|
||||
// setting, don't run the hook.
|
||||
if (!isKit || !args.settings || !isSingleSetting) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the changed control is in the list of theme controls, return true to run the hook.
|
||||
// Otherwise, return false so the hook doesn't run.
|
||||
return !!Object.keys(this.getHelloThemeControls()).includes(changedControls[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The hook logic.
|
||||
*
|
||||
* @param {Object} args
|
||||
*/
|
||||
apply(args) {
|
||||
const allThemeControls = this.getHelloThemeControls(),
|
||||
// Extract the control ID from the passed args
|
||||
controlId = Object.keys(args.settings)[0],
|
||||
controlConfig = allThemeControls[controlId],
|
||||
// Find the element that needs to be targeted by the control.
|
||||
$element = elementor.$previewContents.find(controlConfig.selector);
|
||||
controlConfig.callback($element, args);
|
||||
}
|
||||
}
|
||||
exports["default"] = ControlsHook;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 416:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var toPropertyKey = __webpack_require__(62);
|
||||
function _defineProperty(obj, key, value) {
|
||||
key = toPropertyKey(key);
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 836:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
"default": obj
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 36:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = (__webpack_require__(698)["default"]);
|
||||
function _toPrimitive(input, hint) {
|
||||
if (_typeof(input) !== "object" || input === null) return input;
|
||||
var prim = input[Symbol.toPrimitive];
|
||||
if (prim !== undefined) {
|
||||
var res = prim.call(input, hint || "default");
|
||||
if (_typeof(res) !== "object") return res;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
return (hint === "string" ? String : Number)(input);
|
||||
}
|
||||
module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 62:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = (__webpack_require__(698)["default"]);
|
||||
var toPrimitive = __webpack_require__(36);
|
||||
function _toPropertyKey(arg) {
|
||||
var key = toPrimitive(arg, "string");
|
||||
return _typeof(key) === "symbol" ? key : String(key);
|
||||
}
|
||||
module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 698:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _typeof(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
|
||||
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
||||
}
|
||||
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(836);
|
||||
var _component = _interopRequireDefault(__webpack_require__(440));
|
||||
$e.components.register(new _component.default());
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
395
wp-content/themes/hello-elementor/assets/js/hello-editor.min.js
vendored
Normal file
@@ -0,0 +1,395 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ 440:
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(836);
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports["default"] = void 0;
|
||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(416));
|
||||
var _controlsHook = _interopRequireDefault(__webpack_require__(841));
|
||||
class _default extends $e.modules.ComponentBase {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
(0, _defineProperty2.default)(this, "pages", {});
|
||||
}
|
||||
getNamespace() {
|
||||
return 'hello-elementor';
|
||||
}
|
||||
defaultHooks() {
|
||||
return this.importHooks({
|
||||
ControlsHook: _controlsHook.default
|
||||
});
|
||||
}
|
||||
}
|
||||
exports["default"] = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 841:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({
|
||||
value: true
|
||||
}));
|
||||
exports["default"] = void 0;
|
||||
class ControlsHook extends $e.modules.hookUI.After {
|
||||
getCommand() {
|
||||
// Command to listen.
|
||||
return 'document/elements/settings';
|
||||
}
|
||||
getId() {
|
||||
// Unique id for the hook.
|
||||
return 'hello-elementor-editor-controls-handler';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Hello Elementor Theme Controls
|
||||
*
|
||||
* Returns an object in which the keys are control IDs, and the values are the selectors of the elements that need
|
||||
* to be targeted in the apply() method.
|
||||
*
|
||||
* Example return value:
|
||||
* {
|
||||
* hello_elementor_show_logo: '.site-header .site-header-logo',
|
||||
* hello_elementor_show_menu: '.site-header .site-header-menu',
|
||||
* }
|
||||
*/
|
||||
getHelloThemeControls() {
|
||||
return {
|
||||
hello_header_logo_display: {
|
||||
selector: '.site-header .site-logo, .site-header .site-title',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_logo_display);
|
||||
}
|
||||
},
|
||||
hello_header_menu_display: {
|
||||
selector: '.site-header .site-navigation, .site-header .site-navigation-toggle-holder',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_menu_display);
|
||||
}
|
||||
},
|
||||
hello_header_tagline_display: {
|
||||
selector: '.site-header .site-description',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_header_tagline_display);
|
||||
}
|
||||
},
|
||||
hello_header_logo_type: {
|
||||
selector: '.site-header .site-branding',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'show-',
|
||||
inputOptions = args.container.controls.hello_header_logo_type.options,
|
||||
inputValue = args.settings.hello_header_logo_type;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_layout: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'header-',
|
||||
inputOptions = args.container.controls.hello_header_layout.options,
|
||||
inputValue = args.settings.hello_header_layout;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_width: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'header-',
|
||||
inputOptions = args.container.controls.hello_header_width.options,
|
||||
inputValue = args.settings.hello_header_width;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_menu_layout: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'menu-layout-',
|
||||
inputOptions = args.container.controls.hello_header_menu_layout.options,
|
||||
inputValue = args.settings.hello_header_menu_layout;
|
||||
|
||||
// No matter what, close the mobile menu
|
||||
$element.find('.site-navigation-toggle-holder').removeClass('elementor-active');
|
||||
$element.find('.site-navigation-dropdown').removeClass('show');
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_header_menu_dropdown: {
|
||||
selector: '.site-header',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'menu-dropdown-',
|
||||
inputOptions = args.container.controls.hello_header_menu_dropdown.options,
|
||||
inputValue = args.settings.hello_header_menu_dropdown;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_display: {
|
||||
selector: '.site-footer .site-logo, .site-footer .site-title',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_logo_display);
|
||||
}
|
||||
},
|
||||
hello_footer_tagline_display: {
|
||||
selector: '.site-footer .site-description',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_tagline_display);
|
||||
}
|
||||
},
|
||||
hello_footer_menu_display: {
|
||||
selector: '.site-footer .site-navigation',
|
||||
callback: ($element, args) => {
|
||||
this.toggleShowHideClass($element, args.settings.hello_footer_menu_display);
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_display: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: ($element, args) => {
|
||||
const $footerContainer = $element.closest('#site-footer'),
|
||||
inputValue = args.settings.hello_footer_copyright_display;
|
||||
this.toggleShowHideClass($element, inputValue);
|
||||
$footerContainer.toggleClass('footer-has-copyright', 'yes' === inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_logo_type: {
|
||||
selector: '.site-footer .site-branding',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'show-',
|
||||
inputOptions = args.container.controls.hello_footer_logo_type.options,
|
||||
inputValue = args.settings.hello_footer_logo_type;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_layout: {
|
||||
selector: '.site-footer',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'footer-',
|
||||
inputOptions = args.container.controls.hello_footer_layout.options,
|
||||
inputValue = args.settings.hello_footer_layout;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_width: {
|
||||
selector: '.site-footer',
|
||||
callback: ($element, args) => {
|
||||
const classPrefix = 'footer-',
|
||||
inputOptions = args.container.controls.hello_footer_width.options,
|
||||
inputValue = args.settings.hello_footer_width;
|
||||
this.toggleLayoutClass($element, classPrefix, inputOptions, inputValue);
|
||||
}
|
||||
},
|
||||
hello_footer_copyright_text: {
|
||||
selector: '.site-footer .copyright',
|
||||
callback: ($element, args) => {
|
||||
const inputValue = args.settings.hello_footer_copyright_text;
|
||||
$element.find('p').text(inputValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle show and hide classes on containers
|
||||
*
|
||||
* This will remove the .show and .hide clases from the element, then apply the new class
|
||||
*
|
||||
* @param {jQuery} element
|
||||
* @param {string} inputValue
|
||||
*/
|
||||
toggleShowHideClass(element, inputValue) {
|
||||
element.removeClass('hide').removeClass('show').addClass(inputValue ? 'show' : 'hide');
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle layout classes on containers
|
||||
*
|
||||
* This will cleanly set classes onto which ever container we want to target, removing the old classes and adding the new one
|
||||
*
|
||||
* @param {jQuery} element
|
||||
* @param {string} classPrefix
|
||||
* @param {Object} inputOptions
|
||||
* @param {string} inputValue
|
||||
*
|
||||
*/
|
||||
toggleLayoutClass(element, classPrefix, inputOptions, inputValue) {
|
||||
// Loop through the possible classes and remove the one that's not in use
|
||||
Object.entries(inputOptions).forEach(([key]) => {
|
||||
element.removeClass(classPrefix + key);
|
||||
});
|
||||
|
||||
// Append the class which we want to use onto the element
|
||||
if ('' !== inputValue) {
|
||||
element.addClass(classPrefix + inputValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the conditions under which the hook will run.
|
||||
*
|
||||
* @param {Object} args
|
||||
*/
|
||||
getConditions(args) {
|
||||
const isKit = 'kit' === elementor.documents.getCurrent().config.type,
|
||||
changedControls = Object.keys(args.settings),
|
||||
isSingleSetting = 1 === changedControls.length;
|
||||
|
||||
// If the document is not a kit, or there are no changed settings, or there is more than one single changed
|
||||
// setting, don't run the hook.
|
||||
if (!isKit || !args.settings || !isSingleSetting) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the changed control is in the list of theme controls, return true to run the hook.
|
||||
// Otherwise, return false so the hook doesn't run.
|
||||
return !!Object.keys(this.getHelloThemeControls()).includes(changedControls[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* The hook logic.
|
||||
*
|
||||
* @param {Object} args
|
||||
*/
|
||||
apply(args) {
|
||||
const allThemeControls = this.getHelloThemeControls(),
|
||||
// Extract the control ID from the passed args
|
||||
controlId = Object.keys(args.settings)[0],
|
||||
controlConfig = allThemeControls[controlId],
|
||||
// Find the element that needs to be targeted by the control.
|
||||
$element = elementor.$previewContents.find(controlConfig.selector);
|
||||
controlConfig.callback($element, args);
|
||||
}
|
||||
}
|
||||
exports["default"] = ControlsHook;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 416:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var toPropertyKey = __webpack_require__(62);
|
||||
function _defineProperty(obj, key, value) {
|
||||
key = toPropertyKey(key);
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 836:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
"default": obj
|
||||
};
|
||||
}
|
||||
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 36:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = (__webpack_require__(698)["default"]);
|
||||
function _toPrimitive(input, hint) {
|
||||
if (_typeof(input) !== "object" || input === null) return input;
|
||||
var prim = input[Symbol.toPrimitive];
|
||||
if (prim !== undefined) {
|
||||
var res = prim.call(input, hint || "default");
|
||||
if (_typeof(res) !== "object") return res;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
return (hint === "string" ? String : Number)(input);
|
||||
}
|
||||
module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 62:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _typeof = (__webpack_require__(698)["default"]);
|
||||
var toPrimitive = __webpack_require__(36);
|
||||
function _toPropertyKey(arg) {
|
||||
var key = toPrimitive(arg, "string");
|
||||
return _typeof(key) === "symbol" ? key : String(key);
|
||||
}
|
||||
module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 698:
|
||||
/***/ ((module) => {
|
||||
|
||||
function _typeof(obj) {
|
||||
"@babel/helpers - typeof";
|
||||
|
||||
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
||||
}
|
||||
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
|
||||
var _interopRequireDefault = __webpack_require__(836);
|
||||
var _component = _interopRequireDefault(__webpack_require__(440));
|
||||
$e.components.register(new _component.default());
|
||||
})();
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'ac1edb44e0c7550dfdd9');
|
||||
@@ -0,0 +1,75 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
var __webpack_exports__ = {};
|
||||
|
||||
|
||||
class elementorHelloThemeHandler {
|
||||
constructor() {
|
||||
this.initSettings();
|
||||
this.initElements();
|
||||
this.bindEvents();
|
||||
}
|
||||
initSettings() {
|
||||
this.settings = {
|
||||
selectors: {
|
||||
menuToggle: '.site-header .site-navigation-toggle',
|
||||
menuToggleHolder: '.site-header .site-navigation-toggle-holder',
|
||||
dropdownMenu: '.site-header .site-navigation-dropdown'
|
||||
}
|
||||
};
|
||||
}
|
||||
initElements() {
|
||||
this.elements = {
|
||||
window,
|
||||
menuToggle: document.querySelector(this.settings.selectors.menuToggle),
|
||||
menuToggleHolder: document.querySelector(this.settings.selectors.menuToggleHolder),
|
||||
dropdownMenu: document.querySelector(this.settings.selectors.dropdownMenu)
|
||||
};
|
||||
}
|
||||
bindEvents() {
|
||||
var _this$elements$menuTo;
|
||||
if (!this.elements.menuToggleHolder || (_this$elements$menuTo = this.elements.menuToggleHolder) !== null && _this$elements$menuTo !== void 0 && _this$elements$menuTo.classList.contains('hide')) {
|
||||
return;
|
||||
}
|
||||
this.elements.menuToggle.addEventListener('click', () => this.handleMenuToggle());
|
||||
this.elements.menuToggle.addEventListener('keyup', event => {
|
||||
const ENTER_KEY = 13;
|
||||
const SPACE_KEY = 32;
|
||||
if (ENTER_KEY === event.keyCode || SPACE_KEY === event.keyCode) {
|
||||
event.currentTarget.click();
|
||||
}
|
||||
});
|
||||
this.elements.dropdownMenu.querySelectorAll('.menu-item-has-children > a').forEach(anchorElement => anchorElement.addEventListener('click', event => this.handleMenuChildren(event)));
|
||||
}
|
||||
closeMenuItems() {
|
||||
this.elements.menuToggleHolder.classList.remove('elementor-active');
|
||||
this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
|
||||
}
|
||||
handleMenuToggle() {
|
||||
const isDropdownVisible = !this.elements.menuToggleHolder.classList.contains('elementor-active');
|
||||
this.elements.menuToggle.setAttribute('aria-expanded', isDropdownVisible);
|
||||
this.elements.dropdownMenu.setAttribute('aria-hidden', !isDropdownVisible);
|
||||
this.elements.menuToggleHolder.classList.toggle('elementor-active', isDropdownVisible);
|
||||
|
||||
// Always close all sub active items.
|
||||
this.elements.dropdownMenu.querySelectorAll('.elementor-active').forEach(item => item.classList.remove('elementor-active'));
|
||||
if (isDropdownVisible) {
|
||||
this.elements.window.addEventListener('resize', () => this.closeMenuItems());
|
||||
} else {
|
||||
this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
|
||||
}
|
||||
}
|
||||
handleMenuChildren(event) {
|
||||
const anchor = event.currentTarget;
|
||||
const parentLi = anchor.parentElement;
|
||||
if (!(parentLi !== null && parentLi !== void 0 && parentLi.classList)) {
|
||||
return;
|
||||
}
|
||||
parentLi.classList.toggle('elementor-active');
|
||||
}
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
new elementorHelloThemeHandler();
|
||||
});
|
||||
/******/ })()
|
||||
;
|
||||
75
wp-content/themes/hello-elementor/assets/js/hello-frontend.min.js
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
/******/ (() => { // webpackBootstrap
|
||||
/******/ "use strict";
|
||||
var __webpack_exports__ = {};
|
||||
|
||||
|
||||
class elementorHelloThemeHandler {
|
||||
constructor() {
|
||||
this.initSettings();
|
||||
this.initElements();
|
||||
this.bindEvents();
|
||||
}
|
||||
initSettings() {
|
||||
this.settings = {
|
||||
selectors: {
|
||||
menuToggle: '.site-header .site-navigation-toggle',
|
||||
menuToggleHolder: '.site-header .site-navigation-toggle-holder',
|
||||
dropdownMenu: '.site-header .site-navigation-dropdown'
|
||||
}
|
||||
};
|
||||
}
|
||||
initElements() {
|
||||
this.elements = {
|
||||
window,
|
||||
menuToggle: document.querySelector(this.settings.selectors.menuToggle),
|
||||
menuToggleHolder: document.querySelector(this.settings.selectors.menuToggleHolder),
|
||||
dropdownMenu: document.querySelector(this.settings.selectors.dropdownMenu)
|
||||
};
|
||||
}
|
||||
bindEvents() {
|
||||
var _this$elements$menuTo;
|
||||
if (!this.elements.menuToggleHolder || (_this$elements$menuTo = this.elements.menuToggleHolder) !== null && _this$elements$menuTo !== void 0 && _this$elements$menuTo.classList.contains('hide')) {
|
||||
return;
|
||||
}
|
||||
this.elements.menuToggle.addEventListener('click', () => this.handleMenuToggle());
|
||||
this.elements.menuToggle.addEventListener('keyup', event => {
|
||||
const ENTER_KEY = 13;
|
||||
const SPACE_KEY = 32;
|
||||
if (ENTER_KEY === event.keyCode || SPACE_KEY === event.keyCode) {
|
||||
event.currentTarget.click();
|
||||
}
|
||||
});
|
||||
this.elements.dropdownMenu.querySelectorAll('.menu-item-has-children > a').forEach(anchorElement => anchorElement.addEventListener('click', event => this.handleMenuChildren(event)));
|
||||
}
|
||||
closeMenuItems() {
|
||||
this.elements.menuToggleHolder.classList.remove('elementor-active');
|
||||
this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
|
||||
}
|
||||
handleMenuToggle() {
|
||||
const isDropdownVisible = !this.elements.menuToggleHolder.classList.contains('elementor-active');
|
||||
this.elements.menuToggle.setAttribute('aria-expanded', isDropdownVisible);
|
||||
this.elements.dropdownMenu.setAttribute('aria-hidden', !isDropdownVisible);
|
||||
this.elements.menuToggleHolder.classList.toggle('elementor-active', isDropdownVisible);
|
||||
|
||||
// Always close all sub active items.
|
||||
this.elements.dropdownMenu.querySelectorAll('.elementor-active').forEach(item => item.classList.remove('elementor-active'));
|
||||
if (isDropdownVisible) {
|
||||
this.elements.window.addEventListener('resize', () => this.closeMenuItems());
|
||||
} else {
|
||||
this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
|
||||
}
|
||||
}
|
||||
handleMenuChildren(event) {
|
||||
const anchor = event.currentTarget;
|
||||
const parentLi = anchor.parentElement;
|
||||
if (!(parentLi !== null && parentLi !== void 0 && parentLi.classList)) {
|
||||
return;
|
||||
}
|
||||
parentLi.classList.toggle('elementor-active');
|
||||
}
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
new elementorHelloThemeHandler();
|
||||
});
|
||||
/******/ })()
|
||||
;
|
||||
41
wp-content/themes/hello-elementor/classic-editor.css
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Classic editor styling
|
||||
*/
|
||||
/**
|
||||
* Loading first in the style.scss & classic-editor.scss
|
||||
*/
|
||||
p {
|
||||
margin-block-end: 0.75rem;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: monospace;
|
||||
font-size: 1em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
font-style: italic;
|
||||
}
|
||||
1
wp-content/themes/hello-elementor/classic-editor.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
p{margin-block-end:.75rem}img{max-width:100%;height:auto;vertical-align:middle;border-style:none}pre{font-family:monospace;font-size:1em;white-space:pre-wrap}code,kbd,pre,samp{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem}blockquote{font-style:italic}
|
||||
80
wp-content/themes/hello-elementor/comments.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying comments.
|
||||
*
|
||||
* This is the template that displays the area of the page that contains both the current comments
|
||||
* and the comment form.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! post_type_supports( get_post_type(), 'comments' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! have_comments() && ! comments_open() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Comment Reply Script.
|
||||
if ( comments_open() && get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
}
|
||||
?>
|
||||
<section id="comments" class="comments-area">
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h3 class="title-comments">
|
||||
<?php
|
||||
$comments_number = get_comments_number();
|
||||
if ( '1' === $comments_number ) {
|
||||
printf( esc_html_x( 'One Response', 'comments title', 'hello-elementor' ) );
|
||||
} else {
|
||||
printf(
|
||||
esc_html( /* translators: 1: number of comments */
|
||||
_nx(
|
||||
'%1$s Response',
|
||||
'%1$s Responses',
|
||||
$comments_number,
|
||||
'comments title',
|
||||
'hello-elementor'
|
||||
)
|
||||
),
|
||||
esc_html( number_format_i18n( $comments_number ) )
|
||||
);
|
||||
}
|
||||
?>
|
||||
</h3>
|
||||
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments(
|
||||
[
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
'avatar_size' => 42,
|
||||
]
|
||||
);
|
||||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<?php endif; // Check for have_comments(). ?>
|
||||
|
||||
<?php
|
||||
comment_form(
|
||||
[
|
||||
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
|
||||
'title_reply_after' => '</h2>',
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
</section><!-- .comments-area -->
|
||||
21
wp-content/themes/hello-elementor/customizer.css
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Style for your Customizer editor.
|
||||
*/
|
||||
#accordion-section-hello-options .accordion-section-title {
|
||||
color: #c36;
|
||||
}
|
||||
#accordion-section-hello-options .accordion-section-title:after {
|
||||
color: #c36;
|
||||
}
|
||||
|
||||
#customize-control-hello-header-footer .hello-action-links {
|
||||
margin: 15px auto;
|
||||
text-align: center;
|
||||
}
|
||||
#customize-control-hello-header-footer .hello-action-links-title {
|
||||
font-weight: 600;
|
||||
margin: 10px 0;
|
||||
}
|
||||
#customize-control-hello-header-footer .hello-action-links-message {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
1
wp-content/themes/hello-elementor/customizer.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
#accordion-section-hello-options .accordion-section-title,#accordion-section-hello-options .accordion-section-title:after{color:#c36}#customize-control-hello-header-footer .hello-action-links{margin:15px auto;text-align:center}#customize-control-hello-header-footer .hello-action-links-title{font-weight:600;margin:10px 0}#customize-control-hello-header-footer .hello-action-links-message{margin:0 0 20px}
|
||||
12
wp-content/themes/hello-elementor/editor.css
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Elementor editor styling
|
||||
*/
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-title {
|
||||
margin-block-start: 24px;
|
||||
}
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-message {
|
||||
margin-block-start: 12px;
|
||||
}
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-link {
|
||||
margin-block-start: 24px;
|
||||
}
|
||||
1
wp-content/themes/hello-elementor/editor.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-title{margin-block-start:24px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-message{margin-block-start:12px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-link{margin-block-start:24px}
|
||||
28
wp-content/themes/hello-elementor/footer.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the footer.
|
||||
*
|
||||
* Contains the body & html closing tags.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'footer' ) ) {
|
||||
if ( hello_elementor_display_header_footer() ) {
|
||||
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
|
||||
get_template_part( 'template-parts/dynamic-footer' );
|
||||
} else {
|
||||
get_template_part( 'template-parts/footer' );
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
265
wp-content/themes/hello-elementor/functions.php
Normal file
@@ -0,0 +1,265 @@
|
||||
<?php
|
||||
/**
|
||||
* Theme functions and definitions
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
define( 'HELLO_ELEMENTOR_VERSION', '3.0.1' );
|
||||
|
||||
if ( ! isset( $content_width ) ) {
|
||||
$content_width = 800; // Pixels.
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_setup' ) ) {
|
||||
/**
|
||||
* Set up theme support.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_elementor_setup() {
|
||||
if ( is_admin() ) {
|
||||
hello_maybe_update_theme_version_in_db();
|
||||
}
|
||||
|
||||
if ( apply_filters( 'hello_elementor_register_menus', true ) ) {
|
||||
register_nav_menus( [ 'menu-1' => esc_html__( 'Header', 'hello-elementor' ) ] );
|
||||
register_nav_menus( [ 'menu-2' => esc_html__( 'Footer', 'hello-elementor' ) ] );
|
||||
}
|
||||
|
||||
if ( apply_filters( 'hello_elementor_post_type_support', true ) ) {
|
||||
add_post_type_support( 'page', 'excerpt' );
|
||||
}
|
||||
|
||||
if ( apply_filters( 'hello_elementor_add_theme_support', true ) ) {
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
add_theme_support( 'title-tag' );
|
||||
add_theme_support(
|
||||
'html5',
|
||||
[
|
||||
'search-form',
|
||||
'comment-form',
|
||||
'comment-list',
|
||||
'gallery',
|
||||
'caption',
|
||||
'script',
|
||||
'style',
|
||||
]
|
||||
);
|
||||
add_theme_support(
|
||||
'custom-logo',
|
||||
[
|
||||
'height' => 100,
|
||||
'width' => 350,
|
||||
'flex-height' => true,
|
||||
'flex-width' => true,
|
||||
]
|
||||
);
|
||||
|
||||
/*
|
||||
* Editor Style.
|
||||
*/
|
||||
add_editor_style( 'classic-editor.css' );
|
||||
|
||||
/*
|
||||
* Gutenberg wide images.
|
||||
*/
|
||||
add_theme_support( 'align-wide' );
|
||||
|
||||
/*
|
||||
* WooCommerce.
|
||||
*/
|
||||
if ( apply_filters( 'hello_elementor_add_woocommerce_support', true ) ) {
|
||||
// WooCommerce in general.
|
||||
add_theme_support( 'woocommerce' );
|
||||
// Enabling WooCommerce product gallery features (are off by default since WC 3.0.0).
|
||||
// zoom.
|
||||
add_theme_support( 'wc-product-gallery-zoom' );
|
||||
// lightbox.
|
||||
add_theme_support( 'wc-product-gallery-lightbox' );
|
||||
// swipe.
|
||||
add_theme_support( 'wc-product-gallery-slider' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'after_setup_theme', 'hello_elementor_setup' );
|
||||
|
||||
function hello_maybe_update_theme_version_in_db() {
|
||||
$theme_version_option_name = 'hello_theme_version';
|
||||
// The theme version saved in the database.
|
||||
$hello_theme_db_version = get_option( $theme_version_option_name );
|
||||
|
||||
// If the 'hello_theme_version' option does not exist in the DB, or the version needs to be updated, do the update.
|
||||
if ( ! $hello_theme_db_version || version_compare( $hello_theme_db_version, HELLO_ELEMENTOR_VERSION, '<' ) ) {
|
||||
update_option( $theme_version_option_name, HELLO_ELEMENTOR_VERSION );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_display_header_footer' ) ) {
|
||||
/**
|
||||
* Check whether to display header footer.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function hello_elementor_display_header_footer() {
|
||||
$hello_elementor_header_footer = true;
|
||||
|
||||
return apply_filters( 'hello_elementor_header_footer', $hello_elementor_header_footer );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_scripts_styles' ) ) {
|
||||
/**
|
||||
* Theme Scripts & Styles.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_elementor_scripts_styles() {
|
||||
$min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
|
||||
if ( apply_filters( 'hello_elementor_enqueue_style', true ) ) {
|
||||
wp_enqueue_style(
|
||||
'hello-elementor',
|
||||
get_template_directory_uri() . '/style' . $min_suffix . '.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
}
|
||||
|
||||
if ( apply_filters( 'hello_elementor_enqueue_theme_style', true ) ) {
|
||||
wp_enqueue_style(
|
||||
'hello-elementor-theme-style',
|
||||
get_template_directory_uri() . '/theme' . $min_suffix . '.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
}
|
||||
|
||||
if ( hello_elementor_display_header_footer() ) {
|
||||
wp_enqueue_style(
|
||||
'hello-elementor-header-footer',
|
||||
get_template_directory_uri() . '/header-footer' . $min_suffix . '.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'hello_elementor_scripts_styles' );
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_register_elementor_locations' ) ) {
|
||||
/**
|
||||
* Register Elementor Locations.
|
||||
*
|
||||
* @param ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager $elementor_theme_manager theme manager.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_elementor_register_elementor_locations( $elementor_theme_manager ) {
|
||||
if ( apply_filters( 'hello_elementor_register_elementor_locations', true ) ) {
|
||||
$elementor_theme_manager->register_all_core_location();
|
||||
}
|
||||
}
|
||||
}
|
||||
add_action( 'elementor/theme/register_locations', 'hello_elementor_register_elementor_locations' );
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_content_width' ) ) {
|
||||
/**
|
||||
* Set default content width.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_elementor_content_width() {
|
||||
$GLOBALS['content_width'] = apply_filters( 'hello_elementor_content_width', 800 );
|
||||
}
|
||||
}
|
||||
add_action( 'after_setup_theme', 'hello_elementor_content_width', 0 );
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_add_description_meta_tag' ) ) {
|
||||
/**
|
||||
* Add description meta tag with excerpt text.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_elementor_add_description_meta_tag() {
|
||||
if ( ! apply_filters( 'hello_elementor_description_meta_tag', true ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! is_singular() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$post = get_queried_object();
|
||||
if ( empty( $post->post_excerpt ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<meta name="description" content="' . esc_attr( wp_strip_all_tags( $post->post_excerpt ) ) . '">' . "\n";
|
||||
}
|
||||
}
|
||||
add_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
|
||||
|
||||
// Admin notice
|
||||
if ( is_admin() ) {
|
||||
require get_template_directory() . '/includes/admin-functions.php';
|
||||
}
|
||||
|
||||
// Settings page
|
||||
require get_template_directory() . '/includes/settings-functions.php';
|
||||
|
||||
// Header & footer styling option, inside Elementor
|
||||
require get_template_directory() . '/includes/elementor-functions.php';
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_customizer' ) ) {
|
||||
// Customizer controls
|
||||
function hello_elementor_customizer() {
|
||||
if ( ! is_customize_preview() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! hello_elementor_display_header_footer() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
require get_template_directory() . '/includes/customizer-functions.php';
|
||||
}
|
||||
}
|
||||
add_action( 'init', 'hello_elementor_customizer' );
|
||||
|
||||
if ( ! function_exists( 'hello_elementor_check_hide_title' ) ) {
|
||||
/**
|
||||
* Check whether to display the page title.
|
||||
*
|
||||
* @param bool $val default value.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function hello_elementor_check_hide_title( $val ) {
|
||||
if ( defined( 'ELEMENTOR_VERSION' ) ) {
|
||||
$current_doc = Elementor\Plugin::instance()->documents->get( get_the_ID() );
|
||||
if ( $current_doc && 'yes' === $current_doc->get_settings( 'hide_title' ) ) {
|
||||
$val = false;
|
||||
}
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
}
|
||||
add_filter( 'hello_elementor_page_title', 'hello_elementor_check_hide_title' );
|
||||
|
||||
/**
|
||||
* BC:
|
||||
* In v2.7.0 the theme removed the `hello_elementor_body_open()` from `header.php` replacing it with `wp_body_open()`.
|
||||
* The following code prevents fatal errors in child themes that still use this function.
|
||||
*/
|
||||
if ( ! function_exists( 'hello_elementor_body_open' ) ) {
|
||||
function hello_elementor_body_open() {
|
||||
wp_body_open();
|
||||
}
|
||||
}
|
||||
360
wp-content/themes/hello-elementor/header-footer.css
Normal file
@@ -0,0 +1,360 @@
|
||||
@charset "UTF-8";
|
||||
/**
|
||||
* Loading first in the style.scss & classic-editor.scss
|
||||
*/
|
||||
/**
|
||||
* Header styling and layout
|
||||
*/
|
||||
.site-header {
|
||||
/* Backwards compat for Hello 2.3.0 */
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding-block-start: 1rem;
|
||||
padding-block-end: 1rem;
|
||||
position: relative;
|
||||
}
|
||||
.site-header .site-navigation {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.site-header .site-branding {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.site-header .header-inner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.site-header .header-inner .custom-logo-link {
|
||||
display: block;
|
||||
}
|
||||
.site-header .header-inner .site-branding .site-title,
|
||||
.site-header .header-inner .site-branding .site-description {
|
||||
margin: 0;
|
||||
}
|
||||
.site-header .header-inner .site-branding.show-title .site-logo {
|
||||
display: none !important;
|
||||
}
|
||||
.site-header .header-inner .site-branding.show-logo .site-title {
|
||||
display: none !important;
|
||||
}
|
||||
.site-header:not(.header-stacked) .header-inner .site-branding {
|
||||
max-width: 30%;
|
||||
}
|
||||
.site-header:not(.header-stacked) .header-inner .site-navigation {
|
||||
max-width: 70%;
|
||||
}
|
||||
.site-header.header-inverted .header-inner {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.site-header.header-inverted .header-inner .site-branding {
|
||||
text-align: right;
|
||||
}
|
||||
.site-header.header-inverted .header-inner .site-navigation {
|
||||
justify-content: start;
|
||||
}
|
||||
.site-header.header-stacked .header-inner {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.site-header .header-inner:not(.header-stacked) .site-branding {
|
||||
max-width: 80%;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Footer styling and layout
|
||||
*/
|
||||
.site-footer {
|
||||
padding-block-start: 1rem;
|
||||
padding-block-end: 1rem;
|
||||
position: relative;
|
||||
}
|
||||
.site-footer .footer-inner {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.site-footer .footer-inner .custom-logo-link {
|
||||
display: block;
|
||||
}
|
||||
.site-footer .footer-inner .site-navigation {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.site-footer .footer-inner .site-branding {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.site-footer .footer-inner .site-branding .site-title,
|
||||
.site-footer .footer-inner .site-branding .site-description {
|
||||
margin: 0;
|
||||
}
|
||||
.site-footer .footer-inner .site-branding.show-title .site-logo {
|
||||
display: none !important;
|
||||
}
|
||||
.site-footer .footer-inner .site-branding.show-logo .site-title {
|
||||
display: none !important;
|
||||
}
|
||||
.site-footer .footer-inner .copyright {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.site-footer .footer-inner .copyright p {
|
||||
margin: 0;
|
||||
}
|
||||
.site-footer.footer-inverted .footer-inner {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
.site-footer.footer-inverted .footer-inner .site-branding {
|
||||
text-align: right;
|
||||
}
|
||||
.site-footer.footer-inverted .footer-inner .site-navigation {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.site-footer.footer-has-copyright .footer-inner .site-navigation {
|
||||
justify-content: center;
|
||||
}
|
||||
.site-footer.footer-stacked .footer-inner {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
.site-footer.footer-stacked .footer-inner .site-branding h4.site-title {
|
||||
text-align: center;
|
||||
}
|
||||
.site-footer.footer-stacked .footer-inner .site-navigation .menu {
|
||||
padding: 0;
|
||||
}
|
||||
.site-footer:not(.footer-stacked) .footer-inner .site-branding {
|
||||
max-width: 20%;
|
||||
}
|
||||
.site-footer:not(.footer-stacked) .footer-inner .site-navigation {
|
||||
max-width: 60%;
|
||||
}
|
||||
.site-footer:not(.footer-stacked) .footer-inner .copyright {
|
||||
max-width: 20%;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.site-footer:not(.footer-stacked) .footer-inner .site-branding,
|
||||
.site-footer:not(.footer-stacked) .footer-inner .site-navigation,
|
||||
.site-footer:not(.footer-stacked) .footer-inner .copyright {
|
||||
display: block;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
.site-footer .footer-inner .site-navigation ul.menu {
|
||||
justify-content: center;
|
||||
}
|
||||
.site-footer .footer-inner .site-navigation ul.menu li {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Navigation Menus
|
||||
*/
|
||||
.site-header.header-inverted .site-navigation-toggle-holder {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.site-header.header-stacked .site-navigation-toggle-holder {
|
||||
justify-content: center;
|
||||
max-width: 100%;
|
||||
}
|
||||
.site-header.menu-layout-dropdown .site-navigation {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-navigation-toggle-holder {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-grow: 1;
|
||||
max-width: 20%;
|
||||
padding: 8px 15px;
|
||||
}
|
||||
.site-navigation-toggle-holder .site-navigation-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22px;
|
||||
padding: 0.25em;
|
||||
cursor: pointer;
|
||||
border: 0 solid;
|
||||
border-radius: 3px;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
color: #494c4f;
|
||||
}
|
||||
.site-navigation-toggle-holder.elementor-active .site-navigation-toggle i:before {
|
||||
content: "\e87f";
|
||||
}
|
||||
|
||||
.site-navigation {
|
||||
grid-area: nav-menu;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.site-navigation ul.menu, .site-navigation ul.menu ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
.site-navigation ul.menu {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.site-navigation ul.menu li {
|
||||
position: relative;
|
||||
display: flex;
|
||||
}
|
||||
.site-navigation ul.menu li a {
|
||||
display: block;
|
||||
padding: 8px 15px;
|
||||
}
|
||||
.site-navigation ul.menu li.menu-item-has-children {
|
||||
padding-inline-end: 15px;
|
||||
}
|
||||
.site-navigation ul.menu li.menu-item-has-children:after {
|
||||
display: block;
|
||||
content: "▾";
|
||||
font-size: 1.5em;
|
||||
align-items: center;
|
||||
color: #666666;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
text-decoration: none;
|
||||
}
|
||||
.site-navigation ul.menu li.menu-item-has-children:focus-within > ul {
|
||||
display: block;
|
||||
}
|
||||
.site-navigation ul.menu li ul {
|
||||
background: #fff;
|
||||
display: none;
|
||||
min-width: 150px;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
left: 0;
|
||||
top: 100%;
|
||||
}
|
||||
.site-navigation ul.menu li ul li {
|
||||
border-block-end: #eeeeee 1px solid;
|
||||
}
|
||||
.site-navigation ul.menu li ul li:last-child {
|
||||
border-block-end: none;
|
||||
}
|
||||
.site-navigation ul.menu li ul li.menu-item-has-children a {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.site-navigation ul.menu li ul li.menu-item-has-children:after {
|
||||
transform: translateY(-50%) rotate(-90deg);
|
||||
}
|
||||
.site-navigation ul.menu li ul ul {
|
||||
left: 100%;
|
||||
top: 0;
|
||||
}
|
||||
.site-navigation ul.menu li:hover > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
footer .site-navigation ul.menu li ul {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
}
|
||||
footer .site-navigation ul.menu li ul ul {
|
||||
bottom: 0;
|
||||
}
|
||||
footer .site-navigation ul.menu a {
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.site-navigation-dropdown {
|
||||
margin-block-start: 10px;
|
||||
transition: max-height 0.3s, transform 0.3s;
|
||||
transform-origin: top;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 10000;
|
||||
width: 100%;
|
||||
}
|
||||
.site-navigation-toggle-holder:not(.elementor-active) + .site-navigation-dropdown {
|
||||
transform: scaleY(0);
|
||||
max-height: 0;
|
||||
}
|
||||
.site-navigation-toggle-holder.elementor-active + .site-navigation-dropdown {
|
||||
transform: scaleY(1);
|
||||
max-height: 100vh;
|
||||
}
|
||||
.site-navigation-dropdown ul {
|
||||
padding: 0;
|
||||
}
|
||||
.site-navigation-dropdown ul.menu {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: white;
|
||||
}
|
||||
.site-navigation-dropdown ul.menu li {
|
||||
display: block;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.site-navigation-dropdown ul.menu li a {
|
||||
display: block;
|
||||
padding: 20px;
|
||||
background: #ffffff;
|
||||
color: #55595c;
|
||||
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1019607843);
|
||||
}
|
||||
.site-navigation-dropdown ul.menu li.current-menu-item a {
|
||||
color: white;
|
||||
background: #55595c;
|
||||
}
|
||||
.site-navigation-dropdown ul.menu > li li {
|
||||
transition: max-height 0.3s, transform 0.3s;
|
||||
transform-origin: top;
|
||||
transform: scaleY(0);
|
||||
max-height: 0;
|
||||
}
|
||||
.site-navigation-dropdown ul.menu li.elementor-active > ul > li {
|
||||
transform: scaleY(1);
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.site-header.menu-dropdown-mobile:not(.menu-layout-dropdown) .site-navigation {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.site-header.menu-dropdown-mobile:not(.menu-layout-dropdown) .site-navigation-toggle-holder {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 576px) and (max-width: 767px) {
|
||||
.site-header.menu-dropdown-mobile:not(.menu-layout-dropdown) .site-navigation {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.site-header.menu-dropdown-tablet:not(.menu-layout-dropdown) .site-navigation-toggle-holder {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.site-header.menu-dropdown-tablet:not(.menu-layout-dropdown) .site-navigation {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.site-header.menu-dropdown-none:not(.menu-layout-dropdown) .site-navigation-toggle-holder {
|
||||
display: none !important;
|
||||
}
|
||||
1
wp-content/themes/hello-elementor/header-footer.min.css
vendored
Normal file
43
wp-content/themes/hello-elementor/header.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the header
|
||||
*
|
||||
* This is the template that displays all of the <head> section, opens the <body> tag and adds the site's header.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$viewport_content = apply_filters( 'hello_elementor_viewport_content', 'width=device-width, initial-scale=1' );
|
||||
$enable_skip_link = apply_filters( 'hello_elementor_enable_skip_link', true );
|
||||
$skip_link_url = apply_filters( 'hello_elementor_skip_link_url', '#content' );
|
||||
?>
|
||||
<!doctype html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="<?php echo esc_attr( $viewport_content ); ?>">
|
||||
<link rel="profile" href="https://gmpg.org/xfn/11">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<?php wp_body_open(); ?>
|
||||
|
||||
<?php if ( $enable_skip_link ) { ?>
|
||||
<a class="skip-link screen-reader-text" href="<?php echo esc_url( $skip_link_url ); ?>"><?php echo esc_html__( 'Skip to content', 'hello-elementor' ); ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'header' ) ) {
|
||||
if ( hello_elementor_display_header_footer() ) {
|
||||
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
|
||||
get_template_part( 'template-parts/dynamic-header' );
|
||||
} else {
|
||||
get_template_part( 'template-parts/header' );
|
||||
}
|
||||
}
|
||||
}
|
||||
159
wp-content/themes/hello-elementor/includes/admin-functions.php
Normal file
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Show in WP Dashboard notice about the plugin is not activated.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_elementor_fail_load_admin_notice() {
|
||||
// Leave to Elementor Pro to manage this.
|
||||
if ( function_exists( 'elementor_pro_load_plugin' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$screen = get_current_screen();
|
||||
if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'true' === get_user_meta( get_current_user_id(), '_hello_elementor_install_notice', true ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$plugin = 'elementor/elementor.php';
|
||||
|
||||
$installed_plugins = get_plugins();
|
||||
|
||||
$is_elementor_installed = isset( $installed_plugins[ $plugin ] );
|
||||
|
||||
$message = esc_html__( 'The Hello Theme is a lightweight starter theme that works perfectly with the Elementor award-winning site builder plugin.', 'hello-elementor' );
|
||||
|
||||
if ( $is_elementor_installed ) {
|
||||
if ( ! current_user_can( 'activate_plugins' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message .= ' ' . esc_html__( 'Once you activate the plugin, you are only one click away from building an amazing website.', 'hello-elementor' );
|
||||
|
||||
$button_text = esc_html__( 'Activate Elementor', 'hello-elementor' );
|
||||
$button_link = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
|
||||
} else {
|
||||
if ( ! current_user_can( 'install_plugins' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message .= ' ' . esc_html__( 'Once you download and activate the plugin, you are only one click away from building an amazing website.', 'hello-elementor' );
|
||||
|
||||
$button_text = esc_html__( 'Install Elementor', 'hello-elementor' );
|
||||
$button_link = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
|
||||
}
|
||||
|
||||
?>
|
||||
<style>
|
||||
.notice.hello-elementor-notice {
|
||||
border: 1px solid #ccd0d4;
|
||||
border-inline-start: 4px solid #9b0a46 !important;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.15);
|
||||
display: flex;
|
||||
padding: 0;
|
||||
}
|
||||
.notice.hello-elementor-notice.hello-elementor-install-elementor {
|
||||
padding: 0;
|
||||
}
|
||||
.notice.hello-elementor-notice .hello-elementor-notice-aside {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
justify-content: center;
|
||||
padding: 20px 10px;
|
||||
background: rgba(215,43,63,0.04);
|
||||
}
|
||||
.notice.hello-elementor-notice .hello-elementor-notice-aside img {
|
||||
width: 1.5rem;
|
||||
}
|
||||
.notice.hello-elementor-notice .hello-elementor-notice-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
padding: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
.notice.hello-elementor-notice .hello-elementor-notice-content h3,
|
||||
.notice.hello-elementor-notice .hello-elementor-notice-content p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.notice.hello-elementor-notice .hello-elementor-information-link {
|
||||
align-self: start;
|
||||
}
|
||||
.notice.hello-elementor-notice .hello-elementor-install-button {
|
||||
align-self: start;
|
||||
background-color: #127DB8;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
height: auto;
|
||||
line-height: 20px;
|
||||
padding: 0.4375rem 0.75rem;
|
||||
margin-block-start: 15px;
|
||||
}
|
||||
.notice.hello-elementor-notice .hello-elementor-install-button:active {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.notice.hello-elementor-notice .hello-elementor-notice-aside {
|
||||
padding: 10px;
|
||||
}
|
||||
.notice.hello-elementor-notice .hello-elementor-notice-content {
|
||||
gap: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.addEventListener( 'load', () => {
|
||||
const dismissNotice = document.querySelector( '.notice.hello-elementor-install-elementor button.notice-dismiss' );
|
||||
dismissNotice.addEventListener( 'click', async ( event ) => {
|
||||
event.preventDefault();
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append( 'action', 'hello_elementor_set_admin_notice_viewed' );
|
||||
formData.append( 'dismiss_nonce', '<?php echo esc_js( wp_create_nonce( 'hello_elementor_dismiss_install_notice' ) ); ?>' );
|
||||
|
||||
await fetch( ajaxurl, { method: 'POST', body: formData } );
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
<div class="notice updated is-dismissible hello-elementor-notice hello-elementor-install-elementor">
|
||||
<div class="hello-elementor-notice-aside">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/images/elementor-notice-icon.svg' ); ?>" alt="<?php echo esc_attr__( 'Get Elementor', 'hello-elementor' ); ?>" />
|
||||
</div>
|
||||
<div class="hello-elementor-notice-content">
|
||||
<h3><?php echo esc_html__( 'Thanks for installing the Hello Theme!', 'hello-elementor' ); ?></h3>
|
||||
<p><?php echo esc_html( $message ); ?></p>
|
||||
<a class="hello-elementor-information-link" href="https://go.elementor.com/hello-theme-learn/" target="_blank"><?php echo esc_html__( 'Explore Elementor Site Builder Plugin', 'hello-elementor' ); ?></a>
|
||||
<a class="hello-elementor-install-button" href="<?php echo esc_attr( $button_link ); ?>"><?php echo esc_html( $button_text ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Set dismissed admin notice as viewed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function ajax_hello_elementor_set_admin_notice_viewed() {
|
||||
check_ajax_referer( 'hello_elementor_dismiss_install_notice', 'dismiss_nonce' );
|
||||
|
||||
update_user_meta( get_current_user_id(), '_hello_elementor_install_notice', 'true' );
|
||||
die;
|
||||
}
|
||||
add_action( 'wp_ajax_hello_elementor_set_admin_notice_viewed', 'ajax_hello_elementor_set_admin_notice_viewed' );
|
||||
|
||||
if ( ! did_action( 'elementor/loaded' ) ) {
|
||||
add_action( 'admin_notices', 'hello_elementor_fail_load_admin_notice' );
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Register Customizer controls.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_customizer_register( $wp_customize ) {
|
||||
require get_template_directory() . '/includes/customizer/customizer-action-links.php';
|
||||
|
||||
$wp_customize->add_section(
|
||||
'hello-options',
|
||||
[
|
||||
'title' => esc_html__( 'Header & Footer', 'hello-elementor' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
]
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'hello-header-footer',
|
||||
[
|
||||
'sanitize_callback' => false,
|
||||
'transport' => 'refresh',
|
||||
]
|
||||
);
|
||||
|
||||
$wp_customize->add_control(
|
||||
new HelloElementor\Includes\Customizer\Hello_Customizer_Action_Links(
|
||||
$wp_customize,
|
||||
'hello-header-footer',
|
||||
[
|
||||
'section' => 'hello-options',
|
||||
'priority' => 20,
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'customize_register', 'hello_customizer_register' );
|
||||
|
||||
/**
|
||||
* Enqueue Customizer CSS.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_customizer_styles() {
|
||||
|
||||
$min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
|
||||
wp_enqueue_style(
|
||||
'hello-elementor-customizer',
|
||||
get_template_directory_uri() . '/customizer' . $min_suffix . '.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
}
|
||||
add_action( 'admin_enqueue_scripts', 'hello_customizer_styles' );
|
||||
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
namespace HelloElementor\Includes\Customizer;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Hello_Customizer_Action_Links extends \WP_Customize_Control {
|
||||
|
||||
// Whitelist content parameter
|
||||
public $content = '';
|
||||
|
||||
/**
|
||||
* Render the control's content.
|
||||
*
|
||||
* Allows the content to be overridden without having to rewrite the wrapper.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function render_content() {
|
||||
$this->print_customizer_action_links();
|
||||
|
||||
if ( isset( $this->description ) ) {
|
||||
echo '<span class="description customize-control-description">' . wp_kses_post( $this->description ) . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print customizer action links.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function print_customizer_action_links() {
|
||||
if ( ! function_exists( 'get_plugins' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$action_link_data = [];
|
||||
$action_link_type = '';
|
||||
$installed_plugins = get_plugins();
|
||||
|
||||
if ( ! isset( $installed_plugins['elementor/elementor.php'] ) ) {
|
||||
$action_link_type = 'install-elementor';
|
||||
} elseif ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
||||
$action_link_type = 'activate-elementor';
|
||||
} elseif ( ! hello_header_footer_experiment_active() ) {
|
||||
$action_link_type = 'activate-header-footer-experiment';
|
||||
} else {
|
||||
$action_link_type = 'style-header-footer';
|
||||
}
|
||||
|
||||
switch ( $action_link_type ) {
|
||||
case 'install-elementor':
|
||||
$action_link_data = [
|
||||
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Install Elementor', 'hello-elementor' ),
|
||||
'message' => esc_html__( 'Create cross-site header & footer using Elementor.', 'hello-elementor' ),
|
||||
'button' => esc_html__( 'Install Elementor', 'hello-elementor' ),
|
||||
'link' => wp_nonce_url(
|
||||
add_query_arg(
|
||||
[
|
||||
'action' => 'install-plugin',
|
||||
'plugin' => 'elementor',
|
||||
],
|
||||
admin_url( 'update.php' )
|
||||
),
|
||||
'install-plugin_elementor'
|
||||
),
|
||||
];
|
||||
break;
|
||||
case 'activate-elementor':
|
||||
$action_link_data = [
|
||||
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Activate Elementor', 'hello-elementor' ),
|
||||
'message' => esc_html__( 'Create cross-site header & footer using Elementor.', 'hello-elementor' ),
|
||||
'button' => esc_html__( 'Activate Elementor', 'hello-elementor' ),
|
||||
'link' => wp_nonce_url( 'plugins.php?action=activate&plugin=elementor/elementor.php', 'activate-plugin_elementor/elementor.php' ),
|
||||
];
|
||||
break;
|
||||
case 'activate-header-footer-experiment':
|
||||
$action_link_data = [
|
||||
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Style using Elementor', 'hello-elementor' ),
|
||||
'message' => esc_html__( 'Design your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor' ),
|
||||
'button' => esc_html__( 'Activate header & footer experiment', 'hello-elementor' ),
|
||||
'link' => wp_nonce_url( 'admin.php?page=elementor#tab-experiments' ),
|
||||
];
|
||||
break;
|
||||
case 'style-header-footer':
|
||||
$action_link_data = [
|
||||
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Style cross-site header & footer', 'hello-elementor' ),
|
||||
'message' => esc_html__( 'Customize your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor' ),
|
||||
'button' => esc_html__( 'Start Designing', 'hello-elementor' ),
|
||||
'link' => wp_nonce_url( 'post.php?post=' . get_option( 'elementor_active_kit' ) . '&action=elementor' ),
|
||||
];
|
||||
break;
|
||||
}
|
||||
|
||||
$customizer_content = $this->get_customizer_action_links_html( $action_link_data );
|
||||
|
||||
echo wp_kses_post( $customizer_content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the customizer action links HTML.
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function get_customizer_action_links_html( $data ) {
|
||||
if (
|
||||
empty( $data )
|
||||
|| ! isset( $data['image'] )
|
||||
|| ! isset( $data['alt'] )
|
||||
|| ! isset( $data['title'] )
|
||||
|| ! isset( $data['message'] )
|
||||
|| ! isset( $data['link'] )
|
||||
|| ! isset( $data['button'] )
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<div class="hello-action-links">
|
||||
<img src="%1$s" alt="%2$s">
|
||||
<p class="hello-action-links-title">%3$s</p>
|
||||
<p class="hello-action-links-message">%4$s</p>
|
||||
<a class="button button-primary" target="_blank" href="%5$s">%6$s</a>
|
||||
</div>',
|
||||
$data['image'],
|
||||
$data['alt'],
|
||||
$data['title'],
|
||||
$data['message'],
|
||||
$data['link'],
|
||||
$data['button'],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Register Site Settings Controls.
|
||||
*/
|
||||
|
||||
add_action( 'elementor/init', 'hello_elementor_settings_init' );
|
||||
|
||||
function hello_elementor_settings_init() {
|
||||
if ( ! hello_header_footer_experiment_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
require 'settings/settings-header.php';
|
||||
require 'settings/settings-footer.php';
|
||||
|
||||
add_action( 'elementor/kit/register_tabs', function( \Elementor\Core\Kits\Documents\Kit $kit ) {
|
||||
if ( ! hello_elementor_display_header_footer() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$kit->register_tab( 'hello-settings-header', HelloElementor\Includes\Settings\Settings_Header::class );
|
||||
$kit->register_tab( 'hello-settings-footer', HelloElementor\Includes\Settings\Settings_Footer::class );
|
||||
}, 1, 40 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to return a setting.
|
||||
*
|
||||
* Saves 2 lines to get kit, then get setting. Also caches the kit and setting.
|
||||
*
|
||||
* @param string $setting_id
|
||||
* @return string|array same as the Elementor internal function does.
|
||||
*/
|
||||
function hello_elementor_get_setting( $setting_id ) {
|
||||
global $hello_elementor_settings;
|
||||
|
||||
$return = '';
|
||||
|
||||
if ( ! isset( $hello_elementor_settings['kit_settings'] ) ) {
|
||||
$kit = \Elementor\Plugin::$instance->kits_manager->get_active_kit();
|
||||
$hello_elementor_settings['kit_settings'] = $kit->get_settings();
|
||||
}
|
||||
|
||||
if ( isset( $hello_elementor_settings['kit_settings'][ $setting_id ] ) ) {
|
||||
$return = $hello_elementor_settings['kit_settings'][ $setting_id ];
|
||||
}
|
||||
|
||||
return apply_filters( 'hello_elementor_' . $setting_id, $return );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to show/hide elements
|
||||
*
|
||||
* This works with switches, if the setting ID that has been passed is toggled on, we'll return show, otherwise we'll return hide
|
||||
*
|
||||
* @param string $setting_id
|
||||
* @return string|array same as the Elementor internal function does.
|
||||
*/
|
||||
function hello_show_or_hide( $setting_id ) {
|
||||
return ( 'yes' === hello_elementor_get_setting( $setting_id ) ? 'show' : 'hide' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to translate the header layout setting into a class name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function hello_get_header_layout_class() {
|
||||
$layout_classes = [];
|
||||
|
||||
$header_layout = hello_elementor_get_setting( 'hello_header_layout' );
|
||||
if ( 'inverted' === $header_layout ) {
|
||||
$layout_classes[] = 'header-inverted';
|
||||
} elseif ( 'stacked' === $header_layout ) {
|
||||
$layout_classes[] = 'header-stacked';
|
||||
}
|
||||
|
||||
$header_width = hello_elementor_get_setting( 'hello_header_width' );
|
||||
if ( 'full-width' === $header_width ) {
|
||||
$layout_classes[] = 'header-full-width';
|
||||
}
|
||||
|
||||
$header_menu_dropdown = hello_elementor_get_setting( 'hello_header_menu_dropdown' );
|
||||
if ( 'tablet' === $header_menu_dropdown ) {
|
||||
$layout_classes[] = 'menu-dropdown-tablet';
|
||||
} elseif ( 'mobile' === $header_menu_dropdown ) {
|
||||
$layout_classes[] = 'menu-dropdown-mobile';
|
||||
} elseif ( 'none' === $header_menu_dropdown ) {
|
||||
$layout_classes[] = 'menu-dropdown-none';
|
||||
}
|
||||
|
||||
$hello_header_menu_layout = hello_elementor_get_setting( 'hello_header_menu_layout' );
|
||||
if ( 'dropdown' === $hello_header_menu_layout ) {
|
||||
$layout_classes[] = 'menu-layout-dropdown';
|
||||
}
|
||||
|
||||
return implode( ' ', $layout_classes );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to translate the footer layout setting into a class name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function hello_get_footer_layout_class() {
|
||||
$footer_layout = hello_elementor_get_setting( 'hello_footer_layout' );
|
||||
|
||||
$layout_classes = [];
|
||||
|
||||
if ( 'inverted' === $footer_layout ) {
|
||||
$layout_classes[] = 'footer-inverted';
|
||||
} elseif ( 'stacked' === $footer_layout ) {
|
||||
$layout_classes[] = 'footer-stacked';
|
||||
}
|
||||
|
||||
$footer_width = hello_elementor_get_setting( 'hello_footer_width' );
|
||||
|
||||
if ( 'full-width' === $footer_width ) {
|
||||
$layout_classes[] = 'footer-full-width';
|
||||
}
|
||||
|
||||
if ( hello_elementor_get_setting( 'hello_footer_copyright_display' ) && '' !== hello_elementor_get_setting( 'hello_footer_copyright_text' ) ) {
|
||||
$layout_classes[] = 'footer-has-copyright';
|
||||
}
|
||||
|
||||
return implode( ' ', $layout_classes );
|
||||
}
|
||||
|
||||
add_action( 'elementor/editor/after_enqueue_scripts', function() {
|
||||
if ( ! hello_header_footer_experiment_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
|
||||
wp_enqueue_script(
|
||||
'hello-theme-editor',
|
||||
get_template_directory_uri() . '/assets/js/hello-editor' . $suffix . '.js',
|
||||
[ 'jquery', 'elementor-editor' ],
|
||||
HELLO_ELEMENTOR_VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
wp_enqueue_style(
|
||||
'hello-editor',
|
||||
get_template_directory_uri() . '/editor' . $suffix . '.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
} );
|
||||
|
||||
add_action( 'wp_enqueue_scripts', function() {
|
||||
if ( ! hello_elementor_display_header_footer() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! hello_header_footer_experiment_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
|
||||
wp_enqueue_script(
|
||||
'hello-theme-frontend',
|
||||
get_template_directory_uri() . '/assets/js/hello-frontend' . $suffix . '.js',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
\Elementor\Plugin::$instance->kits_manager->frontend_before_enqueue_styles();
|
||||
} );
|
||||
|
||||
|
||||
/**
|
||||
* Helper function to decide whether to output the header template.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function hello_get_header_display() {
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
|
||||
return (
|
||||
$is_editor
|
||||
|| hello_elementor_get_setting( 'hello_header_logo_display' )
|
||||
|| hello_elementor_get_setting( 'hello_header_tagline_display' )
|
||||
|| hello_elementor_get_setting( 'hello_header_menu_display' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to decide whether to output the footer template.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function hello_get_footer_display() {
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
|
||||
return (
|
||||
$is_editor
|
||||
|| hello_elementor_get_setting( 'hello_footer_logo_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_tagline_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_menu_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_copyright_display' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Hello Elementor theme Header & Footer to Experiments.
|
||||
*/
|
||||
add_action( 'elementor/experiments/default-features-registered', function( \Elementor\Core\Experiments\Manager $experiments_manager ) {
|
||||
$experiments_manager->add_feature( [
|
||||
'name' => 'hello-theme-header-footer',
|
||||
'title' => esc_html__( 'Hello Theme Header & Footer', 'hello-elementor' ),
|
||||
'description' => sprintf(
|
||||
'%1$s <a href="%2$s" target="_blank">%3$s</a>',
|
||||
esc_html__( 'Customize and style the builtin Hello Theme’s cross-site header & footer from the Elementor "Site Settings" panel.', 'hello-elementor' ),
|
||||
'https://go.elementor.com/wp-dash-header-footer',
|
||||
esc_html__( 'Learn More', 'hello-elementor' )
|
||||
),
|
||||
'release_status' => $experiments_manager::RELEASE_STATUS_STABLE,
|
||||
'new_site' => [
|
||||
'minimum_installation_version' => '3.3.0',
|
||||
'default_active' => $experiments_manager::STATE_ACTIVE,
|
||||
],
|
||||
] );
|
||||
} );
|
||||
|
||||
/**
|
||||
* Helper function to check if Header & Footer Experiment is Active/Inactive
|
||||
*/
|
||||
function hello_header_footer_experiment_active() {
|
||||
// If Elementor is not active, return false
|
||||
if ( ! did_action( 'elementor/loaded' ) ) {
|
||||
return false;
|
||||
}
|
||||
// Backwards compat.
|
||||
if ( ! method_exists( \Elementor\Plugin::$instance->experiments, 'is_feature_active' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool) ( \Elementor\Plugin::$instance->experiments->is_feature_active( 'hello-theme-header-footer' ) );
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
add_action( 'admin_menu', 'hello_elementor_settings_page' );
|
||||
add_action( 'init', 'hello_elementor_tweak_settings', 0 );
|
||||
|
||||
/**
|
||||
* Register theme settings page.
|
||||
*/
|
||||
function hello_elementor_settings_page() {
|
||||
|
||||
$menu_hook = '';
|
||||
|
||||
$menu_hook = add_theme_page(
|
||||
esc_html__( 'Hello Theme Settings', 'hello-elementor' ),
|
||||
esc_html__( 'Theme Settings', 'hello-elementor' ),
|
||||
'manage_options',
|
||||
'hello-theme-settings',
|
||||
'hello_elementor_settings_page_render'
|
||||
);
|
||||
|
||||
add_action( 'load-' . $menu_hook, function() {
|
||||
add_action( 'admin_enqueue_scripts', 'hello_elementor_settings_page_scripts', 10 );
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register settings page scripts.
|
||||
*/
|
||||
function hello_elementor_settings_page_scripts() {
|
||||
|
||||
$dir = get_template_directory() . '/assets/js';
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
$handle = 'hello-admin';
|
||||
$asset_path = "$dir/hello-admin.asset.php";
|
||||
$asset_url = get_template_directory_uri() . '/assets/js';
|
||||
if ( ! file_exists( $asset_path ) ) {
|
||||
throw new \Error( 'You need to run `npm run build` for the "hello-theme" first.' );
|
||||
}
|
||||
$script_asset = require( $asset_path );
|
||||
|
||||
wp_enqueue_script(
|
||||
$handle,
|
||||
"$asset_url/$handle$suffix.js",
|
||||
$script_asset['dependencies'],
|
||||
$script_asset['version']
|
||||
);
|
||||
|
||||
wp_set_script_translations( $handle, 'hello-elementor' );
|
||||
|
||||
wp_enqueue_style(
|
||||
$handle,
|
||||
"$asset_url/$handle$suffix.css",
|
||||
[ 'wp-components' ],
|
||||
$script_asset['version']
|
||||
);
|
||||
|
||||
$plugins = get_plugins();
|
||||
|
||||
if ( ! isset( $plugins['elementor/elementor.php'] ) ) {
|
||||
$action_link_type = 'install-elementor';
|
||||
$action_link_url = wp_nonce_url(
|
||||
add_query_arg(
|
||||
[
|
||||
'action' => 'install-plugin',
|
||||
'plugin' => 'elementor',
|
||||
],
|
||||
admin_url( 'update.php' )
|
||||
),
|
||||
'install-plugin_elementor'
|
||||
);
|
||||
} elseif ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
||||
$action_link_type = 'activate-elementor';
|
||||
$action_link_url = wp_nonce_url( 'plugins.php?action=activate&plugin=elementor/elementor.php', 'activate-plugin_elementor/elementor.php' );
|
||||
} elseif ( hello_header_footer_experiment_active() && ! hello_header_footer_experiment_active() ) {
|
||||
$action_link_type = 'activate-header-footer-experiment';
|
||||
$action_link_url = wp_nonce_url( 'admin.php?page=elementor#tab-experiments' );
|
||||
} elseif ( hello_header_footer_experiment_active() ) {
|
||||
$action_link_type = 'style-header-footer';
|
||||
$action_link_url = wp_nonce_url( 'post.php?post=' . get_option( 'elementor_active_kit' ) . '&action=elementor' );
|
||||
} else {
|
||||
$action_link_type = '';
|
||||
$action_link_url = '';
|
||||
}
|
||||
|
||||
wp_localize_script(
|
||||
$handle,
|
||||
'helloAdminData',
|
||||
[
|
||||
'actionLinkType' => $action_link_type,
|
||||
'actionLinkURL' => $action_link_url,
|
||||
'templateDirectoryURI' => get_template_directory_uri(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render settings page wrapper element.
|
||||
*/
|
||||
function hello_elementor_settings_page_render() {
|
||||
?>
|
||||
<div id="hello-elementor-settings"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Theme tweaks & settings.
|
||||
*/
|
||||
function hello_elementor_tweak_settings() {
|
||||
|
||||
$settings_group = 'hello_elementor_settings';
|
||||
|
||||
$settings = [
|
||||
'DESCRIPTION_META_TAG' => '_description_meta_tag',
|
||||
'SKIP_LINK' => '_skip_link',
|
||||
'HEADER_FOOTER' => '_header_footer',
|
||||
'PAGE_TITLE' => '_page_title',
|
||||
'HELLO_STYLE' => '_hello_style',
|
||||
'HELLO_THEME' => '_hello_theme',
|
||||
];
|
||||
|
||||
hello_elementor_register_settings( $settings_group, $settings );
|
||||
hello_elementor_render_tweaks( $settings_group, $settings );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register theme settings.
|
||||
*/
|
||||
function hello_elementor_register_settings( $settings_group, $settings ) {
|
||||
|
||||
foreach ( $settings as $setting_key => $setting_value ) {
|
||||
register_setting(
|
||||
$settings_group,
|
||||
$settings_group . $setting_value,
|
||||
[
|
||||
'default' => '',
|
||||
'show_in_rest' => true,
|
||||
'type' => 'string',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Run a tweek only if the user requested it.
|
||||
*/
|
||||
function hello_elementor_do_tweak( $setting, $tweak_callback ) {
|
||||
|
||||
$option = get_option( $setting );
|
||||
if ( isset( $option ) && ( 'true' === $option ) && is_callable( $tweak_callback ) ) {
|
||||
$tweak_callback();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render theme tweaks.
|
||||
*/
|
||||
function hello_elementor_render_tweaks( $settings_group, $settings ) {
|
||||
|
||||
hello_elementor_do_tweak( $settings_group . $settings['DESCRIPTION_META_TAG'], function() {
|
||||
remove_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
|
||||
} );
|
||||
|
||||
hello_elementor_do_tweak( $settings_group . $settings['SKIP_LINK'], function() {
|
||||
add_filter( 'hello_elementor_enable_skip_link', '__return_false' );
|
||||
} );
|
||||
|
||||
hello_elementor_do_tweak( $settings_group . $settings['HEADER_FOOTER'], function() {
|
||||
add_filter( 'hello_elementor_header_footer', '__return_false' );
|
||||
} );
|
||||
|
||||
hello_elementor_do_tweak( $settings_group . $settings['PAGE_TITLE'], function() {
|
||||
add_filter( 'hello_elementor_page_title', '__return_false' );
|
||||
} );
|
||||
|
||||
hello_elementor_do_tweak( $settings_group . $settings['HELLO_STYLE'], function() {
|
||||
add_filter( 'hello_elementor_enqueue_style', '__return_false' );
|
||||
} );
|
||||
|
||||
hello_elementor_do_tweak( $settings_group . $settings['HELLO_THEME'], function() {
|
||||
add_filter( 'hello_elementor_enqueue_theme_style', '__return_false' );
|
||||
} );
|
||||
|
||||
}
|
||||
@@ -0,0 +1,532 @@
|
||||
<?php
|
||||
|
||||
namespace HelloElementor\Includes\Settings;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Background;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Kits\Documents\Tabs\Tab_Base;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Settings_Footer extends Tab_Base {
|
||||
|
||||
public function get_id() {
|
||||
return 'hello-settings-footer';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return esc_html__( 'Hello Theme Footer', 'hello-elementor' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-footer';
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function get_group() {
|
||||
return 'theme-style';
|
||||
}
|
||||
|
||||
protected function register_tab_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_section',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Footer', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_logo_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-branding',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_tagline_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_menu_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-navigation',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_copyright_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Copyright', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .copyright',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_disable_note',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => sprintf(
|
||||
/* translators: %s: Link that opens the theme settings page. */
|
||||
__( 'Note: Hiding all the elements, only hides them visually. To disable them completely go to <a href="%s">Theme Settings</a> .', 'hello-elementor' ),
|
||||
admin_url( 'themes.php?page=hello-theme-settings' )
|
||||
),
|
||||
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => '',
|
||||
'hello_footer_tagline_display' => '',
|
||||
'hello_footer_menu_display' => '',
|
||||
'hello_footer_copyright_display' => '',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_layout',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__( 'Layout', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'default' => esc_html__( 'Default', 'hello-elementor' ),
|
||||
'inverted' => esc_html__( 'Inverted', 'hello-elementor' ),
|
||||
'stacked' => esc_html__( 'Centered', 'hello-elementor' ),
|
||||
],
|
||||
'selector' => '.site-footer',
|
||||
'default' => 'default',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_width',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__( 'Width', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'boxed' => esc_html__( 'Boxed', 'hello-elementor' ),
|
||||
'full-width' => esc_html__( 'Full Width', 'hello-elementor' ),
|
||||
],
|
||||
'selector' => '.site-footer',
|
||||
'default' => 'boxed',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_footer_custom_width',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Content Width', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 2000,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_footer_width' => 'boxed',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .footer-inner' => 'width: {{SIZE}}{{UNIT}}; max-width: 100%;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_footer_gap',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Gap', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em ', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 5,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 5,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer' => 'padding-inline-end: {{SIZE}}{{UNIT}}; padding-inline-start: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
'condition' => [
|
||||
'hello_footer_layout!' => 'stacked',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_background',
|
||||
'label' => esc_html__( 'Background', 'hello-elementor' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '.site-footer',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_logo_section',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_logo_display!' => '',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_logo_type',
|
||||
[
|
||||
'label' => esc_html__( 'Type', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'logo',
|
||||
'options' => [
|
||||
'logo' => esc_html__( 'Logo', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Title', 'hello-elementor' ),
|
||||
],
|
||||
'frontend_available' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_footer_logo_width',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Logo Width', 'hello-elementor' ),
|
||||
'description' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s logo', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 1000,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'logo',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-branding .site-logo img' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_title_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer h4.site-title a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_title_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
'selector' => '.site-footer h4.site-title',
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_title_link',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s title', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'content_classes' => 'elementor-control-field-description',
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_tagline',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_tagline_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-description' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_tagline_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-footer .site-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_tagline_link',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s tagline', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'content_classes' => 'elementor-control-field-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_menu_tab',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_menu_display' => 'yes',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$available_menus = wp_get_nav_menus();
|
||||
|
||||
$menus = [ '0' => esc_html__( '— Select a Menu —', 'hello-elementor' ) ];
|
||||
foreach ( $available_menus as $available_menu ) {
|
||||
$menus[ $available_menu->term_id ] = $available_menu->name;
|
||||
}
|
||||
|
||||
if ( 1 === count( $menus ) ) {
|
||||
$this->add_control(
|
||||
'hello_footer_menu_notice',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => '<strong>' . esc_html__( 'There are no menus in your site.', 'hello-elementor' ) . '</strong><br>' . sprintf( __( 'Go to <a href="%s" target="_blank">Menus screen</a> to create one.', 'hello-elementor' ), admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
|
||||
'separator' => 'after',
|
||||
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->add_control(
|
||||
'hello_footer_menu',
|
||||
[
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => $menus,
|
||||
'default' => array_keys( $menus )[0],
|
||||
'description' => sprintf( __( 'Go to the <a href="%s" target="_blank">Menus screen</a> to manage your menus.', 'hello-elementor' ), admin_url( 'nav-menus.php' ) ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_menu_warning',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => esc_html__( 'Changes will be reflected in the preview only after the page reloads.', 'hello-elementor' ),
|
||||
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_menu_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'footer .footer-inner .site-navigation a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_menu_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'selector' => 'footer .footer-inner .site-navigation a',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_copyright_section',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Copyright', 'hello-elementor' ),
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_footer_copyright_display',
|
||||
'operator' => '=',
|
||||
'value' => 'yes',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_copyright_text',
|
||||
[
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'default' => esc_html__( 'All rights reserved', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_copyright_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_footer_copyright_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .copyright p' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_copyright_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_copyright_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-footer .copyright p',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
public function on_save( $data ) {
|
||||
// Save chosen footer menu to the WP settings.
|
||||
if ( isset( $data['settings']['hello_footer_menu'] ) ) {
|
||||
$menu_id = $data['settings']['hello_footer_menu'];
|
||||
$locations = get_theme_mod( 'nav_menu_locations' );
|
||||
$locations['menu-2'] = (int) $menu_id;
|
||||
set_theme_mod( 'nav_menu_locations', $locations );
|
||||
}
|
||||
}
|
||||
|
||||
public function get_additional_tab_content() {
|
||||
$content_template = '
|
||||
<div class="hello-elementor elementor-nerd-box">
|
||||
<img src="%1$s" class="elementor-nerd-box-icon" alt="%2$s">
|
||||
<p class="elementor-nerd-box-title">%3$s</p>
|
||||
<p class="elementor-nerd-box-message">%4$s</p>
|
||||
<a class="elementor-nerd-box-link elementor-button" target="_blank" href="%5$s">%6$s</a>
|
||||
</div>';
|
||||
|
||||
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
|
||||
return sprintf(
|
||||
$content_template,
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||
esc_attr__( 'Get Elementor Pro', 'hello-elementor' ),
|
||||
esc_html__( 'Create a custom footer with multiple options', 'hello-elementor' ),
|
||||
esc_html__( 'Upgrade to Elementor Pro and enjoy free design and many more features', 'hello-elementor' ),
|
||||
'https://go.elementor.com/hello-theme-footer/',
|
||||
esc_html__( 'Upgrade', 'hello-elementor' )
|
||||
);
|
||||
} else {
|
||||
return sprintf(
|
||||
$content_template,
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||
esc_attr__( 'Elementor Pro', 'hello-elementor' ),
|
||||
esc_html__( 'Create a custom footer with the Theme Builder', 'hello-elementor' ),
|
||||
esc_html__( 'With the Theme Builder you can jump directly into each part of your site', 'hello-elementor' ),
|
||||
get_admin_url( null, 'admin.php?page=elementor-app#/site-editor/templates/footer' ),
|
||||
esc_html__( 'Create Footer', 'hello-elementor' )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,554 @@
|
||||
<?php
|
||||
|
||||
namespace HelloElementor\Includes\Settings;
|
||||
|
||||
use Elementor\Plugin;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Background;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Responsive\Responsive;
|
||||
use Elementor\Core\Kits\Documents\Tabs\Tab_Base;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Settings_Header extends Tab_Base {
|
||||
|
||||
public function get_id() {
|
||||
return 'hello-settings-header';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return esc_html__( 'Hello Theme Header', 'hello-elementor' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-header';
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function get_group() {
|
||||
return 'theme-style';
|
||||
}
|
||||
|
||||
protected function register_tab_controls() {
|
||||
$this->start_controls_section(
|
||||
'hello_header_section',
|
||||
[
|
||||
'tab' => 'hello-settings-header',
|
||||
'label' => esc_html__( 'Header', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_logo_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_tagline_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_disable_note',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => sprintf(
|
||||
/* translators: %s: Link that opens the theme settings page. */
|
||||
__( 'Note: Hiding all the elements, only hides them visually. To disable them completely go to <a href="%s">Theme Settings</a> .', 'hello-elementor' ),
|
||||
admin_url( 'themes.php?page=hello-theme-settings' )
|
||||
),
|
||||
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => '',
|
||||
'hello_header_tagline_display' => '',
|
||||
'hello_header_menu_display' => '',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_layout',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__( 'Layout', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'default' => esc_html__( 'Default', 'hello-elementor' ),
|
||||
'inverted' => esc_html__( 'Inverted', 'hello-elementor' ),
|
||||
'stacked' => esc_html__( 'Centered', 'hello-elementor' ),
|
||||
],
|
||||
'selector' => '.site-header',
|
||||
'default' => 'default',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_width',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__( 'Width', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'boxed' => esc_html__( 'Boxed', 'hello-elementor' ),
|
||||
'full-width' => esc_html__( 'Full Width', 'hello-elementor' ),
|
||||
],
|
||||
'selector' => '.site-header',
|
||||
'default' => 'boxed',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_header_custom_width',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Content Width', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 2000,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_header_width' => 'boxed',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .header-inner' => 'width: {{SIZE}}{{UNIT}}; max-width: 100%;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_header_gap',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Gap', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em ', 'rem', 'vw', 'custom' ],
|
||||
'default' => [
|
||||
'size' => '0',
|
||||
],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 5,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 5,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header' => 'padding-inline-end: {{SIZE}}{{UNIT}}; padding-inline-start: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_header_layout',
|
||||
'operator' => '!=',
|
||||
'value' => 'stacked',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_background',
|
||||
'label' => esc_html__( 'Background', 'hello-elementor' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'selector' => '.site-header',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_header_logo_section',
|
||||
[
|
||||
'tab' => 'hello-settings-header',
|
||||
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_header_logo_display',
|
||||
'operator' => '=',
|
||||
'value' => 'yes',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_logo_type',
|
||||
[
|
||||
'label' => esc_html__( 'Type', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => ( has_custom_logo() ? 'logo' : 'title' ),
|
||||
'options' => [
|
||||
'logo' => esc_html__( 'Logo', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Title', 'hello-elementor' ),
|
||||
],
|
||||
'frontend_available' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_header_logo_width',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Logo Width', 'hello-elementor' ),
|
||||
'description' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s logo', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 1000,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'logo',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-branding .site-logo img' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_title_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header h1.site-title a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_title_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'description' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s title', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
'selector' => '.site-header h1.site-title',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_title_link',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s title', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'content_classes' => 'elementor-control-field-description',
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_header_tagline',
|
||||
[
|
||||
'tab' => 'hello-settings-header',
|
||||
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_header_tagline_display',
|
||||
'operator' => '=',
|
||||
'value' => 'yes',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_tagline_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_tagline_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-description' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_tagline_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_tagline_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-header .site-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_tagline_link',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s tagline', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'content_classes' => 'elementor-control-field-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_header_menu_tab',
|
||||
[
|
||||
'tab' => 'hello-settings-header',
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_header_menu_display',
|
||||
'operator' => '=',
|
||||
'value' => 'yes',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$available_menus = wp_get_nav_menus();
|
||||
|
||||
$menus = [ '0' => esc_html__( '— Select a Menu —', 'hello-elementor' ) ];
|
||||
foreach ( $available_menus as $available_menu ) {
|
||||
$menus[ $available_menu->term_id ] = $available_menu->name;
|
||||
}
|
||||
|
||||
if ( 1 === count( $menus ) ) {
|
||||
$this->add_control(
|
||||
'hello_header_menu_notice',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => '<strong>' . esc_html__( 'There are no menus in your site.', 'hello-elementor' ) . '</strong><br>' . sprintf( __( 'Go to <a href="%s" target="_blank">Menus screen</a> to create one.', 'hello-elementor' ), admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
|
||||
'separator' => 'after',
|
||||
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->add_control(
|
||||
'hello_header_menu',
|
||||
[
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => $menus,
|
||||
'default' => array_keys( $menus )[0],
|
||||
'description' => sprintf( __( 'Go to the <a href="%s" target="_blank">Menus screen</a> to manage your menus.', 'hello-elementor' ), admin_url( 'nav-menus.php' ) ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_warning',
|
||||
[
|
||||
'type' => Controls_Manager::RAW_HTML,
|
||||
'raw' => esc_html__( 'Changes will be reflected in the preview only after the page reloads.', 'hello-elementor' ),
|
||||
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_layout',
|
||||
[
|
||||
'label' => esc_html__( 'Menu Layout', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'horizontal',
|
||||
'options' => [
|
||||
'horizontal' => esc_html__( 'Horizontal', 'hello-elementor' ),
|
||||
'dropdown' => esc_html__( 'Dropdown', 'hello-elementor' ),
|
||||
],
|
||||
'frontend_available' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$breakpoints = Responsive::get_breakpoints();
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_dropdown',
|
||||
[
|
||||
'label' => esc_html__( 'Breakpoint', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'tablet',
|
||||
'options' => [
|
||||
/* translators: %d: Breakpoint number. */
|
||||
'mobile' => sprintf( esc_html__( 'Mobile (< %dpx)', 'hello-elementor' ), $breakpoints['md'] ),
|
||||
/* translators: %d: Breakpoint number. */
|
||||
'tablet' => sprintf( esc_html__( 'Tablet (< %dpx)', 'hello-elementor' ), $breakpoints['lg'] ),
|
||||
'none' => esc_html__( 'None', 'hello-elementor' ),
|
||||
],
|
||||
'selector' => '.site-header',
|
||||
'condition' => [
|
||||
'hello_header_menu_layout!' => 'dropdown',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_menu_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-navigation ul.menu li a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_toggle_color',
|
||||
[
|
||||
'label' => esc_html__( 'Toggle Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_menu_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-navigation-toggle i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_menu_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_menu_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-header .site-navigation .menu li',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
public function on_save( $data ) {
|
||||
// Save chosen header menu to the WP settings.
|
||||
if ( isset( $data['settings']['hello_header_menu'] ) ) {
|
||||
$menu_id = $data['settings']['hello_header_menu'];
|
||||
$locations = get_theme_mod( 'nav_menu_locations' );
|
||||
$locations['menu-1'] = (int) $menu_id;
|
||||
set_theme_mod( 'nav_menu_locations', $locations );
|
||||
}
|
||||
}
|
||||
|
||||
public function get_additional_tab_content() {
|
||||
$content_template = '
|
||||
<div class="hello-elementor elementor-nerd-box">
|
||||
<img src="%1$s" class="elementor-nerd-box-icon" alt="%2$s">
|
||||
<p class="elementor-nerd-box-title">%3$s</p>
|
||||
<p class="elementor-nerd-box-message">%4$s</p>
|
||||
<a class="elementor-nerd-box-link elementor-button" target="_blank" href="%5$s">%6$s</a>
|
||||
</div>';
|
||||
|
||||
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
|
||||
return sprintf(
|
||||
$content_template,
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||
esc_attr__( 'Get Elementor Pro', 'hello-elementor' ),
|
||||
esc_html__( 'Create a custom header with multiple options', 'hello-elementor' ),
|
||||
esc_html__( 'Upgrade to Elementor Pro and enjoy free design and many more features', 'hello-elementor' ),
|
||||
'https://go.elementor.com/hello-theme-header/',
|
||||
esc_html__( 'Upgrade', 'hello-elementor' )
|
||||
);
|
||||
} else {
|
||||
return sprintf(
|
||||
$content_template,
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||
esc_attr__( 'Elementor Pro', 'hello-elementor' ),
|
||||
esc_html__( 'Create a custom header with the Theme Builder', 'hello-elementor' ),
|
||||
esc_html__( 'With the Theme Builder you can jump directly into each part of your site', 'hello-elementor' ),
|
||||
get_admin_url( null, 'admin.php?page=elementor-app#/site-editor/templates/header' ),
|
||||
esc_html__( 'Create Header', 'hello-elementor' )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
37
wp-content/themes/hello-elementor/index.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* The site's entry point.
|
||||
*
|
||||
* Loads the relevant template part,
|
||||
* the loop is executed (when needed) by the relevant template part.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
get_header();
|
||||
|
||||
$is_elementor_theme_exist = function_exists( 'elementor_theme_do_location' );
|
||||
|
||||
if ( is_singular() ) {
|
||||
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
|
||||
get_template_part( 'template-parts/single' );
|
||||
}
|
||||
} elseif ( is_archive() || is_home() ) {
|
||||
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
|
||||
get_template_part( 'template-parts/archive' );
|
||||
}
|
||||
} elseif ( is_search() ) {
|
||||
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
|
||||
get_template_part( 'template-parts/search' );
|
||||
}
|
||||
} else {
|
||||
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
|
||||
get_template_part( 'template-parts/404' );
|
||||
}
|
||||
}
|
||||
|
||||
get_footer();
|
||||
254
wp-content/themes/hello-elementor/readme.txt
Normal file
@@ -0,0 +1,254 @@
|
||||
=== Hello Elementor ===
|
||||
|
||||
Contributors: elemntor, KingYes, ariel.k, bainternet
|
||||
Requires at least: 6.0
|
||||
Tested up to: 6.4
|
||||
Stable tag: 3.0.1
|
||||
Version: 3.0.1
|
||||
Requires PHP: 7.3
|
||||
License: GNU General Public License v3 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
A lightweight and minimalist WordPress theme for Elementor site builder.
|
||||
|
||||
== Description ==
|
||||
|
||||
Hello Elementor is a lightweight and minimalist WordPress theme that was built specifically to work seamlessly with the Elementor site builder plugin. The theme is free, open-source, and designed for users who want a flexible, easy-to-use, and customizable website.
|
||||
|
||||
The theme's main focus is on providing a solid foundation for users to build their own unique designs using the Elementor drag-and-drop site builder. It is optimized for speed and performance, and its simplicity and flexibility make it a great choice for both beginners and experienced website designers.
|
||||
|
||||
The theme supports common WordPress features which can be extended using a child-theme. In addition, there are several ways to add custom styles. It can be done from **Elementor**, using a child-theme, or with an external plugin. To customize the theme further, visit [Elementor developers docs](https://developers.elementor.com/docs/hello-elementor-theme/).
|
||||
|
||||
== Copyright ==
|
||||
|
||||
This theme, like WordPress, is distributed under the terms of GPL.
|
||||
Use it as your springboard to building a site with ***Elementor***.
|
||||
|
||||
Hello Elementor bundles the following third-party resources:
|
||||
|
||||
Font Awesome icons for theme screenshot
|
||||
License: SIL Open Font License, version 1.1.
|
||||
Source: https://fontawesome.com/v4.7.0/
|
||||
|
||||
Image for theme screenshot, Copyright Jason Blackeye
|
||||
License: CC0 1.0 Universal (CC0 1.0)
|
||||
Source: https://stocksnap.io/photo/4B83RD7BV9
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 3.0.1 - 2024-01-24 =
|
||||
* Fix: Harden security for admin notice dismiss button
|
||||
* Fix: Add `alt` attribute to all the images in the dashboard
|
||||
|
||||
= 3.0.0 - 2023-12-26 =
|
||||
* New: Option to disable cross-site header & footer
|
||||
* Tweak: Update `Requires PHP 7.3`
|
||||
* Tweak: Update `Tested up to 6.4`
|
||||
* Tweak: Move cross-site header & footer styles to a separate CSS file
|
||||
* Tweak: Don't load `header-footer.min.css` when disabling header & footer
|
||||
* Tweak: Don't load `hello-frontend.min.js` when disabling header & footer
|
||||
* Tweak: Replace jQuery code with vanilla JS in the frontend
|
||||
* Tweak: Replace jQuery code with vanilla JS in WordPress admin
|
||||
* Tweak: Remove unused JS code from the frontend
|
||||
* Tweak: Remove unused CSS code from the editor
|
||||
* Tweak: Remove unnecessary `role` attributes from HTML landmark elements
|
||||
* Tweak: Link from Elementor Site Settings to Hello Theme Settings
|
||||
* Fix: Dynamic script version for better caching
|
||||
|
||||
= 2.9.0 - 2023-10-25 =
|
||||
* New: Introducing the new settings page for the theme
|
||||
* New: Option to disable description meta tag
|
||||
* New: Option to disable skip link
|
||||
* New: Option to disable page title
|
||||
* New: Option to unregister Hello style.css
|
||||
* New: Option to unregister Hello theme.css
|
||||
* Tweak: Update `Requires at least 6.0`
|
||||
* Tweak: Update `Tested up to 6.3`
|
||||
|
||||
= 2.8.1 - 2023-07-05 =
|
||||
* Tweak: Added additional CSS selectors to apply RTL on comments
|
||||
* Fix: Comment area style regression
|
||||
|
||||
= 2.8.0 - 2023-07-04 =
|
||||
* Tweak: Update `Requires PHP 7.0`
|
||||
* Tweak: Added description meta tag with excerpt text
|
||||
* Tweak: Use CSS logical properties rather than physical properties
|
||||
* Tweak: Replace legacy `page-break-*` CSS properties with `break-*` properties
|
||||
* Tweak: Remove duplicate CSS classes for screen readers
|
||||
* Tweak: Merge similar translation strings (i18n)
|
||||
|
||||
= 2.7.1 - 2023-03-27 =
|
||||
* Tweak: Add excerpt support for pages
|
||||
* Tweak: When post comments are closed, display it to the user
|
||||
* Fix: Empty "Skip to content" href ([#276](https://github.com/elementor/hello-theme/issues/276))
|
||||
* Fix: Child themes using `hello_elementor_body_open()` no longer working ([#278](https://github.com/elementor/hello-theme/issues/278))
|
||||
|
||||
= 2.7.0 - 2023-03-26 =
|
||||
* Tweak: Update `Requires at least 5.9`
|
||||
* Tweak: Update `Tested up to 6.2`
|
||||
* Tweak: Remove backwards compatibility support for `wp_body_open()`
|
||||
* Tweak: Match `search.php` markup to `archive.php` markup
|
||||
* Tweak: Check if posts have featured images set
|
||||
* Tweak: Remove unnecessary `role` attributes from HTML landmark elements
|
||||
* Tweak: Escape translation strings for secure HTML output
|
||||
* Tweak: Use i18n function to make the "Menu" string translatable
|
||||
* Tweak: Minify SVG assets
|
||||
* Tweak: Make header nav-menu keyboard accessible
|
||||
* Tweak: Add `role="button"` to the nav-menu toggle for better accessibility
|
||||
* Tweak: Toggle mobile nav-menu with `Enter` & `Space` keyboard keys
|
||||
* Tweak: Add `hello_elementor_enable_skip_link` filter to enable/disable the skip link
|
||||
* Tweak: Add `hello_elementor_skip_link_url` filter to change skip link URL
|
||||
* Tweak: Use theme CSS not Elementor plugins CSS
|
||||
* Tweak: Added support for the new Elementor version
|
||||
* Tweak: Update autoprefixer to exclude dead browsers
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_load_textdomain` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_register_menus` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_add_theme_support` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_add_woocommerce_support` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_enqueue_style` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_register_elementor_locations` filter hook
|
||||
* Tweak: Added additional and `custom` units to header & footer panels
|
||||
* Tweak: Link to Elementor "Site Identity" panel from the header & footer panels
|
||||
* Tweak: Delete the `hello_elementor_load_textdomain` filter hook
|
||||
|
||||
= 2.6.1 - 2022-07-11 =
|
||||
* Tweak: Tables looks weird on dark backgrounds ([#126](https://github.com/elementor/hello-theme/issues/126))
|
||||
* Fix: Remove unnecessary PHP tags ([#213](https://github.com/elementor/hello-theme/issues/213))
|
||||
|
||||
= 2.6.0 - 2022-07-10 =
|
||||
* Tweak: Added `theme_support` for `script` and `style` to avoid validation warnings ([#184](https://github.com/elementor/hello-theme/issues/184))
|
||||
* Tweak: Sanitized content for allowed HTML tags in post title ([#118](https://github.com/elementor/hello-theme/issues/118))
|
||||
* Tweak: Changed the containers to `max-width: 1140px` instead of `960px` to align with the header-footer width
|
||||
* Tweak: Centering the page title for better consistency in all cases
|
||||
* Tweak: Added link between the customizer to Elementor global settings
|
||||
* Tweak: Added Skip Links to custom or dynamic header for better accessibility
|
||||
* Fix: Added output escaping in several places ([#194](https://github.com/elementor/hello-theme/issues/194))
|
||||
* Fix: Post Password Form Submit button alignment (Props [@romanbondar](https://github.com/romanbondar))
|
||||
* Fix: Fatal error when kit doesn't exist or needs to be recreated ([#175](https://github.com/elementor/hello-theme/issues/175))
|
||||
|
||||
= 2.5.0 - 2022-01-26 =
|
||||
* Tweak: Added keyboard navigation to Hello Elementor theme menus
|
||||
* Tweak: Added Skip Links and `#content` for the main wrapper for better accessibility ([#133](https://github.com/elementor/hello-theme/issues/133))
|
||||
* Tweak: Added underline for text links in Post Content for better accessibility
|
||||
* Tweak: Removed `outline: none` from inputs for better accessibility
|
||||
* Fix: Footer menu location is not being presented on sites that are not running Elementor
|
||||
|
||||
= 2.4.2 - 2021-12-20 =
|
||||
* Tweak: Use HTTPS in XFN profile link to prevent mixed content error ([Topic](https://wordpress.org/support/topic/url-scheme-in-xfn-profile-link/))
|
||||
* Tweak: Remove comments in `style.min.css` output ([#179](https://github.com/elementor/hello-theme/issues/179))
|
||||
* Tweak: Promoted Hello Elementor theme Header & Footer experiment status to Stable
|
||||
* Tweak: Added compatibility for upcoming WordPress version 5.9
|
||||
|
||||
= 2.4.1 - 2021-07-07 =
|
||||
* Fix: Hello Elementor theme Header & Footer experiment should be inactive for existing sites
|
||||
|
||||
= 2.4.0 - 2021-06-29 =
|
||||
* New: Introducing Header and Footer site elements as an Elementor Experiment
|
||||
* Tweak: Updated Elementor admin notices UI
|
||||
|
||||
= 2.3.1 - 2020-12-28 =
|
||||
* Tweak: Improved UI for table elements
|
||||
* Tweak: Added support for Gutenberg Wide and Full image formats (Props [@ramiy](https://github.com/ramiy))
|
||||
* Tweak: Added font smoothing
|
||||
* Tweak: Update `Tested up to 5.6`
|
||||
* Tweak: Update `Requires PHP 5.6`
|
||||
* Fix: Adjusted font-family in `code`, `pre`, `kbd` and `samp` elements (Props [@75th](https://github.com/75th))
|
||||
|
||||
= 2.3.0 - 2020-04-19 =
|
||||
* Tweak: Removed caption centering by default to allow alignment using Elementor (Props [@cirkut](https://github.com/cirkut))
|
||||
* Tweak: Removed `text-align` property from table elements to avoid alignment issue in RTL websites (Props [@ramiy](https://github.com/ramiy))
|
||||
* Tweak: Added `input[type="url"]` to CSS reset rules ([#109](https://github.com/elementor/hello-theme/issues/109))
|
||||
* Tweak: Update `Tested up to 5.4`
|
||||
|
||||
= 2.2.2 - 2019-12-23 =
|
||||
* Fix: Conflicts with minifier `cssnano` and CSS animations (Props [@CeliaRozalenM](https://github.com/CeliaRozalenM))
|
||||
* Fix: Max-width property is missing in `_archive.scss` (Props [@redpik](https://github.com/redpik))
|
||||
|
||||
= 2.2.1 - 2019-09-10 =
|
||||
* Tweak: Added max width to `wp-caption` ([#91](https://github.com/elementor/hello-theme/issues/91))
|
||||
* Tweak: Added support of `wp_body_open`
|
||||
|
||||
= 2.2.0 - 2019-07-22 =
|
||||
* Tweak: Added viewport content filter ([#49](https://github.com/elementor/hello-theme/issues/49))
|
||||
* Tweak: Added support Hide Title in Elementor
|
||||
* Tweak: Adhere to TRT's Theme Sniffer
|
||||
|
||||
= 2.1.2 - 2019-06-19 =
|
||||
* Tweak: Added theme version to enqueued styles
|
||||
* Tweak: Remove header tags with `hello_elementor_page_title` filter
|
||||
|
||||
= 2.1.1 - 2019-06-13 =
|
||||
* Tweak: Rename `Install Elementor Now` button to `Install Elementor`
|
||||
|
||||
= 2.1.0 - 2019-06-12 =
|
||||
* New: Added basic theme styling
|
||||
* New: Added tagline under the site name in header
|
||||
* New: Added `hello_elementor_page_title` filter for show\hide page title
|
||||
* New: Added `hello_elementor_enqueue_theme_style` filter for enqueue theme-specific style
|
||||
* Tweak: Hide site name & tagline if logo file is exist
|
||||
* Tweak: Hide default page list when there is no primary menu
|
||||
* Tweak: Removed `#main` in `archive.php`, `single.php`, `search.php` & `404.php` files
|
||||
* Tweak: Removed `#site-header` in `header.php` file
|
||||
* Tweak: Replaced `#top-menu` with `.site-navigation`
|
||||
* Tweak: Removed custom SCSS directory, it is recommended to use child theme instead of editing parent theme
|
||||
|
||||
= 2.0.7 - 2019-06-04 =
|
||||
* Tweak: Added nextpage support to `single.php`
|
||||
* Tweak: Keep both original and minified css files
|
||||
* Tweak: Removed `flexible-header`, `custom-colors`, `editor-style` tags
|
||||
|
||||
= 2.0.6 - 2019-05-08 =
|
||||
* Tweak: Removed irrelevant font family from `$font-family-base`
|
||||
* Fix: Minified `style.css` for better optimization
|
||||
|
||||
= 2.0.5 - 2019-05-21 =
|
||||
* New: Introducing [Hello Theme Child](https://github.com/elementor/hello-theme-child)
|
||||
* Tweak: Enqueue only parent theme stylesheet
|
||||
* Tweak: Added admin notice box for recommending Elementor plugin
|
||||
|
||||
= 2.0.4 - 2019-05-20 =
|
||||
* Tweak: Removed `accessibility-ready` tag from `style.css`
|
||||
|
||||
= 2.0.3 - 2019-05-19 =
|
||||
* Tweak: Removed `accessibility-ready` tag
|
||||
|
||||
= 2.0.2 - 2019-05-13 =
|
||||
* Tweak: Added `hello_elementor_content_width` filter, as per WordPress best practice
|
||||
|
||||
= 2.0.1 - 2019-05-12 =
|
||||
* Tweak: Updated theme screenshot (following comment by WP Theme Review team)
|
||||
|
||||
= 2.0.0 - 2019-05-12 =
|
||||
* Tweak: Updated theme screenshot (following comment by WP Theme Review team)
|
||||
* Tweak: Add Copyright & Image and Icon License sections in readme (following comment by WP Theme Review team)
|
||||
* Tweak: Remove duplicated call to `add_theme_support( 'custom-logo')`
|
||||
* Tweak: Readme file grammar & spelling
|
||||
* Tweak: Update `Tested up to 5.2`
|
||||
* Tweak: Change functions.php methods names prefix from `hello_elementor_theme_` to `hello_elementor_`
|
||||
* Tweak: Change hook names to fit theme's name. Old hooks are deprecated, users are urged to update their code where needed
|
||||
* Tweak: Update style for `img`, `textarea`, 'label'
|
||||
|
||||
= 1.2.0 - 2019-02-12 =
|
||||
* New: Added classic-editor.css for Classic editor
|
||||
* Tweak: A lot of changes to match theme review guidelines
|
||||
* Tweak: Updated theme screenshot
|
||||
|
||||
= 1.1.1 - 2019-01-28 =
|
||||
* Tweak: Removed padding reset for lists
|
||||
|
||||
= 1.1.0 - 2018-12-26 =
|
||||
* New: Added SCSS & do thorough style reset
|
||||
* New: Added readme file
|
||||
* New: Added `elementor_hello_theme_load_textdomain` filter for load theme's textdomain
|
||||
* New: Added `elementor_hello_theme_register_menus` filter for register the theme's default menu location
|
||||
* New: Added `elementor_hello_theme_add_theme_support` filter for register the various supported features
|
||||
* New: Added `elementor_hello_theme_add_woocommerce_support` filter for register woocommerce features, including product-gallery zoom, swipe & lightbox features
|
||||
* New: Added `elementor_hello_theme_enqueue_style` filter for enqueue style
|
||||
* New: Added `elementor_hello_theme_register_elementor_locations` filter for register elementor settings
|
||||
* New: Added child-theme preparations
|
||||
* New: Added template part search
|
||||
* New: Added translation support
|
||||
* Tweak: Re-write of already existing template parts
|
||||
|
||||
= 1.0.0 - 2018-03-19 =
|
||||
* Initial Public Release
|
||||
BIN
wp-content/themes/hello-elementor/screenshot.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
14
wp-content/themes/hello-elementor/sidebar.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying sidebar.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* This file is here to avoid the Deprecated Message for sidebar by wp-includes/theme-compat/sidebar.php.
|
||||
*/
|
||||
601
wp-content/themes/hello-elementor/style.css
Normal file
@@ -0,0 +1,601 @@
|
||||
/*
|
||||
Theme Name: Hello Elementor
|
||||
Theme URI: https://elementor.com/hello-theme/?utm_source=wp-themes&utm_campaign=theme-uri&utm_medium=wp-dash
|
||||
Description: Hello Elementor is a lightweight and minimalist WordPress theme that was built specifically to work seamlessly with the Elementor site builder plugin. The theme is free, open-source, and designed for users who want a flexible, easy-to-use, and customizable website. The theme, which is optimized for performance, provides a solid foundation for users to build their own unique designs using the Elementor drag-and-drop site builder. Its simplicity and flexibility make it a great choice for both beginners and experienced Web Creators.
|
||||
Author: Elementor Team
|
||||
Author URI: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
|
||||
Version: 3.0.1
|
||||
Stable tag: 3.0.1
|
||||
Requires at least: 6.0
|
||||
Tested up to: 6.4
|
||||
Requires PHP: 7.3
|
||||
License: GNU General Public License v3 or later.
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
Text Domain: hello-elementor
|
||||
Tags: accessibility-ready, flexible-header, custom-colors, custom-menu, custom-logo, featured-images, rtl-language-support, threaded-comments, translation-ready,
|
||||
*/
|
||||
/**
|
||||
* Loading first in the style.scss & classic-editor.scss
|
||||
*/
|
||||
/**
|
||||
* Document basic styling
|
||||
* Inspired by Normalize.css, HTML5 Boilerplate & Bootstrap Reboot Projects under MIT License
|
||||
*/
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
* 3. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
|
||||
*/
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box; /* 3 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
*/
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #333333;
|
||||
background-color: #fff;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-block-start: 0.5rem;
|
||||
margin-block-end: 1rem;
|
||||
font-family: inherit;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0.9rem;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
*/
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
*/
|
||||
a {
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
color: #CC3366;
|
||||
}
|
||||
a:hover, a:active {
|
||||
color: #333366;
|
||||
}
|
||||
a:not([href]):not([tabindex]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:not([href]):not([tabindex]):focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
abbr[title] {
|
||||
border-block-end: none; /* 1 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
*/
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
img {
|
||||
border-style: none;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
*/
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
line-height: 1.4;
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
*/
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Print
|
||||
*/
|
||||
@media print {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster */
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
a,
|
||||
a:visited {
|
||||
text-decoration: underline;
|
||||
}
|
||||
a[href]:after {
|
||||
content: " (" attr(href) ")";
|
||||
}
|
||||
abbr[title]:after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
a[href^="#"]:after,
|
||||
a[href^="javascript:"]:after {
|
||||
content: "";
|
||||
}
|
||||
pre {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
pre,
|
||||
blockquote {
|
||||
break-inside: avoid;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr,
|
||||
img {
|
||||
break-inside: avoid;
|
||||
}
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
h2,
|
||||
h3 {
|
||||
break-after: avoid;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Form styling
|
||||
*/
|
||||
label {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 1rem; /* 1 */
|
||||
line-height: 1.5; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
input[type=text],
|
||||
input[type=date],
|
||||
input[type=email],
|
||||
input[type=number],
|
||||
input[type=password],
|
||||
input[type=search],
|
||||
input[type=tel],
|
||||
input[type=url],
|
||||
select,
|
||||
textarea {
|
||||
width: 100%;
|
||||
border: solid 1px #666666;
|
||||
border-radius: 3px;
|
||||
padding: 0.5rem 1rem;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
input[type=text]:focus,
|
||||
input[type=date]:focus,
|
||||
input[type=email]:focus,
|
||||
input[type=number]:focus,
|
||||
input[type=password]:focus,
|
||||
input[type=search]:focus,
|
||||
input[type=tel]:focus,
|
||||
input[type=url]:focus,
|
||||
select:focus,
|
||||
textarea:focus {
|
||||
border-color: #333333;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
button,
|
||||
[type=button],
|
||||
[type=reset],
|
||||
[type=submit] {
|
||||
width: auto;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
button::-moz-focus-inner,
|
||||
[type=button]::-moz-focus-inner,
|
||||
[type=reset]::-moz-focus-inner,
|
||||
[type=submit]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
button:-moz-focusring,
|
||||
[type=button]:-moz-focusring,
|
||||
[type=reset]:-moz-focusring,
|
||||
[type=submit]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
button,
|
||||
[type=submit],
|
||||
[type=button] {
|
||||
display: inline-block;
|
||||
font-weight: 400;
|
||||
color: #CC3366;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
user-select: none;
|
||||
background-color: transparent;
|
||||
border: 1px solid #CC3366;
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 1rem;
|
||||
border-radius: 3px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
button:focus,
|
||||
[type=submit]:focus,
|
||||
[type=button]:focus {
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
button:hover, button:focus,
|
||||
[type=submit]:hover,
|
||||
[type=submit]:focus,
|
||||
[type=button]:hover,
|
||||
[type=button]:focus {
|
||||
color: #ffffff;
|
||||
background-color: #CC3366;
|
||||
text-decoration: none;
|
||||
}
|
||||
button:not(:disabled),
|
||||
[type=submit]:not(:disabled),
|
||||
[type=button]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
[type=checkbox],
|
||||
[type=radio] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
[type=number]::-webkit-inner-spin-button,
|
||||
[type=number]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
[type=search] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
[type=search]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
select {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Table styling
|
||||
*/
|
||||
table {
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
margin-block-end: 15px;
|
||||
font-size: 0.9em;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table th,
|
||||
table td {
|
||||
padding: 15px;
|
||||
line-height: 1.5;
|
||||
vertical-align: top;
|
||||
border: 1px solid rgba(128, 128, 128, 0.5019607843);
|
||||
}
|
||||
table th {
|
||||
font-weight: bold;
|
||||
}
|
||||
table thead th,
|
||||
table tfoot th {
|
||||
font-size: 1em;
|
||||
}
|
||||
table caption + thead tr:first-child th,
|
||||
table caption + thead tr:first-child td,
|
||||
table caption + thead tr:first-child th,
|
||||
table caption + thead tr:first-child td,
|
||||
table colgroup + thead tr:first-child th,
|
||||
table colgroup + thead tr:first-child td,
|
||||
table colgroup + thead tr:first-child th,
|
||||
table colgroup + thead tr:first-child td,
|
||||
table thead:first-child tr:first-child th,
|
||||
table thead:first-child tr:first-child td,
|
||||
table thead:first-child tr:first-child th,
|
||||
table thead:first-child tr:first-child td {
|
||||
border-block-start: 1px solid rgba(128, 128, 128, 0.5019607843);
|
||||
}
|
||||
table tbody > tr:nth-child(odd) > td,
|
||||
table tbody > tr:nth-child(odd) > th {
|
||||
background-color: rgba(128, 128, 128, 0.0705882353);
|
||||
}
|
||||
table tbody tr:hover > td,
|
||||
table tbody tr:hover > th {
|
||||
background-color: rgba(128, 128, 128, 0.1019607843);
|
||||
}
|
||||
table tbody + tbody {
|
||||
border-block-start: 2px solid rgba(128, 128, 128, 0.5019607843);
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
table table {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
table table th,
|
||||
table table td {
|
||||
padding: 7px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
table table th {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List styling
|
||||
*/
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
ol,
|
||||
ul,
|
||||
li {
|
||||
margin-block-start: 0;
|
||||
margin-block-end: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 100%;
|
||||
vertical-align: baseline;
|
||||
background: transparent;
|
||||
}
|
||||
1
wp-content/themes/hello-elementor/style.min.css
vendored
Normal file
24
wp-content/themes/hello-elementor/template-parts/404.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (not found).
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<main id="content" class="site-main">
|
||||
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<header class="page-header">
|
||||
<h1 class="entry-title"><?php echo esc_html__( 'The page can’t be found.', 'hello-elementor' ); ?></h1>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="page-content">
|
||||
<p><?php echo esc_html__( 'It looks like nothing was found at this location.', 'hello-elementor' ); ?></p>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
55
wp-content/themes/hello-elementor/template-parts/archive.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying archive pages.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<main id="content" class="site-main">
|
||||
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<header class="page-header">
|
||||
<?php
|
||||
the_archive_title( '<h1 class="entry-title">', '</h1>' );
|
||||
the_archive_description( '<p class="archive-description">', '</p>' );
|
||||
?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="page-content">
|
||||
<?php
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
$post_link = get_permalink();
|
||||
?>
|
||||
<article class="post">
|
||||
<?php
|
||||
printf( '<h2 class="%s"><a href="%s">%s</a></h2>', 'entry-title', esc_url( $post_link ), wp_kses_post( get_the_title() ) );
|
||||
if ( has_post_thumbnail() ) {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $post_link ), get_the_post_thumbnail( $post, 'large' ) );
|
||||
}
|
||||
the_excerpt();
|
||||
?>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php wp_link_pages(); ?>
|
||||
|
||||
<?php
|
||||
global $wp_query;
|
||||
if ( $wp_query->max_num_pages > 1 ) :
|
||||
?>
|
||||
<nav class="pagination">
|
||||
<?php /* Translators: HTML arrow */ ?>
|
||||
<div class="nav-previous"><?php next_posts_link( sprintf( __( '%s older', 'hello-elementor' ), '<span class="meta-nav">←</span>' ) ); ?></div>
|
||||
<?php /* Translators: HTML arrow */ ?>
|
||||
<div class="nav-next"><?php previous_posts_link( sprintf( __( 'newer %s', 'hello-elementor' ), '<span class="meta-nav">→</span>' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
</main>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying footer.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
$site_name = get_bloginfo( 'name' );
|
||||
$tagline = get_bloginfo( 'description', 'display' );
|
||||
$footer_class = did_action( 'elementor/loaded' ) ? esc_attr( hello_get_footer_layout_class() ) : '';
|
||||
$footer_nav_menu = wp_nav_menu( [
|
||||
'theme_location' => 'menu-2',
|
||||
'fallback_cb' => false,
|
||||
'echo' => false,
|
||||
] );
|
||||
?>
|
||||
<footer id="site-footer" class="site-footer dynamic-footer <?php echo esc_attr( $footer_class ); ?>">
|
||||
<div class="footer-inner">
|
||||
<div class="site-branding show-<?php echo esc_attr( hello_elementor_get_setting( 'hello_footer_logo_type' ) ); ?>">
|
||||
<?php if ( has_custom_logo() && ( 'title' !== hello_elementor_get_setting( 'hello_footer_logo_type' ) || $is_editor ) ) : ?>
|
||||
<div class="site-logo <?php echo esc_attr( hello_show_or_hide( 'hello_footer_logo_display' ) ); ?>">
|
||||
<?php the_custom_logo(); ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
if ( $site_name && ( 'logo' !== hello_elementor_get_setting( 'hello_footer_logo_type' ) ) || $is_editor ) : ?>
|
||||
<h4 class="site-title <?php echo esc_attr( hello_show_or_hide( 'hello_footer_logo_display' ) ); ?>">
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr__( 'Home', 'hello-elementor' ); ?>" rel="home">
|
||||
<?php echo esc_html( $site_name ); ?>
|
||||
</a>
|
||||
</h4>
|
||||
<?php endif;
|
||||
|
||||
if ( $tagline || $is_editor ) : ?>
|
||||
<p class="site-description <?php echo esc_attr( hello_show_or_hide( 'hello_footer_tagline_display' ) ); ?>">
|
||||
<?php echo esc_html( $tagline ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $footer_nav_menu ) : ?>
|
||||
<nav class="site-navigation <?php echo esc_attr( hello_show_or_hide( 'hello_footer_menu_display' ) ); ?>">
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $footer_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( '' !== hello_elementor_get_setting( 'hello_footer_copyright_text' ) || $is_editor ) : ?>
|
||||
<div class="copyright <?php echo esc_attr( hello_show_or_hide( 'hello_footer_copyright_display' ) ); ?>">
|
||||
<p><?php echo wp_kses_post( hello_elementor_get_setting( 'hello_footer_copyright_text' ) ); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying header.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! hello_get_header_display() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
$site_name = get_bloginfo( 'name' );
|
||||
$tagline = get_bloginfo( 'description', 'display' );
|
||||
$header_nav_menu = wp_nav_menu( [
|
||||
'theme_location' => 'menu-1',
|
||||
'fallback_cb' => false,
|
||||
'echo' => false,
|
||||
] );
|
||||
?>
|
||||
<header id="site-header" class="site-header dynamic-header <?php echo esc_attr( hello_get_header_layout_class() ); ?>">
|
||||
<div class="header-inner">
|
||||
<div class="site-branding show-<?php echo esc_attr( hello_elementor_get_setting( 'hello_header_logo_type' ) ); ?>">
|
||||
<?php if ( has_custom_logo() && ( 'title' !== hello_elementor_get_setting( 'hello_header_logo_type' ) || $is_editor ) ) : ?>
|
||||
<div class="site-logo <?php echo esc_attr( hello_show_or_hide( 'hello_header_logo_display' ) ); ?>">
|
||||
<?php the_custom_logo(); ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
if ( $site_name && ( 'logo' !== hello_elementor_get_setting( 'hello_header_logo_type' ) || $is_editor ) ) : ?>
|
||||
<h1 class="site-title <?php echo esc_attr( hello_show_or_hide( 'hello_header_logo_display' ) ); ?>">
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr__( 'Home', 'hello-elementor' ); ?>" rel="home">
|
||||
<?php echo esc_html( $site_name ); ?>
|
||||
</a>
|
||||
</h1>
|
||||
<?php endif;
|
||||
|
||||
if ( $tagline && ( hello_elementor_get_setting( 'hello_header_tagline_display' ) || $is_editor ) ) : ?>
|
||||
<p class="site-description <?php echo esc_attr( hello_show_or_hide( 'hello_header_tagline_display' ) ); ?>">
|
||||
<?php echo esc_html( $tagline ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $header_nav_menu ) : ?>
|
||||
<nav class="site-navigation <?php echo esc_attr( hello_show_or_hide( 'hello_header_menu_display' ) ); ?>">
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $header_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<div class="site-navigation-toggle-holder <?php echo esc_attr( hello_show_or_hide( 'hello_header_menu_display' ) ); ?>">
|
||||
<div class="site-navigation-toggle" role="button" tabindex="0">
|
||||
<i class="eicon-menu-bar" aria-hidden="true"></i>
|
||||
<span class="screen-reader-text"><?php echo esc_html__( 'Menu', 'hello-elementor' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="site-navigation-dropdown <?php echo esc_attr( hello_show_or_hide( 'hello_header_menu_display' ) ); ?>">
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $header_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</header>
|
||||
27
wp-content/themes/hello-elementor/template-parts/footer.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying footer.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$footer_nav_menu = wp_nav_menu( [
|
||||
'theme_location' => 'menu-2',
|
||||
'fallback_cb' => false,
|
||||
'echo' => false,
|
||||
] );
|
||||
?>
|
||||
<footer id="site-footer" class="site-footer">
|
||||
<?php if ( $footer_nav_menu ) : ?>
|
||||
<nav class="site-navigation">
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $footer_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
51
wp-content/themes/hello-elementor/template-parts/header.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying header.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
$site_name = get_bloginfo( 'name' );
|
||||
$tagline = get_bloginfo( 'description', 'display' );
|
||||
$header_nav_menu = wp_nav_menu( [
|
||||
'theme_location' => 'menu-1',
|
||||
'fallback_cb' => false,
|
||||
'echo' => false,
|
||||
] );
|
||||
?>
|
||||
|
||||
<header id="site-header" class="site-header">
|
||||
|
||||
<div class="site-branding">
|
||||
<?php
|
||||
if ( has_custom_logo() ) {
|
||||
the_custom_logo();
|
||||
} elseif ( $site_name ) {
|
||||
?>
|
||||
<h1 class="site-title">
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr__( 'Home', 'hello-elementor' ); ?>" rel="home">
|
||||
<?php echo esc_html( $site_name ); ?>
|
||||
</a>
|
||||
</h1>
|
||||
<p class="site-description">
|
||||
<?php
|
||||
if ( $tagline ) {
|
||||
echo esc_html( $tagline );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $header_nav_menu ) : ?>
|
||||
<nav class="site-navigation">
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $header_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
61
wp-content/themes/hello-elementor/template-parts/search.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying search results.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<main id="content" class="site-main">
|
||||
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<header class="page-header">
|
||||
<h1 class="entry-title">
|
||||
<?php echo esc_html__( 'Search results for: ', 'hello-elementor' ); ?>
|
||||
<span><?php echo get_search_query(); ?></span>
|
||||
</h1>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="page-content">
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
$post_link = get_permalink();
|
||||
?>
|
||||
<article class="post">
|
||||
<?php
|
||||
printf( '<h2 class="%s"><a href="%s">%s</a></h2>', 'entry-title', esc_url( $post_link ), wp_kses_post( get_the_title() ) );
|
||||
if ( has_post_thumbnail() ) {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $post_link ), get_the_post_thumbnail( $post, 'large' ) );
|
||||
}
|
||||
the_excerpt();
|
||||
?>
|
||||
</article>
|
||||
<?php
|
||||
endwhile;
|
||||
?>
|
||||
<?php else : ?>
|
||||
<p><?php echo esc_html__( 'It seems we can\'t find what you\'re looking for.', 'hello-elementor' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php wp_link_pages(); ?>
|
||||
|
||||
<?php
|
||||
global $wp_query;
|
||||
if ( $wp_query->max_num_pages > 1 ) :
|
||||
?>
|
||||
<nav class="pagination">
|
||||
<?php /* Translators: HTML arrow */ ?>
|
||||
<div class="nav-previous"><?php next_posts_link( sprintf( __( '%s older', 'hello-elementor' ), '<span class="meta-nav">←</span>' ) ); ?></div>
|
||||
<?php /* Translators: HTML arrow */ ?>
|
||||
<div class="nav-next"><?php previous_posts_link( sprintf( __( 'newer %s', 'hello-elementor' ), '<span class="meta-nav">→</span>' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
</main>
|
||||
37
wp-content/themes/hello-elementor/template-parts/single.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying singular post-types: posts, pages and user-defined custom post types.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<main id="content" <?php post_class( 'site-main' ); ?>>
|
||||
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<header class="page-header">
|
||||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="page-content">
|
||||
<?php the_content(); ?>
|
||||
<div class="post-tags">
|
||||
<?php the_tags( '<span class="tag-links">' . esc_html__( 'Tagged ', 'hello-elementor' ), null, '</span>' ); ?>
|
||||
</div>
|
||||
<?php wp_link_pages(); ?>
|
||||
</div>
|
||||
|
||||
<?php comments_template(); ?>
|
||||
|
||||
</main>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
306
wp-content/themes/hello-elementor/theme.css
Normal file
@@ -0,0 +1,306 @@
|
||||
@charset "UTF-8";
|
||||
/**
|
||||
* Loading first in the style.scss & classic-editor.scss
|
||||
*/
|
||||
/**
|
||||
* General - https://wordpress.org/documentation/article/css/
|
||||
*/
|
||||
.page-content a,
|
||||
.comments-area a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.alignright {
|
||||
float: right;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
.alignleft {
|
||||
float: left;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.aligncenter {
|
||||
clear: both;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.alignwide {
|
||||
margin-left: -80px;
|
||||
margin-right: -80px;
|
||||
}
|
||||
|
||||
.alignfull {
|
||||
margin-left: calc(50% - 50vw);
|
||||
margin-right: calc(50% - 50vw);
|
||||
max-width: 100vw;
|
||||
width: 100vw;
|
||||
}
|
||||
.alignfull img {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.wp-caption {
|
||||
margin-block-end: 1.25rem;
|
||||
max-width: 100%;
|
||||
}
|
||||
.wp-caption.alignleft {
|
||||
margin: 5px 20px 20px 0;
|
||||
}
|
||||
.wp-caption.alignright {
|
||||
margin: 5px 0 20px 20px;
|
||||
}
|
||||
.wp-caption img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.wp-caption-text {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.gallery-caption {
|
||||
display: block;
|
||||
font-size: 0.8125rem;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.bypostauthor {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.post-password-form p {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.post-password-form [type=submit] {
|
||||
margin-inline-start: 3px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility styles
|
||||
*/
|
||||
.screen-reader-text {
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute !important;
|
||||
width: 1px;
|
||||
word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
|
||||
}
|
||||
.screen-reader-text:focus {
|
||||
background-color: #eeeeee;
|
||||
clip: auto !important;
|
||||
clip-path: none;
|
||||
color: #333333;
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
height: auto;
|
||||
left: 5px;
|
||||
line-height: normal;
|
||||
padding: 15px 23px 14px;
|
||||
text-decoration: none;
|
||||
top: 5px;
|
||||
width: auto;
|
||||
z-index: 100000; /* Above WP toolbar. */
|
||||
}
|
||||
|
||||
/**
|
||||
* Post item in archive pages
|
||||
*/
|
||||
.post .entry-title a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.post .wp-post-image {
|
||||
width: 100%;
|
||||
max-height: 500px;
|
||||
object-fit: cover;
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.post .wp-post-image {
|
||||
max-height: 400px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 575px) {
|
||||
.post .wp-post-image {
|
||||
max-height: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Comments
|
||||
*/
|
||||
#comments .comment-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#comments .comment,
|
||||
#comments .pingback {
|
||||
position: relative;
|
||||
}
|
||||
#comments .comment .comment-body,
|
||||
#comments .pingback .comment-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-block-start: 30px;
|
||||
padding-block-end: 30px;
|
||||
padding-inline-start: 60px;
|
||||
padding-inline-end: 0;
|
||||
border-block-end: 1px solid #cccccc;
|
||||
}
|
||||
#comments .comment .avatar,
|
||||
#comments .pingback .avatar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
border-radius: 50%;
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
html[dir=rtl] #comments .comment .avatar, body.rtl #comments .comment .avatar,
|
||||
html[dir=rtl] #comments .pingback .avatar,
|
||||
body.rtl #comments .pingback .avatar {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#comments .comment-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-block-end: 0.9rem;
|
||||
}
|
||||
#comments .reply,
|
||||
#comments .comment-metadata {
|
||||
font-size: 11px;
|
||||
line-height: 1;
|
||||
}
|
||||
#comments .children {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding-inline-start: 30px;
|
||||
}
|
||||
#comments .children li:last-child {
|
||||
padding-block-end: 0;
|
||||
}
|
||||
#comments ol.comment-list .children:before {
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
line-height: 100%;
|
||||
content: "↪";
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
left: 0;
|
||||
width: auto;
|
||||
}
|
||||
html[dir=rtl] #comments ol.comment-list .children:before, body.rtl #comments ol.comment-list .children:before {
|
||||
content: "↩";
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#comments .comment-author,
|
||||
#comments .comment-metadata {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
#comments .comment .comment-body {
|
||||
padding: 30px 0;
|
||||
}
|
||||
#comments .children {
|
||||
padding-inline-start: 20px;
|
||||
}
|
||||
#comments .comment .avatar {
|
||||
position: inherit;
|
||||
float: left;
|
||||
}
|
||||
html[dir=rtl] #comments .comment .avatar, body.rtl #comments .comment .avatar {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Responsive layouts
|
||||
*/
|
||||
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
|
||||
margin-inline-start: auto;
|
||||
margin-inline-end: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 575px) {
|
||||
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
|
||||
padding-inline-start: 10px;
|
||||
padding-inline-end: 10px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 576px) {
|
||||
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
|
||||
max-width: 500px;
|
||||
}
|
||||
.site-header.header-full-width .header-inner {
|
||||
max-width: 100%;
|
||||
}
|
||||
.site-footer.footer-full-width .footer-inner {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
|
||||
max-width: 600px;
|
||||
}
|
||||
.site-header.header-full-width {
|
||||
max-width: 100%;
|
||||
}
|
||||
.site-footer.footer-full-width {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
|
||||
max-width: 800px;
|
||||
}
|
||||
.site-header.header-full-width {
|
||||
max-width: 100%;
|
||||
}
|
||||
.site-footer.footer-full-width {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1200px) {
|
||||
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
|
||||
max-width: 1140px;
|
||||
}
|
||||
.site-header.header-full-width {
|
||||
max-width: 100%;
|
||||
}
|
||||
.site-footer.footer-full-width {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
.site-header + .elementor {
|
||||
min-height: calc(100vh - 320px);
|
||||
}
|
||||
1
wp-content/themes/hello-elementor/theme.min.css
vendored
Normal file
2
wp-content/themes/index.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
@@ -0,0 +1,6 @@
|
||||
.wp-block-button.is-style-outline
|
||||
> .wp-block-button__link:not(.has-text-color, .has-background):hover {
|
||||
background-color: var(--wp--preset--color--contrast-2, var(--wp--preset--color--contrast, transparent));
|
||||
color: var(--wp--preset--color--base);
|
||||
border-color: var(--wp--preset--color--contrast-2, var(--wp--preset--color--contrast, currentColor));
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright (c) 2002-2011, David J. Perry (hospes02@scholarsfonts.net)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2022 The Instrument Sans Project Authors (https://github.com/Instrument/instrument-sans)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
93
wp-content/themes/twentytwentyfour/assets/fonts/jost/OFL.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2020 The Jost Project Authors (https://github.com/indestructible-type)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
BIN
wp-content/themes/twentytwentyfour/assets/images/museum.webp
Normal file
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 65 KiB |
BIN
wp-content/themes/twentytwentyfour/assets/images/windows.webp
Normal file
|
After Width: | Height: | Size: 123 KiB |
206
wp-content/themes/twentytwentyfour/functions.php
Normal file
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
/**
|
||||
* Twenty Twenty-Four functions and definitions
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/theme-functions/
|
||||
*
|
||||
* @package Twenty Twenty-Four
|
||||
* @since Twenty Twenty-Four 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Register block styles.
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'twentytwentyfour_block_styles' ) ) :
|
||||
/**
|
||||
* Register custom block styles
|
||||
*
|
||||
* @since Twenty Twenty-Four 1.0
|
||||
* @return void
|
||||
*/
|
||||
function twentytwentyfour_block_styles() {
|
||||
|
||||
register_block_style(
|
||||
'core/details',
|
||||
array(
|
||||
'name' => 'arrow-icon-details',
|
||||
'label' => __( 'Arrow icon', 'twentytwentyfour' ),
|
||||
/*
|
||||
* Styles for the custom Arrow icon style of the Details block
|
||||
*/
|
||||
'inline_style' => '
|
||||
.is-style-arrow-icon-details {
|
||||
padding-top: var(--wp--preset--spacing--10);
|
||||
padding-bottom: var(--wp--preset--spacing--10);
|
||||
}
|
||||
|
||||
.is-style-arrow-icon-details summary {
|
||||
list-style-type: "\2193\00a0\00a0\00a0";
|
||||
}
|
||||
|
||||
.is-style-arrow-icon-details[open]>summary {
|
||||
list-style-type: "\2192\00a0\00a0\00a0";
|
||||
}',
|
||||
)
|
||||
);
|
||||
register_block_style(
|
||||
'core/post-terms',
|
||||
array(
|
||||
'name' => 'pill',
|
||||
'label' => __( 'Pill', 'twentytwentyfour' ),
|
||||
/*
|
||||
* Styles variation for post terms
|
||||
* https://github.com/WordPress/gutenberg/issues/24956
|
||||
*/
|
||||
'inline_style' => '
|
||||
.is-style-pill a,
|
||||
.is-style-pill span:not([class], [data-rich-text-placeholder]) {
|
||||
display: inline-block;
|
||||
background-color: var(--wp--preset--color--base-2);
|
||||
padding: 0.375rem 0.875rem;
|
||||
border-radius: var(--wp--preset--spacing--20);
|
||||
}
|
||||
|
||||
.is-style-pill a:hover {
|
||||
background-color: var(--wp--preset--color--contrast-3);
|
||||
}',
|
||||
)
|
||||
);
|
||||
register_block_style(
|
||||
'core/list',
|
||||
array(
|
||||
'name' => 'checkmark-list',
|
||||
'label' => __( 'Checkmark', 'twentytwentyfour' ),
|
||||
/*
|
||||
* Styles for the custom checkmark list block style
|
||||
* https://github.com/WordPress/gutenberg/issues/51480
|
||||
*/
|
||||
'inline_style' => '
|
||||
ul.is-style-checkmark-list {
|
||||
list-style-type: "\2713";
|
||||
}
|
||||
|
||||
ul.is-style-checkmark-list li {
|
||||
padding-inline-start: 1ch;
|
||||
}',
|
||||
)
|
||||
);
|
||||
register_block_style(
|
||||
'core/navigation-link',
|
||||
array(
|
||||
'name' => 'arrow-link',
|
||||
'label' => __( 'With arrow', 'twentytwentyfour' ),
|
||||
/*
|
||||
* Styles for the custom arrow nav link block style
|
||||
*/
|
||||
'inline_style' => '
|
||||
.is-style-arrow-link .wp-block-navigation-item__label:after {
|
||||
content: "\2197";
|
||||
padding-inline-start: 0.25rem;
|
||||
vertical-align: middle;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}',
|
||||
)
|
||||
);
|
||||
register_block_style(
|
||||
'core/heading',
|
||||
array(
|
||||
'name' => 'asterisk',
|
||||
'label' => __( 'With asterisk', 'twentytwentyfour' ),
|
||||
'inline_style' => "
|
||||
.is-style-asterisk:before {
|
||||
content: '';
|
||||
width: 1.5rem;
|
||||
height: 3rem;
|
||||
background: var(--wp--preset--color--contrast-2, currentColor);
|
||||
clip-path: path('M11.93.684v8.039l5.633-5.633 1.216 1.23-5.66 5.66h8.04v1.737H13.2l5.701 5.701-1.23 1.23-5.742-5.742V21h-1.737v-8.094l-5.77 5.77-1.23-1.217 5.743-5.742H.842V9.98h8.162l-5.701-5.7 1.23-1.231 5.66 5.66V.684h1.737Z');
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Hide the asterisk if the heading has no content, to avoid using empty headings to display the asterisk only, which is an A11Y issue */
|
||||
.is-style-asterisk:empty:before {
|
||||
content: none;
|
||||
}
|
||||
|
||||
.is-style-asterisk:-moz-only-whitespace:before {
|
||||
content: none;
|
||||
}
|
||||
|
||||
.is-style-asterisk.has-text-align-center:before {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.is-style-asterisk.has-text-align-right:before {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.rtl .is-style-asterisk.has-text-align-left:before {
|
||||
margin-right: auto;
|
||||
}",
|
||||
)
|
||||
);
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'init', 'twentytwentyfour_block_styles' );
|
||||
|
||||
/**
|
||||
* Enqueue block stylesheets.
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'twentytwentyfour_block_stylesheets' ) ) :
|
||||
/**
|
||||
* Enqueue custom block stylesheets
|
||||
*
|
||||
* @since Twenty Twenty-Four 1.0
|
||||
* @return void
|
||||
*/
|
||||
function twentytwentyfour_block_stylesheets() {
|
||||
/**
|
||||
* The wp_enqueue_block_style() function allows us to enqueue a stylesheet
|
||||
* for a specific block. These will only get loaded when the block is rendered
|
||||
* (both in the editor and on the front end), improving performance
|
||||
* and reducing the amount of data requested by visitors.
|
||||
*
|
||||
* See https://make.wordpress.org/core/2021/12/15/using-multiple-stylesheets-per-block/ for more info.
|
||||
*/
|
||||
wp_enqueue_block_style(
|
||||
'core/button',
|
||||
array(
|
||||
'handle' => 'twentytwentyfour-button-style-outline',
|
||||
'src' => get_parent_theme_file_uri( 'assets/css/button-outline.css' ),
|
||||
'ver' => wp_get_theme( get_template() )->get( 'Version' ),
|
||||
'path' => get_parent_theme_file_path( 'assets/css/button-outline.css' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'init', 'twentytwentyfour_block_stylesheets' );
|
||||
|
||||
/**
|
||||
* Register pattern categories.
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'twentytwentyfour_pattern_categories' ) ) :
|
||||
/**
|
||||
* Register pattern categories
|
||||
*
|
||||
* @since Twenty Twenty-Four 1.0
|
||||
* @return void
|
||||
*/
|
||||
function twentytwentyfour_pattern_categories() {
|
||||
|
||||
register_block_pattern_category(
|
||||
'twentytwentyfour_page',
|
||||
array(
|
||||
'label' => _x( 'Pages', 'Block pattern category', 'twentytwentyfour' ),
|
||||
'description' => __( 'A collection of full page layouts.', 'twentytwentyfour' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'init', 'twentytwentyfour_pattern_categories' );
|
||||
1
wp-content/themes/twentytwentyfour/parts/footer.html
Normal file
@@ -0,0 +1 @@
|
||||
<!-- wp:pattern {"slug":"twentytwentyfour/footer"} /-->
|
||||
26
wp-content/themes/twentytwentyfour/parts/header.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"20px","bottom":"20px"}}},"backgroundColor":"base","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignwide has-base-background-color has-background"
|
||||
style="padding-top:20px;padding-bottom:20px">
|
||||
<!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between","flexWrap":"wrap"}} -->
|
||||
<div class="wp-block-group alignwide">
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:site-logo {"width":60 } /-->
|
||||
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:site-title {"level":0} /-->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"left"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:navigation {"layout":{"type":"flex","justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}}} /-->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
1
wp-content/themes/twentytwentyfour/parts/post-meta.html
Normal file
@@ -0,0 +1 @@
|
||||
<!-- wp:pattern {"slug":"twentytwentyfour/hidden-post-meta"} /-->
|
||||
1
wp-content/themes/twentytwentyfour/parts/sidebar.html
Normal file
@@ -0,0 +1 @@
|
||||
<!-- wp:pattern {"slug":"twentytwentyfour/hidden-sidebar"} /-->
|
||||
55
wp-content/themes/twentytwentyfour/patterns/banner-hero.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Hero
|
||||
* Slug: twentytwentyfour/banner-hero
|
||||
* Categories: banner, call-to-action, featured
|
||||
* Viewport width: 1400
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"layout":{"type":"constrained","contentSize":"","wideSize":""}} -->
|
||||
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}},"layout":{"type":"constrained","contentSize":"565px"}} -->
|
||||
<div class="wp-block-group">
|
||||
|
||||
<!-- wp:heading {"textAlign":"center","fontSize":"x-large","level":1} -->
|
||||
<h1 class="wp-block-heading has-text-align-center has-x-large-font-size"><?php echo esc_html_x( 'A commitment to innovation and sustainability', 'Heading of the hero section', 'twentytwentyfour' ); ?></h1>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:spacer {"height":"1.25rem"} -->
|
||||
<div style="height:1.25rem" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo esc_html_x( 'Études is a pioneering firm that seamlessly merges creativity and functionality to redefine architectural excellence.', 'Content of the hero section', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:spacer {"height":"1.25rem"} -->
|
||||
<div style="height:1.25rem" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
|
||||
<div class="wp-block-buttons">
|
||||
<!-- wp:button -->
|
||||
<div class="wp-block-button">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'About us', 'Button text of the hero section', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
</div>
|
||||
<!-- /wp:buttons -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|30","style":{"layout":{}}} -->
|
||||
<div style="height:var(--wp--preset--spacing--30)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"align":"wide","sizeSlug":"full","linkDestination":"none","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image alignwide size-full is-style-rounded">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/building-exterior.webp" alt="<?php esc_attr_e( 'Building exterior in Toronto, Canada', 'twentytwentyfour' ); ?>" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Project description
|
||||
* Slug: twentytwentyfour/banner-project-description
|
||||
* Categories: featured, banner, about, portfolio
|
||||
* Viewport width: 1400
|
||||
*/
|
||||
?>
|
||||
<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"backgroundColor":"accent-2","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull has-accent-2-background-color has-background" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"align":"wide"} -->
|
||||
<div class="wp-block-columns alignwide">
|
||||
<!-- wp:column {"width":"40%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:40%">
|
||||
<!-- wp:paragraph {"style":{"layout":{"selfStretch":"fixed","flexSize":"50%"}}} -->
|
||||
<p><?php echo esc_html_x( 'Art Gallery — Overview', 'Sample title for a project or post', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"width":"60%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:60%">
|
||||
|
||||
<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.2"}},"fontSize":"x-large","fontFamily":"heading"} -->
|
||||
<p class="has-heading-font-family has-x-large-font-size" style="line-height:1.2"><?php echo esc_html_x( 'This transformative project seeks to enhance the gallery\'s infrastructure, accessibility, and exhibition spaces while preserving its rich cultural heritage.', 'Sample descriptive text for a project or post.', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|40"} -->
|
||||
<div style="height:var(--wp--preset--spacing--40)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"align":"wide","sizeSlug":"large","linkDestination":"none","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image alignwide size-large is-style-rounded">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/hotel-facade.webp" alt="<?php esc_attr_e( 'Hyatt Regency San Francisco, San Francisco, United States', 'twentytwentyfour' ); ?>" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Call to action with image on right
|
||||
* Slug: twentytwentyfour/cta-content-image-on-right
|
||||
* Categories: call-to-action, banner
|
||||
* Viewport width: 1400
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"verticalAlignment":"center","align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|50","left":"var:preset|spacing|50"}}}} -->
|
||||
<div class="wp-block-columns alignwide are-vertically-aligned-center">
|
||||
<!-- wp:column {"verticalAlignment":"center","width":"50%"} -->
|
||||
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:50%">
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading"><?php echo esc_html_x( 'Enhance your architectural journey with the Études Architect app.', 'Sample heading', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:list {"style":{"typography":{"lineHeight":"1.75"}},"className":"is-style-checkmark-list"} -->
|
||||
<ul class="is-style-checkmark-list" style="line-height:1.75">
|
||||
<!-- wp:list-item -->
|
||||
<li><?php echo esc_html_x( 'Collaborate with fellow architects.', 'Sample list item', 'twentytwentyfour' ); ?></li>
|
||||
<!-- /wp:list-item -->
|
||||
|
||||
<!-- wp:list-item -->
|
||||
<li><?php echo esc_html_x( 'Showcase your projects.', 'Sample list item', 'twentytwentyfour' ); ?></li>
|
||||
<!-- /wp:list-item -->
|
||||
|
||||
<!-- wp:list-item -->
|
||||
<li><?php echo esc_html_x( 'Experience the world of architecture.', 'Sample list item', 'twentytwentyfour' ); ?></li>
|
||||
<!-- /wp:list-item -->
|
||||
</ul>
|
||||
<!-- /wp:list -->
|
||||
|
||||
<!-- wp:buttons -->
|
||||
<div class="wp-block-buttons">
|
||||
<!-- wp:button -->
|
||||
<div class="wp-block-button">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Download app', 'Button text of this section', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
|
||||
<!-- wp:button {"className":"is-style-outline"} -->
|
||||
<div class="wp-block-button is-style-outline">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'How it works', 'Button text of this section', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
</div>
|
||||
<!-- /wp:buttons -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"verticalAlignment":"center","width":"50%"} -->
|
||||
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:50%">
|
||||
<!-- wp:image {"aspectRatio":"4/3","scale":"cover","sizeSlug":"full","linkDestination":"none","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image size-full is-style-rounded">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/abstract-geometric-art.webp" alt="<?php esc_attr_e( 'White abstract geometric artwork from Dresden, Germany', 'twentytwentyfour' ); ?>" style="aspect-ratio:4/3;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
214
wp-content/themes/twentytwentyfour/patterns/cta-pricing.php
Normal file
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Pricing
|
||||
* Slug: twentytwentyfour/cta-pricing
|
||||
* Categories: call-to-action, services
|
||||
* Viewport width: 1400
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"metadata":{"name":"<?php echo esc_html_x( 'Pricing Table', 'Name for the pricing pattern', 'twentytwentyfour' ); ?>"},"align":"full","style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|40","right":"var:preset|spacing|40"}},"border":{"radius":"16px"}},"backgroundColor":"base-2","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignwide has-base-2-background-color has-background" style="border-radius:16px;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--40)">
|
||||
<!-- wp:group {"align":"wide","layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
|
||||
<div class="wp-block-group alignwide">
|
||||
<!-- wp:heading {"textAlign":"center"} -->
|
||||
<h2 class="wp-block-heading has-text-align-center"><?php echo esc_html_x( 'Our Services', 'Sample heading for pricing pattern', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":"1.125rem"},"spacing":{"margin":{"top":"var:preset|spacing|10"}}}} -->
|
||||
<p class="has-text-align-center" style="margin-top:var(--wp--preset--spacing--10);font-size:1.125rem"><?php echo esc_html_x( 'We offer flexible options, which you can adapt to the different needs of each project.', 'Sample description for a pricing table', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|30"} -->
|
||||
<div style="height:var(--wp--preset--spacing--30)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|50","left":"var:preset|spacing|20"}}}} -->
|
||||
<div class="wp-block-columns alignwide">
|
||||
<!-- wp:column {"style":{"spacing":{"padding":{"right":"var:preset|spacing|30","left":"var:preset|spacing|30","top":"var:preset|spacing|30","bottom":"var:preset|spacing|10"}},"border":{"top":{"color":"var:preset|color|contrast-3","width":"1px"}}}} -->
|
||||
<div class="wp-block-column" style="border-top-color:var(--wp--preset--color--contrast-3);border-top-width:1px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--30)">
|
||||
<!-- wp:heading {"textAlign":"center","level":4,"style":{"spacing":{"padding":{"top":"1px"}}},"fontSize":"medium"} -->
|
||||
<h4 class="wp-block-heading has-text-align-center has-medium-font-size" style="padding-top:1px">
|
||||
<em><?php echo esc_html_x( 'Free', 'Sample heading for the first pricing level', 'twentytwentyfour' ); ?></em>
|
||||
</h4>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:heading {"textAlign":"center","level":5,"fontSize":"x-large"} -->
|
||||
<h5 class="wp-block-heading has-text-align-center has-x-large-font-size"><?php echo esc_html_x( '$0', 'Sample price for the first pricing level', 'twentytwentyfour' ); ?></h5>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|10"} -->
|
||||
<div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo wp_kses_post( _x( 'Access to 5 exclusive <em>Études Articles</em> per month.', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:separator {"backgroundColor":"contrast-3"} -->
|
||||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" />
|
||||
<!-- /wp:separator -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast-2"}}}},"textColor":"contrast-2"} -->
|
||||
<p class="has-text-align-center has-contrast-2-color has-text-color has-link-color">
|
||||
<s><?php echo esc_html_x( 'Weekly print edition.', 'Feature for pricing level', 'twentytwentyfour' ); ?></s>
|
||||
</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:separator {"backgroundColor":"contrast-3"} -->
|
||||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" />
|
||||
<!-- /wp:separator -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast-2"}}}},"textColor":"contrast-2"} -->
|
||||
<p class="has-text-align-center has-contrast-2-color has-text-color has-link-color">
|
||||
<s><?php echo wp_kses_post( _x( 'Exclusive access to the <em>Études</em> app for iOS and Android.', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></s>
|
||||
</p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|10"} -->
|
||||
<div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
|
||||
<div class="wp-block-buttons">
|
||||
<!-- wp:button {"width":100,"className":"is-style-outline"} -->
|
||||
<div class="wp-block-button has-custom-width wp-block-button__width-100 is-style-outline">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Subscribe', 'Button text for the first pricing level', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
</div>
|
||||
<!-- /wp:buttons -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"style":{"spacing":{"padding":{"right":"var:preset|spacing|30","left":"var:preset|spacing|30","top":"var:preset|spacing|30","bottom":"var:preset|spacing|10"}},"border":{"top":{"color":"var:preset|color|contrast","width":"2px"}}}} -->
|
||||
<div class="wp-block-column" style="border-top-color:var(--wp--preset--color--contrast);border-top-width:2px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--30)">
|
||||
<!-- wp:heading {"textAlign":"center","level":4} -->
|
||||
<h4 class="wp-block-heading has-text-align-center">
|
||||
<em><?php echo esc_html_x( 'Connoisseur', 'Sample heading for the second pricing level', 'twentytwentyfour' ); ?></em>
|
||||
</h4>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:heading {"textAlign":"center","level":5,"fontSize":"x-large"} -->
|
||||
<h5 class="wp-block-heading has-text-align-center has-x-large-font-size"><?php echo esc_html_x( '$12', 'Sample price for the second pricing level', 'twentytwentyfour' ); ?></h5>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|10"} -->
|
||||
<div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo wp_kses_post( _x( 'Access to 20 exclusive <em>Études Articles</em> per month.', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:separator {"backgroundColor":"contrast-3"} -->
|
||||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" />
|
||||
<!-- /wp:separator -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo esc_html_x( 'Weekly print edition.', 'Feature for pricing level', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:separator {"backgroundColor":"contrast-3"} -->
|
||||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" />
|
||||
<!-- /wp:separator -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo wp_kses_post( _x( 'Exclusive access to the <em>Études</em> app for iOS and Android.', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|10"} -->
|
||||
<div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
|
||||
<div class="wp-block-buttons">
|
||||
<!-- wp:button {"width":100,"className":"is-style-fill"} -->
|
||||
<div class="wp-block-button has-custom-width wp-block-button__width-100 is-style-fill">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Subscribe', 'Button text for the second pricing level', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
</div>
|
||||
<!-- /wp:buttons -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"style":{"spacing":{"padding":{"right":"var:preset|spacing|30","left":"var:preset|spacing|30","top":"var:preset|spacing|30","bottom":"var:preset|spacing|10"}},"border":{"top":{"color":"var:preset|color|contrast-3","width":"1px"}}}} -->
|
||||
<div class="wp-block-column" style="border-top-color:var(--wp--preset--color--contrast-3);border-top-width:1px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--30)">
|
||||
<!-- wp:heading {"textAlign":"center","level":4,"style":{"spacing":{"padding":{"top":"1px"}}},"fontSize":"medium"} -->
|
||||
<h4 class="wp-block-heading has-text-align-center has-medium-font-size" style="padding-top:1px">
|
||||
<em><?php echo esc_html_x( 'Expert', 'Sample heading for the third pricing level', 'twentytwentyfour' ); ?></em>
|
||||
</h4>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:heading {"textAlign":"center","level":5,"fontSize":"x-large"} -->
|
||||
<h5 class="wp-block-heading has-text-align-center has-x-large-font-size"><?php echo esc_html_x( '$28', 'Sample price for the third pricing level', 'twentytwentyfour' ); ?></h5>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|10"} -->
|
||||
<div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo wp_kses_post( _x( 'Exclusive, unlimited access to <em>Études Articles</em>.', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:separator {"backgroundColor":"contrast-3"} -->
|
||||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" />
|
||||
<!-- /wp:separator -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo esc_html_x( 'Weekly print edition.', 'Feature for pricing level', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:separator {"backgroundColor":"contrast-3"} -->
|
||||
<hr class="wp-block-separator has-text-color has-contrast-3-color has-alpha-channel-opacity has-contrast-3-background-color has-background is-style-wide" />
|
||||
<!-- /wp:separator -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo wp_kses_post( _x( 'Exclusive access to the <em>Études</em> app for iOS and Android', 'Feature for pricing level', 'twentytwentyfour' ) ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|10"} -->
|
||||
<div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
|
||||
<div class="wp-block-buttons">
|
||||
<!-- wp:button {"width":100,"className":"is-style-outline"} -->
|
||||
<div class="wp-block-button has-custom-width wp-block-button__width-100 is-style-outline">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Subscribe', 'Button text for the third pricing level', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
</div>
|
||||
<!-- /wp:buttons -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
57
wp-content/themes/twentytwentyfour/patterns/cta-rsvp.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: RSVP
|
||||
* Slug: twentytwentyfour/cta-rsvp
|
||||
* Categories: call-to-action, featured
|
||||
* Viewport width: 1100
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"metadata":{"name":"<?php echo esc_html_x( 'RSVP', 'Name of RSVP pattern', 'twentytwentyfour' ); ?>"},"align":"full","style":{"spacing":{"margin":{"top":"0","bottom":"0"},"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"backgroundColor":"accent-5","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull has-accent-5-background-color has-background" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|50","left":"var:preset|spacing|30"}}}} -->
|
||||
<div class="wp-block-columns alignwide">
|
||||
<!-- wp:column {"verticalAlignment":"stretch","width":"40%"} -->
|
||||
<div class="wp-block-column is-vertically-aligned-stretch" style="flex-basis:40%">
|
||||
<!-- wp:group {"style":{"dimensions":{"minHeight":"100%"},"spacing":{"blockGap":"var:preset|spacing|50"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"left","verticalAlignment":"space-between"}} -->
|
||||
<div class="wp-block-group" style="min-height:100%">
|
||||
|
||||
<!-- wp:heading {"textAlign":"right","level":2,"style":{"typography":{"fontSize":"12rem","writingMode":"vertical-rl","lineHeight":"1"},"spacing":{"margin":{"right":"0","left":"calc( var(--wp--preset--spacing--20) * -1)"}}}} -->
|
||||
<h2 class="wp-block-heading has-text-align-right" style="margin-right:0;margin-left:calc( var(--wp--preset--spacing--20) * -1);font-size:12rem;line-height:1;writing-mode:vertical-rl"><?php echo esc_html_x( 'RSVP', 'Initials for ´please respond´', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"constrained","contentSize":"300px","justifyContent":"left"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:paragraph {"style":{"layout":{"selfStretch":"fixed","flexSize":"50%"}}} -->
|
||||
<p><?php echo esc_html_x( 'Experience the fusion of imagination and expertise with Études Arch Summit, February 2025.', 'RSVP call to action description', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:buttons -->
|
||||
<div class="wp-block-buttons">
|
||||
<!-- wp:button -->
|
||||
<div class="wp-block-button">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Reserve your spot', 'Call to action button text for the reservation button', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
</div>
|
||||
<!-- /wp:buttons -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"verticalAlignment":"top","width":"60%"} -->
|
||||
<div class="wp-block-column is-vertically-aligned-top" style="flex-basis:60%">
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","sizeSlug":"large","linkDestination":"none","style":{"color":{"duotone":"var:preset|duotone|duotone-5"}},"className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image size-large is-style-rounded">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/museum.webp" alt="<?php esc_attr_e( 'A ramp along a curved wall in the Kiasma Museu, Helsinki, Finland', 'twentytwentyfour' ); ?>" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Services call to action with image on left
|
||||
* Slug: twentytwentyfour/cta-services-image-left
|
||||
* Categories: call-to-action, banner, featured, services
|
||||
* Viewport width: 1400
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"backgroundColor":"accent-5","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull has-accent-5-background-color has-background" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"verticalAlignment":null,"align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|40","left":"var:preset|spacing|50"}}}} -->
|
||||
<div class="wp-block-columns alignwide">
|
||||
<!-- wp:column {"verticalAlignment":"center","width":"60%"} -->
|
||||
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:60%">
|
||||
<!-- wp:image {"aspectRatio":"4/3","scale":"cover","sizeSlug":"full","linkDestination":"none","style":{"color":{"duotone":"var:preset|duotone|duotone-1"}},"className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image size-full is-style-rounded">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/abstract-geometric-art.webp" alt="<?php esc_attr_e( 'White abstract geometric artwork from Dresden, Germany', 'twentytwentyfour' ); ?>" style="aspect-ratio:4/3;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"width":"40%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:40%">
|
||||
<!-- wp:heading -->
|
||||
<h2 class="wp-block-heading"><?php echo esc_html_x( 'Guiding your business through the project', 'Sample heading of the services pattern', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p><?php echo esc_html_x( 'Experience the fusion of imagination and expertise with Études—the catalyst for architectural transformations that enrich the world around us.', 'Sample description of the services pattern', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:buttons -->
|
||||
<div class="wp-block-buttons">
|
||||
<!-- wp:button -->
|
||||
<div class="wp-block-button">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Our services', 'Sample button text to view the services', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
</div>
|
||||
<!-- /wp:buttons -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Centered call to action
|
||||
* Slug: twentytwentyfour/cta-subscribe-centered
|
||||
* Categories: call-to-action
|
||||
* Keywords: newsletter, subscribe, button
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50","right":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:group {"align":"wide","style":{"border":{"radius":"16px"},"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"backgroundColor":"base-2","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignwide has-base-2-background-color has-background" style="border-radius:16px;padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|10"} -->
|
||||
<div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:heading {"textAlign":"center","fontSize":"x-large"} -->
|
||||
<h2 class="wp-block-heading has-text-align-center has-x-large-font-size"><?php echo esc_html_x( 'Join 900+ subscribers', 'Sample text for Subscriber Heading with numbers', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:paragraph {"align":"center"} -->
|
||||
<p class="has-text-align-center"><?php echo esc_html_x( 'Stay in the loop with everything you need to know.', 'Sample text for Subscriber Description', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
|
||||
<div class="wp-block-buttons">
|
||||
<!-- wp:button -->
|
||||
<div class="wp-block-button">
|
||||
<a class="wp-block-button__link wp-element-button"><?php echo esc_html_x( 'Sign up', 'Sample text for Sign Up Button', 'twentytwentyfour' ); ?></a>
|
||||
</div>
|
||||
<!-- /wp:button -->
|
||||
</div>
|
||||
<!-- /wp:buttons -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|10"} -->
|
||||
<div style="height:var(--wp--preset--spacing--10)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Footer with centered logo and navigation
|
||||
* Slug: twentytwentyfour/footer-centered-logo-nav
|
||||
* Categories: footer
|
||||
* Block Types: core/template-part/footer
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|50"}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
|
||||
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--50)">
|
||||
|
||||
<!-- wp:site-logo /-->
|
||||
|
||||
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","justifyContent":"center"},"fontSize":"small"} /-->
|
||||
|
||||
<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"secondary","fontSize":"small"} -->
|
||||
<p class="has-text-align-center has-secondary-color has-text-color has-link-color has-small-font-size">
|
||||
<?php
|
||||
/* Translators: WordPress link. */
|
||||
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'twentytwentyfour' ) ) . '" rel="nofollow">WordPress</a>';
|
||||
echo sprintf(
|
||||
/* Translators: Designed with WordPress */
|
||||
esc_html__( 'Designed with %1$s', 'twentytwentyfour' ),
|
||||
$wordpress_link
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Footer with colophon, 3 columns
|
||||
* Slug: twentytwentyfour/footer-colophon-3-col
|
||||
* Categories: footer
|
||||
* Block Types: core/template-part/footer
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignwide">
|
||||
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}}} -->
|
||||
<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:image {"width":"40px","height":"auto","sizeSlug":"full","linkDestination":"none"} -->
|
||||
<figure class="wp-block-image size-full is-resized">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/icon-message.webp" alt="" style="width:40px;height:auto" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:separator {"className":"is-style-wide"} -->
|
||||
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" />
|
||||
<!-- /wp:separator -->
|
||||
|
||||
<!-- wp:columns {"style":{"spacing":{"padding":{"top":"var:preset|spacing|10"}}}} -->
|
||||
<div class="wp-block-columns" style="padding-top:var(--wp--preset--spacing--10)">
|
||||
<!-- wp:column {"width":"57%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:57%">
|
||||
<!-- wp:heading {"fontSize":"x-large"} -->
|
||||
<h2 class="wp-block-heading has-x-large-font-size"><?php esc_html_e( 'Keep up, get in touch.', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
<!-- wp:column {"width":"30%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:30%">
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:heading {"level":3,"fontSize":"medium","fontFamily":"body"} -->
|
||||
<h3 class="wp-block-heading has-body-font-family has-medium-font-size"><?php esc_html_e( 'Contact', 'twentytwentyfour' ); ?></h3>
|
||||
<!-- /wp:heading -->
|
||||
<!-- wp:paragraph -->
|
||||
<p><a href="#"><?php echo esc_html_x( 'info@example.com', 'Example email in site footer', 'twentytwentyfour' ); ?></a></p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
<!-- wp:column {"width":"30%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:30%">
|
||||
<!-- wp:columns {"isStackedOnMobile":false} -->
|
||||
<div class="wp-block-columns is-not-stacked-on-mobile">
|
||||
<!-- wp:column -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:heading {"level":3,"fontSize":"medium","fontFamily":"body"} -->
|
||||
<h3 class="wp-block-heading has-body-font-family has-medium-font-size"><?php esc_html_e( 'Follow', 'twentytwentyfour' ); ?></h3>
|
||||
<!-- /wp:heading -->
|
||||
<!-- wp:paragraph -->
|
||||
<p><a href="#"><?php esc_html_e( 'Instagram', 'twentytwentyfour' ); ?></a> / <a href="#"><?php esc_html_e( 'Facebook', 'twentytwentyfour' ); ?></a></p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between","verticalAlignment":"top"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"6px"}},"layout":{"type":"flex","flexWrap":"wrap"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:paragraph {"fontSize":"small"} -->
|
||||
<p class="has-small-font-size"><?php esc_html_e( '©', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
<!-- wp:site-title {"level":0,"style":{"typography":{"fontStyle":"normal","fontWeight":"400"}},"fontSize":"small"} /-->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
<!-- wp:paragraph {"fontSize":"small"} -->
|
||||
<p class="has-small-font-size">
|
||||
<?php
|
||||
/* Translators: WordPress link. */
|
||||
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'twentytwentyfour' ) ) . '" rel="nofollow">WordPress</a>';
|
||||
echo sprintf(
|
||||
/* Translators: Designed with WordPress */
|
||||
esc_html__( 'Designed with %1$s', 'twentytwentyfour' ),
|
||||
$wordpress_link
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
128
wp-content/themes/twentytwentyfour/patterns/footer.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Footer with colophon, 4 columns
|
||||
* Slug: twentytwentyfour/footer
|
||||
* Categories: footer
|
||||
* Block Types: core/template-part/footer
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"align":"wide"} -->
|
||||
<div class="wp-block-columns alignwide">
|
||||
<!-- wp:column {"width":"30%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:30%">
|
||||
<!-- wp:group {"style":{"dimensions":{"minHeight":""},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex","orientation":"vertical"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:site-logo {"width":20,"shouldSyncIcon":true,"style":{"layout":{"selfStretch":"fit","flexSize":null}}} /-->
|
||||
|
||||
<!-- wp:site-title {"level":0,"fontSize":"medium"} /-->
|
||||
|
||||
<!-- wp:site-tagline {"fontSize":"small"} /-->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"width":"20%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:20%">
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"width":"50%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:50%">
|
||||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between","verticalAlignment":"top"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:heading {"level":2,"style":{"typography":{"fontStyle":"normal","fontWeight":"600"}},"fontFamily":"body"} -->
|
||||
<h2 class="wp-block-heading has-medium-font-size has-body-font-family" style="font-style:normal;font-weight:600"><?php esc_html_e( 'About', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical"}} -->
|
||||
<div class="wp-block-group">
|
||||
|
||||
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","orientation":"vertical"},"style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"blockGap":"var:preset|spacing|10"}},"fontSize":"small","ariaLabel":"<?php esc_attr_e( 'About', 'twentytwentyfour' ); ?>"} -->
|
||||
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Team', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'History', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Careers', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
|
||||
<!-- /wp:navigation -->
|
||||
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:heading {"level":2,"style":{"typography":{"fontStyle":"normal","fontWeight":"600"}},"fontFamily":"body"} -->
|
||||
<h2 class="wp-block-heading has-medium-font-size has-body-font-family" style="font-style:normal;font-weight:600"><?php esc_html_e( 'Privacy', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical"}} -->
|
||||
<div class="wp-block-group">
|
||||
|
||||
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","orientation":"vertical"},"style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"blockGap":"var:preset|spacing|10"}},"fontSize":"small","ariaLabel":"<?php esc_attr_e( 'Privacy', 'twentytwentyfour' ); ?>"} -->
|
||||
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Privacy Policy', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Terms and Conditions', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Contact Us', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
|
||||
<!-- /wp:navigation -->
|
||||
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:heading {"level":2,"style":{"typography":{"fontStyle":"normal","fontWeight":"600"}},"fontFamily":"body"} -->
|
||||
<h2 class="wp-block-heading has-medium-font-size has-body-font-family" style="font-style:normal;font-weight:600"><?php esc_html_e( 'Social', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","orientation":"vertical"}} -->
|
||||
<div class="wp-block-group">
|
||||
|
||||
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","orientation":"vertical"},"style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"blockGap":"var:preset|spacing|10"}},"fontSize":"small","ariaLabel":"<?php esc_attr_e( 'Social Media', 'twentytwentyfour' ); ?>"} -->
|
||||
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Facebook', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Instagram', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Twitter/X', 'twentytwentyfour' ); ?>","url":"#"} /-->
|
||||
|
||||
<!-- /wp:navigation -->
|
||||
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
|
||||
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"0"}}}} -->
|
||||
<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--50);padding-bottom:0">
|
||||
<!-- wp:paragraph {"style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast-2","fontSize":"small"} -->
|
||||
<p class="has-contrast-2-color has-text-color has-link-color has-small-font-size">
|
||||
<?php
|
||||
/* Translators: WordPress link. */
|
||||
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'twentytwentyfour' ) ) . '" rel="nofollow">WordPress</a>';
|
||||
echo sprintf(
|
||||
/* Translators: Designed with WordPress */
|
||||
esc_html__( 'Designed with %1$s', 'twentytwentyfour' ),
|
||||
$wordpress_link
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Full screen image
|
||||
* Slug: twentytwentyfour/gallery-full-screen-image
|
||||
* Categories: gallery, portfolio
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:cover {"url":"<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/art-gallery.webp","hasParallax":true,"dimRatio":0,"overlayColor":"base","minHeight":100,"minHeightUnit":"vh","isDark":false,"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-cover alignfull is-light has-parallax" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50);min-height:100vh">
|
||||
<span aria-hidden="true" class="wp-block-cover__background has-base-background-color has-background-dim-0 has-background-dim">
|
||||
</span>
|
||||
<div role="img" class="wp-block-cover__image-background has-parallax" style="background-position:50% 50%;background-image:url(<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/art-gallery.webp)">
|
||||
</div>
|
||||
<div class="wp-block-cover__inner-container">
|
||||
<!-- wp:spacer {"height":"500px"} -->
|
||||
<div style="height:500px" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /wp:cover -->
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Offset gallery, 2 columns
|
||||
* Slug: twentytwentyfour/gallery-offset-images-grid-2-col
|
||||
* Categories: gallery, portfolio
|
||||
* Keywords: project, images, media, masonry, columns
|
||||
* Viewport width: 1400
|
||||
*/
|
||||
?>
|
||||
<!-- wp:group {"metadata":{"name":"Portfolio Images"},"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"0","left":"var:preset|spacing|40"},"margin":{"top":"0","bottom":"0"}}}} -->
|
||||
<div class="wp-block-columns alignwide" style="margin-top:0;margin-bottom:0">
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:image {"aspectRatio":"4/3","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:4/3;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded"><img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"1","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded"><img alt="" style="aspect-ratio:1;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Offset gallery, 3 columns
|
||||
* Slug: twentytwentyfour/gallery-offset-images-grid-3-col
|
||||
* Categories: gallery, portfolio
|
||||
* Keywords: project, images, media, masonry, columns
|
||||
* Viewport width: 1400
|
||||
*/
|
||||
?>
|
||||
<!-- wp:group {"metadata":{"name":"Portfolio Images"},"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"0","left":"var:preset|spacing|40"},"margin":{"top":"0","bottom":"0"}}}} -->
|
||||
<div class="wp-block-columns alignwide" style="margin-top:0;margin-bottom:0">
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:image {"aspectRatio":"4/3","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:4/3;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"1","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:1;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"1","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:1;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"16/9","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:16/9;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Offset gallery, 4 columns
|
||||
* Slug: twentytwentyfour/gallery-offset-images-grid-4-col
|
||||
* Categories: gallery, featured, portfolio
|
||||
* Keywords: project, images, media, masonry, columns
|
||||
* Viewport width: 1400
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}}},"layout":{"type":"constrained"},"metadata":{"name":"Portfolio Images"}} -->
|
||||
<div class="wp-block-group alignfull" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"0","left":"var:preset|spacing|40"},"margin":{"top":"0","bottom":"0"}}}} -->
|
||||
<div class="wp-block-columns alignwide" style="margin-top:0;margin-bottom:0">
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:image {"aspectRatio":"4/3","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:4/3;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"1","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:1;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"1","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:1;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"3/4","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:3/4;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"16/9","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:16/9;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"style":{"spacing":{"blockGap":"0"}}} -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"1","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:1;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"16/9","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:16/9;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50"} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"9/16","scale":"cover","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image is-style-rounded">
|
||||
<img alt="" style="aspect-ratio:9/16;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Project layout
|
||||
* Slug: twentytwentyfour/gallery-project-layout
|
||||
* Categories: gallery, featured, portfolio
|
||||
* Viewport width: 1600
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|50","right":"var:preset|spacing|50","bottom":"var:preset|spacing|50","left":"var:preset|spacing|50"},"margin":{"top":"0","bottom":"0"}},"elements":{"link":{"color":{"text":"var:preset|color|base-2"}}}},"backgroundColor":"contrast","textColor":"base-2","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignfull has-base-2-color has-contrast-background-color has-text-color has-background has-link-color" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
|
||||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|50","left":"var:preset|spacing|60"}}}} -->
|
||||
<div class="wp-block-columns alignwide">
|
||||
<!-- wp:column {"verticalAlignment":"stretch","width":"60%","style":{"spacing":{"padding":{"right":"0"}}}} -->
|
||||
<div class="wp-block-column is-vertically-aligned-stretch" style="padding-right:0;flex-basis:60%">
|
||||
<!-- wp:group {"style":{"dimensions":{"minHeight":"100%"}},"layout":{"type":"flex","orientation":"vertical","verticalAlignment":"space-between","justifyContent":"stretch"}} -->
|
||||
<div class="wp-block-group" style="min-height:100%">
|
||||
<!-- wp:image {"aspectRatio":"9/16","scale":"cover","sizeSlug":"large","linkDestination":"none","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image size-large is-style-rounded">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/angular-roof.webp" alt="<?php esc_attr_e( 'An empty staircase under an angular roof in Darling Harbour, Sydney, Australia', 'twentytwentyfour' ); ?>" style="aspect-ratio:9/16;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:paragraph {"fontSize":"medium"} -->
|
||||
<p class="has-medium-font-size"><?php echo esc_html_x( '1. Through Études, we aspire to redefine architectural boundaries and usher in a new era of design excellence that leaves an indelible mark on the built environment.', 'Sample text for the feature area', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
|
||||
<!-- wp:column {"width":"40%"} -->
|
||||
<div class="wp-block-column" style="flex-basis:40%">
|
||||
<!-- wp:group {"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.2","fontStyle":"normal","fontWeight":"500"}},"fontSize":"large"} -->
|
||||
<p class="has-large-font-size" style="font-style:normal;font-weight:500;line-height:1.2"><?php echo esc_html_x( 'Our comprehensive suite of professional services caters to a diverse clientele, ranging from homeowners to commercial developers. With a commitment to innovation and sustainability, Études is the bridge that transforms architectural dreams into remarkable built realities.', 'Sample text for the feature area', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|40","style":{"layout":{}}} -->
|
||||
<div style="height:var(--wp--preset--spacing--40)" aria-hidden="true" class="wp-block-spacer">
|
||||
</div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:group {"layout":{"type":"default"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:paragraph {"fontSize":"medium"} -->
|
||||
<p class="has-medium-font-size"><?php echo esc_html_x( '2. Case studies that celebrate the artistry can fuel curiosity and ignite inspiration.', 'Sample text for the feature area', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:image {"aspectRatio":"9/16","scale":"cover","sizeSlug":"large","linkDestination":"none","className":"is-style-rounded"} -->
|
||||
<figure class="wp-block-image size-large is-style-rounded">
|
||||
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/art-gallery.webp" alt="<?php esc_attr_e( 'Art Gallery of Ontario, Toronto, Canada', 'twentytwentyfour' ); ?>" style="aspect-ratio:9/16;object-fit:cover" />
|
||||
</figure>
|
||||
<!-- /wp:image -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
<!-- /wp:columns -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
15
wp-content/themes/twentytwentyfour/patterns/hidden-404.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: 404
|
||||
* Slug: twentytwentyfour/hidden-404
|
||||
* Inserter: no
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:heading {"level":1} -->
|
||||
<h1 class="wp-block-heading" id="page-not-found"><?php echo esc_html_x( 'Page Not Found', 'Heading for a webpage that is not found', 'twentytwentyfour' ); ?></h1>
|
||||
<!-- /wp:heading -->
|
||||
<!-- wp:paragraph -->
|
||||
<p><?php echo esc_html_x( 'The page you are looking for does not exist, or it has been moved. Please try searching using the form below.', 'Message to convey that a webpage could not be found', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
<!-- wp:pattern {"slug":"twentytwentyfour/hidden-search"} /-->
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Comments
|
||||
* Slug: twentytwentyfour/hidden-comments
|
||||
* Inserter: no
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:comments {"className":"wp-block-comments-query-loop"} -->
|
||||
<div class="wp-block-comments wp-block-comments-query-loop">
|
||||
<!-- wp:heading -->
|
||||
<h2><?php esc_html_e( 'Comments', 'twentytwentyfour' ); ?></h2>
|
||||
<!-- /wp:heading -->
|
||||
<!-- wp:comments-title {"level":3} /-->
|
||||
<!-- wp:comment-template -->
|
||||
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|30"}}}} -->
|
||||
<div class="wp-block-group" style="margin-top:0;margin-bottom:var(--wp--preset--spacing--30)">
|
||||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"},"style":{"spacing":{"blockGap":"0.5em"}}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:avatar {"size":40} /-->
|
||||
<!-- wp:group -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:comment-author-name /-->
|
||||
<!-- wp:comment-date /-->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
<!-- wp:comment-content /-->
|
||||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:comment-edit-link /-->
|
||||
<!-- wp:comment-reply-link /-->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
<!-- /wp:comment-template -->
|
||||
|
||||
<!-- wp:comments-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->
|
||||
<!-- wp:comments-pagination-previous /-->
|
||||
<!-- wp:comments-pagination-next /-->
|
||||
<!-- /wp:comments-pagination -->
|
||||
|
||||
<!-- wp:post-comments-form {"style":{"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20"}}}} /-->
|
||||
</div>
|
||||
<!-- /wp:comments -->
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: No results
|
||||
* Slug: twentytwentyfour/hidden-no-results
|
||||
* Inserter: no
|
||||
*/
|
||||
?>
|
||||
<!-- wp:paragraph -->
|
||||
<p><?php echo esc_html_x( 'No posts were found.', 'Message explaining that there are no results returned from a search', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Portfolio hero
|
||||
* Slug: twentytwentyfour/hidden-portfolio-hero
|
||||
* Inserter: no
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:spacer {"height":"var:preset|spacing|50","style":{"layout":{}}} -->
|
||||
<div style="height:var(--wp--preset--spacing--50)" aria-hidden="true" class="wp-block-spacer"></div>
|
||||
<!-- /wp:spacer -->
|
||||
|
||||
<!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group alignwide">
|
||||
<!-- wp:heading {"level":1,"align":"wide","style":{"typography":{"lineHeight":"1.2"}},"fontSize":"xx-large"} -->
|
||||
<h1 class="wp-block-heading alignwide has-xx-large-font-size" style="line-height:1.2"><?php echo wp_kses_post( __( 'I’m <em>Leia Acosta</em>, a passionate photographer who finds inspiration in capturing the fleeting beauty of life.', 'twentytwentyfour' ) ); ?></h1>
|
||||
<!-- /wp:heading -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Post meta
|
||||
* Slug: twentytwentyfour/hidden-post-meta
|
||||
* Inserter: no
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"layout":{"type":"constrained"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:group {"style":{"spacing":{"blockGap":"0.3em"}},"layout":{"type":"flex","justifyContent":"left"}} -->
|
||||
<div class="wp-block-group">
|
||||
<!-- wp:post-date {"format":"M j, Y","isLink":true} /-->
|
||||
|
||||
<!-- wp:paragraph {"textColor":"contrast-2"} -->
|
||||
<p class="has-contrast-2-color has-text-color">—</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph {"fontSize":"small","textColor":"contrast-2"} -->
|
||||
<p class="has-small-font-size has-contrast-2-color has-text-color"><?php echo esc_html_x( 'by', 'Prefix for the post author block: By author name', 'twentytwentyfour' ); ?></p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:post-author-name {"isLink":true} /-->
|
||||
|
||||
<!-- wp:post-terms {"term":"category","prefix":"<?php echo esc_html_x( 'in ', 'Prefix for the post category block: in category name', 'twentytwentyfour' ); ?>"} /-->
|
||||
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
</div>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Post navigation
|
||||
* Slug: twentytwentyfour/hidden-post-navigation
|
||||
* Inserter: no
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:group {"tagName":"nav","ariaLabel":"<?php esc_attr_e( 'Posts', 'twentytwentyfour' ); ?>","style":{"spacing":{"padding":{"bottom":"var:preset|spacing|40","top":"var:preset|spacing|40"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
|
||||
<nav class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)" aria-label="<?php esc_attr_e( 'Posts', 'twentytwentyfour' ); ?>">
|
||||
<!-- wp:post-navigation-link {"type":"previous","label":"<?php echo esc_html_x( 'Previous: ', 'Label before the title of the previous post. There is a space after the colon.', 'twentytwentyfour' ); ?>","showTitle":true,"linkLabel":true,"arrow":"arrow"} /-->
|
||||
<!-- wp:post-navigation-link {"label":"<?php echo esc_html_x( 'Next: ', 'Label before the title of the next post. There is a space after the colon.', 'twentytwentyfour' ); ?>","showTitle":true,"linkLabel":true,"arrow":"arrow"} /-->
|
||||
</nav>
|
||||
<!-- /wp:group -->
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Title: Search
|
||||
* Slug: twentytwentyfour/hidden-search
|
||||
* Inserter: no
|
||||
*/
|
||||
?>
|
||||
|
||||
<!-- wp:search {"label":"<?php echo esc_attr_x( 'Search', 'search form label', 'twentytwentyfour' ); ?>","showLabel":false,"buttonText":"<?php echo esc_attr_x( 'Search', 'search button text', 'twentytwentyfour' ); ?>","fontSize":"medium"} /-->
|
||||