Skip to content

Commit

Permalink
Merge pull request #258 from dragomano/v2.9
Browse files Browse the repository at this point in the history
Update to 2.9
  • Loading branch information
dragomano authored Jan 1, 2025
2 parents a186ca0 + 8d39764 commit ec2dbe7
Show file tree
Hide file tree
Showing 517 changed files with 5,421 additions and 4,536 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ tab_width = 4
trim_trailing_whitespace = true
charset = utf-8

[*.{js,css,scss,vue,json}]
[*.{js,css}]
indent_style = space
indent_size = 2
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/.github export-ignore
/configs export-ignore
/docs export-ignore
/resources export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/*.md export-ignore
Expand All @@ -13,4 +14,4 @@
/composer.lock export-ignore
/package.json export-ignore
/pnpm-lock.yaml export-ignore
/rector.php export-ignore
/rector.php export-ignore
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**/output/
node_modules/
src/Sources/LightPortal/Libs/*
src/Sources/LightPortal/packages/*
src/Sources/index.php
composer.lock

Expand All @@ -18,13 +19,8 @@ src/Themes/default/css/light_portal/virtual-select.min.css

src/Themes/default/scripts/light_portal/*
!src/Themes/default/scripts/light_portal/index.php
!src/Themes/default/scripts/light_portal/admin.js
!src/Themes/default/scripts/light_portal/app.js
!src/Themes/default/scripts/light_portal/app_comments.js
!src/Themes/default/scripts/light_portal/app_plugins.js
!src/Themes/default/scripts/light_portal/dev
!src/Themes/default/scripts/light_portal/portal.js

**/Plugins/**/*.less
**/Plugins/**/langs/*

**/Plugins/ApexCharts/*
Expand All @@ -40,4 +36,4 @@ src/Themes/default/scripts/light_portal/*
!**/Plugins/**/langs
!**/Plugins/**/langs/english.php

*.zip
*.zip
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## How to contribute

