summaryrefslogtreecommitdiff
path: root/media/js
AgeCommit message (Collapse)Author
2025-12-04Update the copy script button styling and add a no-sudo variant.Dave Page
This update replaces the horrible text based copy script buttons on the Linux package download pages with nice icons, add a variant that copies the code without the sudo prefixes, and tidies up the styling in general.
2025-11-28Properly render the news preview in both dark and lightmode.Dave Page
This requires us to render the email template in an iframe to prevent it's styles leaking out into the main page.
2025-09-30download/linux: Bump recommended package to postgresql-18Christoph Berg
This bumps the version from 17 to 18 and also splits the final "apt install" call into a separate box since the heading only claims to configure the repository. We also replace "postgresql" by "postgresql-18" since users of our repo will likely want to have control over which version is selected.
2025-09-03Replace bootstrap burger menu with a CSS based oneMagnus Hagander
This removes our dependency on the bootstrap javascript and along with it also the jquery dependency. Instead we use a pure CSS based dropdown menu, and a small snippet of custom javascript is used to maintain the aria- tag information. Reviewed by Dave Page and Chris Ellis
2025-08-13Remove popper dependencyMagnus Hagander
This isn't used anywhere, and maybe never was.
2025-08-13Remove jQuery from forms helper javascript as wellMagnus Hagander
This is a trivial piece of javascript, definitely doesn't need jQuery
2025-08-13Reimplement feature-matrix filteringMagnus Hagander
* jQuery removed and replaced with native javascript * Column filtering is now done in pure CSS without javascript. This also means that the initial rendering of the page is correct instead of rendering all column and then removing them (visible on slow connections) * Reduce page size by moving some contents to CSS instead of repeating it
2024-04-16download/debian,ubuntu: Support 2nd "copy script" buttonChristoph Berg
2023-01-06Increase dark mode contrast and add a manual toggle.Dave Page
Per discussion on psql-www. This time, CSP compatible! Reviewed by Jonathan Katz and Magnus Hagander.
2023-01-05Revert "Increase dark mode contrast and add a manual toggle."Dave Page
This reverts commit 92b55bad9119a659acf7e0fe505e3b69c8ac6a49.
2023-01-05Increase dark mode contrast and add a manual toggle.Dave Page
Per discussion on psql-www. Reviewed by Jonathan Katz and Magnus Hagander.
2022-12-15Allow deletion of draft news articlesMagnus Hagander
When somebody posts a news article, make it possible to delete it before it's submitted to moderation (or after it's been withdrawn or bounced), instead of forcing the user to leave it around ForEver (TM). Do this by adding some generic functionality for confirmation popups, that can also be used for other things in the future.
2022-10-20Dark mode for the website.Dave Page
This patch also changes the stylesheets to use CSS vars for all the colour definitions. Dark mode is enabled automatically if the users browser prefers it. Patch by me, with improvements from Jonathan Katz. Review by Jonathan Katz, Vik Fearing, and Hubert Depesz Lubaczewski.
2021-03-16Fix bug in markdown preview of new objectsMagnus Hagander
Whens submitting a new object, the instructions for how to do markdown didn't show up until after the object had been saved once. This turns out to be because the performance optimization to take an empty string markdown and turn it into an empty string html wrote the (empty) result to the wrong field, thereby overwriting the instructions.
2020-11-12Create instruction page for markdown fieldsMagnus Hagander
Instead of directly linking to the spec, include some basic info and a list of our limitations.
2020-11-12Re-do markdown handling for better user experience and securityMagnus Hagander
* Get rid of the django_markwhat dependency, and implement our own classes to get more control. In passing also remove django-markdown, because we never used that. * Instead of trying to clean markdown with regexps, use the bleach library (NEW DEPENDENCY) with special whitelisting of allowed tags based off standard markdown. This means that one can input links or formatting in HTML if one prefers, as long as it renders to the same subset of tags that markdown allows. * Replace javascript based client side preview with an actual call to a preview URL that renders the exact result using the same function, since the use of showdown on the client was increasingly starting to differ from the server, and since that cannot be kept secure the same way. Rewrite the client side javascript to work better with the now longer interval between updates of the preview. Long in planning, but never got around to it. Suggestion to use bleach for escaping from David Fetter.
2020-09-23Add rel="noopener" to all _blank target urlsMagnus Hagander
2020-09-12Update jquery dependency to 3.4.1Magnus Hagander
2020-09-12Upgrade bootstrap and popper dependenciesMagnus Hagander
Up to bootstrap 4.4.1 containing a lot of fixes. While at it, put the version in the filenames, so we don't have to cache-bust them every time we modify something unrelated, since they do have well defined versions.
2020-09-12Remove unused dependency on jquery.matchHeightMagnus Hagander
2020-09-12Remove unused javascriptMagnus Hagander
This is from the old version of the website, and hasn't been used for quite some time.
2020-09-12Remove dependency on unversioned jquery-uiMagnus Hagander
We apparently had some old /admin/ code that used an old version of jquery-ui, but AFAICT we don't have that anymore. So remove teh loading of them and also the files, so we have just one version of jquery around.
2020-09-10Add support for sending out news as HTML emailMagnus Hagander
When a news article is approved, it gets delivered as an email to the pgsql-announce mailinglist. It will render the markdown of the news article into a HTML part of the email, and include the markdown raw as the text part (for those unable or unwilling to read html mail). For each organisation, a mail template can be specified. Initially only two templates are supported, one "default" and one "pgproject" which is for official project news. The intention is *not* to provide generic templates, but we may want to extend this to certain related projects in the future *maybe* (such as regional NPOs). These templates are stored in templates/news/mail/*.html, and for each template *all* images found in templates/news/mail/img.<template>/ will be attached to the email. "Conditional image inclusion" currently not supported. To do CSS inlining on top of the markdown output, module pynliner is now required (available in the python3-pynliner package on Debian). A testing script is added as news_send_email.py in order to easier test out templates. This is *not* intended for production sending, so it will for example send unmoderated news. By sending, it adds it to the outgoing mailqueue in the system, so unless the cronjob is set up to send, nothing will happen until that is run manually. Support is included for tagged delivery using pglister, by directly mapping NewsTags to pglister tags. While at it, update the moderation preview forms to preview news items using the HTML template for the email (while leaving other types of items previewing without a particular stylesheet).
2020-09-10Re-work moderation of submitted itemsMagnus Hagander
This includes a number of new features: * Move some moderation functionality into shared places, so we don't keep re-inventing the wheel. * Implement three-state moderation, where the submitter can edit their item and then explicitly say "i'm done, please moderate this now". This is currently only implemented for News, but done in a reusable way. * Move moderation workflow to it's own set of URLs instead of overloading it on the general admin interface. Admin interface remains for editing things, but these are now separated out into separate things. * Do proper stylesheet clearing for moderation of markdown fields, using a dynamic sandboxed iframe, so it's not ruined by the /admin/ css. * Move moderation email notification into dedicated moderation code, thereby simplifying the admin subclassing we did which was in some places quite fragile. * Reset date of news postings to the date of their approval, when approved. This avoids some annoying ordering issues.
2020-08-31Update more links to be https instead of httpMagnus Hagander
2020-07-12Clean up javascript indentationMagnus Hagander
Remove tabs from indentation, which was in about half the files, and make everything 4-space indentation, which is what most of the rest used.
2020-07-09Move all the non-Yum event handler setup into one shared script, per discussion.Dave Page
2020-07-07Download pages overhaul:Dave Page
- Don't use inline event handlers - Simplify some of the wording - Replace the package download list with nice buttons Design by me & Jonathan, code by me, review by Jonathan and others.
2020-07-07Remove the source mapping URL for popper.min.js to prevent cluttering dev ↵Dave Page
tools with warnings that it can't be found.
2020-07-04Make described checkboxes a lot more clearMagnus Hagander
Instead of a weirdly located "hover over the checkbox to get a description" message, put the actual description underneath the checkboxes. This removes the need for javascript for it, and make the description a lot more readily available. This applies only to news tags for now, since that's the only use of described checkboxes, but hopefully it will make those more clear to people submitting. In passing, fix how help_text for multi-checkbox field is shown -- it was previously shown almost as part of the field name itself, making it very hard to make out. Now make it look like all other form field help texts.
2020-07-02Use Google Tag Manager for integration with Google Analytics and honour DNT.Dave Page
Per discussion and review on pgsql-www.
2020-06-10Overhaul the Redhat, Ubuntu and Debian installation instructions.Dave Page
* Merge all commands into a single text area for ease of copy/paste. * Add a Copy Script button to each text area to copy the script (without comments and blanks) to the clipboard. * Centralise the copy/paste code so it can be used elsewhere. * Always install the database server. Based on reviews/discussion with Magnus, Jonathan, Daniel and Sehrope.
2019-05-15Fixed code formatting error in featurematrix.jsJonathan S. Katz
2019-02-03Pin the navigation bar to the top of the page.Jonathan S. Katz
From user feedback, the scrolling navigation bar would cause problems with readability, especially in larger font views. This keeps the navigation bar pinned to the top, until we can find a way to more easily handle this.
2019-01-05Remove inline script from debian/ubuntu download pageMagnus Hagander
2018-12-22Remove inline styles from feature matrix generator.Jonathan S. Katz
This moves the HTML code generated for the filters into the Django template, instead of the JavaScript portion.
2018-12-21Move google analytics and scrolling code into main.jsMagnus Hagander
This moves the remaining inline javascript out of the base templates
2018-12-20Move scripts from admin changeform to their own JS fileMagnus Hagander
Could be made more efficient by combining some files, but tihs is just the /admin/ interface so not used very often.
2018-12-20Move javascript for forms into separate JS fileMagnus Hagander
In passing also clean up a few things that can be passed directly in the template instead, and simplify things now that we have jquery all the time.
2018-12-20Move debian/ubuntu downloads javascript into main.jsMagnus Hagander
2018-12-20Move featurematrix javascript into a separate script fileMagnus Hagander
2018-04-25Refactor the navigation bar for desktop, tablet, and mobile.Jonathan S. Katz
Specifically, the navigation bar now shrinks in height on scroll and when on devices smaller than 768px. Additionally, the search box disappears at the 1280px break point to avoid text wrapping. A JavaScript file was added (main.js) to apply the "compressed" class when scrolling, which is what provides the menu shrinking.
2018-04-17New base HTML for PostgreSQL.orgJonathan S. Katz
The base HTML structure enables the responsiveness for the website. In addition to the primary base template, the generic page and form templates are also modernized. Authors: Sarah Conway <sarah.conway@crunchydata.com> and me
2018-04-16New CSS base for the PostgreSQL website.Jonathan S. Katz
This also adds Bootstrap, Font Awesome to the codebase with license info. Bootstrap and Font Awesome are CSS and font frameworks respectively that ease modern web development. The new CSS allows the PostgreSQL.org website to be responsive based on browser window size as well as provide a modern look and feel. The redesign is built on top off the Bootstrap and Font Awesome CSS and font frameworks respectively. Authors: Sarah Conway <sarah.conway@crunchydata.com> and me
2017-04-14Remove duplicate closing of </style>Magnus Hagander
Noted by Peter Eisentraut
2017-04-14Fix font adjustment for double-code embeddingBruce Momjian
Add additional CSS injection to prevent code tag embedded in code tag from having its font size adjusted twice. Discussion: https://postgr.es/m/20170408015201.GA18573@momjian.us
2016-06-23Import jquery and jquery-uiMagnus Hagander
We need these for autocomplete in the admin interface, to come shortly.
2014-03-15Replace locally-hosted jQuery with CDN-hosted version.Thom Brown
2014-03-13Add filters to feature matrix.Thom Brown
As the feature matrix is useful for seeing how far PostgreSQL has come, we still want to keep older versions on display. However, this is causing problems displaying the newer versions on smaller screens. This change adds a filter which only shows supported versions by default, and allows folk to choose which versions they wish to compare. This will have no effect on browsers with Javascript disabled.
2014-02-09Remove links to smaller/normal text sizeMagnus Hagander
This functionality is already implemented in browsers, there is no need for us to have our own implementation.