Redo footer
This commit is contained in:
parent
dc2bd082cf
commit
c0605e6bf7
9 changed files with 62 additions and 68 deletions
|
@ -159,7 +159,7 @@ mwmbl-results, footer {
|
||||||
font-weight: var(--bold-font-weight);
|
font-weight: var(--bold-font-weight);
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
.footer {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 100vh;
|
top: 100vh;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
|
|
|
@ -104,3 +104,19 @@ Phosphor Web Font
|
||||||
.ph-info-bold::before {
|
.ph-info-bold::before {
|
||||||
content: "\f88f";
|
content: "\f88f";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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";
|
||||||
|
}
|
||||||
|
|
|
@ -13290,10 +13290,6 @@
|
||||||
content: "\f6fa";
|
content: "\f6fa";
|
||||||
}
|
}
|
||||||
|
|
||||||
.ph-book-bold::before {
|
|
||||||
content: "\f6fb";
|
|
||||||
}
|
|
||||||
|
|
||||||
.ph-book-bookmark-bold::before {
|
.ph-book-bookmark-bold::before {
|
||||||
content: "\f6fc";
|
content: "\f6fc";
|
||||||
}
|
}
|
||||||
|
@ -13362,10 +13358,6 @@
|
||||||
content: "\f70c";
|
content: "\f70c";
|
||||||
}
|
}
|
||||||
|
|
||||||
.ph-browser-bold::before {
|
|
||||||
content: "\f70d";
|
|
||||||
}
|
|
||||||
|
|
||||||
.ph-browsers-bold::before {
|
.ph-browsers-bold::before {
|
||||||
content: "\f70e";
|
content: "\f70e";
|
||||||
}
|
}
|
||||||
|
@ -13614,10 +13606,6 @@
|
||||||
content: "\f74b";
|
content: "\f74b";
|
||||||
}
|
}
|
||||||
|
|
||||||
.ph-chat-circle-text-bold::before {
|
|
||||||
content: "\f74c";
|
|
||||||
}
|
|
||||||
|
|
||||||
.ph-chat-dots-bold::before {
|
.ph-chat-dots-bold::before {
|
||||||
content: "\f74d";
|
content: "\f74d";
|
||||||
}
|
}
|
||||||
|
@ -16750,10 +16738,6 @@
|
||||||
content: "\fa5c";
|
content: "\fa5c";
|
||||||
}
|
}
|
||||||
|
|
||||||
.ph-youtube-logo-bold::before {
|
|
||||||
content: "\fa5d";
|
|
||||||
}
|
|
||||||
|
|
||||||
.ph-activity-fill::before {
|
.ph-activity-fill::before {
|
||||||
content: "\fa5e";
|
content: "\fa5e";
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,18 +11,6 @@ export default {
|
||||||
publicApiURL: '/api/v1/',
|
publicApiURL: '/api/v1/',
|
||||||
// publicApiURL: 'http://localhost:5000/',
|
// publicApiURL: 'http://localhost:5000/',
|
||||||
searchQueryParam: 'q',
|
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: {
|
commands: {
|
||||||
'go: ': 'https://',
|
'go: ': 'https://',
|
||||||
'search: google.com ': 'https://www.google.com/search?q=',
|
'search: google.com ': 'https://www.google.com/search?q=',
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
import define from '../../utils/define.js';
|
|
||||||
import config from '../../../config.js';
|
|
||||||
|
|
||||||
const template = ({ data }) => /*html*/`
|
|
||||||
<p class="footer-text">Find more on</p>
|
|
||||||
<ul class="footer-list">
|
|
||||||
${ data.links.map(link => /*html*/`
|
|
||||||
<li class="footer-item">
|
|
||||||
<a href="${link.href}" class="footer-link" target="__blank">
|
|
||||||
<i class="${link.icon}"></i>
|
|
||||||
<span>${link.name}</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
`).join('') }
|
|
||||||
</ul>
|
|
||||||
`;
|
|
||||||
|
|
||||||
export default define('footer', class extends HTMLElement {
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
this.__setup();
|
|
||||||
}
|
|
||||||
|
|
||||||
__setup() {
|
|
||||||
this.innerHTML = template({
|
|
||||||
data: {
|
|
||||||
links: config.footerLinks
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.__events();
|
|
||||||
}
|
|
||||||
|
|
||||||
__events() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}, { extends: 'footer' });
|
|
|
@ -16,7 +16,6 @@ import 'vite/modulepreload-polyfill';
|
||||||
if (!redirected) {
|
if (!redirected) {
|
||||||
// Load components only after redirects are checked.
|
// Load components only after redirects are checked.
|
||||||
import("./components/organisms/results.js");
|
import("./components/organisms/results.js");
|
||||||
import("./components/organisms/footer.js");
|
|
||||||
import("./components/organisms/save.js");
|
import("./components/organisms/save.js");
|
||||||
import("./components/molecules/add-button.js");
|
import("./components/molecules/add-button.js");
|
||||||
import("./components/molecules/add-result.js");
|
import("./components/molecules/add-result.js");
|
||||||
|
|
|
@ -134,3 +134,33 @@ ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
||||||
DEFAULT_FROM_EMAIL = "admin@mwmbl.org"
|
DEFAULT_FROM_EMAIL = "admin@mwmbl.org"
|
||||||
|
|
||||||
LOGIN_REDIRECT_URL = "/"
|
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",
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
|
|
@ -86,7 +86,18 @@
|
||||||
</mwmbl-results>
|
</mwmbl-results>
|
||||||
</main>
|
</main>
|
||||||
<div is="mwmbl-add-result"></div>
|
<div is="mwmbl-add-result"></div>
|
||||||
<footer is="mwmbl-footer"></footer>
|
<div class="footer">
|
||||||
|
<ul class="footer-list">
|
||||||
|
{% for link in footer_links %}
|
||||||
|
<li class="footer-item">
|
||||||
|
<a href="{{ link.href }}" class="footer-link" target="__blank">
|
||||||
|
<i class="{{ link.icon }}"></i>
|
||||||
|
<span>{{ link.name }}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
{% vite_asset 'index.js' %}
|
{% vite_asset 'index.js' %}
|
||||||
{% vite_legacy_polyfills %}
|
{% vite_legacy_polyfills %}
|
||||||
{% vite_legacy_asset 'index-legacy.js' %}
|
{% vite_legacy_asset 'index-legacy.js' %}
|
||||||
|
|
|
@ -19,6 +19,7 @@ from justext.core import html_to_dom, ParagraphMaker, classify_paragraphs, revis
|
||||||
|
|
||||||
from mwmbl.settings import NUM_EXTRACT_CHARS
|
from mwmbl.settings import NUM_EXTRACT_CHARS
|
||||||
from mwmbl.tinysearchengine.indexer import Document
|
from mwmbl.tinysearchengine.indexer import Document
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
def justext_with_dom(html_text, stoplist, length_low=LENGTH_LOW_DEFAULT,
|
def justext_with_dom(html_text, stoplist, length_low=LENGTH_LOW_DEFAULT,
|
||||||
|
@ -54,6 +55,7 @@ def index(request):
|
||||||
"query": query,
|
"query": query,
|
||||||
"user": request.user,
|
"user": request.user,
|
||||||
"activity": activity,
|
"activity": activity,
|
||||||
|
"footer_links": settings.FOOTER_LINKS,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue