├── latest-version.txt ├── resources ├── lang │ ├── en-US.mo │ ├── _fancy-imagebar.pot │ ├── es.po │ ├── sv.po │ ├── is.po │ ├── en-US.po │ ├── sr.po │ ├── pl.po │ ├── sr-cyrl.po │ ├── nb.po │ ├── af.po │ ├── da.po │ ├── hu.po │ ├── it.po │ ├── uk.po │ ├── pt-BR.po │ ├── ru.po │ ├── ca.po │ ├── nl.po │ ├── de.po │ └── fr.po ├── views │ ├── fancy-imagebar.phtml │ ├── script.phtml │ ├── media-table.phtml │ └── settings.phtml └── css │ └── style.css ├── src └── sass │ ├── _webtrees-themes-clouds.scss │ ├── _webtrees-themes-minimal.scss │ ├── _webtrees-themes-colors.scss │ ├── _webtrees-themes.scss │ ├── _webtrees-themes-xenea.scss │ ├── _webtrees-themes-fab.scss │ ├── _webtrees-themes-webtrees.scss │ ├── _custom-themes-rural.scss │ └── style.scss ├── webpack.mix.config.js ├── module.php ├── webpack.mix.js ├── webpack.mix.archive.js ├── webpack.mix.distribution.js ├── package.json ├── webpack.mix.module.js ├── README.md ├── FancyImagebarModule.php └── LICENSE.md /latest-version.txt: -------------------------------------------------------------------------------- 1 | 2.4.1 2 | -------------------------------------------------------------------------------- /resources/lang/en-US.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JustCarmen/webtrees-fancy-imagebar/HEAD/resources/lang/en-US.mo -------------------------------------------------------------------------------- /src/sass/_webtrees-themes-clouds.scss: -------------------------------------------------------------------------------- 1 | .wt-theme-clouds { 2 | 3 | .jc-fancy-imagebar { 4 | border: 1px solid #003399; 5 | } 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/sass/_webtrees-themes-minimal.scss: -------------------------------------------------------------------------------- 1 | .wt-theme-minimal { 2 | 3 | .jc-fancy-imagebar-divider { 4 | background-color: #555; 5 | height: 1px 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/sass/_webtrees-themes-colors.scss: -------------------------------------------------------------------------------- 1 | .wt-theme-colors { 2 | 3 | .jc-fancy-imagebar-divider { 4 | background-color: #999; 5 | height: 1px; 6 | margin-top: 1px 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /webpack.mix.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Laravel mix - Shared config 3 | */ 4 | 5 | module.exports = { 6 | version: '2.4.1', 7 | build_dir: 'build', 8 | public_dir: 'resources', 9 | dist_dir: 'dist/jc-fancy-imagebar' 10 | } 11 | -------------------------------------------------------------------------------- /src/sass/_webtrees-themes.scss: -------------------------------------------------------------------------------- 1 | /** webtrees themes */ 2 | @import "webtrees-themes-clouds"; 3 | @import "webtrees-themes-colors"; 4 | @import "webtrees-themes-fab"; 5 | @import "webtrees-themes-minimal"; 6 | @import "webtrees-themes-webtrees"; 7 | @import "webtrees-themes-xenea"; 8 | -------------------------------------------------------------------------------- /src/sass/_webtrees-themes-xenea.scss: -------------------------------------------------------------------------------- 1 | .wt-theme-xenea { 2 | 3 | .jc-fancy-imagebar { 4 | margin-top: 5px; 5 | 6 | &-divider { 7 | background-color: #0073CF; 8 | height: 2px; 9 | margin: 5px 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/sass/_webtrees-themes-fab.scss: -------------------------------------------------------------------------------- 1 | .wt-theme-fab { 2 | 3 | .jc-fancy-imagebar { 4 | 5 | border: 5px solid #EEE; 6 | border-bottom-right-radius: .25rem; 7 | border-bottom-left-radius: .25rem; 8 | 9 | @include jc-container-lg; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/sass/_webtrees-themes-webtrees.scss: -------------------------------------------------------------------------------- 1 | .wt-theme-webtrees { 2 | 3 | .jc-fancy-imagebar { 4 | margin-top: 3px; 5 | 6 | &-divider { 7 | background-color: #81A9CB; 8 | height: 1px; 9 | margin-top: 3px 10 | } 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /module.php: -------------------------------------------------------------------------------- 1 | get(FancyImagebarModule::class); 13 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Laravel mix entry point 3 | * 4 | * Load the appropriate section 5 | */ 6 | 7 | if (process.env.section) { 8 | require(`${__dirname}/webpack.mix.${process.env.section}.js`); 9 | } 10 | 11 | let mix = require('laravel-mix'); 12 | 13 | // Disable mix-manifest.json (https://github.com/laravel-mix/laravel-mix/issues/580#issuecomment-919102692) 14 | // Prevent the distribution zip file from containing an unwanted file 15 | mix.options({ manifest: false }); 16 | -------------------------------------------------------------------------------- /src/sass/_custom-themes-rural.scss: -------------------------------------------------------------------------------- 1 | .wt-theme-_myartjaub_ruraltheme_ { 2 | 3 | .jc-fancy-imagebar { 4 | 5 | @include jc-container-lg; 6 | 7 | max-width: 95vw; 8 | @media (min-width: 768px) { 9 | max-width: 85vw; 10 | } 11 | 12 | border-left: 15px solid white; 13 | border-right: 15px solid white; 14 | } 15 | 16 | // correction for Rural theme 17 | .container-lg { 18 | padding-left: 15px !important; 19 | padding-right: 15px !important; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /webpack.mix.archive.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Laravel mix - Fancy Imagebar 3 | * 4 | * Output: 5 | * - jc-fancy-imagebar-x.zip 6 | * 7 | */ 8 | 9 | const version = "2.0.13"; 10 | 11 | let mix = require('laravel-mix'); 12 | let config = require('./webpack.mix.config'); 13 | 14 | //https://github.com/gregnb/filemanager-webpack-plugin 15 | const FileManagerPlugin = require('filemanager-webpack-plugin'); 16 | 17 | mix.webpackConfig({ 18 | plugins: [ 19 | new FileManagerPlugin({ 20 | events: { 21 | onEnd: { 22 | archive: [{ 23 | source: './dist', 24 | destination: 'dist/jc-fancy-imagebar-' + config.version + '.zip' 25 | }] 26 | } 27 | } 28 | }) 29 | ] 30 | }); 31 | -------------------------------------------------------------------------------- /resources/views/fancy-imagebar.phtml: -------------------------------------------------------------------------------- 1 |
5 | 16 | -------------------------------------------------------------------------------- /src/sass/style.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Fancy Imagebar 3 | */ 4 | 5 | @mixin jc-container-lg { 6 | margin-left: auto; 7 | margin-right:auto; 8 | 9 | @media (min-width: 992px) { 10 | max-width: 960px; 11 | } 12 | 13 | @media (min-width: 1200px) { 14 | max-width: 1140px; 15 | } 16 | 17 | @media (min-width: 1400px) { 18 | max-width: 1320px; 19 | } 20 | 21 | width: 100%; 22 | } 23 | 24 | .jc-fancy-imagebar { 25 | 26 | overflow: hidden; 27 | 28 | img { 29 | object-fit: cover; 30 | object-position: left; 31 | } 32 | 33 | @at-root &-map { 34 | area { 35 | outline: none; 36 | } 37 | } 38 | 39 | } 40 | 41 | @import "webtrees-themes"; 42 | 43 | /** Custom themes */ 44 | @import "custom-themes-rural"; 45 | 46 | // The JustLight theme supports this module from the theme css. 47 | -------------------------------------------------------------------------------- /webpack.mix.distribution.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Laravel mix - Fancy Imagebar 3 | * 4 | * Output: 5 | * - dist 6 | * - resources 7 | * - css 8 | * - lang (.mo files) 9 | * - views 10 | * FancyImagebarModule.php 11 | * module.php 12 | * LICENSE.md 13 | * README.md 14 | * 15 | */ 16 | 17 | let mix = require('laravel-mix'); 18 | let config = require('./webpack.mix.config'); 19 | require('laravel-mix-clean'); 20 | 21 | mix 22 | .setPublicPath('./dist') 23 | .copyDirectory(config.public_dir + '/views', config.dist_dir + '/resources/views') 24 | .copy(config.public_dir + '/lang/*.mo', config.dist_dir + '/resources/lang') 25 | .copy(config.build_dir + '/style.css', config.dist_dir + '/resources/css/style.css') 26 | .copy('FancyImagebarModule.php', config.dist_dir) 27 | .copy('module.php', config.dist_dir) 28 | .copy('LICENSE.md', config.dist_dir) 29 | .copy('README.md', config.dist_dir) 30 | .clean(); 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "format-pot": "format-pot.bat", 5 | "mo-files": "compile-mo.bat", 6 | "development": "cross-env process.env.section=module NODE_ENV=development node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "production": "npm run development && cross-env process.env.section=module NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js", 8 | "distribution": "npm run production && npm run mo-files && cross-env process.env.section=distribution NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "archive": "npm run distribution && cross-env process.env.section=archive NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js" 10 | }, 11 | "devDependencies": { 12 | "clean-webpack-plugin": "^4.0.0", 13 | "filemanager-webpack-plugin": "^9.0.1", 14 | "laravel-mix": "^6.0.49", 15 | "laravel-mix-clean": "^0.1.0", 16 | "postcss": "^8.5.6", 17 | "postcss-rtlcss": "^5.7.1", 18 | "webpack": "^5.100.2", 19 | "webpack-cli": "^6.0.1" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /webpack.mix.module.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Laravel mix - Fancy Imagebar 3 | * 4 | * Output: 5 | * - dist 6 | * - resources 7 | * - css 8 | * - lang (.mo files) 9 | * - views 10 | * FancyImagebarModule.php 11 | * module.php 12 | * LICENSE.md 13 | * README.md 14 | * 15 | */ 16 | 17 | let mix = require('laravel-mix'); 18 | let config = require('./webpack.mix.config'); 19 | 20 | // https://github.com/postcss/autoprefixer 21 | const postcssAutoprefixer = require("autoprefixer")(); 22 | 23 | // https://github.com/elchininet/postcss-rtlcss 24 | const postcssRTLCSS = require('postcss-rtlcss')({safeBothPrefix: true}); 25 | 26 | const dist_dir = 'dist/jc-fancy-imagebar'; 27 | 28 | //https://github.com/gregnb/filemanager-webpack-plugin 29 | const FileManagerPlugin = require('filemanager-webpack-plugin'); 30 | 31 | if (process.env.NODE_ENV === 'production') { 32 | mix.styles(config.public_dir + '/css/style.css', config.build_dir + '/style.css') 33 | } else { 34 | mix 35 | .setPublicPath('./') 36 | .sass('src/sass/style.scss', config.public_dir + '/css/style.css') 37 | .options({ 38 | processCssUrls: false, 39 | postCss: [ 40 | postcssRTLCSS, 41 | postcssAutoprefixer 42 | ] 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /resources/lang/_fancy-imagebar.pot: -------------------------------------------------------------------------------- 1 | #, fuzzy 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: Fancy Imagebar\n" 5 | "POT-Creation-Date: 2023-07-12 21:29+0200\n" 6 | "PO-Revision-Date: \n" 7 | "Last-Translator: Carmen= I18N::translate('Here you can choose which images should be shown in the Fancy Imagebar. If less images are selected than needed to fill the entire Fancy Imagebar, the images will be repeated.') ?>
21 |= I18N::translate('Note: Only local “jpg” or “png” images are supported by this module. External images are not supported. It is not possible to keep transparency for png thumbnails in the Fancy Imagebar. Transparent png-thumbnails will get a black background. The images in this table already have the correct specifications.') ?>
22 |= I18N::translate('The Fancy Imagebar module respects privacy settings!') ?>
23 | 24 |= I18N::translate('Toggle this checkbox to select all images.') ?>
29 || = I18N::translate('Media') ?> | 46 |47 | | 48 | |
|---|---|---|
|
60 | isNotEmpty()) {
63 | $checked = $media_list->contains($media_id) ? 'checked' : '';
64 | } else {
65 | $checked = 'checked';
66 | }
67 | // Get list of media xrefs (for select all checkbox)
68 | $arr_media_xrefs[] = $media_id;
69 | ?>
70 | = $media_file->displayImage(100, 100, 'crop', ['data-toggle' => 'tooltip', 'data-placement' => 'top', 'title' => $media_file->title()]) ?>
71 | = view('components/checkbox-inline', ['label' => '', 'name' => 'media-checkbox', 'value' => $media_id, 'checked' => $checked]) ?>
72 | |
73 | = $media_id ?> | 74 |= $media_file->title() ?> | 75 |