Commit Graph

82 Commits

Author SHA1 Message Date
Samantaz Fox
c04f45d5e3 Move user struct to own file, under Invidious namespace 2022-02-07 17:15:22 +01:00
mastihios
cb0f7bf6b0 Change <input value="..."> encoding to HTML.escape 2022-02-03 01:47:18 +01:00
Samantaz Fox
6cf6c56dd1 Autofocus search bar only on search homepage 2022-01-13 22:19:19 +01:00
Samantaz Fox
68cbc11810 Fix the search box
Fix #277 : autoselect search field
Fix #1107: no spell checking/auto-correct on search field
2022-01-05 03:32:44 +01:00
Samantaz Fox
139786b9ef i18n: pass only the ISO code string to 'translate()'
Don't use the whole Hash everywhere.
Also fall back nicely to english string if no translation exists.
2021-11-21 01:50:11 +01:00
TheFrenchGhosty
22e8f7e287 Fix #2510 2021-10-14 21:00:14 +02:00
TheFrenchGhosty
0ad2793b68 Link to invidious.io/donate/ in the footer 2021-10-14 20:20:25 +02:00
Samantaz Fox
adc12addfa Add config option to display source code URL in footer (#2450) 2021-10-07 13:53:12 +02:00
TheFrenchGhosty
8e3ff79f22 Remove the mention of 'Omar Roth' from the footer 2021-09-01 12:23:50 +02:00
syeopite
349f073b8e Remove unnecessary "Welcome, " on username display 2021-06-19 06:03:50 -07:00
Mateusz Makowski
90c907710c Display username in header 2021-06-19 04:58:42 -07:00
Émilien Devos
1a2ca8634d typo in the template file 2021-06-04 18:53:24 +00:00
TheFrenchGhosty
b9e57d0283 Merge pull request #1977 from syeopite/add996
Change empty home page to search engine like layout
2021-04-17 17:02:47 +00:00
syeopite
5c0458a887 Move navbar search bar render check to templated 2021-04-17 05:18:58 -07:00
syeopite
d9528f5cc3 Change positioning of footer to use flexbox 2021-04-06 23:53:38 -07:00
syeopite
909606826d Change footer div into footer element 2021-04-06 04:15:08 -07:00
syeopite
ea16c01fa2 Fix mobile responsive design for footer 2021-04-05 20:24:02 -07:00
syeopite
a8649f286c Handle nil type for default_homepage 2021-04-04 17:19:31 -07:00
syeopite
94f285695e Add missing closing div element 2021-04-04 16:10:27 -07:00
syeopite
049e8e07ef Fix footer position to bottom of page 2021-04-04 02:45:38 -07:00
syeopite
716a845e92 Fix missing navbar search bar 2021-04-04 02:26:07 -07:00
syeopite
e864c7541c Hide header search bar when default_home is empty 2021-04-03 21:32:30 -07:00
saltycrys
b45f371911 Make config a constant
Instead of passing around `config` there is now the global `CONFIG`.
2021-01-23 19:39:04 +01:00
TheFrenchGhosty
2349a6ab0c Actually fix the icons of #1564 but for real this time 2020-12-09 20:21:42 +01:00
TheFrenchGhosty
70eaf41acb Actually fix the icons of #1564 by using an icon that exist in ionicons v4 2020-12-09 20:14:06 +01:00
TheFrenchGhosty
912091981e Fix the icons of #1564 and remove a useless line 2020-12-09 20:04:59 +01:00
TheFrenchGhosty
aca42ff6a5 Update the cryptocurrency addresses and replace the Liberapay link with a link to the documentation (#1564)
* Update the cryptocurrency address with newly created one

* Replace the icon used for the donation address and link

* Replace the word Monero with the word XMR

* Replace the Liberapay placeholder with a link to the documentation
2020-12-09 19:43:45 +01:00
TheFrenchGhosty
fe73eccb90 Merge pull request #1479 from saltycrys/theme-flash
Apply dark theme immediately
2020-11-28 20:54:45 +00:00
saltycrys
ff46c18164 Move themes into default.css
Now that themes are controlled with a class instead of setting
media="none" on the stylesheet link and both themes already being
duplicated in default.css for the automatic themeing it makes sense
to have all theme related CSS in the same place.

This commit also fixes the missing dark theme on embeds.
2020-11-17 22:53:45 +01:00
saltycrys
de777907f2 Apply dark theme immediately
Themes are now controlled with a class on the body element.

If a preference is set the body element will have either "dark-theme"
or "light-theme" class. If no preference is set or the preference is
empty the class will be "no-theme".

"dark-theme" and "light-theme" are handled by darktheme.css and
lighttheme.css respectively.

"no-theme" is handled by default.css where depending on the value of
"prefers-color-scheme" the styles corresponding to "dark-theme" or
"light-theme" are applied.

Unfortunately this means that both themes are duplicated, once in the
theme .css and once in default.css.
2020-11-16 04:19:41 +01:00
Émilien Devos
c9c6c1f769 Remove duplicate Referrer-Policy 2020-11-15 10:02:45 +00:00
stranger195
13f58d602f Replace omarroth with iv-org where applicable (#1353)
Fixes #1353
2020-08-25 16:07:16 +00:00
Omar Roth
3b2e142542 Fix JSON serialization 2020-03-29 18:04:44 -04:00
leonklingele
70cbe91776 Migrate to a good Content Security Policy (#1023)
So attacks such as XSS (see [0]) will no longer be of an issue.

[0]: https://github.com/omarroth/invidious/issues/1022
2020-03-15 16:46:08 -05:00
Pedro Lucas Porcellis
239fb0db94 Remove duplicated Github logo on footer (#986)
* Remove duplicated Github logo on footer
2020-02-20 18:50:54 -05:00
Omar Roth
c3e57f1fdd Fix typo in footer 2019-10-20 23:02:16 -04:00
TheFrenchGhosty
3cbdaab81e Add protocol to the cryptocurrencies 2019-10-19 20:23:27 +02:00
Omar Roth
55f0a82249 Remove Patreon links 2019-10-12 10:07:18 -04:00
leonklingele
1aefc5b540 Update to Crystal 0.31.0, resolve compiler deprecation warnings, update dependencies (#764)
* shard: update to crystal 0.31.0

Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See https://github.com/crystal-lang/crystal/pull/8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
2019-09-24 13:31:33 -04:00
psvenk
f54fbd057e Add prefers-color-scheme support (#601)
* Add prefers-color-scheme support

This should fix <https://github.com/omarroth/invidious/issues/559>.
The cookie storage format has been changed from boolean
("true"/"false") to tri-state ("dark"/"light"/""), so that users
without a cookie set will get dark mode if they have enabled the dark
theme in their operating system. The code for handling the cookie
state, along with the user's operating system theme, has been factored
out into a new function `update_mode`, which is called both at window
load and at the "storage" event listener, because the "storage" event
listener is only trigerred when a change is made to the localStorage
from another tab/window (for more info - see
<https://stackoverflow.com/a/4679754>).
2019-08-15 11:29:55 -05:00
Omar Roth
4ee3ec09df Autofill search for playlists and communities page 2019-07-27 08:51:10 -05:00
Omar Roth
0338fd42e1 Add support for Web notifications 2019-06-01 16:09:17 -05:00
Omar Roth
fd8af88493 Use separate asset version for cache busting 2019-05-09 22:58:34 -05:00
Omar Roth
bfa488f77d Add option to toggle theme without reload 2019-05-09 11:50:44 -05:00
Omar Roth
4616f889fd Add simple form of cache busting 2019-05-08 08:58:10 -05:00
Omar Roth
1a9360ca75 Minor formatting changes 2019-05-01 20:03:39 -05:00
Omar Roth
6d1c150ff5 Fix typo 2019-04-30 21:18:35 -05:00
Omar Roth
21190a240f Add support for adding banner to site header 2019-04-30 21:17:34 -05:00
Omar Roth
6859b85266 Add 'lang' to HTML tag 2019-04-28 10:05:15 -05:00
Allan Nordhøy
aa10a9d899 Language fixes (#366)
* Language fixes
2019-04-19 11:14:11 -05:00