add webber script

This commit is contained in:
Stefan Fejes
2019-08-20 16:59:57 +02:00
parent 986a8cbdc8
commit 7a4454c7b4
79 changed files with 7324 additions and 5 deletions

15
.gitignore vendored
View File

@ -1,5 +1,14 @@
__pycache__/
# IDE Specific
.vscode
*.iml
.idea/codeStyles/Project.xml
*.xml
# dotenv environment variables file
.env
# gatsby files
.cache/
public
# Mac files
.DS_Store

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 102 KiB

8
gatsby-browser.js Normal file
View File

@ -0,0 +1,8 @@
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
// You can delete this file if you're not using it
export { default as wrapRootElement } from './src/docs/state/ReduxWrapper';

82
gatsby-config.js Normal file
View File

@ -0,0 +1,82 @@
const config = require('./config');
module.exports = {
siteMetadata: {
title: `${config.name}`,
description: `${config.description}`,
author: `@30-seconds`,
},
plugins: [
`gatsby-plugin-transition-link`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `snippets`,
path: `${__dirname}/${config.snippetPath}`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `snippet_data`,
path: `${__dirname}/${config.snippetDataPath}`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `assets`,
path: `${__dirname}/${config.assetPath}`,
},
},
{
resolve: `gatsby-plugin-page-creator`,
options: {
path: `${__dirname}/${config.pagePath}`,
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 590,
},
},
`gatsby-remark-prismjs`,
`gatsby-remark-copy-linked-files`,
],
},
},
`gatsby-plugin-sass`,
`gatsby-transformer-json`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
//trackingId: `ADD YOUR TRACKING ID HERE`,
anonymize: true, // Always set this to true, try to comply with GDPR out of the box
respectDNT: true, // Always set to true, be respectful of people who ask not to be tracked
cookieExpires: 0, // Always set to 0, minimum tracking for your users
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `${config.name}`,
short_name: `${config.shortName}`,
start_url: `/`,
background_color: `#1e253d`,
theme_color: `#1e253d`,
display: `standalone`,
icon: `assets/30s-icon.png`, // This path is relative to the root of the site.
},
},
`gatsby-plugin-offline`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-netlify`,
],
};

93
gatsby-node.js Normal file
View File

@ -0,0 +1,93 @@
const path = require(`path`);
const { createFilePath } = require(`gatsby-source-filesystem`);
const toKebabCase = str =>
str &&
str
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
.map(x => x.toLowerCase())
.join('-');
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions;
const snippetPage = path.resolve(`./src/docs/templates/SnippetPage.js`);
const tagPage = path.resolve(`./src/docs/templates/TagPage.js`);
return graphql(
`
{
allMarkdownRemark(
sort: { fields: [frontmatter___title], order: ASC }
limit: 1000
) {
edges {
node {
fields {
slug
}
frontmatter {
tags
}
fileAbsolutePath
}
}
}
}
`,
).then(result => {
if (result.errors) {
throw result.errors;
}
// Create individual snippet pages.
const snippets = result.data.allMarkdownRemark.edges;
snippets.forEach((post, index) => {
if (post.node.fileAbsolutePath.indexOf('README') !== -1)
return;
createPage({
path: `/snippet${post.node.fields.slug}`,
component: snippetPage,
context: {
slug: post.node.fields.slug,
},
});
});
// Create tag pages.
const tags = snippets.reduce((acc, post) => {
if (!post.node.frontmatter || !post.node.frontmatter.tags) return acc;
const primaryTag = post.node.frontmatter.tags.split(',')[0];
if (!acc.includes(primaryTag)) acc.push(primaryTag);
return acc;
}, []);
tags.forEach(tag => {
const tagPath = `/tag/${toKebabCase(tag)}/`;
const tagRegex = `/^\\s*${tag}/`;
createPage({
path: tagPath,
component: tagPage,
context: {
tag,
tagRegex,
},
});
});
return null;
});
};
exports.onCreateNode = ({ node, actions, getNode }) => {
const { createNodeField } = actions;
if (node.internal.type === `MarkdownRemark`) {
const value = createFilePath({ node, getNode });
createNodeField({
name: `slug`,
node,
value,
});
}
};

8
gatsby-ssr.js Normal file
View File

@ -0,0 +1,8 @@
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/
// You can delete this file if you're not using it
export { default as wrapRootElement } from './src/docs/state/ReduxWrapper';

12
node_modules/blob/.idea/blob.iml generated vendored Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,5 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" />
</settings>
</component>

78
node_modules/blob/.idea/markdown-navigator.xml generated vendored Normal file
View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownProjectSettings" wasCopied="true">
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true" openRemoteLinks="true" replaceUnicodeEmoji="false" lastLayoutSetsDefault="false">
<PanelProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
</PanelProvider>
</PreviewSettings>
<ParserSettings gitHubSyntaxChange="false" emojiShortcuts="1" emojiImages="0">
<PegdownExtensions>
<option name="ABBREVIATIONS" value="false" />
<option name="ANCHORLINKS" value="true" />
<option name="ASIDE" value="false" />
<option name="ATXHEADERSPACE" value="true" />
<option name="AUTOLINKS" value="true" />
<option name="DEFINITIONS" value="false" />
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
<option name="FENCED_CODE_BLOCKS" value="true" />
<option name="FOOTNOTES" value="false" />
<option name="HARDWRAPS" value="false" />
<option name="HTML_DEEP_PARSER" value="false" />
<option name="INSERTED" value="false" />
<option name="QUOTES" value="false" />
<option name="RELAXEDHRULES" value="true" />
<option name="SMARTS" value="false" />
<option name="STRIKETHROUGH" value="true" />
<option name="SUBSCRIPT" value="false" />
<option name="SUPERSCRIPT" value="false" />
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
<option name="SUPPRESS_INLINE_HTML" value="false" />
<option name="TABLES" value="true" />
<option name="TASKLISTITEMS" value="true" />
<option name="TOC" value="false" />
<option name="WIKILINKS" value="true" />
</PegdownExtensions>
<ParserOptions>
<option name="ADMONITION_EXT" value="false" />
<option name="ATTRIBUTES_EXT" value="false" />
<option name="COMMONMARK_LISTS" value="true" />
<option name="DUMMY" value="false" />
<option name="EMOJI_SHORTCUTS" value="true" />
<option name="ENUMERATED_REFERENCES_EXT" value="false" />
<option name="FLEXMARK_FRONT_MATTER" value="false" />
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
<option name="GFM_TABLE_RENDERING" value="true" />
<option name="GITBOOK_URL_ENCODING" value="false" />
<option name="GITHUB_LISTS" value="false" />
<option name="GITHUB_WIKI_LINKS" value="true" />
<option name="HEADER_ID_NO_DUPED_DASHES" value="false" />
<option name="JEKYLL_FRONT_MATTER" value="false" />
<option name="NO_TEXT_ATTRIBUTES" value="false" />
<option name="PARSE_HTML_ANCHOR_ID" value="false" />
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
</ParserOptions>
</ParserSettings>
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true" embedImages="false" embedHttpImages="false" imageUriSerials="false">
<GeneratorProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
</GeneratorProvider>
<headerTop />
<headerBottom />
<bodyTop />
<bodyBottom />
</HtmlSettings>
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssUriSerial="false" isCssTextEnabled="false" isDynamicPageWidth="true">
<StylesheetProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
</StylesheetProvider>
<ScriptProviders />
<cssText />
<cssUriHistory />
</CssSettings>
<HtmlExportSettings updateOnSave="false" parentDir="" targetDir="" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" linkFormatType="HTTP_ABSOLUTE" />
<LinkMapSettings>
<textMaps />
</LinkMapSettings>
</component>
</project>

View File

@ -0,0 +1,3 @@
<component name="MarkdownNavigator.ProfileManager">
<settings default="" pdf-export="" />
</component>

8
node_modules/blob/.idea/modules.xml generated vendored Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/blob.iml" filepath="$PROJECT_DIR$/.idea/blob.iml" />
</modules>
</component>
</project>

6
node_modules/blob/.idea/vcs.xml generated vendored Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

390
node_modules/blob/.idea/workspace.xml generated vendored Normal file
View File

@ -0,0 +1,390 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="584fee10-991c-4143-af70-57730369b503" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FUSProjectUsageTrigger">
<session id="424275792">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.open.time.3" value="1" />
<entry key="project.opened" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="Makefile" value="3" />
<entry key="gitignore" value="3" />
<entry key="js" value="6" />
<entry key="json" value="4" />
<entry key="md" value="3" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="Git file" value="3" />
<entry key="JSON" value="4" />
<entry key="JavaScript" value="6" />
<entry key="Markdown" value="3" />
<entry key="PLAIN_TEXT" value="3" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="json" value="9" />
<entry key="txt" value="34" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="JSON" value="9" />
<entry key="PLAIN_TEXT" value="34" />
</counts>
</usages-collector>
<usages-collector id="statistics.vcs.git.usages">
<counts>
<entry key="git.branch.checkout.local" value="2" />
<entry key="git.branch.checkout.remote" value="2" />
<entry key="git.branch.delete.local" value="2" />
<entry key="git.branch.merge" value="2" />
<entry key="git.branch.rebase" value="2" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="578">
<caret line="34" column="3" selection-start-line="34" selection-start-column="3" selection-end-line="34" selection-end-column="3" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="137">
<caret line="11" column="24" selection-start-line="11" selection-start-column="24" selection-end-line="11" selection-end-column="24" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Makefile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="8" column="46" selection-start-line="8" selection-start-column="25" selection-end-line="8" selection-end-column="46" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="8" column="26" selection-start-line="8" selection-start-column="26" selection-end-line="8" selection-end-column="26" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="204">
<caret line="12" selection-start-line="12" selection-end-line="12" />
</first_editor>
<second_editor>
<markdownNavigatorState />
</second_editor>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>esprima-six</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="patch-1" />
</map>
</option>
<option name="RESET_MODE" value="KEEP" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/package.json" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER">
<package-json value="$PROJECT_DIR$/package.json" />
</component>
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths>
<path value="$PROJECT_DIR$/package.json" />
</packageJsonPaths>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-9" />
<option name="width" value="1935" />
<option name="height" value="1029" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="blob" type="b2602c69:ProjectViewProjectNode" />
<item name="blob" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="blob" type="b2602c69:ProjectViewProjectNode" />
<item name="blob" type="462c0819:PsiDirectoryNode" />
<item name="test" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="nodejs.mocha.mocha_node_package_dir" value="$PROJECT_DIR$/node_modules/mocha" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="C:/Program Files/nodejs/node" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Mocha.blob">
<configuration name="test" type="js.build_tools.npm" factoryName="npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="test" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="blob" type="mocha-javascript-test-runner" factoryName="Mocha" temporary="true" nameIsGenerated="true">
<node-interpreter>project</node-interpreter>
<node-options />
<working-directory>$PROJECT_DIR$</working-directory>
<pass-parent-env>true</pass-parent-env>
<ui>bdd</ui>
<extra-mocha-options />
<test-kind>SUITE</test-kind>
<test-file>$PROJECT_DIR$/test/index.js</test-file>
<test-names>
<name value="blob" />
</test-names>
<method v="2" />
</configuration>
<list>
<item itemvalue="npm.test" />
<item itemvalue="Mocha.blob" />
</list>
<recent_temporary>
<list>
<item itemvalue="Mocha.blob" />
<item itemvalue="npm.test" />
<item itemvalue="Mocha.blob" />
<item itemvalue="npm.test" />
<item itemvalue="Mocha.blob" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="584fee10-991c-4143-af70-57730369b503" name="Default Changelist" comment="" />
<created>1541010775450</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1541010775450</updated>
<workItem from="1541010778407" duration="2946000" />
</task>
<task id="LOCAL-00001" summary="update browserify and zuul to avoid esprima-six issue">
<created>1541013247794</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1541013247795</updated>
</task>
<option name="localTasksCounter" value="2" />
<servers />
</component>
<component name="TestHistory">
<history-entry file="blob - 2018.10.31 at 21h 11m 12s.xml">
<configuration name="blob" configurationId="mocha-javascript-test-runner" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="2946000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="all">
<are-packages-shown value="true" />
<is-autoscroll-to-source value="true" />
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
<layout>
<window_info id="npm" side_tool="true" />
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24983476" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" visible="true" weight="0.44948757" />
<window_info anchor="bottom" id="Terminal" weight="0.55051243" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.47291362" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" weight="0.329429" />
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
<option name="COLUMN_ORDER">
<list>
<option value="0" />
<option value="1" />
<option value="2" />
<option value="3" />
</list>
</option>
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="update browserify and zuul to avoid esprima-six issue" />
<option name="LAST_COMMIT_MESSAGE" value="update browserify and zuul to avoid esprima-six issue" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="578">
<caret line="34" column="3" selection-start-line="34" selection-start-column="3" selection-end-line="34" selection-end-column="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/Makefile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="8" column="46" selection-start-line="8" selection-start-column="25" selection-end-line="8" selection-end-column="46" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="8" column="26" selection-start-line="8" selection-start-column="26" selection-end-line="8" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;MarkdownPreviewEditor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="204">
<caret line="12" selection-start-line="12" selection-end-line="12" />
</first_editor>
<second_editor>
<markdownNavigatorState />
</second_editor>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="137">
<caret line="11" column="24" selection-start-line="11" selection-start-column="24" selection-end-line="11" selection-end-column="24" />
</state>
</provider>
</entry>
</component>
</project>

9
node_modules/bmp-js/bmp-js.iml generated vendored Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value />
</option>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</component>
</project>

View File

@ -0,0 +1,15 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<option name="myLocal" value="true" />
<inspection_tool class="JasmineAdapterSupport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="JsTestDriverTestCaseWithoutTests" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="JstdAssertionFrameworkSupport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="QUnitAdapterSupport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>

8
node_modules/css-selector-parser/.idea/modules.xml generated vendored Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/node-css-selector-parser.iml" filepath="$PROJECT_DIR$/.idea/node-css-selector-parser.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
node_modules/css-selector-parser/.idea/vcs.xml generated vendored Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

367
node_modules/css-selector-parser/.idea/workspace.xml generated vendored Normal file
View File

@ -0,0 +1,367 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="4e64f350-25a6-403f-a43b-d6f2437d8d4b" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/css-selector-parser.js" afterPath="$PROJECT_DIR$/lib/css-selector-parser.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/test.js" afterPath="$PROJECT_DIR$/test/test.js" />
</list>
<ignored path="node-css-selector-parser.iws" />
<ignored path=".idea/workspace.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FavoritesManager">
<favorites_list name="node-css-selector-parser" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="test.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-203">
<caret line="214" column="0" lean-forward="true" selection-start-line="214" selection-start-column="0" selection-end-line="214" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="css-selector-parser.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/css-selector-parser.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="161">
<caret line="410" column="63" lean-forward="true" selection-start-line="410" selection-start-column="63" selection-end-line="410" selection-end-column="63" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/.travis.yml" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/.npmignore" />
<option value="$PROJECT_DIR$/package.json" />
<option value="$PROJECT_DIR$/benchmark/benchmark.js" />
<option value="$PROJECT_DIR$/lib/css-selector-parser.js" />
<option value="$PROJECT_DIR$/test/test.js" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER">
<package-json value="$PROJECT_DIR$/package.json" />
</component>
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="160" />
<option name="y" value="128" />
<option name="width" value="858" />
<option name="height" value="732" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="node-css-selector-parser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="node-css-selector-parser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="node-css-selector-parser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="node-css-selector-parser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="node-css-selector-parser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="node-css-selector-parser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lib" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="node-css-selector-parser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="node-css-selector-parser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="benchmark" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="preferences.sourceCode" />
<property name="settings.editor.splitter.proportion" value="0.2" />
<property name="WebServerToolWindowFactoryState" value="true" />
<property name="nodejs_interpreter_path" value="$USER_HOME$/.nvm/versions/node/v5.7.0/bin/node" />
<property name="js-jscs-nodeInterpreter" value="$USER_HOME$/.nvm/versions/node/v5.7.0/bin/node" />
<property name="js-jscs-package" value="$USER_HOME$/.nvm/versions/node/v5.7.0/lib/node_modules/jscs" />
</component>
<component name="RunManager">
<configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application">
<method />
</configuration>
<configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test">
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerKarma" factoryName="Karma">
<config-file value="" />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method />
</configuration>
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
<method />
</configuration>
<configuration default="true" type="cucumber.js" factoryName="Cucumber.js">
<option name="cucumberJsArguments" value="" />
<option name="executablePath" />
<option name="filePath" />
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<envs />
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run-script" />
<scripts />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
<node-interpreter>project</node-interpreter>
<node-options />
<working-directory />
<pass-parent-env>true</pass-parent-env>
<envs />
<ui />
<extra-mocha-options />
<test-kind>DIRECTORY</test-kind>
<test-directory />
<recursive>false</recursive>
<method />
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="4e64f350-25a6-403f-a43b-d6f2437d8d4b" name="Default" comment="" />
<created>1440604068064</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1440604068064</updated>
<workItem from="1472309245338" duration="4624000" />
<workItem from="1472465304405" duration="306000" />
<workItem from="1480439203655" duration="849000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="5779000" />
</component>
<component name="ToolWindowManager">
<frame x="160" y="128" width="858" height="732" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21095571" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="PlantUML" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Reviews" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="News Feed" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
</component>
<component name="UncommittedReviewsManager">
<reviews />
<uncommitted-review-parts />
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="25" column="7" lean-forward="false" selection-start-line="25" selection-start-column="7" selection-end-line="25" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.npmignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="2" lean-forward="false" selection-start-line="2" selection-start-column="2" selection-end-line="2" selection-end-column="2" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/benchmark/benchmark.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="272">
<caret line="16" column="17" lean-forward="false" selection-start-line="16" selection-start-column="17" selection-end-line="16" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/css-selector-parser.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="161">
<caret line="410" column="63" lean-forward="true" selection-start-line="410" selection-start-column="63" selection-end-line="410" selection-end-column="63" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-203">
<caret line="214" column="0" lean-forward="true" selection-start-line="214" selection-start-column="0" selection-end-line="214" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

1120
node_modules/json-schema/draft-zyp-json-schema-03.xml generated vendored Normal file

File diff suppressed because it is too large Load Diff

1072
node_modules/json-schema/draft-zyp-json-schema-04.xml generated vendored Normal file

File diff suppressed because it is too large Load Diff

4
node_modules/node-releases/.idea/encodings.xml generated vendored Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

View File

@ -0,0 +1,8 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="JSLastCommaInArrayLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="JSLastCommaInObjectLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

9
node_modules/node-releases/.idea/misc.xml generated vendored Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
</project>

8
node_modules/node-releases/.idea/modules.xml generated vendored Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/node-releases.iml" filepath="$PROJECT_DIR$/.idea/node-releases.iml" />
</modules>
</component>
</project>

12
node_modules/node-releases/.idea/node-releases.iml generated vendored Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
node_modules/node-releases/.idea/vcs.xml generated vendored Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

155
node_modules/node-releases/.idea/workspace.xml generated vendored Normal file
View File

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="2adb9df7-dc6f-46a2-94c4-b7e31697fc3d" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="368">
<caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="y" value="23" />
<option name="width" value="1280" />
<option name="height" value="777" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="node-releases" type="b2602c69:ProjectViewProjectNode" />
<item name="node-releases" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="node-releases" type="b2602c69:ProjectViewProjectNode" />
<item name="node-releases" type="462c0819:PsiDirectoryNode" />
<item name="data" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="2adb9df7-dc6f-46a2-94c4-b7e31697fc3d" name="Default Changelist" comment="" />
<created>1541196784996</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1541196784996</updated>
<workItem from="1541196786949" duration="636000" />
<workItem from="1541200851694" duration="598000" />
<workItem from="1541321954118" duration="43000" />
<workItem from="1541329259404" duration="199000" />
<workItem from="1542562588391" duration="109000" />
<workItem from="1545165877505" duration="634000" />
</task>
<task id="LOCAL-00001" summary="upd">
<created>1541196833083</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1541196833083</updated>
</task>
<task id="LOCAL-00002" summary="upd">
<created>1545165894333</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1545165894333</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="2219000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1280" height="777" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2494043" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Quokka" order="8" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Bucklescript" order="10" />
<window_info anchor="bottom" id="Terminal" order="11" />
<window_info anchor="bottom" id="Event Log" order="12" side_tool="true" />
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="upd" />
<option name="LAST_COMMIT_MESSAGE" value="upd" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="368">
<caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value />
</option>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
</component>
</project>

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
</state>
</component>

View File

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>

View File

@ -0,0 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="marnusw">
<words>
<w>eslint</w>
</words>
</dictionary>
</component>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/../material-ui/package.json" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/.eslintrc" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/.gitignore" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/.npmignore" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/CHANGELOG.md" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/UPGRADE_GUIDE.md" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/demo/app.js" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/demo/assets/transitions.css" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/demo/components/ContentLong.jsx" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/demo/components/ContentShort.jsx" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/demo/components/ContentSwapper.jsx" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/demo/components/Demo.jsx" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/gulpfile.js" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/package.json" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/ReactCSSTransitionReplace.jsx" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="UnterminatedStatementJS" enabled="false" level="WARNING" enabled_by_default="false">
<option name="ignoreSemicolonAtEndOfBlock" value="true" />
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="file://$PROJECT_DIR$" libraries="{react-css-transition-replace/node_modules}" />
<includedPredefinedLibrary name="ECMAScript 6" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/react-css-transition-replace.iml" filepath="$PROJECT_DIR$/.idea/react-css-transition-replace.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,794 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="092468e6-a492-495d-9103-7ddd355f79fd" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
</list>
<ignored path="react-css-transition-replace.iws" />
<ignored path=".idea/workspace.xml" />
<ignored path=".idea/dataSources.local.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="FavoritesManager">
<favorites_list name="react-css-transition-replace" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="34">
<caret line="2" selection-start-line="2" selection-end-line="2" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="package.json" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="19" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="ReactCSSTransitionReplaceChild.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/ReactCSSTransitionReplaceChild.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="2" selection-start-line="2" selection-start-column="2" selection-end-line="2" selection-end-column="2" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="PropTypes.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/utils/PropTypes.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="10" column="10" selection-start-line="10" selection-start-column="10" selection-end-line="10" selection-end-column="10" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="JavaScript File" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>no-nested-ternary</find>
<find>clearSelection</find>
<find>ContentAddRemove</find>
<find>assign</find>
<find>lodash.assign</find>
<find>positionAbsolute</find>
<find>overflow</find>
<find>prevChildren</find>
<find>height</find>
<find>transitioning</find>
<find>Anima</find>
<find>name</find>
<find>rm-es2015-block-scopin</find>
<find>-es2015-modules-co</find>
<find>orm-object-rest-sprea</find>
<find>path=&quot;</find>
<find>carou</find>
<find>queueClassAndNode</find>
<find>;</find>
<find>react-transition-group</find>
<find>'warning'</find>
<find>warning</find>
<find>chain-function</find>
<find>chain</find>
<find>node-notifier</find>
<find>gulp-notify</find>
<find>notify</find>
<find>no-did-mount-set-stat</find>
<find>wrap-mul</find>
<find>to: '/</find>
</findStrings>
<replaceStrings>
<replace>}</replace>
<replace>PropTypes</replace>
<replace>this.childRefs[key]</replace>
<replace>child</replace>
<replace>Date.now</replace>
<replace>3s</replace>
<replace>style</replace>
<replace>three</replace>
<replace>two</replace>
<replace>findDOMNode</replace>
<replace>fade-width</replace>
<replace>fade-fast</replace>
<replace>path=&quot;/react-css-transition-replace</replace>
</replaceStrings>
<dirStrings>
<dir>C:\Users\marnusw\Development\react-css-transition-replace\demo\components</dir>
<dir>C:\Users\marnusw\Development\react-css-transition-replace\demo</dir>
<dir>C:\Users\marnusw\Development\react-css-transition-replace\src</dir>
<dir>C:\Users\marnusw\Development\react-css-transition-replace</dir>
</dirStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/CSSTransitionReplace.jsx" />
<option value="$PROJECT_DIR$/src/CSSTransitionReplaceChild.js" />
<option value="$PROJECT_DIR$/lib/ReactCSSTransitionReplace.js" />
<option value="$PROJECT_DIR$/demo/Demo.jsx" />
<option value="$PROJECT_DIR$/demo/client.js" />
<option value="$PROJECT_DIR$/demo/index.html" />
<option value="$PROJECT_DIR$/demo/server.js" />
<option value="$PROJECT_DIR$/demo/assets/trasitions.css" />
<option value="$PROJECT_DIR$/demo/assets/index.html" />
<option value="$PROJECT_DIR$/.babelrc" />
<option value="$PROJECT_DIR$/node_modules/react/lib/ReactCSSTransitionGroupChild.js" />
<option value="$PROJECT_DIR$/demo/components/ContentLong.jsx" />
<option value="$PROJECT_DIR$/demo/components/ContentShort.jsx" />
<option value="$PROJECT_DIR$/demo/components/PageHead.jsx" />
<option value="$PROJECT_DIR$/demo/components/TimedSwapper.jsx" />
<option value="$PROJECT_DIR$/index.js" />
<option value="$PROJECT_DIR$/demo/components/UnmountWrapper.jsx" />
<option value="$PROJECT_DIR$/.npmignore" />
<option value="$PROJECT_DIR$/demo/app.js" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/src/utils/dom.js" />
<option value="$PROJECT_DIR$/src/Child.js" />
<option value="$PROJECT_DIR$/node_modules/react-transition-group/CSSTransitionGroupChild.js" />
<option value="$PROJECT_DIR$/src/CSSTransitionGroupChild.js" />
<option value="$PROJECT_DIR$/src/ReactCSSTransitionReplace.js" />
<option value="$PROJECT_DIR$/demo/assets/styles.css" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/UPGRADE_GUIDE.md" />
<option value="$PROJECT_DIR$/demo/assets/transitions.css" />
<option value="$PROJECT_DIR$/src/utils/dom-helpers.js" />
<option value="$PROJECT_DIR$/demo/assets/app.js" />
<option value="$PROJECT_DIR$/demo/components/ContentAddRemove.jsx" />
<option value="$PROJECT_DIR$/demo/components/ContentSwapper.jsx" />
<option value="$PROJECT_DIR$/demo/components/ChangeChildProps.jsx" />
<option value="$PROJECT_DIR$/demo/components/Demo.jsx" />
<option value="$PROJECT_DIR$/demo/components/AnimatedRouter.jsx" />
<option value="$PROJECT_DIR$/src/ReactCSSTransitionReplaceChild.js" />
<option value="$PROJECT_DIR$/src/ReactCSSTransitionReplace.jsx" />
<option value="$PROJECT_DIR$/.eslintrc" />
<option value="$PROJECT_DIR$/gulpfile.js" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
<option value="$PROJECT_DIR$/src/utils/PropTypes.js" />
<option value="$PROJECT_DIR$/package.json" />
</list>
</option>
</component>
<component name="JsBowerSettings">
<node-interpreter value="project" />
<exe-path>$USER_HOME$/AppData/Roaming/npm/bower.cmd</exe-path>
<config-path />
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER">
<package-json value="$PROJECT_DIR$/package.json" />
</component>
<component name="JsFlowSettings">
<service-enabled>false</service-enabled>
<exe-path />
<annotation-enable>false</annotation-enable>
<other-services-enabled>false</other-services-enabled>
<auto-save>true</auto-save>
</component>
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<gulpfiles>
<GulpfileState>
<gulpfile-path>$PROJECT_DIR$/gulpfile.js</gulpfile-path>
</GulpfileState>
</gulpfiles>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths>
<path value="$PROJECT_DIR$/package.json" />
</packageJsonPaths>
</component>
<component name="PackageJsonUpdateNotifier">
<dismissed value="$PROJECT_DIR$/package.json" />
</component>
<component name="PhpServers">
<servers />
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-8" />
<option name="y" value="-8" />
<option name="width" value="1932" />
<option name="height" value="1056" />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>Code style issuesJavaScript</id>
</State>
<State>
<id>JavaScript</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>UnterminatedStatementJS</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="react-css-transition-replace" type="b2602c69:ProjectViewProjectNode" />
<item name="react-css-transition-replace" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="react-css-transition-replace" type="b2602c69:ProjectViewProjectNode" />
<item name="react-css-transition-replace" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="demo" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="react-css-transition-replace" type="b2602c69:ProjectViewProjectNode" />
<item name="react-css-transition-replace" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="gh-pages" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="react-css-transition-replace" type="b2602c69:ProjectViewProjectNode" />
<item name="react-css-transition-replace" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
<path>
<item name="react-css-transition-replace" type="b2602c69:ProjectViewProjectNode" />
<item name="react-css-transition-replace" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="src" type="2a2b976b:PhpTreeStructureProvider$1" />
<item name="utils" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="HbShouldOpenHtmlAsHb" value="" />
<property name="JavaScriptLanguageLevel" value="JSX" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="editor.config.accepted" value="true" />
<property name="js-jscs-nodeInterpreter" value="C:\Program Files\nodejs\node.exe" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_interpreter_path" value="C:/Program Files/nodejs/node" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="options.splitter.details.proportions" value="0.2" />
<property name="options.splitter.main.proportions" value="0.3" />
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.HTML" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\marnusw\Development\react-css-transition-replace\demo\components" />
<recent name="C:\Users\marnusw\Development\react-css-transition-replace\src" />
<recent name="C:\Users\marnusw\Development\react-css-transition-replace\demo\assets" />
<recent name="C:\Users\marnusw\Development\react-css-transition-replace" />
<recent name="C:\Users\marnusw\Development\react-css-transition-replace\demo" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\marnusw\Development\react-css-transition-replace\demo\assets" />
<recent name="C:\Users\marnusw\Development\react-css-transition-replace\demo\components" />
<recent name="C:\Users\marnusw\Development\react-css-transition-replace\demo" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration default="true" type="BashConfigurationType" factoryName="Bash">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="INTERPRETER_PATH" value="C:\Program Files\Git\bin\bash.exe" />
<option name="WORKING_DIRECTORY" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
<module name="" />
<envs />
<method />
</configuration>
<configuration default="true" type="CodeceptionConfigurationType" factoryName="Codeception">
<PhpTestRunnerSettings />
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
<node-interpreter value="project" />
<working-dir value="" />
<envs />
<scope-kind value="ALL" />
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
<config-file value="" />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method />
</configuration>
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
<method />
</configuration>
<configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
<TestRunner />
<method />
</configuration>
<configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
<BehatRunner />
<method />
</configuration>
<configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
<method />
</configuration>
<configuration default="true" type="PhpSpecConfigurationType" factoryName="PHPSpec">
<PhpTestRunnerSettings />
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run" />
<scripts />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<pass-parent-envs>true</pass-parent-envs>
</configuration>
<configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
<node-interpreter />
<node-options />
<working-directory>$PROJECT_DIR$</working-directory>
<pass-parent-env>true</pass-parent-env>
<ui>bdd</ui>
<extra-mocha-options />
<test-kind>DIRECTORY</test-kind>
<test-directory />
<recursive>false</recursive>
</configuration>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="092468e6-a492-495d-9103-7ddd355f79fd" name="Default" comment="" />
<created>1439193208653</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1439193208653</updated>
<workItem from="1473850135196" duration="4445000" />
<workItem from="1473855417060" duration="1705000" />
<workItem from="1474986310406" duration="127000" />
<workItem from="1476049711237" duration="1783000" />
<workItem from="1476119792075" duration="21000" />
<workItem from="1476718560467" duration="604000" />
<workItem from="1476736415058" duration="1206000" />
<workItem from="1477039253235" duration="33344000" />
<workItem from="1481061548073" duration="4325000" />
<workItem from="1488233542616" duration="4685000" />
<workItem from="1488926841218" duration="1117000" />
<workItem from="1489008180493" duration="2817000" />
<workItem from="1490197772782" duration="15000" />
<workItem from="1493491030226" duration="29547000" />
<workItem from="1503839246159" duration="13860000" />
<workItem from="1504986830426" duration="1223000" />
<workItem from="1506971429827" duration="10404000" />
<workItem from="1507060560389" duration="345000" />
<workItem from="1507225138195" duration="2873000" />
<workItem from="1507364684758" duration="3720000" />
<workItem from="1508240009342" duration="658000" />
<workItem from="1518257239349" duration="24000" />
<workItem from="1523480153873" duration="2703000" />
<workItem from="1524476036541" duration="896000" />
<workItem from="1524641210844" duration="872000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="123319000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="true" />
<layout>
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
<window_info anchor="bottom" id="Database Changes" order="12" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="8" weight="0.32980973" />
<window_info id="npm" order="4" sideWeight="0.504329" side_tool="true" weight="0.19915701" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Terminal" order="10" weight="0.32972974" />
<window_info id="Gulp" order="2" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.495671" visible="true" weight="0.2125" />
<window_info anchor="bottom" id="Docker" order="12" show_stripe_button="false" />
<window_info anchor="right" id="Database" order="3" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="3" side_tool="true" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="bottom" id="Application Servers" order="9" />
<window_info anchor="bottom" id="Messages" order="7" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Command Line Tools Console" order="12" weight="0.32908705" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32590234" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<ignored-roots>
<path value="$PROJECT_DIR$/gh-pages" />
</ignored-roots>
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="1" />
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="34">
<caret line="2" column="52" selection-start-line="2" selection-start-column="52" selection-end-line="2" selection-end-column="52" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ReactCSSTransitionReplace.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="26" selection-start-line="3" selection-start-column="26" selection-end-line="3" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="34">
<caret line="2" column="52" selection-start-line="2" selection-start-column="52" selection-end-line="2" selection-end-column="52" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/react/lib/ReactCSSTransitionGroup.js" />
<entry file="file://$PROJECT_DIR$/node_modules/react/lib/ReactTransitionChildMapping.js" />
<entry file="file://$PROJECT_DIR$/node_modules/react/lib/ReactTransitionGroup.js" />
<entry file="file://$PROJECT_DIR$/.npmignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="1" column="8" selection-start-line="1" selection-start-column="8" selection-end-line="1" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/UnmountWrapper.jsx" />
<entry file="file://$PROJECT_DIR$/node_modules/react/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="18" column="24" lean-forward="true" selection-start-line="18" selection-start-column="24" selection-end-line="18" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/react/lib/ReactCSSTransitionGroupChild.js" />
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="1" selection-start-line="5" selection-start-column="1" selection-end-line="5" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/react-bootstrap/es/Accordion.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="19" column="7" selection-start-line="19" selection-start-column="7" selection-end-line="19" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/react-bootstrap/es/Breadcrumb.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="1" column="25" selection-start-line="1" selection-start-column="25" selection-end-line="1" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/react-bootstrap/es/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="6" column="33" selection-start-line="6" selection-start-column="33" selection-end-line="6" selection-end-column="33" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/react-transition-group/CSSTransitionGroup.js" />
<entry file="file://$PROJECT_DIR$/node_modules/dom-helpers/transition/properties.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1188" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/CSSTransitionGroupChild.js" />
<entry file="file://$PROJECT_DIR$/node_modules/react-transition-group/CSSTransitionGroupChild.js" />
<entry file="file://$PROJECT_DIR$/node_modules/react-router/index.js" />
<entry file="file://$PROJECT_DIR$/demo/assets/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
<caret line="13" column="47" selection-start-line="13" selection-start-column="47" selection-end-line="13" selection-end-column="47" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/yarn.lock" />
<entry file="file://$PROJECT_DIR$/demo/assets/styles.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
<caret line="22" column="20" selection-start-line="22" selection-start-column="20" selection-end-line="22" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/ReactCSSTransitionReplaceChild.js" />
<entry file="file://$PROJECT_DIR$/lib/utils/PropTypes.js" />
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="59" selection-start-line="4" selection-start-column="59" selection-end-line="4" selection-end-column="59" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/UPGRADE_GUIDE.md">
<provider editor-type-id="text-editor">
<state>
<caret line="3" selection-start-line="3" selection-end-line="3" />
</state>
</provider>
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="90">
<caret line="5" column="28" selection-start-line="5" selection-start-column="28" selection-end-line="5" selection-end-column="28" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/utils/dom-helpers.js" />
<entry file="file://$PROJECT_DIR$/demo/assets/app.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="22" selection-start-line="22" selection-end-line="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/ReactCSSTransitionReplace.js" />
<entry file="file://$PROJECT_DIR$/demo/components/ContentLong.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="31" selection-start-line="3" selection-start-column="31" selection-end-line="3" selection-end-column="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/ContentShort.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="3" column="32" selection-start-line="3" selection-start-column="32" selection-end-line="3" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/PageHead.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="486">
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/TimedSwapper.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="15" selection-start-line="4" selection-start-column="15" selection-end-line="4" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/ChangeChildProps.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
<caret line="29" selection-start-line="29" selection-end-line="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/ContentSwapper.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="378">
<caret line="21" selection-start-line="21" selection-end-line="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/AnimatedRouter.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="563">
<caret line="48" column="27" selection-start-line="48" selection-start-column="27" selection-end-line="48" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.babelrc">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="629">
<caret line="37" column="28" selection-start-line="37" selection-start-column="28" selection-end-line="37" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/react-transition-group/utils/PropTypes.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="256">
<caret line="16" column="9" selection-start-line="16" selection-start-column="9" selection-end-line="16" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider editor-type-id="text-editor">
<state>
<caret line="39" selection-start-line="39" selection-end-line="39" />
</state>
</provider>
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="788">
<caret line="259" lean-forward="true" selection-start-line="259" selection-end-line="259" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/assets/transitions.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="72" column="1" selection-start-line="72" selection-start-column="1" selection-end-line="72" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.eslintrc">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="713">
<caret line="192" selection-start-line="192" selection-end-line="192" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/Demo.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1445">
<caret line="85" column="77" selection-start-line="85" selection-start-column="77" selection-end-line="85" selection-end-column="77" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ReactCSSTransitionReplace.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="26" selection-start-line="3" selection-start-column="26" selection-end-line="3" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gh-pages/app.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="78" column="8" selection-start-line="78" selection-start-column="8" selection-end-line="78" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gulpfile.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-178">
<caret line="19" selection-start-line="19" selection-end-line="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/components/ContentAddRemove.jsx">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="425">
<caret line="25" column="24" lean-forward="true" selection-start-line="25" selection-start-column="24" selection-end-line="25" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider editor-type-id="text-editor">
<state>
<caret line="5" column="61" selection-start-line="5" selection-start-column="61" selection-end-line="5" selection-end-column="61" />
</state>
</provider>
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="FIRST">
<first_editor relative-caret-position="34">
<caret line="2" selection-start-line="2" selection-end-line="2" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/ReactCSSTransitionReplaceChild.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="2" selection-start-line="2" selection-start-column="2" selection-end-line="2" selection-end-column="2" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/utils/PropTypes.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="10" column="10" selection-start-line="10" selection-start-column="10" selection-end-line="10" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="19" selection-start-line="2" selection-start-column="19" selection-end-line="2" selection-end-column="19" />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -4,8 +4,11 @@
"description": "A curated collection of useful Python snippets that you can understand in 30 seconds or less.",
"main": "config.js",
"scripts": {
"builder": "node ./scripts/build.js",
"extractor": "node ./scripts/extract.js",
"builder": "node ./scripts/build.js"
"webber": "gatsby build",
"webber:dev": "gatsby develop",
"webber:serve": "gatsby serve"
},
"repository": {
"type": "git",

View File

@ -0,0 +1,78 @@
import React from 'react';
import Helmet from 'react-helmet';
import { useStaticQuery, graphql } from 'gatsby';
require('../styles/index.scss'); // Do not change this to `import`, it's not going to work, no clue why
// ===================================================
// Page metadata (using Helmet)
// ===================================================
const Meta = ({ description = '', lang = 'en', meta = [], title }) => {
const { site, file } = useStaticQuery(
graphql`
query {
site {
siteMetadata {
title
description
author
}
}
file(relativePath: { eq: "logo.png" }) {
id
childImageSharp {
fluid(maxHeight: 400) {
src
}
}
}
}
`,
);
const metaDescription = description || site.siteMetadata.description;
return (
<Helmet
htmlAttributes={{
lang,
}}
title={title ? title : site.siteMetadata.title}
titleTemplate={title ? `%s - ${site.siteMetadata.title}` : '%s'}
meta={[
{
name: `description`,
content: metaDescription,
},
{
name: `author`,
content: site.siteMetadata.author,
},
{
name: `viewport`,
content: `width=device-width, initial-scale=1`,
},
{
name: `og:title`,
content: site.siteMetadata.title,
},
{
name: `og:description`,
content: metaDescription,
},
{
name: `og:type`,
content: `website`,
},
{
name: `og:image`,
content: file.childImageSharp.fluid.src,
},
].concat(meta)}
bodyAttributes={{
class: 'card-page',
}}
/>
);
};
export default Meta;

View File

@ -0,0 +1,22 @@
import React from 'react';
const BackArrowIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='18'
height='18'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-arrow-left ${className}`}
>
<line x1='19' y1='12' x2='5' y2='12'></line>
<polyline points='12 19 5 12 12 5'></polyline>
</svg>
);
export default BackArrowIcon;

