diff --git a/.eleventy.js b/.eleventy.js
index 01455d2..b86c02a 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -20,6 +20,8 @@ module.exports = (eleventyConfig) => {
}
})
+ eleventyConfig.addPassthroughCopy('./src/fonts/')
+
eleventyConfig.addPlugin(svgContents)
eleventyConfig.addPlugin(faviconPlugin, {
destination: './dist'
diff --git a/package-lock.json b/package-lock.json
index 8e38d7b..7abf47a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4475,6 +4475,17 @@
"integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==",
"dev": true
},
+ "postcss-import": {
+ "version": "14.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz",
+ "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.0.0",
+ "read-cache": "^1.0.0",
+ "resolve": "^1.1.7"
+ }
+ },
"postcss-js": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.0.tgz",
@@ -5006,6 +5017,15 @@
}
}
},
+ "read-cache": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
+ "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=",
+ "dev": true,
+ "requires": {
+ "pify": "^2.3.0"
+ }
+ },
"read-chunk": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-1.0.1.tgz",
diff --git a/package.json b/package.json
index 381cc1e..582f377 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"eslint-plugin-n": "^15.2.0",
"eslint-plugin-promise": "^6.0.0",
"postcss": "^8.4.13",
+ "postcss-import": "^14.1.0",
"rollup": "^2.72.1",
"rollup-plugin-terser": "^7.0.2",
"tailwindcss": "^3.0.24"
diff --git a/postcss.config.js b/postcss.config.js
index dc286cf..69da1bc 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -6,6 +6,7 @@ module.exports = {
from: 'src/css/index.css',
to: 'dist/css/index.css',
plugins: [
+ require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
...(process.env.NODE_ENV === 'production' ? [cssnano] : [])
diff --git a/src/css/fonts.css b/src/css/fonts.css
new file mode 100644
index 0000000..c78b2a9
--- /dev/null
+++ b/src/css/fonts.css
@@ -0,0 +1,17 @@
+@font-face {
+ font-family: "Open Sans";
+ font-style: normal;
+ font-weight: normal;
+ src: url("/fonts/OpenSans-Regular.woff2") format("woff2"),
+ url("/fonts/OpenSans-Regular.woff") format("woff"),
+ url("/fonts/OpenSans-Regular.ttf") format("truetype");
+}
+
+@font-face {
+ font-family: "Open Sans";
+ font-style: bold;
+ font-weight: bold;
+ src: url("/fonts/OpenSans-Bold.woff2") format("woff2"),
+ url("/fonts/OpenSans-Bold.woff") format("woff"),
+ url("/fonts/OpenSans-Bold.ttf") format("truetype");
+}
diff --git a/src/css/index.css b/src/css/index.css
index b5c61c9..8e5c69a 100644
--- a/src/css/index.css
+++ b/src/css/index.css
@@ -1,3 +1,4 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
+@import 'fonts.css';
+@import 'tailwindcss/base';
+@import 'tailwindcss/components';
+@import 'tailwindcss/utilities';
\ No newline at end of file
diff --git a/src/fonts/OpenSans-Bold.ttf b/src/fonts/OpenSans-Bold.ttf
new file mode 100644
index 0000000..4d8f3e5
Binary files /dev/null and b/src/fonts/OpenSans-Bold.ttf differ
diff --git a/src/fonts/OpenSans-Bold.woff b/src/fonts/OpenSans-Bold.woff
new file mode 100644
index 0000000..00a30c7
Binary files /dev/null and b/src/fonts/OpenSans-Bold.woff differ
diff --git a/src/fonts/OpenSans-Bold.woff2 b/src/fonts/OpenSans-Bold.woff2
new file mode 100644
index 0000000..dcaf5bc
Binary files /dev/null and b/src/fonts/OpenSans-Bold.woff2 differ
diff --git a/src/fonts/OpenSans-Regular.ttf b/src/fonts/OpenSans-Regular.ttf
new file mode 100644
index 0000000..3a29f26
Binary files /dev/null and b/src/fonts/OpenSans-Regular.ttf differ
diff --git a/src/fonts/OpenSans-Regular.woff b/src/fonts/OpenSans-Regular.woff
new file mode 100644
index 0000000..d28b141
Binary files /dev/null and b/src/fonts/OpenSans-Regular.woff differ
diff --git a/src/fonts/OpenSans-Regular.woff2 b/src/fonts/OpenSans-Regular.woff2
new file mode 100644
index 0000000..abf59e3
Binary files /dev/null and b/src/fonts/OpenSans-Regular.woff2 differ
diff --git a/src/pages/index.njk b/src/pages/index.njk
index 3b97b1f..44973cf 100644
--- a/src/pages/index.njk
+++ b/src/pages/index.njk
@@ -6,4 +6,7 @@ layout: 'base.njk'
{{ '/src/images/logo.svg' | svgContents("max-h-24 block w-[50vw]") | safe }}
-
\ No newline at end of file
+
+
+ Привет мир!
+
\ No newline at end of file
diff --git a/tailwind.config.js b/tailwind.config.js
index b7200d2..5802c69 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,10 +1,16 @@
+const defaultTheme = require('tailwindcss/defaultTheme')
+
module.exports = {
content: [
'./src/css/**/*',
'./src/pages/**/*'
],
theme: {
- extend: {}
+ extend: {
+ fontFamily: {
+ sans: ['"Open Sans"', ...defaultTheme.fontFamily.sans]
+ }
+ }
},
plugins: []
}