23 | <%= richTextAsPlain(document.data.title) %> 24 |
25 |26 | <%= richTextAsPlain(document.data.excerpt).substring(0, 158) %> … 27 |
28 | 33 |├── assets ├── scss │ ├── atoms │ │ ├── _module.scss │ │ └── _button.scss │ ├── layouts │ │ ├── _module.scss │ │ └── _wrapper.scss │ ├── base │ │ ├── _module.scss │ │ ├── _base.scss │ │ └── _resetr.scss │ ├── pages │ │ ├── _products.scss │ │ ├── _module.scss │ │ ├── _landing-page.scss │ │ ├── _blog-home.scss │ │ ├── _page-404.scss │ │ ├── _product.scss │ │ ├── _homepage.scss │ │ └── _blog-post.scss │ ├── utils │ │ ├── _module.scss │ │ ├── _fonts.scss │ │ └── _prismic-edit-button.scss │ ├── fragments │ │ ├── _separator.scss │ │ ├── _module.scss │ │ ├── _text-block.scss │ │ ├── _banner-split.scss │ │ ├── _numeroted-items.scss │ │ ├── _products-grid.scss │ │ ├── _product-quote.scss │ │ ├── _footer.scss │ │ ├── _cta-banner.scss │ │ └── _header.scss │ └── main.scss └── js │ └── main.js ├── prismic-configuration.js ├── views ├── partials │ ├── slices │ │ ├── separator.ejs │ │ ├── text-block.ejs │ │ ├── banner-split.ejs │ │ ├── numeroted-items.ejs │ │ ├── cta-banner.ejs │ │ ├── product-quote.ejs │ │ └── products-grid.ejs │ ├── footer.ejs │ └── header.ejs ├── error.ejs ├── page-404.ejs ├── landing-page.ejs ├── blog-home.ejs ├── products.ejs ├── homepage.ejs ├── blog-post.ejs └── product.ejs ├── public └── img │ ├── coffee-bag.png │ ├── footer-background.png │ ├── burger-closed.svg │ └── burger-opened.svg ├── .editorconfig ├── webpack.dev.config.js ├── webpack.prod.config.js ├── README.md ├── link-resolver.js ├── custom_types ├── author.json ├── index.json ├── layout.json ├── blog_home.json ├── products.json ├── blog_post.json ├── product.json ├── landing_page.json └── homepage.json ├── webpack.base.config.js ├── package.json ├── bin └── www ├── .gitignore ├── app.js └── routes └── index.js /assets/scss/atoms/_module.scss: -------------------------------------------------------------------------------- 1 | @import "./button"; 2 | -------------------------------------------------------------------------------- /assets/scss/layouts/_module.scss: -------------------------------------------------------------------------------- 1 | @import "./wrapper"; 2 | -------------------------------------------------------------------------------- /assets/scss/base/_module.scss: -------------------------------------------------------------------------------- 1 | @import "./resetr"; 2 | @import "./base"; 3 | -------------------------------------------------------------------------------- /assets/scss/pages/_products.scss: -------------------------------------------------------------------------------- 1 | .products-section { 2 | padding: 70px 0 130px; 3 | } 4 | -------------------------------------------------------------------------------- /assets/scss/utils/_module.scss: -------------------------------------------------------------------------------- 1 | @import "./fonts"; 2 | @import "./prismic-edit-button"; 3 | -------------------------------------------------------------------------------- /prismic-configuration.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | endpoint: 'https://new-demo.prismic.io/api/v2' 3 | }; 4 | -------------------------------------------------------------------------------- /views/partials/slices/separator.ejs: -------------------------------------------------------------------------------- 1 |
<%= error.stack %>4 | -------------------------------------------------------------------------------- /public/img/coffee-bag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prismicio/prismic-website-demo/master/public/img/coffee-bag.png -------------------------------------------------------------------------------- /assets/scss/fragments/_separator.scss: -------------------------------------------------------------------------------- 1 | .separator-hr { 2 | border: none; 3 | border-top: 1px solid #d6d6d6; 4 | } 5 | -------------------------------------------------------------------------------- /public/img/footer-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prismicio/prismic-website-demo/master/public/img/footer-background.png -------------------------------------------------------------------------------- /assets/scss/base/_base.scss: -------------------------------------------------------------------------------- 1 | html { 2 | color: #121212; 3 | font-family: $font-sans; 4 | -webkit-font-smoothing: antialiased; 5 | -moz-osx-font-smoothing: grayscale; 6 | } 7 | -------------------------------------------------------------------------------- /assets/scss/layouts/_wrapper.scss: -------------------------------------------------------------------------------- 1 | .l-wrapper { 2 | max-width: 1190px; 3 | padding-left: 15px; 4 | padding-right: 15px; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /assets/scss/utils/_fonts.scss: -------------------------------------------------------------------------------- 1 | $font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 2 | $font-mono: "PT Mono", monospace; 3 | -------------------------------------------------------------------------------- /assets/scss/main.scss: -------------------------------------------------------------------------------- 1 | @import "./utils/module"; 2 | @import "./base/module"; 3 | @import "./layouts/module"; 4 | @import "./atoms/module"; 5 | @import "./fragments/module"; 6 | @import "./pages/module"; 7 | -------------------------------------------------------------------------------- /assets/scss/pages/_module.scss: -------------------------------------------------------------------------------- 1 | @import "./blog-home"; 2 | @import "./blog-post"; 3 | @import "./homepage"; 4 | @import "./landing-page"; 5 | @import "./page-404"; 6 | @import "./product"; 7 | @import "./products"; 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /webpack.dev.config.js: -------------------------------------------------------------------------------- 1 | const merge = require('webpack-merge'); 2 | const baseWebpackConfig = require('./webpack.base.config'); 3 | 4 | const devWebpackConfig = merge(baseWebpackConfig, { 5 | mode: 'development' 6 | }); 7 | 8 | module.exports = devWebpackConfig; 9 | -------------------------------------------------------------------------------- /webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | const merge = require('webpack-merge'); 2 | const baseWebpackConfig = require('./webpack.base.config'); 3 | 4 | const prodWebpackConfig = merge(baseWebpackConfig, { 5 | mode: 'production' 6 | }); 7 | 8 | module.exports = prodWebpackConfig; 9 | -------------------------------------------------------------------------------- /assets/js/main.js: -------------------------------------------------------------------------------- 1 | import "../scss/main.scss"; 2 | 3 | import $ from 'jquery'; 4 | 5 | $(document).ready(function () { 6 | const $header = $('#header'); 7 | 8 | $('#header-burger').on('click', function () { 9 | $header.toggleClass('header--is-nav-opened'); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /assets/scss/fragments/_module.scss: -------------------------------------------------------------------------------- 1 | @import "./banner-split"; 2 | @import "./cta-banner"; 3 | @import "./footer"; 4 | @import "./header"; 5 | @import "./numeroted-items"; 6 | @import "./product-quote"; 7 | @import "./products-grid"; 8 | @import "./separator"; 9 | @import "./text-block"; 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Prismic Website Demo 2 | 3 | ## Install dependencies 4 | 5 | ``` bash 6 | npm install 7 | ``` 8 | 9 | ## Run in development mode 10 | 11 | ``` bash 12 | npm run dev 13 | ``` 14 | 15 | Then you can access it at [http://localhost:3000](http://localhost:3000). 16 | 17 | ## Run in production mode 18 | 19 | ``` bash 20 | npm start 21 | ``` 22 | -------------------------------------------------------------------------------- /views/partials/slices/text-block.ejs: -------------------------------------------------------------------------------- 1 |
9 | 404
11 |Something is wrong
12 |The page you are looking for was moved, removed, renamed or might never existed
13 |24 | <% const product = item.link_to_product.data.product %> 25 | <%= product ? product.title : '' %> 26 |
27 |28 | <%= product ? product.country : '' %> 29 |
30 | 31 | <% } %> 32 | <% }); %> 33 |23 | <%= richTextAsPlain(document.data.title) %> 24 |
25 |26 | <%= richTextAsPlain(document.data.excerpt).substring(0, 158) %> … 27 |
28 | 33 |