View File

@ -0,0 +1,22 @@
import React from 'react';
const ClipboardIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-clipboard ${className}`}
>
<path d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'></path>
<rect x='8' y='2' width='8' height='4' rx='1' ry='1'></rect>
</svg>
);
export default ClipboardIcon;

View File

@ -0,0 +1,23 @@
import React from 'react';
const CollapseClosedIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='16'
height='16'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='1'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-plus-square ${className}`}
>
<rect x='3' y='3' width='18' height='18' rx='2' ry='2'></rect>
<line x1='12' y1='8' x2='12' y2='16'></line>
<line x1='8' y1='12' x2='16' y2='12'></line>
</svg>
);
export default CollapseClosedIcon;

View File

@ -0,0 +1,22 @@
import React from 'react';
const CollapseOpenIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='16'
height='16'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='1'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-minus-square ${className}`}
>
<rect x='3' y='3' width='18' height='18' rx='2' ry='2'></rect>
<line x1='8' y1='12' x2='16' y2='12'></line>
</svg>
);
export default CollapseOpenIcon;

View File

@ -0,0 +1,21 @@
import React from 'react';
const DarkModeIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-moon ${className}`}
>
<path d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'></path>
</svg>
);
export default DarkModeIcon;

View File

@ -0,0 +1,21 @@
import React from 'react';
const GithubIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-github ${className}`}
>
<path d='M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22'></path>
</svg>
);
export default GithubIcon;

View File

@ -0,0 +1,29 @@
import React from 'react';
const LightModeIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-sun ${className}`}
>
<circle cx='12' cy='12' r='5'></circle>
<line x1='12' y1='1' x2='12' y2='3'></line>
<line x1='12' y1='21' x2='12' y2='23'></line>
<line x1='4.22' y1='4.22' x2='5.64' y2='5.64'></line>
<line x1='18.36' y1='18.36' x2='19.78' y2='19.78'></line>
<line x1='1' y1='12' x2='3' y2='12'></line>
<line x1='21' y1='12' x2='23' y2='12'></line>
<line x1='4.22' y1='19.78' x2='5.64' y2='18.36'></line>
<line x1='18.36' y1='5.64' x2='19.78' y2='4.22'></line>
</svg>
);
export default LightModeIcon;

