Showing the preview picture usually leads to showing a duplicate
image, and frequently leads to showing duplicate images directly
adjacent to each other.
Add the ability to specify hosts and patterns lists to ignore the given
entry url and replace it with the fetched content url without touching
to origin_url.
This initial support should be reworked in the following months to move
the hardcoded ignore lists in the database.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
- Leave origin_url unchanged if difference is an ending slash
- Leave origin_url unchanged if difference is scheme
- Ignore (noop) if difference is query string or fragment
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
I referenced https://css-tricks.com/using-svg/ for using the SVG icon.
The icon has a black foreground and white background, which doesn't
look very good as a placeholder. So, using the background-image style
to show the svg and the inversion filter to make it white on gray.
With the image always present, there isn't much difference between
the with and without image preview templates, so I merged them.
Tested on Chrome, Firefox, and Safari on OSX.
Tags and images aren't coupled, so they shouldn't be coupled in
the UI, either. This also makes the titles and source domains show
up consistently for image and non-image entry cards.
Improve SQL performance by replacing size(e.tags) with a left join and a
null condition
Move the QueryBuilder logic into getRawBuilderForUntaggedByUser
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
We refactor getBuilderByUser to separate QueryBuilder getter and the
orderBy(). The previous code of getBuilderByUser() has been moved to
getSortedQueryBuilderByUser(). getBuildByUser() now returns a
QueryBuilder without the call to orderBy().
A new method named sortQueryBuilder() returns a given QueryBuilder with
an orderBy() call using given sort parameters.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Since the withRemove variable is a template flag, it can be undefined.
In the Entry\Card\_content.html.twig template for example, the withRemove variable is not defined.