Skip to content

Commit

Permalink
Feature/unbounded typeface (w3f#3745)
Browse files Browse the repository at this point in the history
* Change fonts to Inter/Unbounded, adjust breakpoints and fix visual bugs

* Adjust footer spacing

* Adjust spacing around Social column

* Remove padding from custom breakpoints class

* Set variable font weight limits, make footer nav headings Unbounded

* Adjust font weights of headings

* fix formatting

* update format lint

Co-authored-by: rmnprkrl <[email protected]>
  • Loading branch information
je-boska and rmnprkrl authored Sep 6, 2022
1 parent f699d63 commit 5d712ad
Show file tree
Hide file tree
Showing 8 changed files with 487 additions and 408 deletions.
6 changes: 4 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Matches multiple files with brace expansion notation
[*.{js,jsx,html,sass}]
charset = utf-8
indent_style = tab
indent_size = 4
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 1 addition & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"singleQuote": false,
"printWidth": 100,
"proseWrap": "always"
}
148 changes: 74 additions & 74 deletions polkadot-wiki/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,88 +1,88 @@
const { baseUrlPattern } = require('../scripts/utils');
const { injectPlugin } = require('../scripts/injectPlugin');
const i18n = require('./i18n');
const { baseUrlPattern } = require("../scripts/utils");
const { injectPlugin } = require("../scripts/injectPlugin");
const i18n = require("./i18n");

const isBuilding = process.env.BUILDING === 'true';
const isPublishing = process.env.PUBLISHING === 'true';
const isBuilding = process.env.BUILDING === "true";
const isPublishing = process.env.PUBLISHING === "true";

