diff --git a/front-end/assets/css/global.css b/front-end/assets/css/global.css index f682477..9d817a2 100644 --- a/front-end/assets/css/global.css +++ b/front-end/assets/css/global.css @@ -159,7 +159,7 @@ mwmbl-results, footer { font-weight: var(--bold-font-weight); } -footer { +.footer { position: sticky; top: 100vh; margin-bottom: 25px; diff --git a/front-end/assets/fonts/phosphor/icons.css b/front-end/assets/fonts/phosphor/icons.css index b9c4e82..42398b9 100644 --- a/front-end/assets/fonts/phosphor/icons.css +++ b/front-end/assets/fonts/phosphor/icons.css @@ -103,4 +103,20 @@ Phosphor Web Font .ph-info-bold::before { content: "\f88f"; -} \ No newline at end of file +} + +.ph-book-bold::before { + content: "\f6fb"; +} + +.ph-browser-bold::before { + content: "\f70d"; +} + +.ph-youtube-logo-bold::before { + content: "\fa5d"; +} + +.ph-chat-circle-text-bold::before { + content: "\f74c"; +} diff --git a/front-end/assets/fonts/phosphor/unused.css b/front-end/assets/fonts/phosphor/unused.css index 16da7b4..024afd1 100644 --- a/front-end/assets/fonts/phosphor/unused.css +++ b/front-end/assets/fonts/phosphor/unused.css @@ -13290,10 +13290,6 @@ content: "\f6fa"; } -.ph-book-bold::before { - content: "\f6fb"; -} - .ph-book-bookmark-bold::before { content: "\f6fc"; } @@ -13362,10 +13358,6 @@ content: "\f70c"; } -.ph-browser-bold::before { - content: "\f70d"; -} - .ph-browsers-bold::before { content: "\f70e"; } @@ -13614,10 +13606,6 @@ content: "\f74b"; } -.ph-chat-circle-text-bold::before { - content: "\f74c"; -} - .ph-chat-dots-bold::before { content: "\f74d"; } @@ -16750,10 +16738,6 @@ content: "\fa5c"; } -.ph-youtube-logo-bold::before { - content: "\fa5d"; -} - .ph-activity-fill::before { content: "\fa5e"; } diff --git a/front-end/config.js b/front-end/config.js index e7abff4..0769191 100644 --- a/front-end/config.js +++ b/front-end/config.js @@ -11,18 +11,6 @@ export default { publicApiURL: '/api/v1/', // publicApiURL: 'http://localhost:5000/', searchQueryParam: 'q', - footerLinks: [ - { - name: 'Github', - icon: 'ph-github-logo-bold', - href: 'https://github.com/mwmbl/mwmbl' - }, - { - name: 'Wiki', - icon: 'ph-info-bold', - href: 'https://github.com/mwmbl/mwmbl/wiki' - } - ], commands: { 'go: ': 'https://', 'search: google.com ': 'https://www.google.com/search?q=', diff --git a/front-end/src/components/organisms/footer.js b/front-end/src/components/organisms/footer.js deleted file mode 100644 index 4b8d62f..0000000 --- a/front-end/src/components/organisms/footer.js +++ /dev/null @@ -1,36 +0,0 @@ -import define from '../../utils/define.js'; -import config from '../../../config.js'; - -const template = ({ data }) => /*html*/` -
- -`; - -export default define('footer', class extends HTMLElement { - constructor() { - super(); - this.__setup(); - } - - __setup() { - this.innerHTML = template({ - data: { - links: config.footerLinks - } - }); - this.__events(); - } - - __events() { - - } -}, { extends: 'footer' }); \ No newline at end of file diff --git a/front-end/src/index.js b/front-end/src/index.js index e982c79..027f34c 100644 --- a/front-end/src/index.js +++ b/front-end/src/index.js @@ -16,7 +16,6 @@ import 'vite/modulepreload-polyfill'; if (!redirected) { // Load components only after redirects are checked. import("./components/organisms/results.js"); - import("./components/organisms/footer.js"); import("./components/organisms/save.js"); import("./components/molecules/add-button.js"); import("./components/molecules/add-result.js"); diff --git a/mwmbl/settings_common.py b/mwmbl/settings_common.py index 223330e..c0a7436 100644 --- a/mwmbl/settings_common.py +++ b/mwmbl/settings_common.py @@ -134,3 +134,33 @@ ACCOUNT_EMAIL_VERIFICATION = "mandatory" DEFAULT_FROM_EMAIL = "admin@mwmbl.org" LOGIN_REDIRECT_URL = "/" + +FOOTER_LINKS = [ + { + "name": "Matrix", + "icon": "ph-chat-circle-text-bold", + "href": "https://matrix.to/#/#mwmbl:matrix.org", + }, + { + "name": "Book", + "icon": "ph-book-bold", + "href": "https://book.mwmbl.org", + }, + { + "name": "Blog", + "icon": "ph-browser-bold", + "href": "https://blog.mwmbl.org", + }, + { + "name": "GitHub", + "icon": "ph-github-logo-bold", + "href": "https://github.com/mwmbl/mwmbl", + }, + { + "name": "YouTube", + "icon": "ph-youtube-logo-bold", + "href": "https://www.youtube.com/channel/UCFLbqrH63-icAHxQ1eFfAvA", + }, + + +] diff --git a/mwmbl/templates/index.html b/mwmbl/templates/index.html index 9aa3b57..b098809 100644 --- a/mwmbl/templates/index.html +++ b/mwmbl/templates/index.html @@ -86,7 +86,18 @@ - + {% vite_asset 'index.js' %} {% vite_legacy_polyfills %} {% vite_legacy_asset 'index-legacy.js' %} diff --git a/mwmbl/views.py b/mwmbl/views.py index f555b95..0b3daba 100644 --- a/mwmbl/views.py +++ b/mwmbl/views.py @@ -19,6 +19,7 @@ from justext.core import html_to_dom, ParagraphMaker, classify_paragraphs, revis from mwmbl.settings import NUM_EXTRACT_CHARS from mwmbl.tinysearchengine.indexer import Document +from django.conf import settings def justext_with_dom(html_text, stoplist, length_low=LENGTH_LOW_DEFAULT, @@ -54,6 +55,7 @@ def index(request): "query": query, "user": request.user, "activity": activity, + "footer_links": settings.FOOTER_LINKS, })