Skip to content

Commit d12925b

Browse files
authored
Merge pull request #10 from iamdarkle/fancybox-v5
Fancybox v5
2 parents 9ab9359 + de6026c commit d12925b

22 files changed

+1474
-881
lines changed

.gitattributes

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
**/.gitattributes export-ignore
2+
**/.gitignore export-ignore
3+
**/.gitmodules export-ignore
4+
**/.github export-ignore
5+
**/.travis export-ignore
6+
**/.travis.yml export-ignore
7+
**/.editorconfig export-ignore
8+
**/.styleci.yml export-ignore
9+
10+
**/phpunit.xml export-ignore
11+
**/tests export-ignore
12+
13+
**/js/dist/**/* -diff
14+
**/js/dist/**/* linguist-generated
15+
**/js/dist-typings/**/* -diff
16+
**/js/dist-typings/**/* linguist-generated
17+
**/js/yarn.lock -diff
18+
**/js/package-lock.json -diff
19+
20+
* text=auto eol=lf

.github/workflows/backend.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Fancybox
1+
name: Fancybox PHP
22

33
on: [workflow_dispatch, push, pull_request]
44

.github/workflows/frontend.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Custom Brickrr Styles JS
1+
name: Fancybox JS
22

33
on: [workflow_dispatch, push, pull_request]
44

@@ -12,7 +12,8 @@ jobs:
1212

1313
frontend_directory: ./js
1414
backend_directory: .
15-
js_package_manager: yarn
15+
js_package_manager: npm
1616
main_git_branch: main
17+
1718
secrets:
1819
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}