View File

@ -0,0 +1,26 @@
import React from 'react';
const ListIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-list ${className}`}
>
<line x1='8' y1='6' x2='21' y2='6'></line>
<line x1='8' y1='12' x2='21' y2='12'></line>
<line x1='8' y1='18' x2='21' y2='18'></line>
<line x1='3' y1='6' x2='3' y2='6'></line>
<line x1='3' y1='12' x2='3' y2='12'></line>
<line x1='3' y1='18' x2='3' y2='18'></line>
</svg>
);
export default ListIcon;

View File

@ -0,0 +1,24 @@
import React from 'react';
const SearchIcon = ({ className, onClick }) => {
return (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-search ${className}`}
>
<circle cx='11' cy='11' r='8'></circle>
<line x1='21' y1='21' x2='16.65' y2='16.65'></line>
</svg>
);
};
export default SearchIcon;

View File

@ -0,0 +1,25 @@
import React from 'react';
const ShareIcon = ({ className, onClick }) => (
<svg
onClick={onClick}
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
strokeLinecap='round'
strokeLinejoin='round'
className={`feather feather-share-2 ${className}`}
>
<circle cx='18' cy='5' r='3'></circle>
<circle cx='6' cy='12' r='3'></circle>
<circle cx='18' cy='19' r='3'></circle>
<line x1='8.59' y1='13.51' x2='15.42' y2='17.49'></line>
<line x1='15.41' y1='6.51' x2='8.59' y2='10.49'></line>
</svg>
);
export default ShareIcon;

View File

@ -0,0 +1,28 @@
import React from 'react';
// ===================================================
// Simple, stateful search component
// ===================================================
const Search = ({ defaultValue = '', setSearchQuery, className = '' }) => {
const [value, setValue] = React.useState(defaultValue);
React.useEffect(() => {
setSearchQuery(value);
}, [value]);
return (
<input
defaultValue={defaultValue}
className='search-box'
type='search'
id='searchInput'
placeholder='Search...'
aria-label='Snippet search'
onKeyUp={e => {
setValue(e.target.value);
}}
/>
);
};
export default Search;

View File

