From 8c70403a1c3c2366a79f8900f8d96018c9475a5e Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 3 Jul 2019 10:32:05 +0200 Subject: [PATCH] support for thumbnails --- liquet/css/home.css | 20 +++++++++++++++++++- liquet/functions.php | 1 + liquet/post-preview.php | 18 +++++++++++------- liquet/style.css | 3 ++- 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/liquet/css/home.css b/liquet/css/home.css index a54b31e..17a6dc9 100644 --- a/liquet/css/home.css +++ b/liquet/css/home.css @@ -53,14 +53,32 @@ } #home #list > .item:hover { - box-shadow: 0 0.2em 0.5em -0.1em #00000014; + box-shadow: var(--small-shadow); transform: scale(1.05); + padding-bottom: 1em; } #home #list > .item .title { margin-bottom: .25em; } +#home #list > .item .thumbnail img { + width: 100%; + height: 12em; + object-fit: cover; + object-position: center; + border-radius: .5em; + transition: var(--animation); + transform: scale(1); +} + +#home #list > .item:hover .thumbnail img { + transform: scale(1.2) translateY(-1em); + height: 16em; + margin: 1em 0; + box-shadow: var(--small-shadow); +} + #home #list hr { margin: 0 1.5em; } \ No newline at end of file diff --git a/liquet/functions.php b/liquet/functions.php index 9dd8348..15c3527 100644 --- a/liquet/functions.php +++ b/liquet/functions.php @@ -4,6 +4,7 @@ include_once( 'logos.php' ); add_theme_support( 'align-wide' ); add_theme_support( 'title-tag' ); +add_theme_support( 'post-thumbnails' ); add_action( 'wp_enqueue_scripts', function () { wp_enqueue_style( 'flex', get_template_directory_uri() . '/css/flex.css' ); diff --git a/liquet/post-preview.php b/liquet/post-preview.php index 64b7950..8aaa1f3 100644 --- a/liquet/post-preview.php +++ b/liquet/post-preview.php @@ -1,26 +1,30 @@
- + +
+ +
+

- +
- ~ min + ~ min
- +

\ No newline at end of file diff --git a/liquet/style.css b/liquet/style.css index 9bf98b7..8ddccb8 100644 --- a/liquet/style.css +++ b/liquet/style.css @@ -2,7 +2,7 @@ Theme Name: Liquet Author: Niccolo Borgioli Description: Minimalistic clean theme -Version: 0.8 +Version: 0.9 License: MIT Tags: minimal, simple, typography, clean Author URI: https://nicco.io @@ -20,6 +20,7 @@ Theme URI: https://github.com/cupcakearmy/liquet --clr-ligher: #eeeeee; --text-width: 35rem; --animation: all 100ms ease; + --small-shadow: 0 0.2em 0.5em -0.1em #00000014; } html, body {