.gitignore

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/vendor
12
composer.lock
2-
vendor
3-
node_modules
3+
composer.phar
4+
5+
.DS_Store
6+
Thumbs.db
7+
tests/.phpunit.result.cache
8+
/tests/integration/tmp
9+
.vagrant
10+
.idea/*
11+
.vscode
12+
js/coverage-ts

README.md

+28-35
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,41 @@
1-
# Fancybox
2-
![](https://flarum-badge-api.davwheat.dev/v1/compat-latest/darkle/fancybox) [![Total Downloads](http://poser.pugx.org/darkle/fancybox/downloads)](https://packagist.org/packages/darkle/fancybox) [![Latest Stable Version](http://poser.pugx.org/darkle/fancybox/v)](https://packagist.org/packages/darkle/fancybox) [![License](http://poser.pugx.org/darkle/fancybox/license)](https://packagist.org/packages/darkle/fancybox)
1+
# Fancybox v5
2+
[![Latest Stable Version](http://poser.pugx.org/darkle/fancybox/v)](https://packagist.org/packages/darkle/fancybox) [![Total Downloads](http://poser.pugx.org/darkle/fancybox/downloads)](https://packagist.org/packages/darkle/fancybox) [![License](http://poser.pugx.org/darkle/fancybox/license)](https://packagist.org/packages/darkle/fancybox)
33

4-
![Screenshot](https://user-images.githubusercontent.com/15818451/145828827-e272f2e2-3781-4eea-9e4a-3e5aa8077920.gif)
5-
6-
## Getting Started
4+
![Screenshot](https://github.com/iamdarkle/assets/blob/main/flarum/fancybox/msedge_RSzIbACInH.gif?raw=true)
5+
---
76

7+
### Getting Started
88
In order to install the extension, you will need to follow these simple steps.
99

10-
### 🔃 Cross-compatibility
11-
- [`reflar/recache`](https://extiverse.com/extension/reflar/recache)
12-
- [`fof/reactions`](https://github.com/FriendsOfFlarum/reactions)
13-
- [`datlechin/flarum-link-preview`](https://github.com/datlechin/flarum-link-preview)
14-
- [`the-turk/flarum-flamoji`](https://github.com/the-turk/flarum-flamoji)
15-
- [`datitisev/flarum-post-galleries`](https://github.com/datitisev/flarum-post-galleries) ⌛(https://github.com/iamdarkle/fancybox/issues/6)
16-
- [`v17development/flarum-support`](https://extiverse.com/extension/v17development/flarum-support) ⌛(https://github.com/iamdarkle/fancybox/issues/5)
10+
#### ⚠️ Minimum Requirements
1711

18-
### ⚠️ Minimum Requirements
12+
- [flarum/core](https://flarum.org/) 1.2.0
1913

20-
* <a href="https://flarum.org">flarum/core</a> 1.2.0
14+
#### 📥 Installation
2115

22-
### 📥 Installation
23-
```
24-
composer require darkle/fancybox
25-
```
16+
```
17+
composer require darkle/fancybox
18+
```
19+
#### ♻ Updating
2620

27-
### ♻ Updating
28-
```
29-
composer update darkle/fancybox
30-
php flarum cache:clear
31-
```
21+
```
22+
composer require darkle/fancybox
23+
php flarum cache:clear
24+
```
25+
### License
3226

33-
## License
27+
Fancybox v5 is available under the Fancyapps UI license for all applications. You can freely test Fancyapps UI components in your project's development and staging environments to see if they meet your needs. If they do, you'll need to purchase a license and agree to the "License Agreement."
3428

35-
Fancybox v4 is licensed under the Fancyapps UI license for all applications. You can test Fancyapps UI components for free in your project in a development and staging environment to see if it fits your needs, then you must purchase a license from [here](https://fancyapps.com/pricing).
29+
You can explore the license details at fancyapps.com/license and find purchase options at fancyapps.com/pricing.
3630

37-
* darkle/fancybox - [MIT License](https://github.com/iamdarkle/fancybox/blob/main/LICENSE)
38-
* Fancybox v4 (You need a Fancybox license for both non-commercial and commercial use) - [Fancyapps UI license](https://fancyapps.com/license)
31+
- darkle/fancybox - [MIT License](https://github.com/iamdarkle/fancybox/blob/main/LICENSE)
32+
- Fancybox v5 (You need a Fancybox license for both non-commercial and commercial use) - [Fancyapps UI license](https://fancyapps.com/license)
3933

40-
## Useful Links
34+
### Useful Links
4135

42-
* [Fancyapps Web](https://fancyapps.com/)
43-
* [Fancyapps GitHub](https://github.com/fancyapps/ui)
44-
* [Flarum](https://flarum.org)
45-
* [Flarum Community](https://discuss.flarum.org/d/29102-fancybox)
46-
* [GitHub](https://github.com/iamdarkle/fancybox)
47-
* [Packagist](https://packagist.org/packages/darkle/fancybox)
48-
* [Composer](https://getcomposer.org/)
36+
- [Fancyapps Web](https://fancyapps.com/)
37+
- [Fancyapps GitHub](https://github.com/fancyapps/ui)
38+
- [Flarum](https://flarum.org/)
39+
- [GitHub](https://github.com/iamdarkle/fancybox)
40+
- [Composer](https://getcomposer.org/)
41+
- [Packagist](https://packagist.org/)

composer.json

+14-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
"name": "darkle/fancybox",
33
"description": "Fancybox is a touch enabled and responsive tool for displaying images in a 'lightbox' that floats overtop of web page.",
44
"type": "flarum-extension",
5-
"keywords": ["flarum","extension","images","fancybox"],
5+
"keywords": [
6+
"flarum",
7+
"extension",
8+
"images",
9+
"fancybox"
10+
],
611
"license": "MIT",
712
"authors": [
813
{
@@ -20,7 +25,7 @@
2025
},
2126
"autoload": {
2227
"psr-4": {
23-
"darkle\\fancybox\\": "src/"
28+
"Darkle\\Fancybox\\": "src/"
2429
}
2530
},
2631
"extra": {
@@ -32,6 +37,12 @@
3237
"backgroundColor": "#00c8b0",
3338
"color": "#fff"
3439
}
40+
},
41+
"flarum-cli": {
42+
"modules": {
43+
"githubActions": true,
44+
"gitConf": true
45+
}
3546
}
3647
}
37-
}
48+
}

extend.php

+11-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@
33
/*
44
* This file is part of iamdarkle/fancybox
55
*
6-
* Copyright (c) 2022 Tomás Romero.
6+
* Copyright (c) 2024 Tomás Romero.
77
*
88
* For the full copyright and license information, please view the LICENSE.md
99
* file that was distributed with this source code.
1010
*/
1111

12+
namespace Darkle\Fancybox;
13+
1214
use Flarum\Extend;
15+
use Darkle\Fancybox\WrapImagesInGallery;
16+
use Darkle\Fancybox\DefineGalleryTemplate;
1317

1418
return [
1519
(new Extend\Frontend('forum'))
1620
->js(__DIR__.'/js/dist/forum.js')
17-
->css(__DIR__ . '/less/forum.less'),
18-
];
21+
->css(__DIR__.'/less/forum.less'),
22+
23+
(new Extend\Formatter)
24+
->configure(DefineGalleryTemplate::class)
25+
->render(WrapImagesInGallery::class),
26+
];

js/.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.pnp.*
2+
.yarn/*
3+
!.yarn/patches
4+
!.yarn/plugins
5+
!.yarn/releases
6+
!.yarn/sdks
7+
!.yarn/versions
8+
9+
node_modules

js/dist/forum.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dist/forum.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)