@ -0,0 +1,149 @@
import React from 'react';
import { graphql, useStaticQuery } from 'gatsby';
import { connect } from 'react-redux';
import AniLink from 'gatsby-plugin-transition-link/AniLink';
import ReactCSSTransitionReplace from 'react-css-transition-replace';
import config from '../../../config';
import { toggleDarkMode } from '../state/app';
import SearchIcon from './SVGs/SearchIcon';
import GithubIcon from './SVGs/GithubIcon';
import DarkModeIcon from './SVGs/DarkModeIcon';
import LightModeIcon from './SVGs/LightModeIcon';
import ListIcon from './SVGs/ListIcon';
// ===================================================
// Application-level UI component
// ===================================================
const Shell = ({
isDarkMode,
isSearch,
isList,
dispatch,
withIcon = true,
withTitle = true,
children,
}) => {
const data = useStaticQuery(graphql`
query SiteTitleQuery {
site {
siteMetadata {
title
description
}
}
file(relativePath: { eq: "30s-icon.png" }) {
id
childImageSharp {
original {
src
}
}
}
snippetDataJson(meta: { type: { eq: "snippetListingArray" } }) {
data {
title
id
attributes {
tags
}
}
}
}
`);
let viewportWidth = typeof window !== 'undefined' && window.innerWidth;
return (
<div className={isDarkMode ? 'page-container dark' : 'page-container'}>
{/* Menu */}
<header className='menu'>
<AniLink
cover
direction={viewportWidth < 600 ? 'up' : 'right'}
bg={isDarkMode ? '#434E76' : '#FFFFFF'}
to='/search'
aria-label='Search'
className={isSearch ? 'menu-button active' : 'menu-button'}
>
<SearchIcon />
</AniLink>
<AniLink
cover
direction={viewportWidth < 600 ? 'up' : 'right'}
bg={isDarkMode ? '#434E76' : '#FFFFFF'}
to='/list'
aria-label='Snippet list'
className={isList ? 'menu-button active' : 'menu-button'}
>
<ListIcon />
</AniLink>
{/* eslint-disable-next-line */}
<a target='_blank'
rel='noopener'
href={config.repositoryUrl}
aria-label='View on GitHub'
className='menu-button'
>
<GithubIcon />
</a>
{/*
The use of React.Fragment here will cause a lot of errors to show up in webber:dev.
Truth is, this is the only decent way I found to deal with this module's odd behavior.
Keep as is, unless you can provide a better solution, in which case please send a PR.
*/}
<ReactCSSTransitionReplace
transitionName='cross-fade'
transitionEnterTimeout={300}
transitionLeaveTimeout={300}
component='button'
aria-label={isDarkMode ? 'Switch to light mode' : 'Switch to dark mode'}
className='menu-button'
childComponent={React.Fragment}
>
{isDarkMode ? (
<LightModeIcon
key='lmit'
onClick={() => dispatch(toggleDarkMode(!isDarkMode))}
/>
) : (
<DarkModeIcon
key='dmit'
onClick={() => dispatch(toggleDarkMode(!isDarkMode))}
/>
)}
</ReactCSSTransitionReplace>
</header>
{/* Content */}
<div className='content'>
{withTitle ? (
<h1 className='website-title'>
{data.site.siteMetadata.title}
{withIcon ? (
<img
src={data.file.childImageSharp.original.src}
alt='Logo'
className='website-logo'
/>
) : (
''
)}
</h1>
) : (
''
)}
{children}
</div>
</div>
);
};
export default connect(
state => ({
isDarkMode: state.app.isDarkMode,
lastPageTitle: state.app.lastPageTitle,
lastPageUrl: state.app.lastPageUrl,
searchQuery: state.app.searchQuery,
}),
null,
)(Shell);

View File

@ -0,0 +1,21 @@
import React from 'react';
// ===================================================
// Generic card (displays textual content)
// ===================================================
const SimpleCard = ({
title,
children,
isDarkMode
}) => (
<div className='card short'>
<h4 className='card-title'>
{title}
</h4>
<div className='card-description'>
{children}
</div>
</div>
);
export default SimpleCard;

View File

@ -0,0 +1,177 @@
import React from 'react';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import config from '../../../config';
import { getTextualContent, getCodeBlocks, optimizeAllNodes } from '../util';
// import ShareIcon from './SVGs/ShareIcon';
import AniLink from 'gatsby-plugin-transition-link/AniLink';
import CollapseOpenIcon from './SVGs/CollapseOpenIcon';
import CollapseClosedIcon from './SVGs/CollapseClosedIcon';
import ReactCSSTransitionReplace from 'react-css-transition-replace';
// ===================================================
// Snippet Card HOC - check components below for more
// ===================================================
const SnippetCard = ({ short, snippetData, ...rest }) => {
let difficulty = snippetData.tags.includes('advanced')
? 'advanced'
: snippetData.tags.includes('beginner')
? 'beginner'
: 'intermediate';
return short ? (
<ShortCard snippetData={snippetData} difficulty={difficulty} {...rest} />
) : (
<FullCard snippetData={snippetData} difficulty={difficulty} {...rest} />
);
};
// ===================================================
// Simple card corner for difficulty display
// ===================================================
const CardCorner = ({ difficulty = 'intermediate' }) => (
<div
className={`card-corner ${difficulty}`}
aria-label={difficulty}
title={difficulty}
/>
);
// ===================================================
// Full snippet view (tags, code, title, description)
// ===================================================
const FullCard = ({ snippetData, difficulty, isDarkMode }) => {
const [examplesOpen, setExamplesOpen] = React.useState(false);
const tags = snippetData.tags;
let cardCodeHtml = `${optimizeAllNodes(
getCodeBlocks(snippetData.html).code,
)}`;
let cardExamplesHtml = `${optimizeAllNodes(
getCodeBlocks(snippetData.html).example,
)}`;
return (
<div className='card'>
<CardCorner difficulty={difficulty} />
<h4 className='card-title'>{snippetData.title}</h4>
{tags.map(tag => (
<span className='tag' key={`tag_${tag}`}>{tag}</span>
))}
<div
className='card-description'
dangerouslySetInnerHTML={{
__html: `${getTextualContent(snippetData.html)}`,
}}
/>
<div className='card-bottom'>
<CopyToClipboard
text={snippetData.code}
onCopy={() => {
let tst = document.createElement('div');
tst.classList = 'toast';
tst.innerHTML = 'Snippet copied to clipboard!';
document.body.appendChild(tst);
setTimeout(function() {
tst.style.opacity = 0;
setTimeout(function() {
document.body.removeChild(tst);
}, 300);
}, 1700);
}}
>
<button
className='button button-a button-copy'
aria-label='Copy to clipboard'
/>
</CopyToClipboard>
{/* <button className="button button-b button-social-sh" aria-label="Share">
<ShareIcon />
</button> */}
<pre
className={`card-code language-${config.language}`}
dangerouslySetInnerHTML={{ __html: cardCodeHtml }}
/>
<button
className='button button-example-toggler'
onClick={() => setExamplesOpen(!examplesOpen)}
>
{examplesOpen ? <CollapseOpenIcon /> : <CollapseClosedIcon />}Examples
</button>
<ReactCSSTransitionReplace
transitionName='roll-up'
transitionEnterTimeout={300}
transitionLeaveTimeout={300}
>
{examplesOpen && (
<pre
className='section card-examples language-js'
dangerouslySetInnerHTML={{ __html: cardExamplesHtml }}
/>
)}
</ReactCSSTransitionReplace>
</div>
</div>
);
};
// ===================================================
// Short snippet view (title, description, code*)
// ===================================================
const ShortCard = ({
snippetData,
withCode = false,
difficulty,
isDarkMode
}) => {
let cardCodeHtml;
if (withCode)
cardCodeHtml = `${optimizeAllNodes(
getCodeBlocks(snippetData.html).code,
)}`;
return (
<div className='card short'>
<CardCorner difficulty={difficulty} />
<h4 className='card-title'>
<AniLink
paintDrip
to={`/snippet/${snippetData.id}`}
hex={isDarkMode ? '#434E76' : '#FFFFFF'}
>
{snippetData.title}
</AniLink>
</h4>
<div
className='card-description'
dangerouslySetInnerHTML={{
__html: `${getTextualContent(snippetData.html)}`,
}}
/>
{withCode ? <div className='card-bottom'>
<CopyToClipboard
text={snippetData.code}
onCopy={() => {
let tst = document.createElement('div');
tst.classList = 'toast';
tst.innerHTML = 'Snippet copied to clipboard!';
document.body.appendChild(tst);
setTimeout(function() {
tst.style.opacity = 0;
setTimeout(function() {
document.body.removeChild(tst);
}, 300);
}, 1700);
}}
>
<button
className='button button-a button-copy'
aria-label='Copy to clipboard'
/>
</CopyToClipboard>
<pre
className={`card-code language-${config.language}`}
dangerouslySetInnerHTML={{ __html: cardCodeHtml }}
/>
</div> : '' }
</div>
);
};
export default SnippetCard;

60
src/docs/pages/404.js Normal file
View File

@ -0,0 +1,60 @@
import React from 'react';
import { connect } from 'react-redux';
import AniLink from 'gatsby-plugin-transition-link/AniLink';
import Shell from '../components/Shell';
import Meta from '../components/Meta';
// ===================================================
// Not found page
// ===================================================
const NotFoundPage = ({ isDarkMode }) => (
<>
<Meta title='Page not found' />
<Shell withIcon={true}>
<h2 className='page-title'>404</h2>
<div className='page-graphic page-not-found'>
<p className='empty-page-text'>
<strong>Page not found</strong>
<br />
</p>
<p className='empty-page-subtext'>
Seems like you have reached a page that does not exist.
</p>
<AniLink
paintDrip
to='/'
hex={isDarkMode ? '#434E76' : '#FFFFFF'}
className='button button-a button-home'
>
<svg
xmlns='http://www.w3.org/2000/svg'
width='24'
height='24'
viewBox='0 0 24 24'
fill='none'
stroke='currentColor'
strokeWidth='2'
stroke-linecap='round'
strokeLinejoin='round'
className='feather feather-home'
>
<path d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'></path>
<polyline points='9 22 9 12 15 12 15 22'></polyline>
</svg>
&nbsp;&nbsp;Go home
</AniLink>
</div>
</Shell>
</>
);
export default connect(
state => ({
isDarkMode: state.app.isDarkMode,
lastPageTitle: state.app.lastPageTitle,
lastPageUrl: state.app.lastPageUrl,
searchQuery: state.app.searchQuery,
}),
null,
)(NotFoundPage);

99
src/docs/pages/about.js Normal file
View File

@ -0,0 +1,99 @@
import React from 'react';
import { connect } from 'react-redux';
import Shell from '../components/Shell';
import Meta from '../components/Meta';
import SimpleCard from '../components/SimpleCard';
// ===================================================
// About page
// ===================================================
const AboutPage = ({ isDarkMode }) => (
<>
<Meta title='About' />
<Shell withIcon={true}>
<h2 className='page-title'>About</h2>
<p className='light-sub'>
A few word about us, our goals and our projects.
</p>
<SimpleCard title='Our philosophy'>
<p style={{textAlign: 'justify'}}>
The core goal of <strong>30 seconds</strong> is to provide a quality resource for beginner and advanced developers alike. We want to help improve the software development ecosystem, by lowering the barrier of entry for newcomers and help seasoned veterans pick up new tricks and remember old ones.
</p>
<p style={{textAlign: 'justify'}}>
In order to achieve this, we have collected hundreds of snippets that can be of use in a wide range of situations. We welcome new contributors and we like fresh ideas, as long as the code is short and easy to grasp in about 30 seconds.
</p>
<p style={{textAlign: 'justify'}}>
The only catch, if you may, is that a few of our snippets are not perfectly optimized for large, enterprise applications and they might not be deemed production-ready.
</p>
</SimpleCard>
<SimpleCard title='Our story'>
<p style={{ textAlign: 'justify' }}>
The <strong>30 seconds</strong> movement started back in December, 2017, with the release of <a href='https://github.com/30-seconds/30-seconds-of-code' target='_blank' rel='noopener noreferrer'>30 seconds of code</a> by <a href='https://github.com/Chalarangelo' target='_blank' rel='noopener noreferrer'>Angelos Chalaris</a>. Since then, hundreds of developers have contributed snippets to over 6 repositories, creating a thriving community of people willing to help each other write better code.
</p>
<p style={{ textAlign: 'justify' }}>
In late 2018, the <a href='https://github.com/30-seconds'>30 seconds organization</a> was formed on GitHub, in order to expand upon existing projects and ensure that they will remain high-quality resources in the future.
</p>
</SimpleCard>
<SimpleCard title='Who we are'>
<p style={{ textAlign: 'justify' }}>
The <strong>30 seconds</strong> movement and, to some extent, the associated GitHub organization consists of all the people who have invested time and ideas to be part of this amazing community. Meanwhile, these fine folks are currently responsible for maintaining the codebases and dealing with organizational matters:
</p>
<div className='flex-row'>
<div class="flex-item">
<img className='media-section' src='https://github.com/Chalarangelo.png' alt='chalarangelo' />
<a href='https://github.com/Chalarangelo' className='button-section' target='_blank' rel='noopener noreferrer'>Angelos Chalaris</a>
</div>
<div class="flex-item">
<img className='media-section' src='https://github.com/fejes713.png' alt='fejes713' />
<a href='https://github.com/fejes713' className='button-section' target='_blank' rel='noopener noreferrer'>Stefan Fejes</a>
</div>
<div class="flex-item">
<img className='media-section' src='https://github.com/flxwu.png' alt='flxwu' />
<a href='https://github.com/flxwu' className='button-section' target='_blank' rel='noopener noreferrer'>Felix Wu</a>
</div>
<div class="flex-item">
<img className='media-section' src='https://github.com/atomiks.png' alt='atomiks' />
<a href='https://github.com/atomiks' className='button-section' target='_blank' rel='noopener noreferrer'>atomiks</a>
</div>
</div>
<div className='flex-row'>
<div class="flex-item">
<img className='media-section' src='https://github.com/skatcat31.png' alt='skatcat31' />
<a href='https://github.com/skatcat31' className='button-section' target='_blank' rel='noopener noreferrer'>Robert Mennell</a>
</div>
<div class="flex-item">
<img className='media-section' src='https://github.com/petrovicstefanrs.png' alt='petrovicstefanrs' />
<a href='https://github.com/petrovicstefanrs' className='button-section' target='_blank' rel='noopener noreferrer'>Stefan Petrovic</a>
</div>
<div class="flex-item">
<img className='media-section' src='https://github.com/kirjs.png' alt='kirjs' />
<a href='https://github.com/kirjs' className='button-section' target='_blank' rel='noopener noreferrer'>Kirill Cherkashin</a>
</div>
<div class="flex-item">
<img className='media-section' src='https://github.com/sohelamin.png' alt='sohelamin' />
<a href='https://github.com/sohelamin' className='button-section' target='_blank' rel='noopener noreferrer'>Sohel Amin</a>
</div>
</div>
</SimpleCard>
<SimpleCard title='License'>
<p style={{ textAlign: 'justify' }}>
In order for the code provided via the <strong>30 seconds</strong> projects to be as accessible and useful as possible, all of the snippets in these collections are licensed under the <a href='https://creativecommons.org/publicdomain/zero/1.0/' target='_blank' rel='noopener noreferrer'>CC0-1.0 License</a> meaning they are absolutely free to use in any project you like. If you like what we do, you can always credit us, but that is not mandatory.
</p>
<p style={{ textAlign: 'justify' }}>
Logos, names and trademarks are not to be used without the explicit consent of the maintainers or owners of the <strong>30 seconds</strong> GitHub organization. The only exception to this is the usage of the <strong>30-seconds-of-</strong> name in open source projects, licensed under the <a href='https://creativecommons.org/publicdomain/zero/1.0/' target='_blank' rel='noopener noreferrer'>CC0-1.0 License</a> and hosted on GitHub, if their README and website clearly states that they are unofficial projects and in no way affiliated with the organization.
</p>
</SimpleCard>
</Shell>
</>
);
export default connect(
state => ({
isDarkMode: state.app.isDarkMode,
lastPageTitle: state.app.lastPageTitle,
lastPageUrl: state.app.lastPageUrl,
searchQuery: state.app.searchQuery,
}),
null,
)(AboutPage);

157
src/docs/pages/index.js Normal file
View File

