Commit Graph

375 Commits

Author SHA1 Message Date
Alexandre Alapetite
1fe66ad020 Implement Web scraping "HTML + XPath" (#4220)
* More PHP type hints for Fever
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4201
Related to https://github.com/FreshRSS/FreshRSS/issues/4200

* Detail

* Draft

* Progress

* More draft

* Fix thumbnail PHP type hint
https://github.com/FreshRSS/FreshRSS/issues/4215

* More types

* A bit more

* Refactor FreshRSS_Entry::fromArray

* Progress

* Starts to work

* Categories

* Fonctional

* Layout update

* Fix relative URLs

* Cache system

* Forgotten files

* Remove a debug line

* Automatic form validation of XPath expressions

* data-leave-validation

* Fix reload action

* Simpler examples

* Fix column type for PostgreSQL

* Enforce HTTP encoding

* Readme

* Fix get full content

* target="_blank"

* gitignore

* htmlspecialchars_utf8

* Implement HTML <base>
And fix/revert `xml:base` support in SimplePie e49c578817

* SimplePie upstream PR merged
https://github.com/simplepie/simplepie/pull/723
2022-02-28 20:22:43 +01:00
maTh
926ce8ff5f Improved: icons in same color (#4212)
* delete white plus icon

* delete unused icons

* Themes

* Update flat.css

* minimized XML of SVG icons

* RTL CSS fix

* Update ansum.css

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-02-21 19:21:12 +01:00
Alexandre Alapetite
8808fb4545 Fix keep state after favourites tags (#4178)
* Fix keep state after favourites tags
#fix https://github.com/FreshRSS/FreshRSS/issues/4124 regression

* Optimisation
2022-01-29 14:19:16 +01:00
maTh
cf433d4d79 Fixed: wrong dropdown triangle of labels category (#4174)
* Update aside_feed.phtml

* Solution could be so simple
2022-01-27 00:43:46 +01:00
maTh
d2b6fe099a Improvement: menu icons (#4004)
* default icons

* icons Flat theme

* icons Swage theme

* icon gets bright when hover: Ansum theme

* icon gets bright when hover: Blue lagoon theme

* icon gets bright when hover: Origine/Origine Compact theme

* compressed SVG

* Better formated SVG/XML files

* Update bookmark-tag.svg
2022-01-12 23:04:59 +01:00
maTh
f8c5df28ab delete the no-mobile css class (#4128) 2022-01-07 00:35:58 +01:00
Alexandre Alapetite
77e9877316 Add PHPStan (#4021)
* Add PHPStan
#fix https://github.com/FreshRSS/FreshRSS/issues/4016
https://phpstan.org/

```sh
composer run-script phpstan
```

* More fixes

* Fix global variables

* Add .phtml

* Fix merge
https://github.com/FreshRSS/FreshRSS/pull/4090

* Fix more warnings

* Fix view errors and enable in CI

* ReturnTypeWillChange

* Dynamic view type

* Fix Minz static/self bug
2021-12-31 17:00:51 +01:00
maTh
5cac8cce74 Improve: Aside slider: close slider when click on the outside of slider (#4061)
* CSS + PHTML

* give some grey background

* fixed whitespace

* fixed RTL

* close area just for mobile view
2021-12-31 13:17:38 +01:00
maTh
f27b25d9a6 fix (#4065) 2021-12-31 13:16:35 +01:00
maTh
a54aa19dc7 Fix: double main tags (#4014)
* replace div with main

* include the slider into main

* format source

* add close icon for the extension slider

* replace div with main

* Update shortcut.phtml

* fixed the nits
2021-12-03 00:57:32 +01:00
maTh
392861b7c3 Switch category - remember status filter (#3986)
* url parameter

* fixed phpcs

* rename variables
2021-11-24 09:10:23 +01:00
maTh
1ae5a5af14 Improve mobile view: access to the config menu (#3881)
* wip

* improve the header

* Fix theme "Adark"

* fixed theme: Ansum

* Fixed theme: BlueLagoon

* fixed Ansum after PR comment of Frenzie

* Fixed theme: Dark

* fixed theme: Flat

* fixed theme: Mapco

* fixed theme: Origine compact

* fixed theme: Pafat

* fixed theme: Screwdriver

* fixed theme: Swage

* hide the close button in wide view

* fixed base/template RTL

* fixed SCSS of theme Swage

* stylelint fix

* fixed theme Swage

* make fix-all

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-11-12 08:57:36 +01:00
proletarius101
d3be01a1da Add pwa (#3890)
* Don't use Chrome or indeed Firefox on Android

Would close #1963. But I will not finish this PR because the idea that every single website on the internet should have to do this is absolutely ridiculous.

* add pwa manifest

Add a pwa manifest as defined in https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Installable_PWAs
- creates shortcuts without the browser frame
- has a splash screen
- has an independent view stack than the browser one

* update manifest as per pwabuilder.com

* add 32x32 and 48x48 icon config

* enhance manifest spec compliance

* change as per suggestions

* Update app/layout/layout.phtml

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* fix mobile icon padding

* remove screen auto rotation

* change theme color to white

* Move meta
(Should not be in the referrer condition)

* JSON HTTP cache

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-10-24 17:28:40 +02:00
maTh
da4f0dea1f add button to open nav panel (#3879) 2021-10-23 13:53:22 +02:00
maTh
14e5d89e34 Improve conf menu (#3880)
* i18n: "account" added

* reordered menu + add logout in the left nav menu

* Update app/i18n/fr/gen.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-10-14 13:28:19 +02:00
maTh
dfc89831d4 Headline structure improvement (Part 2) (#3851)
* Update about.phtml

* Update queries.phtml

* Update query.phtml

* Update configure.phtml

* Update profile.phtml

* Update simple.phtml

* update app\views\helpers\category\update.phtml
2021-09-18 12:52:17 +02:00
maTh
e5e9a417da Menu: move stats into subscription management (#3803)
* add stats menu into subscription management menu
* delete stats menu entry from dropdown menu
* Delete aside_stats.phtml
* Update aside_subscription.phtml
2021-09-12 11:50:00 +02:00
maTh
9712e4d888 Headline structure improvement (#3830)
* header: h1 deleted - full logo included

* template: config - display

* WIP

* shortcut configs. added fieldset. do not display the border by default

* system.phtml

* subscription: add feed or category

* wip

* wip

* Update bookmarklet.phtml

* Update archiving.phtml

* Update queries.phtml

* Update profile.phtml

* Update manage.phtml

* auth+update

* Update template.rtl.css

* fixed FreshRSS logo (Theme: Mapco)

* Update mapco.rtl.css

* Update _layout.scss

* fixed FreshRSS logo (theme: Dark)

* fix: FreshRSS logo (Theme: BlueLagoon)

* fix: FreshRSS logo (Theme: Ansum)

* fixed: FreshRSS logo (Theme: Alternative Dark)

* fix: FreshRSS logo (Theme: Pafat)

* fix: FreshRSS logo (Theme: Screwdriver)

* fix: FreshRSS logo (theme: Swage)

* Minor lint

* little fix: FreshRSS logo (Theme: Origine)

* Fix: FreshRSS logo (Theme: Origine Compact)

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-09-11 18:22:26 +02:00
maTh
595979d97f Add navigation to about page (#3804)
* add navigation to about page

* empty headline in aside navigation

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-09-02 09:18:20 +02:00
maTh
802409be90 main + nav (#3747) 2021-08-15 23:34:09 +02:00
maTh
ab0285b0aa Add HTML5 tags (#3651)
* use HTML5 tags #3643

added some HTML5 tags: header, main, nav

* <main> into <div>

as dicussed in the PR.
Todo: check side effects (f.e. threepaneview extension)

* fixed whitespace with tabs

* fixed more whitespaces with tabs

it was not my fault, but I fixed it

* added empty lines as wished

* Update app/views/index/global.phtml

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update app/views/index/global.phtml

* Update app/views/index/global.phtml

* Update app/views/index/global.phtml

* Update app/views/index/global.phtml

* Update app/views/index/global.phtml

* Update app/views/index/global.phtml

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2021-07-21 22:42:04 +02:00
Alexandre Alapetite
947e918f05 Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length

* Also check whitespace in CSS files

* Fix line length ext.php

* More syntax, string templates

* Fix exclude-pattern

* Test JS files as well
2021-02-28 12:26:24 +01:00
Alexis Degrugillier
449fee7a2c "Show all" option on labels (#3472)
It uses the favorite option to keep a similar experience through out the application and also to limit the number of options.

See #3263
2021-02-26 23:31:01 +01:00
Alexis Degrugillier
5daee165dc Change confusing naming for label (#3446)
Before, labels were referred to as tag which was confusing since
tags are content generated (retrieved from the feed) and label
are user generated.
Now, labels are properly named in their management page.

See #3444
2021-02-14 20:56:10 +01:00
Clemens Neubauer
b1285466f2 fix layout changes since new hook nav_menu (#3362)
* fix layout if no hooks `nav_menu` are active

* Update app/layout/nav_menu.phtml

oh thx

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-12 20:30:32 +01:00
Alexis Degrugillier
85cbfcedb5 Update user query feature (#3338)
* Change user query wording

There was some misunderstanding in the use of the user query feature,
probably because of the wording. I've change it to make it more obvious.

* Fix feedback when a query is bookmarked

Before, the displayed query name was not the one intended. Now, the name is the one of the current bookmark

* Document user queries

I've added a few words on how to use the user queries because it seems there was some misunderstanding. See #3219
2021-01-07 21:47:39 +01:00
Clemens Neubauer
ef458992c1 two new hooks (#3342)
* add two new hooks

I develop a new extension and i need 2 new hooks for it

* update EN documentation

* Correct typing errors

* Update app/views/helpers/javascript_vars.phtml

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-07 21:45:48 +01:00
Prashant Tholia
6f23999c7b Remember open categories (#3185)
* feature(normal) - Remember opened categories in the left menu

Session storage based implementation to remember opened categories in left menu

Issue Ref: #2248

* lib_phpQuery updates

* Updates covering feedback points and functionality fixes

* Feedback updates

* Revert "lib_phpQuery updates"

This reverts commit dcd23b9418.

* First review

Change variable name to "remember" instead of "open".
Start using localStorage instead of sessionStorage.
Simplify code.

* Simplify remember categories init function

Replace 'session' with 'local' in function names and comment

Set open categories CSS as same as when category is opened in 'active' unfold mode

* Remove URLSearchParams check in remember categories init function

* Delete open categories on login and logout

* JSHint check fix

* Second review

* Make new mode the default for new users
* Always open active category
* Reduce / simplify code

* i18n French

* Revert default value

Wait a bit more for this decision / change

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-11-02 12:03:16 +01:00
Alexandre Alapetite
191cda42e6 Misc. minor
Whitespace...
2020-10-11 10:59:43 +02:00
Frans de Jonge
a23a7f2dbb [lang] Tags management → tag management (#3125)
* [lang] Tags management → tag management

Cf. <https://github.com/FreshRSS/FreshRSS/pull/3121#issuecomment-662922474>.

* Move tag management underneath subscription management
2020-07-23 12:15:46 +02:00
Alexis Degrugillier
909fdaca31 Add tag management page (#3121)
The new page allows to create, delete and rename tags.

See #3058
2020-07-23 11:31:38 +02:00
Alexis Degrugillier
d4554fa087 Change add feed action (#3027)
* Docker Alpine 3.12 (#3025)

https://alpinelinux.org/posts/Alpine-3.12.0-released.html
With PHP 7.3.18 (from 7.3.17) (and Apache 2.4.43 unchanged).
No other significant change spotted

* Ensure feed attributes are used before load

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-06-05 10:09:31 +02:00
Alexandre Alapetite
39df5a8041 Revert FOUC fix (#2991)
Revert https://github.com/FreshRSS/FreshRSS/pull/2913
I have not seen any difference with/without this fix, and it might be
due to the fact that is is blocked by CSP.
At least in Chrome, it generates CSP warnings.
If it should be re-introduced, see warning suggestions:

> Refused to execute inline script because it violates the following
Content Security Policy directive: "default-src 'self'". Either the
'unsafe-inline' keyword, a hash
('sha256-gcoEgwf1rABkUXPaVY2M1RH34tUHWGDn9nAAn/kGYUE='), or a nonce
('nonce-...') is required to enable inline execution. Note also that
'script-src' was not explicitly set, so 'default-src' is used as a
fallback.
2020-05-21 20:55:28 +02:00
Alexandre Alapetite
0442243037 Fix nav_menu mark-as-read (#2909)
* Fix nav_menu mark-as-read

#Fix https://github.com/FreshRSS/FreshRSS/issues/2905
Fix regression from https://github.com/FreshRSS/FreshRSS/pull/2588

We need info about the first item (id_max) before being able to output
nav_menu. Before https://github.com/FreshRSS/FreshRSS/pull/2588 we used
to output everything in memory before starting to produce an output. Now
that we stream the output, we need a temporary buffer until we have
received the first item/article.

* Repair loading page

* Simplify CSS

Make it work in Chrome as well

* Lint

* Partial revert

* Base max_id solely on current time
2020-05-18 18:45:47 +02:00
upskaling
bd8f6f19b6 add lazy loading on favicon (#2962) 2020-05-10 22:12:13 +02:00
Marien Fressinaud
cc7a784cbe Add/mobile feed configuration (#2938)
* Show subscription management button on mobile

* Show aside box-shadow on Origine only when opened

* Reduce padding of Origine posts on mobile

* Shrink stick component with long input

* Show Origine configure icons on mobile

* Show the slider full width on mobile

* Improve the look of forms on mobile

* Fix Ansum theme

* Fix BlueLagoon theme

* Fix Dark theme

* Fix Flat theme

* Fix Mapco theme

* Fix Origine-compact theme

* Fix Pafat theme

* Fix Screwdriver theme

* Fix Swage theme

* Fix Alternative-Dark theme

* Apply RTL script on themes

Co-authored-by: triatic <42704418+triatic@users.noreply.github.com>
2020-05-06 19:55:45 +02:00
Kristian Salonen
bd9a72726d Fix for "Flash Of Unstyled Content" and slow loading in the Firefox (#2913) 2020-04-20 23:20:34 +02:00
Alexandre Alapetite
5ddae68953 Option to control which categories to unfold (#2888)
#fix https://github.com/FreshRSS/FreshRSS/issues/2324
2020-04-16 18:09:54 +02:00
Alexandre Alapetite
22916d6a3e Loader animation while waiting for first articles (#2845)
* Loader animation while waiting for first articles

Especially useful when a slow search is being performed.
Thanks to one new flush at the right time, the left colum and top menu
will be there, waiting for the articles to come. This avoids layout
flashes (the left column used to take the full width while waiting for
articles).
For optimal use, this assumes that the deployment has a proper buffering
configuration, such as in our official Docker image (also when using
Træfik as a reverse proxy in front). Might not work just as well with
other Apache or nginx setups.

* Fix on mobile

And simplified CSS

* Properly hide the loader

It was not possible to find a position where the loading animation would
be always hidden after load, so change strategy to hide it automatically
by CSS when the actual content has arrived
2020-03-28 12:33:57 +01:00
Alexandre Alapetite
9421030925 Option to show/hide favicons (#2821)
* Option to show/hide favicons

#fix https://github.com/FreshRSS/FreshRSS/issues/2819

* Also for subscription list
2020-03-09 20:36:24 +01:00
Frans de Jonge
25666ec5d3 [UI] Add RTL support with RTLCSS (#2776)
* Add dir info to gen.php & install.php!

* Add `make rtl` command

Using rtlcss because it has actually has a command-line application!
2020-03-01 21:15:17 +01:00
Alexandre Alapetite
0f94402b7e Better performance with yield (#2588)
* Better performance with yield

Largely decrease the time to first byte, and reduced memory consumtion.
Before, we used to make several copies in memory of the whole list of
articles before sending them to the client. Now streamed as they are
processed.

* Travis
2020-02-29 18:19:09 +01:00
Julien-Pierre Avérous
d30ac40772 Enhance content path feature (#2778)
- Add a maintenance section to be able to clear cache and force reload a feed.
- Add an icon next to path field to show a pop-up with the result of the content path.

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2020-02-13 18:22:35 +01:00
Offerel
68863fbac8 Show Favorites as Unread (#2766)
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2020-01-16 17:11:04 +01:00
Alexis Degrugillier
59f284d229 Rename sharing action (#2643)
Before, some ad-blocker rules were preventing to display the sharing page
because of its name. I've renamed that page to integration but kept every
thing else identical. So it's still called sharing through out the
application.
If needed, this can be addressed as well.

See #2509 and #2419
2019-11-08 23:49:43 +01:00
Alexis Degrugillier
f6e10579f2 Add category order (#2592)
* Add category order

Each category has a new 'priority' attribute. It is used to sort categories in
views. Categories with the same priority are sorted alphabetically. Categories
with no priority are displayed after those with one.

For example, if we have the following categories:
- A (priority: 2)
- B (no priority)
- C (priority: 1)
- D (priority: 2)
- E (no priority)
- F (priority: 1)

They will be displayed in the following order:
- C
- F
- A
- D
- B
- E

See #190

* Shorten help text

It took too much room and will not be so necessary once we have drag &
drop
2019-10-26 13:16:15 +02:00
Alexandre Alapetite
7a5236de3f Take advantage of PHP 5.4+ short echo (#2585)
* Take advantage of PHP 5.4+ short echo

https://php.net/migration54.new-features thanks to
https://github.com/FreshRSS/FreshRSS/pull/2495

Use `<?=  ?>` instead of `<?php echo; ?>`
10kB of code saved :-)

Done with regular expression:
```
<\?php echo (.+?);? *\?>
<?= \1 ?>
```

* Try Travis fix

https://github.com/squizlabs/PHP_CodeSniffer/issues/2045#issuecomment-395238272
2019-10-23 11:18:20 +02:00
Marien Fressinaud
84f9311fd5 fix: Fix "validate email"-related issues (#2512)
* fix: Make sure $disable_aside is initialized

There was a warning for an uninitialized variable, hidden in production
but visible in development mode.

* fix: Allow to delete account when email isn't validated
2019-08-29 18:08:43 +02:00
Marien Fressinaud
75632e70f0 Provide email address verification feature (#2481)
* Add an email field to the profile page

I reuse the `mail_login` from the configuration. I'm not sure if it's
useful today (I would say it was used when Persona login was available).

A good improvement would be to rename `mail_login` into `email` so it
would be more intuitive to use.

* Add boolean to the conf to force email validation

This commit only adds a configuration item.

* Add email during registration if email must be validated

* Set email token to validate when email changes

* Block access to FreshRSS if email is not validated

* Send email when address is changed

* Allow to resend the validation email

* Allow the user to change its email while blocked

* Document the email validation feature

* fixup! Allow the user to change its email while blocked

* tec: Autoload PHPMailer lib

* Validate email address format

* Add feedback on validation email resend action

* Allow to logout when user is blocked

* fix: Change default email "from"

* Reorganize i18n keys

* Complete all the locales with default english

* Hide sidebar (profile page) if email is not validated

* Check email requirements on registration

* Allow admin to specify email when creating users

* Don't check email format if value is empty

* Remove trailing comma in userController

Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>

* Set PHPMailer validator to html5 before sending email

* fixup! Remove trailing comma in userController
2019-08-29 12:02:05 +02:00
Marien Fressinaud
7fd88adeb0 Add hooks to ExtensionManager (#2482)
Hooks allow to:

- add items in menus
- perform new actions at the end of FreshRSS initialization
2019-08-14 22:19:24 +02:00