aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/static/js (follow)
Commit message (Collapse)AuthorAgeLines
* Use semantic class names in the timeline consistent with BulmaGravatar hedy2024-03-21-34/+34
| | | | | | | | | | Also turns out I was using the Bulma .content class wrong this whole time. We just need to slap that class onto a div and anything inside can be the output of, say a markdown -> HTML converter! Fix messy spacing and extraneous whitespace in the HTML as well. Special thanks to Vim macros.
* Timeline: Initial rewrite of CSSGravatar hedy2024-03-19-0/+10
|
* Dark: Fix switch toggle when system preference is usedGravatar hedy2024-01-20-2/+4
| | | | Thanks to wookie for finding the bug.
* Optimistic fix for FOUC on initial site loadGravatar hedy2024-01-18-0/+4
|
* Temporary fix to theme-switching FOUC problemGravatar hedy2024-01-18-6/+3
|
* Dark: Possibly fix FOUC during theme switchGravatar hedy2024-01-18-4/+4
|
* Dark: Set correct theme immediately when the script loadsGravatar hedy2024-01-18-10/+10
| | | | | | | | | | This fixes the latency previously observed on page loads. We still have to put switch toggling after page loads though. Genius idea by wookie. Co-authored-by: wookie184 <[email protected]>
* Dark: Improve order of switching stylesheetsGravatar hedy2024-01-18-1/+1
|
* Dark: Name JS & CSS files according to their contentGravatar hedy2024-01-05-0/+0
| | | | | | | | We have the CSS for the navbar in base.css, the relevant files only contain code for the theme toggle, so they should be named as such. If we ever implement CSS variables per-theme, they could then be done in `themes.css`.
* Dark: Fix hero colors on homepageGravatar hedy2024-01-05-0/+2
| | | | | | | | | | We can now use `[data-theme="dark"]` selector in CSS to defined styles specifically for dark mode. This follows common web dev patterns and gives little overhead. - Hero - Added `wave_black` SVG which copies `wave_white` as is but uses the site's dark mode background color.
* Dark: Support system color scheme preferenceGravatar hedy2024-01-05-12/+37
| | | | | | | | | | | | | Added features - When no preference already stored when page loads, we'll take into account the system setting and set the theme automatically. - When the system setting is modified while the site is active, switch theme automatically. - The system preference takes lower precedence than saved preference from the switch toggle, unless the setting is modified while the site is active. Miscellaneous refactor.
* Dark: Refactor toggle handling JSGravatar hedy2024-01-05-72/+42
| | | | | | | | | | | | | | - Use localstorage. Advantages: - One key=value for the entire site, without needing to specify `path=/` - No need for string splitting to parse the `key=value; ...` data - Suggested more widely in tutorials Pretty good support: https://caniuse.com/?search=localstorage - Remove the need for JQuery, use IDs for switch and knob elements. - This also makes the code more robust if the page has other switch & knob classes!
* Automatically fix lintGravatar hedy2023-12-14-1/+1
|
* Fix all conflictsGravatar hedy2023-12-14-16/+796
|\ | | | | | | hopefully I dont have to do this again
| * Add Tag Group SupportGravatar Hassan Abouelela2022-08-14-0/+5
| | | | | | | | | | | | | | Adds support for tag groups in content. This involves some modification to the routing, and templating. Signed-off-by: Hassan Abouelela <[email protected]>
| * Improve Tag CroppingGravatar Hassan Abouelela2022-08-13-0/+36
| | | | | | | | | | | | | | Move the tag cropping logic to the frontend, which makes it easier to crop without crossing boundaries such as link or code block boundaries. Signed-off-by: Hassan Abouelela <[email protected]>
| * Edge cases: Show duckies when no visible resourcesGravatar Leon Sandøy2022-02-13-8/+14
| |
| * Best practice: Switch name to data-resource-name.Gravatar Leon Sandøy2022-02-13-3/+3
| |
| * Add fuzzysort as a local dependency.Gravatar Leon Sandøy2022-02-13-0/+657
| |
| * Make the remove all tags affect search, too.Gravatar Leon Sandøy2022-02-13-1/+4
| |
| * Fix duck pond not showing for search results of 0.Gravatar Leon Sandøy2022-02-13-3/+2
| |
| * Search the resource description too.Gravatar Leon Sandøy2022-02-13-6/+15
| |
| * Add a filter tag when searching.Gravatar Leon Sandøy2022-02-13-2/+15
| |
| * Implement fuzzy search.Gravatar Leon Sandøy2022-02-13-4/+35
| | | | | | | | | | | | | | This implements the core logics for filtering by search. It uses fuzzysort to match the search query to the name of the resource. This name is set in the yaml for each resource.
| * Trigger a UI update when typing into search.Gravatar Leon Sandøy2022-02-13-0/+5
| |
| * Dynamically update URL with search query.Gravatar Leon Sandøy2022-02-13-3/+19
| |
* | Determine current theme and set switchGravatar GDWR2022-02-08-24/+28
| |
* | getCurrentTheme returns "default" if emptyGravatar GDWR2022-02-08-0/+3
| |
* | Add initial dark themeGravatar GDWR2022-02-08-0/+87
|/
* Duck pond removed when removing all filters.Gravatar Leon Sandøy2022-02-02-1/+2
|
* Complete refactor of collapsibles.Gravatar Leon Sandøy2022-02-01-18/+57
| | | | | | | | | | | | | This is now a completely self-contained feature, which can be used in the same way on every page. I've moved all the collapsible-related logics out of the resources.js file and into collapsibles.js, and added documentation and other quality-of-life features that will apply to other pages, as well. Changes: - The icon will now always change when the collapsible opens or closes. - By adding the "collapsed" class, you can tell the collapsible to be collapsed by default.
* Fix delay when collapsing collapsibles.Gravatar Leon Sandøy2022-02-01-0/+6
|
* Fix bug where transition wouldn't work on first collapse.Gravatar Leon Sandøy2022-02-01-8/+5
|
* Make resource tags correctly deactivate.Gravatar Leon Sandøy2022-02-01-0/+9
|
* Add a button for removing all active filters.Gravatar Leon Sandøy2022-01-31-25/+42
|
* Fix category header double click bug on mobile.Gravatar Leon Sandøy2022-01-31-1/+1
|
* Improve performance of addFilter() up to 300%Gravatar Leon Sandøy2022-01-31-9/+15
|
* Hide no filters selected in all cases.Gravatar Leon Sandøy2022-01-31-0/+7
|
* Get rid of invalid filters in the URL.Gravatar Leon Sandøy2022-01-31-7/+17
|
* Collapse category headers on load for mobile only.Gravatar Leon Sandøy2022-01-30-1/+12
|
* Refactor: collapsibles as a stand-alone componentGravatar Leon Sandøy2022-01-30-0/+0
|
* Show a "No filters selected" indicator.Gravatar Leon Sandøy2022-01-30-2/+8
|
* Support dashful redirects.Gravatar Leon Sandøy2022-01-30-6/+5
| | | | | | | Previously, trying to go to `resources/project%20ideas` would crash the filtering JS. This has now been sorted out, so that these types of redirects have their spaces replaced by dashes, which makes them valid again.
* Don't redirect if the resource_type is None!Gravatar Leon Sandøy2022-01-30-2/+1
|
* Redirects from old endpoints now filter correctly.Gravatar Leon Sandøy2022-01-30-0/+8
| | | | | For example, navigating to pydis.com/resources/communities will now correctly redirect to pydis.com/resources/?type=community.
* Complexity -> Difficulty.Gravatar Leon Sandøy2022-01-29-3/+3
|
* Let the user know when there are no matches.Gravatar Leon Sandøy2022-01-29-0/+11
|
* Make all tags interactive.Gravatar Leon Sandøy2022-01-28-33/+90
| | | | | | | | Adds a bunch of tag-related quality of life improvements: - You can now see which filters you've added at the top left. - You can click on tags to start filtering to that tag. - You can click on tags in the filter box to remove the filter. - Tags will now show an outline when they are active.
* Reflect and retain filter state in URL params.Gravatar Leon Sandøy2022-01-27-65/+65
| | | | | | | | | | | | | This commits makes two important changes: - Whenever we click on filter checkboxes, the URL is immediately updated to include parameters that represent the chosen options. For example, if you select Beginner complexity, the url is updated with ?complexity=beginner. - Whenever the page is loaded, we deserialize any parameters that exist in the URL and change the filter state to match it. In other words, refreshing the page at any time retains the current state, and you can now link people to exactly the filter results that you want to share.
* Resource filtering on the client, pt 1.Gravatar Leon Sandøy2022-01-27-35/+143
| | | | | | | Here's the initial version of this system. We've got filtering, but only by clicking checkboxes. The overall look and style are pretty close to where we want them, but it's missing tons of polish to be complete. The following commits will contain that polish.