@ -0,0 +1,157 @@
import React from 'react';
import { graphql } from 'gatsby';
import { connect } from 'react-redux';
import { pushNewPage, pushNewQuery } from '../state/app';
import Shell from '../components/Shell';
import Meta from '../components/Meta';
import Search from '../components/Search';
import SnippetCard from '../components/SnippetCard';
import { getRawCodeBlocks as getCodeBlocks } from '../util';
// ===================================================
// Home page (splash and search)
// ===================================================
const IndexPage = props => {
const snippets = props.data.snippetDataJson.data.map(snippet => ({
title: snippet.title,
html: props.data.allMarkdownRemark.edges.find(
v => v.node.frontmatter.title === snippet.title,
).node.html,
tags: snippet.attributes.tags,
text: snippet.attributes.text,
id: snippet.id,
code: getCodeBlocks(
props.data.allMarkdownRemark.edges.find(
v => v.node.frontmatter.title === snippet.title,
).node.rawMarkdownBody,
).code,
}));
const [searchQuery, setSearchQuery] = React.useState(props.searchQuery);
const [searchResults, setSearchResults] = React.useState(snippets);
React.useEffect(() => {
props.dispatch(pushNewQuery(searchQuery));
let q = searchQuery.toLowerCase();
let results = snippets;
if (q.trim().length)
results = snippets.filter(
v =>
v.tags.filter(t => t.indexOf(q) !== -1).length ||
v.title.toLowerCase().indexOf(q) !== -1,
);
setSearchResults(results);
}, [searchQuery]);
React.useEffect(() => {
props.dispatch(pushNewPage('Search', '/search'));
}, []);
return (
<>
<Meta />
<Shell withIcon={false} withTitle={false}>
<img
src={props.data.file.childImageSharp.original.src}
alt='Logo'
className='index-logo'
/>
<h1 className='index-title'>{props.data.site.siteMetadata.title}</h1>
<p className='index-sub-title'>
{props.data.site.siteMetadata.description}
</p>
<Search
setSearchQuery={setSearchQuery}
defaultValue={props.searchQuery}
/>
{searchQuery.length === 0 ? (
<p className='light-sub'>
Start typing a keyword to see matching snippets.
</p>
) : searchResults.length === 0 ? (
<p className='light-sub'>
We couldn't find any results for the keyword{' '}
<strong>{searchQuery}</strong>.
</p>
) : (
<>
<p className='light-sub'>
Click on a snippet's name to view its code.
</p>
<h2 className='page-sub-title'>Search results</h2>
{searchResults.map(snippet => (
<SnippetCard
short
key={`snippet_${snippet.id}`}
snippetData={snippet}
isDarkMode={props.isDarkMode}
/>
))}
</>
)}
</Shell>
</>
);
};
export default connect(
state => ({
isDarkMode: state.app.isDarkMode,
lastPageTitle: state.app.lastPageTitle,
lastPageUrl: state.app.lastPageUrl,
searchQuery: state.app.searchQuery,
}),
null,
)(IndexPage);
export const indexPageQuery = graphql`
query snippetList {
site {
siteMetadata {
title
description
author
}
}
file(relativePath: { eq: "30s-icon.png" }) {
id
childImageSharp {
original {
src
}
}
}
snippetDataJson(meta: { type: { eq: "snippetListingArray" } }) {
data {
id
title
attributes {
tags
text
}
}
}
allMarkdownRemark(
limit: 1000
sort: { fields: [frontmatter___title], order: ASC }
) {
totalCount
edges {
node {
id
html
rawMarkdownBody
fields {
slug
}
frontmatter {
title
tags
}
}
}
}
}
`;

148
src/docs/pages/list.js Normal file
View File

@ -0,0 +1,148 @@
import React from 'react';
import { graphql } from 'gatsby';
import { connect } from 'react-redux';
import { pushNewPage } from '../state/app';
import { capitalize } from '../util';
import Shell from '../components/Shell';
import Meta from '../components/Meta';
import AniLink from 'gatsby-plugin-transition-link/AniLink';
import SnippetCard from '../components/SnippetCard';
import { getRawCodeBlocks as getCodeBlocks } from '../util';
import SimpleCard from '../components/SimpleCard';
// ===================================================
// Snippet list page
// ===================================================
const ListPage = props => {
const snippets = props.data.snippetDataJson.data.map(snippet => ({
title: snippet.title,
html: props.data.allMarkdownRemark.edges.find(
v => v.node.frontmatter.title === snippet.title,
).node.html,
tags: snippet.attributes.tags,
text: snippet.attributes.text,
id: snippet.id,
code: getCodeBlocks(
props.data.allMarkdownRemark.edges.find(
v => v.node.frontmatter.title === snippet.title,
).node.rawMarkdownBody,
).code,
}));
const tags = snippets.reduce((acc, snippet) => {
if (!snippet.tags) return acc;
const primaryTag = snippet.tags[0];
if (!acc.includes(primaryTag)) acc.push(primaryTag);
return acc;
}, []);
const staticPages = [
{
url: 'about',
title: 'About',
description: 'A few word about us, our goals and our projects.'
}
];
React.useEffect(() => {
props.dispatch(pushNewPage('Snippet List', '/list'));
}, []);
return (
<>
<Meta title='Snippet List' />
<Shell withIcon={false} isList>
<h2 className='page-title'>Snippet List</h2>
<p className='light-sub'>
Click on a snippets name to view its code or a tag name to view all
snippets in that category.
</p>
{tags.map(tag => (
<>
<h3 className='tag-title' key={`tag_title_${tag}`}>
<AniLink
key={`tag_link_${tag}`}
paintDrip
to={`/tag/${tag}`}
hex={props.isDarkMode ? '#434E76' : '#FFFFFF'}
>
{capitalize(tag)}
</AniLink>
</h3>
{snippets
.filter(snippet => snippet.tags[0] === tag)
.map(snippet => (
<SnippetCard
key={`snippet_${snippet.id}`}
short
snippetData={snippet}
isDarkMode={props.isDarkMode}
/>
))}
</>
))}
<br/>
{staticPages.map(page => (
<SimpleCard
title={(
<AniLink
paintDrip
to={`/${page.url}`}
hex={props.isDarkMode ? '#434E76' : '#FFFFFF'}
>
{page.title}
</AniLink>
)}
>
<p>{page.description}</p>
</SimpleCard>
))}
</Shell>
</>
);
};
export default connect(
state => ({
isDarkMode: state.app.isDarkMode,
lastPageTitle: state.app.lastPageTitle,
lastPageUrl: state.app.lastPageUrl,
searchQuery: state.app.searchQuery,
}),
null,
)(ListPage);
export const listPageQuery = graphql`
query snippetListing {
snippetDataJson(meta: { type: { eq: "snippetListingArray" } }) {
data {
id
title
attributes {
tags
text
}
}
}
allMarkdownRemark(
limit: 1000
sort: { fields: [frontmatter___title], order: ASC }
) {
totalCount
edges {
node {
id
html
rawMarkdownBody
fields {
slug
}
frontmatter {
title
tags
}
}
}
}
}
`;

144
src/docs/pages/search.js Normal file
View File

@ -0,0 +1,144 @@
import React from 'react';
import { graphql } from 'gatsby';
import { connect } from 'react-redux';
import { pushNewPage, pushNewQuery } from '../state/app';
import Shell from '../components/Shell';
import Meta from '../components/Meta';
import Search from '../components/Search';
import SnippetCard from '../components/SnippetCard';
import { getRawCodeBlocks as getCodeBlocks } from '../util';
// ===================================================
// Search page
// ===================================================
const SearchPage = props => {
const snippets = props.data.snippetDataJson.data.map(snippet => ({
title: snippet.title,
html: props.data.allMarkdownRemark.edges.find(
v => v.node.frontmatter.title === snippet.title,
).node.html,
tags: snippet.attributes.tags,
text: snippet.attributes.text,
id: snippet.id,
code: getCodeBlocks(
props.data.allMarkdownRemark.edges.find(
v => v.node.frontmatter.title === snippet.title,
).node.rawMarkdownBody,
).code,
}));
const [searchQuery, setSearchQuery] = React.useState(props.searchQuery);
const [searchResults, setSearchResults] = React.useState(snippets);
React.useEffect(() => {
props.dispatch(pushNewQuery(searchQuery));
let q = searchQuery.toLowerCase();
let results = snippets;
if (q.trim().length)
results = snippets.filter(
v =>
v.tags.filter(t => t.indexOf(q) !== -1).length ||
v.title.toLowerCase().indexOf(q) !== -1,
);
setSearchResults(results);
}, [searchQuery]);
React.useEffect(() => {
props.dispatch(pushNewPage('Search', '/search'));
}, []);
return (
<>
<Meta title='Search' />
<Shell withIcon={false} isSearch>
<Search
setSearchQuery={setSearchQuery}
defaultValue={props.searchQuery}
/>
<p className='light-sub'>Click on a snippet's name to view its code.</p>
{/* Display page background or results depending on state */}
{searchQuery.length === 0 ? (
<>
<div className='page-graphic search-empty'>
<p className='empty-page-text search-page-text'>
Start typing a keyword to see matching snippets.
</p>
</div>
</>
) : searchResults.length === 0 ? (
<>
<div className='page-graphic search-no-results'>
<p className='empty-page-text'>
<strong>No results found</strong>
<br />
</p>
<p className='empty-page-subtext'>
We couldn't find any results for the keyword{' '}
<strong>{searchQuery}</strong>.
</p>
</div>
</>
) : (
<>
<h2 className='page-sub-title'>Search results</h2>
{searchResults.map(snippet => (
<SnippetCard
key={`snippet_${snippet.id}`}
short
snippetData={snippet}
isDarkMode={props.isDarkMode}
/>
))}
</>
)}
</Shell>
</>
);
};
export default connect(
state => ({
isDarkMode: state.app.isDarkMode,
lastPageTitle: state.app.lastPageTitle,
lastPageUrl: state.app.lastPageUrl,
searchQuery: state.app.searchQuery,
}),
null,
)(SearchPage);
export const searchPageQuery = graphql`
query searchSnippetList {
snippetDataJson(meta: { type: { eq: "snippetListingArray" } }) {
data {
id
title
attributes {
tags
text
}
}
}
allMarkdownRemark(
limit: 1000
sort: { fields: [frontmatter___title], order: ASC }
) {
totalCount
edges {
node {
id
html
rawMarkdownBody
fields {
slug
}
frontmatter {
title
tags
}
}
}
}
}
`;

View File

@ -0,0 +1,13 @@
import React from 'react';
import { Provider } from 'react-redux';
import { createStore as reduxCreateStore } from 'redux';
import rootReducer from '.';
const createStore = () => reduxCreateStore(rootReducer);
// ===================================================
// Wrapper for Gatsby
// ===================================================
export default ({ element }) => (
<Provider store={createStore()}>{element}</Provider>
);

49
src/docs/state/app.js Normal file
View File

@ -0,0 +1,49 @@
// Defalt state
const initialState = {
isDarkMode: false,
lastPageTitle: 'Home',
lastPageUrl: '/',
searchQuery: '',
};
// Actions
const TOGGLE_DARKMODE = 'TOGGLE_DARKMODE';
const PUSH_NEW_PAGE = 'PUSH_NEW_PAGE';
const PUSH_NEW_QUERY = 'PUSH_NEW_QUERY';
export const toggleDarkMode = isDarkMode => ({
type: TOGGLE_DARKMODE,
isDarkMode,
});
export const pushNewPage = (pageTitle, pageUrl) => ({
type: PUSH_NEW_PAGE,
pageTitle,
pageUrl,
});
export const pushNewQuery = query => ({
type: PUSH_NEW_QUERY,
query,
});
// Reducer
export default (state = initialState, action) => {
switch (action.type) {
case TOGGLE_DARKMODE:
return {
...state,
isDarkMode: action.isDarkMode,
};
case PUSH_NEW_PAGE:
return {
...state,
lastPageTitle: action.pageTitle,
lastPageUrl: action.pageUrl,
};
case PUSH_NEW_QUERY:
return {
...state,
searchQuery: action.query,
};
default:
return state;
}
};

4
src/docs/state/index.js Normal file
View File

@ -0,0 +1,4 @@
import { combineReducers } from 'redux';
import app from './app';
export default combineReducers({ app });

View File

@ -0,0 +1,84 @@
// ===================================================
// Buttons
// ===================================================
.button, a.button {
color: var(--button-fore-color);
font-weight: 500;
font-size: 1.125rem;
line-height: 1.4;
transition: 0.3s ease all;
padding: 0.625rem 0.875rem;
margin-top: 0.75rem;
border-radius: 1rem;
display: inline-block;
box-shadow: 0px 4px 8px var(--button-shadow-color);
border: none;
cursor: pointer;
&:hover, &:focus {
box-shadow: 0px 8px 16px var(--button-shadow-color);
text-decoration: none;
outline: none;
}
&.button-a {
background: var(--button-back-color-a);
}
&.button-b {
background: var(--button-back-color-b);
}
svg {
vertical-align: sub;
}
@media screen and (min-width: $layout-large-breakpoint) {
font-size: 1.375rem;
line-height: 1.35;
}
}
// Home button (404 page)
.button.button-home {
@media screen and (min-width: $layout-large-breakpoint) {
margin-top: 1.375rem;
}
}
// Copy and share buttons (snippet card)
.button.button-copy {
position: absolute;
top: -32px;
right: 24px;
padding: 0.5rem 0.625rem;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-clipboard' %3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'%3E%3C/path%3E%3Crect x='8' y='2' width='8' height='4' rx='1' ry='1'%3E%3C/rect%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: center;
width: 44px;
height: 44px;
}
.button.button-social-sh {
position: absolute;
top: -32px;
right: 80px;
padding: 0.5rem 0.625rem;
}
// Show/hide examples button (snippet card)
.button.button-example-toggler {
margin: -2rem 0px -1rem 0px;
background: var(--pre-back-color);
border-radius: 0px 0px 0.125rem 0.125rem;
width: calc(100%);
text-align: left;
display: block;
font-size: 0.875rem;
line-height: 1.35;
text-transform: uppercase;
font-weight: 300;
color: var(--button-example-toggler-fore-color);
box-shadow: none;
font-family: 'Roboto Mono', Menlo, Consolas, monospace;
&:hover, &:focus {
box-shadow: none;
}
svg {
margin-right: 0.125rem;
}
}

150
src/docs/styles/_card.scss Normal file
View File

@ -0,0 +1,150 @@
// ===================================================
// Cards
// ===================================================
.card {
position: relative;
transition: all 0.3s ease;
margin: 1rem 1.25rem;
background: var(--card-back-color);
color: var(--card-fore-color);
box-shadow: 0px 0px 1px var(--card-shadow-color-a), 0px 6px 12px var(--card-shadow-color-b);
border-radius: 0.125rem;
padding: 1rem;
.card-title {
font-size: 1.125rem;
line-height: 1.375;
font-weight: 500;
margin: 0px 0px 0.125rem;
a, a:link, a:visited {
font-weight: 500;
transition: 0.3s ease all;
color: var(--card-fore-color);
}
}
.card-description {
margin: 0.125rem -0.5rem 0.125rem;
font-size: 0.875rem;
color: var(--card-fore-color-light);
line-height: 1.35;
font-weight: 500;
}
.card-bottom {
position: relative;
background: blue;
margin-left: -1rem;
margin-right: -1rem;
border-radius: 0.125rem;
border-top-left-radius: 22px;
}
.card-code {
margin: 1.5rem 0px -1rem 0px;
background: var(--pre-back-color);
width: calc(100% - 36px);
border-radius: 1.375rem 0px 0.125rem 0.125rem;
line-height: 1.15;
padding: 2.25rem 1.125rem 2.25rem;
}
.card-examples {
transition: all 0.3s ease;
position: relative;
margin: 0.5rem 0px -1rem 0px;
background: var(--pre-back-color);
width: calc(100% - 52px);
border-radius: 0px 0px 0.125rem 0.125rem;
line-height: 1.15;
padding: 0.5rem 1.125rem 2.25rem 2.125rem;
&::before {
display: block;
content: '';
position: absolute;
left: 21px;
top: 0;
width: 1px;
opacity: 0.75;
height: calc(100% - 24px);
background: var(--button-example-toggler-fore-color);
}
}
&.short {
.card-bottom {
display: none;
@media screen and (min-width: $layout-large-breakpoint) {
display: block;
}
}
}
&:not(.short) {
background: linear-gradient(to bottom, var(--card-back-color) 0px, var(--card-back-color) calc(100% - 17px), var(--pre-back-color) calc(100% - 16px));
}
}
// Card expertise corners
.card-corner {
box-sizing: border-box;
position: absolute;
top: 24px;
right: 16px;
width: 0.5rem;
height: 0.5rem;
border-radius: 0.5rem;
background: var(--corner-color);
&.beginner {
--corner-color: var(--beginner-color);
}
&.intermediate {
--corner-color: var(--intermediate-color);
}
&.advanced {
--corner-color: var(--advanced-color);
}
&.intermediate, &.advanced {
&::before {
display: block;
position: absolute;
content: '';
top: 0px;
right: 12px;
width: 0.5rem;
height: 0.5rem;
border-radius: 0.5rem;
background: var(--corner-color);
}
}
&.advanced {
&::after {
display: block;
position: absolute;
content: '';
top: 0px;
right: 24px;
width: 0.5rem;
height: 0.5rem;
border-radius: 0.5rem;
background: var(--corner-color);
}
}
}
// Tags
.tag {
transition: 0.3s ease all;
border: 2px solid var(--tag-border-color);
border-radius: 0.25rem;
color: var(--tag-fore-color);
text-transform: uppercase;
margin: 0px 0.375rem 0.25rem 0px;
display: inline-block;
padding: 0.125rem 0.25rem;
letter-spacing: 0.25px;
font-size: 0.625rem;
line-height: 1.4;
font-weight: 500;
&:first-of-type {
margin-top: 0.375rem;
}
}
// Animation for card example
.roll-up-height {
transition: height 0.3s ease-in-out;
}

