43 Commits

Author SHA1 Message Date
vlnst
6f984fe7fd
Add "word-wrap: break-word" for links (#159)
Co-authored-by: Ftonans <77411099+Ftonans@users.noreply.github.com>
2024-11-15 03:08:31 -05:00
Leo Heitmann Ruiz
0eda3031e0
Add SVG logo (#149)
* Add codecircles.svg

* Regenerate codecircles.webp from codecircles.svg

* Add SVG favicon

* Use SVG logo instead of WebP
2024-10-28 18:47:31 -04:00
httpjamesm
4c971f3121
Add theme support using environment variable (#145)
* Add theme support using environment variable

* Propagate theme variable to template in options.go

Propagate the `theme` variable from the environment to the template in `src/routes/options.go`

* Retrieve the `theme` variable from the environment using `os.Getenv("THEME")`
* Set the `theme` variable in the `gin.H` map when rendering the `home.html` template


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/httpjamesm/AnonymousOverflow/pull/145?shareId=6397c9b4-9450-425c-bbbe-019425965d2b).

* Move all theme environment variable logic to a utils function

Move theme environment variable logic to a utils function and update routes to use it.

* Add `GetThemeFromEnv` function in `src/utils/theme.go` to derive the theme from environment variables and default to "auto" if not set.
* Update `src/routes/home.go` to import and use `GetThemeFromEnv` in the `GetHome` function.
* Update `src/routes/options.go` to import and use `GetThemeFromEnv` in the `ChangeOptions` function.
* Update `src/routes/question.go` to import and use `GetThemeFromEnv` in the `ViewQuestion` function.


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/httpjamesm/AnonymousOverflow/pull/145?shareId=a0dab6f3-027c-4f6e-85fe-60e7675d0e70).

* fix: imports removed by copilot

* fix: override theme in posthome

* style: reduced repetition in themes with common vars
2024-07-25 10:50:06 -07:00
httpjamesm
e409176642
media query theme (#139)
* feat: use css media query to derive theme

* fix: rename alt for toggle images

* feat: remove no-cache middleware
2024-06-20 00:18:22 -04:00
McSinyx
84991a6486
Wrap Answers heading on narrow screens (#112)
Otherwise it would overflow on the x-axis.
2024-04-25 01:11:25 -04:00
McSinyx
e020639a3b
Set maximum width to 40rem across screen sizes (#111)
* Set maximum width to 40rem across screen sizes

Some rules are removed to correct the bounding box size
in browser inspector and fix the overflow on the x-axis.

* Remove unused div.parent

(The diff should be viewed --ignore-all-space)
2024-04-25 01:09:43 -04:00
Patrick Wu
3a508ddbd4
A fix and a small refactor (#114)
1. fix code not visible in light theme;
2. use hex code instead of rgb code for all.
2024-04-24 12:49:26 -04:00
httpjamesm
01b960cd43
fix: add stackoverflow flex classes (#88) 2024-03-09 11:20:10 -05:00
httpjamesm
10fc103fda
perf: compress codecircles into webp (#59) 2023-09-24 00:59:54 -04:00
httpjamesm
7cf3839f41
Add client-side latex rendering (#61)
* feat: client-side katex.js

* docs: add katex attribution
2023-09-24 00:59:41 -04:00
httpjamesm
9e806186b7
style: narrower questions on mobile (#54) 2023-08-21 02:02:04 -04:00
r7l
51190f8d69 Fix notice box styles 2023-03-02 19:59:45 +01:00
httpjamesm
95e270d9f3
style: center align answer meta 2023-02-14 20:16:55 -05:00
httpjamesm
9d28ee483c
Merge branch 'answer-linking' 2023-02-14 20:12:56 -05:00
httpjamesm
4fa89879cf
feat: permalink generator 2023-02-14 20:12:49 -05:00
Adam P
c8a394e0ce
Remove inline CSS backgrounds in a code block
The lines in a `<pre>` code block may slightly overlap. Lower parts of a line can thus be obcured by the next one. This PR removes the background of `<code>` when it's inside a `<pre>` which already has the same  background color set.
2023-02-13 18:33:01 +01:00
httpjamesm
69d96d646d
feat: question tags 2023-02-04 13:40:57 -05:00
httpjamesm
c87ce26da8
style: use border-bottom and disable border on last-child 2023-02-04 13:18:40 -05:00
httpjamesm
d7bca93af8
feat: sort select with button 2023-02-04 12:58:50 -05:00
httpjamesm
062ffbcbdc refactor: move comments styles to another file 2022-12-30 18:18:13 -05:00
httpjamesm
d49c0f2ffd feat: display comment upvotes 2022-12-30 18:11:59 -05:00
httpjamesm
0e9677ec61 feat: success message indicator, better UX for image toggling 2022-12-29 13:52:17 -05:00
httpjamesm
3b79efc83c refactor: rely heavier on the templating engine
style: fix comments spacing on mobile
2022-12-29 13:06:14 -05:00
httpjamesm
1d2e98e4c1 style: add margin between comments and divider 2022-12-28 22:55:30 -05:00
httpjamesm
599d23544b feat: unify comments finder, show post comments
style: show post notices in a clean layout
2022-12-28 22:54:13 -05:00
httpjamesm
84ba0886cd feat: show answer comments under collapsible 2022-12-28 22:48:02 -05:00
httpjamesm
14b11b7f14 style: fix syntax highlighting in light mode 2022-12-28 18:52:38 -05:00
httpjamesm
631a700c9f feat: highlight code blocks within answers 2022-12-28 18:51:14 -05:00
httpjamesm
7ec73f8af8 feat: image loading and theme icon on homepage, fix view button color var 2022-12-28 12:37:04 -05:00
httpjamesm
90e873d9e2 style: make links more readable in light 2022-12-28 12:02:29 -05:00
httpjamesm
d92edafb03 feat!: APP_URL env, theme switcher icon with redirect 2022-12-28 11:56:17 -05:00
httpjamesm
3d53fd5806 feat: import theme icons, set color vars, option cookie 2022-12-28 11:49:14 -05:00
httpjamesm
504144c94b feat: version and back button 2022-12-28 11:33:26 -05:00
httpjamesm
1af311a614 feat: new logo + favicon 2022-12-28 00:34:15 -05:00
httpjamesm
10946dcafb feat: change options 2022-12-28 00:08:06 -05:00
httpjamesm
3555f055cf style: fix mobile error bar 2022-12-27 23:43:20 -05:00
httpjamesm
9071bc23db feat: error handling for homepage 2022-12-27 23:42:54 -05:00
httpjamesm
2ae093b43d feat: home page with URL conversion endpoint
style: mobile optimization
2022-12-27 23:39:34 -05:00
httpjamesm
85dad1cbe0 feat: parse answer author and timestamp 2022-12-27 23:23:19 -05:00
httpjamesm
010bd290af feat: parse accepted answer and add tag 2022-12-27 23:00:54 -05:00
httpjamesm
f1d22a713f feat: get answers and iterate over them 2022-12-27 22:50:38 -05:00
httpjamesm
b7345d39a0 feat: get timestamp and author details 2022-12-27 22:46:31 -05:00
httpjamesm
60f0ec5ce9 feat: crawl SO and display proxied question 2022-12-27 22:31:07 -05:00