module.exports = {
title: 'Polkadot Wiki',
tagline: 'The hub for those interested in learning, building, or running a node on Polkadot.',
titleDelimiter: '·',
url: 'https://wiki.polkadot.network',
baseUrl: '/',
projectName: 'polkadot-wiki',
organizationName: 'w3f',
title: "Polkadot Wiki",
tagline: "The hub for those interested in learning, building, or running a node on Polkadot.",
titleDelimiter: "·",
url: "https://wiki.polkadot.network",
baseUrl: "/",
projectName: "polkadot-wiki",
organizationName: "w3f",
scripts: [
'https://buttons.github.io/buttons.js',
'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js',
'https://unpkg.com/aos@next/dist/aos.js',
"https://buttons.github.io/buttons.js",
"https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.js",
"https://unpkg.com/aos@next/dist/aos.js",
{
src: 'https://unpkg.com/[email protected]/dist/vanilla-back-to-top.min.js',
onload: 'addBackToTop()',
src: "https://unpkg.com/[email protected]/dist/vanilla-back-to-top.min.js",
onload: "addBackToTop()",
defer: true,
},
{
{
src: "https://apisa.web3.foundation/latest.js",
async: true,
defer: true,
},
'../js/custom.js',
'../js/clipboard.min.js',
'../js/copycode.js',
"../js/custom.js",
"../js/clipboard.min.js",
"../js/copycode.js",
],
stylesheets: [
'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css',
'https://fonts.googleapis.com/css?family=Work+Sans:400,700&display=swap',
'https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css',
'https://unpkg.com/aos@next/dist/aos.css',
'https://fonts.googleapis.com/icon?family=Material+Icons',
"https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
"https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap",
"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css",
"https://unpkg.com/aos@next/dist/aos.css",
"https://fonts.googleapis.com/icon?family=Material+Icons",
],
i18n,
favicon: 'img/Polkadot_Favicon.png',
favicon: "img/Polkadot_Favicon.png",
trailingSlash: false,
onBrokenLinks: 'log',
onBrokenMarkdownLinks: 'log',
onDuplicateRoutes: 'log',
onBrokenLinks: "log",
onBrokenMarkdownLinks: "log",
onDuplicateRoutes: "log",
presets: [
[
'@docusaurus/preset-classic',
"@docusaurus/preset-classic",
{
docs: {
editUrl: ({ docPath }) =>
`https://github.com/w3f/polkadot-wiki/edit/master/docs/${docPath}`,
path: '../docs',
path: "../docs",
showLastUpdateAuthor: true,
showLastUpdateTime: true,
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: 'docs',
sidebarPath: require.resolve("./sidebars.js"),
routeBasePath: "docs",
remarkPlugins: [injectPlugin({ isPolkadot: true })],
},
theme: {
customCss: [
require.resolve('./static/css/custom.css'),
require.resolve('./static/css/copycode.css'),
require.resolve('./static/css/socicon.css'),
require.resolve("./static/css/custom.css"),
require.resolve("./static/css/copycode.css"),
require.resolve("./static/css/socicon.css"),
],
},
},
],
],
plugins: [
'remark-docusaurus-tabs',
"remark-docusaurus-tabs",
[
'@docusaurus/plugin-client-redirects',
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
to: '/',
to: "/",

from: ['/en/latest', '/en/'],
from: ["/en/latest", "/en/"],
},
],
createRedirects: function (existingPath) {
if (existingPath.startsWith('/docs/')) {
return [existingPath.replace('/docs/', '/docs/en/')];
if (existingPath.startsWith("/docs/")) {
return [existingPath.replace("/docs/", "/docs/en/")];
}
},
},
Expand All @@ -93,7 +93,7 @@ module.exports = {
disableSwitch: true,
},
prism: {
theme: require('prism-react-renderer/themes/github'),
theme: require("prism-react-renderer/themes/github"),
},
/*
announcementBar: {
Expand All @@ -109,54 +109,54 @@ module.exports = {
* The position of the live playground, above or under the editor
* Possible values: "top" | "bottom"
*/
playgroundPosition: 'bottom',
playgroundPosition: "bottom",
},
navbar: {
logo: {
src: 'img/Polkadot_Logo_Horizontal_Pink-Black.svg',
src: "img/Polkadot_Logo_Horizontal_Pink-Black.svg",
},
items: [
{
to: 'docs/getting-started',
label: 'Get Started',
position: 'right',
to: "docs/getting-started",
label: "Get Started",
position: "right",
},
{
to: 'docs/learn-launch',
label: 'Learn',
position: 'right',
to: "docs/learn-launch",
label: "Learn",
position: "right",
},
{
to: 'docs/build-index',
label: 'Build',
position: 'right',
to: "docs/build-index",
label: "Build",
position: "right",
},
{
to: 'docs/maintain-index',
label: 'Maintain ',
position: 'right',
to: "docs/maintain-index",
label: "Maintain ",
position: "right",
},
{
href: 'https://guide.kusama.network',
label: 'Kusama',
position: 'right',
href: "https://guide.kusama.network",
label: "Kusama",
position: "right",
},
{
type: 'search',
position: 'right',
type: "search",
position: "right",
},
{
to: 'docs/contributing',
label: 'Contribute',
position: 'right',
to: "docs/contributing",
label: "Contribute",
position: "right",
},
{
type: 'localeDropdown',
position: 'right',
type: "localeDropdown",
position: "right",
dropdownItemsAfter: [
{
to: 'https://crowdin.com/project/polkadot-wiki',
label: 'Help us translate',
to: "https://crowdin.com/project/polkadot-wiki",
label: "Help us translate",
},
],
},
Expand All @@ -165,13 +165,13 @@ module.exports = {
footer: {
copyright: ${new Date().getFullYear()} Web3 Foundation`,
logo: {
src: 'img/Polkadot_Logo_Horizontal_White.svg',
src: "img/Polkadot_Logo_Horizontal_White.svg",
},
},
algolia: {
appId: 'BEUYRRAUZN',
apiKey: 'e472cf1f938eb8c46dd952ff22332538',
indexName: 'polkadot',
appId: "BEUYRRAUZN",
apiKey: "e472cf1f938eb8c46dd952ff22332538",
indexName: "polkadot",
contextualSearch: true,
},
docsSideNavCollapsible: true,
Expand Down
Loading

0 comments on commit 5d712ad

Please sign in to comment.