121
src/docs/styles/_code.scss Normal file
View File

@ -0,0 +1,121 @@
// Style code
code, kbd, pre {
font-size: 0.875em;
}
code, kbd, pre, code *, pre *, kbd *, code[class*="language-"], pre[class*="language-"] {
font-family: 'Roboto Mono', Menlo, Consolas, monospace;
}
code {
background: var(--code-back-color);
color: var(--code-fore-color);
padding: 0.125rem 0.375rem;
border-radius: 0.125rem;
}
pre {
overflow: auto; // Responsiveness
background: var(--pre-back-color);
color: var(--pre-fore-color);
padding: 0.375rem;
margin: 0.5rem;
border: 0;
}
code[class*="language-"], pre[class*="language-"] {
color: var(--pre-fore-color);
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.8;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
-webkit-hypens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"] {
padding: 1rem;
overflow: auto;
margin: 0.5rem 0;
white-space: pre-wrap;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
background: var(--pre-selected-color);
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
background: var(--pre-selected-color);
}
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.namespace {
opacity: .7;
}
.token {
&.comment, &.prolog, &.doctype, &.cdata {
color: var(--token-color-a);
}
&.punctuation {
color: var(--token-color-b);
}
&.property, &.tag, &.boolean, &.constant, &.symbol, &.deleted, &.function {
color: var(--token-color-c);
}
&.number, &.class-name {
color: var(--token-color-d);
}
&.selector, &.attr-name, &.string, &.char, &.builtin, &.inserted {
color: var(--token-color-e);
}
&.operator, &.entity, &.url, &.atrule, &.attr-value, &.keyword, &.interpolation-punctuation {
color: var(--token-color-f);
}
&.regex {
color: var(--token-color-g);
}
&.important, &.variable {
color: var(--token-color-h);
}
&.italic, &.comment {
font-style: italic;
}
&.important, &.bold {
font-weight: 500;
}
&.entity {
cursor: help;
}
}
.language-css .token.string, .style .token.string {
color: var(--token-color-f);
}
p > code, a > code {
&, &[class*="language-"] {
color: var(--code-fore-color);
background: var(--code-back-color);
&::-moz-selection, & ::-moz-selection {
background: var(--code-selected-color);
}
&::selection, & ::selection {
background: var(--code-selected-color);
}
}
}

View File

@ -0,0 +1,140 @@
:root {
// Interface color palette
--back-color: #F5F6FA;
--back-color-dark: #D7DDF3;
--fore-color: #404454;
--fore-color-light: #575E7A;
--fore-color-lighter: #666E8F;
--fore-color-dark: #1F253D;
--fore-color-darker: #060709;
// Scrollbar
--scrollbar-back-color: #D7DDF3;
--scrollbar-fore-color: #666E8F;
// Menu color palette
--menu-back-color: #FFFFFF;
--menu-border-color: #E4E6EC;
--menu-fore-color: #53586A;
--menu-active-fore-color: #2747C7;
// Card corner palette
--beginner-color: #7CB342;
--intermediate-color: #FFB300;
--advanced-color: #D66361;
// Search color palette
--search-back-color: #FFFFFF;
--search-fore-color: #0D0E17;
--search-placeholder-color: #C5C6CD;
--search-shadow-color: rgba(0, 32, 128, 0.1);
--search-shadow-focus-color: rgba(0, 32, 128, 0.17);
// Button color palette
--button-back-color-a: #3B3EFC;
--button-back-color-b: #DC325F;
--button-fore-color: #FFFFFF;
--button-shadow-color: rgba(0, 0, 0, 0.25);
--button-shadow-focus-color: rgba(0, 0, 0, 0.29);
--button-example-toggler-fore-color: #607d8b;
// Card color palette
--card-back-color: #FFFFFF;
--card-fore-color: #212121;
--card-fore-color-light: #424242;
--card-shadow-color-a: rgba(240, 242, 247, 0.1);
--card-shadow-color-b: rgba(0, 32, 128, 0.1);
// Pre & Code color palette
--pre-fore-color: #e57373;
--pre-back-color: #1e253d;
--pre-selected-color: #041248;
// Token color palette
--token-color-a: #7f99a5; // Comments
--token-color-b: #bdbdbd; // Punctuation
--token-color-c: #64b5f6; // Functions
--token-color-d: #ff8f00; // Numbers
--token-color-e: #c5e1a5; // Strings
--token-color-f: #ce93d8; // Keywords
--token-color-g: #26c6da; // Regular expressions
--token-color-h: #e57373; // Variables
// Tag color palette
--tag-border-color: #D7DDF3;
--tag-fore-color: #616B8F;
// Toast color palette
--toast-back-color: #05A864;
--toast-fore-color: #FFFFFF;
--toast-shadow-color: rgba(0, 32, 128, 0.26);
// Link color palette
--a-link-color: #0277bd;
--a-visited-color: #01579b;
// Code color palette
--code-fore-color: #0324AB;
--code-back-color: #EDF0FC;
--code-selected-color: #BDEDFE;
}
// Dark mode colors
.page-container.dark {
// Interface color palette
--back-color: #2A314C;
--back-color-dark: #8993BE;
--fore-color: #ABAFBF;
--fore-color-light: #858CA8;
--fore-color-lighter: #707899;
--fore-color-dark: #B4BCD9;
--fore-color-darker: #FCFCFD;
// Scrollbar
--scrollbar-back-color: #434E76;
--scrollbar-fore-color: #707899;
// Menu color palette
--menu-back-color: #434E76;
--menu-border-color: #13151B;
--menu-fore-color: #959AAC;
--menu-active-fore-color: #CDD4EF;
// Card corner palette remains unchanged for consistency
// Search color palette
--search-back-color: #434E76;
--search-fore-color: #E8E9F2;
--search-placeholder-color: #999EBD;
--search-shadow-color: rgba(1, 8, 30, 0.24);
--search-shadow-focus-color: rgba(1, 8, 30, 0.31);
// Button color palette remains unchanged for consistency
// Card color palette
--card-back-color: #434E76;
--card-fore-color: #F0F0F0;
--card-fore-color-light: #D6D6D6; // previously C0C0C0, careful
--card-shadow-color-b: rgba(1, 8, 30, 0.24);
// Pre & Code color palette remains unchanged for consistency
// Token color palette remains unchanged for consistency
// Tag color palette
--tag-border-color: #2A3765;
--tag-fore-color: #BEC1CB; // previously 999DAD, careful
// Toast color palette
--toast-shadow-color: rgba(1, 8, 30, 0.44);
// Link color palette
--a-link-color: #6DC7FD;
--a-visited-color: #5DB7FE;
// Code color palette
--code-fore-color: #d1dafe;
--code-back-color: #4f5fa0;
--code-selected-color: #0dbcfb;
}

View File

