mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-25 01:05:07 +01:00
Fixes.
This commit is contained in:
parent
83c6d7a5e6
commit
c9cc01c603
@ -56,6 +56,7 @@
|
||||
max-width: 860px;
|
||||
|
||||
img {
|
||||
margin: 0 auto;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">{{ . }}</a>
|
||||
<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">#{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
@ -29,7 +29,7 @@
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">{{ . }}</a>
|
||||
<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">#{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
@ -3,7 +3,7 @@
|
||||
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
|
||||
|
||||
<div class="post">
|
||||
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
<h1 class="post-title">{{ .Title | markdownify }}</h1>
|
||||
<div class="post-meta">
|
||||
{{ if .Date | default nil }}
|
||||
<span class="post-date">
|
||||
@ -33,7 +33,7 @@
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">{{ . }}</a>
|
||||
<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">#{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
@ -28,12 +28,12 @@
|
||||
<link rel="shortcut icon" href="{{ "img/favicon.png" | absURL }}" />
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href="{{ "assets/Inter-Italic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/Inter-Regular.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/Inter-Medium.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/Inter-MediumItalic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/Inter-Bold.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/Inter-BoldItalic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-Italic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-Regular.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-Medium.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-MediumItalic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-Bold.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
<link href="{{ "assets/fonts/Inter-BoldItalic.woff2" | absURL }}" rel="preload" type="font/woff2" as="font" crossorigin="">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
@ -1,122 +1 @@
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "./assets/js/menu.js":
|
||||
/*!***************************!*\
|
||||
!*** ./assets/js/menu.js ***!
|
||||
\***************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
eval("var container = document.querySelector(\".container\");\nvar menu = document.querySelector(\".menu\");\nvar mobileMenuTrigger = document.querySelector(\".menu-trigger\");\nvar desktopMenu = document.querySelector(\".menu__inner--desktop\");\nvar desktopMenuTrigger = document.querySelector(\".menu__sub-inner-more-trigger\");\nvar menuMore = document.querySelector(\".menu__sub-inner-more\");\nvar mobileQuery = getComputedStyle(document.body).getPropertyValue(\"--phoneWidth\");\n\nvar isMobile = function isMobile() {\n return window.matchMedia(mobileQuery).matches;\n};\n\nvar isMobileMenu = function isMobileMenu() {\n mobileMenuTrigger && mobileMenuTrigger.classList.toggle(\"hidden\", !isMobile());\n menu && menu.classList.toggle(\"hidden\", isMobile());\n menuMore && menuMore.classList.toggle(\"hidden\", !isMobile());\n}; // Common\n\n\nmenu && menu.addEventListener(\"click\", function (e) {\n return e.stopPropagation();\n});\nmenuMore && menuMore.addEventListener(\"click\", function (e) {\n return e.stopPropagation();\n});\nisMobileMenu();\ndocument.body.addEventListener(\"click\", function () {\n if (!isMobile() && menuMore && !menuMore.classList.contains(\"hidden\")) {\n menuMore.classList.add(\"hidden\");\n } else if (isMobile() && !menu.classList.contains(\"hidden\")) {\n menu.classList.add(\"hidden\");\n }\n});\nwindow.addEventListener(\"resize\", isMobileMenu); // Mobile menu\n\nmobileMenuTrigger && mobileMenuTrigger.addEventListener(\"click\", function (e) {\n e.stopPropagation();\n menu && menu.classList.toggle(\"hidden\");\n}); // Desktop menu\n\ndesktopMenuTrigger && desktopMenuTrigger.addEventListener(\"click\", function (e) {\n e.stopPropagation();\n menuMore && menuMore.classList.toggle(\"hidden\");\n\n if (menuMore && menuMore.getBoundingClientRect().right > container.getBoundingClientRect().right) {\n menuMore.style.left = \"auto\";\n menuMore.style.right = 0;\n }\n});\n\n//# sourceURL=webpack:///./assets/js/menu.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./assets/js/theme.js":
|
||||
/*!****************************!*\
|
||||
!*** ./assets/js/theme.js ***!
|
||||
\****************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
eval("// Toggle theme\nvar getTheme = window.localStorage && window.localStorage.getItem(\"theme\");\nvar themeToggle = document.querySelector(\".theme-toggle\");\nvar isDark = getTheme === \"dark\";\n\nif (getTheme !== null) {\n document.body.classList.toggle(\"dark-theme\", isDark);\n}\n\nthemeToggle.addEventListener(\"click\", function () {\n document.body.classList.toggle(\"dark-theme\");\n window.localStorage && window.localStorage.setItem(\"theme\", document.body.classList.contains(\"dark-theme\") ? \"dark\" : \"light\");\n});\n\n//# sourceURL=webpack:///./assets/js/theme.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 0:
|
||||
/*!******************************************************!*\
|
||||
!*** multi ./assets/js/menu.js ./assets/js/theme.js ***!
|
||||
\******************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("__webpack_require__(/*! /Users/radek/Documents/Git/Moje/hello-friend/themes/hello-friend/assets/js/menu.js */\"./assets/js/menu.js\");\nmodule.exports = __webpack_require__(/*! /Users/radek/Documents/Git/Moje/hello-friend/themes/hello-friend/assets/js/theme.js */\"./assets/js/theme.js\");\n\n\n//# sourceURL=webpack:///multi_./assets/js/menu.js_./assets/js/theme.js?");
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
!function(n){var o={};function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=n,r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,n){n(1),e.exports=n(2)},function(e,t){function n(){return window.matchMedia(l).matches}function o(){c&&c.classList.toggle("hidden",!n()),i&&i.classList.toggle("hidden",n()),u&&u.classList.toggle("hidden",!n())}var r=document.querySelector(".container"),i=document.querySelector(".menu"),c=document.querySelector(".menu-trigger"),d=(document.querySelector(".menu__inner--desktop"),document.querySelector(".menu__sub-inner-more-trigger")),u=document.querySelector(".menu__sub-inner-more"),l=getComputedStyle(document.body).getPropertyValue("--phoneWidth");i&&i.addEventListener("click",function(e){return e.stopPropagation()}),u&&u.addEventListener("click",function(e){return e.stopPropagation()}),o(),document.body.addEventListener("click",function(){n()||!u||u.classList.contains("hidden")?n()&&!i.classList.contains("hidden")&&i.classList.add("hidden"):u.classList.add("hidden")}),window.addEventListener("resize",o),c&&c.addEventListener("click",function(e){e.stopPropagation(),i&&i.classList.toggle("hidden")}),d&&d.addEventListener("click",function(e){e.stopPropagation(),u&&u.classList.toggle("hidden"),u&&u.getBoundingClientRect().right>r.getBoundingClientRect().right&&(u.style.left="auto",u.style.right=0)})},function(e,t){var n=window.localStorage&&window.localStorage.getItem("theme"),o=document.querySelector(".theme-toggle"),r="dark"===n;null!==n&&document.body.classList.toggle("dark-theme",r),o.addEventListener("click",function(){document.body.classList.toggle("dark-theme"),window.localStorage&&window.localStorage.setItem("theme",document.body.classList.contains("dark-theme")?"dark":"light")})}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
static/assets/style.js
Normal file
1
static/assets/style.js
Normal file
@ -0,0 +1 @@
|
||||
!function(r){var o={};function n(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}n.m=r,n.c=o,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}({6:function(e,t,r){e.exports={"dark-theme":"dark-theme","button-container":"button-container",button:"button",outline:"outline",primary:"primary",link:"link",small:"small",wide:"wide","read-more":"read-more","code-toolbar":"code-toolbar","toolbar-item":"toolbar-item",header:"header",header__right:"header__right",header__inner:"header__inner","theme-toggle":"theme-toggle","theme-toggler":"theme-toggler",logo:"logo",logo__mark:"logo__mark","greater-icon":"greater-icon",logo__text:"logo__text",logo__cursor:"logo__cursor",cursor:"cursor",menu:"menu",menu__inner:"menu__inner","menu__inner--desktop":"menu__inner--desktop","menu__inner--mobile":"menu__inner--mobile","menu__sub-inner":"menu__sub-inner","menu__sub-inner-more":"menu__sub-inner-more","menu__sub-inner-more-trigger":"menu__sub-inner-more-trigger","menu__sub-inner-more-trigger-icon":"menu__sub-inner-more-trigger-icon","menu-trigger":"menu-trigger",center:"center",left:"left",right:"right",container:"container",content:"content",hidden:"hidden",framed:"framed","twitter-tweet":"twitter-tweet",post:"post","post-meta":"post-meta","post-title":"post-title","post-tags":"post-tags","post-content":"post-content","post-cover":"post-cover","post--regulation":"post--regulation",pagination:"pagination",pagination__title:"pagination__title","pagination__title-h":"pagination__title-h",pagination__buttons:"pagination__buttons",button__text:"button__text",next:"next",button__icon:"button__icon",previous:"previous",footer:"footer",footer__inner:"footer__inner",copyright:"copyright","copyright--user":"copyright--user",terms:"terms",terms__list:"terms__list",terms__term:"terms__term","terms__term-count":"terms__term-count",archive:"archive","archive__group-month":"archive__group-month","archive__group-year":"archive__group-year","archive__group-year-header":"archive__group-year-header","archive__group-month-header":"archive__group-month-header","archive__group-posts":"archive__group-posts",archive__post:"archive__post","archive__post-title":"archive__post-title",token:"token","block-comment":"block-comment",cdata:"cdata",comment:"comment",doctype:"doctype",prolog:"prolog",punctuation:"punctuation","attr-name":"attr-name",deleted:"deleted",namespace:"namespace",tag:"tag","function-name":"function-name",boolean:"boolean",function:"function",number:"number","class-name":"class-name",constant:"constant",property:"property",symbol:"symbol",atrule:"atrule",builtin:"builtin",important:"important",keyword:"keyword",selector:"selector","attr-value":"attr-value",char:"char",regex:"regex",string:"string",variable:"variable",entity:"entity",operator:"operator",url:"url",bold:"bold",italic:"italic",inserted:"inserted","line-numbers":"line-numbers","line-numbers-rows":"line-numbers-rows",toolbar:"toolbar","command-line-prompt":"command-line-prompt","collapsable-code":"collapsable-code","collapsable-code__toggle":"collapsable-code__toggle","collapsable-code__title":"collapsable-code__title","collapsable-code__language":"collapsable-code__language"}}});
|
@ -8,7 +8,7 @@ const path = require("path");
|
||||
|
||||
const join = (...paths) => path.join(__dirname, ...paths);
|
||||
|
||||
module.exports = (env, { mode }) => ({
|
||||
module.exports = (env, { watch }) => ({
|
||||
resolve: {
|
||||
extensions: [".js", ".css"],
|
||||
modules: ["assets", "node_modules"],
|
||||
@ -23,6 +23,7 @@ module.exports = (env, { mode }) => ({
|
||||
path: join("static/assets"),
|
||||
publicPath: "",
|
||||
},
|
||||
watch,
|
||||
performance: {
|
||||
hints: false,
|
||||
},
|
||||
@ -39,13 +40,25 @@ module.exports = (env, { mode }) => ({
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|woff|woff2|ttf|eot|svg)$/,
|
||||
test: /\.(png|jpg|svg)$/,
|
||||
use: [
|
||||
{
|
||||
loader: "url-loader",
|
||||
loader: "file-loader",
|
||||
options: {
|
||||
limit: 8192,
|
||||
name: '[name].[ext]'
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'images'
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(woff|woff2|ttf|eot)$/,
|
||||
use: [
|
||||
{
|
||||
loader: "file-loader",
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'fonts'
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -90,7 +103,7 @@ module.exports = (env, { mode }) => ({
|
||||
plugins: [
|
||||
new CleanWebpackPlugin({
|
||||
cleanOnceBeforeBuildPatterns: [join("static/assets")],
|
||||
cleanAfterEveryBuildPatterns: [join("static/assets/style.js")],
|
||||
cleanAfterEveryBuildPatterns: ["!images/**/*", "!fonts/**/*"],
|
||||
verbose: true,
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
|
Loading…
Reference in New Issue
Block a user