All Projects → sylvainjule → kirby-imageradio

sylvainjule / kirby-imageradio

Licence: other
Add illustrations to Kirby's radio buttons. Kirby 2 and 3.

Programming Languages

PHP
23972 projects - #3 most used programming language
SCSS
7915 projects
Vue
7211 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to kirby-imageradio

kirby-imageboxes
Add illustrations to Kirby's checkboxes. Kirby 2 and 3.
Stars: ✭ 33 (-32.65%)
Mutual labels:  kirby, illustration, illustrated
kirby-locator
A simple map & geolocation field, built on top of open-source services and Mapbox. Kirby 3 only.
Stars: ✭ 83 (+69.39%)
Mutual labels:  kirby
vor-python-decoder
Decodes VOR signal from WAV file to get the bearing to your position
Stars: ✭ 33 (-32.65%)
Mutual labels:  radio
soba
Kirby starter theme that uses Twig, PostCSS, and Browsersync
Stars: ✭ 16 (-67.35%)
Mutual labels:  kirby
nrsc5-dui
An enhanced, user-friendly version of nrsc5-gui that is not heavily dependent upon Python processing for audio generation.
Stars: ✭ 49 (+0%)
Mutual labels:  radio
qc image unpacker
Qualcomm image unpacker
Stars: ✭ 44 (-10.2%)
Mutual labels:  radio
codec2 talkie
Turn your Android phone into Codec2 Walkie-Talkie (Bluetooth/USB/TCPIP KISS modem client for DV digital voice communication)
Stars: ✭ 65 (+32.65%)
Mutual labels:  radio
cariboulite
CaribouLite turns any 40-pin Raspberry-Pi into a Tx/Rx 6GHz SDR
Stars: ✭ 785 (+1502.04%)
Mutual labels:  radio
Virgo
📡 Virgo: A Versatile Spectrometer for Radio Astronomy
Stars: ✭ 85 (+73.47%)
Mutual labels:  radio
kirby-ga
Kirby GA - Google Analytics
Stars: ✭ 16 (-67.35%)
Mutual labels:  kirby
jradio
Software radio decoding
Stars: ✭ 40 (-18.37%)
Mutual labels:  radio
vuekit
Kirby 3 + Vue.js kit
Stars: ✭ 16 (-67.35%)
Mutual labels:  kirby
kirby-blade
Enable Laravel Blade Template Engine for Kirby 3
Stars: ✭ 20 (-59.18%)
Mutual labels:  kirby
FT857d
CAT support for Arduino, simulating a Yaesu FT-857D
Stars: ✭ 31 (-36.73%)
Mutual labels:  radio
PHP-Broadcast-radio
🌈 Autonomous streaming audio ,serveronline internet radio is free streaming music for your listening pleasure, as well as news and announcements.
Stars: ✭ 38 (-22.45%)
Mutual labels:  radio
eggheadio-course-notes
Really Good Notes on egghead.io courses 🌱
Stars: ✭ 125 (+155.1%)
Mutual labels:  illustration
Cartkit
Cartkit - The [quick] starter kit!
Stars: ✭ 39 (-20.41%)
Mutual labels:  kirby
Radio
Simple Android webradio player
Stars: ✭ 21 (-57.14%)
Mutual labels:  radio
HyperCast
A JavaScript/Discord.JS bot for Discord named HyperCast. HyperCast is an original bot that has a feature like a radio in a car. You can listen to different genres and switch by using a single command.
Stars: ✭ 14 (-71.43%)
Mutual labels:  radio
gr-etcetera
Additional PyBOMBS recipes that aren't in gr-recipes
Stars: ✭ 71 (+44.9%)
Mutual labels:  radio

Kirby illustrated radios

Add illustrations to radio buttons.

cover


Overview

This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, please consider making a donation of your choice or purchasing your license(s) through my affiliate link.


1. Installation

If you are looking to use this field with Kirby 2, please switch to the kirby-2 branch.

Download and copy this repository to /site/plugins/imageradio

Alternatively, you can install it with composer: composer require sylvainjule/imageradio


2. Setup

The field is best used with the columns option set.

2.1. Hardcoded options

If the field's options are hardcoded, images need to be placed in the assets/images folder of your installation.

The image value must be a filename, the field will automatically prefix it with the correct path.

myimageradio:
  label: Pick a theme
  type: imageradio
  columns: 3
  options:
    light:
      text: Light theme
      image: light.jpg
    dark:
      text: Dark theme
      image: dark.jpg
    blue:
      text: Blue theme
      image: blue.jpg

2.2. Dynamic options

The field is compatible with both query and api fetch. You need to explicitely set the result text, stored value and image url.

The image value must return an absolute url.

myimageradio:
  label: Pick a theme
  type: imageradio
  columns: 3
  options: query
  query:
    fetch: page.images
    text: "{{ file.filename }}"
    value: "{{ file.id }}"
    image: "{{ file.resize(512).url }}"

Notice the {{ file.resize(512).url }} instead of {{ file.url }}. Two reasons for this:

  • Using a thumb url will prevent loading unnecessarily large images.
  • 512 is the default value of the Files field's thumbs. Therefore it is likely that the thumb will have already been created.

I recommend using a resize number already used by the panel (128, 256, 512, 768, 1024).


3. Global options

3.1. baseUrl

If you want the images to be queried from a different location than the assets/images folder, you can set the baseUrl option in your config.php file to whatever folder you'd like. For example:

'sylvainjule.imageradio.baseUrl' => '{{ kirby.url("assets") }}/my-custom-folder',

4. Per-field options

4.1. ratio

ratio

The ratio of the image container, to be adjusted depending on your images. Default is 1/1.

myimageradio:
  type: imageradio
  ratio: 1/1

4.2. fit

fit

Defines how the image should fit within its container, either contain or cover. Default is cover.

myimageradio:
  type: imageradio
  fit: cover

4.3. mobile

By default, images are not displayed when the panel switches to its mobile view. Not recommended, but if you want to override this, set the option to true.

myimageradio:
  type: imageradio
  mobile: false

4.4. gap

gap

Whether the field should have a 1rem gap between each input, K2-like. Default is false.

myimageradio:
  type: imageradio
  gap: false

5. License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].