diff --git a/web/ASC.Web.Campaigns/bar-templates/.firebaserc b/web/ASC.Web.Campaigns/bar-templates/.firebaserc new file mode 100644 index 0000000000..b31a1ffde5 --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "appserver-c011a" + } +} diff --git a/web/ASC.Web.Campaigns/bar-templates/config.json b/web/ASC.Web.Campaigns/bar-templates/config.json new file mode 100644 index 0000000000..c374fd1532 --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/config.json @@ -0,0 +1,3 @@ +{ + "defaultLanguage": "en" +} \ No newline at end of file diff --git a/web/ASC.Web.Campaigns/bar-templates/gatsby-config.js b/web/ASC.Web.Campaigns/bar-templates/gatsby-config.js new file mode 100644 index 0000000000..a5abd9faf4 --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/gatsby-config.js @@ -0,0 +1,45 @@ +const languages = require("./languages.json"); + +const availableLanguages = languages.map((el) => el.shortKey); + +const { + defaultLanguage, +} = require("./config.json"); + +module.exports = { + plugins: [ + { + resolve: `gatsby-source-filesystem`, + options: { + path: `${__dirname}/src/locales`, + name: `locale` + } + }, + { + resolve: `gatsby-plugin-react-i18next`, + options: { + localeJsonSourceName: `locale`, + languages: availableLanguages, + defaultLanguage, + redirect: false, + generateDefaultLanguagePage: `/en`, + + i18nextOptions: { + fallbackLng: defaultLanguage, + interpolation: { + escapeValue: false + }, + keySeparator: false, + nsSeparator: false + }, + pages: [ + { + matchPath: '/preview', + languages: [""], + }, + ], + } + }, + 'gatsby-plugin-no-javascript' + ], +} diff --git a/web/ASC.Web.Campaigns/bar-templates/gatsby-node.js b/web/ASC.Web.Campaigns/bar-templates/gatsby-node.js new file mode 100644 index 0000000000..b3e9dd8cca --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/gatsby-node.js @@ -0,0 +1,9 @@ +exports.createPages = async ({ actions }) => { + const { createPage } = actions + createPage({ + path: "/using-dsg", + component: require.resolve("./src/templates/using-dsg.js"), + context: {}, + defer: true, + }) +} diff --git a/web/ASC.Web.Campaigns/bar-templates/languages.json b/web/ASC.Web.Campaigns/bar-templates/languages.json new file mode 100644 index 0000000000..0c1c95a4e1 --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/languages.json @@ -0,0 +1,137 @@ +[ + { + "key": "az-Latn-AZ", + "shortKey": "az", + "iconName": "az.svg" + }, + { + "key": "bg-BG", + "shortKey": "bg", + "iconName": "bg.svg" + }, + { + "key": "zh-CN", + "shortKey": "zh", + "iconName": "zh.svg" + }, + { + "key": "cs-CZ", + "shortKey": "cs", + "iconName": "cs.svg" + }, + { + "key": "nl-NL", + "shortKey": "nl", + "iconName": "nl.svg" + }, + { + "key": "en-GB", + "shortKey": "en-GB", + "iconName": "en-GB.svg" + }, + { + "key": "en-US", + "shortKey": "en", + "iconName": "en.svg" + }, + { + "key": "fi-FI", + "shortKey": "fi", + "iconName": "fi.svg" + }, + { + "key": "fr-FR", + "shortKey": "fr", + "iconName": "fr.svg" + }, + { + "key": "de-DE", + "shortKey": "de", + "iconName": "de.svg" + }, + { + "key": "de-CH", + "shortKey": "de-CH", + "iconName": "de-CH.svg" + }, + { + "key": "el-GR", + "shortKey": "el", + "iconName": "el.svg" + }, + { + "key": "it-IT", + "shortKey": "it", + "iconName": "it.svg" + }, + { + "key": "ja-JP", + "shortKey": "ja", + "iconName": "ja.svg" + }, + { + "key": "ko-KR", + "shortKey": "ko", + "iconName": "ko.svg" + }, + { + "key": "lv-LV", + "shortKey": "lv", + "iconName": "lv.svg" + }, + { + "key": "pl-PL", + "shortKey": "pl", + "iconName": "pl.svg" + }, + { + "key": "pt-BR", + "shortKey": "pt-BR", + "iconName": "pt-BR.svg" + }, + { + "key": "pt-PT", + "shortKey": "pt", + "iconName": "pt.svg" + }, + { + "key": "ru-RU", + "shortKey": "ru", + "iconName": "ru.svg" + }, + { + "key": "sk-SK", + "shortKey": "sk", + "iconName": "sk.svg" + }, + { + "key": "sl-SI", + "shortKey": "sl", + "iconName": "sl.svg" + }, + { + "key": "es-MX", + "shortKey": "es-MX", + "iconName": "es-MX.svg" + }, + { + "key": "es-ES", + "shortKey": "es", + "iconName": "es.svg" + }, + { + "key": "tr-TR", + "shortKey": "tr", + "iconName": "tr.svg" + }, + { + "key": "uk-UA", + "shortKey": "uk", + "iconName": "uk.svg" + }, + { + "key": "vi-VN", + "shortKey": "vi", + "iconName": "vi.svg" + } +] diff --git a/web/ASC.Web.Campaigns/bar-templates/package.json b/web/ASC.Web.Campaigns/bar-templates/package.json new file mode 100644 index 0000000000..f6c6aad684 --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/package.json @@ -0,0 +1,49 @@ +{ + "name": "gatsby-starter-default", + "private": true, + "description": "A simple starter to get up and developing quickly with Gatsby", + "version": "0.1.0", + "author": "Kyle Mathews ", + "dependencies": { + "gatsby": "^4.4.0", + "gatsby-plugin-gatsby-cloud": "^4.4.0", + "gatsby-plugin-image": "^2.4.0", + "gatsby-plugin-manifest": "^4.4.0", + "gatsby-plugin-no-javascript": "^2.0.5", + "gatsby-plugin-offline": "^5.4.0", + "gatsby-plugin-react-helmet": "^5.4.0", + "gatsby-plugin-react-i18next": "^1.2.2", + "gatsby-plugin-sharp": "^4.4.0", + "gatsby-source-filesystem": "^4.4.0", + "gatsby-transformer-sharp": "^4.4.0", + "i18next": "^21.6.5", + "prop-types": "^15.7.2", + "react": "^17.0.1", + "react-dom": "^17.0.1", + "react-helmet": "^6.1.0", + "react-i18next": "^11.15.3" + }, + "devDependencies": { + "prettier": "^2.4.1" + }, + "keywords": [ + "gatsby" + ], + "license": "0BSD", + "scripts": { + "build": "gatsby build", + "develop": "gatsby develop", + "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", + "start": "gatsby develop", + "serve": "gatsby serve", + "clean": "gatsby clean", + "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/gatsbyjs/gatsby-starter-default" + }, + "bugs": { + "url": "https://github.com/gatsbyjs/gatsby/issues" + } +} diff --git a/web/ASC.Web.Campaigns/bar-templates/src/locales/en/NewYear.json b/web/ASC.Web.Campaigns/bar-templates/src/locales/en/NewYear.json new file mode 100644 index 0000000000..86955a776a --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/src/locales/en/NewYear.json @@ -0,0 +1,4 @@ +{ + "Title":"ONLYOFFICE Advent Calendar", + "Text": "Spend 24 days of Christmas with ONLYOFFICE. Get <1>new gifts and discounts each day - up to 99% off!" +} \ No newline at end of file diff --git a/web/ASC.Web.Campaigns/bar-templates/src/locales/ru/NewYear.json b/web/ASC.Web.Campaigns/bar-templates/src/locales/ru/NewYear.json new file mode 100644 index 0000000000..68b08f77cd --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/src/locales/ru/NewYear.json @@ -0,0 +1,4 @@ +{ + "Title":"Адвент-календарь ONLYOFFICE", + "Text": "Готовьтесь к Новому году с ONLYOFFICE и получите <1>ежедневные подарки и скидки каждый день - до минус 99%!" +} \ No newline at end of file diff --git a/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/images/santa.svg b/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/images/santa.svg new file mode 100644 index 0000000000..c1cf17e06c --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/images/santa.svg @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/index.css b/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/index.css new file mode 100644 index 0000000000..8bf5281a5a --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/index.css @@ -0,0 +1,28 @@ +div { + text-align: center; +} + +.wrapper { + max-width: 100%; +} + +@media (max-width: 992px) { + .text { + font-size: 16px; + } +} + +@media (max-width: 768px) { + .text { + font-size: 14px; + } +} + +@media (max-width: 476px) { + .text { + font-size: 12px; + } + .content-box { + padding: 0 10px; + } +} diff --git a/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/index.js b/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/index.js new file mode 100644 index 0000000000..641617e2ae --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/src/pages/NewYear/index.js @@ -0,0 +1,53 @@ +import * as React from "react" +import { graphql } from "gatsby"; +import {Trans, useTranslation} from 'gatsby-plugin-react-i18next'; +import logo from "./images/santa.svg" +import '../../styles/base.css'; +import "./index.css"; + +const IndexPage = () => { + + const {t, i18n: { language }} = useTranslation("NewYear"); + + const origin = "https://www.onlyoffice.com"; + const route = "advent-calendar.aspx" + + const LinkHref =`${origin}/${language === "en" ? route : `${language}/${route}`}`; + + return ( +
+
+ +
+

+ {t("Title")} +

+

+ Get new gifts and discountseach day - up to 99% off! +

+ +
+ +
+
+ ) + +} + +export default IndexPage + + +export const query = graphql` + query ($language: String!) { + locales: allLocale(filter: {language: {eq: $language}}) { + edges { + node { + ns + data + language + } + } + } + } +`; \ No newline at end of file diff --git a/web/ASC.Web.Campaigns/bar-templates/src/pages/index.js b/web/ASC.Web.Campaigns/bar-templates/src/pages/index.js new file mode 100644 index 0000000000..e799767bd7 --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/src/pages/index.js @@ -0,0 +1,6 @@ + +import * as React from "react" + +export default function Component () { + return ""; +} \ No newline at end of file diff --git a/web/ASC.Web.Campaigns/bar-templates/src/styles/base.css b/web/ASC.Web.Campaigns/bar-templates/src/styles/base.css new file mode 100644 index 0000000000..52f9e8bc0f --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/src/styles/base.css @@ -0,0 +1,5 @@ +p, +body { + margin: 0px; + padding: 0px; +} diff --git a/web/ASC.Web.Campaigns/bar-templates/src/templates/using-dsg.js b/web/ASC.Web.Campaigns/bar-templates/src/templates/using-dsg.js new file mode 100644 index 0000000000..b786de46ac --- /dev/null +++ b/web/ASC.Web.Campaigns/bar-templates/src/templates/using-dsg.js @@ -0,0 +1,20 @@ +import * as React from "react" +import { Link } from "gatsby" + + +const UsingDSG = () => ( +
+

Hello from a DSG Page

+

This page is not created until requested by a user.

+

+ To learn more, head over to our{" "} + + documentation about Deferred Static Generation + + . +

+ Go back to the homepage +
+) + +export default UsingDSG