diff --git a/.gitignore b/.gitignore index b2d6de3062..6ad0ddc398 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +debug.log* diff --git a/debug.log b/debug.log deleted file mode 100644 index e2758ac046..0000000000 --- a/debug.log +++ /dev/null @@ -1 +0,0 @@ -[0122/151157.680:ERROR:directory_reader_win.cc(43)] FindFirstFile: System nie mo¿e odnaleæ okrelonej cie¿ki. (0x3) diff --git a/docs/develop/golang/index-golang.mdx b/docs/develop/golang/index-golang.mdx index c156e7c2c5..186e4c063e 100644 --- a/docs/develop/golang/index-golang.mdx +++ b/docs/develop/golang/index-golang.mdx @@ -8,7 +8,7 @@ slug: /develop/golang/ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import useBaseUrl from '@docusaurus/useBaseUrl'; -import RedisCard from '@site/src/components/RedisCard'; +import RedisCard from '@site/src/theme/RedisCard'; Find tutorials, examples and technical articles that will help you to develop with Redis and Golang. @@ -130,4 +130,4 @@ Find more information about Golang & Redis connections in the "[Redis Connect](h - \ No newline at end of file + diff --git a/docs/develop/java/index-java.mdx b/docs/develop/java/index-java.mdx index 260428519f..0ccc04f6d3 100644 --- a/docs/develop/java/index-java.mdx +++ b/docs/develop/java/index-java.mdx @@ -7,7 +7,7 @@ slug: /develop/java/ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import useBaseUrl from '@docusaurus/useBaseUrl'; -import RedisCard from '@site/src/components/RedisCard'; +import RedisCard from '@site/src/theme/RedisCard'; Find tutorials, examples and technical articles that will help you to develop with Redis and Java. diff --git a/docs/develop/node/index-node.mdx b/docs/develop/node/index-node.mdx index 5bf5dd246d..72bf0f5b9f 100644 --- a/docs/develop/node/index-node.mdx +++ b/docs/develop/node/index-node.mdx @@ -8,7 +8,7 @@ slug: /develop/node/ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import useBaseUrl from '@docusaurus/useBaseUrl'; -import RedisCard from '@site/src/components/RedisCard'; +import RedisCard from '@site/src/theme/RedisCard'; Find tutorials, examples and technical articles that will help you to develop with Redis and Node.js/JavaScript. @@ -162,4 +162,4 @@ Build full-fledged Redis applications with Node.js and Express.
RedisConf 2021 - The Call for Paper is Open, Submit your Proposal
Learn more', backgroundColor: '#fff', // Defaults to `#fff`. textColor: '#000', // Defaults to `#000`. isCloseable: true, // Defaults to `true`. diff --git a/package.json b/package.json index b805869c33..6c735abf52 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "docusaurus-plugin-sass": "^0.1.11", "react": "^16.8.4", "react-dom": "^16.8.4", + "react-slick": "^0.28.0", "react-typed": "^1.2.0" }, "browserslist": { diff --git a/src/css/_article.scss b/src/css/_article.scss index 32f54ba810..3c6afb08f2 100644 --- a/src/css/_article.scss +++ b/src/css/_article.scss @@ -96,37 +96,95 @@ blockquote { border-left: 5px solid #dbdada; } +main:not(.home-main) { + a { + text-decoration: none; + transition: all .2s ease-in-out; + + &:hover { + color: $purple-hover; + } + } + + article { + header { + h1 { + line-height: 1.2; + font-size: 49px; + + @include mobile { + font-size: 39px; + } + } + } + } +} + .markdown { color: $black; + h1, + h2, + h3, + h4, + h5, + h6 { + font-family: $lato; + font-weight: 700; + } + h1 { line-height: 1.2; font-size: 49px; + + @include mobile { + font-size: 39px; + } } h2 { line-height: 1.2; font-size: 38px; + + @include mobile { + font-size: 28px; + } } h3 { line-height: 1.2; font-size: 32px; + + @include mobile { + font-size: 22px; + } } h4 { line-height: 1.5; font-size: 25px; + + @include mobile { + font-size: 20px; + } } h5 { line-height: 1.45; font-size: 20px; + + @include mobile { + font-size: 18px; + } } h6 { line-height: 1.6; font-size: 18px; + + @include mobile { + font-size: 16px; + } } } @@ -172,6 +230,7 @@ blockquote { border-radius: 0; line-height: 1; font-size: 17px; + transition: color .2s ease-in-out; &:not(:last-child) { margin-right: 10px; @@ -179,8 +238,72 @@ blockquote { &:hover { background-color: transparent; + color: $purple-hover; + } + + &--active { + color: var(--ifm-tabs-color-active) !important; + } + } +} + +.ri-container { + margin-bottom: 30px; + padding: 20px; + height: calc(100% - 30px); + border: 2px solid $grey-dark; + + .ri-icon { + display: none; + } + + .ri-detail { + width: 100%; + } + + .ri-title { + text-align: left; + line-height: 1.6; + font-size: 18px; + + a { + color: $black; } + } + + .ri-description { + text-align: left; + line-height: 1.8; + font-size: 16px; + color: $black; + + img { + margin-top: 15px; + } + } + + img { + max-width: 50%; + } +} + +code { + border-radius: 4px; + background-color: $purple-light; +} + +iframe { + max-width: 100%; + box-shadow: 0 2px 20px rgba($black, .17); +} + +.sidebar-logo { + display: flex; + align-items: center; + padding: 0 15px; + height: 60px; - &--active {} + img { + height: 26px; } } diff --git a/src/css/_config.scss b/src/css/_config.scss index c5b43902df..ccd0d9d19e 100644 --- a/src/css/_config.scss +++ b/src/css/_config.scss @@ -8,6 +8,7 @@ $secondary-black: #2E2E2E; $zircon: #F8FAFF; $grey: #707070; $grey-light: #E0DFDF; +$grey-dark: #C2C0C0; $purple: #5961FF; $purple-hover: #3F41A0; $purple-light: #F2F5FE; @@ -30,8 +31,40 @@ monospace; --zircon: #F8FAFF; --grey: #707070; --grey-light: #E0DFDF; + --grey-dark: #C2C0C0; --purple: #5961FF; --purple-hover: #3F41A0; --purple-light: #F2F5FE; --purple-lighter: #F9FAFF; } + +/* media queries */ +@mixin desktop { + @media only screen and (min-width: 997px) { + @content; + } +} + +@mixin desktop-tablet { + @media only screen and (min-width: 751px) { + @content; + } +} + +@mixin tablet { + @media only screen and (min-width: 751px) and (max-width: 996px) { + @content; + } +} + +@mixin tablet-mobile { + @media only screen and (max-width: 996px) { + @content; + } +} + +@mixin mobile { + @media only screen and (max-width: 750px) { + @content; + } +} diff --git a/src/css/_typography.scss b/src/css/_typography.scss index fb20eac7b2..9f053f570d 100644 --- a/src/css/_typography.scss +++ b/src/css/_typography.scss @@ -15,9 +15,19 @@ h6 { font-size: 38px; font-weight: 600; + @include mobile { + font-size: 32px; + } + &.white { color: $white; } + + br { + @include desktop-tablet { + display: none; + } + } } // section-description @@ -29,8 +39,17 @@ h6 { font-size: 18px; font-weight: 400; + @include mobile { + line-height: 1.6; + font-size: 16px; + } + &:not(:first-child) { margin-top: 11px; + + @include mobile { + margin-top: 14px; + } } &.white { diff --git a/src/css/components/_announcement.scss b/src/css/components/_announcement.scss index a84dd3cf3f..04c34e226e 100644 --- a/src/css/components/_announcement.scss +++ b/src/css/components/_announcement.scss @@ -17,11 +17,25 @@ font-weight: 500; letter-spacing: 0.25px; + @include mobile { + line-height: 1.3; + font-size: 13px; + } + &.announcementBarCloseable { padding-right: 56px; } - a { + .text { + margin: 0; + display: inline-block; + + @include mobile { + display: block; + } + } + + .btn { display: inline-block; margin-left: 15px; padding: 5px 23px 4px; @@ -34,6 +48,16 @@ letter-spacing: 0.5px; text-decoration: none; color: $white; + transition: background-color .2s ease-in-out, color .2s ease-in-out; + + @include mobile { + margin-top: 10px; + } + + &:hover { + background-color: $white; + color: $secondary-blue; + } } } diff --git a/src/css/components/_demos.scss b/src/css/components/_demos.scss index 978bd04a0c..b72a66e7e2 100644 --- a/src/css/components/_demos.scss +++ b/src/css/components/_demos.scss @@ -2,6 +2,10 @@ position: relative; padding-top: 68px; + @include mobile { + padding-top: 46px; + } + .container { position: relative; @@ -16,6 +20,10 @@ &:not(:first-child) { margin-top: 75px; + + @include mobile { + margin-top: 34px; + } } .code { @@ -25,6 +33,14 @@ height: 477.5px; user-select: none; } + + .col { + &:not(:last-child) { + @include mobile { + margin-bottom: 45px; + } + } + } } .terminal { @@ -32,7 +48,9 @@ position: relative; &.right { - margin-top: 60px; + @include desktop-tablet { + margin-top: 60px; + } } .terminal-header { @@ -41,11 +59,19 @@ border-radius: 10px 10px 0 0; background-color: $secondary-black; + @include mobile { + height: 31px; + } + svg { position: absolute; top: 50%; left: 17px; transform: translateY(-50%); + + @include mobile { + zoom: .85; + } } } @@ -57,10 +83,19 @@ border-top: none; background-color: $white; + @include mobile { + padding: 31px 25px 35px; + min-height: 220px; + } + .title { margin: 0; line-height: 1; font-size: 26px; + + @include mobile { + font-size: 22px; + } } .links { @@ -69,8 +104,16 @@ list-style: none; line-height: 1.45; + @include mobile { + font-size: 15px; + } + &:not(:first-child) { margin-top: 30px; + + @include mobile { + margin-top: 24px; + } } li { diff --git a/src/css/components/_footer.scss b/src/css/components/_footer.scss index c14b3e2cd6..70c2f9e32c 100644 --- a/src/css/components/_footer.scss +++ b/src/css/components/_footer.scss @@ -1,6 +1,7 @@ .footer { + position: relative; padding: 0; - border-radius: 10px; + overflow: hidden; background-color: $primary-black; .container { @@ -8,10 +9,19 @@ padding-top: 50px; padding-bottom: 38px; + @include mobile { + padding-top: 47px; + padding-bottom: 44px; + } + .shape { position: absolute; bottom: 0; left: -533px; + + @include mobile { + display: none; + } } .code { @@ -20,6 +30,12 @@ right: -145px; height: 338px; user-select: none; + + @include mobile { + zoom: .8; + top: 15px; + right: -55px; + } } .row { @@ -40,19 +56,45 @@ line-height: 1.25; font-size: 14.5px; font-weight: 600; + + @include tablet-mobile { + margin-bottom: 22px; + } } &__links { margin-bottom: 0; + + @include tablet-mobile { + margin-top: 45px; + } + } + + &__col { + margin-bottom: 0 !important; + + @include tablet { + --ifm-col-width: 33.33% !important; + } + + @include mobile { + --ifm-col-width: 50% !important; + } } &__items { - max-width: 168px; + @include desktop { + max-width: 168px; + } } &__item { &:not(:first-child) { margin-top: 3px; + + @include tablet-mobile { + margin-top: 15px; + } } } @@ -76,5 +118,9 @@ line-height: 1.25; font-size: 12px; color: $grey; + + @include tablet-mobile { + margin-top: 42px; + } } } diff --git a/src/css/components/_hero.scss b/src/css/components/_hero.scss index 0c50d94f89..49d4a0ba20 100644 --- a/src/css/components/_hero.scss +++ b/src/css/components/_hero.scss @@ -5,8 +5,24 @@ background-color: $primary-blue; color: $white; + @include mobile { + padding: 71px 0 62px; + } + .row { align-items: center; + + .col { + @include tablet-mobile { + &:first-child { + order: 2; + } + + &:last-child { + order: 1; + } + } + } } .hero-title { @@ -14,6 +30,15 @@ line-height: 1.1; font-size: 50px; font-weight: 500; + + @include tablet-mobile { + text-align: center; + } + + @include mobile { + line-height: 1.25; + font-size: 32px; + } } .hero-subtitle { @@ -21,12 +46,26 @@ line-height: 1.5; font-size: 18px; font-weight: 400; + + @include tablet-mobile { + text-align: center; + } + + @include mobile { + margin-top: 13px; + font-size: 14px; + } } .boxes { display: flex; margin-top: 42px; + @include mobile { + flex-direction: column; + margin-top: 36px; + } + .box { flex: 1; position: relative; @@ -34,12 +73,23 @@ border-radius: 3px; transition: background-color .2s ease-in-out; + @include mobile { + margin: 0 auto; + max-width: 282px; + } + &:hover { background-color: $red; } &:not(:first-child) { - margin-left: 12px; + @include desktop-tablet { + margin-left: 12px; + } + + @include mobile { + margin-top: 25px; + } } .bg { @@ -67,32 +117,64 @@ align-items: center; padding: 5px 21px 0; height: 69px; + + @include mobile { + justify-content: center; + } + + svg { + @include mobile { + zoom: 1.1; + } + } } .text { padding: 0 16px 23px 21px; + @include mobile { + padding-bottom: 25px; + } + .title { margin: 0; line-height: 1.5; font-size: 18px; font-weight: 400; + + @include mobile { + text-align: center; + line-height: 1.2; + font-size: 22px; + } } .description { margin: 5px 0 0 0; line-height: 1.5; font-size: 14.5px; + + @include mobile { + margin-top: 10px; + text-align: center; + line-height: 1.6; + font-size: 16px; + } } .more { display: flex; align-items: center; - margin-top: 9px; + margin-top: 14px; line-height: 1.2; font-size: 14.5px; font-weight: 700; + @include mobile { + justify-content: center; + font-size: 16px; + } + svg { margin-left: 8px; @@ -121,8 +203,16 @@ } .illustration { - display: block; - margin-left: 66px; max-width: 100%; + + @include desktop { + margin-left: 66px; + } + + @include tablet-mobile { + display: block; + margin: 0 auto 48px; + zoom: 0.48; + } } } diff --git a/src/css/components/_languages.scss b/src/css/components/_languages.scss index ca7c62a861..565dd25aa3 100644 --- a/src/css/components/_languages.scss +++ b/src/css/components/_languages.scss @@ -2,27 +2,53 @@ position: relative; padding-top: 76px; + @include mobile { + padding-top: 54px; + } + .shape { position: absolute; top: -61px; left: calc(50% - 154px); + + @include mobile { + zoom: .5; + top: 380px; + left: -150px; + } } .languages-list { z-index: 2; display: flex; - justify-content: space-between; + // justify-content: space-between; + justify-content: space-around; position: relative; margin: 0 auto; padding: 0; max-width: 1050px; list-style: none; + @include mobile { + flex-wrap: wrap; + justify-content: center; + } + &:not(:first-child) { margin-top: 76px; + + @include mobile { + margin-top: 12px; + } } li { + @include mobile { + flex: 0 0 50%; + margin-top: 42px; + text-align: center; + } + a { display: inline-flex; flex-direction: column; @@ -33,9 +59,15 @@ svg { margin-bottom: 27px; + + @include mobile { + zoom: .85; + margin-bottom: 21px; + } } .btn { + margin-top: auto; padding: 6px 15px 8px; border-radius: 3px; line-height: 1.3; @@ -44,6 +76,10 @@ font-weight: 500; color: $red; transition: background-color .2s ease-in-out, color .2s ease-in-out; + + @include mobile { + font-size: 14px; + } } &:hover .btn { diff --git a/src/css/components/_navbar.scss b/src/css/components/_navbar.scss index 7e63cf66cc..e6903b9126 100644 --- a/src/css/components/_navbar.scss +++ b/src/css/components/_navbar.scss @@ -1,18 +1,76 @@ +.navbar-sidebar--show .navbar-sidebar { + box-shadow: 0 5px 40px rgba($primary-blue, .5); +} + +.navbar-sidebar { + background-color: $primary-blue; + box-shadow: none; + + &__backdrop { + background-color: rgba($primary-blue, .5); + } + + &__brand { + box-shadow: none; + } + + &__items { + margin-top: 15px; + padding: 0; + } + + .menu { + &__list-item { + margin: 0; + + &:not(:first-child) { + margin-top: 10px; + } + } + + &__link { + padding: 5px 15px; + border-radius: 0; + background-color: transparent; + font-size: 17px; + color: $white; + } + } +} + .navbar { - padding: 15px; + padding: 14px 15px; height: auto; border-radius: 0 0 10px 10px; background-color: $primary-blue; box-shadow: none; - &__brand { - height: 26px; + &__toggle { + margin-right: 18px; + } + + &__brand, + &__logo { + width: 171px !important; + height: 26px !important; } &__link { - padding: 5px 21px; + padding: 7px 21px 8px; + line-height: 1; font-size: 17px; color: $white !important; + + &:hover { + text-decoration: underline; + } + } + + .DocSearch-Button-Container { + @include mobile { + justify-content: center; + width: 100%; + } } .DocSearch-Button { @@ -24,6 +82,11 @@ border-radius: 21px; background-color: $zircon; + @include mobile { + padding: 0; + width: 32px; + } + .DocSearch-Search-Icon { width: 16px; height: 16px; diff --git a/src/css/components/_resources.scss b/src/css/components/_resources.scss index 8705fe98c7..7bfb9251af 100644 --- a/src/css/components/_resources.scss +++ b/src/css/components/_resources.scss @@ -1,25 +1,89 @@ .rds-resources { margin-top: 75px; padding: 80px 0 85px; - border-radius: 10px; + border-radius: 10px 10px 0 0; background-color: $primary-blue; + @include mobile { + margin-top: 59px; + padding: 54px 0 53px; + } + .articles { - margin-top: 77px; + &:not(:first-child) { + margin-top: 77px; + + @include mobile { + margin-top: 52px; + } + } + + .slick-list { + margin: -10px 0; + } + + .slick-track { + display: flex; + padding: 10px 0; + } + + .slick-slide { + height: auto; + + >div { + height: 100%; + + >.col { + padding: 0 12.5px; + height: 100%; + } + } + } + + .slick-dots { + display: flex !important; + justify-content: center; + bottom: -15px; + + li { + margin: 0 6px; + width: auto; + height: auto; + + button { + margin: 0; + padding: 0; + width: 8px; + height: 8px; + border-radius: 100%; + background-color: $white; + transition: background-color .2s ease-in-out; + + &:before { + display: none; + } + } + + &.slick-active { + button { + background-color: $red; + } + } + } + } .article { position: relative; height: 100%; - transition: transform .2s ease-in-out; &:hover { - transform: translateY(-5px); - &:before { + top: 5px; opacity: 1; } .article-wrapper { + top: -5px; box-shadow: 12px 11px 6px rgba($primary-black, .17); } } @@ -33,16 +97,21 @@ opacity: 0; border-radius: 10px; background-color: $purple; - transition: opacity .2s ease-in-out; + transition: top .2s ease-in-out, opacity .2s ease-in-out; content: ''; + + @include mobile { + border-radius: 8px; + } } .article-wrapper { display: flex; flex-direction: column; position: relative; + top: 0; height: 100%; - transition: box-shadow .2s ease-in-out; + transition: top .2s ease-in-out, box-shadow .2s ease-in-out; } .thumb { @@ -51,6 +120,11 @@ height: 187px; object-fit: cover; border-radius: 10px 10px 0 0; + + @include mobile { + height: 151px; + border-radius: 8px 8px 0 0; + } } .article-body { @@ -59,6 +133,11 @@ border-radius: 0 0 10px 10px; background-color: $white; + @include mobile { + padding: 15px 19px 16px; + border-radius: 0 0 8px 8px; + } + .type { display: block; text-transform: uppercase; @@ -67,6 +146,10 @@ font-size: 14.5px; font-weight: 900; color: $red; + + @include mobile { + font-size: 13px; + } } .title { @@ -75,8 +158,16 @@ font-size: 18px; font-weight: 600; + @include mobile { + font-size: 16px; + } + &:not(:first-child) { margin-top: 4px; + + @include mobile { + margin-top: 3px; + } } } } @@ -98,6 +189,10 @@ margin-top: 55px; text-align: center; + @include mobile { + margin-top: 50px; + } + .btn { display: inline-block; padding: 11px 32px 12px; @@ -109,6 +204,12 @@ font-size: 14px; font-weight: 700; color: $white; + transition: background-color .2s ease-in-out, color .2s ease-in-out; + + &:hover { + background-color: $white; + color: $red; + } } } } diff --git a/src/css/custom.scss b/src/css/custom.scss index 355d7810b8..5c9815ba1e 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -5,6 +5,9 @@ * work well for content-centric websites. */ +@import '../slick/slick'; +@import '../slick/slick-theme'; + @import './config'; @import './typography'; @import './article'; @@ -17,6 +20,7 @@ @import './components/demos'; @import './components/resources'; + /* You can override the default Infima variables here. */ :root { --ifm-color-primary: #25c2a0; @@ -40,3 +44,7 @@ .container { max-width: 1140px; } + +.home-main { + overflow: hidden; +} diff --git a/src/pages/index.js b/src/pages/index.js index 7e1be4e822..88c9608b71 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -19,7 +19,7 @@ function Home() { title={`Hello from ${siteConfig.title}`} description="Description will go into a meta tag in