- Fork the repository. If you are not used to Github, please check out [fork a repository](https://help.github.com/fork-a-repo).
- Fork the repository. If you are not used to GitHub, please check out [fork a repository](https://help.github.com/fork-a-repo).
- Branch your repository, to commit the desired changes.
- Test your code.
- Send a pull request to us.
Expand All @@ -16,13 +16,13 @@

## How to submit a pull request

- Check if the develop branch exists. If it exist use it to pull your request into.
- Check if the develop branch exists. If it exists use it to pull your request into.
- If you want to send a bug fix, use `Fix` word in the title of your PR (i.e. `Fix page permissions`).
- If you want to send a new feature, use `Add` word in the title of your PR (i.e `Add a new frontpage template`).

In any case, the title of each of your commits should continue such a phrase — `If applied, this commit will ...` (`Update HelloPortal addon`, etc.)

## Styleguides with examples
## Styleguide with examples

### PHP Styleguide

Expand Down Expand Up @@ -72,9 +72,9 @@ var_dump($result);

### CSS Styleguide

- Use LESS (`portal.less`) to modify desired rules.
- Use SASS (see `resources/sass/portal.scss`) to modify desired rules.

```less
```scss
#comment_form {
textarea {
width: 100%;
Expand All @@ -93,7 +93,7 @@ var_dump($result);

### JavaScript Styleguide

- Use native JavaScript, or [Alpine.js](https://github.com/alpinejs/alpine) (3.x), or [Vue.js](https://vuejs.org) (3.x) instead of jQuery.
- Use native JavaScript, [Alpine.js](https://github.com/alpinejs/alpine) (3.x), [htmx](https://htmx.org) (2.x), or [Svelte](https://svelte.dev/) (5.x).
- Use [`const`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) or [`let`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let) instead of `var`.

```js
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ The portal supports BBCode, HTML, PHP, as well as Markdown content within pages
- Built-in ad manager (AdsBlock plugin)
- Import and export functionality for pages, blocks, and plugins
- Support for standalone mode
- Feedback area

## Supported by

Expand Down
10 changes: 3 additions & 7 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
<fileset dir="./src">
<include name="Themes/**" />
<exclude name="**/.idea/**" />
<exclude name="Themes/default/LightPortal/components/**" />
<exclude name="Themes/default/css/light_portal/sass/**" />
<exclude name="Themes/default/css/light_portal/plugins.css" />
<exclude name="Themes/default/scripts/light_portal/dev/**" />
<exclude name="Themes/default/scripts/light_portal/app*" />
Expand Down Expand Up @@ -72,7 +70,7 @@
<exclude name="Sources/LightPortal/Plugins/YandexTurbo/**" />
<exclude name="Sources/LightPortal/Compilers/Less.php" />
<exclude name="Sources/LightPortal/Compilers/Sass.php" />
<exclude name="Sources/LightPortal/Settings/development.config.php" />
<exclude name="Sources/LightPortal/development.config.php" />
<exclude name="Sources/LightPortal/composer.json" />
<exclude name="Sources/LightPortal/composer.lock" />
<exclude name="Sources/LightPortal/create_index.php" />
Expand Down Expand Up @@ -129,8 +127,6 @@
<include name="Themes/**" />
<exclude name="Themes/default/languages/**" />
<exclude name="**/.idea/**" />
<exclude name="Themes/default/LightPortal/components/**" />
<exclude name="Themes/default/css/light_portal/sass/**" />
<exclude name="Themes/default/css/light_portal/plugins.css" />
<exclude name="Themes/default/scripts/light_portal/dev/**" />
<exclude name="Themes/default/scripts/light_portal/app*" />
Expand All @@ -140,7 +136,7 @@
<exclude name="Sources/LightPortal/Plugins/**" />
<exclude name="Sources/LightPortal/Compilers/Less.php" />
<exclude name="Sources/LightPortal/Compilers/Sass.php" />
<exclude name="Sources/LightPortal/Settings/development.config.php" />
<exclude name="Sources/LightPortal/development.config.php" />
<exclude name="Sources/LightPortal/composer.json" />
<exclude name="Sources/LightPortal/composer.lock" />
<exclude name="Sources/LightPortal/create_index.php" />
Expand All @@ -157,4 +153,4 @@
</fileset>
</zip>
</target>
</project>
</project>
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"ext-dom": "*"
},
"require-dev": {
"rector/rector": "^1.0",
"rector/rector": "^2.0",
"phing/phing": "3.*"
},
"minimum-stability": "alpha",
"config": {
"platform": {
"php": "8.1"
Expand Down
17 changes: 4 additions & 13 deletions configs/vite.comments.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { svelte } from '@sveltejs/vite-plugin-svelte';

const dist = resolve('./src/Themes/default/scripts/light_portal');

Expand All @@ -10,25 +10,16 @@ export default defineConfig({
outDir: dist,
emptyOutDir: false,
rollupOptions: {
input: 'src/Themes/default/scripts/light_portal/app_comments.js',
input: 'resources/js/app_comments.js',
output: {
entryFileNames: 'bundle_comments.js',
format: 'esm',
},
},
},
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag === 'markdown-toolbar' || tag.startsWith('md-'),
},
},
svelte({
emitCss: false,
}),
],
resolve: {
alias: {
'@scripts': resolve('./src/Themes/default/scripts/light_portal/dev'),
},
},
});
2 changes: 1 addition & 1 deletion configs/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineConfig({
outDir: dist,
emptyOutDir: false,
rollupOptions: {
input: 'src/Themes/default/scripts/light_portal/app.js',
input: 'resources/js/app.js',
output: {
entryFileNames: 'bundle.min.js',
format: 'iife',
Expand Down
15 changes: 7 additions & 8 deletions configs/vite.plugins.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { svelte } from '@sveltejs/vite-plugin-svelte';

const dist = resolve('./src/Themes/default/scripts/light_portal');

Expand All @@ -10,17 +10,16 @@ export default defineConfig({
outDir: dist,
emptyOutDir: false,
rollupOptions: {
input: 'src/Themes/default/scripts/light_portal/app_plugins',
input: 'resources/js/app_plugins.js',
output: {
entryFileNames: 'bundle_plugins.js',
format: 'esm',
},
},
},
plugins: [vue()],
resolve: {
alias: {
'@scripts': resolve('./src/Themes/default/scripts/light_portal/dev'),
},
},
plugins: [
svelte({
emitCss: false,
}),
],
});
2 changes: 1 addition & 1 deletion configs/vite.sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
outDir: dist,
emptyOutDir: false,
rollupOptions: {
input: 'src/Themes/default/css/light_portal/sass/portal.scss',
input: 'resources/sass/portal.scss',
output: {
assetFileNames: 'portal.css',
},
Expand Down
44 changes: 44 additions & 0 deletions docs/.vitepress/components/ExampleArea.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<script setup>
import {
VPTeamPage,
VPTeamPageTitle
} from 'vitepress/theme'
import ExampleSites from './ExampleSites.vue'
const sites = [
{
image: '/example_1.png',
title: 'Light Portal Showcase',
link: 'https://demo.dragomano.ru',
},
{
image: '/example_2.png',
title: 'Απανταχού Τριγλιανοί Απόγονοι',
link: 'https://www.triglianoi.gr'
},
{
image: '/example_3.png',
title: 'Italian SMF',
link: 'https://www.italiansmf.net/forum/'
},
{
image: '/example_4.png',
title: 'Alliance Multi Gaming',
link: 'https://alliancemultigaming.com/forum/',
}
]
</script>

<template>
<VPTeamPage>
<VPTeamPageTitle>
<template #title>
{{ $frontmatter.subtitle }}
</template>
<template #lead>
<span v-html="$frontmatter.lead"></span>
</template>
</VPTeamPageTitle>
<ExampleSites :sites="sites" />
</VPTeamPage>
</template>
4 changes: 2 additions & 2 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export default defineConfig({
resolve: {
alias: [
{
find: /^.*\/ExampleSites\.vue$/,
replacement: fileURLToPath(new URL('./components/ExampleSites.vue', import.meta.url)),
find: /^.*\/ExampleArea\.vue$/,
replacement: fileURLToPath(new URL('./components/ExampleArea.vue', import.meta.url)),
},
],
},
Expand Down
36 changes: 2 additions & 34 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,7 @@ lead: If you want to add your site into this list, just send me a message via <e
---

<script setup>
import {
VPTeamPage,
VPTeamPageTitle
} from 'vitepress/theme'
import ExampleSites from './ExampleSites.vue'

const sites = [
{
image: '/example_1.png',
title: 'Light Portal Showcase',
link: 'https://demo.dragomano.ru',
},
{
image: '/example_2.png',
title: 'Απανταχού Τριγλιανοί Απόγονοι',
link: 'https://www.triglianoi.gr'
},
{
image: '/example_3.png',
title: 'Italian SMF',
link: 'https://www.italiansmf.net/forum/'
},
]
import ExampleArea from './ExampleArea.vue'
</script>

<VPTeamPage>
<VPTeamPageTitle>
<template #title>
{{ $frontmatter.subtitle }}
</template>
<template #lead>
<span v-html="$frontmatter.lead"></span>
</template>
</VPTeamPageTitle>
<ExampleSites :sites="sites" />
</VPTeamPage>
<ExampleArea />
Binary file added docs/src/public/example_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 2 additions & 29 deletions docs/src/ru/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,7 @@ lead: Если вы хотите добавить свой сайт в этот
---

<script setup>
import {
VPTeamPage,
VPTeamPageTitle
} from 'vitepress/theme'
import ExampleSites from './ExampleSites.vue'

const sites = [
{
image: '/example_1.png',
title: 'Light Portal Showcase',
link: 'https://demo.dragomano.ru',
},
{
image: '/example_2.png',
title: 'Απανταχού Τριγλιανοί Απόγονοι',
link: 'https://www.triglianoi.gr'
},
{
image: '/example_3.png',
title: 'Italian SMF',
link: 'https://www.italiansmf.net/forum/'
},
]
import ExampleArea from './ExampleArea.vue'
</script>

<VPTeamPage>
<VPTeamPageTitle>
<template #title></template>
<template #lead></template>
</VPTeamPageTitle>
<ExampleSites :sites="sites" /></VPTeamPage>
<ExampleArea />
7 changes: 7 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default [
{
globals: {
portalJson: 'readonly',
},
}
];
Loading

0 comments on commit ec2dbe7

Please sign in to comment.