diff --git a/assets/img/logo-alt.gif b/assets/img/logo-alt.gif new file mode 100644 index 0000000..0d5f51c Binary files /dev/null and b/assets/img/logo-alt.gif differ diff --git a/assets/views/index.jet.html b/assets/views/index.jet.html index c6ec293..62681f0 100644 --- a/assets/views/index.jet.html +++ b/assets/views/index.jet.html @@ -8,8 +8,16 @@
+ + {{ if CookieList["pixivfe-LogoStyle"] == "" || CookieList["pixivfe-LogoStyle"] == "standard" }}

PixivFE

An open-source alternative frontend for Pixiv that doesn't suck. + {{- else if CookieList["pixivfe-LogoStyle"] == "alternative" }} +
+ PixivFE icon +
+ An open-source alternative frontend for Pixiv that doesn't suck. + {{- end }} diff --git a/assets/views/layout/default.jet.html b/assets/views/layout/default.jet.html index 8cfb16b..d33871a 100644 --- a/assets/views/layout/default.jet.html +++ b/assets/views/layout/default.jet.html @@ -84,12 +84,18 @@ + {{ if CookieList["pixivfe-LogoStyle"] == "" || CookieList["pixivfe-LogoStyle"] == "standard" }} - PixivFE icon + PixivFE icon PixivFE + {{- else if CookieList["pixivfe-LogoStyle"] == "alternative" }} + + PixivFE icon + + {{- end }}
diff --git a/assets/views/settings.jet.html b/assets/views/settings.jet.html index 1d83403..db0108d 100644 --- a/assets/views/settings.jet.html +++ b/assets/views/settings.jet.html @@ -205,6 +205,27 @@
+ +
+ +
+ Logo style + {{- logoStyleValue := CookieList["pixivfe-LogoStyle"] }} +

Choose between the standard PixivFE logo or an alternative design created by @dragongoose as a fun variation.

+
+ +
+ +
+
+ +
+
+
+
diff --git a/i18n/locale/en/template.json b/i18n/locale/en/template.json index 64d50f1..2b97e81 100644 --- a/i18n/locale/en/template.json +++ b/i18n/locale/en/template.json @@ -429,6 +429,7 @@ "assets/views/settings.jet.html:1cLfPHY51s8": "Artwork preview pop-ups", "assets/views/settings.jet.html:1hJr_rBgFeQ": "Language", "assets/views/settings.jet.html:2VDi5AduL6o": "PixivFE token", + "assets/views/settings.jet.html:3E6MT3aTIjs": "Choose the PixivFE logo style.", "assets/views/settings.jet.html:3shy3hXqe0E": "Typeface samples", "assets/views/settings.jet.html:3z-JKkAe8g0": "Custom image proxy server", "assets/views/settings.jet.html:46nKBKI-o3E": ").", @@ -494,8 +495,8 @@ "assets/views/settings.jet.html:ZejSb38l81A": "Image proxies that fail this check will not be shown unless \"Show all proxy servers\" is enabled.", "assets/views/settings.jet.html:_p0pNeOT7oo": "Raw settings", "assets/views/settings.jet.html:_qLO2Kt327w": "Supported features (for now):", + "assets/views/settings.jet.html:g0k22QxjULk": "Select your preferred display language from the dropdown menu below.", "assets/views/settings.jet.html:hRoKWkl2_fA": "Enter the URL of a custom proxy server if you wish to use one not listed above.", - "assets/views/settings.jet.html:ixWmKG_6a3M": "You can set locale here.", "assets/views/settings.jet.html:joLFImgCvYE": "Restore your settings if the current instance's cookies have expired", "assets/views/settings.jet.html:kIl02obBowc": "This area displays all your current cookie values in a raw format. You can:", "assets/views/settings.jet.html:kQYIzN_2HRw": "Log in", @@ -506,6 +507,8 @@ "assets/views/settings.jet.html:nPBm25BmDWM": "Reset all preferences", "assets/views/settings.jet.html:nZN3YxkHJc4": "Landing page", "assets/views/settings.jet.html:nbyFrPxtlTc": "Open in new tab", + "assets/views/settings.jet.html:p6TYpPXZelQ": "Display language", + "assets/views/settings.jet.html:pSBnV9-B2M8": "Logo style", "assets/views/settings.jet.html:qYEuq6fGw_o": "not", "assets/views/settings.jet.html:qq2RUV_bd1c": "This section allows you to directly manage PixivFE's cookie-based preferences. Intended for advanced users who understand the implications of changing these values.", "assets/views/settings.jet.html:rpFLE9FS29I": "Copy these settings to quickly configure another PixivFE instance", @@ -519,7 +522,6 @@ "assets/views/settings.jet.html:y6pXNsQLNSg": "Forces the text to be displayed horizontally, left-to-right. This is common for most languages and easier to read on smaller screens or for those more accustomed to Western text layouts.", "assets/views/settings.jet.html:yEUgkGx647Y": "Choose how images are loaded in PixivFE by selecting either the built-in proxy or one of the provided external proxy servers.", "assets/views/settings.jet.html:yxY72MHqQiw": "Hide ero-guro content (R-18G)", - "assets/views/settings.jet.html:zYcAaqlhmbM": "Set locale", "assets/views/settings.jet.html:zwpruJko68c": "Cookie values", "assets/views/tag.jet.html:-fX2tt6gXnE": "None", "assets/views/tag.jet.html:1w6l6-nnIE4": "Close", diff --git a/server/session/cookie.go b/server/session/cookie.go index 6b4f14d..6a5c99f 100644 --- a/server/session/cookie.go +++ b/server/session/cookie.go @@ -21,6 +21,7 @@ const ( // the __Host thing force it to be secure and same-origin (no subdomain) Cookie_HideArtR18G CookieName = "pixivfe-HideArtR18G" Cookie_HideArtAI CookieName = "pixivfe-HideArtAI" Cookie_Locale CookieName = "pixivfe-Locale" + Cookie_LogoStyle CookieName = "pixivfe-LogoStyle" ) // Go can't make this a const... @@ -36,6 +37,7 @@ var AllCookieNames []CookieName = []CookieName{ Cookie_HideArtR18G, Cookie_HideArtAI, Cookie_Locale, + Cookie_LogoStyle, } func GetCookie(r *http.Request, name CookieName) string {