@ -0,0 +1,89 @@
// Load external fonts - progressive loading should help alleviate performance issues
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Roboto Mono'), local('RobotoMono-Regular'), url(../../../assets/RobotoMono-Regular.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Roboto Mono';
font-style: italic;
font-weight: 400;
font-display: swap;
src: local('Roboto Mono Italic'), local('RobotoMono-Italic'), url(../../../assets/RobotoMono-Italic.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 500;
src: local('Roboto Mono Medium'), local('RobotoMono-Medium'), url(../../../assets/RobotoMono-Medium.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
font-display: swap;
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 300;
font-display: swap;
src: local('Noto Sans Light'), local('NotoSans-Light'), url(../../../assets/NotoSans-Light.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 300;
font-display: swap;
src: local('Noto Sans LightItalic'), local('NotoSans-LightItalic'), url(../../../assets/NotoSans-LightItalic.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Noto Sans'), local('NotoSans-Regular'), url(../../../assets/NotoSans-Regular.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 400;
font-display: swap;
src: local('Noto Sans Italic'), local('NotoSans-Italic'), url(../../../assets/NotoSans-Italic.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 500;
font-display: swap;
src: local('Noto Sans Medium'), local('NotoSans-Medium'), url(../../../assets/NotoSans-Medium.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 500;
font-display: swap;
src: local('Noto Sans Medium Italic'), local('NotoSans-MediumItalic'), url(../../../assets/NotoSans-MediumItalic.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Noto Sans';
font-style: normal;
font-weight: 600;
font-display: swap;
src: local('Noto Sans SemiBold'), local('NotoSans-SemiBold'), url(../../../assets/NotoSans-SemiBold.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Noto Sans';
font-style: italic;
font-weight: 600;
font-display: swap;
src: local('Noto Sans SemiBold Italic'), local('NotoSans-SemiBoldItalic'), url(../../../assets/NotoSans-SemiBoldItalic.ttf) format('truetype');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

View File

@ -0,0 +1,340 @@
// ===================================================
// Layout
// ===================================================
// Grid container
.page-container {
overflow: hidden;
transition: 0.3s ease all;
background: var(--back-color);
display: grid;
width: 100vw;
height: 100vh;
grid-template-areas: "content" "menu";
grid-template-columns: 100%;
grid-template-rows: calc(100vh - 62px) 62px;
// Medium screen size (mobile landscape, tablet)
@media screen and (min-width: $layout-medium-breakpoint) {
grid-template-areas: "menu content";
grid-template-columns: 62px calc(100vw - 62px);
grid-template-rows: 100%;
}
// Large screen size (desktop, laptop)
@media screen and (min-width: $layout-large-breakpoint) {
grid-template-areas: "menu . content .";
grid-template-columns: 62px calc((100vw - 830px) / 2) 768px calc((100vw - 830px) / 2);
}
}
// Menu container
header.menu {
grid-area: menu;
}
// Content container
.content {
transition: 0.3s ease all;
grid-area: content;
overflow: auto;
background: var(--back-color);
&::-webkit-scrollbar-track {
background-color: var(--scrollbar-back-color);
margin: 0.5rem 0;
border-radius: 0.125rem;
}
&::-webkit-scrollbar {
width: 4px;
background: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-fore-color);
border: 1px solid var(--scrollbar-fore-color-lighter);
border-radius: 0.125rem;
}
}
// Website title
h1.website-title {
transition: 0.3s ease all;
font-size: 0.875rem;
font-weight: 500;
color: var(--fore-color-lighter);
line-height: 1.5;
position: relative;
top: 4px;
margin: 1.5rem 1.25rem 0.125rem;
@media screen and (min-width: $layout-large-breakpoint) {
font-size: 1rem;
line-height: 1.375;
}
}
// Website logo
img.website-logo {
transition: 0.3s ease all;
position: absolute;
top: 8px;
right: 0px;
width: 48px;
height: 48px;
}
// Homepage logo
.index-logo {
transition: 0.3s ease all;
display: block;
margin: 1.5rem 1.25rem 0.5rem;
vertical-align: middle;
@media screen and (min-width: 144px) {
max-width: 128px;
margin: 1.5rem auto 0.5rem;
}
@media screen and (min-width: $layout-medium-breakpoint) {
display: inline-block;
margin: 1.5rem 2rem 0.5rem 1.25rem;
}
}
// Homepage title
.index-title {
transition: 0.3s ease all;
font-size: 2rem;
color: var(--fore-color-dark);
@media screen and (min-width: $layout-medium-breakpoint) {
display: inline-block;
}
margin: 0.75rem 1.25rem;
text-align: center;
}
// Homepage subtitle
.index-sub-title {
transition: 0.3s ease all;
font-size: 0.875rem;
line-height: 1.5;
margin: 1rem 1.25rem 1.25rem;
color: var(--fore-color);
text-align: center;
@media screen and (min-width: $layout-medium-breakpoint) {
font-size: 1rem;
}
}
// Page title
.page-title {
font-size: 2.25rem;
font-weight: 400;
line-height: 1.36;
letter-spacing: 0.03em;
color: var(--fore-color-darker);
margin: 0 1.25rem;
@media screen and (min-width: $layout-large-breakpoint) {
font-size: 2.5rem;
line-height: 1.35;
}
}
// Page subtitle
.page-sub-title {
transition: 0.3s ease all;
font-size: 1.125rem;
line-height: 1.35;
margin: 1rem 1.25rem 0.5rem;
color: var(--fore-color);
@media screen and (min-width: $layout-large-breakpoint) {
font-size: 1.25rem;
}
}
// Page light subtitle
p.light-sub {
transition: 0.3s ease all;
color: var(--fore-color-light);
font-size: 0.875rem;
line-height: 1.5;
margin: 0.125rem 1.25rem 0px;
@media screen and (min-width: $layout-large-breakpoint) {
font-size: 1rem;
line-height: 1.375;
}
}
// Category/tag title
.tag-title {
transition: 0.3s ease all;
font-size: 1.125rem;
color: var(-fore-color-dark);
line-height: 1.375;
a {
&, &:link, &:visited {
color: var(--fore-color-dark);
}
}
font-weight: 400;
cursor: pointer;
margin: 1.5rem 1.25rem 0.5rem;
}
// Return to previous page link
a.link-back {
transition: 0.3s ease all;
font-size: 1.125rem;
line-height: 1.35;
display: block;
margin: 1rem 1.25rem 1.5rem;
font-weight: 500;
&, &:link, &:visited {
color: var(--fore-color-dark);
}
&:hover, &:focus {
text-decoration: none;
}
svg {
vertical-align: middle;
}
}
// About page maintainers card
.flex-row {
display: flex;
flex: 0 1 auto;
flex-flow: row wrap;
.flex-item {
flex: 0 0 auto;
max-width: calc(50% - 24px);
flex-basis: calc(50% - 24px);
margin: 12px;
@media screen and (min-width: $layout-large-breakpoint) {
max-width: calc(25% - 24px);
flex-basis: calc(25% - 24px);
}
.media-section {
max-width: 100%;
height: auto;
border-radius: 0.5rem;
}
.button-section {
font-size: 0.875rem;
font-weight: 600;
text-align: center;
width: 100%;
display: block;
&, &:link, &:visited {
font-weight: 600;
color: var(--card-fore-color);
}
}
}
}
// Page background graphic
.page-graphic {
position: relative;
box-sizing: border-box;
transition: all 0.3s ease;
margin-top: 100px;
width: 100%;
height: calc(50vmin);
&::before {
top: 0;
right: 27.5vmin;
position: absolute;
content: '';
width: 45vmin;
height: 44vmin;
background-position-x: 52.5%, center;
background-position-y: 1%, top;
background-repeat: no-repeat;
background-size: 45vmin, 44vmin;
}
padding-top: 46vmin;
text-align: center;
@media screen and (orientation: landscape) and (max-height: calc(#{$layout-medium-breakpoint} - 1px)) {
margin-top: 2rem;
padding-top: 38vmin;
height: 40vmin;
&::before {
right: calc(50vw - 45vmin / 2 - 31px);
}
}
@media screen and (min-width: $layout-large-breakpoint) {
padding-top: 2vmin;
padding-right: 400px;
&::before {
background-size: 395px, 393px;
height: 400px;
width: 400px;
right: 1.125rem;
margin-top: -2vmin;
background-position-x: 95.5%, 93%;
}
}
}
// Empty page text
.empty-page-text {
transition: color 0.3s ease, background 0.3s ease;
text-align: center;
margin: 2.25rem auto 0.75rem;
max-width: 200px;
font-size: 1rem;
line-height: 1.5;
color: var(--fore-color-darker);
font-weight: 400;
@media screen and (min-width: $layout-medium-breakpoint) {
max-width: 400px;
}
@media screen and (min-width: $layout-large-breakpoint) {
font-size: 1.75rem;
line-height: 1.35;
margin: 2.25rem auto 1.375rem 1.25rem;
&.search-page-text {
margin-top: 12vmin;
font-size: 1.375rem;
line-height: 1.375;
}
}
}
.empty-page-subtext {
transition: all 0.3s ease;
text-align: center;
font-size: 14px;
font-weight: 400;
line-height: 1.5;
max-width: 200px;
color: var(--fore-color-darker);
margin: 0.5rem auto;
@media screen and (min-width: $layout-medium-breakpoint) {
max-width: 256px;
}
@media screen and (min-width: $layout-large-breakpoint) {
font-size: 1.125rem;
line-height: 1.375;
}
}
// Background graphic styles and dark mode
.search-empty::before {
background-image: url("data:image/svg+xml,%3Csvg width='154' height='148' viewBox='0 0 154 148' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='72.7688' y1='68.1962' x2='88.5602' y2='83.9877' stroke='%23575E7A' stroke-width='2'/%3E%3Crect x='97.8234' y='75.055' width='76.9574' height='23.2664' rx='11.6332' transform='rotate(45 97.8234 75.055)' stroke='%23575E7A' stroke-width='2'/%3E%3Cpath d='M81.3085 50.7431C81.9744 47.8236 82.3261 44.7844 82.3261 41.6631C82.3261 35.0791 80.7613 28.8607 77.9834 23.3593' stroke='%23575E7A' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M56.2702 3.70245C51.7367 1.95686 46.8116 1 41.663 1C19.2055 1 1 19.2055 1 41.663C1 64.1206 19.2055 82.3261 41.663 82.3261C59.2695 82.3261 74.2624 71.1364 79.9182 55.4806' stroke='%23575E7A' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M62.1442 6.52702C65.6967 8.6023 68.9061 11.2009 71.6667 14.2172' stroke='%23575E7A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg width='152' height='150' viewBox='0 0 152 150' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M147.38 72.8499C153.437 95.1096 155.456 105.228 141.323 129.511C127.191 153.794 94.8556 149.747 72.6806 149.747C32.5402 149.747 0 117.131 0 76.8971C0 36.6632 34.5591 0 74.6995 0C114.84 0 141.323 50.5902 147.38 72.8499Z' fill='%23D7DDF3'/%3E%3C/svg%3E");
}
.search-no-results::before {
background-image: url("data:image/svg+xml,%3Csvg width='154' height='148' viewBox='0 0 154 148' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='72.7688' y1='68.1962' x2='88.5602' y2='83.9877' stroke='%23575E7A' stroke-width='2'/%3E%3Crect x='97.8234' y='75.055' width='76.9574' height='23.2664' rx='11.6332' transform='rotate(45 97.8234 75.055)' stroke='%23575E7A' stroke-width='2'/%3E%3Cpath d='M81.3085 50.7432C81.9744 47.8236 82.3261 44.7844 82.3261 41.6631C82.3261 35.0792 80.7613 28.8607 77.9834 23.3593' stroke='%23575E7A' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M56.2702 3.70245C51.7367 1.95686 46.8116 1 41.663 1C19.2055 1 1 19.2055 1 41.663C1 64.1206 19.2055 82.3261 41.663 82.3261C59.2695 82.3261 74.2624 71.1364 79.9182 55.4806' stroke='%23575E7A' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M62.1442 6.52701C65.6967 8.60229 68.9061 11.2009 71.6667 14.2172' stroke='%23575E7A' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M11.3086 38.2034C11.3086 38.2034 13.5167 41.5575 16.9242 41.3193C20.3318 41.081 22.0516 37.4522 22.0516 37.4522M18.1449 58.7766C18.1449 58.7766 23.8094 54.872 31.061 54.3649C38.3125 53.8578 43.9281 56.9737 43.9281 56.9737M34.2526 36.599C34.2526 36.599 36.2089 39.9708 39.8682 39.7149C43.5276 39.459 44.9956 35.8478 44.9956 35.8478' stroke='%23575E7A' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"), url("data:image/svg+xml,%3Csvg width='152' height='150' viewBox='0 0 152 150' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M147.38 72.8499C153.437 95.1096 155.456 105.228 141.323 129.511C127.191 153.794 94.8556 149.747 72.6806 149.747C32.5402 149.747 0 117.131 0 76.8971C0 36.6632 34.5591 0 74.6995 0C114.84 0 141.323 50.5902 147.38 72.8499Z' fill='%23D7DDF3'/%3E%3C/svg%3E");
}
.page-not-found::before {
background-image: url("data:image/svg+xml,%3Csvg width='160' height='109' viewBox='0 0 160 109' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 7.99999C1 4.134 4.13401 1 8 1H95.1429H152C155.866 1 159 4.13401 159 8V100.571C159 104.437 155.866 107.571 152 107.571H8C4.13401 107.571 1 104.437 1 100.571V7.99999Z' stroke='%23575E7A' stroke-width='2'/%3E%3Cline x1='1' y1='17.8571' x2='83.5714' y2='17.8571' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='100.429' y1='17.8571' x2='116.714' y2='17.8571' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='128.429' y1='17.8571' x2='159' y2='17.8571' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='8.57138' cy='9.7142' r='1.85714' stroke='%23575E7A' stroke-width='2'/%3E%3Ccircle cx='17.7142' cy='9.7142' r='1.85714' stroke='%23575E7A' stroke-width='2'/%3E%3Ccircle cx='26.8573' cy='9.7142' r='1.85714' stroke='%23575E7A' stroke-width='2'/%3E%3Cline x1='33.9856' y1='38.2856' x2='41.4608' y2='45.7608' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='34.4762' y1='45.761' x2='41.9513' y2='38.2858' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='105.414' y1='38.2856' x2='112.889' y2='45.7608' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='105.905' y1='45.761' x2='113.38' y2='38.2858' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M49.8545 69.0772C49.8545 69.0772 57.5257 73.6485 72.1402 73.6485C86.7117 73.6485 94.4259 69.0771 94.4259 69.0771' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M72.1526 78.5698C72.3093 86.3002 68.3437 92.6498 63.2953 92.7521C58.2469 92.8544 54.0273 86.6706 53.8707 78.9402C53.8129 76.0901 54.3155 73.4277 55.2261 71.1969' stroke='%23575E7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M64.6687 73.7268C64.8334 73.1997 64.5396 72.6388 64.0125 72.4741C63.4853 72.3093 62.9245 72.6031 62.7597 73.1303L64.6687 73.7268ZM61.8707 88.7359C61.9615 89.2807 62.4768 89.6487 63.0215 89.5579C63.5663 89.4671 63.9343 88.9519 63.8435 88.4071L61.8707 88.7359ZM62.7597 73.1303C61.2791 77.8683 60.9909 83.4569 61.8707 88.7359L63.8435 88.4071C63.009 83.4002 63.2922 78.1317 64.6687 73.7268L62.7597 73.1303Z' fill='%23575E7A'/%3E%3C/svg%3E%0A"), url("data:image/svg+xml,%3Csvg width='172' height='170' viewBox='0 0 172 170' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M85.7456 16.9208C110.886 -6.48267 132.959 -4.28052 156.498 15.4794C180.037 35.2393 174.047 84.4687 153.005 119.028C128.204 159.761 84.2197 174.845 40.8539 167.344C-2.51188 159.842 -6.55002 107.678 7.88005 65.9713C22.3101 24.2642 60.6055 40.3243 85.7456 16.9208Z' fill='%23D7DDF3'/%3E%3C/svg%3E%0A");
background-position-x: 53.5%, center;
background-position-y: 8.5%, top;
background-size: 41vmin, 44vmin;
&::before {
background-size: 395px, 393px;
height: 400px;
width: 400px;
right: 1.125rem;
margin-top: -15vmin;
background-position-x: 95.5%, 93%;
}
@media screen and (min-width: $layout-large-breakpoint) {
background-size: 367px, 393px;
background-position-x: 96.5%, 93%;
}
}
.page-container.dark {
.search-empty::before {
background-image: url("data:image/svg+xml,%3Csvg width='154' height='148' viewBox='0 0 154 148' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='72.7688' y1='68.1962' x2='88.5602' y2='83.9877' stroke='%238993BE' stroke-width='2'/%3E%3Crect x='97.8234' y='75.055' width='76.9574' height='23.2664' rx='11.6332' transform='rotate(45 97.8234 75.055)' stroke='%238993BE' stroke-width='2'/%3E%3Cpath d='M81.3085 50.7431C81.9744 47.8236 82.3261 44.7844 82.3261 41.6631C82.3261 35.0791 80.7613 28.8607 77.9834 23.3593' stroke='%238993BE' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M56.2702 3.70245C51.7367 1.95686 46.8116 1 41.663 1C19.2055 1 1 19.2055 1 41.663C1 64.1206 19.2055 82.3261 41.663 82.3261C59.2695 82.3261 74.2624 71.1364 79.9182 55.4806' stroke='%238993BE' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M62.1442 6.52702C65.6967 8.6023 68.9061 11.2009 71.6667 14.2172' stroke='%238993BE' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg width='152' height='150' viewBox='0 0 152 150' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M147.38 72.8499C153.437 95.1096 155.456 105.228 141.323 129.511C127.191 153.794 94.8556 149.747 72.6806 149.747C32.5402 149.747 0 117.131 0 76.8971C0 36.6632 34.5591 0 74.6995 0C114.84 0 141.323 50.5902 147.38 72.8499Z' fill='%23555C7C'/%3E%3C/svg%3E");
}
.search-no-results::before {
background-image: url("data:image/svg+xml,%3Csvg width='154' height='148' viewBox='0 0 154 148' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='72.7688' y1='68.1962' x2='88.5602' y2='83.9877' stroke='%238993BE' stroke-width='2'/%3E%3Crect x='97.8234' y='75.055' width='76.9574' height='23.2664' rx='11.6332' transform='rotate(45 97.8234 75.055)' stroke='%238993BE' stroke-width='2'/%3E%3Cpath d='M81.3085 50.7432C81.9744 47.8236 82.3261 44.7844 82.3261 41.6631C82.3261 35.0792 80.7613 28.8607 77.9834 23.3593' stroke='%238993BE' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M56.2702 3.70245C51.7367 1.95686 46.8116 1 41.663 1C19.2055 1 1 19.2055 1 41.663C1 64.1206 19.2055 82.3261 41.663 82.3261C59.2695 82.3261 74.2624 71.1364 79.9182 55.4806' stroke='%238993BE' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M62.1442 6.52701C65.6967 8.60229 68.9061 11.2009 71.6667 14.2172' stroke='%238993BE' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M11.3086 38.2034C11.3086 38.2034 13.5167 41.5575 16.9242 41.3193C20.3318 41.081 22.0516 37.4522 22.0516 37.4522M18.1449 58.7766C18.1449 58.7766 23.8094 54.872 31.061 54.3649C38.3125 53.8578 43.9281 56.9737 43.9281 56.9737M34.2526 36.599C34.2526 36.599 36.2089 39.9708 39.8682 39.7149C43.5276 39.459 44.9956 35.8478 44.9956 35.8478' stroke='%238993BE' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"), url("data:image/svg+xml,%3Csvg width='152' height='150' viewBox='0 0 152 150' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M147.38 72.8499C153.437 95.1096 155.456 105.228 141.323 129.511C127.191 153.794 94.8556 149.747 72.6806 149.747C32.5402 149.747 0 117.131 0 76.8971C0 36.6632 34.5591 0 74.6995 0C114.84 0 141.323 50.5902 147.38 72.8499Z' fill='%23555C7C'/%3E%3C/svg%3E");
}
.page-not-found::before {
background-image: url("data:image/svg+xml,%3Csvg width='160' height='109' viewBox='0 0 160 109' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 7.99999C1 4.134 4.13401 1 8 1H95.1429H152C155.866 1 159 4.13401 159 8V100.571C159 104.437 155.866 107.571 152 107.571H8C4.13401 107.571 1 104.437 1 100.571V7.99999Z' stroke='%238993BE' stroke-width='2'/%3E%3Cline x1='1' y1='17.8571' x2='83.5714' y2='17.8571' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='100.429' y1='17.8571' x2='116.714' y2='17.8571' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='128.429' y1='17.8571' x2='159' y2='17.8571' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='8.57138' cy='9.7142' r='1.85714' stroke='%238993BE' stroke-width='2'/%3E%3Ccircle cx='17.7142' cy='9.7142' r='1.85714' stroke='%238993BE' stroke-width='2'/%3E%3Ccircle cx='26.8573' cy='9.7142' r='1.85714' stroke='%238993BE' stroke-width='2'/%3E%3Cline x1='33.9856' y1='38.2856' x2='41.4608' y2='45.7608' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='34.4762' y1='45.761' x2='41.9513' y2='38.2858' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='105.414' y1='38.2856' x2='112.889' y2='45.7608' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='105.905' y1='45.761' x2='113.38' y2='38.2858' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M49.8545 69.0772C49.8545 69.0772 57.5257 73.6485 72.1402 73.6485C86.7117 73.6485 94.4259 69.0771 94.4259 69.0771' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M72.1526 78.5698C72.3093 86.3002 68.3437 92.6498 63.2953 92.7521C58.2469 92.8544 54.0273 86.6706 53.8707 78.9402C53.8129 76.0901 54.3155 73.4277 55.2261 71.1969' stroke='%238993BE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M64.6687 73.7268C64.8334 73.1997 64.5396 72.6388 64.0125 72.4741C63.4853 72.3093 62.9245 72.6031 62.7597 73.1303L64.6687 73.7268ZM61.8707 88.7359C61.9615 89.2807 62.4768 89.6487 63.0215 89.5579C63.5663 89.4671 63.9343 88.9519 63.8435 88.4071L61.8707 88.7359ZM62.7597 73.1303C61.2791 77.8683 60.9909 83.4569 61.8707 88.7359L63.8435 88.4071C63.009 83.4002 63.2922 78.1317 64.6687 73.7268L62.7597 73.1303Z' fill='%238993BE'/%3E%3C/svg%3E%0A"), url("data:image/svg+xml,%3Csvg width='172' height='170' viewBox='0 0 172 170' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M85.7456 16.9208C110.886 -6.48267 132.959 -4.28052 156.498 15.4794C180.037 35.2393 174.047 84.4687 153.005 119.028C128.204 159.761 84.2197 174.845 40.8539 167.344C-2.51188 159.842 -6.55002 107.678 7.88005 65.9713C22.3101 24.2642 60.6055 40.3243 85.7456 16.9208Z' fill='%23555C7C'/%3E%3C/svg%3E%0A");
}
}

View File

@ -0,0 +1,85 @@
// ===================================================
// Menu
// ===================================================
.menu {
// z-index: 8;
transition: 0.3s ease all;
// Menu container
background: var(--menu-back-color);
border-top: 1px solid var(--menu-border-color);
@media screen and (max-width: calc(#{$layout-medium-breakpoint} - 1px)) {
position: fixed;
bottom: 0;
width: 100vw;
z-index: 1001;
}
@media screen and (min-width: $layout-medium-breakpoint) {
border-top: none;
border-right: 1px solid var(--menu-border-color);
padding-top: 17vh;
}
@media screen and (min-width: $layout-large-breakpoint) {
padding-top: 23.5vh;
}
// Menu buttons
.menu-button {
cursor: pointer;
transition: 0.3s ease all;
background: transparent;
color: var(--menu-fore-color);
display: inline-block;
width: 25%;
height: 61px;
margin: 0;
text-align: center;
margin-top: 0.5rem;
border: none;
line-height: 61px;
@media screen and (min-width: $layout-medium-breakpoint) {
height: 12.5vh;
width: 100%;
margin-top: 1vh;
margin-bottom: 4vh;
line-height: 12.5vh;
}
@media screen and (min-width: $layout-large-breakpoint) {
margin-bottom: 1vh;
}
&:hover, &:focus {
outline: 0;
color: var(--menu-active-fore-color);
}
&.active {
color: var(--menu-active-fore-color);
svg {
color: var(--menu-active-fore-color);
}
}
svg {
color: var(--menu-fore-color);
}
&:last-of-type {
vertical-align: top;
}
}
}
// Animate transition between light and dark mode
.cross-fade-leave {
transform: scale(1);
}
.cross-fade-leave.cross-fade-leave-active {
transition: all 0.3s cubic-bezier(0.47, 0, 0.745, 0.715);
transform: scale(0.1);
}
.cross-fade-enter {
transform: scale(0.1);
}
.cross-fade-enter.cross-fade-enter-active {
transition: all 0.3s cubic-bezier(0.215, 0.610, 0.355, 1);
transform: scale(0.95)
}
.cross-fade-height {
height: 61px;
transition: height 0.15s ease-in-out 0.15s;
}

135
src/docs/styles/_reset.scss Normal file
View File

@ -0,0 +1,135 @@
// Set up some basic styling for everything
html {
font-size: 16px;
scroll-behavior: smooth;
}
html, * {
font-family: 'Noto Sans', Helvetica, sans-serif;
line-height: 1.5;
// Prevent adjustments of font size after orientation changes in mobile.
-webkit-text-size-adjust: 100%;
}
* {
font-size: 1rem;
font-weight: 400;
}
// Apply fixes and defaults as necessary for modern browsers only
a, b, del, em, i, ins, q, span, strong, u {
transition: 0.3s ease all;
font-size: 1em; // Fix for elements inside headings not displaying properly.
}
body {
margin: 0;
color: var(--fore-color);
background: var(--background-color);
overflow-x: hidden;
&.card-page {
background: var(--card-page-color);
}
}
// Correct display for Edge & Firefox.
details {
display: block;
}
// Correct display in all browsers.
summary {
display: list-item;
}
// Abbreviations
abbr[title] {
border-bottom: none; // Remove bottom border in Firefox 39-.
text-decoration: underline dotted; // Opinionated style-fix for all browsers.
}
// Show overflow in Edge.
input {
overflow: visible;
}
// Correct the cursor style of increment and decrement buttons in Chrome.
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
height: auto;
}
// Correct style in Chrome and Safari.
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
// Correct style in Chrome and Safari.
[type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
// Make images responsive by default.
img {
max-width: 100%;
height: auto;
}
// Style headings according to material design guidelines
h1, h2, h3, h4, h5, h6 {
line-height: 1.2;
margin: 0.75rem 0.5rem;
}
h1 {
font-size: 6rem;
&.landing-title {
font-size: 3rem;
text-align: center;
& small {
display: block;
margin-top: 0.5rem;
color: var(--secondary-fore-color);
}
margin-bottom: 4rem;
}
}
h2 {
font-size: 3.75rem;
}
h3 {
font-size: 3rem;
}
h4 {
font-size: 2.125rem;
}
h5 {
font-size: 1.5rem;
}
h6 {
font-size: 1.25rem;
}
// Style textual elements
p {
margin: 0.5rem;
}
ol, ul {
margin: 0.5rem;
padding-left: 1rem;
}
b, strong {
font-weight: 600;
}
hr {
// Fixes and defaults for styling
box-sizing: content-box;
border: 0;
// Actual styling using variables
line-height: 1.25em;
margin: 0.5rem;
height: 1px;
background: linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
}
sup, sub, code, kbd {
line-height: 0;
position: relative;
vertical-align: baseline;
}
a {
text-decoration: none;
&:link{
color: var(--a-link-color);
}
&:visited {
color: var(--a-visited-color);
}
&:hover, &:focus {
text-decoration: underline;
}
}

View File

@ -0,0 +1,57 @@
// ===================================================
// Search
// ===================================================
[type="search"].search-box {
transition: 0.3s ease all;
margin: 0.25rem 0.875rem;
width: calc(100% - 1.75rem);
background: var(--search-back-color);
box-shadow: 0px 4px 8px var(--search-shadow-color);
&:focus {
box-shadow: 0px 6px 12px var(--search-shadow-focus-color);
}
border-radius: 1.125rem;
outline: none;
box-sizing: border-box;
border: none;
padding-left: 2.5rem;
font-size: 1.125rem;
font-weight: 300;
line-height: 2;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23C5C6CD' stroke-width='1.5' stroke-linecap='round' strokelinejoin='round' className='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position-x: 10px;
background-position-y: 8px;
color: var(--search-fore-color);
&::placeholder {
color: var(--search-placeholder-color);
}
@media screen and (min-width: $layout-large-breakpoint) {
font-size: 1.375rem;
line-height: 1.8;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23C5C6CD' stroke-width='1.5' stroke-linecap='round' strokelinejoin='round' className='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}
}
// Dark mode
.page-container.dark [type="search"].search-box {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999EBD' stroke-width='1.5' stroke-linecap='round' strokelinejoin='round' className='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
@media screen and (min-width: $layout-large-breakpoint) {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999EBD' stroke-width='1.5' stroke-linecap='round' strokelinejoin='round' className='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}
}
.search-box::-webkit-input-placeholder {
font-family: 'Noto Sans', Helvetica, sans-serif;
}
.search-box:-ms-input-placeholder {
font-family: 'Noto Sans', Helvetica, sans-serif;
}
.search-box:-moz-placeholder {
font-family: 'Noto Sans', Helvetica, sans-serif;
}
.search-box::-moz-placeholder {
font-family: 'Noto Sans', Helvetica, sans-serif;
}

View File

@ -0,0 +1,33 @@
// ===================================================
// Toast
// ===================================================
.toast {
position: fixed;
bottom: 16px;
margin-bottom: 0;
font-size: 0.75rem;
line-height: 1.5;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1111;
color: var(--toast-fore-color);
background: var(--toast-back-color);
border-radius: 2rem;
padding: 0.375rem 1.375rem 0.375rem 2.75rem;
box-shadow: 0px 0.25rem 0.5rem var(--toast-shadow-color);
transition: all 0.3s ease;
// Toast icon
&::before {
position: absolute;
content: '';
display: block;
top: 1px;
left: 1px;
height: 28px;
background: white;
width: 28px;
border-radius: 100%;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2305A864' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-check'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
background-position: center;
}
}

View File

@ -0,0 +1,14 @@
// Layout breakpoints
$layout-medium-breakpoint: 600px;
$layout-large-breakpoint: 900px;
@import 'fonts';
@import 'colors';
@import 'reset';
@import 'layout';
@import 'menu';
@import 'search';
@import 'button';
@import 'card';
@import 'code';
@import 'toast';

107
src/docs/templates/SnippetPage.js vendored Normal file
View File

@ -0,0 +1,107 @@
import React from 'react';
import { graphql } from 'gatsby';
import { connect } from 'react-redux';
import Meta from '../components/Meta';
import Shell from '../components/Shell';
import SnippetCard from '../components/SnippetCard';
import BackArrowIcon from '../components/SVGs/BackArrowIcon';
import AniLink from 'gatsby-plugin-transition-link/AniLink';
// ===================================================
// Individual snippet page template
// ===================================================
const SnippetPage = props => {
const post = props.data.markdownRemark;
const postData = props.data.snippetDataJson.data.find(
v => v.title === post.frontmatter.title,
);
return (
<>
<Meta title={post.frontmatter.title} description={post.excerpt} />
<Shell>
<AniLink
className='link-back'
to={`${props.lastPageUrl}`}
cover
direction='right'
bg={props.isDarkMode ? '#434E76' : '#FFFFFF'}
>
<BackArrowIcon />
&nbsp;&nbsp;Back to {props.lastPageTitle}
</AniLink>
<SnippetCard
snippetData={{
title: postData.title,
html: post.html,
code: postData.attributes.codeBlocks.code,
tags: postData.attributes.tags,
}}
isDarkMode={props.isDarkMode}
/>
</Shell>
</>
);
};
export default connect(
state => ({
isDarkMode: state.app.isDarkMode,
lastPageTitle: state.app.lastPageTitle,
lastPageUrl: state.app.lastPageUrl,
searchQuery: state.app.searchQuery,
}),
null,
)(SnippetPage);
export const pageQuery = graphql`
query BlogPostBySlug($slug: String!) {
logo: file(absolutePath: { regex: "/logo_reverse_md.png/" }) {
id
childImageSharp {
fixed(height: 45, width: 45) {
src
}
}
}
allMarkdownRemark {
edges {
node {
fields {
slug
}
fileAbsolutePath
frontmatter {
title
}
}
}
}
markdownRemark(fields: { slug: { eq: $slug } }) {
id
fields {
slug
}
excerpt(pruneLength: 160)
html
frontmatter {
title
}
}
snippetDataJson(meta: { type: { eq: "snippetArray" } }) {
data {
title
id
attributes {
text
codeBlocks {
code
example
}
tags
}
}
}
}
`;

84
src/docs/templates/TagPage.js vendored Normal file
View File

@ -0,0 +1,84 @@
import React from 'react';
import { graphql } from 'gatsby';
import { connect } from 'react-redux';
import { pushNewPage } from '../state/app';
import Meta from '../components/Meta';
import Shell from '../components/Shell';
import SnippetCard from '../components/SnippetCard';
import { capitalize, getRawCodeBlocks as getCodeBlocks } from '../util';
// ===================================================
// Individual snippet category/tag page
// ===================================================
const TagRoute = props => {
const posts = props.data.allMarkdownRemark.edges;
const tag = props.pageContext.tag;
React.useEffect(() => {
props.dispatch(pushNewPage(capitalize(tag), props.path));
}, []);
return (
<>
<Meta title={capitalize(tag)} />
<Shell>
<h2 className='page-title'>{capitalize(tag)}</h2>
<p className='light-sub'>Click on a snippet's name to view its code.</p>
{posts &&
posts.map(({ node }) => (
<SnippetCard
key={`snippet_${node.id}`}
short
snippetData={{
title: node.frontmatter.title,
html: node.html,
code: getCodeBlocks(node.rawMarkdownBody).code,
tags: node.frontmatter.tags.split(',').map(v => v.trim()),
id: node.fields.slug.slice(1),
}}
isDarkMode={props.isDarkMode}
/>
))}
</Shell>
</>
);
};
export default connect(
state => ({
isDarkMode: state.app.isDarkMode,
lastPageTitle: state.app.lastPageTitle,
lastPageUrl: state.app.lastPageUrl,
searchQuery: state.app.searchQuery,
}),
null,
)(TagRoute);
export const tagPageQuery = graphql`
query TagPage($tagRegex: String) {
allMarkdownRemark(
limit: 1000
sort: { fields: [frontmatter___title], order: ASC }
filter: { frontmatter: { tags: { regex: $tagRegex } } }
) {
totalCount
edges {
node {
excerpt(pruneLength: 400)
id
html
rawMarkdownBody
fields {
slug
}
frontmatter {
title
tags
}
}
}
}
}
`;

114
src/docs/util/index.js Normal file
View File

@ -0,0 +1,114 @@
const config = require('../../../config');
// Capitalizes the first letter of a string
const capitalize = (str, lowerRest = false) =>
str.slice(0, 1).toUpperCase() +
(lowerRest ? str.slice(1).toLowerCase() : str.slice(1));
// Get the textual content in a gatsby page
const getTextualContent = (str, noExplain = false) => {
const regex = /([\s\S]*?)<div class="gatsby-highlight"/g;
const results = [];
let m = null;
while ((m = regex.exec(str)) !== null) {
if (m.index === regex.lastIndex) regex.lastIndex += 1;
m.forEach((match, groupIndex) => {
results.push(match);
});
}
if(noExplain)
return results[1].slice(0, results[1].lastIndexOf('<p>'));
return results[1];
};
// Gets the code blocks in a gatsby page
const getCodeBlocks = str => {
const regex = /<pre[.\S\s]*?<\/pre>/g;
let results = [];
let m = null;
while ((m = regex.exec(str)) !== null) {
if (m.index === regex.lastIndex) regex.lastIndex += 1;
// eslint-disable-next-line
m.forEach((match, groupIndex) => {
results.push(match);
});
}
const replacer = new RegExp(
`<pre class="language-${config.language}"><code class="language-${config.language}">([\\s\\S]*?)</code></pre>`,
'g',
);
results = results.map(v => v.replace(replacer, '$1').trim());
return {
code: results[0],
example: results[1],
};
};
// Optimizes nodes in an HTML string
const optimizeNodes = (data, regexp, replacer) => {
let count = 0;
let output = data;
do {
output = output.replace(regexp, replacer);
count = 0;
while (regexp.exec(output) !== null) ++count;
} while (count > 0);
return output;
};
const optimizeAllNodes = html => {
let output = html;
// Optimize punctuation nodes
output = optimizeNodes(
output,
/<span class="token punctuation">([^\0<]*?)<\/span>([\n\r\s]*)<span class="token punctuation">([^\0]*?)<\/span>/gm,
(match, p1, p2, p3) =>
`<span class="token punctuation">${p1}${p2}${p3}</span>`,
);
// Optimize operator nodes
output = optimizeNodes(
output,
/<span class="token operator">([^\0<]*?)<\/span>([\n\r\s]*)<span class="token operator">([^\0]*?)<\/span>/gm,
(match, p1, p2, p3) =>
`<span class="token operator">${p1}${p2}${p3}</span>`,
);
// Optimize keyword nodes
output = optimizeNodes(
output,
/<span class="token keyword">([^\0<]*?)<\/span>([\n\r\s]*)<span class="token keyword">([^\0]*?)<\/span>/gm,
(match, p1, p2, p3) => `<span class="token keyword">${p1}${p2}${p3}</span>`,
);
return output;
};
// Gets the code blocks for a snippet file.
const getRawCodeBlocks = str => {
const regex = /```[.\S\s]*?```/g;
let results = [];
let m = null;
while ((m = regex.exec(str)) !== null) {
if (m.index === regex.lastIndex) regex.lastIndex += 1;
// eslint-disable-next-line
m.forEach((match, groupIndex) => {
results.push(match);
});
}
const replacer = new RegExp(
`\`\`\`${config.language}([\\s\\S]*?)\`\`\``,
'g',
);
results = results.map(v => v.replace(replacer, '$1').trim());
return {
code: results[0],
example: results[1],
};
};
module.exports = {
capitalize,
getTextualContent,
getCodeBlocks,
optimizeNodes,
optimizeAllNodes,
getRawCodeBlocks,
};