Compare commits

..

17 Commits

Author SHA1 Message Date
dependabot[bot]
c5bbcbaca3 Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-09 03:20:44 +00:00
9ab551f335 style changes to tweets and tables 2022-01-16 21:35:21 +00:00
30e2b890cf 1.0.1 2021-07-30 21:12:37 +01:00
dfabac5c2f Add styles for figcaption 2021-07-30 21:12:14 +01:00
292b660138 use ems for media queries 2021-07-30 21:03:03 +01:00
88b08e3fc9 1.0.0 2021-07-30 20:53:03 +01:00
2c0be36e02 audit dependencies 2021-07-30 20:52:50 +01:00
eeb73fb393 1.0.0-RC.8 2020-06-24 19:28:19 +01:00
1b137868fb remove jquery 2020-06-24 19:27:58 +01:00
05deb182e8 add description metadata 2020-06-24 19:25:22 +01:00
c076620755 update dependencies 2020-06-24 18:04:47 +01:00
388790bbae 1.0.0-RC.7 2020-06-24 17:37:16 +01:00
7de12ffe92 Merge pull request #1 from danhead/dependabot/npm_and_yarn/acorn-5.7.4
Bump acorn from 5.7.3 to 5.7.4
2020-06-24 17:29:02 +01:00
dependabot[bot]
7dcbf060c8 Bump acorn from 5.7.3 to 5.7.4
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-03-13 21:42:15 +00:00
c8e8bc5d80 1.0.0-RC.6 2019-10-04 22:34:43 +01:00
05d72f6d03 Bump browsersync 2019-10-04 22:33:47 +01:00
f008ea821f 1.0.0-RC.5 2019-10-04 22:11:14 +01:00
7 changed files with 7425 additions and 3963 deletions

View File

@@ -93,7 +93,7 @@ upAll(dockerOptions).then(
} }
}, },
err => { err => {
process.strerr.write(`Error: ${err.message}\n`); process.stderr.write(`Error: ${err.message}\n`);
process.exit(1); process.exit(1);
}, },
); );

View File

@@ -104,6 +104,7 @@
.content .twitter-tweet { .content .twitter-tweet {
width: auto !important; width: auto !important;
margin: 0 auto;
} }
.content .wp-caption { .content .wp-caption {
@@ -127,8 +128,7 @@
@media (--viewport-md) { @media (--viewport-md) {
.content .twitter-tweet, .content .twitter-tweet,
.content .wp-caption { .content .wp-caption {
margin: 0 0 var(--space-md); padding: var(--space-sm) var(--space-md);
padding: var(--space-md);
} }
} }
@@ -147,6 +147,19 @@
font-size: 0.8rem; font-size: 0.8rem;
} }
.content .wp-block-table {
display: flex;
flex-direction: column;
align-items: center;
}
.content figcaption {
font-size: var(--size-body-extra-small);
font-style: italic;
text-align: center;
color: var(--color-dark-blue);
}
.content table { .content table {
border-collapse: collapse; border-collapse: collapse;
table-layout: fixed; table-layout: fixed;
@@ -165,12 +178,8 @@
} }
} }
.content th,
.content tr,
.content td { .content td {
border-width: 0 0 1px; border: 1px solid var(--color-dark-blue);
border-style: solid;
border-color: var(--color-dark-blue);
padding: var(--space-xs); padding: var(--space-xs);
} }

View File

@@ -71,8 +71,8 @@
--bullet-size: 0.45rem; --bullet-size: 0.45rem;
} }
@custom-media --viewport-sm (min-width: 30rem); @custom-media --viewport-sm (min-width: 30em);
@custom-media --viewport-md (min-width: 40rem); @custom-media --viewport-md (min-width: 40em);
@custom-media --viewport-lg (min-width: 60rem); @custom-media --viewport-lg (min-width: 60em);
@custom-media --viewport-xl (min-width: 75rem); @custom-media --viewport-xl (min-width: 75em);
@custom-media --viewport-wordpress-admin-bar (min-width: 783px); @custom-media --viewport-wordpress-admin-bar (min-width: 783px);

