├── styles
├── pages
│ ├── designPageLeft.scss
│ ├── designPageRight.scss
│ ├── allTypesPage.scss
│ ├── standardPage.scss
│ ├── allTypesPageHero2Blocks.scss
│ ├── allTypesPageHero4Blocks.scss
│ ├── standardPageHero2Blocks.scss
│ ├── standardPageHero4Blocks.scss
│ └── errorPage.scss
├── layouts
│ ├── heroVideo.scss
│ ├── galleryDynamicList.scss
│ ├── images
│ │ ├── icon-email.png
│ │ ├── slideshow-move-right.svg
│ │ └── slideshow-move-left.svg
│ ├── galleryList.scss
│ ├── verticalList.scss
│ ├── designArticle.scss
│ ├── search-results
│ │ └── searchResultsLayout.scss
│ ├── event.scss
│ ├── feature.scss
│ ├── heroImage.scss
│ ├── signUp.scss
│ └── carouselDynamicList.scss
├── components
│ ├── siteFooter
│ │ ├── footerNav.scss
│ │ └── siteFooter.scss
│ ├── viewAllButton.scss
│ ├── leadImage.scss
│ ├── shareSocial.scss
│ ├── previewComponent.scss
│ ├── authorProfile.scss
│ ├── designArticleSummary.scss
│ └── siteHeader
│ │ ├── headerNav.scss
│ │ ├── siteHeader.scss
│ │ └── search-box
│ │ └── search-box.scss
├── _settings.scss
└── app.scss
├── vue-spa.png
├── .babelrc
├── src
├── Constants.js
├── app.vue
├── components
│ ├── siteFooter
│ │ ├── footerNav.vue
│ │ └── siteFooter.vue
│ ├── viewAllButton.vue
│ ├── siteHeader
│ │ ├── search-box
│ │ │ ├── images
│ │ │ │ ├── search.svg
│ │ │ │ └── search-input-clear.svg
│ │ │ └── search-box.vue
│ │ ├── headerNav.vue
│ │ └── siteHeader.vue
│ ├── authorProfile.vue
│ ├── leadImage.vue
│ ├── designArticleSummary.vue
│ ├── shareSocial.vue
│ └── previewComponent.vue
├── pages
│ ├── errorPage.vue
│ ├── allTypesPage.vue
│ ├── standardPage.vue
│ ├── allTypesPageHero2Blocks.vue
│ ├── standardPageHero2Blocks.vue
│ ├── allTypesPageHero4Blocks.vue
│ ├── standardPageHero4Blocks.vue
│ ├── designPageRight.vue
│ └── designPageLeft.vue
├── registration.js
├── index.html
├── layouts
│ ├── galleryList.vue
│ ├── verticalList.vue
│ ├── heroImage.vue
│ ├── heroVideo.vue
│ ├── event.vue
│ ├── galleryDynamicList.vue
│ ├── signUp.vue
│ ├── feature.vue
│ ├── carouselDynamicList.vue
│ ├── designArticle.vue
│ └── search-results
│ │ └── searchResultsLayout.vue
├── images
│ ├── icon-facebook-logo.svg
│ ├── icon-twitter-logo-white.svg
│ └── icon-instagram-logo.svg
└── app.js
├── .gitignore
├── NOTICE
├── package.json
├── webpack.config.js
├── README.md
└── LICENSE
/styles/pages/designPageLeft.scss:
--------------------------------------------------------------------------------
1 | .shrink {
2 | max-width: 100%;
3 | }
--------------------------------------------------------------------------------
/styles/pages/designPageRight.scss:
--------------------------------------------------------------------------------
1 | .shrink {
2 | max-width: 100%;
3 | }
--------------------------------------------------------------------------------
/styles/layouts/heroVideo.scss:
--------------------------------------------------------------------------------
1 | .wch-hero-video {
2 | margin-top: -35px;
3 | }
--------------------------------------------------------------------------------
/vue-spa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tedster0629/Vue-Sample-site/HEAD/vue-spa.png
--------------------------------------------------------------------------------
/styles/layouts/galleryDynamicList.scss:
--------------------------------------------------------------------------------
1 | .query-gallery h3 {
2 | text-align: center;
3 | }
--------------------------------------------------------------------------------
/styles/components/siteFooter/footerNav.scss:
--------------------------------------------------------------------------------
1 | ul {
2 | list-style:none;
3 | margin-top:30px;
4 | }
--------------------------------------------------------------------------------
/styles/components/viewAllButton.scss:
--------------------------------------------------------------------------------
1 | .view-all {
2 | margin-top:30px;
3 | text-align:center;
4 | }
--------------------------------------------------------------------------------
/styles/layouts/images/icon-email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tedster0629/Vue-Sample-site/HEAD/styles/layouts/images/icon-email.png
--------------------------------------------------------------------------------
/styles/components/leadImage.scss:
--------------------------------------------------------------------------------
1 | .image-container {
2 | overflow: hidden;
3 | }
4 |
5 | .article-lead-image {
6 | img {
7 | width: 100%;
8 | }
9 | }
--------------------------------------------------------------------------------
/styles/layouts/galleryList.scss:
--------------------------------------------------------------------------------
1 | .item-selection h3 {
2 | text-align: center;
3 | }
4 |
5 | .view-all {
6 | margin-top:30px;
7 | text-align:center;
8 | }
--------------------------------------------------------------------------------
/styles/pages/allTypesPage.scss:
--------------------------------------------------------------------------------
1 | .section:nth-of-type(even) {
2 | background-color: #f7f7f7;
3 | }
4 |
5 | .section:only-child {
6 | background-color: #ffffff;
7 | }
--------------------------------------------------------------------------------
/styles/pages/standardPage.scss:
--------------------------------------------------------------------------------
1 | .section:nth-of-type(even) {
2 | background-color: #f7f7f7;
3 | }
4 |
5 | .section:only-child {
6 | background-color: #ffffff;
7 | }
--------------------------------------------------------------------------------
/styles/pages/allTypesPageHero2Blocks.scss:
--------------------------------------------------------------------------------
1 | .section:nth-of-type(even) {
2 | background-color: #f7f7f7;
3 | }
4 |
5 | .section:only-child {
6 | background-color: #ffffff;
7 | }
--------------------------------------------------------------------------------
/styles/pages/allTypesPageHero4Blocks.scss:
--------------------------------------------------------------------------------
1 | .section:nth-of-type(even) {
2 | background-color: #f7f7f7;
3 | }
4 |
5 | .section:only-child {
6 | background-color: #ffffff;
7 | }
--------------------------------------------------------------------------------
/styles/pages/standardPageHero2Blocks.scss:
--------------------------------------------------------------------------------
1 | .section:nth-of-type(even) {
2 | background-color: #f7f7f7;
3 | }
4 |
5 | .section:only-child {
6 | background-color: #ffffff;
7 | }
--------------------------------------------------------------------------------
/styles/pages/standardPageHero4Blocks.scss:
--------------------------------------------------------------------------------
1 | .section:nth-of-type(even) {
2 | background-color: #f7f7f7;
3 | }
4 |
5 | .section:only-child {
6 | background-color: #ffffff;
7 | }
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | "syntax-dynamic-import"
4 | ],
5 | "presets": [
6 | ["env", {
7 | "modules": false,
8 | "useBuiltIns": true
9 | }]
10 | ]
11 | }
--------------------------------------------------------------------------------
/src/Constants.js:
--------------------------------------------------------------------------------
1 | export const Constants = {
2 | //DOMAIN_NAME: 'your-domain-name.com',
3 | //SITE_ID: 'default',
4 | //CONTENT_HUB_ID: '0000000-0000-0000-0000-000000000000'
5 | };
6 |
--------------------------------------------------------------------------------
/styles/layouts/verticalList.scss:
--------------------------------------------------------------------------------
1 | .item-selection {
2 | h3 {
3 | text-align: center;
4 | }
5 | h4 {
6 | border-bottom: 2px solid #6b6b6b;
7 | }
8 | }
9 |
10 | .generic-list {
11 | height: 100%;
12 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 |
4 | *.log
5 | *.log.*
6 |
7 | *.patch
8 | *.swp
9 | *.idea
10 | *~
11 | /*/*~
12 |
13 | .DS_Store
14 |
15 | .yarnrc
16 | .yarnclean
17 | yarn.lock
18 |
19 | package-lock.json
20 |
--------------------------------------------------------------------------------
/styles/components/shareSocial.scss:
--------------------------------------------------------------------------------
1 | .share-buttons {
2 | display:flex;
3 | align-items:flex-start;
4 | }
5 | @media (min-width: 768px) {
6 | .share-buttons {
7 | float:right;
8 | }
9 | }
10 | .fb-share-button,
11 | .twitter-share-button {
12 | margin-right:10px;
13 | }
14 |
15 | .twitter iframe {
16 | width: 80px;
17 | height: 26px;
18 | }
--------------------------------------------------------------------------------
/styles/_settings.scss:
--------------------------------------------------------------------------------
1 | $foundation-palette: (
2 | primary: #1779ba,
3 | secondary: #767676,
4 | success: #3adb76,
5 | warning: #ffae00,
6 | alert: #cc4b37,
7 | );
8 |
9 | $titlebar-background: white;
10 | $titlebar-color: #5a5a5a;
11 | $titlebar-icon-color: #5a5a5a;
12 |
13 | $topbar-background: white;
14 |
15 | $dropdown-menu-item-color-active: #323232;
16 | $dropdownmenu-arrow-color: #323232;
17 |
18 | $button-palette: map-merge($foundation-palette, (
19 | news-btn: #000
20 | )) !default;
21 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Watson Content Hub sample site single page application
2 | Copyright IBM Corp. 2016, 2017
3 |
4 | This project is licensed under the terms of the Apache 2.0 license.
5 | http://www.apache.org/licenses/LICENSE-2.0
6 |
7 | BY DOWNLOADING, INSTALLING, COPYING, ACCESSING, CLICKING ON AN “ACCEPT” BUTTON,
8 | OR OTHERWISE USING THE PROGRAM, LICENSEE AGREES TO THE TERMS OF THIS AGREEMENT
9 |
10 | This project depends on third party open source modules as listed in the
11 | dependencies in package.json in this folder.
--------------------------------------------------------------------------------
/styles/components/previewComponent.scss:
--------------------------------------------------------------------------------
1 | .preview-container {
2 | padding: 50px 30px 30px 30px;
3 | }
4 |
5 | .msg {
6 | padding: 15px 50px;
7 | text-align: center;
8 |
9 | &.error {
10 | color: #d32f2f;
11 | }
12 |
13 | code {
14 | background-color: #f2f2f2;
15 | }
16 | }
17 |
18 | .create-thumbnail {
19 | width: 100%;
20 | padding: 10px;
21 | background-color: #ddd;
22 | border-bottom: 1px solid black;
23 | position: fixed;
24 | z-index: 1000;
25 |
26 | &:hover {
27 | background-color: #ccc;
28 | }
29 |
30 | &:active {
31 | background-color: #bbb;
32 | }
33 | }
34 |
35 | .download-thumbnail {
36 | display: none;
37 | }
38 |
--------------------------------------------------------------------------------
/src/app.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/styles/layouts/designArticle.scss:
--------------------------------------------------------------------------------
1 | .article-details {
2 | margin: 40px 0 30px 0;
3 | }
4 | @media (min-width:768px) {
5 | .article-details {
6 | display:flex;
7 | justify-content:space-between;
8 | }
9 | }
10 | .byline-and-date {
11 | margin-bottom:20px;
12 | font-weight:500;
13 | text-transform:uppercase;
14 | font-feature-settings: "smcp" 1;
15 | color:#737373;
16 | }
17 |
18 | .article-body {
19 | font-size:17.5px;
20 | }
21 | .article-body:after {
22 | content:" ";
23 | display:block;
24 | clear:both;
25 | }
26 |
27 | //For article body images
28 | .image-container {
29 | overflow: hidden;
30 | }
31 |
32 | .wrap-text-right {
33 | float: right;
34 | }
35 |
36 | .wrap-text-left {
37 | float: left;
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/styles/components/authorProfile.scss:
--------------------------------------------------------------------------------
1 | .about-the-author {
2 | display:flex;
3 | justify-content:flex-start;
4 | align-items:flex-start;
5 | clear:both;
6 | margin-top:60px;
7 | padding:10px;
8 | background:#f6f6f6;
9 | }
10 |
11 | @media (min-width:720px) {
12 | .about-the-author {
13 | padding:20px;
14 | }
15 | }
16 | @media (min-width:1200px) {
17 | .about-the-author {
18 | padding:40px;
19 | }
20 | }
21 | .about-the-author img {
22 | max-width:90px;
23 | float:left;
24 | margin-right:10px;
25 | }
26 | @media (min-width:720px) {
27 | .about-the-author img {
28 | margin-right:20px;
29 | }
30 | }
31 | @media (min-width:1200px) {
32 | .about-the-author img {
33 | margin-right:40px;
34 | }
35 | }
36 | .about-the-author h4 {
37 | margin-top:0;
38 | }
--------------------------------------------------------------------------------
/styles/components/designArticleSummary.scss:
--------------------------------------------------------------------------------
1 |
2 | .summary-card:hover img {
3 | transform:scale(1.15); /*Zoom effect*/
4 | }
5 | .summary-card-image img {
6 | max-width:100%;
7 | height:auto;
8 | transition:all .4s ease-in; /*Zoom effect*/
9 | }
10 | .summary-card-image {
11 | margin-bottom:10px;
12 | overflow:hidden; /*Zoom effect*/
13 | }
14 | @media (min-width:768px) {
15 | .summary-card-image img {
16 | max-width:100%;
17 | height:auto;
18 | }
19 | }
20 | .summary-card a {
21 | color:#222;
22 | }
23 |
24 | .summary-card {
25 | color: #0a0a0a;
26 | margin: 0 5px 10px 5px;
27 | }
28 |
29 | @media (max-width:640px) {
30 | .summary-card {
31 |
32 | img{
33 | display: block;
34 | margin: 0 auto;
35 | }
36 | p {
37 | text-align: center;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/components/siteFooter/footerNav.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
Menu
8 |
9 |
10 |
11 | {{page.name}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/components/viewAllButton.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
12 |
13 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/styles/components/siteHeader/headerNav.scss:
--------------------------------------------------------------------------------
1 | .menu {
2 | &.accordion-menu {
3 | position: absolute;
4 | z-index: 1;
5 | min-width: 80%;
6 |
7 | .is-accordion-submenu-parent:not(.has-submenu-toggle) > a::after {
8 | border-color: #323232 transparent transparent;
9 | }
10 | }
11 |
12 | a {
13 | display: block;
14 | text-decoration: none;
15 | color: #323232;
16 | margin-left:10px;
17 | transition: .3s color;
18 | font-size:18px;
19 | line-height:30px;
20 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
21 |
22 | &:hover {
23 | color: #000;
24 | }
25 |
26 | &.active {
27 | background-color: #fff;
28 | color: #000;
29 | cursor: default;
30 | border-bottom: 1px solid #000;
31 | }
32 | }
33 |
34 | .active > a {
35 | background: transparent;
36 | border-bottom: 1px solid #000;
37 | }
38 | }
--------------------------------------------------------------------------------
/src/components/siteHeader/search-box/images/search.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Artboard Copy
5 | Created with Sketch.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/styles/layouts/search-results/searchResultsLayout.scss:
--------------------------------------------------------------------------------
1 | .results {
2 | margin-bottom: 2em;
3 | }
4 | .sort-select {
5 | margin-bottom: 2em;
6 | }
7 |
8 | .search-result-item {
9 | opacity: 1;
10 | }
11 |
12 | .loading,
13 | .loading:before,
14 | .loading:after {
15 | border-radius: 50%;
16 | width: 1.5em;
17 | height: 1.5em;
18 | animation-fill-mode: both;
19 | animation: load7 2.8s infinite ease-in-out;
20 | }
21 | .loading {
22 | color: #000000;
23 | font-size: 8px;
24 | margin: 80px auto;
25 | position: relative;
26 | text-indent: -9999em;
27 | transform: translateZ(0);
28 | animation-delay: -0.16s;
29 | }
30 | .loading:before,
31 | .loading:after {
32 | content: '';
33 | position: absolute;
34 | top: 0;
35 | }
36 | .loading:before {
37 | left: -3.5em;
38 | animation-delay: -0.32s;
39 | }
40 | .loading:after {
41 | left: 3.5em;
42 | }
43 |
44 | @keyframes load7 {
45 | 0%,
46 | 80%,
47 | 100% {
48 | box-shadow: 0 2.0em 0 -1.3em;
49 | }
50 | 40% {
51 | box-shadow: 0 2.0em 0 0;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/styles/components/siteHeader/siteHeader.scss:
--------------------------------------------------------------------------------
1 | @import '~foundation-sites/scss/foundation';
2 |
3 | $logo-width-medium: 170px;
4 | $logo-width-small: 85px;
5 | $logo-height-medium: 80px;
6 |
7 | .logo-container {
8 | width: $logo-width-small;
9 |
10 | .title-bar & {
11 | margin: auto;
12 | position: relative;
13 | left: -12px;
14 | }
15 | }
16 |
17 | .logo {
18 | height: 0;
19 | padding-top: $logo-height-medium/$logo-width-medium*100%;
20 | overflow: hidden;
21 | background-size:100%;
22 | background-repeat: no-repeat;
23 | margin: 0;
24 | }
25 |
26 | @include breakpoint(medium) {
27 | .logo-container {
28 | width: $logo-width-medium;
29 | // height: 80px;
30 | }
31 | }
32 | header {
33 | border-bottom: 1px solid #efefef;
34 | }
35 |
36 | /* navigation header overrides for search */
37 | .top-bar .top-bar-right {
38 | flex: 0 1 auto;
39 | margin-left: auto;
40 | padding-right: 12%;
41 | }
42 |
43 | .top-bar .top-bar-left {
44 | flex: 1 1 auto;
45 | margin-right: auto;
46 | padding-left: 8%;
47 | }
--------------------------------------------------------------------------------
/styles/layouts/event.scss:
--------------------------------------------------------------------------------
1 | $event-text-color-gray: #737373;
2 |
3 | .event {
4 | padding: 0 0 20px 0;
5 | overflow: hidden;
6 | background: transparent;
7 | //flex: 0 0 auto;
8 | }
9 |
10 | .event-content {
11 | max-height: 100%;
12 | overflow: hidden;
13 | }
14 |
15 | .event .event-date {
16 | color: $event-text-color-gray;
17 | font-weight: 500;
18 | margin-bottom: 2px;
19 | }
20 |
21 | .event-title {
22 | margin-bottom: 15px;
23 | }
24 |
25 | .event .description {
26 | color: $event-text-color-gray;
27 | overflow: hidden;
28 | }
29 |
30 | @media (min-width: 640px) {
31 | .events {
32 | display: flex;
33 | flex-wrap: wrap;
34 | }
35 | .events > .event {
36 | flex-basis: auto;
37 | }
38 | .event {
39 | flex-basis: auto;
40 | }
41 | /*Three cards at 768px*/
42 | .event {
43 | padding: 20px;
44 | //width:31.62393162%;
45 | margin-right: 2.56410257%;
46 | }
47 | .event:nth-child(3n) {
48 | margin-right: 0;
49 | }
50 | }
51 |
52 | @media (max-width:640px)
53 | {
54 | .reveal {
55 | margin: 0 auto;
56 | position: relative;
57 | width: 75vw;
58 | max-height: 75vh;
59 | min-height: 10vh;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/components/siteHeader/search-box/images/search-input-clear.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Artboard 2 Copy
5 | Created with Sketch.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/styles/layouts/images/slideshow-move-right.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Move right
5 | Created with Sketch.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/styles/layouts/images/slideshow-move-left.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Move left icon
5 | Created with Sketch.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/styles/pages/errorPage.scss:
--------------------------------------------------------------------------------
1 | .error-wrapper {
2 | position:relative;
3 | }
4 | .error-code {
5 | top:0;
6 | width:100%;
7 | text-align:center;
8 | font-size:200px;
9 | color:rgba(216,216,216,.2);
10 | font-family: "Roboto Black", Roboto, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
11 | font-weight:900;
12 | }
13 | @media(min-width:640px) {
14 | .error-code {
15 | font-size:300px;
16 | }
17 | }
18 | @media(min-width:1024px) {
19 | .error-code {
20 | font-size:500px;
21 | }
22 | }
23 | .error-code-message h2 {
24 | font-family: 'Vidaloka', georgia, 'Times New Roman', serif;
25 | font-size:40px;
26 | color:#343334;
27 | }
28 | @media(min-width:640px) {
29 | .error-code-message h2 {
30 | font-size:50px;
31 | }
32 | }
33 | @media(min-width:1024px) {
34 | .error-code-message h2 {
35 | font-size:70px;
36 | }
37 | }
38 | .error-code-message {
39 | position:absolute;
40 | top:60px;
41 | width:100%;
42 | text-align:center;
43 | font-size: 16px;
44 | color:#626160;
45 | }
46 | @media(min-width:640px) {
47 | .error-code-message {
48 | font-size:24px;
49 | }
50 | }
51 | @media(min-width:1024px) {
52 | .error-code-message {
53 | top:90px;
54 | font-size:30px;
55 | }
56 | }
57 | .error-code-message .button {
58 | margin-top:50px;
59 | }
--------------------------------------------------------------------------------
/src/components/siteHeader/headerNav.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
16 |
17 |
18 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/pages/errorPage.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 | {{status}}
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/registration.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | Vue.component('carousel-dynamic-list', () => import(/* webpackChunkName: "carouselDynamicList" */'./layouts/carouselDynamicList'));
3 | Vue.component('gallery-dynamic-list', () => import(/* webpackChunkName: "galeryDynamicList" */'./layouts/galleryDynamicList'));
4 | Vue.component('gallery-list', () => import(/* webpackChunkName: "galleryList" */'./layouts/galleryList'));
5 | Vue.component('view-all-button', () => import(/* webpackChunkName: "viewAllButton" */'./components/viewAllButton'));
6 | Vue.component('hero-image', () => import(/* webpackChunkName: "heroImage" */'./layouts/heroImage'));
7 | Vue.component('hero-video', () => import(/* webpackChunkName: "heroVideo" */'./layouts/heroVideo'));
8 | Vue.component('feature', () => import(/* webpackChunkName: "feature" */'./layouts/feature'));
9 | Vue.component('vertical-list', () => import(/* webpackChunkName: "verticalList" */'./layouts/verticalList'));
10 | Vue.component('sign-up', () => import(/* webpackChunkName: "signUp" */'./layouts/signUp'));
11 | Vue.component('event', () => import(/* webpackChunkName: "event" */'./layouts/event'));
12 | Vue.component('design-article', () => import(/* webpackChunkName: "designArticle" */'./layouts/designArticle'));
13 | Vue.component('search-results', () => import(/* webpackChunkName: "searchResults" */'./layouts/search-results/searchResultsLayout'));
14 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
17 | Site
18 |
19 |
20 |
21 |
22 |
23 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/layouts/galleryList.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
{{heading}}
8 |
9 |
14 |
15 |
16 |
17 |
18 |
19 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/images/icon-facebook-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Facebook logo
5 | Created with Sketch.
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/src/layouts/verticalList.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
{{heading}}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/components/authorProfile.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/src/components/leadImage.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/src/components/designArticleSummary.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
{{heading}}
17 |
18 |
19 |
20 |
21 |
22 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/src/components/siteHeader/search-box/search-box.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
19 |
20 |
21 |
22 |
23 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/layouts/heroImage.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
{{headline}}
11 | {{callToAction.text}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/src/pages/allTypesPage.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
28 |
29 |
30 |
31 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/src/pages/standardPage.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
28 |
29 |
30 |
31 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/src/images/icon-twitter-logo-white.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Twitter_Logo_WhiteOnBlue
5 | Created with Sketch.
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/src/components/shareSocial.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/styles/layouts/feature.scss:
--------------------------------------------------------------------------------
1 |
2 | .feature-img {
3 | text-align: center;
4 | }
5 | .feature-img img {
6 | max-width:100%;
7 | }
8 | .feature-img img:hover {
9 | max-width:100%;
10 | }
11 | .feature-copy-content {
12 | margin:auto 5.6338%;
13 | }
14 | .feature-copy {
15 | margin-bottom: 1.5rem;
16 | overflow: hidden; /* Contain the floated button. */
17 | }
18 |
19 | .feature-no-image-copy .feature-no-image-copy-content {
20 | padding: 0;
21 |
22 | .text-content {
23 | font-size: 1rem;
24 | }
25 | }
26 |
27 | @media (min-width: 414px) {
28 | .feature-copy { /*Vertically and horizontally centering the inner text box.*/
29 | display:flex;
30 | justify-content:center;
31 | align-items:center;
32 | }
33 | .feature-copy-content {
34 | width:80%;
35 | }
36 | }
37 | @media (min-width:640px) {
38 | .feature {
39 | display:flex;
40 | }
41 | .feature-copy {
42 | flex-grow: 1;
43 | margin-bottom:0;
44 | }
45 | .feature-img-left {
46 | flex-direction:row-reverse; /*Reverse content but keep elements in correct DOM order.*/
47 | }
48 |
49 | .feature-img-left {
50 | justify-content:flex-end;
51 | }
52 | .feature-img,
53 | .feature-copy {
54 | width:0;
55 | }
56 | .feature-small .feature-img {
57 | width:31.6239%;
58 | }
59 | .feature-small .feature-copy-content {
60 | width:75%;
61 | }
62 | .feature-medium .feature-img {
63 | width:48.7179%;
64 | }
65 | .feature-medium .feature-copy-content {
66 | width:70%;
67 | }
68 | .feature-large .feature-img {
69 | width:65.8120%;
70 | }
71 | .feature-medium .feature-copy-content {
72 | width:80%;
73 | }
74 | }
75 | @media (min-width:1200px) {
76 | .feature-small .feature-img {
77 | width:31.5833%;
78 | }
79 | .feature-medium .feature-img {
80 | width:48.6667%;
81 | }
82 | .feature-large .feature-img {
83 | width:65.8333%;
84 | }
85 | }
86 | /* Feature-specific button placement */
87 | .feature .button {
88 | margin:0;
89 | }
90 | .feature-img-right .button {
91 | float:right;
92 | }
93 |
--------------------------------------------------------------------------------
/styles/layouts/heroImage.scss:
--------------------------------------------------------------------------------
1 | @import '~foundation-sites/scss/foundation';
2 |
3 | .wch-hero-image {
4 | margin-top: -35px;
5 | overflow:hidden;
6 | position:relative;
7 | text-align: center;
8 |
9 | img {
10 | width:100%;
11 | /*transform:scale(2);*/
12 | transition:transform .3s ease-in;
13 | }
14 |
15 | .section {
16 | padding-top:0;
17 | display:flex;
18 | }
19 |
20 | }
21 |
22 |
23 | .hero-message {
24 | position: absolute;
25 | top:0;
26 | left:0; /*centering overlaid message*/
27 | width:100%;
28 | height: 100%;
29 | display: flex;
30 | flex-direction: column;
31 | justify-content: center;
32 | align-content:center;
33 | align-items:center;
34 | text-align: center;
35 |
36 | h1 {
37 | width:90%;
38 | margin-bottom:.25em;
39 | }
40 | }
41 |
42 | .hero-button {
43 | background-color:#fff;
44 | font-size: .8rem;
45 | padding:.75em 1.5em;
46 | border:none;
47 |
48 | :hover {
49 | background-color: #fff;
50 | }
51 | }
52 |
53 |
54 | .text-hero {
55 | font-size: 1.75rem; /*28px*/
56 | line-height: 1;
57 | color:#fff;
58 | text-align: center;
59 | font-family: 'Vidaloka', georgia, 'Times New Roman', serif;
60 | }
61 |
62 | @include breakpoint(medium) {
63 | h1, .text-hero {
64 | font-size: 3.15rem; /*52px*/
65 | line-height: 1.26;
66 | }
67 |
68 | .wch-hero-image img {
69 | /*transform:scale(1.5);*/
70 | }
71 |
72 | .hero-message h1 {
73 | width:80%;
74 | }
75 |
76 | .hero-button {
77 | font-size:.9rem;
78 | padding:1.25em 2.625em;
79 | }
80 |
81 |
82 | }
83 | @include breakpoint(large) {
84 | .wch-hero-image img {
85 | /*transform:scale(1);*/
86 | }
87 |
88 | h1,
89 | .text-hero {
90 | font-size: 3.5rem; /*80px*/
91 | }
92 |
93 | .hero-message h1 {
94 | max-width:1200px;
95 | }
96 | .hero-message > .button {
97 | margin-top:64px;
98 | }
99 |
100 | .hero-button {
101 | font-size:1rem;
102 | }
103 |
104 | }
105 |
106 |
--------------------------------------------------------------------------------
/src/components/siteHeader/siteHeader.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
28 |
29 |
30 |
31 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/styles/layouts/signUp.scss:
--------------------------------------------------------------------------------
1 |
2 | @import '~foundation-sites/scss/foundation';
3 |
4 | [type='text'] {
5 | background-color: #fff;
6 | }
7 |
8 | .newsletter {
9 | padding: 3% 0;
10 | background-size: cover;
11 |
12 | .call-to-action {
13 | margin: 0 3% auto 3%;
14 | text-align: center;
15 |
16 | h4 {
17 | font-size: 18px;
18 | font-weight: 800;
19 | color: #fff;
20 | text-transform: uppercase;
21 | transition: font-size .2s ease-in-out;
22 | }
23 |
24 | }
25 |
26 | .wrap-inputs {
27 | width: 90%;
28 | margin: 3% auto auto;
29 | font-size: 14px;
30 | background: #fff;
31 | padding: 4px 10px;
32 | border: 1px solid rgba(155, 155, 155, 40);
33 | transition: width .3s ease-in-out;
34 |
35 | form {
36 | display: flex;
37 | align-items: center;
38 | }
39 |
40 | input{
41 | margin: 0;
42 | border: none;
43 | box-shadow: none;
44 | flex-grow: 1;
45 | transition: height .3s ease-in-out;
46 | }
47 |
48 | }
49 |
50 | .button {
51 | height: 30px;
52 | padding-top: 0;
53 | padding-bottom: 0;
54 | border: 0;
55 | line-height: 30px;
56 | margin-bottom: 0;
57 | }
58 |
59 | }
60 |
61 |
62 | @include breakpoint(medium) {
63 | .newsletter {
64 | height: 0;
65 | padding-top: 25%; /* (300/1200)*100=25 */
66 | }
67 |
68 | .newsletter .call-to-action {
69 | margin-top: -17.5%;
70 | }
71 |
72 | .newsletter .call-to-action h4 {
73 | font-size: 20px;
74 | }
75 |
76 | .newsletter .wrap-inputs {
77 | width: 60.41666667%;
78 | padding: 6px 20px;
79 | }
80 |
81 | .newsletter [type=text] {
82 | text-indent: 20px;
83 | background: url('images/icon-email.png') no-repeat 0 50%;
84 | }
85 | }
86 |
87 | @include breakpoint(large) {
88 | .newsletter .call-to-action {
89 | margin-top: -17%;
90 | }
91 |
92 | .newsletter .call-to-action h4 {
93 | font-size: 31.5px;
94 | }
95 |
96 | .newsletter .wrap-inputs {
97 | width: 60.41666667%;
98 | }
99 |
100 | }
101 |
102 | @media (max-width:640px)
103 | {
104 | .reveal {
105 | margin: 0 auto;
106 | position: relative;
107 | width: 75vw;
108 | max-height: 30vh;
109 | min-height: 10vh;
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/src/pages/allTypesPageHero2Blocks.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
35 |
36 |
37 |
38 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/src/pages/standardPageHero2Blocks.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
35 |
36 |
37 |
38 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sample-site-vue",
3 | "version": "1.0.0",
4 | "description": "sample-site-vue ==============",
5 | "main": "index.js",
6 | "scripts": {
7 | "build": "NODE_ENV=production webpack --mode production --config ./webpack.config.js --progress",
8 | "start": "NODE_ENV=development webpack-dev-server --mode development --port=4201",
9 | "start-dev-tools": "node node_modules/wch-site-developer-tools/server/main.js",
10 | "test": "echo \"Error: no test specified\" && exit 1",
11 | "deploy": "wchtools push -A -v -f --dir dist",
12 | "build-deploy": "npm run build && npm run deploy",
13 | "create-layout": "echo Pulling the content types. Enter the user password for your WCH tenant: && wchtools pull -tlmIv --dir src/wchLayouts && echo Creating the layout, layout mapping, and the react component template. && ibm-wch-sdk-cli create layout --data src/wchLayouts --scss --vue --src ."
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "git@github.ibm.com:DX/sample-site-vue-react.git"
18 | },
19 | "author": "",
20 | "license": "MIT",
21 | "dependencies": {
22 | "dom-to-image": "^2.6.0",
23 | "file-saver": "^1.3.8",
24 | "foundation-sites": "^6.4.3",
25 | "vue": "^2.5.2",
26 | "vue-router": "^3.0.1"
27 | },
28 | "devDependencies": {
29 | "@ibm-wch-sdk/cli": "6.0.383",
30 | "babel-core": "^6.26.0",
31 | "babel-loader": "^7.1.2",
32 | "babel-minify-webpack-plugin": "^0.2.0",
33 | "babel-plugin-syntax-dynamic-import": "^6.18.0",
34 | "babel-polyfill": "^6.26.0",
35 | "babel-preset-env": "^1.6.1",
36 | "babel-preset-react": "^6.24.1",
37 | "css-loader": "^0.28.9",
38 | "extract-text-webpack-plugin": "^4.0.0-beta.0",
39 | "file-loader": "^1.1.5",
40 | "html-webpack-plugin": "^3.2.0",
41 | "lucene-escape-query": "^1.0.1",
42 | "lucene-query-string-builder": "0.0.2",
43 | "node-sass": "^4.7.2",
44 | "sass-loader": "^6.0.6",
45 | "style-loader": "^0.20.1",
46 | "svg-sprite-loader": "^3.4.1",
47 | "url-loader": "^0.6.2",
48 | "vue-loader": "^14.2.4",
49 | "vue-template-compiler": "^2.5.13",
50 | "wch-flux-sdk": "^1.3.0",
51 | "wch-site-developer-tools": "latest",
52 | "webpack": "^4.35.2",
53 | "webpack-cli": "^3.3.6",
54 | "webpack-dev-server": "^3.7.2"
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/pages/allTypesPageHero4Blocks.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
35 |
36 |
37 |
38 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/src/pages/standardPageHero4Blocks.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
35 |
36 |
37 |
38 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/src/pages/designPageRight.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
25 |
26 |
27 |
28 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/src/layouts/heroVideo.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
11 |
12 |
13 | Your browser doesn't support HTML5 video.
14 |
15 |
16 |
17 |
18 |
19 |
20 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/src/pages/designPageLeft.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
25 |
26 |
27 |
28 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/src/layouts/event.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
Location:
11 |
12 |
13 |
14 | ×
15 |
16 |
17 |
18 |
19 |
20 |
21 |
{{eventDate}}
22 |
23 |
24 |
Details
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/src/layouts/galleryDynamicList.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
{{listTitle}}
8 |
15 |
16 |
17 |
18 |
19 |
20 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/src/layouts/signUp.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
15 |
16 |
17 |
{{headline}}
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const
2 | HtmlWebpackPlugin = require('html-webpack-plugin'),
3 | TerserPlugin = require('terser-webpack-plugin'),
4 | ExtractTextPlugin = require('extract-text-webpack-plugin'),
5 | path = require('path'),
6 | webpack = require('webpack');
7 |
8 | module.exports = {
9 | entry: {
10 | main: [path.resolve(__dirname, 'src/app.js')]
11 | },
12 | module: {
13 | rules: [
14 | {
15 | test: /\.jsx?$/,
16 | loader: 'babel-loader',
17 | }, {
18 | test: /\.vue$/,
19 | loader: 'vue-loader',
20 | options: {
21 | extractCSS: true,
22 | }
23 | }, {
24 | test: /\.s?css$/,
25 | use: ['style-loader', 'css-loader', 'sass-loader']
26 | }, {
27 | test: /\.(gif|png|jpg|woff2?|)$/,
28 | loader: 'url-loader?limit=8192&name=[name].[ext]'
29 | }, {
30 | test: /\.svg$/,
31 | include: [/styles[\\\/]layouts[\\\/]images/],
32 | loader: 'file-loader?name=[name].[ext]'
33 | }, {
34 | test: /\.svg$/,
35 | exclude: [/styles[\\\/]layouts[\\\/]images/],
36 | loader: 'svg-sprite-loader'
37 | }
38 | ]
39 | },
40 | output: {
41 | path: path.resolve(__dirname,'dist/assets'),
42 | filename: '[name].js',
43 | chunkFilename: '[name].js'
44 | },
45 | optimization: {
46 | splitChunks: {
47 | cacheGroups: {
48 | vendors: {
49 | test: /node_modules/,
50 | name: 'vendors',
51 | enforce: true,
52 | chunks: 'all',
53 | },
54 | },
55 | },
56 | minimizer: [
57 | new TerserPlugin({
58 | cache: true,
59 | parallel: true,
60 | sourceMap: true, // Must be set to true if using source-maps in production
61 | terserOptions: {
62 | ecma: undefined,
63 | warnings: false,
64 | parse: {},
65 | compress: {},
66 | mangle: true, // Note `mangle.properties` is `false` by default.
67 | module: false,
68 | output: null,
69 | toplevel: false,
70 | nameCache: null,
71 | ie8: true,
72 | keep_classnames: undefined,
73 | keep_fnames: false,
74 | safari10: true,
75 | },
76 | }),
77 | ],
78 | },
79 | plugins: [
80 | new webpack.DefinePlugin({
81 | "process.env": {
82 | BROWSER: JSON.stringify(true),
83 | NODE_ENV: JSON.stringify("production")
84 | }
85 | }),
86 | new ExtractTextPlugin("[name].css"),
87 | new HtmlWebpackPlugin({
88 | template: path.resolve(__dirname, 'src/index.html')
89 | }),
90 | new webpack.NoEmitOnErrorsPlugin()
91 | ],
92 | resolve: {
93 | alias: {
94 | 'styles': path.resolve(__dirname, './styles')
95 | },
96 | extensions: [ '.js', '.vue', '.scss' ]
97 | },
98 | "devServer": {
99 | contentBase: path.join(__dirname, 'dist/assets'),
100 | "historyApiFallback": true,
101 | "https": false
102 | }
103 | };
104 |
--------------------------------------------------------------------------------
/styles/components/siteFooter/siteFooter.scss:
--------------------------------------------------------------------------------
1 |
2 | $logo-width-medium: 170px;
3 | $logo-width-small: 85px;
4 | $logo-height-medium: 64px;
5 |
6 | .wch-footer {
7 | background:#222;
8 | color:#ddd;
9 | min-height:240px;
10 | padding:40px 0 20px 0;
11 | margin-top:40px;
12 | text-align:center;
13 |
14 | ul {
15 | list-style: none;
16 | margin-top: 30px;
17 | }
18 | }
19 | @media (min-width:768px) {
20 | .wch-footer {
21 | padding-top:50px;
22 | margin-top:60px;
23 | }
24 | }
25 | @media (min-width:1200px) {
26 | .wch-footer {
27 | margin-top:80px;
28 | }
29 | }
30 | .wch-footer a {
31 | color:#dadada;
32 | }
33 | .wch-footer h5 {
34 | text-transform:uppercase;
35 | }
36 |
37 | .footer-logo {
38 | display:flex;
39 | justify-content:center;
40 |
41 | .logo-container {
42 |
43 | .title-bar & {
44 | margin: auto;
45 | position: relative;
46 | left: -12px;
47 | }
48 | }
49 |
50 | .logo {
51 | height: 0;
52 | padding-top: $logo-height-medium/$logo-width-medium*100%;
53 | overflow: hidden;
54 | background-size:cover;
55 | margin: 0;
56 | }
57 | }
58 | @media (min-width:640px) {
59 | .footer-logo a {
60 | display:inline-block;
61 | }
62 | }
63 | .footer-nav li,
64 | .contact-us li {
65 | margin-bottom:10px;
66 | }
67 | .contact-us span {
68 | display:block;
69 | }
70 | .footer-logo {
71 | text-align:left;
72 | order:1;
73 | }
74 | .footer-nav {
75 | order:2;
76 | }
77 | .follow-us {
78 | order:3;
79 | }
80 | .contact-us {
81 | order:3;
82 | }
83 | @media (min-width:640px) {
84 | .footer-logo {
85 | order:1;
86 | }
87 | .footer-nav {
88 | order:2;
89 | }
90 | .follow-us {
91 | order:4;
92 | }
93 | .contact-us {
94 | order:3;
95 | }
96 | }
97 | .follow-us,
98 | .contact-us,
99 | .footer-nav {
100 | margin-top:30px;
101 | }
102 | @media (min-width:640px) {
103 | .follow-us,
104 | .contact-us,
105 | .footer-nav {
106 | margin-top:0;
107 | text-align:left;
108 | }
109 | }
110 | .follow-us ul {
111 | display:flex;
112 | justify-content:center;
113 | }
114 | @media (min-width:640px) {
115 | .follow-us ul {
116 | display:block;
117 | }
118 | }
119 | .follow-us li {
120 | display:block;
121 | margin-right:30px;
122 | }
123 | @media (min-width:640px) {
124 | .follow-us li {
125 | margin-bottom:30px;
126 | }
127 | }
128 | .follow-us li svg {
129 | width:30px;
130 | height:30px;
131 | margin-bottom:-10px;
132 | }
133 | @media (min-width:640px) {
134 | .follow-us li svg {
135 | margin-right:6px;
136 | }
137 | }
138 | .follow-us li:last-child {
139 | margin-right:0;
140 | }
141 | @media (min-width:640px) {
142 | .follow-us ul {
143 | display:inline;
144 | }
145 | }
146 | .legal {
147 | margin-top:40px;
148 | }
149 | .legal .copyright {
150 | margin:0 auto;
151 | }
152 |
153 | @media print, screen and (min-width: 40em) {
154 | .follow-us ul {
155 | display: block;
156 | }
157 | }
--------------------------------------------------------------------------------
/styles/components/siteHeader/search-box/search-box.scss:
--------------------------------------------------------------------------------
1 | @import '~foundation-sites/scss/foundation';
2 |
3 | .searchWrapper {
4 |
5 | width: 260px;
6 | padding-top: 18px;
7 |
8 |
9 | input, input:focus {
10 | float: left;
11 | border: none;
12 | box-shadow: none;
13 | //max-width: 300px;
14 | max-width: 200px;
15 | padding: 0 0 0 10px;
16 | }
17 |
18 |
19 | .search-results-count {
20 | font-weight: 500
21 | }
22 | .search-form {
23 | position: relative;
24 | }
25 | .search-button {
26 | position: absolute;
27 | top: 6px;
28 | height: 24px;
29 | width: 30px;
30 | //background: url(./images/search.svg) left center no-repeat;
31 | background-size: 25px 25px;
32 | cursor: pointer;
33 | opacity: .5;
34 | }
35 |
36 | .search-input-clear {
37 | position: absolute;
38 | top: 10px;
39 | //background: url(./images/search-input-clear.svg) center center no-repeat;
40 | background-size: 22px 22px;
41 | cursor: pointer;
42 | height: 22px;
43 | width: 30px;
44 | left: 100%;
45 | transition: all .2s ease-in-out;
46 | }
47 |
48 | .search-input-clear:not(.show-clear-button){
49 | opacity: 0;
50 | margin: 0;
51 | }
52 |
53 | .search-input-clear:active {
54 | opacity: 1;
55 | }
56 |
57 |
58 | [type=search],
59 | [type=search]:focus {
60 | height: auto;
61 | margin-top: 12px;
62 | padding: 0 32px 6px 30px;
63 | outline: none;
64 | border: none;
65 | border-bottom: 1px solid #cacaca;
66 | box-shadow: none;
67 | line-height: 1;
68 | transition: width 0.5s ease-in-out;
69 | width: 260px;
70 | }
71 |
72 | [type=search] {
73 | width: 120px;
74 | }
75 | .active-input {
76 | border-bottom: 1px solid #222;
77 | width: 260px; /*Keeps search box wide when "active". Prevents shrinking on blur.*/
78 | }
79 | [type=search]:focus.active-input {
80 | box-shadow: none;
81 | border-bottom: 1px solid #222;
82 | width: 260px; /*Transitions width of search input on focus*/
83 | }
84 | .active-input ~ .search-button {
85 | opacity: 1;
86 | }
87 | .search-button {
88 | right: auto;
89 | left: 0;
90 | }
91 |
92 | /* When the user inputs a search term and then leaves the search box we want
93 | to keep the box looking like it still has focus. This next declaration duplicates
94 | the styles used when the search input has focus so we can assign the .active-input
95 | class to it onBlur.*/
96 |
97 | .active-input ~ .search-input-clear.show-clear-button {
98 | left: 100%;
99 | margin-left: -90px;
100 | transition: all 0.3s ease-in;
101 | opacity: 1;
102 | }
103 |
104 | /* Marco: Styles for search results and controls, below */
105 | .search-result-tools {
106 | display: flex;
107 | flex-wrap: wrap;
108 | justify-content: space-between;
109 | align-items: center;
110 | margin-bottom: 2em;
111 | }
112 |
113 | .search-result-tools * {
114 | margin: 0
115 | }
116 | .search-result-tools select {
117 | width: auto;
118 | padding-left: 20px;
119 | }
120 | }
--------------------------------------------------------------------------------
/src/components/previewComponent.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
{{ errorMsg }}
8 |
Capture a thumbnail from this preview
9 |
10 |
11 |
12 |
13 |
14 |
15 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/src/app.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright IBM Corporation 2017.
3 | LICENSE: Apache License, Version 2.0
4 | */
5 |
6 | import 'babel-polyfill';
7 |
8 | import Vue from 'vue';
9 | import VueRouter from 'vue-router';
10 |
11 | import AppComponent from './app.vue';
12 |
13 | import AllTypesPage from './pages/allTypesPage';
14 | import AllTypesPageHero2Blocks from './pages/allTypesPageHero2Blocks';
15 | import AllTypesPageHero4Blocks from './pages/allTypesPageHero4Blocks';
16 | import StandardPage from './pages/standardPage';
17 | import StandardPageHero2Blocks from './pages/standardPageHero2Blocks';
18 | import StandardPageHero4Blocks from './pages/standardPageHero4Blocks';
19 | import ErrorPage from './pages/errorPage';
20 | import PreviewComponent from './components/previewComponent';
21 |
22 | import {WchStore, setNavChangeFunction} from 'wch-flux-sdk';
23 | import {WchPage, WchContent, WchEdit} from 'wch-flux-sdk/vue';
24 | import 'wch-flux-sdk/localStorage';
25 |
26 | Vue.use(VueRouter);
27 |
28 | // for running on local host we want to configure the WCH lib
29 | import { configWCH, getBaseUrl } from 'wch-flux-sdk';
30 | import { Constants } from "./Constants";
31 | configWCH(Constants.DOMAIN_NAME, Constants.CONTENT_HUB_ID, Constants.SITE_ID);
32 |
33 | setNavChangeFunction(path => router.push({path: path})); // set nav change function for preview
34 |
35 | // load components globally
36 | Vue.component('lead-image', () => import(/* webpackChunkName: "leadImage" */ './components/leadImage'));
37 | Vue.component('preview-component', () => import(/* webpackChunkName: "previewComponent" */ './components/previewComponent'));
38 | Vue.component('share-social', () => import(/* webpackChunkName: "shareSocial" */ './components/shareSocial'));
39 | Vue.component('author-profile', () => import(/* webpackChunkName: "authorProfile" */ './components/authorProfile'));
40 |
41 | // load page components globally
42 | Vue.component('all-types-page-layout', AllTypesPage);
43 | Vue.component('all-types-page-hero-2-blocks', AllTypesPageHero2Blocks);
44 | Vue.component('all-types-page-hero-4-blocks', AllTypesPageHero4Blocks);
45 | Vue.component('standard-page-layout', StandardPage);
46 | Vue.component('standard-page', StandardPage);
47 | Vue.component('standard-page-hero-2-blocks', StandardPageHero2Blocks);
48 | Vue.component('standard-page-hero-4-blocks', StandardPageHero4Blocks);
49 | Vue.component('design-page-left', () => import(/* webpackChunkName: "designPageLeft" */ './pages/designPageLeft'));
50 | Vue.component('design-page-right', () => import(/* webpackChunkName: "designPageRight" */ './pages/designPageRight'));
51 |
52 | console.log("SPA framework: Vue");
53 |
54 | // configure the router
55 | let router = new VueRouter({
56 | mode: 'history',
57 | base: getBaseUrl(),
58 | routes: [
59 | {path: '/', redirect: '/home'},
60 | {path: '/error', name: 'error', component: ErrorPage, props: true},
61 | {path: '/component-preview', name: 'preview', component: PreviewComponent},
62 | {path: '/*/*', component: WchPage},
63 | {path: '/*', component: WchPage }
64 | ]
65 | });
66 |
67 |
68 | document.title = 'Oslo';
69 |
70 |
71 | Vue.component('wch-content', WchContent);
72 | Vue.directive('wch-edit', WchEdit);
73 |
74 | // load layouts dynamically
75 | import './registration';
76 |
77 |
78 | new Vue({
79 | el: '#app',
80 | components: {
81 | AppComponent
82 | },
83 | render (createElement) {
84 | return createElement(AppComponent);
85 | },
86 | data: WchStore,
87 | router
88 | });
89 |
--------------------------------------------------------------------------------
/src/layouts/feature.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
15 |
16 |
17 |
{{headline}}
18 |
19 |
{{readMore.text}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/src/components/siteFooter/siteFooter.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
63 |
64 |
65 |
66 |
132 |
133 |
134 |
135 |
--------------------------------------------------------------------------------
/src/layouts/carouselDynamicList.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
{{listTitle}}
8 |
13 |
14 |
15 |
16 |
17 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/styles/app.scss:
--------------------------------------------------------------------------------
1 | @import 'settings';
2 | @import '~foundation-sites/scss/foundation';
3 |
4 | @include foundation-everything;
5 |
6 | html,
7 | body {
8 | display: flex;
9 | flex-direction: column;
10 | height: 100%;
11 | }
12 |
13 | app {
14 | display: flex;
15 | flex-direction: column;
16 | flex: 1 1 auto;
17 | }
18 |
19 | .content-placeholder {
20 | flex: 1;
21 | }
22 |
23 | /* Section classes that wrap components to maintain consistent spacing
24 | when dropping components into a page. */
25 | .section {
26 | padding-top: 30px;
27 | padding-bottom: 30px;
28 | transition: all .3s ease-in-out;
29 |
30 | &:first-of-type {
31 | padding-top: 35px;
32 | }
33 | }
34 |
35 | .section-small {
36 | padding-top: 40px;
37 | padding-bottom: 40px;
38 | }
39 |
40 | .sidebar-section {
41 | border-bottom: 2px solid #6b6b6b;
42 | }
43 |
44 | .section-full-bg {
45 | background: #f7f7f7;
46 | }
47 |
48 | /* Foundation overrides */
49 | body {
50 | line-height: 1;
51 | }
52 |
53 | ul {
54 | margin: 0;
55 | }
56 |
57 | @include breakpoint(medium) {
58 | .section {
59 | padding-top: 40px;
60 | padding-bottom: 40px;
61 | }
62 |
63 | .section-small {
64 | padding-top: 62px;
65 | padding-bottom: 62px;
66 | }
67 | }
68 |
69 | @include breakpoint (large) {
70 | .section {
71 | padding-top: 60px;
72 | padding-bottom: 60px;
73 | }
74 | }
75 |
76 | /*@media (min-width:768px) {
77 | .section {
78 | padding-bottom:30px;
79 | padding-top:30px;
80 | }
81 | }
82 | @media (min-width:1024px) {
83 | .section {
84 | padding-bottom:112px;
85 | padding-top:112px;
86 | }
87 | }*/
88 |
89 |
90 | /*.grid-container {
91 | max-width:1800px;
92 | }
93 | @media screen and (min-width: 75em) {
94 | .grid-container-padded {
95 | padding-left: 15px;
96 | padding-right: 15px;
97 | }
98 | }*/
99 |
100 | /* End Foundation overrides */
101 |
102 | /* Custom font for certain headers: https://fonts.google.com/specimen/Vidaloka */
103 | h1,
104 | h2,
105 | h3,
106 | h4,
107 | h5,
108 | h6 {
109 | width:100%; /* Prevent headers from shrinking to fit their content when contained
110 | inside a flexbox */
111 | }
112 |
113 | h2,
114 | .text-headline {
115 | font-size: 1.75rem; /*28px*/
116 | font-family: 'Vidaloka', georgia, 'Times New Roman', serif;
117 | }
118 | h3,
119 | .text-section {
120 | font-size: 1.875rem; /*30px*/
121 | font-family: 'Vidaloka', georgia, 'Times New Roman', serif;
122 | margin-bottom:3.125rem;
123 | }
124 | .feature h3,
125 | .feature .text-section {
126 | margin-bottom:2.1875rem;
127 | }
128 | h4,
129 | .text-header {
130 | font-size: 1.375rem; /*22px*/
131 | font-family: Roboto, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
132 | font-weight:500;
133 | }
134 | h5,
135 | .text-content {
136 | font-size: 1rem; /*16px*/
137 | font-family: Roboto, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
138 | }
139 | h5 {
140 | font-weight:600;
141 | margin-bottom:20px;
142 | }
143 | body {
144 | font-family: Roboto, "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
145 | }
146 | .article-lead-image .caption,
147 | .article-small-image .caption,
148 | .article-medium-image .caption,
149 | .article-large-image .caption {
150 | font-size:1rem;
151 | padding:10px 0;
152 | line-height:1.4;
153 | color:#9b9b9b;
154 | }
155 | @media (min-width:640px) {
156 |
157 | h2,
158 | .text-headline {
159 | font-size:2.5rem; /*40px*/
160 | }
161 | .text-content {
162 | font-size:1.125rem; /*18px*/
163 | }
164 | }
165 | @media (min-width: 1024px) {
166 |
167 | }
168 |
169 | .view-all {
170 | margin-top:30px;
171 | text-align:center;
172 | }
173 | /*////////////////////// Buttons */
174 | .button {
175 | background:transparent;
176 | color:#4a4a4a;
177 | border:2px solid #303030;
178 | padding: 0.625rem 1.675rem;
179 | text-transform: uppercase;
180 | font-size:1rem;
181 | transition:all .3s ease-in-out;
182 | }
183 | .button:hover,
184 | .button:focus {
185 | background-color: transparent;
186 | color:#000;
187 | }
188 | .button-view-all {
189 | padding: 0.625rem 0;
190 | width:370px;
191 | max-width:100%
192 | }
193 | .button-dark {
194 | background-color:#303030;
195 | color:#fff;
196 | border:0;
197 | }
198 | .button-dark:hover {
199 | background-color:#303030;
200 | color:#fff;
201 | }
202 | .hero-button {
203 | background-color:#fff;
204 | font-size: .8rem;
205 | padding:.75em 1.5em;
206 | border:none;
207 | }
208 | .hero-button:hover {
209 | background-color: #fff;
210 | }
211 | .highlight {
212 | border-style: solid;
213 | border-color: #2D74DA;
214 | }
215 | @media (min-width:640px) {
216 |
217 | }
218 | @media (min-width:1024px) {
219 |
220 | }
221 |
222 | body.is-reveal-open {
223 | margin-right: 15px;
224 | }
225 |
226 | input[type="text"],
227 | input[type="text"]:focus,
228 | input[type="text"]:active,
229 | textarea,
230 | textarea:focus,
231 | textarea:active {
232 | all: unset;
233 | background: transparent;
234 | border: none;
235 | width: 100%;
236 | }
237 |
--------------------------------------------------------------------------------
/src/images/icon-instagram-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | glyph-logo_May2016
5 | Created with Sketch.
6 |
7 |
8 |
9 |
10 |
25 |
26 |
--------------------------------------------------------------------------------
/styles/layouts/carouselDynamicList.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | // Default Variables
4 |
5 | // Slick icon entity codes outputs the following
6 | // "\2190" outputs ascii character "←"
7 | // "\2192" outputs ascii character "→"
8 | // "\2022" outputs ascii character "•"
9 |
10 | // $slick-font-path: "./fonts/" !default;
11 | // $slick-font-family: "slick" !default;
12 | // $slick-loader-path: "./" !default;
13 | $slick-arrow-color: white !default;
14 | $slick-dot-color: black !default;
15 | $slick-dot-color-active: $slick-dot-color !default;
16 | $slick-prev-character: "\2190" !default;
17 | $slick-next-character: "\2192" !default;
18 | $slick-dot-character: "\2022" !default;
19 | $slick-dot-size: 6px !default;
20 | $slick-opacity-default: 0.75 !default;
21 | $slick-opacity-on-hover: 1 !default;
22 | $slick-opacity-not-active: 0.25 !default;
23 |
24 | /* Slider */
25 |
26 | // .slick-list {
27 | // .slick-loading & {
28 | // background: #fff slick-image-url("ajax-loader.gif") center center no-repeat;
29 | // }
30 | // }
31 |
32 | /* Arrows */
33 |
34 | .slick-prev,
35 | .slick-next {
36 | position: absolute;
37 | display: block;
38 | height: 20px;
39 | width: 20px;
40 | line-height: 0px;
41 | font-size: 0px;
42 | cursor: pointer;
43 | background: transparent;
44 | color: transparent;
45 | top: 50%;
46 | -webkit-transform: translate(0, -50%);
47 | -ms-transform: translate(0, -50%);
48 | transform: translate(0, -50%);
49 | padding: 0;
50 | border: none;
51 | outline: none;
52 | &:hover, &:focus {
53 | outline: none;
54 | background: transparent;
55 | color: transparent;
56 | &:before {
57 | opacity: $slick-opacity-on-hover;
58 | }
59 | }
60 | &.slick-disabled:before {
61 | opacity: $slick-opacity-not-active;
62 | }
63 | &:before {
64 | // font-family: $slick-font-family;
65 | font-size: 20px;
66 | line-height: 1;
67 | color: $slick-arrow-color;
68 | opacity: $slick-opacity-default;
69 | -webkit-font-smoothing: antialiased;
70 | -moz-osx-font-smoothing: grayscale;
71 | }
72 | }
73 |
74 | .slick-prev {
75 | left: -25px;
76 | [dir="rtl"] & {
77 | left: auto;
78 | right: -25px;
79 | }
80 | &:before {
81 | content: $slick-prev-character;
82 | [dir="rtl"] & {
83 | content: $slick-next-character;
84 | }
85 | }
86 | }
87 |
88 | .slick-next {
89 | right: -25px;
90 | [dir="rtl"] & {
91 | left: -25px;
92 | right: auto;
93 | }
94 | &:before {
95 | content: $slick-next-character;
96 | [dir="rtl"] & {
97 | content: $slick-prev-character;
98 | }
99 | }
100 | }
101 |
102 | /* Dots */
103 |
104 | .slick-dotted.slick-slider {
105 | margin-bottom: 30px;
106 | }
107 |
108 | .slick-dots {
109 | position: absolute;
110 | bottom: -25px;
111 | list-style: none;
112 | display: block;
113 | text-align: center;
114 | padding: 0;
115 | margin: 0;
116 | width: 100%;
117 | li {
118 | position: relative;
119 | display: inline-block;
120 | height: 20px;
121 | width: 20px;
122 | margin: 0 5px;
123 | padding: 0;
124 | cursor: pointer;
125 | button {
126 | border: 0;
127 | background: transparent;
128 | display: block;
129 | height: 20px;
130 | width: 20px;
131 | outline: none;
132 | line-height: 0px;
133 | font-size: 0px;
134 | color: transparent;
135 | padding: 5px;
136 | cursor: pointer;
137 | &:hover, &:focus {
138 | outline: none;
139 | &:before {
140 | opacity: $slick-opacity-on-hover;
141 | }
142 | }
143 | &:before {
144 | position: absolute;
145 | top: 0;
146 | left: 0;
147 | content: $slick-dot-character;
148 | width: 20px;
149 | height: 20px;
150 | // font-family: $slick-font-family;
151 | font-size: $slick-dot-size;
152 | line-height: 20px;
153 | text-align: center;
154 | color: $slick-dot-color;
155 | opacity: $slick-opacity-not-active;
156 | -webkit-font-smoothing: antialiased;
157 | -moz-osx-font-smoothing: grayscale;
158 | }
159 | }
160 | &.slick-active button:before {
161 | color: $slick-dot-color-active;
162 | opacity: $slick-opacity-default;
163 | }
164 | }
165 | }
166 |
167 |
168 | /* Slick override */
169 |
170 | .slick-dots {
171 | bottom: 20px;
172 | }
173 |
174 | .slick-dots li button:before {
175 | font-size: 40px;
176 |
177 | }
178 | .slick-dots li.slick-active button:before, .slick-dots li button:before {
179 | color: white;
180 | }
181 |
182 | .slick-dots li.slick-active button:before {
183 | opacity: 1;
184 | }
185 |
186 | .slick-dotted.slick-slider {
187 | margin-bottom: 0;
188 | }
189 |
190 | .carousel {
191 | overflow-x: hidden;
192 |
193 | .slick-next, .slick-prev {
194 | position: absolute;
195 | width: 45px;
196 | height: 50%;
197 | }
198 |
199 | .slick-prev:before, .slick-next:before {
200 | content: none;
201 | }
202 |
203 | .slick-next {
204 | background: rgba(255, 255, 255, .80) url('images/slideshow-move-right.svg') no-repeat 50% 50%;
205 | background-size: 40% auto;
206 | right: 0;
207 | }
208 |
209 | .slick-prev {
210 | background: rgba(255, 255, 255, .80) url('images/slideshow-move-left.svg') no-repeat 50% 50%;
211 | background-size: 40% auto;
212 | left: 0;
213 | z-index: 1;
214 | }
215 |
216 | .slick-next:hover {
217 | transition: all .3s ease-in-out;
218 | background-color: #fff;
219 | }
220 |
221 | .slick-prev:hover {
222 | transition: all .3s ease-in-out;
223 | background-color: #fff;
224 | }
225 |
226 | .slick-track {
227 | height: inherit;
228 | }
229 | }
230 |
231 | /* General */
232 |
233 |
234 | .carousel .button {
235 | margin-top:3%;
236 | background:#fff;
237 | color:#222;
238 | transition: all .3s ease-in;
239 | }
240 | @media (min-width:1024px) {
241 | .carousel .button {
242 | margin-top:64px;
243 | }
244 | }
245 | .carousel {
246 | div:focus {
247 | outline:none;
248 | }
249 | .button:hover {
250 | background: #eaeaea;
251 | color: #222;
252 | }
253 | }
254 |
255 | .query-carousel h3 {
256 | text-align: center;
257 | }
258 |
259 |
260 |
261 |
--------------------------------------------------------------------------------
/src/layouts/designArticle.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
{{leadImageCaption}} {{leadImageCredit}}
16 |
17 |
{{heading}}
18 |
19 |
By {{author}} , {{date}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
{{getBodyImageCaption(bodyImages[index])}} {{getBodyImageCredit(bodyImages[index])}}
28 |
29 |
30 |
31 |
32 |
33 |
{{getBodyImageCaption(image)}} {{getBodyImageCredit(image)}}
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
170 |
171 |
172 |
173 |
174 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | sample-site-vue
2 | ==============
3 |
4 | As part of the Acoustic Content (formerly Watson Content Hub or WCH) sites feature a single page application is implemented to serve web sites. The Single Page Application is hosted on Acoustic Content and is stored as unmanaged assets. It leverages a set of content types, pages, categories, ... to render the Oslo sample application. The default single page application was implemented with Angular. The artifacts stored in WCH for Oslo are independent of the single page application.
5 | This sample contains the Single Page Site Application implemented with vue.js instead of the default angular site application. You can find more information about the default site application implemented with angular here:
6 | [Angular site application](https://github.com/ibm-wch/wch-site-application/).
7 | You can replace the default single page application with the vue.js implementations in this repository. Note that this will overlay the default Angular based application with the vue.js implementation.
8 | See the topic on Restoring the default Angular based application in case you want to switch back.
9 | Update: At the beginning of April we have added Search functionality to the Vue Site SPA and also support now the ability to hide a page from the
10 | navigation.
11 |
12 | 
13 |
14 | Getting started
15 | ------------
16 | These are the instructions for setting up and deploying the Vue SPA.
17 |
18 |
19 | Running Locally
20 | -------
21 | 1. After cloning this repository, run `npm install` at the root directory.
22 | 2. In **src/Constants.js**, replace the following two values with the corresponding values from WCH Hub information modal. (User display name > Hub information)
23 | ```
24 | DOMAIN_NAME: 'your-domain-name.com'
25 | CONTENT_HUB_ID: '0000000-0000-0000-0000-000000000000'
26 | ```
27 | 3. In src/Constants.js, replace the siteID with the corresponding value from Website > YOUR SITE NAME > Detail button(->) > ID. The default siteID is default.
28 | ```
29 | SITE_ID: 'default'
30 | ```
31 | 4. Make sure that CORS is enabled on your Watson Content Hub tenant to allow localhost.
32 | 5. Start the local server:
33 | * From within the root directory, run `npm start`.
34 | * The SPA will be rendered at: http://localhost:4201
35 |
36 | Layout gallery layout tools
37 | -------------
38 | Use the `npm run start-dev-tools` command to load the developer tools UI. Read more [here](https://www.npmjs.com/package/wch-site-developer-tools).
39 |
40 |
41 |
42 | CLI Layout Generation
43 | -------------
44 | Example usage to add CONTENT-TYPE-NAME:
45 |
46 | 1. create a CONTENT-TYPE-NAME content type on wch
47 |
48 | 2. run `npm run create-layout -- --type "CONTENT-TYPE-NAME"`
49 |
50 | the npm command simply runs the following:
51 | - `wchtools pull -tlmIv --dir src/wchLayouts` which pulls the layout info (layout, layout-mapping, and type json files)
52 | - `ibm-wch-sdk-cli create layout --data src/wchLayouts --scss --vue --src . "--type" "CONTENT-TYPE-NAME"` which creates the CONTENT-TYPE-NAME layout files (layout and layout-mapping json files, boilerplate vue template, blank scss file, and updated registration.js for Vue.Component() calls)
53 |
54 | 3. push the layout and layout-mapping json files: `wchtools push -tlmIv --dir src/wchLayouts` (perhaps I should add this to either the create-layout command or build-deploy, imo it should be in create-layout, but angular repo has the behavior in build-deploy)
55 |
56 | 4. make any customizations to the vue/scss and then `npm run build-deploy`
57 |
58 | 5. add desired content on wch
59 |
60 | Deploying to Content Hub
61 | -------
62 | 1. Install the latest version of [wchtools-cli](https://github.com/ibm-wch/wchtools-cli).
63 | Windows: npm install -g wchtools-cli
64 | Linux/Mac: sudo npm install -g wchtools-cli
65 | * Note: make sure that you have initialized wchtools with your user and tenant API URL. You will be prompted for your user password when deploying to the tenant. For more information, refer to [wchtools-cli](https://github.com/ibm-wch/wchtools-cli).
66 | 2. In case you updated **src/Constants.js** with the tenant information for running locally comment the change again.
67 | 3. From the root directory, run `npm run build` and `npm run deploy`.
68 |
69 |
70 | Changing the default (home) route
71 | -------
72 | The default route to load is set to `/home`. In order to change this:
73 | 1. Open **src/app.js** and find the line of code that specifies the `routes` object in the VueRouter:
74 | ```
75 | routes: [
76 | {path: '/', redirect: '/home'},
77 | {path: '/error', name: 'error', component: ErrorPage, props: true},
78 | {path: '/*/*', component: WchPage},
79 | {path: '/*', component: WchPage }
80 | ]
81 | ```
82 | 2. Change `{path: '/', redirect: '/home'}` to redirect to the new route.
83 |
84 |
85 | Alternate SDK files of note
86 | -------------
87 |
88 | ### index.js
89 |
90 | Set of javascript functions primarily for calling WCH APIs. Also includes some
91 | helper functions for working with images & videos, and fetching content IDs
92 | associated with routes, and vice versa. All functions are individually exported
93 | to take advantage of tree shaking. Data from WCH is now stored in a centralized
94 | store that can be read from different components. This has the advantage of
95 | de-coupling the components from the data loading, allowing for things like live
96 | updates when data changes.
97 |
98 | ### wchPage.vue
99 |
100 | A Vue component that gets served by all routes. Before each route gets set, it
101 | determines the content ID of the associated page, then sets its template to be
102 | the component that corresponds with the content's selected layout, or content
103 | type respectively.
104 |
105 | ### wchContent.vue
106 |
107 | A Vue component extremely similar to that of the wchPage, although not plugged
108 | into the router. Takes a content ID as a prop, fetches the corresponding
109 | content and sets its template to be the component that matches the content's
110 | selected layout or content type respectively.
111 |
112 |
113 | Check which SPA framework is deployed
114 | ------------
115 | To verify if the site is running the React or Vue SPA, load the live site and search the browser console for
116 | "SPA framework".
117 |
118 |
119 | Limitations and Disclaimers
120 | -------------
121 | * This sample is intended primarily to demonstrate how the Content Hub delivery APIs can be used with any SPA framework.
122 | * This SPA sample and the small Flux SDK (https://github.com/acoustic-content-samples/wch-flux-sdk) it uses are available as-is and do not necessarily represent recommended coding best practices. Also note that this sample may not be updated to use the latest versions dependency libraries.
123 | * The focus of this sample is on rendering. Draft content may not always render correctly in preview. If draft content does not appear automatically, try refreshing the site preview.
124 | * The CLI layout generation tool does not support the 'multiple' option for elements.
125 |
126 |
127 | Restoring the default Angular based application
128 | -------------
129 | Clone the [Angular site application](https://github.com/ibm-wch/wch-site-application/) , trigger a build and push to your tenant to overlay the vue.js site application sample.
130 |
--------------------------------------------------------------------------------
/src/layouts/search-results/searchResultsLayout.vue:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
{{numFound}} search result for "{{searchTerm}}"
11 |
{{numFound}} search results for "{{searchTerm}}"
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
Searching for "{{searchTerm}}" doesn't return any good matches.
24 |
Try your search again with a different term or browse our recommendations.
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | No results found
37 |
38 |
41 |
42 |
43 |
44 |
205 |
206 |
207 |
208 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
--------------------------------------------------------------------------------