Code Monkey home page Code Monkey logo

kirby-previews's People

Contributors

sylvainjule avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kirby-previews's Issues

[Feature Request] Ability to Display File/Image Information

Kirby's default for listing image entries in a structure field table is to simply show a tiny little square preview of the image. Often, that is not sufficient, and we need more information - eg.: the file name, the file dimensions, the file size, etc.

It would be wonderful if Kirby Previews could enable the user to optionally display added file information in these entries - perhaps via config options. Example:

<?php 

return [
    // toggle thumbnail previews for images
    'sylvainjule.kirbypreviews.filethumb' => false,

    // extra information to display for file/image fields
    'sylvainjule.kirbypreviews.fileinfo' => "{{ file.filename }}"
];

Strange preview with color palette plugin

I’m not sure whether this is a bug or a feature but I’m getting an additional unintended color preview if I’m using HTML color names for tooltips.
This is my blueprint:

label: Farbe
type: color-palette
options:
	color1:
		background: '#01438E'
		tooltip: Dunkelblau
	color2:
		background: '#97BEE3'
		tooltip: Hellblau
	color3:
		background: '#E30513'
		tooltip: Rot
	color4:
		background: '#E3BF8A'
		tooltip: Beige
default: color1

In color4 I’m using the name “beige” for the tooltip, and this is what I get in the preview:
Bildschirmfoto 2021-12-28 um 11 05 19
There is a second color which is apparently using the color name from the tooltip text. It’s similar if I’m using “red” as tooltip text, for example; then it will just add a red square next to the primary color.

Inspecting the element with the browser’s developer tools, this is the output I see:

<div class="k-color-palette-field-preview" column="[object Object]" field="[object Object]">
	<div class="color-preview" style="background-color: rgb(227, 191, 138);"></div>
	<div class="color-preview" style="background-color: beige;"></div>
	<div class="color-preview"></div>
</div>

Also, this [object Object] stuff doesn’t look right to me either. It seems like this is some JS failing to print the output of an object.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.