11277
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "windycoys", "name": "windycoys",
"version": "1.0.0-RC.4", "version": "1.0.1",
"description": "Wordpress theme for windycoys.com", "description": "Wordpress theme for windycoys.com",
"author": "Dan Head <me@danielhead.com>", "author": "Dan Head <me@danielhead.com>",
"license": "MIT", "license": "MIT",
@@ -28,42 +28,42 @@
"watch:js": "nodemon -q --watch js -e js --exec npm run js" "watch:js": "nodemon -q --watch js -e js --exec npm run js"
}, },
"dependencies": { "dependencies": {
"@babel/cli": "^7.2.3", "@babel/cli": "^7.14.8",
"@babel/core": "^7.3.4", "@babel/core": "^7.10.3",
"@babel/preset-env": "^7.3.4", "@babel/preset-env": "^7.10.3",
"babel-core": "^7.0.0-bridge.0", "babel-core": "^7.0.0-bridge.0",
"babel-jest": "^24.1.0", "babel-jest": "^26.1.0",
"browser-sync": "^2.26.3", "browser-sync": "^2.27.5",
"cssnano": "^4.1.10", "cssnano": "^4.1.10",
"docker-compose": "^0.12.0", "docker-compose": "^0.12.0",
"eslint": "^5.15.0", "eslint": "^5.16.0",
"eslint-config-airbnb-base": "^13.1.0", "eslint-config-airbnb-base": "^13.2.0",
"eslint-config-prettier": "^4.1.0", "eslint-config-prettier": "^4.3.0",
"eslint-plugin-import": "^2.16.0", "eslint-plugin-import": "^2.21.2",
"eslint-plugin-prettier": "^3.0.1", "eslint-plugin-prettier": "^3.1.4",
"husky": "^1.3.1", "husky": "^1.3.1",
"imagemin": "^6.1.0", "imagemin": "^6.1.0",
"imagemin-gifsicle": "^6.0.1", "imagemin-gifsicle": "^6.0.1",
"imagemin-jpegtran": "^6.0.0", "imagemin-jpegtran": "^6.0.0",
"imagemin-pngquant": "^7.0.0", "imagemin-pngquant": "^7.0.0",
"jest": "^24.1.0", "jest": "^26.1.0",
"lint-staged": "^8.1.5", "lint-staged": "^8.2.1",
"mysql": "^2.16.0", "mysql": "^2.18.1",
"nodemon": "^1.18.10", "nodemon": "^2.0.4",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"postcss-banner": "^3.0.1", "postcss-banner": "^3.0.2",
"postcss-cli": "^6.1.2", "postcss-cli": "^7.1.1",
"postcss-import": "^12.0.1", "postcss-import": "^12.0.1",
"postcss-normalize": "^7.0.1", "postcss-normalize": "^7.0.1",
"postcss-preset-env": "^6.6.0", "postcss-preset-env": "^6.7.0",
"prettier": "^1.16.4", "prettier": "^1.19.1",
"rollup": "^1.4.0", "rollup": "^1.32.1",
"rollup-plugin-babel": "^4.3.2", "rollup-plugin-babel": "^4.4.0",
"rollup-plugin-uglify": "^6.0.2", "rollup-plugin-uglify": "^6.0.4",
"stylelint": "^9.10.1", "stylelint": "^13.6.1",
"stylelint-config-prettier": "^5.0.0", "stylelint-config-prettier": "^5.3.0",
"stylelint-config-standard": "^18.2.0", "stylelint-config-standard": "^18.3.0",
"stylelint-prettier": "^1.0.6" "stylelint-prettier": "^1.1.2"
}, },
"husky": { "husky": {
"hooks": { "hooks": {

View File

@@ -151,6 +151,23 @@ function windycoys_is_ie() {
return false; return false;
} }
function windycoys_first_sentence($string) {
$sentence = preg_split( '/(\.|!|\?)\s/', $string, 2, PREG_SPLIT_DELIM_CAPTURE );
return $sentence['0'] . $sentence['1'];
}
function windycoys_get_description($post_id) {
if (get_post_type() == "post") {
$post = get_post($post_id);
$content = (strlen($post->post_excerpt) === 0) ?
strip_tags(windycoys_first_sentence($post->post_content)) :
$post->post_excerpt;
return $content;
} else {
return get_bloginfo('description');
}
}
function windycoys_jetpack_custom_image($media, $post_id, $args) { function windycoys_jetpack_custom_image($media, $post_id, $args) {
if ($media) { if ($media) {
return $media; return $media;
@@ -169,3 +186,11 @@ function windycoys_jetpack_custom_image($media, $post_id, $args) {
} }
} }
add_filter('jetpack_images_get_images', 'windycoys_jetpack_custom_image', 10, 3); add_filter('jetpack_images_get_images', 'windycoys_jetpack_custom_image', 10, 3);
function windycoys_strip_scripts(&$scripts) {
if(!is_admin()){
$scripts->remove('jquery');
}
}
add_filter('wp_default_scripts', 'windycoys_strip_scripts');

View File

@@ -11,6 +11,7 @@ $manifest = get_template_directory_uri() . '/manifest.json';
<head> <head>
<meta charset="<?php bloginfo('charset'); ?>"> <meta charset="<?php bloginfo('charset'); ?>">
<title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' &laquo; '; } ?> <?php bloginfo('name'); ?></title> <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' &laquo; '; } ?> <?php bloginfo('name'); ?></title>
<meta name="description" content="<?php echo windycoys_get_description(get_the_id()) ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#201f42"> <meta name="theme-color" content="#201f42">
<?php wp_head(); ?> <?php wp_head(); ?>