7 Commits

Author SHA1 Message Date
38ff8cdc2c Update README.md 2021-03-10 19:25:16 +01:00
6ff2e56501 fixed image height & js formatting 2020-09-07 17:06:01 +02:00
cupcakearmy
331d47c9e9 update deps, fixed images and version bump 2020-09-03 11:31:22 +02:00
cupcakearmy
8a7393b593 √ersion bump 2020-01-07 23:48:02 +01:00
cupcakearmy
64dad4c4b0 add wp.com to csp 2020-01-07 14:51:25 +01:00
cupcakearmy
e0277ff7e1 add lock file 2020-01-04 17:18:56 +01:00
cupcakearmy
b425bce2a7 only deploy on tag 2020-01-04 17:17:24 +01:00
12 changed files with 5312 additions and 74 deletions

View File

@@ -31,5 +31,5 @@ steps:
- docker-compose -f docker-compose.prod.yml down - docker-compose -f docker-compose.prod.yml down
- docker-compose -f docker-compose.prod.yml up -d - docker-compose -f docker-compose.prod.yml up -d
when: when:
event: push event: tag
branch: master branch: master

3
.gitignore vendored
View File

@@ -6,9 +6,8 @@ data/
# Node # Node
node_modules/ node_modules/
pnpm-lock.yaml
yarn.lock
# Generated # Generated
.cache/ .cache/
liquet/dist/ liquet/dist/
liquet.zip

View File

@@ -2,6 +2,8 @@
A minimalistic and clean wordpress theme. Guteberg support out of the box. A minimalistic and clean wordpress theme. Guteberg support out of the box.
> 🚨 Discontinued
## Required Plugins ## Required Plugins
- [Code Prettify](https://wordpress.org/plugins/code-prettify/) - [Code Prettify](https://wordpress.org/plugins/code-prettify/)

View File

@@ -8,7 +8,7 @@ add_theme_support( 'post-thumbnails' );
add_filter( 'wp_headers', function ( $headers ) { add_filter( 'wp_headers', function ( $headers ) {
$headers['Content-Security-Policy'] = "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://s.w.org; report-uri csp@nicco.io"; $headers['Content-Security-Policy'] = "default-src 'self' wp.com; script-src 'self' 'unsafe-inline' wp.com; style-src 'self' 'unsafe-inline' wp.com; img-src 'self' wp.com data: https://s.w.org;";
$headers['X-Content-Type-Options'] = 'nosniff'; $headers['X-Content-Type-Options'] = 'nosniff';
$headers['X-Frame-Options'] = "deny"; $headers['X-Frame-Options'] = "deny";
$headers['Strict-Transport-Security'] = "max-age=31536000"; $headers['Strict-Transport-Security'] = "max-age=31536000";

View File

@@ -2,7 +2,7 @@
Theme Name: Liquet Theme Name: Liquet
Author: Niccolo Borgioli Author: Niccolo Borgioli
Description: Minimalistic clean theme Description: Minimalistic clean theme
Version: 0.14 Version: 0.17
License: MIT License: MIT
Tags: minimal, simple, typography, clean Tags: minimal, simple, typography, clean
Author URI: https://nicco.io Author URI: https://nicco.io

View File

@@ -4,6 +4,11 @@
"dev": "parcel watch --no-hmr --no-source-maps -d liquet/dist ./src/js/index.js ./src/styles/index.styl", "dev": "parcel watch --no-hmr --no-source-maps -d liquet/dist ./src/js/index.js ./src/styles/index.styl",
"build": "rm -rf ./liquet/dist && parcel build --no-source-maps -d liquet/dist ./src/js/index.js ./src/styles/index.styl" "build": "rm -rf ./liquet/dist && parcel build --no-source-maps -d liquet/dist ./src/js/index.js ./src/styles/index.styl"
}, },
"browserslist": [
"last 2 chrome versions",
"last 2 safari versions",
"last 2 firefox versions"
],
"dependencies": { "dependencies": {
"@swup/preload-plugin": "1.0.x", "@swup/preload-plugin": "1.0.x",
"jquery": "^3.4.1", "jquery": "^3.4.1",

View File

@@ -7,7 +7,6 @@ export default () => {
let page = WPParams.lazy.current_page let page = WPParams.lazy.current_page
function load() { function load() {
const pixelToBottom = this.scrollHeight - (this.scrollTop + this.clientHeight) const pixelToBottom = this.scrollHeight - (this.scrollTop + this.clientHeight)
if (!loading && pixelToBottom < bottomOffset) { if (!loading && pixelToBottom < bottomOffset) {
@@ -16,9 +15,7 @@ export default () => {
$.ajax({ $.ajax({
url: WPParams.lazy.ajaxurl, url: WPParams.lazy.ajaxurl,
data: { data: {
name: window.location.pathname name: window.location.pathname.replace(/(\/\d+){3}\//, '').replace(/\/$/, ''),
.replace(/(\/\d+){3}\//, '')
.replace(/\/$/, ''),
action: 'lazy_load', action: 'lazy_load',
page, page,
}, },
@@ -29,7 +26,7 @@ export default () => {
page++ page++
loading = false loading = false
} }
} },
}) })
} }
} }

View File

@@ -19,12 +19,12 @@ export default () => {
if (isDark()) off() if (isDark()) off()
window.toggleLights = () => isDark() ? on() : off() window.toggleLights = () => (isDark() ? on() : off())
// Focus scrolling // Focus scrolling
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const toFocus = document.querySelector('[data-focusme]') const toFocus = document.querySelector('[data-focusme]')
toFocus.tabIndex = '1' toFocus.tabIndex = '1'
toFocus.focus({preventScroll: true}) toFocus.focus({ preventScroll: true })
}) })
} }

View File

@@ -5,7 +5,7 @@ export default (fn) => {
const swup = new Swup({ const swup = new Swup({
linkSelector: `a[href^="${window.location.origin}"]:not([data-no-swup]), a[href^="/"]:not([data-no-swup])`, linkSelector: `a[href^="${window.location.origin}"]:not([data-no-swup]), a[href^="/"]:not([data-no-swup])`,
plugins: [new SwupPreloadPlugin()], plugins: [new SwupPreloadPlugin()],
containers: ['#app'] containers: ['#app'],
}) })
swup.on('contentReplaced', fn) swup.on('contentReplaced', fn)

View File

@@ -86,6 +86,10 @@
display: inline-block display: inline-block
font-size: 105% font-size: 105%
figure
img
height: 100%
.links .links
& > div & > div
transform rotate(180deg) scale(1) transform rotate(180deg) scale(1)

5231
yarn.lock Normal file

File diff suppressed because it is too large Load Diff