Skip to content

Commit

Permalink
chore: corrects footer content (#160)
Browse files Browse the repository at this point in the history
* chore: corrects footer content

* styles fix

* styles fix

* remove styles

* chore: responsive footer

---------

Co-authored-by: sr-remsha <sr.remsha@gmail.com>
  • Loading branch information
akryvasheyeu and sr-remsha committed Aug 8, 2024
1 parent b116f0d commit d1f1df0
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 4 deletions.
51 changes: 48 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import { themes as prismThemes } from 'prism-react-renderer';
import fauxRemarkEmbedder from '@remark-embedder/core';
import fauxOembedTransformer from '@remark-embedder/transformer-oembed';
import { readFileSync } from 'fs';

const transformer = {
...fauxOembedTransformer,
Expand All @@ -20,6 +21,15 @@ const transformer = {
},
};

const footerLink = (href, path) => {
return `<a class="footer__link-item" target="_blank" rel="noopener noreferrer" href="${href}">${readFileSync(
path,
{
encoding: 'utf-8',
}
)}</a>`;
};

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'DIAL Knowledge Base',
Expand Down Expand Up @@ -132,13 +142,48 @@ const config = {
href: 'https://www.youtube.com/@TeamDialX',
label: 'YouTube',
position: 'right',
}
},
],
},
footer: {
copyright: `Copyright © ${new Date().getFullYear()} EPAM Systems, Inc. All Rights Reserved`,
links: [
{
items: [
{
label: 'Privacy policy',
to: 'https://www.epam.com/privacy-policy',
},
{
label: 'Cookie policy',
to: 'https://www.epam.com/cookie-policy',
},
],
},
{
items: [
{
html: ${new Date().getFullYear()} All Rights Reserved`,
},
],
},
{
items: [
{
html: footerLink(
'https://discord.gg/hgqEAbEwZ9',
'./static/discord.svg'
),
},
{
html: footerLink(
'https://www.youtube.com/@TeamDialX',
'./static/youtube.svg'
),
},
],
},
],
},

prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
Expand Down
58 changes: 57 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
--ifm-link-color: #5a8ce9;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
--ifm-footer-background-color: #f4f7fb;
--ifm-footer-padding-vertical: 1.25rem;
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
Expand All @@ -29,6 +31,7 @@
--ifm-color-primary-lightest: #5a8ce9;
--ifm-link-color: #5a8ce9;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
--ifm-footer-background-color: #02050a;
}

.medium-zoom-image--opened,
Expand All @@ -53,9 +56,62 @@
padding: 0.25rem 0 0.25rem 0;
}


.iframe-video {
width: 100%;
aspect-ratio: 16/9;
}

.icon-bg {
fill: var(--ifm-footer-background-color);
}

.footer .container {
max-width: 100%;
}

.footer .footer__links {
margin: 0;
justify-content: center;
flex-direction: column;
gap: 1rem;
}

.footer .col {
padding: 0;
margin: 0;
min-width: 0;
max-width: 100%;
flex-basis: min-content;
}

.footer .footer__items {
flex-direction: row;
display: flex;
gap: 2rem;
justify-content: center;
color: var(--ifm-footer-link-color);
height: 100%;
align-items: center;
}

.footer .footer__title {
display: none;
}

.footer__link-item {
display: flex;
}

@media (min-width: 640px) {
.footer .footer__links {
justify-content: space-between;
flex-direction: row;
}
.footer .col:first-of-type .footer__items {
justify-content: flex-start;
}

.footer .col:last-of-type .footer__items {
justify-content: flex-end;
}
}
5 changes: 5 additions & 0 deletions static/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions static/youtube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d1f1df0

Please sign in to comment.