diff options
author | 2020-09-18 03:33:35 +1000 | |
---|---|---|
committer | 2020-09-18 03:33:35 +1000 | |
commit | 357b20145b2784d9334b941fc25bcb8ce7b64c11 (patch) | |
tree | ccd446b4841ad69ae22fdc91f4c246823e0f811e /pydis_site/static | |
parent | Add new test for deleted message context log_url. (diff) | |
parent | Merge pull request #390 from python-discord/allow_blank_or_null_for_nominatio... (diff) |
Merge branch 'master' into admin-api-pages-improvements
# Conflicts:
# pydis_site/apps/api/admin.py
Diffstat (limited to 'pydis_site/static')
-rw-r--r-- | pydis_site/static/css/base/base.css | 25 | ||||
-rw-r--r-- | pydis_site/static/css/home/index.css | 1 | ||||
-rw-r--r-- | pydis_site/static/css/staff/logs.css | 1 | ||||
-rw-r--r-- | pydis_site/static/favicons/safari-pinned-tab.svg | 2 | ||||
-rw-r--r-- | pydis_site/static/images/events/summer_code_jam_2020.png | bin | 0 -> 271282 bytes | |||
-rw-r--r-- | pydis_site/static/images/sponsors/adafruit.png | bin | 7605 -> 11705 bytes | |||
-rw-r--r-- | pydis_site/static/images/sponsors/jetbrains.png | bin | 53742 -> 177467 bytes | |||
-rw-r--r-- | pydis_site/static/images/sponsors/sentry.png | bin | 0 -> 13895 bytes | |||
-rw-r--r-- | pydis_site/static/js/base/modal.js | 100 |
9 files changed, 125 insertions, 4 deletions
diff --git a/pydis_site/static/css/base/base.css b/pydis_site/static/css/base/base.css index 3ca6b2a7..dc7c504d 100644 --- a/pydis_site/static/css/base/base.css +++ b/pydis_site/static/css/base/base.css @@ -84,7 +84,30 @@ div.card.has-equal-height { /* Fix for logout form submit button in navbar */ -button.is-size-navbar-menu { +button.is-size-navbar-menu, a.is-size-navbar-menu { font-size: 14px; + padding-left: 1.5rem; + padding-right: 1.5rem; } +@media screen and (min-width: 1088px) { + button.is-size-navbar-menu, a.is-size-navbar-menu { + padding-left: 1rem; + padding-right: 1rem; + } +} + +/* Fix for modals being behind the navbar */ + +.modal * { + z-index: 1020; +} + +.modal-background { + z-index: 1010; +} + +/* Wiki style tweaks */ +.codehilite-wrap { + margin-bottom: 1em; +} diff --git a/pydis_site/static/css/home/index.css b/pydis_site/static/css/home/index.css index 4c36031b..ba856a8e 100644 --- a/pydis_site/static/css/home/index.css +++ b/pydis_site/static/css/home/index.css @@ -85,4 +85,3 @@ span.repo-language-dot.javascript { max-width: none; } } - diff --git a/pydis_site/static/css/staff/logs.css b/pydis_site/static/css/staff/logs.css index d7bb04cf..acf4f1f7 100644 --- a/pydis_site/static/css/staff/logs.css +++ b/pydis_site/static/css/staff/logs.css @@ -39,7 +39,6 @@ main.site-content { } .discord-message-metadata { - color: hsla(0, 0%, 100%, .2); font-size: 0.75rem; font-weight: 400; margin: 0 .3rem; diff --git a/pydis_site/static/favicons/safari-pinned-tab.svg b/pydis_site/static/favicons/safari-pinned-tab.svg index 3a7ec4a7..32064879 100644 --- a/pydis_site/static/favicons/safari-pinned-tab.svg +++ b/pydis_site/static/favicons/safari-pinned-tab.svg @@ -1 +1 @@ -<svg version="1" xmlns="http://www.w3.org/2000/svg" width="933.333" height="933.333" viewBox="0 0 700.000000 700.000000"><path d="M321.8.5c-.1.1-5.1.6-10.9.9-5.8.4-11.5.8-12.5 1-1 .2-5.5.7-9.9 1.1-4.4.4-8.9.9-10 1-31.2 5.2-44.4 8.9-60.5 16.7-13.5 6.7-22.9 15.5-28.2 26.8-3 6.3-5.4 13.2-4.8 14.2.1.2-.3 1.5-.8 2.9-1.8 4.6-2.5 19.7-2.6 56.1l-.1 35.8 3 .1c1.6 0 39.3.1 83.8.1H349l.1 2.9c0 1.6.1 5.8.1 9.4 0 3.6-.1 7.1-.1 7.8-.1 1-24.3 1.2-118.3 1.3-65.1 0-121.4.3-125.3.7-22.8 2.2-45.8 13.2-62.1 29.5-18.7 18.8-28.9 42.9-36 84.7-1.9 11.8-2.4 14.6-3 19.5-.3 3-.8 7.1-1.1 9-.9 6.9-1 40.7-.2 49 1.6 16.2 4.8 36.3 7.4 47 .8 3 1.6 6.6 1.8 8 2 10.6 7.7 28.1 12.8 38.8C38 492 56 508 81.8 515.2c7.2 2 10.1 2.2 43.2 2.2l35.5.1.2-42.5c.1-23.4.4-44.1.7-46 5.8-39.1 34.7-73.8 71.6-85.8 16.7-5.4 16.2-5.4 119-5.7 50.9-.1 94.1-.6 96-1 7.7-1.5 20.6-6.6 28.1-11.1 18.5-11.2 31.9-29.6 38.1-52.1 2.1-7.7 2.1-9.2 2.3-97.5.2-93.5.1-95.2-4.1-107.6-7.7-22.9-29.1-44.1-54.7-54.4-6.8-2.7-17.3-5.8-21.7-6.3-1.9-.3-5.7-.9-8.5-1.5-2.7-.5-7.2-1.2-10-1.6-2.7-.3-6.1-.7-7.5-.9-1.4-.2-6.1-.7-10.5-1.1-4.4-.4-9.3-.9-11-1.1-3.6-.5-66.2-1.3-66.7-.8zm-59.1 51.9c6.3 1.7 10.7 4.3 14.9 8.8 9.2 9.8 11.4 23.5 5.8 35.5-3.1 6.5-8 11.4-14.9 15.1-4.2 2.2-6.3 2.7-13 2.7s-8.9-.4-13.5-2.7c-9.4-4.6-14.9-11.1-17.3-20.8-4.4-17.1 6.4-34.9 23.7-39.1 4.9-1.1 8.7-1 14.3.5z"/><path d="M538.6 178.9c-.3.4-.6 19.5-.7 42.3-.1 36.1-.4 42.7-2 50.4-3.3 16.1-8.7 28.6-17.7 41.3-6.9 9.7-11.8 14.9-21.2 22.2-4.1 3.3-8 6.3-8.6 6.8-.6.5-5.8 3.2-11.5 5.9-10.7 5.2-21.3 8.5-30.9 9.8-3 .4-46.9.8-97.5.9-50.6.1-93.6.5-95.5.9-22.7 4.5-40 15.1-53.5 32.6-7.9 10.3-14.8 25.5-16 35.7-.4 2.6-.9 5.6-1.1 6.6-1.1 3.7-.5 174.1.6 180.2 1.4 7.7 1.2 7 3.9 14 10.2 27 40.7 48.6 85.7 60.6 12.3 3.3 12.2 3.2 23.4 5.5 25.9 5.3 63.4 6.6 89 3 29.7-4.1 58.5-12.3 79.5-22.6 29.8-14.5 46.8-34.3 51.3-59.5.4-2.2.7-20.4.7-40.5v-36.4l-83.5-.1h-83.5v-9.8c0-5.7.4-10.1 1-10.5.5-.4 59-.7 130-.8 71 0 131-.4 133.4-.8 20.3-3.4 35.2-13.4 47.8-32.4 5.8-8.6 14.4-26.8 18.8-39.5 1.3-4 3.2-9.2 4.1-11.7 4.9-13.7 10.4-40.1 12-57.5.8-9 .8-34.1 0-42.5-1.3-14.1-1.8-17.9-2.6-23-.5-3-1.1-7.1-1.4-9-.8-5.2-4.3-22.3-6.6-32-1.1-4.7-2.3-9.4-2.5-10.5-3.1-13.5-13.8-38-20.9-47.8-6.8-9.6-19.3-21.7-22.4-21.7-.6 0-1.2-.4-1.4-.8-.7-1.9-13.6-6.7-23.3-8.8-4.3-.9-76.4-1.4-76.9-.5zm-81.2 405.7c6.8 3.3 12.5 9.3 15.4 16.4 3.2 7.7 2.6 19.6-1.3 26.9-5.8 10.6-15.5 16.4-27.5 16.5-9 .1-16.7-3-22.5-9.1-9.1-9.3-11.6-24-6.3-35.5 7.5-16.2 26.3-23 42.2-15.2z"/></svg>
\ No newline at end of file +<svg version="1" xmlns="http://www.w3.org/2000/svg" width="933.333" height="933.333" viewBox="0 0 700.000000 700.000000"><path d="M321.8.5c-.1.1-5.1.6-10.9.9-5.8.4-11.5.8-12.5 1-1 .2-5.5.7-9.9 1.1-4.4.4-8.9.9-10 1-31.2 5.2-44.4 8.9-60.5 16.7-13.5 6.7-22.9 15.5-28.2 26.8-3 6.3-5.4 13.2-4.8 14.2.1.2-.3 1.5-.8 2.9-1.8 4.6-2.5 19.7-2.6 56.1l-.1 35.8 3 .1c1.6 0 39.3.1 83.8.1H349l.1 2.9c0 1.6.1 5.8.1 9.4 0 3.6-.1 7.1-.1 7.8-.1 1-24.3 1.2-118.3 1.3-65.1 0-121.4.3-125.3.7-22.8 2.2-45.8 13.2-62.1 29.5-18.7 18.8-28.9 42.9-36 84.7-1.9 11.8-2.4 14.6-3 19.5-.3 3-.8 7.1-1.1 9-.9 6.9-1 40.7-.2 49 1.6 16.2 4.8 36.3 7.4 47 .8 3 1.6 6.6 1.8 8 2 10.6 7.7 28.1 12.8 38.8C38 492 56 508 81.8 515.2c7.2 2 10.1 2.2 43.2 2.2l35.5.1.2-42.5c.1-23.4.4-44.1.7-46 5.8-39.1 34.7-73.8 71.6-85.8 16.7-5.4 16.2-5.4 119-5.7 50.9-.1 94.1-.6 96-1 7.7-1.5 20.6-6.6 28.1-11.1 18.5-11.2 31.9-29.6 38.1-52.1 2.1-7.7 2.1-9.2 2.3-97.5.2-93.5.1-95.2-4.1-107.6-7.7-22.9-29.1-44.1-54.7-54.4-6.8-2.7-17.3-5.8-21.7-6.3-1.9-.3-5.7-.9-8.5-1.5-2.7-.5-7.2-1.2-10-1.6-2.7-.3-6.1-.7-7.5-.9-1.4-.2-6.1-.7-10.5-1.1-4.4-.4-9.3-.9-11-1.1-3.6-.5-66.2-1.3-66.7-.8zm-59.1 51.9c6.3 1.7 10.7 4.3 14.9 8.8 9.2 9.8 11.4 23.5 5.8 35.5-3.1 6.5-8 11.4-14.9 15.1-4.2 2.2-6.3 2.7-13 2.7s-8.9-.4-13.5-2.7c-9.4-4.6-14.9-11.1-17.3-20.8-4.4-17.1 6.4-34.9 23.7-39.1 4.9-1.1 8.7-1 14.3.5z"/><path d="M538.6 178.9c-.3.4-.6 19.5-.7 42.3-.1 36.1-.4 42.7-2 50.4-3.3 16.1-8.7 28.6-17.7 41.3-6.9 9.7-11.8 14.9-21.2 22.2-4.1 3.3-8 6.3-8.6 6.8-.6.5-5.8 3.2-11.5 5.9-10.7 5.2-21.3 8.5-30.9 9.8-3 .4-46.9.8-97.5.9-50.6.1-93.6.5-95.5.9-22.7 4.5-40 15.1-53.5 32.6-7.9 10.3-14.8 25.5-16 35.7-.4 2.6-.9 5.6-1.1 6.6-1.1 3.7-.5 174.1.6 180.2 1.4 7.7 1.2 7 3.9 14 10.2 27 40.7 48.6 85.7 60.6 12.3 3.3 12.2 3.2 23.4 5.5 25.9 5.3 63.4 6.6 89 3 29.7-4.1 58.5-12.3 79.5-22.6 29.8-14.5 46.8-34.3 51.3-59.5.4-2.2.7-20.4.7-40.5v-36.4l-83.5-.1h-83.5v-9.8c0-5.7.4-10.1 1-10.5.5-.4 59-.7 130-.8 71 0 131-.4 133.4-.8 20.3-3.4 35.2-13.4 47.8-32.4 5.8-8.6 14.4-26.8 18.8-39.5 1.3-4 3.2-9.2 4.1-11.7 4.9-13.7 10.4-40.1 12-57.5.8-9 .8-34.1 0-42.5-1.3-14.1-1.8-17.9-2.6-23-.5-3-1.1-7.1-1.4-9-.8-5.2-4.3-22.3-6.6-32-1.1-4.7-2.3-9.4-2.5-10.5-3.1-13.5-13.8-38-20.9-47.8-6.8-9.6-19.3-21.7-22.4-21.7-.6 0-1.2-.4-1.4-.8-.7-1.9-13.6-6.7-23.3-8.8-4.3-.9-76.4-1.4-76.9-.5zm-81.2 405.7c6.8 3.3 12.5 9.3 15.4 16.4 3.2 7.7 2.6 19.6-1.3 26.9-5.8 10.6-15.5 16.4-27.5 16.5-9 .1-16.7-3-22.5-9.1-9.1-9.3-11.6-24-6.3-35.5 7.5-16.2 26.3-23 42.2-15.2z"/></svg> diff --git a/pydis_site/static/images/events/summer_code_jam_2020.png b/pydis_site/static/images/events/summer_code_jam_2020.png Binary files differnew file mode 100644 index 00000000..63c311b0 --- /dev/null +++ b/pydis_site/static/images/events/summer_code_jam_2020.png diff --git a/pydis_site/static/images/sponsors/adafruit.png b/pydis_site/static/images/sponsors/adafruit.png Binary files differindex 27cd9953..eb14cf5d 100644 --- a/pydis_site/static/images/sponsors/adafruit.png +++ b/pydis_site/static/images/sponsors/adafruit.png diff --git a/pydis_site/static/images/sponsors/jetbrains.png b/pydis_site/static/images/sponsors/jetbrains.png Binary files differindex 0b21c2c8..b79e110a 100644 --- a/pydis_site/static/images/sponsors/jetbrains.png +++ b/pydis_site/static/images/sponsors/jetbrains.png diff --git a/pydis_site/static/images/sponsors/sentry.png b/pydis_site/static/images/sponsors/sentry.png Binary files differnew file mode 100644 index 00000000..ce185da2 --- /dev/null +++ b/pydis_site/static/images/sponsors/sentry.png diff --git a/pydis_site/static/js/base/modal.js b/pydis_site/static/js/base/modal.js new file mode 100644 index 00000000..eccc8845 --- /dev/null +++ b/pydis_site/static/js/base/modal.js @@ -0,0 +1,100 @@ +/* + modal.js: A simple way to wire up Bulma modals. + + This library is intended to be used with Bulma's modals, as described in the + official Bulma documentation. It's based on the JavaScript that Bulma + themselves use for this purpose on the modals documentation page. + + Note that, just like that piece of JavaScript, this library assumes that + you will only ever want to have one modal open at once. + */ + +"use strict"; + +// Event handler for the "esc" key, for closing modals. + +document.addEventListener("keydown", (event) => { + const e = event || window.event; + + if (e.code === "Escape" || e.keyCode === 27) { + closeModals(); + } +}); + +// An array of all the modal buttons we've already set up + +const modal_buttons = []; + +// Public API functions + +function setupModal(target) { + // Set up a modal's events, given a DOM element. This can be + // used later in order to set up a modal that was added after + // this library has been run. + + // We need to collect a bunch of elements to work with + const modal_background = Array.from(target.getElementsByClassName("modal-background")); + const modal_close = Array.from(target.getElementsByClassName("modal-close")); + + const modal_head = Array.from(target.getElementsByClassName("modal-card-head")); + const modal_foot = Array.from(target.getElementsByClassName("modal-card-foot")); + + const modal_delete = []; + const modal_button = []; + + modal_head.forEach((element) => modal_delete.concat(Array.from(element.getElementsByClassName("delete")))); + modal_foot.forEach((element) => modal_button.concat(Array.from(element.getElementsByClassName("button")))); + + // Collect all the elements that can be used to close modals + const modal_closers = modal_background.concat(modal_close).concat(modal_delete).concat(modal_button); + + // Assign click events for closing modals + modal_closers.forEach((element) => { + element.addEventListener("click", () => { + closeModals(); + }); + }); + + setupOpeningButtons(); +} + +function setupOpeningButtons() { + // Wire up all the opening buttons, avoiding buttons we've already wired up. + const modal_opening_buttons = Array.from(document.getElementsByClassName("modal-button")); + + modal_opening_buttons.forEach((element) => { + if (!modal_buttons.includes(element)) { + element.addEventListener("click", () => { + openModal(element.dataset.target); + }); + + modal_buttons.push(element); + } + }); +} + +function openModal(target) { + // Open a modal, given a string ID + const element = document.getElementById(target); + + document.documentElement.classList.add("is-clipped"); + element.classList.add("is-active"); +} + +function closeModals() { + // Close all open modals + const modals = Array.from(document.getElementsByClassName("modal")); + document.documentElement.classList.remove("is-clipped"); + + modals.forEach((element) => { + element.classList.remove("is-active"); + }); +} + +(function () { + // Set up all the modals currently on the page + const modals = Array.from(document.getElementsByClassName("modal")); + + modals.forEach((modal) => setupModal(modal)); + setupOpeningButtons(); +}()); |