Commit 40e3db9b by Jason Zhou

v1.1.0

parent 86203129
node_modules/
packages/backups/*
yarn-error.log
.DS_Store
\ No newline at end of file
!.gitkeep
\ No newline at end of file
......@@ -16,9 +16,7 @@ $ npm i -g git+https://cd.i.strikingly.com/jason.zhou/wildcat.git
```
wildcat run
```
This command will backup your current config and code files and do the upgrade.
> NOTE: Make sure your current config is the old version. It will not do the judement.
The command that does the trick.
![wildcat run](assets/run-example.png)
1. restore
```
......
......@@ -6,11 +6,11 @@ const { spawn } = require('child_process')
const _ = require('lodash')
const {
updateConfigFiles,
updateLegacyCodes,
upgradePackages,
preserveOldFiles,
restoreOldFiles
updateConfigs,
updateCodes,
updatePackages,
restoreConfigs,
restoreLegacyCodes
} = require('../packages/actions')
const BANNER = `
......@@ -31,7 +31,7 @@ const BANNER = `
| | | | | | | | | | | | | | |
`
const VERSION = '0.1.0'
const VERSION = '1.1.0'
const run = async () => {
console.info(BANNER)
......@@ -56,16 +56,24 @@ const run = async () => {
// add extra \n for good looking
console.log('\n')
log.title('📥 Preserve current configs')
preserveOldFiles()
log.title('📝 Update config files')
updateConfigFiles(mode)
updateConfigs(mode)
log.title('💯 Update legacy codes')
updateLegacyCodes()
log.title('🐣 Upgrade pacakages')
upgradePackages()
updateCodes()
const { willUpdatePackages } = await inquirer.prompt([
{
name: 'will-update-packages',
type: 'confirm',
default: true,
message: 'Would you like update packages? It is OK to skip if already updated.'
}
])
if (willUpdatePackages) {
log.title('🐣 Update pacakages')
updatePackages()
}
log.title('🐥 Everything set! Run yarn dev')
log.title('🐥 Everything set! Run yarn dev now')
// since shelljs.exec doesn't work with inqurier.js
// use spawn instead
spawn('yarn', ['dev'], {
......@@ -82,10 +90,11 @@ program
program
.command('restore')
.description(
'Restore the previous configs, make sure you have execed wildcat run command or it may go wrong.'
)
.action(restoreOldFiles)
.description('Restore the previous configs and codes.')
.action(() => {
restoreConfigs()
restoreLegacyCodes()
})
program.parse(process.argv)
......
{
"name": "wildcat",
"version": "1.0.0",
"description": "a cli tool for accelerating webpack dev server of Bobcat.",
"version": "1.1.0",
"description": "A cli tool for accelerating webpack dev server of Bobcat.",
"main": "index.js",
"bin": {
"wildcat": "./bin/index.js"
......
......@@ -7,62 +7,57 @@ const handlebars = require('handlebars')
const { log } = require('./utils/log')
const { TEMPLATES, PACKAGES, LEGACY_CODES, BACKUP_FILES } = require('./configs')
const { TEMPLATES, PACKAGES, LEGACY_CODES } = require('./configs')
handlebars.registerHelper('if_eq', function(a, b, opts) {
return a === b ? opts.fn(this) : opts.inverse(this)
})
const preserveOldFiles = () => {
BACKUP_FILES.forEach(file => {
log.item(`Preserving ${file} ...`)
const basename = path.basename(file)
fs.copyFileSync(file, `${__dirname}/backups/${basename}`)
})
}
const restoreOldFiles = () => {
log.title('📤 Restore previous configs')
log.title(
`⚠️ Make sure you have execed ${chalk.bgGreen.black(
'wildcat run'
)}, or it may go wrong`
)
BACKUP_FILES.forEach(file => {
const restoreLegacyCodes = () => {
log.title('📤 Restore previous codes')
LEGACY_CODES.forEach(file => {
log.item(`Restoring ${file} ...`)
const basename = path.basename(file)
fs.copyFileSync(`${__dirname}/backups/${basename}`, file)
fs.copyFileSync(`${__dirname}/codes/old/${basename}`, file)
})
log.title(
`⚠️ Run ${chalk.bgGreen.black(
'npm update'
)} yourself to reset node_mouduls`
)} yourself to reset node_modules`
)
}
const updateConfigFiles = (mode = 'chill') => {
TEMPLATES.forEach(filename => {
log.item(`Updating ${filename} ...`)
const updateConfigs = (mode = 'chill') => {
TEMPLATES.forEach(file => {
log.item(`Updating ${file} ...`)
const content = fs.readFileSync(
`${__dirname}/templates/${filename}.template`,
`${__dirname}/templates/${file}.template`,
'utf8'
)
const template = handlebars.compile(content)
const output = template({ mode })
fs.writeFileSync(filename, output, 'utf8')
fs.writeFileSync(file, output, 'utf8')
})
}
const updateLegacyCodes = () => {
LEGACY_CODES.forEach(({ name, update }) => {
log.item(`Updating ${name} ...`)
const content = fs.readFileSync(name, 'utf8')
const output = update(content)
fs.writeFileSync(name, output, 'utf8')
const restoreConfigs = () => {
log.title('📤 Restore previous codes')
TEMPLATES.forEach(file => {
log.item(`Restoring ${file} ...`)
const basename = path.basename(file)
fs.copyFileSync(`${__dirname}/templates/${basename}`, file)
})
}
const updateCodes = () => {
LEGACY_CODES.forEach(file => {
const basename = path.basename(file)
log.item(`Updating ${basename} ...`)
fs.copyFileSync(`${__dirname}/codes/new/${basename}`, file)
})
}
const upgradePackages = () => {
const updatePackages = () => {
const command =
'yarn add -D ' +
PACKAGES.map(({ name, version }) => {
......@@ -74,9 +69,9 @@ const upgradePackages = () => {
}
module.exports = {
preserveOldFiles,
restoreOldFiles,
updateConfigFiles,
updateLegacyCodes,
upgradePackages
restoreLegacyCodes,
updateConfigs,
updateCodes,
updatePackages,
restoreConfigs
}
[
"package.json",
"yarn.lock",
"config/fonts.json",
"Procfile",
"fe/js/App.es6",
"fe/js/blog.client.es6",
"fe/js/BlogEditor.es6",
"fe/js/components/HtmlComponent.es6",
"fe/js/components/page_settings_dialog/NewDomainsTab.es6",
"fe/js/EcommerceManager.es6",
"fe/js/editor.es6",
"fe/js/Landing.es6",
"fe/js/MainDashboard.es6",
"fe/js/page.client.es6",
"fe/js/PortfolioManager.es6",
"fe/js/stores/font_store.es6",
"fe/js/utils/helpers/EcommerceHelper.es6",
"fe/js/v3_bridge/page_analytics_engine.es6",
"fe/js/v4_bridge/Bridge.es6",
"fe/lib/webpack/entries-generation-webpack-plugin.js",
"fe/manifests/verticals/app.js",
"fe/manifests/verticals/bright.js",
"fe/manifests/verticals/fresh.js",
"fe/manifests/verticals/glow.js",
"fe/manifests/verticals/ion.js",
"fe/manifests/verticals/minimal.js",
"fe/manifests/verticals/onyx_new.js",
"fe/manifests/verticals/persona.js",
"fe/manifests/verticals/personal.js",
"fe/manifests/verticals/perspective.js",
"fe/manifests/verticals/pitch_new.js",
"fe/manifests/verticals/profile.js",
"fe/manifests/verticals/s5-theme.js",
"fe/manifests/verticals/sleek.js",
"fe/manifests/verticals/spectre.js",
"fe/manifests/verticals/zine.js",
"fe/nextgen/app.es6",
"fe/scripts/fonts/generateFontsJson.js"
]
import init from './init'
/* eslint-disable import/first */
init()
import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import 'js/reactInit.es6'
import Immutable from 'immutable'
import { createStore, applyMiddleware, compose } from 'redux'
import { combineReducers } from 'redux-immutable'
import { Provider } from 'react-redux'
import {
Router,
Route,
IndexRedirect,
IndexRoute,
browserHistory,
} from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import thunkMiddleware from 'redux-thunk'
import { createLogger } from 'redux-logger'
import { Iterable } from 'immutable'
import { AppContainer } from 'react-hot-loader'
import { ErrorBoundary } from 'js/components/ErrorBoundary'
import * as i18nHelper from 'js/utils/helpers/i18nHelper'
import 'js/vendor/jquery/browser'
import ComponentKitContext from 'js/utils/ComponentKitContext'
import reducers from 'nextgen/app/reducers'
import BlogManager from 'nextgen/blog/manager/Manager'
import BlogToWechatPreview from 'nextgen/blog/BlogToWechatPreview'
import SelectTemplate from 'nextgen/app/scenes/SelectTemplate'
import LiveChat from 'nextgen/app/scenes/LiveChat'
import Analytics from 'nextgen/app/scenes/Analytics'
import Preview from 'nextgen/app/scenes/Preview'
import ResellerDashboard from 'nextgen/app/scenes/ResellerDashboard'
import Domains from 'nextgen/app/scenes/Domains'
import Domain from 'nextgen/app/scenes/Domain'
import DomainPurchase from 'nextgen/app/scenes/DomainPurchase'
import DonationManager from 'nextgen/app/scenes/donation/DonationManager'
import ClientTab from 'nextgen/app/scenes/resellerDashboard/ClientTab'
import BillingTab from 'nextgen/app/scenes/resellerDashboard/BillingTab'
import AddCreditTab from 'nextgen/app/scenes/resellerDashboard/AddCreditTab'
import PartnerTab from 'nextgen/app/scenes/resellerDashboard/PartnerTab'
import SalesDashboard from 'nextgen/app/scenes/SalesDashboard'
import ResellerTab from 'nextgen/app/scenes/salesDashboard/ResellerTab'
import StatsTab from 'nextgen/app/scenes/salesDashboard/StatsTab'
import Audience from 'nextgen/app/scenes/audience'
import Miniprogram from 'nextgen/dashboard/miniprogram'
import ComboDashboard from 'nextgen/dashboard/Combo'
import MiniprogramDashboard from 'nextgen/dashboard/miniprogram/components/dashboard'
import MiniprogramSelectTemplate from 'nextgen/dashboard/miniprogram/components/selectTemplate'
/* eslint-enable import/first */
const loggerMiddleware = createLogger({
collapsed: true,
predicate: (getState, action) => process.env.NODE_ENV !== 'production',
stateTransformer: state => {
if (Iterable.isIterable(state)) {
return state.toJS()
}
return state
},
})
const middleware = [thunkMiddleware, loggerMiddleware]
// Add the reducer to your store on the `routing` key
const composeEnhancers =
(localStorage &&
localStorage.getItem('__strk_developer__') &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose
const store = createStore(
reducers,
composeEnhancers(applyMiddleware(...middleware)),
)
// Create an enhanced history that syncs navigation events with the store
const history = syncHistoryWithStore(browserHistory, store, {
selectLocationState: state => state.get('router').toJS(),
})
class RouterComponent extends React.Component {
static childContextTypes() {
PropTypes.object
}
static getChildContext() {
return { location: this.props.location }
}
render() {
return (
<Provider store={store}>
{/* Tell the Router to use our enhanced history */}
<Router history={history}>
<Route path="/s/sites/:siteId/blog/manage" component={BlogManager} />
<Route
path="/s/blog_posts/:blogPostId/wechat_preview"
component={BlogToWechatPreview}
/>
<Route path="/s/select_template" component={SelectTemplate} />
<Route path="/s/analytics/:siteId" component={Analytics} />
<Route path="/s/sites/:siteId/preview" component={Preview} />
<Route
path="/s/sites/:siteId/donation/manage"
component={DonationManager}
/>
<Route path="/s/reseller" component={ResellerDashboard}>
<IndexRedirect to="clients" />
<Route path="clients" component={ClientTab} />
<Route path="billing" component={BillingTab} />
<Route path="addcredit" component={AddCreditTab} />
<Route path="partners" component={PartnerTab} />
<Route path="select_template" component={SelectTemplate} />
<Route
path="select_mini_program_template"
component={props => (
<MiniprogramSelectTemplate
{...props}
skipCategorySelector={true}
/>
)}
/>
</Route>
<Route path="/s/sales" component={SalesDashboard}>
<IndexRedirect to="resellers" />
<Route path="resellers" component={ResellerTab} />
<Route path="stats" component={StatsTab} />
</Route>
<Route path="/s/v2_domains" component={Domains} />
<Route path="/s/v2_domains/purchase" component={DomainPurchase} />
<Route path="/s/v2_domains/:domainId" component={Domain} />
<Route path="/s/live_chat" component={LiveChat} />
<Route path="/s/audience/:id" component={Audience} />
<Route path="/s/miniprogram" component={Miniprogram}>
<IndexRoute component={MiniprogramDashboard} />
<Route
path="select_template"
component={MiniprogramSelectTemplate}
/>
</Route>
<Route path="/s/reseller/zhubajie/instances" component={ComboDashboard} />
</Router>
</Provider>
)
}
}
const p1 = import(`locales/${i18nHelper.getTranslationFile()}`)
Promise.all([p1])
.then(([poFile]) => {
const I18n = require('js/utils/i18n')
const cloudinary = require('cloudinary')
const ConfStore = require('js/stores/conf_store')
I18n.init(poFile)
cloudinary.config('cloud_name', ConfStore.getCloudinaryCloudName())
const RouterComponentWithContext = ComponentKitContext(RouterComponent)
ReactDOM.render(
<ErrorBoundary>
<AppContainer>
<RouterComponentWithContext />
</AppContainer>
</ErrorBoundary>,
document.getElementById('container'),
)
})
.catch(e => {
console.error(e, e.stack)
})
if (module.hot) {
module.hot.accept(err => {
if (err) {
console.error(err)
}
})
}
require('./init')
import createClass from 'create-react-class'
import Morearty from 'morearty'
import React from 'react'
import ReactDOM from 'react-dom'
import $ from 'jquery'
import logger from 'js/utils/logger'
import 'js/vendor/jquery/browser'
import 'js/vendor/jquery/purl'
import 'js/vendor/jquery/tooltip'
import 'js/vendor/jquery/easing'
import 'js/reactInit.es6'
import 'js/v3_bridge/template_helper/modules/core'
import 'js/v3_bridge/template_helper/modules/decorator'
import 'js/v3_bridge/template_helper/modules/event'
import 'js/v3_bridge/template_helper/modules/fixer'
import 'js/v3_bridge/template_helper/modules/util'
import 'js/v3_bridge/template_helper/main'
import TimerMixin from 'react-timer-mixin'
import EditorActions from 'js/actions/editor_actions'
import BlogPostEditorStore from 'js/stores/BlogPostEditorStore'
import CollaboratorsStore from 'js/stores/collaborators_store'
import 'js/stores/BlogPostMetaStore'
import 'js/stores/BlogPostManagerStore'
import 'js/componentsForBlog'
import $B from 'js/v3_bridge/b'
import * as i18nHelper from 'js/utils/helpers/i18nHelper'
import { wrapComponentWithReduxStore } from 'js/utils/reduxUtil'
import * as editorStoreCreator from 'js/reducers/editorStoreCreator'
import ComponentKitContext from 'js/utils/ComponentKitContext'
import connectReduxStoreToBinding from 'js/utils/helpers/connectReduxStoreToBinding'
import { ErrorBoundary } from 'js/components/ErrorBoundary'
if (typeof window.timerStart === 'undefined') {
window.timerStart = new Date().getTime()
}
window.timerCheck = function(label) {
const time = new Date().getTime() - window.timerStart
const msg = `${label} in ${time}ms`
logger.log(msg)
return msg
}
window.edit_page = require('js/v3_bridge/edit_page_bridge')
window.edit_page.isBlog = true
// These two are direct reads so promises can be fired quicker
// const locale = $S.globalConf.locale
const themeName = $S.blogPostData.pageMeta.theme.name_with_v4_fallback
const p1 = import(`locales/${i18nHelper.getTranslationFile()}`)
const p2 = import(`manifests/themes/${themeName}.js`)
Promise.all([p1, p2])
.then(([poFile, manifest]) => {
const I18n = require('js/utils/i18n')
I18n.init(poFile)
const ThemeStore = require('js/stores/theme_store')
ThemeStore.buildAndRegister(manifest)
const BootstrapWrapper = createClass({
mixins: [Morearty.Mixin, TimerMixin],
componentWillMount() {
const cloudinary = require('cloudinary')
const ConfStore = require('js/stores/conf_store')
cloudinary.config('cloud_name', ConfStore.getCloudinaryCloudName())
},
componentDidMount() {
if (CollaboratorsStore.getLocked()) {
return EditorActions.openDialog('collaborationWarning')
}
if ($.url().param('open') === 'welcome') {
EditorActions.openDialog('welcomeDialog')
}
// setup tooltips
$('.strikingly-menu-container [rel="tooltip-right"]').tooltip({
placement: 'right',
container: '#strikingly-tooltip-container',
})
// expend dialog
try {
if (
window !== window.parent &&
window.parent.edit_page &&
window.parent.edit_page.blogDialog
) {
window.parent.edit_page.blogDialog.expand()
}
} catch (e) {}
this.setTimeout(() => {
$B.TH.Fixer.overrideContentLang()
$B.TH.Fixer.fixNbspForEditor()
// iframes will use parent's Event first
// App store should be loaded after main editor to properly subscribe events from parent
// If load app store first, then Event is wrong, subscription will fail.
$B.loadIframe($('#app-store-iframe'))
}, 0)
},
render() {
const BlogPostEditor = require('js/components/blog/BlogPostEditor')
return <BlogPostEditor />
},
})
const Ctx = BlogPostEditorStore.init(window.$S)
const reduxStore = editorStoreCreator.getStore()
const BlogEditorBootstrap = wrapComponentWithReduxStore(
Ctx.bootstrap(BootstrapWrapper),
reduxStore,
)
connectReduxStoreToBinding(reduxStore, Ctx.getBinding())
const BlogEditorWithContext = ComponentKitContext(BlogEditorBootstrap)
$(() => {
ReactDOM.render(
<ErrorBoundary>
<BlogEditorWithContext />
</ErrorBoundary>,
document.getElementById('s-blog-editor-container'),
)
window.timerCheck('React has finished rendering')
})
})
.catch(e => console.error(e))
// Provide webpack modules to v3
// Note: es6 imports will break - Andy Feb 2016
require('./PageSaver')
require('../init')
const I18n = require('js/utils/i18n')
const i18nHelper = require('js/utils/helpers/i18nHelper')
import { AppContainer } from 'react-hot-loader'
// Note: Intially, the following chunk was loaded asynchronously with
// require.ensure, but it breaks on uat of sxl and thus is removed
// Andy Feb 2016
// used in dashboard to send data to angular
import EditPage from 'js/v3_bridge/edit_page_bridge'
import ComponentKitContext from 'js/utils/ComponentKitContext'
let Event = null
window.edit_page = EditPage
try {
if (parent.window.edit_page && parent.window.edit_page.Event) {
Event = parent.window.edit_page.Event
EditPage.Event = Event
} else {
Event = EditPage.Event
if (parent.window.edit_page) {
parent.window.edit_page.Event = Event
} else {
parent.window.edit_page = {
Event,
}
}
}
} catch (e) {
if (window.edit_page && window.edit_page.Event) {
Event = window.edit_page.Event
EditPage.Event = Event
} else {
Event = EditPage.Event
if (window.edit_page) {
window.edit_page.Event = Event
} else {
window.edit_page = {
Event,
}
}
}
}
const p1 = import(`locales/${i18nHelper.getTranslationFile()}`)
Promise.all([p1])
.then(([poFile]) => {
I18n.init(poFile)
const $ = require('jquery')
const React = require('react')
const ReactDOM = require('react-dom')
const SupportWidget = require('js/components/support_widget/SupportWidget')
const PurchaseBridge = require('../../nextgen/domain/PurchaseBridge')
const SupportWidgetWithComponentKit = ComponentKitContext(SupportWidget)
const PublishManager = require('nextgen/subApps/publishManager')
PublishManager.bindToGlobal()
$(() => {
const supportWidgetContainer = document.getElementById(
's-support-widget-container',
)
if (supportWidgetContainer) {
ReactDOM.render(
<AppContainer>
<SupportWidgetWithComponentKit />
</AppContainer>,
supportWidgetContainer,
)
}
PurchaseBridge({
Event,
})
})
})
.catch(e => console.error(e))
if (module.hot) {
module.hot.accept(err => {
if (err) {
console.error(err)
}
})
}
require('./init')
import React from 'react'
import $ from 'jquery'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import { ErrorBoundary } from 'js/components/ErrorBoundary'
import * as i18nHelper from 'js/utils/helpers/i18nHelper'
import PhotoPage from './components/PhotoPage'
require('./utils/extensions/native')
const p1 = import(`locales/${i18nHelper.getTranslationFile(
'zh_CN',
)}`)
Promise.all([p1]).then(([poFile]) => {
const I18n = require('js/utils/i18n')
I18n.init(poFile)
$(() => {
ReactDOM.render(
<ErrorBoundary>
<AppContainer>
<PhotoPage setType="background" />
</AppContainer>
</ErrorBoundary>,
document.getElementById('photo-page'),
)
})
})
if (module.hot) {
module.hot.accept(err => {
if (err) {
console.error(err)
}
})
}
require('./init')
import React from 'react'
import $ from 'jquery'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import { ErrorBoundary } from 'js/components/ErrorBoundary'
import * as i18nHelper from 'js/utils/helpers/i18nHelper'
import { Provider } from 'react-redux'
import ComponentKitContext from 'js/utils/ComponentKitContext'
import { createStore, applyMiddleware, compose } from 'redux'
import thunkMiddleware from 'redux-thunk'
import {
Router,
Route,
IndexRedirect,
IndexRoute,
hashHistory,
} from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import reducers from 'nextgen/app/reducers'
import MiniprogramDashboard from 'nextgen/dashboard/miniprogram/components/dashboard'
import Domains from 'nextgen/app/scenes/Domains'
import Domain from 'nextgen/app/scenes/Domain'
import DomainPurchase from 'nextgen/app/scenes/DomainPurchase'
const middleware = [thunkMiddleware]
const composeEnhancers =
(localStorage &&
localStorage.getItem('__strk_developer__') &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ||
compose
const store = createStore(
reducers,
composeEnhancers(applyMiddleware(...middleware)),
)
// Create an enhanced history that syncs navigation events with the store
const history = syncHistoryWithStore(hashHistory, store, {
selectLocationState: state => state.get('router').toJS(),
})
function EmptyComponent() {
return <div />
}
function recordLatestViewedHash(nextState, replace) {
const highlightClass = {
miniprogram: '.my-miniprogram',
v2_domains: '.my-domains',
}[location.hash && location.hash.split('/')[1]]
$('.subnav-container .s-link')
.removeClass('current')
.filter(highlightClass)
.addClass('current')
if (localStorage && ['#/miniprogram'].indexOf(location.hash) !== -1) {
localStorage.setItem('dashboard_latest_viewed_hash', location.hash)
}
}
class DashboardRouter extends React.Component {
static childContextTypes() {
PropTypes.object
}
static getChildContext() {
return { location: this.props.location }
}
componentWillMount() {
$('.nav-menu .s-link')
.removeClass('current')
.filter('.my-sites')
.addClass('current')
}
render() {
return (
<Provider store={store}>
<Router history={history}>
<Route path="/" component={EmptyComponent} />
<Route
path="/miniprogram"
component={MiniprogramDashboard}
onEnter={recordLatestViewedHash}
/>
<Route
path="/v2_domains"
component={Domains}
onEnter={recordLatestViewedHash}
/>
<Route
path="/v2_domains/purchase"
component={DomainPurchase}
onEnter={recordLatestViewedHash}
/>
<Route
path="/v2_domains/:domainId"
component={Domain}
onEnter={recordLatestViewedHash}
/>
</Router>
</Provider>
)
}
}
const p1 = import(`locales/${i18nHelper.getTranslationFile()}`)
Promise.all([p1])
.then(([poFile]) => {
const I18n = require('js/utils/i18n')
I18n.init(poFile)
const DashboardRouterWithContext = ComponentKitContext(DashboardRouter)
$(() => {
ReactDOM.render(
<ErrorBoundary>
<AppContainer>
<Provider store={store}>
<DashboardRouterWithContext />
</Provider>
</AppContainer>
</ErrorBoundary>,
document.getElementById('mainDashboard'),
)
})
})
.catch(e => {
console.error(e, e.stack)
})
if (module.hot) {
module.hot.accept(err => {
if (err) {
console.error(err)
}
})
}
import './init'
import _ from 'lodash'
import $ from 'jquery'
import 'js/vendor/jquery/easing'
import React from 'react'
import ReactDOM from 'react-dom'
import { Iterable } from 'immutable'
import { createStore, applyMiddleware } from 'redux'
import { createLogger } from 'redux-logger'
import { Provider } from 'react-redux'
import thunkMiddleware from 'redux-thunk'
import ManagerReducer from 'nextgen/ecommerce/manager/reducers/ManagerReducer'
import connectReduxStoreToBinding from 'js/utils/helpers/connectReduxStoreToBinding'
import PortfolioManagerStore from 'js/stores/PortfolioManagerStore'
import FeatureStore from 'js/stores/FeatureStore'
import ConfStore from 'js/stores/conf_store'
import * as UrlConstants from 'js/constants/url_constants'
import ProductPanel from 'nextgen/portfolio/manager/components/productPanel'
import CategoryManagerWrapper from 'nextgen/ecommerce/manager/components/settings/categoryManagerWrapper'
import gonReader from 'js/utils/gonReader'
import { AppContainer } from 'react-hot-loader'
import { ErrorBoundary } from 'js/components/ErrorBoundary'
import { UPDATE_SETTINGS_SUCCESS } from 'nextgen/ecommerce/manager/actions/entities/settings'
import PortfolioManagerBridge from 'js/v4_bridge/PortfolioManagerBridge'
import * as i18nHelper from 'js/utils/helpers/i18nHelper'
import ComponentKitContext from 'js/utils/ComponentKitContext'
const p1 = import(`locales/${i18nHelper.getTranslationFile()}`)
const loggerMiddleware = createLogger({
collapsed: true,
predicate: (/* getState, action */) => process.env.NODE_ENV !== 'production',
stateTransformer: state => {
if (Iterable.isIterable(state)) {
return state.toJS()
}
return state
},
})
const store = createStore(
ManagerReducer,
applyMiddleware(
thunkMiddleware, // lets us dispatch() functions
loggerMiddleware, // neat middleware that logs actions
),
)
const baseProps = {
siteId: gonReader('id'),
siteState: gonReader('state'),
publicUrl: gonReader('public_url'),
meta: gonReader('pageOwner.portfolio'),
isStandAlone: window.parent === window,
isPro: ['pro', 'namecheap', 'sxlbiz'].includes(
gonReader('pageOwner.membership'),
),
isVip: gonReader('pageOwner.membership') === 'vip',
isSxl: Boolean(gonReader('globalConf.isSxl')),
isAdmin: Boolean(gonReader('pageOwner.isAdmin')),
isSupport: Boolean(gonReader('pageOwner.isSupport')),
}
const productProps = {
...baseProps,
productLimit:
gonReader('pageOwner.portfolio').productLimit ||
(gonReader('globalConf.isSxl') ? 6 : 1),
upgradeUrl: UrlConstants.PRICING.GOTO_AND_RETURN(
gonReader('id'),
'portfolio',
),
productPageRollout: gonReader('globalConf.rollout.product_page'),
productDetailRollout: gonReader('globalConf.rollout.product_detail'),
siteMemberShip: gonReader('globalConf.rollout.siteMemberShip'),
noCategoryLimit: gonReader('globalConf.rollout.no_category_limit'),
}
class ProductsContainer extends React.Component {
componentWillMount() {
PortfolioManagerBridge.subPublishUrlChange((topic, data) => {
baseProps.publicUrl = data.url
this.forceUpdate()
})
PortfolioManagerBridge.subSiteStateChange((topic, data) => {
baseProps.siteState = data.state
this.forceUpdate()
})
}
render() {
return (
<Provider store={store}>
<ProductPanel
{...productProps}
canUseCategory={FeatureStore.canUse('portfolio_category')}
canSeeCategory={FeatureStore.canSee('portfolio_category')}
/>
</Provider>
)
}
}
function CategoryContainer(/* props */) {
return (
<Provider store={store}>
<CategoryManagerWrapper
{...productProps}
isPortfolio={true}
canUseCategory={FeatureStore.canUse('portfolio_category')}
canSeeCategory={FeatureStore.canSee('portfolio_category')}
/>
</Provider>
)
}
const CategoryContainerWithComponentKit = ComponentKitContext(CategoryContainer)
const siteIdString = gonReader('id').toString()
PortfolioManagerBridge.subSettingsChange((topic, data) => {
let settings =
store
.getState()
.getIn(['entities', 'settings', 'data', siteIdString, 'settings']) || {}
if (settings.toJS) {
settings = settings.toJS()
}
store.dispatch({
type: UPDATE_SETTINGS_SUCCESS,
payload: {
settings: Object.assign(settings, data.settings),
},
meta: {
siteId: siteIdString,
},
})
})
const getState = () => ({
product: store
.getState()
.getIn(['entities', 'product', 'data', siteIdString]),
category: store.getState().getIn(['entities', 'category', 'data']),
settings: store
.getState()
.getIn(['entities', 'settings', 'data', siteIdString, 'settings']),
})
const prevState = getState()
store.subscribe(() => {
const newState = getState()
if (newState.product !== prevState.product) {
prevState.product = newState.product
PortfolioManagerBridge.pubProductsChange(
_.flatten(_.toArray(newState.product.toJS())),
)
}
if (newState.settings !== prevState.settings) {
prevState.settings = newState.settings
PortfolioManagerBridge.pubSettingsChange(newState.settings.toJS())
}
if (newState.category !== prevState.category) {
prevState.category = newState.category
PortfolioManagerBridge.pubCategoriesChange(
_.flatten(_.toArray(newState.category.toJS())),
)
}
})
Promise.all([p1])
.then(([poFile]) => {
const I18n = require('js/utils/i18n')
I18n.init(poFile)
$(() => {
const cloudinary = require('cloudinary')
cloudinary.config('cloud_name', ConfStore.getCloudinaryCloudName())
if (window.parent === window) {
let ImageAssetDialog = require('js/v4_bridge/react_app_bridge/ImageAssetDialogApp')
const EditorStore = require('js/stores/editor_store')
const ctx = EditorStore.init()
connectReduxStoreToBinding(store, ctx.getBinding())
ImageAssetDialog = ctx.bootstrap(ImageAssetDialog())
ReactDOM.render(
<Provider store={store}>
<ErrorBoundary>
<AppContainer>
<ImageAssetDialog />
</AppContainer>
</ErrorBoundary>
</Provider>,
document.getElementById('container'),
)
}
PortfolioManagerStore.init()
FeatureStore.hydrate($S.features)
const productsContext = PortfolioManagerStore.getProductsContext()
const WrapperedProductsContainer = productsContext.bootstrap(
ComponentKitContext(ProductsContainer),
)
ReactDOM.render(
<AppContainer>
<ErrorBoundary>
<WrapperedProductsContainer />
</ErrorBoundary>
</AppContainer>,
document.getElementById('items-container'),
)
ReactDOM.render(
<ErrorBoundary>
<CategoryContainerWithComponentKit />
</ErrorBoundary>,
document.getElementById('category-manager'),
)
})
})
.catch(e => console.error(e))
if (module.hot) {
module.hot.accept(err => {
if (err) {
console.error(err)
}
})
}
# This is an example forman configure file for bobcat
# You can adjust the procs based on your personal development need
#
# 1. Install forego `brew install forego` https://github.com/ddollar/forego
# 2. Copy this file to Procfile
# 3. Configure the tasks
# 3. Start all procs by `forego start`
#
# NOTICE: 1. All the logs are under /log, you can simply check log by `tail -f log/sidekiq.log`.
# 2. The error messages should better be piped to stdout, that's what `2>&1 >file` for.
# 3. forego supports multiple processes invoke `forego start -c all=1, worker=2` this will start 2 worker process
# WEB server
# default way to start server
# server log is piped to stdout by default
# Server with hotload
web: env DISABLE_UNICORN_KILLER=1 REACT_HOT=1 PRODUCT_NAME=sxl RACK_ENV=none RAILS_ENV=development bundle exec unicorn -p 3000 -c unicorn_dev.rb
# Server with no hotload
# web: env DISABLE_UNICORN_KILLER=1 PRODUCT_NAME= RACK_ENV=none RAILS_ENV=development bundle exec unicorn -p 3000 -c unicorn_dev.rb
# WORKER, you can adjust the queues based on your need
worker: env PRODUCT_NAME= bundle exec sidekiq -C config/sidekiq.yml 2>&1 >log/worker.log
# THEME, watch mode
# page_data: strk_build_pages_data
# OpenResty
nginx: env CUSTOM_HOST= openresty -p devs/nginx -c nginx.conf
# If you need to bind custom host:
# nginx: env CUSTOM_HOST=192.168.75.128 openresty -p devs/nginx -c nginx.conf
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "app",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./app/section_selections/navbar/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./app/section_selections/info/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./app/section_selections/columns/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./base/section_selections/ecommerce/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./base/section_selections/title/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./base/section_selections/contact_form/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./base/section_selections/cta/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./base/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./base/section_selections/rows/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./base/section_selections/icons/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./base/section_selections/text/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./base/section_selections/hero/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./base/section_selections/signup_form/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./base/section_selections/media/content.json"),
} }
};
import 'js/loadBugsnag'
import './init'
import React from 'react'
import ReactDOM from 'react-dom'
import $ from 'jquery'
import logger from 'js/utils/logger'
import * as i18nHelper from 'js/utils/helpers/i18nHelper'
import bootstrapBlog from 'js/prerender/bootstrapBlog'
import ComponentKitContext from 'js/utils/ComponentKitContext'
if (typeof window.timerStart === 'undefined') {
window.timerStart = new Date().getTime()
}
window.timerCheck = function(label) {
const time = new Date().getTime() - window.timerStart
const msg = `${label} in ${time}ms`
logger.log(msg)
return msg
}
window.edit_page = require('js/v3_bridge/edit_page_bridge')
window.edit_page.isBlog = true
window.edit_page.isShowPage = true
// These two are direct reads so promises can be fired quicker
// const locale = $S.globalConf.locale
const themeName = $S.blogPostData.pageMeta.theme.name_with_v4_fallback
const forcedLocale = $S.blogPostData.pageMeta.forcedLocale
const p1 = import(`locales/${i18nHelper.getTranslationFile(
forcedLocale,
)}`)
const p2 = import(`manifests/themes/${themeName}.js`)
Promise.all([p1, p2])
.then(([poFile, manifest]) => {
const BlogBootstrap = ComponentKitContext(
bootstrapBlog({
poFile,
manifest,
}),
)
$(() => {
ReactDOM.render(
<BlogBootstrap />,
document.getElementById('s-blog-container'),
)
window.timerCheck('React has finished rendering')
})
})
.catch(e => console.error(e))
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "bright",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./bright/section_selections/navbar/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./bright/section_selections/ecommerce/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./bright/section_selections/title/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./bright/section_selections/cta/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./bright/section_selections/info/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./bright/section_selections/hero/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./base/section_selections/contact_form/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./base/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./base/section_selections/rows/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./base/section_selections/icons/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./base/section_selections/text/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./base/section_selections/columns/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./base/section_selections/signup_form/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./base/section_selections/media/content.json"),
} }
};
require('./init')
import $ from 'jquery'
import React from 'react'
import ReactDOM from 'react-dom'
import cloudinary from 'cloudinary'
import logger from 'js/utils/logger'
import * as i18nHelper from 'js/utils/helpers/i18nHelper'
// import {AppContainer} from 'react-hot-loader'
import * as RHL from 'react-hot-loader'
import { wrapComponentWithReduxStore } from 'js/utils/reduxUtil'
import * as editorStoreCreator from 'js/reducers/editorStoreCreator'
import ComponentKitContext from 'js/utils/ComponentKitContext'
import wrapErrorBoundary from 'js/components/ErrorBoundary'
import 'js/reactInit.es6'
// These two are direct reads so promises can be fired quicker
const supportedVerticals = ['personal']
const themeName = $S.stores.pageMeta.theme.name
const AppContainer = wrapErrorBoundary(RHL.AppContainer)
// Load dynamic editor and theme style files on editor debug environment
if (__MODE__ === "'editor-debug'") {
require('v4/editor')
require(`themes/${themeName}/main_v4_editor`)
}
let verticalName = $S.stores.pageMeta.vertical
// only apply supported vertical
if (!supportedVerticals.includes(verticalName)) {
verticalName = themeName
}
require('./utils/extensions/native')
const p1 = import(`locales/${i18nHelper.getTranslationFile()}`)
const p2 = import(`manifests/themes/${themeName}.js`)
const p3 = import(`manifests/verticals/${verticalName}.js`)
Promise.all([p1, p2, p3])
.then(([poFile, manifest, vertical]) => {
const I18n = require('js/utils/i18n')
I18n.init(poFile)
const ConfStore = require('js/stores/conf_store')
cloudinary.config('cloud_name', ConfStore.getCloudinaryCloudName())
function injectVerticalData() {
const SectionSelectorStore = require('js/stores/section_selector_store')
// fill in dynamic default page data based on user or page meta (e.g email)
const FillInDynamicDefaultThemeData = require('js/utils/themes/FillInDynamicDefaultThemeData')
manifest = FillInDynamicDefaultThemeData(manifest)
for (const key in vertical.sectionSelections) {
const selector = vertical.sectionSelections[key]
_.merge(selector, manifest.sections[selector.content.template_name])
}
SectionSelectorStore.setSelectorData(vertical.sectionSelections)
}
if (__NATIVE_WEB__) {
// TODO: wrap it in another file
const NativeBridge = require('js/actions/NativeBridge')
window.NativeBridge = window.NativeBridge || {}
window.NativeBridge.setTarget = NativeBridge.setTarget
window.NativeBridge.sendMessageToWeb = NativeBridge.sendMessageToWeb
const EditorStore = require('./stores/editor_store')
const Ctx = EditorStore.init()
EditorStore.hydrate($S.stores)
require('./v3_bridge')()
require('js/utils/component_registration')
$(() => {
injectVerticalData()
const ThemeStore = require('js/stores/theme_store')
ThemeStore.buildAndRegister(manifest)
const EditorBootstrap = require('js/components/EditorBootstrap')
const Editor = require('js/components/editor')
const EditorWrapper = wrapComponentWithReduxStore(
EditorBootstrap.bootstrap(Ctx.bootstrap(Editor)),
editorStoreCreator.getStore(),
)
const EditorWithContext = ComponentKitContext(EditorWrapper)
ReactDOM.render(
<AppContainer>
<EditorWithContext />
</AppContainer>,
document.getElementById('s-editor-container'),
)
})
} else if (__IFRAME_EDITOR__) {
const ctx = window.parent._ctx.copy()
// iframe editor will use the same redux store as it's parent
const editorStore = window.parent._editor_store
require('./v3_bridge')()
require('js/utils/component_registration')
$(() => {
const ThemeStore = require('js/stores/theme_store')
ThemeStore.buildAndRegister(manifest)
const EditorBootstrap = require('js/components/EditorBootstrap')
const Site = require('js/components/MobileViewSite')
const SiteWrapper = wrapComponentWithReduxStore(
ctx.bootstrap(EditorBootstrap.bootstrap(Site)),
editorStore,
)
const EditorWithContext = ComponentKitContext(SiteWrapper)
ReactDOM.render(
<AppContainer>
<EditorWithContext />
</AppContainer>,
document.getElementById('s-editor-container'),
)
})
} else {
window.timerStart = window.timerStart || new Date().getTime()
window.timerCheck = label => {
const time = new Date().getTime() - timerStart
const msg = `#{label} in ${time}ms`
logger.log(msg)
return msg
}
const EditorStore = require('./stores/editor_store')
require('./v3_bridge')()
require('js/utils/component_registration')
$(() => {
injectVerticalData()
const ThemeStore = require('js/stores/theme_store')
ThemeStore.buildAndRegister(manifest)
const EditorBootstrap = require('js/components/EditorBootstrap')
const Editor = require('js/components/editor')
const Ctx = EditorStore.init()
EditorStore.hydrate($S.stores)
const EditorWrapper = wrapComponentWithReduxStore(
EditorBootstrap.bootstrap(Ctx.bootstrap(Editor)),
editorStoreCreator.getStore(),
)
window._ctx = EditorStore.getCtx()
// to iframe editor can use the same redux store as it's parent
window._editor_store = editorStoreCreator.getStore()
const PageMetaStore = require('./stores/page_meta_store')
const CurrentUserStore = require('./stores/current_user_store')
const EditorWithContext = ComponentKitContext(EditorWrapper)
ReactDOM.render(
<AppContainer>
<EditorWithContext />
</AppContainer>,
document.getElementById('s-editor-container'),
)
if (module.hot) {
module.hot.accept(['js/components/editor'], () => {
const Editor = require('js/components/editor')
const EditorWrapper = wrapComponentWithReduxStore(
EditorBootstrap.bootstrap(Ctx.bootstrap(Editor)),
editorStoreCreator.getStore(),
)
const EditorWithContext = ComponentKitContext(EditorWrapper)
ReactDOM.render(
<AppContainer>
<EditorWithContext />
</AppContainer>,
document.getElementById('s-editor-container'),
)
})
}
const isStrikinglyReseller =
CurrentUserStore.isResellerAgent() && !ConfStore.getIsSxl()
if (
!ConfStore.getInIosApp() &&
!ConfStore.getInWeChat() &&
(!PageMetaStore.isSiteOfResellerClient() ||
isStrikinglyReseller ||
ConfStore.getRollout('show_reseller_support_widget'))
) {
const SupportWidget = require('js/components/support_widget/SupportWidget')
ReactDOM.render(
<RHL.AppContainer>
<SupportWidget />
</RHL.AppContainer>,
document.getElementById('s-support-widget-container'),
)
}
})
}
})
.catch(error => {
// catch errors and call console.error so that they are reported by Bugsnag
console.error('You had an error: ', error.stack)
throw error
})
if (module.hot) {
module.hot.accept(err => {
if (err) {
console.error(err)
}
})
}
// like manifest webpack plugin, but fit multiple configs environment of webpack
// generate entries of each config, and collect them into a manifest json file
const path = require('path')
const fse = require('fs-extra')
module.exports = class EntriesGenerationWebpackPlugin {
constructor(opts) {
this.opts = Object.assign(
{
fileName: 'manifest.json',
appendMode: true,
transformExtensions: /^(gz|map)$/i,
},
opts
)
}
getFileType(str) {
str = str.replace(/\?.*/, '')
const split = str.split('.')
let ext = split.pop()
if (this.opts.transformExtensions.test(ext)) {
ext = `${split.pop()}.${ext}`
}
return ext
}
apply(compiler) {
compiler.plugin('compilation', compilation => {
compiler.plugin('after-emit', (compilation, compileCallback) => {
const publicPath =
this.opts.publicPath || compilation.options.output.publicPath
let files = compilation.chunks.reduce(
(files, chunk) =>
chunk.files.reduce((files, path) => {
let name
if (chunk.name) {
name = this.opts.setEntryName
? this.opts.setEntryName(chunk.name)
: chunk.name
name = `${name}.${this.getFileType(path)}`
} else {
name = path
}
return files.concat({
path,
chunk,
name,
isInitial: chunk.isInitial ? chunk.isInitial() : chunk.isOnlyInitial(),
isChunk: true,
isAsset: false,
isModuleAsset: false,
})
}, files),
[]
)
if (publicPath) {
files = files
.filter(file => file.path.indexOf('hot-update') === -1)
.map(file => {
file.path = publicPath + file.path
return file
})
}
const manifest = files.reduce((manifest, file) => {
manifest[file.name] = file.path
return manifest
}, {})
let json = JSON.stringify(manifest, null, 2)
const outputFolder = compilation.options.output.path
const outputFile = path.resolve(
compilation.options.output.path,
this.opts.fileName
)
const outputName = path.relative(outputFolder, outputFile)
compilation.assets[outputName] = {
source() {
return json
},
size() {
return json.length
},
}
if (this.opts.appendMode && fse.existsSync(outputFile)) {
const previousJson = JSON.parse(
fse.readFileSync(outputFile).toString()
)
json = JSON.stringify(Object.assign(previousJson, manifest), null, 2)
}
fse.outputFileSync(outputFile, json)
compileCallback()
})
})
}
}
// SPEC
// Owner: Dafeng
// Feature name: Font store
// * user can update fonts from choosing style
// NOTE:
// Specs here are all technical implementation. Will be ignored for the current QA.
import _ from 'lodash'
import Immutable from 'immutable'
import { EventEmitter } from 'events'
import EditorDispatcher from 'js/dispatcher/editor_dispatcher'
import EditorConstants from 'js/constants/editor_constants'
import BindingHelper from 'js/utils/helpers/binding_helper'
import weakmapMemoize from 'js/utils/weakmapMemoize'
const getDefaultFontName = require('js/utils/getDefaultFontName').default
let _bHelper
let _pDataHelper // need the binding to pageData to update fonts
const _updateFont = function(fontType, v) {
const name = `${fontType}Font`
_pDataHelper.setData(name, v)
_clearPreviewFont()
}
const _updateFontPreset = function(preset) {
_pDataHelper.setData('fontPreset', preset.id)
;['title', 'heading', 'body'].map(textType =>
_updateFont(textType, preset.fonts[textType]),
)
}
// No longer update fonts from style!
// _updateFontsFromStyle = (styles) ->
// _.map ['heading','body','title'], (font) =>
// _updateFont(font, styles[font + "Font"])
const _updatePreviewFont = (fontType, v) =>
_bHelper.setData(`preview.${fontType}Font`, v)
const _updatePreviewFontPreset = preset =>
['title', 'heading', 'body'].map(textType =>
_updatePreviewFont(textType, preset.fonts[textType]),
)
const _clearPreviewFont = function() {
const preview = _bHelper.binding.sub('preview')
const transaction = preview.atomically()
const object = preview.get().toJS()
for (const key in object) {
const v = object[key]
transaction.set(key, undefined)
}
transaction.commit()
}
const FontStore = _.assign({}, EventEmitter.prototype, {
// fontPreset is currently for Shangxianle, which designates font setting of
// title, heading, and body
// TODO - Andy, added 22 March 2016
// Improve the font determination logic:
// - first check if fontPreset is present, if so, use the preset setting
// - if no fontPreset, use setting for titleFont, bodyFont etc.
// Currently, fontPreset is just a collection of setting of the other three
// fonts, which means, if we modify the style setting of a preset, the pages
// that use this preset will NOT get style updates, unless they choose another
// preset and switch back.
_allFonts: null,
_initialFonts: null,
_fontsSelectedOnPageLoad: [],
getDefault(pageData) {
return {
preview: {
titleFont: '',
bodyFont: '',
headingFont: '',
fontPreset: '',
},
data: {
// use for notifying rich text component
titleFont: pageData.titleFont,
bodyFont: pageData.bodyFont,
headingFont: pageData.headingFont,
fontPreset: pageData.fontPreset,
},
}
},
init(b, pDataB) {
_bHelper = new BindingHelper(b)
const ConfStore = require('js/stores/conf_store')
if (__IN_EDITOR__ && !ConfStore.getIsBlog()) {
_pDataHelper = new BindingHelper(pDataB)
// Manually synchronize side_menu and page_data
// to avoid unnecessary render for side menu
;['headingFont', 'bodyFont', 'titleFont', 'fontPreset'].map(font =>
_pDataHelper.binding.addListener(font, changes =>
_bHelper.setData(`data.${font}`, _pDataHelper.getData(font)),
),
)
}
return _bHelper.binding
},
_setBHelperForTests(bHelper) {
return (_bHelper = bHelper)
},
loadFontsIfNotLoaded() {
if (_bHelper.getData('isLoadingFonts')) {
return
}
_bHelper.setData('isLoadingFonts', true)
return import('../../../config/fonts.json')
.then(fonts => {
this._setAllFonts(fonts)
return _bHelper.setData('isLoadingFonts', false)
})
.catch(() => _bHelper.setData('isLoadingFonts', false))
},
hydrate(fonts, pageData, initFonts) {
this._initialFonts = initFonts
_bHelper.binding
.atomically()
.set(Immutable.fromJS(this.getDefault(pageData)))
.commit({ notify: false })
return (this._fontsSelectedOnPageLoad = this._getUsedFonts())
},
getData(k) {
return _bHelper.binding.get(k)
},
getBinding() {
return _bHelper.binding
},
getFontName(type, options = {}) {
let preview = false
if (options.preview != null) {
;({ preview } = options)
}
if (preview) {
return _bHelper.getData(`preview.${type}Font`)
} else {
return _bHelper.getData(`data.${type}Font`)
}
},
getAvailableFonts() {
if (this._allFonts) {
return this._allFonts
} else {
return this._initialFonts
}
},
search(fontUsage, searchTerm) {
let matchAtBeginning = []
let generalMatch = []
const normalizeFontName = name => name.toLowerCase().replace(/ /g, '')
searchTerm = normalizeFontName(searchTerm)
this.getAvailableFonts().forEach(f => {
if (fontUsage === 'body' && f.disableBody) {
return
}
if (f.hidden) {
return
}
const name = normalizeFontName(f.displayName)
if (name.slice(0, searchTerm.length) === searchTerm) {
return matchAtBeginning.push(f)
} else if (name.indexOf(searchTerm) !== -1) {
return generalMatch.push(f)
}
})
matchAtBeginning = _.sortBy(matchAtBeginning, f => f.name)
generalMatch = _.sortBy(generalMatch, f => f.name)
return matchAtBeginning.concat(generalMatch).slice(0, 20)
},
_getSuggestedFonts() {
return this.getVisibleFonts().filter(f => f.isSuggested)
},
_getUsedFonts() {
return _([
this.getFontName('title'),
this.getFontName('heading'),
this.getFontName('body'),
])
.compact()
.uniq()
.map(name => this.getFontByName(name))
.value()
},
getSuggestedFonts(fontUsage) {
const usedFontsForOtherTextTypes = this._getUsedFonts()
const defaultFontName = getDefaultFontName(fontUsage)
const defaultFont = this.getFontByName(defaultFontName)
let popular = this._getSuggestedFonts().concat(
this._fontsSelectedOnPageLoad,
)
popular = _(popular)
.filter(font => font.name !== defaultFontName)
.sortBy(font => font.name)
.value()
let fonts = usedFontsForOtherTextTypes.concat([defaultFont]).concat(popular)
fonts = _(fonts)
.reject(f => {
if (fontUsage === 'body' && f.disableBody) {
return true
}
if (f.hidden) {
return true
}
})
.uniq(f => f.name)
.value()
return fonts
},
_setAllFonts(fonts) {
this._allFonts = fonts
},
_getVisibleFonts: weakmapMemoize(availableFonts =>
availableFonts.filter(f => !f.hidden),
),
getVisibleFonts() {
return this._getVisibleFonts(this.getAvailableFonts())
},
getTitleFonts() {
return this.getVisibleFonts()
},
getHeadingFonts() {
return this.getVisibleFonts()
},
_getBodyFonts: weakmapMemoize(visibleFonts =>
_.select(visibleFonts, f => !f.disableBody),
),
getBodyFonts() {
return this._getBodyFonts(this.getVisibleFonts())
},
getFontByName(name) {
return _.find(
this.getAvailableFonts(),
f => f.name.toLowerCase() === name.toLowerCase(),
)
},
getFont(textType, options) {
return _.find(
this.getAvailableFonts(),
item => item.name === this.getFontName(textType, options),
)
},
getSelectedFontPresetName() {
return _pDataHelper.getData('fontPreset')
},
// Look into preview fonts and actual font to determine which font to show
// 1. if preview has value 'default', use theme default
// 2. if preview has other values, use that
// 3. otherwise, use font in page data
getFontStyle(textType) {
const previewFontName = this.getFontName(textType, { preview: true })
if (previewFontName === 'default') {
// fallback to theme defaults
return {}
} else {
const font =
this.getFont(textType, { preview: true }) ||
this.getFont(textType, { preview: false })
if (font != null) {
return {
fontFamily: font.cssValue,
}
} else {
return {}
}
}
},
getFontClassNames() {
// Class names on #s-content, used for both blog post and site in order to set font
const fontClassNames = ['heading', 'title', 'body'].map(type => {
const fontName =
this.getFontName(type, { preview: true }) ||
this.getFontName(type, { preview: false })
const slug = fontName ? fontName.toSlug() : undefined
if (slug) {
return `s-font-${type}-${slug}`
} else {
return `s-font-${type}-default`
}
})
return fontClassNames.join(' ')
},
})
EditorDispatcher.register(payload => {
switch (payload.actionType) {
case EditorConstants.ActionTypes.SELECT_FONT:
_updateFont(payload.fontType, payload.value)
break
case EditorConstants.ActionTypes.SELECT_FONT_PRESET:
_updateFontPreset(payload.preset)
break
case EditorConstants.ActionTypes.PREVIEW_FONT:
_updatePreviewFont(payload.fontType, payload.value)
break
case EditorConstants.ActionTypes.PREVIEW_FONT_PRESET:
_updatePreviewFontPreset(payload.preset)
break
case EditorConstants.ActionTypes.CLEAR_PREVIEW_FONT:
_clearPreviewFont()
break
default:
break
}
})
// No longer update fonts from style!
// when EditorConstants.ActionTypes.APPLY_STYLES # when hover or select a style
// _updateFontsFromStyle(payload.styles)
if (!__SERVER_RENDERING__) {
if (!window.DEBUG) {
window.DEBUG = {}
}
window.DEBUG.FontStore = FontStore
}
export default FontStore
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "fresh",
"sectionSelections": {
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./fresh/section_selections/ecommerce/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./fresh/section_selections/title/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./fresh/section_selections/columns/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/navbar/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./base/section_selections/contact_form/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./base/section_selections/cta/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./base/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./base/section_selections/rows/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./base/section_selections/info/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./base/section_selections/icons/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./base/section_selections/text/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./base/section_selections/hero/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./base/section_selections/signup_form/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./base/section_selections/media/content.json"),
} }
};
const fs = require('fs')
const oldFontsJson = fs.readFileSync(`${__dirname}/old.json`).toString()
let result = ''
currentFonts = eval(oldFontsJson)
currentFonts.push({
name: 'helvetica',
displayName: 'Helvetica',
cssValue: 'helvetica, arial',
cssFallback: 'sans-serif',
disableBody: false,
fontType: 'system',
settings: null,
hidden: false,
isSuggested: false,
},
// These fonts were removed from the list provided by the google fonts API,
// but we still need them in the list because people are already using them
{
"name": "amatica sc",
"displayName": "Amatica SC",
"cssValue": "\"amatica sc\"",
"cssFallback": "sans-serif",
"disableBody": true,
"fontType": "google",
"settings": {
"google_embed_name": "Amatica SC"
},
"hidden": false,
"isSuggested": false
},
{
"name": "droid sans",
"displayName": "Droid Sans",
"cssValue": "\"droid sans\"",
"cssFallback": "sans-serif",
"disableBody": false,
"fontType": "google",
"settings": null,
"hidden": false,
"isSuggested": false
},
{
"name": "droid sans mono",
"displayName": "Droid Sans Mono",
"cssValue": "\"droid sans mono\"",
"cssFallback": "sans-serif",
"disableBody": false,
"fontType": "google",
"settings": null,
"hidden": false,
"isSuggested": false
},
{
"name": "droid serif",
"displayName": "Droid Serif",
"cssValue": "\"droid serif\"",
"cssFallback": "serif",
"disableBody": false,
"fontType": "google",
"settings": null,
"hidden": false,
"isSuggested": false
},
{
"name": "ek mukta",
"displayName": "Ek Mukta",
"cssValue": "\"ek mukta\"",
"cssFallback": "sans-serif",
"disableBody": false,
"fontType": "google",
"settings": null,
"hidden": false,
"isSuggested": false
})
// Usually blacklisted because they have many similar variations
const blacklistedFonts = [
'Slabo 13px',
'Slabo 27px',
'Baloo Bhai',
'Baloo Bhaina',
'Baloo Chettan',
'Baloo Da',
'Baloo Paaji',
'Baloo Tamma',
'Baloo Thambi',
'Hind Guntur',
'Hind Madurai',
'Hind Siliguri',
'Hind Vadodara',
].map(n => n.toLowerCase())
const newSuggestedFonts = [
'Unna',
'Bad Script',
'IBM Plex Serif',
'IBM Plex Sans',
'Roboto Slab',
'PT Serif',
'PT Sans',
'Libre Baskerville',
'Vidaloka',
'Share Tech',
'Changa One',
'Zilla Slab Highlight',
'Limelight',
'Bungee'
]
const fontsToDisableInBody = [
'Vidaloka',
'Share Tech',
'Changa One',
'Zilla Slab Highlight',
'Limelight',
'Bungee'
]
const fontsToReenableAsBody = ['lato']
fontsToRemoveFromSuggested = ['dosis', 'arapey', 'quando', 'trocchi']
fontsToUnhide = ['arapey', 'quando', 'trocchi']
googleFonts = JSON.parse(fs.readFileSync(`${__dirname}/googleFonts.json`)).items
/* eslint-disable max-statements */
googleFonts.forEach((font, i) => {
const name = font.family.toLowerCase()
const existingFontItem = currentFonts.filter(f => f.name === name)[0]
if (existingFontItem) {
if (fontsToRemoveFromSuggested.indexOf(existingFontItem.name) !== -1) {
existingFontItem.isSuggested = false
}
if (fontsToUnhide.indexOf(existingFontItem.name) !== -1) {
existingFontItem.hidden = false
}
if (fontsToReenableAsBody.indexOf(existingFontItem.name) !== -1) {
existingFontItem.disableBody = false
}
// Keep value from existing manually curated list of fonts
return
}
if (blacklistedFonts.indexOf(font.family.toLowerCase()) !== -1) {
console.log('font blacklisted:', font.family)
return
}
if (font.subsets.indexOf('latin') === -1) {
// console.log("Excluding font b/c no latin", font.family)
return
}
const fallback = {
'sans-serif': 'sans-serif',
serif: 'serif',
handwriting: 'cursive',
display: 'sans-serif',
monospace: 'sans-serif',
}[font.category]
if (!fallback) {
console.log('No fallback for font: ', font)
}
const newFont = {
name,
displayName: font.family,
cssValue: `"${name}"`,
cssFallback: fallback,
disableBody: font.category === 'display' || fontsToDisableInBody.includes(font.family),
fontType: 'google',
settings: null,
hidden: false,
isSuggested: newSuggestedFonts.indexOf(font.family) !== -1,
// "category": font.category
}
if (font.variants.indexOf('regular') === -1) {
// some fonts don't have a regular font, and won't load
// if you don't specify a specific weight
if (!newFont.settings) {
newFont.settings = {}
}
newFont.settings.weight = font.variants.join(',')
console.log(font.family)
}
let canAutogenerateEmbedName = true
// We try to auto-generate the embed by capitalizing the first
// character of each word, but that doesn't work for fonts like
// "PT Something", so store the embed name explicitly
if (/[A-Z]{2,10}/.test(font.family)) {
canAutogenerateEmbedName = false
}
// e.g. "Waiting for the Sunrise"
if (/ [a-z]/.test(font.family)) {
canAutogenerateEmbedName = false
}
// e.g. "BenchNine"
if (/[A-Z][a-z]+[A-Z]/.test(font.family)) {
canAutogenerateEmbedName = false
}
// e.g. "permanent marker"
if (/(^[^A-Z])|( [a-z])/.test(font.family)) {
canAutogenerateEmbedName = false
}
if (!canAutogenerateEmbedName) {
if (!newFont.settings) {
newFont.settings = {}
}
newFont.settings.google_embed_name = font.family
}
currentFonts.push(newFont)
})
/* eslint-enable max-statements */
result += JSON.stringify(currentFonts, null, 4)
fs.writeFileSync('./config/fonts.json', result)
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "glow",
"sectionSelections": {
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./glow/section_selections/title/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./glow/section_selections/cta/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./glow/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./glow/section_selections/blog/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./glow/section_selections/info/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./glow/section_selections/text/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./glow/section_selections/hero/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./glow/section_selections/signup_form/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./glow/section_selections/media/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/navbar/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./base/section_selections/ecommerce/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./base/section_selections/contact_form/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./base/section_selections/rows/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./base/section_selections/icons/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./base/section_selections/columns/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
} }
};
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "ion",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./ion/section_selections/navbar/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./ion/section_selections/slider/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./ion/section_selections/banner/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./base/section_selections/ecommerce/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./base/section_selections/title/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./base/section_selections/contact_form/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./base/section_selections/cta/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./base/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./base/section_selections/rows/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./base/section_selections/info/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./base/section_selections/icons/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./base/section_selections/text/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./base/section_selections/columns/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./base/section_selections/hero/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./base/section_selections/signup_form/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./base/section_selections/media/content.json"),
} }
};
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "minimal",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./minimal/section_selections/navbar/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./minimal/section_selections/ecommerce/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./minimal/section_selections/title/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./minimal/section_selections/contact_form/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./minimal/section_selections/cta/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./minimal/section_selections/html/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./minimal/section_selections/rows/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./minimal/section_selections/info/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./minimal/section_selections/icons/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./minimal/section_selections/text/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./minimal/section_selections/columns/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./minimal/section_selections/hero/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./minimal/section_selections/signup_form/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./base/section_selections/media/content.json"),
} }
};
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "onyx_new",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./onyx_new/section_selections/navbar/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./onyx_new/section_selections/ecommerce/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./onyx_new/section_selections/cta/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./onyx_new/section_selections/info/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./onyx_new/section_selections/icons/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./onyx_new/section_selections/hero/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./onyx_new/section_selections/signup_form/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./base/section_selections/title/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./base/section_selections/contact_form/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./base/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./base/section_selections/rows/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./base/section_selections/text/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./base/section_selections/columns/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./base/section_selections/media/content.json"),
} }
};
import 'js/loadBugsnag'
import './init'
import $ from 'jquery'
import React from 'react'
import ReactDOM from 'react-dom'
import logger from 'js/utils/logger'
import 'js/utils/extensions/native'
import bootstrapSite from 'js/prerender/bootstrapSite'
import * as i18nHelper from 'js/utils/helpers/i18nHelper'
import * as RHL from 'react-hot-loader'
// not widely used, disable it for now
// require('./registerPWA.es6')
// These two are direct reads so promises can be fired quicker
const themeName = $S.stores.pageMeta.theme.name
const forcedLocale = $S.stores.pageMeta.forced_locale
// Load dynamic theme style files on editor debug environment
if (__MODE__ === "'editor-debug'") {
require('reset')
require(`themes/${themeName}/main_v4`)
}
const p1 = import(`locales/${i18nHelper.getTranslationFile(
forcedLocale,
)}`)
const p2 = import(`manifests/themes/${themeName}.js`)
const p3 = import(`manifests/verticals/${themeName}.js`)
Promise.all([p1, p2, p3])
.then((...args) => {
const [poFile, manifest, verticalData] = Array.from(args[0])
if (!window.timerStart) {
window.timerStart = new Date().getTime()
}
window.timerCheck = function(label) {
const msg = `${label} in ${new Date().getTime() - timerStart}ms`
console.log(msg)
}
const BootstrappedSite = bootstrapSite({
poFile,
manifest,
verticalData,
})
$(() => {
require('./v3_bridge')()
ReactDOM.render(
<BootstrappedSite />,
document.getElementById('s-page-container'),
)
const ConfStore = require('js/stores/conf_store')
if (ConfStore.isStrikinglyLiveChatEnabled()) {
const SupportWidget = require('js/components/support_widget/SupportWidget')
ReactDOM.render(
<RHL.AppContainer>
<SupportWidget />
</RHL.AppContainer>,
document.getElementById('s-support-widget-container'),
)
}
})
})
.catch(e => console.error(e))
// catch errors and call console.error so that they are reported by Bugsnag
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "persona",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./persona/section_selections/navbar/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./persona/section_selections/social_feed/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./persona/section_selections/ecommerce/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./persona/section_selections/title/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./persona/section_selections/contact_form/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./persona/section_selections/cta/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./persona/section_selections/gallery/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./persona/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./persona/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./persona/section_selections/rows/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./persona/section_selections/icons/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./persona/section_selections/text/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./persona/section_selections/columns/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./persona/section_selections/hero/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./persona/section_selections/signup_form/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./persona/section_selections/block/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./persona/section_selections/media/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./base/section_selections/info/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
} }
};
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "personal",
"sectionSelections": {
"contact": {
"sectionId": "contact_form",
"category": "suggested",
"displayName": "Contact",
"description": "Let viewers drop their name, email, and message.",
"position": 10,
"content": require("./personal/section_selections/contact/content.json"),
},
"bio": {
"sectionId": "rows",
"category": "suggested",
"displayName": "Bio",
"description": "List experiences, schools, projects, or anything!",
"position": 2,
"content": require("./personal/section_selections/bio/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "suggested",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./personal/section_selections/social_feed/content.json"),
},
"intro": {
"sectionId": "title",
"category": "suggested",
"displayName": "Intro",
"description": "Write a blurb about yourself.",
"position": 1,
"content": require("./personal/section_selections/intro/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "suggested",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 7,
"content": require("./personal/section_selections/gallery/content.json"),
},
"projects": {
"sectionId": "media",
"category": "suggested",
"displayName": "Projects",
"description": "Show a big video or image. Or add many of them.",
"position": 5,
"content": require("./personal/section_selections/projects/content.json"),
},
"resume": {
"sectionId": "cta",
"category": "suggested",
"displayName": "Resume",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./personal/section_selections/resume/content.json"),
},
"education": {
"sectionId": "rows",
"category": "suggested",
"displayName": "Education",
"description": "List experiences, schools, projects, or anything!",
"position": 4,
"content": require("./personal/section_selections/education/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "suggested",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"recommendations": {
"sectionId": "columns",
"category": "suggested",
"displayName": "Recommendations",
"description": "List your projects, clients, features, team, or anything!",
"position": 8,
"content": require("./personal/section_selections/recommendations/content.json"),
},
"experiences": {
"sectionId": "rows",
"category": "suggested",
"displayName": "Experience",
"description": "List experience, schools, projects, or anything!",
"position": 3,
"content": require("./personal/section_selections/experiences/content.json"),
},
"skills": {
"sectionId": "info",
"category": "suggested",
"displayName": "Skills",
"description": "Show skills, stats, or tidbits.",
"position": 6,
"content": require("./personal/section_selections/skills/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./personal/section_selections/hero/content.json"),
},
"connect": {
"sectionId": "icons",
"category": "suggested",
"displayName": "Connect",
"description": "A list of small icons. Good for social media.",
"position": 9,
"content": require("./personal/section_selections/connect/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/navbar/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./base/section_selections/ecommerce/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./base/section_selections/html/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./base/section_selections/text/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./base/section_selections/signup_form/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
} }
};
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "perspective",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./perspective/section_selections/navbar/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./perspective/section_selections/social_feed/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./perspective/section_selections/ecommerce/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./perspective/section_selections/title/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./perspective/section_selections/contact_form/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./perspective/section_selections/cta/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./perspective/section_selections/gallery/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./perspective/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./perspective/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./perspective/section_selections/rows/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./perspective/section_selections/info/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./perspective/section_selections/icons/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./perspective/section_selections/text/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./perspective/section_selections/columns/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./perspective/section_selections/hero/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./perspective/section_selections/signup_form/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./perspective/section_selections/media/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
} }
};
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "pitch_new",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./pitch_new/section_selections/navbar/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./pitch_new/section_selections/ecommerce/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./pitch_new/section_selections/info/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./base/section_selections/title/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./base/section_selections/contact_form/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./base/section_selections/cta/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./base/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./base/section_selections/rows/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./base/section_selections/icons/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./base/section_selections/text/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./base/section_selections/columns/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./base/section_selections/hero/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./base/section_selections/signup_form/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./base/section_selections/media/content.json"),
} }
};
/**
* This file is auto generated
* You can modify it to test some changes but they won't be persisted
*
* You shoud modify directly files in your verticals source directory
* and re-generate this one afterwards.
*
* Docs:
*
* Source: https://github.com/strikingly/theme-utils
* Binary strk_tmb:
* RDoc:
*
*/
module.exports = {
"internal": "profile",
"sectionSelections": {
"navbar": {
"sectionId": "navbar",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./profile/section_selections/navbar/content.json"),
},
"title": {
"sectionId": "title",
"category": "content",
"displayName": "Title",
"description": "A big background with a title and tagline.",
"position": 5,
"content": require("./profile/section_selections/title/content.json"),
},
"donation": {
"sectionId": "donation",
"category": "action",
"displayName": "Donation",
"description": "Receive donations right on your site!",
"position": 2,
"content": require("./base/section_selections/donation/content.json"),
},
"footer": {
"sectionId": "footer",
"category": null,
"displayName": null,
"description": null,
"position": null,
"content": require("./base/section_selections/footer/content.json"),
},
"social_feed": {
"sectionId": "social_feed",
"category": "action",
"displayName": "Social Feed",
"description": "Display your latest social media posts beautifully.",
"position": 4,
"content": require("./base/section_selections/social_feed/content.json"),
},
"ecommerce": {
"sectionId": "ecommerce",
"category": "action",
"displayName": "Simple Store",
"description": "Sell products right on your site! Manage orders, payments, and more.",
"position": 1,
"content": require("./base/section_selections/ecommerce/content.json"),
},
"contact_form": {
"sectionId": "contact_form",
"category": "content",
"displayName": "Contact Form",
"description": "Let viewers drop their name, email, and message. Show a map and business info.",
"position": 15,
"content": require("./base/section_selections/contact_form/content.json"),
},
"cta": {
"sectionId": "cta",
"category": "content",
"displayName": "Button",
"description": "A big call-to-action. Supports an external link or a file download!",
"position": 6,
"content": require("./base/section_selections/cta/content.json"),
},
"gallery": {
"sectionId": "gallery",
"category": "content",
"displayName": "Gallery",
"description": "Image and video thumbnails that open in a full view.",
"position": 11,
"content": require("./base/section_selections/gallery/content.json"),
},
"slider": {
"sectionId": "slider",
"category": "content",
"displayName": "Text + Button Slider",
"description": "Swipeable slider with text, button, and image/video. Background image optional.",
"position": 18,
"content": require("./base/section_selections/slider/content.json"),
},
"html": {
"sectionId": "html",
"category": "action",
"displayName": "App Store & HTML",
"description": "Embed a map, a calendar, a document, a form or any HTML code!",
"position": 3,
"content": require("./base/section_selections/html/content.json"),
},
"blog": {
"sectionId": "blog",
"category": "action",
"displayName": "Simple Blog",
"description": "Write beautiful blog posts that open in a new page.",
"position": 2,
"content": require("./base/section_selections/blog/content.json"),
},
"rows": {
"sectionId": "rows",
"category": "content",
"displayName": "Content in Rows",
"description": "List your features, projects, team members, or anything!",
"position": 8,
"content": require("./base/section_selections/rows/content.json"),
},
"info": {
"sectionId": "info",
"category": "content",
"displayName": "Info Boxes",
"description": "Show boxes of steps, stats, or tidbits.",
"position": 13,
"content": require("./base/section_selections/info/content.json"),
},
"icons": {
"sectionId": "icons",
"category": "content",
"displayName": "Contact",
"description": "A list of small icons. Good for social media.",
"position": 12,
"content": require("./base/section_selections/icons/content.json"),
},
"portfolio": {
"sectionId": "portfolio",
"category": "action",
"displayName": "Product Showcase",
"description": "An advanced product portfolio. Each product opens in its own page, were you can add a price, gallery, and detailed description.",
"position": 1,
"content": require("./base/section_selections/portfolio/content.json"),
},
"text": {
"sectionId": "text",
"category": "content",
"displayName": "Plain Text",
"description": "Just paragraphs of text with titles.",
"position": 14,
"content": require("./base/section_selections/text/content.json"),
},
"columns": {
"sectionId": "columns",
"category": "content",
"displayName": "Content in Columns",
"description": "List your projects, clients, features, team, or anything!",
"position": 9,
"content": require("./base/section_selections/columns/content.json"),
},
"hero": {
"sectionId": "hero",
"category": "content",
"displayName": "Hero",
"description": "Great for the top of a page. Add images, a button, or even a sign-up form.",
"position": 7,
"content": require("./base/section_selections/hero/content.json"),
},
"banner": {
"sectionId": "slider",
"category": "content",
"displayName": "Banner Image Slider",
"description": "Swipeable and linkable image slider. Great for promos and heavy graphical content.",
"position": 17,
"content": require("./base/section_selections/banner/content.json"),
},
"signup_form": {
"sectionId": "signup_form",
"category": "content",
"displayName": "Sign-Up Form",
"description": "Let visitors sign up for a newsletter or a service.",
"position": 16,
"content": require("./base/section_selections/signup_form/content.json"),
},
"process": {
"sectionId": "process",
"category": "content",
"displayName": "Process",
"description": "A numbered list of steps. Explain how your service works!",
"position": 13,
"content": require("./base/section_selections/process/content.json"),
},
"block": {
"sectionId": "block",
"category": "action",
"displayName": "Make Your Own Section",
"description": "Want more control over layouts? Arrange components yourself!",
"position": 100,
"content": require("./base/section_selections/block/content.json"),
},
"grid": {
"sectionId": "grid",
"category": "content",
"displayName": "Grid",
"description": "Linkable panels of images & text. Customize layout, size, and spacing. A very visual way to display categories, testimonials, or features!",
"position": 101,
"content": require("./base/section_selections/grid/content.json"),
},
"media": {
"sectionId": "media",
"category": "content",
"displayName": "Big Media",
"description": "Show a big video or image. Or add many of them.",
"position": 10,
"content": require("./base/section_selections/media/content.json"),
} }
};
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment