{"version":3,"sources":["webpack:///./node_modules/@material-ui/core/esm/Card/Card.js","webpack:///./node_modules/@material-ui/icons/NavigateBefore.js","webpack:///./node_modules/@material-ui/icons/NavigateNext.js","webpack:///./node_modules/@material-ui/core/esm/CardActions/CardActions.js","webpack:///./node_modules/@material-ui/core/esm/CardContent/CardContent.js","webpack:///./src/templates/blogs.js"],"names":["Card","props","ref","classes","className","_props$raised","raised","other","root","elevation","overflow","name","_interopRequireDefault","_interopRequireWildcard","Object","defineProperty","exports","value","default","React","_default","createElement","d","CardActions","_props$disableSpacing","disableSpacing","spacing","display","alignItems","padding","marginLeft","CardContent","_props$component","component","Component","paddingBottom","getClasses","makeStyles","theme","blog","background","grey","i18n","title","more","BlogItem","node","lang","href","_node$frontmatter","frontmatter","date","excerpt","texts","Box","m","p","Typography","variant","Link","underline","color","dangerouslySetInnerHTML","__html","Button","getPageURL","index","Blogs","_ref","blogPath","data","pageContext","currentPage","totalPages","pages","push","NavigateBefore","NavigateNext","blogs","allMarkdownRemark","edges","Layout","Container","maxWidth","Grid","container","map","_ref2","item","xs","key","id","justifyContent","link"],"mappings":"8FAAA,4EAYIA,EAAoB,cAAiB,SAAcC,EAAOC,GAC5D,IAAIC,EAAUF,EAAME,QAClBC,EAAYH,EAAMG,UAClBC,EAAgBJ,EAAMK,OACtBA,OAA2B,IAAlBD,GAAmCA,EAC5CE,EAAQ,YAAyBN,EAAO,CAAC,UAAW,YAAa,WACnE,OAAoB,gBAAoB,IAAO,YAAS,CACtDG,UAAW,YAAKD,EAAQK,KAAMJ,GAC9BK,UAAWH,EAAS,EAAI,EACxBJ,IAAKA,GACJK,OAGU,gBAnBK,CAElBC,KAAM,CACJE,SAAU,WAgBoB,CAChCC,KAAM,WADO,CAEZX,I,kCCzBH,IAAIY,EAAyB,EAAQ,QACjCC,EAA0B,EAAQ,QACtCC,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAETD,EAAQE,aAAU,EAClB,IAAIC,EAAQN,EAAwB,EA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---src-templates-blogs-js-d7f8217aad02573c6246.js","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden'\n }\n};\nvar Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$raised = props.raised,\n raised = _props$raised === void 0 ? false : _props$raised,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"raised\"]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className),\n elevation: raised ? 8 : 1,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nexport default withStyles(styles, {\n name: 'MuiCard'\n})(Card);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"\n}), 'NavigateBefore');\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"\n}), 'NavigateNext');\nexports.default = _default;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8\n },\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar CardActions = /*#__PURE__*/React.forwardRef(function CardActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"disableSpacing\", \"classes\", \"className\"]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardActions'\n})(CardActions);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n padding: 16,\n '&:last-child': {\n paddingBottom: 24\n }\n }\n};\nvar CardContent = /*#__PURE__*/React.forwardRef(function CardContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\nexport default withStyles(styles, {\n name: 'MuiCardContent'\n})(CardContent);","import React from \"react\";\nimport Layout from \"../components/layout.js\"\n// import makeStyles from '@material-ui/core/styles/makeStyles';\nimport Container from '@material-ui/core/Container';\nimport Typography from '@material-ui/core/Typography';\nimport { graphql } from \"gatsby\";\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport Grid from '@material-ui/core/Grid';\nimport Box from '@material-ui/core/Box';\nimport Link from '@material-ui/core/Link';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport grey from '@material-ui/core/colors/grey';\nimport NavigateBefore from '@material-ui/icons/NavigateBefore';\nimport NavigateNext from '@material-ui/icons/NavigateNext';\n\nconst getClasses = makeStyles(theme => ({\n blog: {\n background: grey[50],\n }\n}));\n\nconst i18n = {\n 'cn':{\n title: '博客',\n more: '阅读更多详情',\n },\n 'en':{\n title: 'Blogs',\n more: 'Read More',\n }\n}\n\nfunction BlogItem(props){\n const { node, lang, href } = props;\n const { title, date } = node.frontmatter;\n const { excerpt} = node;\n const classes = getClasses();\n const texts = i18n[lang];\n return (\n \n \n \n \n \n {title}\n \n \n {date}\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction getPageURL(root, index){\n if(0 === index){\n return root;\n }else{\n return root + index;\n }\n}\n\nconst Blogs = ({ data, pageContext }) => {\n const defaultLang = 'cn';\n const lang = pageContext.lang || defaultLang;\n const { currentPage, totalPages } = pageContext;\n const texts = i18n[lang];\n let blogPath;\n if(lang === defaultLang){\n blogPath = '/blogs/';\n }else{\n blogPath = '/' + lang + '/blogs/';\n }\n\n var pages = [];\n if(0 !== currentPage){\n pages.push(\n \n \n \n );\n }\n for(var index = 0; index < totalPages; index++){\n if(index === currentPage){\n pages.push(\n \n {index + 1}\n \n )\n }else{\n pages.push(\n {index + 1}\n )\n }\n\n }\n if(currentPage < (totalPages -1 )){\n pages.push(\n \n \n \n );\n }\n\n\n const blogs = data.allMarkdownRemark.edges;\n return (\n \n \n \n \n {\n blogs.map( ({ node }) => {\n const { frontmatter } = node;\n let blogPath;\n if (defaultLang === lang){\n blogPath = '/blogs/' + frontmatter.date;\n }else{\n blogPath = '/' + lang + '/blogs/' + frontmatter.date;\n }\n return (\n \n \n \n )\n })\n }\n \n \n \n {\n pages.map((link) => (\n \n {link}\n \n ))\n }\n \n \n \n );\n};\n\nexport const query = graphql`\n query BlogsQuery($lang: String, $limit: Int!, $skip: Int!) {\n allMarkdownRemark(filter: {fileAbsolutePath: {regex: \"/content/blogs/\"}, frontmatter: {lang: {eq: $lang}}}, sort: {fields: [frontmatter___date], order: DESC},\n limit: $limit,\n skip: $skip\n ) {\n edges {\n node {\n id\n frontmatter {\n title\n date\n lang\n }\n excerpt(truncate: true, format: HTML)\n }\n }\n }\n }\n`;\n\nexport default Blogs;\n"],"sourceRoot":""}