├── IdeaPress
├── css
│ ├── themes
│ │ ├── custom.css
│ │ ├── custom.dark.css
│ │ ├── custom.light.css
│ │ ├── custom.orange.css
│ │ └── custom.mwnw.css
│ └── default.css
├── modules
│ ├── wordpress
│ │ ├── css
│ │ │ ├── templates
│ │ │ │ ├── custom.css
│ │ │ │ ├── normal.css
│ │ │ │ ├── large.css
│ │ │ │ ├── wide.css
│ │ │ │ ├── text.css
│ │ │ │ ├── rectangle.css
│ │ │ │ ├── tight.css
│ │ │ │ ├── fullScreen.css
│ │ │ │ └── variable.css
│ │ │ ├── wp.module.section.css
│ │ │ ├── wp.module.css
│ │ │ └── wp.module.detail.css
│ │ ├── pages
│ │ │ ├── wp.module.html
│ │ │ ├── wp.module.section.html
│ │ │ ├── wp.module.searchResults.html
│ │ │ └── wp.module.detail.html
│ │ └── js
│ │ │ ├── wp.module.section.js
│ │ │ ├── wp.module.searchResults.js
│ │ │ └── wp.module.detail.js
│ └── wordpressCom
│ │ ├── css
│ │ ├── templates
│ │ │ ├── custom.css
│ │ │ ├── normal.css
│ │ │ ├── large.css
│ │ │ ├── text.css
│ │ │ ├── wide.css
│ │ │ ├── rectangle.css
│ │ │ ├── tight.css
│ │ │ ├── fullScreen.css
│ │ │ └── variable.css
│ │ ├── wpcom.module.section.css
│ │ ├── wpcom.module.css
│ │ └── wpcom.module.detail.css
│ │ ├── pages
│ │ ├── wpcom.module.html
│ │ ├── wpcom.module.section.html
│ │ ├── wpcom.module.searchResults.html
│ │ └── wpcom.module.detail.html
│ │ └── js
│ │ ├── wpcom.module.section.js
│ │ ├── wpcom.module.searchResults.js
│ │ └── wpcom.module.detail.js
├── images
│ ├── blank.png
│ ├── hero.jpg
│ ├── logo.png
│ ├── title.png
│ ├── badgelogo.png
│ ├── smalllogo.png
│ ├── storelogo.png
│ ├── titlePic.png
│ ├── widelogo.png
│ ├── pages
│ │ ├── 10075.png
│ │ ├── 10080.png
│ │ ├── 10542.png
│ │ └── 10649.png
│ ├── splashscreen.png
│ ├── BackgroundPic.png
│ └── BackgroundPattern.png
├── IdeaPress_StoreKey.pfx
├── IdeaPress_TemporaryKey.pfx
├── default.html
├── js
│ ├── default.js
│ ├── liveTileTask.js
│ ├── share-source.js
│ ├── options.js
│ ├── navigator.js
│ └── hub.js
├── pages
│ ├── about-flyout.html
│ ├── hub.html
│ ├── page.html
│ ├── cat-posts.html
│ ├── mainpage.html
│ ├── searchResults.html
│ └── post.html
├── package.appxmanifest
└── IdeaPress.jsproj
├── IdeaPress.zip
├── .gitignore
└── IdeaPress.sln
/IdeaPress/css/themes/custom.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/custom.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/custom.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/IdeaPress.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress.zip
--------------------------------------------------------------------------------
/IdeaPress/images/blank.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/blank.png
--------------------------------------------------------------------------------
/IdeaPress/images/hero.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/hero.jpg
--------------------------------------------------------------------------------
/IdeaPress/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/logo.png
--------------------------------------------------------------------------------
/IdeaPress/images/title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/title.png
--------------------------------------------------------------------------------
/IdeaPress/images/badgelogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/badgelogo.png
--------------------------------------------------------------------------------
/IdeaPress/images/smalllogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/smalllogo.png
--------------------------------------------------------------------------------
/IdeaPress/images/storelogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/storelogo.png
--------------------------------------------------------------------------------
/IdeaPress/images/titlePic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/titlePic.png
--------------------------------------------------------------------------------
/IdeaPress/images/widelogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/widelogo.png
--------------------------------------------------------------------------------
/IdeaPress/IdeaPress_StoreKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/IdeaPress_StoreKey.pfx
--------------------------------------------------------------------------------
/IdeaPress/images/pages/10075.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/pages/10075.png
--------------------------------------------------------------------------------
/IdeaPress/images/pages/10080.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/pages/10080.png
--------------------------------------------------------------------------------
/IdeaPress/images/pages/10542.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/pages/10542.png
--------------------------------------------------------------------------------
/IdeaPress/images/pages/10649.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/pages/10649.png
--------------------------------------------------------------------------------
/IdeaPress/images/splashscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/splashscreen.png
--------------------------------------------------------------------------------
/IdeaPress/IdeaPress_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/IdeaPress_TemporaryKey.pfx
--------------------------------------------------------------------------------
/IdeaPress/images/BackgroundPic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/BackgroundPic.png
--------------------------------------------------------------------------------
/IdeaPress/images/BackgroundPattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ideanotionadmin/ideapress/HEAD/IdeaPress/images/BackgroundPattern.png
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/wp.module.section.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | .wp-section .wp-list .win-horizontal .win-surface {
6 | margin-left:116px;
7 | }
8 |
9 | .resultsmessage {
10 | display: none;
11 | margin-left: 120px;
12 | margin-top: 36px;
13 | display: none;
14 | }
15 |
16 | .filterarea {
17 | display: none;
18 | }
19 |
20 | @media (min-width: 320px) and (max-width: 499px) {
21 | .wp-list .win-vertical .win-container {
22 | margin-left:20px;
23 | }
24 | }
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/wpcom.module.section.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | .wpc-section .wpc-list .win-horizontal .win-surface {
6 | margin-left:116px;
7 | }
8 |
9 | .resultsmessage {
10 | display: none;
11 | margin-left: 120px;
12 | margin-top: 36px;
13 | display: none;
14 | }
15 |
16 | .filterarea {
17 | display: none;
18 | }
19 |
20 | @media (min-width: 320px) and (max-width: 499px) {
21 |
22 | .wpc-list .win-vertical .win-container {
23 | margin-left:20px;
24 | }
25 | }
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/normal.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wp-list .wp-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr;
8 | -ms-grid-rows: 160px 60px;
9 | width: 220px;
10 | height: 220px;
11 | }
12 |
13 | .wp-list .wp-item .wp-image-container {
14 | overflow: hidden;
15 | position: relative;
16 | -ms-grid-row: 1;
17 | -ms-grid-row-span: 1;
18 | }
19 |
20 | .wp-list .wp-item .wp-image-container .wp-image{
21 | height:160px;
22 | width:220px;
23 | background-position: center;
24 | background-size:cover;
25 | }
26 |
27 |
28 | .wp-list .wp-item .wp-text-section {
29 | padding: 4px 12px 8px;
30 | -ms-grid-row: 2;
31 | z-index: 1;
32 | width: calc(100% - 24px);
33 | height: 100%;
34 | }
35 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/normal.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wpc-list .wpc-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr;
8 | -ms-grid-rows: 160px 60px;
9 | width: 220px;
10 | height: 220px;
11 | }
12 |
13 | .wpc-list .wpc-item .wpc-image-container {
14 | overflow: hidden;
15 | position: relative;
16 | -ms-grid-row: 1;
17 | -ms-grid-row-span: 1;
18 | }
19 |
20 | .wpc-list .wpc-item .wpc-image-container .wpc-image{
21 | height:160px;
22 | width:220px;
23 | background-position: center;
24 | background-size:cover;
25 | }
26 |
27 | .wpc-list .wpc-item .wpc-title-count {
28 | font-size: 11pt;
29 | }
30 |
31 | .wpc-list .wpc-item .wpc-text-section {
32 | padding: 4px 12px 8px;
33 | -ms-grid-row: 2;
34 | z-index: 1;
35 | width: calc(100% - 24px);
36 | height: 100%;
37 | }
38 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/wpcom.module.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /* Import rules for GridView templates */
6 | @import url('templates/normal.css');
7 |
8 | .wpc-title-count {
9 | font-size: 11pt;
10 | }
11 |
12 |
13 | @media (min-width: 320px) and (max-width: 499px) {
14 | .wpc-list .wpc-item {
15 | height: 220px;
16 | width: 100%;
17 | -ms-grid-rows: 160px 60px;
18 | }
19 |
20 | .wpc-list .wpc-item .wpc-image-container .wpc-image{
21 | height:160px;
22 | }
23 |
24 | .wpc-list .win-vertical .win-item {
25 | width: 100%;
26 | }
27 | .wpc-list .win-vertical .win-item .wpc-image-container .wpc-image {
28 | width: 100%;
29 | }
30 | .wpc-list .win-vertical .win-item {
31 | width: 100%;
32 | }
33 | .wpc-list .win-vertical .win-item .wpc-image-container .wpc-image {
34 | width: 100%;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/wp.module.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /* Import rules for GridView templates */
6 | @import url('templates/normal.css');
7 |
8 | /* @import url('templates/large.css'); */
9 | /* @import url('templates/wide.css'); */
10 |
11 |
12 | .wp-title-count {
13 | font-size: 11pt;
14 | }
15 |
16 | @media (min-width: 320px) and (max-width: 499px) {
17 | .wp-list .wp-item {
18 | height: 220px;
19 | width: 100%;
20 | -ms-grid-rows: 160px 60px;
21 | }
22 |
23 | .wp-list .wp-item .wp-image-container .wp-image{
24 | height:160px;
25 | }
26 |
27 | .wp-list .win-vertical .win-item {
28 | width: 100%;
29 | }
30 | .wp-list .win-vertical .win-item .wp-image-container .wp-image {
31 | width: 100%;
32 | }
33 | .wp-list .win-vertical .win-item {
34 | width: 100%;
35 | }
36 | .wp-list .win-vertical .win-item .wp-image-container .wp-image {
37 | width: 100%;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/IdeaPress/default.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/pages/wpcom.module.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |  
7 |  
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/large.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wp-list .wp-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr;
8 | -ms-grid-rows: 160px 60px;
9 | width: 220px;
10 | height: 220px;
11 | }
12 |
13 | .wp-list .wp-item .wp-image-container {
14 | overflow: hidden;
15 | position: relative;
16 | -ms-grid-row: 1;
17 | -ms-grid-row-span: 1;
18 | }
19 |
20 | .wp-list .wp-item .wp-image-container .wp-image{
21 | height:160px;
22 | width:220px;
23 | background-position: center;
24 | background-size:cover;
25 | }
26 |
27 | .wp-list .wp-item .wp-text-section {
28 | padding: 4px 12px 8px;
29 | -ms-grid-row: 2;
30 | z-index: 1;
31 | width: calc(100% - 24px);
32 | height: 100%;
33 | }
34 |
35 | .wp-list .wp-item-0 {
36 | overflow: hidden;
37 | display: -ms-grid;
38 | -ms-grid-rows: 1fr 100px;
39 | -ms-grid-columns: 1fr;
40 | width: 460px;
41 | height: 460px;
42 | }
43 |
44 | .wp-list .wp-item-0 .wp-image-container .wp-image{
45 | height:380px;
46 | width:460px;
47 | }
48 |
49 | .wp-list .wp-item-0 .wp-text-section {
50 | font-size: 160%;
51 | }
52 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/pages/wp.module.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |  
9 |  
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/large.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wpc-list .wpc-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr;
8 | -ms-grid-rows: 160px 60px;
9 | width: 220px;
10 | height: 220px;
11 | }
12 |
13 | .wpc-list .wpc-item .wpc-image-container {
14 | overflow: hidden;
15 | position: relative;
16 | -ms-grid-row: 1;
17 | -ms-grid-row-span: 1;
18 | }
19 |
20 | .wpc-list .wpc-item .wpc-image-container .wpc-image{
21 | height:160px;
22 | width:220px;
23 | background-position: center;
24 | background-size:cover;
25 | }
26 |
27 | .wpc-list .wpc-item .wpc-title-count {
28 | font-size: 11pt;
29 | }
30 |
31 | .wpc-list .wpc-item .wpc-text-section {
32 | padding: 4px 12px 8px;
33 | -ms-grid-row: 2;
34 | z-index: 1;
35 | width: calc(100% - 24px);
36 | height: 100%;
37 | }
38 |
39 |
40 | .wpc-list .wpc-item-0 {
41 | overflow: hidden;
42 | display: -ms-grid;
43 | -ms-grid-rows: 1fr 100px;
44 | -ms-grid-columns: 1fr;
45 | width: 460px;
46 | height: 460px;
47 | }
48 |
49 | .wpc-list .wpc-item-0 .wpc-image-container .wpc-image{
50 | height:380px;
51 | width:460px;
52 | }
53 |
--------------------------------------------------------------------------------
/IdeaPress/css/themes/custom.dark.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | /* colors */
5 | /* default header font color including App Title color*/
6 | h1, h2, h3, h4, h5, h6, .mp-color-header {
7 | color: #fff;
8 | }
9 |
10 | /* hub page article/page title font color and progress ring*/
11 | .mp-color-title, progress.win-ring
12 | {
13 | color: #3bb1ff;
14 | border-color: #3bb1ff;
15 | }
16 |
17 | /* link*/
18 | .mp-color-link, .a, a:link {
19 | color: #3bb1ff;
20 | }
21 |
22 | /* hub page sub title font color and visited link*/
23 | .mp-color-subtitle, a:visited, a:active, article a:hover {
24 | color: #ccc;
25 | }
26 |
27 | /* hub page item background color*/
28 | .mp-bg-overlay {
29 | background-color:#666;
30 | }
31 |
32 | /* back button styling*/
33 | header .win-backbutton {
34 | border-color: #fff;
35 | color: #fff;
36 | }
37 |
38 | header .win-backbutton:hover {
39 | background-color:#666;
40 | }
41 |
42 | /* the outline item of the hub item when hover over*/
43 | .win-container:hover {
44 | outline-color: #3bb1ff;
45 | }
46 |
47 | /* detail page styling*/
48 | body, .mp-color-text {
49 | color:#fff;
50 | }
51 |
52 | /* detail page background color*/
53 | body, .mp-bg-main, .mp-bg-plain {
54 | background-color:#000;
55 | }
56 |
--------------------------------------------------------------------------------
/IdeaPress/css/themes/custom.light.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /* colors */
6 | /* default header font color including App Title color*/
7 | h1, h2, h3, h4, h5, h6, .mp-color-header {
8 | color: #000;
9 | }
10 |
11 | /* hub page article/page title font color and progress ring*/
12 | .mp-color-title, progress.win-ring
13 | {
14 | color: #3bb1ff;
15 | border-color: #3bb1ff;
16 | }
17 |
18 | /* link*/
19 | .mp-color-link, .a, a:link {
20 | color: #3bb1ff;
21 | }
22 |
23 | /* hub page sub title font color and visited link*/
24 | .mp-color-subtitle, a:visited, a:active, article a:hover {
25 | color: #666;
26 | }
27 |
28 | /* hub page item background color*/
29 | .mp-bg-overlay {
30 | background-color:#000;
31 | }
32 |
33 | /* back button styling*/
34 | header.win-backbutton {
35 | border-color: #000;
36 | color: #000;
37 | }
38 |
39 | header.win-backbutton:hover {
40 | background-color:#ccc;
41 | }
42 |
43 | /* the outline item of the hub item when hover over*/
44 | .win-container:hover {
45 | outline-color: #3bb1ff;
46 | }
47 |
48 | /* detail page styling*/
49 | body, .mp-color-text {
50 | color:#000;
51 | }
52 |
53 | /* detail page background color*/
54 | body, .mp-bg-main, .mp-bg-plain {
55 | background-color:#fff;
56 | }
--------------------------------------------------------------------------------
/IdeaPress/css/themes/custom.orange.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /* colors */
6 | /* default header font color including App Title color*/
7 | h1, h2, h3, h4, h5, h6, .mp-color-header {
8 | color: #ff7700;
9 | }
10 |
11 | /* hub page article/page title font color and progress ring*/
12 | .mp-color-title, progress.win-ring
13 | {
14 | color: #fff;
15 | border-color: #fff;
16 | }
17 |
18 | /* link*/
19 | .mp-color-link, .a, a:link {
20 | color: #ff7700;
21 | }
22 |
23 | /* hub page sub title font color and visited link*/
24 | .mp-color-subtitle, a:visited, a:active, article a:hover {
25 | color: #333;
26 | }
27 |
28 | /* hub page item background color*/
29 | .mp-bg-overlay {
30 | background-color:#ff7700 ;
31 | }
32 |
33 | /* detail page background color*/
34 | body, .mp-bg-main, .mp-bg-plain {
35 | background-color:#d0d0d0;
36 | }
37 |
38 | /* detail page styling*/
39 | body, .mp-color-text {
40 | color: #fff;
41 | }
42 |
43 | /* back button styling*/
44 | header .win-backbutton {
45 | border-color: #ff7700;
46 | color: #ff7700;
47 | }
48 |
49 | header .win-backbutton:hover {
50 | background-color:#ccc;
51 | color: #fff;
52 | }
53 |
54 | /* the outline item of the hub item when hover over*/
55 | .win-container:hover {
56 | outline-color: #ff7700;
57 | }
58 |
--------------------------------------------------------------------------------
/IdeaPress/js/default.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Version 2.0
7 | File: default.js
8 | Author: IdeaNotion
9 | Description: Starting point of the App
10 | */
11 | (function () {
12 | "use strict";
13 |
14 | var app = WinJS.Application;
15 | var activation = Windows.ApplicationModel.Activation;
16 | WinJS.strictProcessing();
17 |
18 | app.addEventListener("activated", function (args) {
19 | if (args.detail.kind === activation.ActivationKind.launch) {
20 | ideaPress.checkLocalStorageSchemaVersion();
21 | WinJS.UI.processAll();
22 | }
23 | });
24 |
25 | WinJS.Application.onsettings = function (e) {
26 |
27 | // Adding the About Page to the Settings Charm
28 | e.detail.applicationcommands = {
29 | "help": { title: "About Us", href: "/pages/about-flyout.html" }
30 | };
31 | WinJS.UI.SettingsFlyout.populateSettings(e);
32 |
33 | // Adding the Privacy Policy to the Settings Charm
34 | var appCommands = e.detail.e.request.applicationCommands;
35 | var appCmdPrivacy = new Windows.UI.ApplicationSettings.SettingsCommand("privacy", "Privacy Policy", function () {
36 | window.open(ideaPress.options.privacyUrl);
37 | });
38 | appCommands.append(appCmdPrivacy);
39 | };
40 |
41 | app.start();
42 | })();
43 |
--------------------------------------------------------------------------------
/IdeaPress/css/themes/custom.mwnw.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | /* colors */
5 | /* default header font color including App Title color*/
6 | h1, h2, h3, h4, h5, h6, .mp-color-header {
7 | color: #000;
8 | }
9 |
10 | .hero-info .hero-title {
11 | color:#fff;
12 | text-shadow: 0px 0px 16px #666;
13 | }
14 |
15 | .hero-info h3 {
16 | color:#fff;
17 | }
18 |
19 | /* hub page article/page title font color and progress ring*/
20 | .mp-color-title, progress.win-ring
21 | {
22 | color: #000;
23 | border-color: #f37024;
24 | }
25 |
26 | /* link*/
27 | .mp-color-link, .a, a:link {
28 | color: #000;
29 | }
30 |
31 | /* hub page sub title font color and visited link*/
32 | .mp-color-subtitle, a:visited, a:active, article a:hover {
33 | color: #000;
34 | }
35 |
36 | /* hub page item background color*/
37 | .mp-bg-overlay {
38 | background-color:#f37024;
39 | }
40 |
41 | /* back button styling*/
42 | header .win-backbutton {
43 | border-color: #fff;
44 | color: #f37024;
45 | }
46 |
47 | header .win-backbutton:hover {
48 | background-color:#f37024;
49 | }
50 |
51 | /* the outline item of the hub item when hover over*/
52 | .win-container:hover {
53 | outline-color: #3bb1ff;
54 | }
55 |
56 | /* detail page styling*/
57 | body, .mp-color-text {
58 | color:#666;
59 | }
60 |
61 | /* detail page background color*/
62 | body, .mp-bg-main, .mp-bg-plain {
63 |
64 | }
65 |
66 | body {
67 | background-image: url('/images/backgroundPattern.png') !important;
68 | background-size:auto !important;
69 | background-repeat: repeat !important;
70 | }
71 |
72 | .wp-list .win-container {
73 | box-shadow:4px 4px 12px #666;
74 | }
--------------------------------------------------------------------------------
/IdeaPress/pages/about-flyout.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 | About
9 |
10 |
11 |
12 |
13 |
14 |
18 |
19 |
20 |
Make Web Not War is a passionate Canadian community of tech enthusiasts who likes building technology solutions that work together. We are all about the Openness of Microsoft around Open Data, Open Source, Open Standard, and Interoperability. Do not be fooled by the name, as we welcome anyone who is excited about the latest trends in Web, mobile, client, and cloud computing with any software types, whatever technology you are using.
21 |
22 |
Powered by Idea Notion Development Inc. using IdeaPress
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/IdeaPress/pages/hub.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 | Main Page
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
This is the Title Man
31 | Featured
32 | 3 Hours Ago
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/IdeaPress/js/liveTileTask.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Version 2.0
7 | File: liveTileTask.js
8 | Author: IdeaNotion
9 | Description: handles the support of live tiles
10 | */
11 | (function () {
12 | "use strict";
13 | importScripts("//Microsoft.WinJS.2.0/js/base.js");
14 | importScripts("/js/core.js");
15 | importScripts("/js/options.js");
16 |
17 | var backgroundTaskInstance = Windows.UI.WebUI.WebUIBackgroundTaskInstance.current;
18 | var settings = Windows.Storage.ApplicationData.current.localSettings;
19 | settings.values["LiveTileLastStart"] = new Date();
20 |
21 | function onCanceled(cancelSender, cancelReason) {
22 | settings.values["LiveTileLastCancelled"] = cancelReason;
23 | }
24 | backgroundTaskInstance.addEventListener("canceled", onCanceled);
25 |
26 | function doWork() {
27 | ideaPress.getLiveTile().then(function (liveTiles) {
28 | var tileUpdateManager = Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication();
29 | tileUpdateManager.enableNotificationQueue(true);
30 |
31 | if (liveTiles.length > 0)
32 | {
33 | Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication().clear();
34 |
35 | for (var i = 0; i < Math.min(liveTiles.length, 5) ; i++) {
36 |
37 | Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication().update(liveTiles[i].tile);
38 | }
39 | }
40 | settings.values["LiveTileLastComplete"] = new Date();
41 | close();
42 | }, function () { settings.values["LiveTileLastFailed"] = new Date();; close(); }, function () { });
43 | }
44 |
45 | doWork();
46 | })();
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/IdeaPress/pages/page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | post
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2 | [Bb]in/
3 | [Oo]bj/
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | ## Ignore Visual Studio temporary files, build results, and
9 | ## files generated by popular Visual Studio add-ons.
10 |
11 | # User-specific files
12 | *.suo
13 | *.user
14 | *.sln.docstates
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Rr]elease/
19 | x64/
20 | *_i.c
21 | *_p.c
22 | *.ilk
23 | *.meta
24 | *.obj
25 | *.pch
26 | *.pdb
27 | *.pgc
28 | *.pgd
29 | *.rsp
30 | *.sbr
31 | *.tlb
32 | *.tli
33 | *.tlh
34 | *.tmp
35 | *.log
36 | *.vspscc
37 | *.vssscc
38 | .builds
39 |
40 | # Visual C++ cache files
41 | ipch/
42 | *.aps
43 | *.ncb
44 | *.opensdf
45 | *.sdf
46 |
47 | # Visual Studio profiler
48 | *.psess
49 | *.vsp
50 | *.vspx
51 |
52 | # Guidance Automation Toolkit
53 | *.gpState
54 |
55 | # ReSharper is a .NET coding add-in
56 | _ReSharper*
57 |
58 | # NCrunch
59 | *.ncrunch*
60 | .*crunch*.local.xml
61 |
62 | # Installshield output folder
63 | [Ee]xpress
64 |
65 | # DocProject is a documentation generator add-in
66 | DocProject/buildhelp/
67 | DocProject/Help/*.HxT
68 | DocProject/Help/*.HxC
69 | DocProject/Help/*.hhc
70 | DocProject/Help/*.hhk
71 | DocProject/Help/*.hhp
72 | DocProject/Help/Html2
73 | DocProject/Help/html
74 |
75 | # Click-Once directory
76 | publish
77 |
78 | # Publish Web Output
79 | *.Publish.xml
80 |
81 | # NuGet Packages Directory
82 | packages
83 |
84 | # Windows Azure Build Output
85 | csx
86 | *.build.csdef
87 |
88 | # Windows Store app package directory
89 | AppPackages/
90 |
91 | # Others
92 | [Bb]in
93 | [Oo]bj
94 | sql
95 | TestResults
96 | [Tt]est[Rr]esult*
97 | *.Cache
98 | ClientBin
99 | [Ss]tyle[Cc]op.*
100 | ~$*
101 | *.dbmdl
102 | Generated_Code #added for RIA/Silverlight projects
103 |
104 | # Backup & report files from converting an old project file to a newer
105 | # Visual Studio version. Backup files are not needed, because we have git ;-)
106 | _UpgradeReport_Files/
107 | Backup*/
108 | UpgradeLog*.XML
109 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/pages/wp.module.section.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/IdeaPress/package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Make Web Not War
6 | IdeaPress
7 | IDEA NOTION DEVELOPMENT INC.
8 | images\storelogo.png
9 |
10 |
11 | 6.3.0
12 | 6.3.0
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/pages/wpcom.module.section.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/text.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .mp-module-0 .wpc-list .wpc-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr 0px;
8 | -ms-grid-rows: 130px;
9 | width: 400px;
10 | height: 130px;
11 | }
12 | .mp-module-0 .wpc-list .wpc-item .wpc-image-container {display:none;
13 | }
14 | .mp-module-0 .wpc-list .wpc-item .wpc-text-section {
15 | -ms-grid-row: 1;
16 | -ms-grid-column: 1;
17 | padding: 8px 12px 8px;
18 | }
19 | .mp-module-0 .wpc-list .wpc-item h3 {
20 | padding-top: 10px;
21 | font-size: 160%;
22 | }
23 |
24 | .mp-module-0 .wpc-list .wpc-item .wpc-image-container .wpc-image{
25 | display:none;
26 | }
27 |
28 | .wpc-list .wpc-item {
29 | overflow: hidden;
30 | display: -ms-grid;
31 | -ms-grid-columns: 1fr 0px;
32 | -ms-grid-rows: 130px;
33 | width: 400px;
34 | height: 130px;
35 | }
36 |
37 | .wpc-list .wpc-item .wpc-image-container {
38 | display:none;
39 | }
40 | .wpc-list .wpc-item .wpc-text-section {
41 | -ms-grid-row: 1;
42 | -ms-grid-column: 1;
43 | padding: 8px 12px 8px;
44 | }
45 | .wpc-list .wpc-item h3 {
46 | font-size: 130%;
47 | text-overflow: clip;
48 | word-wrap: break-word;
49 | }
50 | .wpc-list .wpc-item h5 {
51 | text-overflow: clip;
52 | word-wrap: break-word;
53 | }
54 |
55 |
56 | .wpc-list .wpc-item .wpc-image-container .wpc-image{
57 | height:100px;
58 | width:100px;
59 | background-position: center;
60 | background-size:cover;
61 | }
62 |
63 | @media (min-width: 320px) and (max-width: 499px) {
64 | .wpc-list .wpc-item {
65 | overflow: hidden;
66 | display: -ms-grid;
67 | -ms-grid-columns: 1fr;
68 | -ms-grid-rows: 160px 60px;
69 | height: 220px;
70 | }
71 |
72 | .wpc-list .wpc-item .wpc-image-container {
73 | display:none;
74 | -ms-grid-column: 1;
75 | }
76 |
77 | .wpc-list .wpc-item .wpc-text-section {
78 | -ms-grid-row: 2;
79 | -ms-grid-column: 1;
80 | padding: 8px 12px 8px;
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/IdeaPress/pages/cat-posts.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Main Page
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
30 |
31 |
32 |
33 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/pages/wp.module.searchResults.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 | No results match your search.
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/pages/wpcom.module.searchResults.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 | No results match your search.
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/wide.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .mp-module-0 .wp-list .wp-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr 100px;
8 | -ms-grid-rows: 100px;
9 | width: 460px;
10 | height: 100px;
11 | }
12 | .mp-module-0 .wp-list .wp-item .wp-image-container {
13 | -ms-grid-row: 1;
14 | -ms-grid-column: 2;
15 | }
16 | .mp-module-0 .wp-list .wp-item .wp-text-section {
17 | -ms-grid-row: 1;
18 | -ms-grid-column: 1;
19 | padding: 8px 12px 8px;
20 | }
21 | .mp-module-0 .wp-list .wp-item h3 {
22 | padding-top: 10px;
23 | font-size: 160%;
24 | }
25 |
26 | .mp-module-0 .wp-list .wp-item .wp-image-container .wp-image{
27 | height:100px;
28 | width:100px;
29 | background-position: center;
30 | background-size:cover;
31 | }
32 |
33 | .wp-list .wp-item {
34 | overflow: hidden;
35 | display: -ms-grid;
36 | -ms-grid-columns: 1fr 100px;
37 | -ms-grid-rows: 100px;
38 | width: 440px;
39 | height: 100px;
40 | }
41 |
42 | .wp-list .wp-item .wp-image-container {
43 | -ms-grid-row: 1;
44 | -ms-grid-column: 2;
45 | }
46 | .wp-list .wp-item .wp-text-section {
47 | -ms-grid-row: 1;
48 | -ms-grid-column: 1;
49 | padding: 8px 12px 8px;
50 | }
51 | .wp-list .wp-item h3 {
52 | text-overflow: clip;
53 | word-wrap: break-word;
54 | }
55 | .wp-list .wp-item h5 {
56 | text-overflow: clip;
57 | word-wrap: break-word;
58 | }
59 |
60 |
61 | .wp-list .wp-item .wp-image-container .wp-image{
62 | height:100px;
63 | width:100px;
64 | background-position: center;
65 | background-size:cover;
66 | }
67 |
68 | @media (min-width: 320px) and (max-width: 499px) {
69 | .wp-list .wp-item {
70 | overflow: hidden;
71 | display: -ms-grid;
72 | -ms-grid-columns: 1fr;
73 | -ms-grid-rows: 160px 60px;
74 | height: 220px;
75 | }
76 |
77 | .wp-list .wp-item .wp-image-container {
78 | overflow: hidden;
79 | position: relative;
80 | -ms-grid-row: 1;
81 | -ms-grid-column: 1;
82 | }
83 |
84 | .wp-list .wp-item .wp-text-section {
85 | -ms-grid-row: 2;
86 | -ms-grid-column: 1;
87 | padding: 8px 12px 8px;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/IdeaPress/js/share-source.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Version 2.0
7 | File: share-source.js
8 | Author: IdeaNotion
9 | Description: It handles the Sharing functionality.
10 | */
11 | (function () {
12 | function initializeShareSource() {
13 | setupShare();
14 | }
15 |
16 | function setupShare() {
17 | var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
18 | dataTransferManager.addEventListener("datarequested", function (e) {
19 | var request = e.request;
20 | uriDataRequestedHandler(request);
21 | });
22 | }
23 |
24 | function showShareUI() {
25 | // if we ever want a share button, just assign this onlick
26 | Windows.ApplicationModel.DataTransfer.DataTransferManager.showShareUI();
27 | }
28 |
29 | function addhttp(url) {
30 | if (!/^(f|ht)tps?:\/\//i.test(url)) {
31 | url = "http://" + url;
32 | }
33 | return url;
34 | }
35 |
36 | function uriDataRequestedHandler(request) {
37 |
38 | // Looks for any DOM element with class "mp-share". If element exists, we will share the content from the element.
39 | // If not, we will share the mainUrl from options.js.
40 | var postEl = document.querySelector('.mp-share');
41 | if (null != postEl) {
42 |
43 | var permalink = postEl.getAttribute('permalink');
44 | if(!permalink)
45 | return; // can't find the matching localStorage post for extra props
46 |
47 | request.data.setUri(new Windows.Foundation.Uri(permalink));
48 | request.data.properties.title = postEl.getAttribute('title');
49 | request.data.properties.description = postEl.innerText.substring(0, 50);
50 | } else {
51 | // we're not in a single post view, let's promote your site
52 | request.data.setUri(new Windows.Foundation.Uri(addhttp(ideaPress.options.mainUrl)));
53 | request.data.properties.title = ideaPress.options.appTitle;
54 | request.data.properties.description = ideaPress.options.appTitle;
55 | }
56 | }
57 |
58 | document.addEventListener("DOMContentLoaded", initializeShareSource, false);
59 | })();
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/wide.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .mp-module-0 .wpc-list .wpc-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr 100px;
8 | -ms-grid-rows: 100px;
9 | width: 460px;
10 | height: 100px;
11 | }
12 | .mp-module-0 .wpc-list .wpc-item .wpc-image-container {
13 | -ms-grid-row: 1;
14 | -ms-grid-column: 2;
15 | }
16 | .mp-module-0 .wpc-list .wpc-item .wpc-text-section {
17 | -ms-grid-row: 1;
18 | -ms-grid-column: 1;
19 | padding: 8px 12px 8px;
20 | }
21 | .mp-module-0 .wpc-list .wpc-item h3 {
22 | padding-top: 10px;
23 | font-size: 160%;
24 | }
25 |
26 | .mp-module-0 .wpc-list .wpc-item .wpc-image-container .wpc-image{
27 | height:100px;
28 | width:100px;
29 | background-position: center;
30 | background-size:cover;
31 | }
32 |
33 | .wpc-list .wpc-item {
34 | overflow: hidden;
35 | display: -ms-grid;
36 | -ms-grid-columns: 1fr 100px;
37 | -ms-grid-rows: 100px;
38 | width: 440px;
39 | height: 100px;
40 | }
41 |
42 | .wpc-list .wpc-item .wpc-image-container {
43 | -ms-grid-row: 1;
44 | -ms-grid-column: 2;
45 | }
46 | .wpc-list .wpc-item .wpc-text-section {
47 | -ms-grid-row: 1;
48 | -ms-grid-column: 1;
49 | padding: 8px 12px 8px;
50 | }
51 | .wpc-list .wpc-item h3 {
52 | text-overflow: clip;
53 | word-wrap: break-word;
54 | }
55 | .wpc-list .wpc-item h5 {
56 | text-overflow: clip;
57 | word-wrap: break-word;
58 | }
59 |
60 |
61 | .wpc-list .wpc-item .wpc-image-container .wpc-image{
62 | height:100px;
63 | width:100px;
64 | background-position: center;
65 | background-size:cover;
66 | }
67 |
68 | @media (min-width: 320px) and (max-width: 499px) {
69 | .wpc-list .wpc-item {
70 | overflow: hidden;
71 | display: -ms-grid;
72 | -ms-grid-columns: 1fr;
73 | -ms-grid-rows: 160px 60px;
74 | height: 220px;
75 | }
76 |
77 | .wpc-list .wpc-item .wpc-image-container {
78 | overflow: hidden;
79 | position: relative;
80 | -ms-grid-row: 1;
81 | -ms-grid-column: 1;
82 | }
83 |
84 | .wpc-list .wpc-item .wpc-text-section {
85 | -ms-grid-row: 2;
86 | -ms-grid-column: 1;
87 | padding: 8px 12px 8px;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/text.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .mp-module-0 .wp-list .wp-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr 0px;
8 | -ms-grid-rows: 130px;
9 | width: 400px;
10 | height: 130px;
11 | }
12 | .mp-module-0 .wp-list .wp-item .wp-image-container {
13 | display:none;
14 | }
15 | .mp-module-0 .wp-list .wp-item .wp-text-section {
16 | -ms-grid-row: 1;
17 | -ms-grid-column: 1;
18 | padding: 8px 12px 8px;
19 | }
20 | .mp-module-0 .wp-list .wp-item h3 {
21 | padding-top: 10px;
22 | font-size: 160%;
23 | }
24 |
25 | .mp-module-0 .wp-list .wp-item .wp-image-container .wp-image{
26 | display:none;
27 | }
28 |
29 | .wp-list .wp-item {
30 | overflow: hidden;
31 | display: -ms-grid;
32 | -ms-grid-columns: 1fr 0px;
33 | -ms-grid-rows: 130px;
34 | width: 400px;
35 | height: 130px;
36 | }
37 |
38 | .wp-list .wp-item .wp-image-container {
39 | -ms-grid-row: 1;
40 | -ms-grid-column: 2;
41 | }
42 | .wp-list .wp-item .wp-text-section {
43 | -ms-grid-row: 1;
44 | -ms-grid-column: 1;
45 | padding: 8px 12px 8px;
46 | }
47 | .wp-list .wp-item h3 {
48 | font-size: 130%;
49 | text-overflow:clip;
50 | word-wrap: break-word;
51 | }
52 | .wp-list .wp-item h5 {
53 | text-overflow: clip;
54 | word-wrap: break-word;
55 | }
56 |
57 |
58 | .wp-list .wp-item .wp-image-container .wp-image{
59 | height:100px;
60 | width:100px;
61 | background-position: center;
62 | background-size:cover;
63 | }
64 |
65 | .mp-color-subtitle {
66 | display:none;
67 | }
68 | .mp-color-description {
69 | display:block !important;
70 | }
71 |
72 | @media (min-width: 320px) and (max-width: 499px) {
73 | .wp-list .wp-item {
74 | overflow: hidden;
75 | display: -ms-grid;
76 | -ms-grid-columns: 1fr;
77 | -ms-grid-rows: 160px 60px;
78 | height: 220px;
79 | }
80 |
81 | .wp-list .wp-item .wp-image-container {
82 | display:none;
83 | }
84 |
85 | .wp-list .wp-item .wp-text-section {
86 | -ms-grid-row: 2;
87 | -ms-grid-column: 1;
88 | padding: 8px 12px 8px;
89 | }
90 |
91 | .mp-color-subtitle {
92 | display:none;
93 | }
94 | .mp-color-description {
95 | display:block!important;
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/IdeaPress/pages/mainpage.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Main Page
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
27 |
28 |
29 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/IdeaPress/pages/searchResults.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Search Contract
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 |
23 |
24 |
25 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
41 |
42 | No results match your search.
43 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/IdeaPress.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.21005.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "IdeaPress", "IdeaPress\IdeaPress.jsproj", "{B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Debug|ARM = Debug|ARM
12 | Debug|x64 = Debug|x64
13 | Debug|x86 = Debug|x86
14 | Release|Any CPU = Release|Any CPU
15 | Release|ARM = Release|ARM
16 | Release|x64 = Release|x64
17 | Release|x86 = Release|x86
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
23 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|ARM.ActiveCfg = Debug|ARM
24 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|ARM.Build.0 = Debug|ARM
25 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|ARM.Deploy.0 = Debug|ARM
26 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|x64.ActiveCfg = Debug|x64
27 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|x64.Build.0 = Debug|x64
28 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|x64.Deploy.0 = Debug|x64
29 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|x86.ActiveCfg = Debug|x86
30 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|x86.Build.0 = Debug|x86
31 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Debug|x86.Deploy.0 = Debug|x86
32 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|Any CPU.Deploy.0 = Release|Any CPU
35 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|ARM.ActiveCfg = Release|ARM
36 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|ARM.Build.0 = Release|ARM
37 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|ARM.Deploy.0 = Release|ARM
38 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|x64.ActiveCfg = Release|x64
39 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|x64.Build.0 = Release|x64
40 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|x64.Deploy.0 = Release|x64
41 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|x86.ActiveCfg = Release|x86
42 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|x86.Build.0 = Release|x86
43 | {B0D292F6-2BA4-40F4-A1EB-97DF50B68BED}.Release|x86.Deploy.0 = Release|x86
44 | EndGlobalSection
45 | GlobalSection(SolutionProperties) = preSolution
46 | HideSolutionNode = FALSE
47 | EndGlobalSection
48 | EndGlobal
49 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/rectangle.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .mp-module-0 .wp-list .wp-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr 100px;
8 | -ms-grid-rows: 100px;
9 | width: 460px;
10 | height: 100px;
11 | }
12 | .mp-module-0 .wp-list .wp-item .wp-image-container {
13 | -ms-grid-row: 1;
14 | -ms-grid-column: 2;
15 | }
16 | .mp-module-0 .wp-list .wp-item .wp-text-section {
17 | -ms-grid-row: 1;
18 | -ms-grid-column: 1;
19 | padding: 8px 12px 8px;
20 | }
21 | .mp-module-0 .wp-list .wp-item h3 {
22 | padding-top: 10px;
23 | font-size: 160%;
24 | }
25 |
26 | .mp-module-0 .wp-list .wp-item .wp-image-container .wp-image{
27 | height:100px;
28 | width:100px;
29 | background-position: center;
30 | background-size:cover;
31 | }
32 |
33 | .wp-list .wp-item {
34 | overflow: hidden;
35 | display: -ms-grid;
36 | -ms-grid-columns: 1fr 200px;
37 | -ms-grid-rows: 140px;
38 | width: 440px;
39 | height: 140px;
40 | }
41 |
42 | .wp-list .wp-item .wp-image-container {
43 | -ms-grid-row: 1;
44 | -ms-grid-column: 2;
45 | }
46 | .wp-list .wp-item .wp-text-section {
47 | -ms-grid-row: 1;
48 | -ms-grid-column: 1;
49 | padding: 8px 12px 8px;
50 | }
51 | .wp-list .wp-item h3 {
52 | text-overflow: clip;
53 | word-wrap:normal;
54 | white-space: normal;
55 | font-size: 140%;
56 | }
57 | .wp-list .wp-item h5 {
58 | text-overflow: clip;
59 | word-wrap:normal;
60 | white-space: normal;
61 | }
62 |
63 |
64 | .wp-list .wp-item .wp-image-container .wp-image{
65 | height:140px;
66 | width:200px;
67 | background-position: center;
68 | background-size:cover;
69 | }
70 |
71 | @media (min-width: 320px) and (max-width: 499px) {
72 | .wp-list .wp-item {
73 | overflow: hidden;
74 | display: -ms-grid;
75 | -ms-grid-columns: 1fr;
76 | -ms-grid-rows: 160px 60px;
77 | height: 220px;
78 | }
79 |
80 | .wp-list .wp-item .wp-text-section h3 {
81 | text-overflow:ellipsis;
82 | word-wrap:normal;
83 | white-space:nowrap;
84 | }
85 |
86 | .wp-list .wp-item .wp-text-section h5 {
87 | text-overflow:ellipsis;
88 | white-space:nowrap;
89 | }
90 |
91 | .wp-list .wp-item .wp-image-container {
92 | overflow: hidden;
93 | position: relative;
94 | -ms-grid-row: 1;
95 | -ms-grid-column: 1;
96 | }
97 |
98 | .wp-list .wp-item .wp-text-section {
99 | -ms-grid-row: 2;
100 | -ms-grid-column: 1;
101 | padding: 8px 12px 8px;
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/tight.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wp-list .win-horizontal { overflow-x: hidden; }
5 | .wp-list .win-vertical { overflow-y: hidden; }
6 | .wp-list .win-horizontal.win-viewport { overflow-x: hidden;}
7 | .wp-list .win-vertical.win-viewport { overflow-y: hidden;}
8 |
9 | @media (min-width: 501px) {
10 | .wp-list .wp-item {
11 | overflow: visible ;
12 | display: -ms-grid;
13 | -ms-grid-columns: 240px;
14 | -ms-grid-rows: 180px 60px;
15 | width: 220px;
16 | height: 220px;
17 | }
18 |
19 | .wp-list .win-item {
20 | overflow: visible ;
21 | }
22 |
23 | .wp-list .win-container {
24 | width: 240px !important; /* override inline css*/
25 | height: 240px !important; /* override inline css*/
26 | overflow: hidden;
27 | }
28 |
29 | .wp-list .wp-item .wp-image-container {
30 | overflow: hidden;
31 | position: relative;
32 | -ms-grid-row: 1;
33 | -ms-grid-row-span: 2;
34 | }
35 |
36 | .wp-list .wp-item .wp-image-container .wp-image {
37 | height: 240px;
38 | width: 240px;
39 | background-position: center;
40 | background-size: cover;
41 | }
42 |
43 |
44 | .wp-list .wp-item .wp-text-section {
45 | padding: 4px 12px 8px;
46 | -ms-grid-row: 2;
47 | z-index: 100;
48 | width: 215px;
49 | height: 60px;
50 | position: absolute;
51 | opacity: 0.6;
52 | margin-top: 30px;
53 | -ms-transition-property: margin-top, opacity;
54 | -ms-transition-duration: 0.3s;
55 | -ms-transition-timing-function: linear;
56 | }
57 |
58 | .wp-list .wp-item .wp-text-section h5 {
59 | display: none;
60 | }
61 |
62 | .wp-list .wp-item:hover .wp-text-section {
63 | opacity: 1;
64 | margin-top: 0px;
65 | }
66 |
67 | .wp-list .wp-item:hover .wp-text-section h5 {
68 | display: block;
69 | }
70 | }
71 |
72 | @media (min-width: 320px) and (max-width: 499px) {
73 | .wp-list .wp-item {
74 | overflow: hidden;
75 | display: -ms-grid;
76 | -ms-grid-columns: 1fr;
77 | -ms-grid-rows: 160px 60px;
78 | height: 220px;
79 | }
80 |
81 | .wp-list .wp-item .wp-image-container {
82 | overflow: hidden;
83 | position: relative;
84 | -ms-grid-row: 1;
85 | -ms-grid-column: 1;
86 | }
87 |
88 | .wp-list .wp-item .wp-text-section {
89 | -ms-grid-row: 2;
90 | -ms-grid-column: 1;
91 | padding: 8px 12px 8px;
92 | opacity: 1;
93 | margin-top: 0px;
94 | }
95 | .wp-list .wp-item .wp-text-section h5 {
96 | display: block;
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/rectangle.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .mp-module-0 .wpc-list .wpc-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr 100px;
8 | -ms-grid-rows: 100px;
9 | width: 460px;
10 | height: 100px;
11 | }
12 | .mp-module-0 .wpc-list .wpc-item .wpc-image-container {
13 | -ms-grid-row: 1;
14 | -ms-grid-column: 2;
15 | }
16 | .mp-module-0 .wpc-list .wpc-item .wpc-text-section {
17 | -ms-grid-row: 1;
18 | -ms-grid-column: 1;
19 | padding: 8px 12px 8px;
20 | }
21 | .mp-module-0 .wpc-list .wpc-item h3 {
22 | padding-top: 10px;
23 | font-size: 160%;
24 | }
25 |
26 | .mp-module-0 .wpc-list .wpc-item .wpc-image-container .wpc-image{
27 | height:100px;
28 | width:100px;
29 | background-position: center;
30 | background-size:cover;
31 | }
32 |
33 | .wpc-list .wpc-item {
34 | overflow: hidden;
35 | display: -ms-grid;
36 | -ms-grid-columns: 1fr 200px;
37 | -ms-grid-rows: 140px;
38 | width: 440px;
39 | height: 140px;
40 | }
41 |
42 | .wpc-list .wpc-item .wpc-image-container {
43 | -ms-grid-row: 1;
44 | -ms-grid-column: 2;
45 | }
46 | .wpc-list .wpc-item .wpc-text-section {
47 | -ms-grid-row: 1;
48 | -ms-grid-column: 1;
49 | padding: 8px 12px 8px;
50 | }
51 | .wpc-list .wpc-item h3 {
52 | text-overflow: clip !important;
53 | word-wrap:normal;
54 | white-space: normal;
55 | font-size: 140%;
56 | }
57 | .wpc-list .wpc-item h5 {
58 | text-overflow: clip !important;
59 | word-wrap:normal;
60 | white-space: normal;
61 | }
62 |
63 |
64 | .wpc-list .wpc-item .wpc-image-container .wpc-image{
65 | height:140px;
66 | width:200px;
67 | background-position: center;
68 | background-size:cover;
69 | }
70 |
71 | @media (min-width: 320px) and (max-width: 499px) {
72 | .wpc-list .wpc-item {
73 | overflow: hidden;
74 | display: -ms-grid;
75 | -ms-grid-columns: 1fr;
76 | -ms-grid-rows: 160px 60px;
77 | height: 220px;
78 | }
79 |
80 | .wpc-list .wpc-item .wpc-image-container {
81 | overflow: hidden;
82 | position: relative;
83 | -ms-grid-row: 1;
84 | -ms-grid-column: 1;
85 | }
86 |
87 | .wpc-list .wpc-item .wpc-text-section {
88 | -ms-grid-row: 2;
89 | -ms-grid-column: 1;
90 | padding: 8px 12px 8px;
91 | }
92 |
93 | .wpc-list .wpc-item .wpc-text-section h3 {
94 | text-overflow:ellipsis;
95 | word-wrap:normal;
96 | white-space: nowrap;
97 | }
98 |
99 | .wpc-list .wpc-item .wpc-text-section h5 {
100 | text-overflow:ellipsis;
101 | word-wrap:normal;
102 | white-space: nowrap;
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/tight.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wpc-list .win-horizontal { overflow-x: hidden; }
5 | .wpc-list .win-vertical { overflow-y: hidden; }
6 | .wpc-list .win-horizontal.win-viewport { overflow-x: hidden; }
7 | .wpc-list .win-horizontal.win-viewport { overflow-x: hidden; }
8 | @media (min-width: 501px) {
9 | .wpc-list .wpc-item {
10 | overflow: visible;
11 | display: -ms-grid;
12 | -ms-grid-columns: 240px;
13 | -ms-grid-rows: 180px 60px;
14 | width: 220px;
15 | height: 220px;
16 | }
17 |
18 | .wpc-list .win-item {
19 | overflow: visible;
20 | }
21 |
22 | .wpc-list .win-container {
23 | width: 240px !important; /* override inline css*/
24 | height: 240px !important; /* override inline css*/
25 | overflow: hidden;
26 | }
27 |
28 | .wpc-list .wpc-item .wpc-image-container {
29 | overflow: hidden;
30 | position: relative;
31 | -ms-grid-row: 1;
32 | -ms-grid-row-span: 2;
33 | }
34 |
35 | .wpc-list .wpc-item .wpc-image-container .wpc-image {
36 | height: 240px;
37 | width: 240px;
38 | background-position: center;
39 | background-size: cover;
40 | }
41 |
42 |
43 | .wpc-list .wpc-item .wpc-text-section {
44 | padding: 4px 12px 8px;
45 | -ms-grid-row: 2;
46 | z-index: 100;
47 | width: 216px;
48 | height: 60px;
49 | position: absolute;
50 | opacity: 0.6;
51 | margin-top: 30px;
52 | -ms-transition-property: margin-top, opacity;
53 | -ms-transition-duration: 0.3s;
54 | -ms-transition-timing-function: linear;
55 | }
56 |
57 | .wpc-list .wpc-item .wpc-text-section h5 {
58 | display: none;
59 | }
60 |
61 | .wpc-list .wpc-item:hover .wpc-text-section {
62 | opacity: 1;
63 | margin-top: 0px;
64 | }
65 |
66 | .wpc-list .wpc-item:hover .wpc-text-section h5 {
67 | display: block;
68 | }
69 | }
70 |
71 | @media (min-width: 320px) and (max-width: 499px) {
72 | .wpc-list .wpc-item {
73 | overflow: hidden;
74 | display: -ms-grid;
75 | -ms-grid-columns: 1fr;
76 | -ms-grid-rows: 160px 60px;
77 | height: 220px;
78 | }
79 |
80 | .wpc-list .wpc-item .wpc-image-container {
81 | overflow: hidden;
82 | position: relative;
83 | -ms-grid-row: 1;
84 | -ms-grid-column: 1;
85 | }
86 |
87 | .wpc-list .wpc-item .wpc-text-section {
88 | -ms-grid-row: 2;
89 | -ms-grid-column: 1;
90 | padding: 8px 12px 8px;
91 | opacity: 1;
92 | margin-top: 0px;
93 | }
94 | .wpc-list .wpc-item .wpc-text-section h5 {
95 | display: block;
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/IdeaPress/js/options.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Version 2.0
7 | File: options.js
8 | Author: IdeaNotion
9 | Description: Configures the application and the modules. Please go to https://github.com/ideanotion/ideapress for how to apply the options
10 | */
11 | (function () {
12 | "use strict";
13 |
14 | ideaPress.importModulesAndSetOptions(
15 | /* import module */
16 | ["/modules/wordpress/js/wp.module.js", "/modules/wordpressCom/js/wpcom.module.js"],
17 |
18 | function() {
19 | ideaPress.options = {
20 | appTitleImage: '/images/title.png', // App title image (approx. 600px x 80px)
21 | appTitle: "Make Web Not War", // App title text
22 | cacheTime: 3600000, // Global cache time to try fetch
23 | mainUrl: "http://www.webnotwar.ca/", // Main promoting site
24 | privacyUrl: "http://www.webnotwar.ca/make-web-not-war-windows-8-application-privacy-policy/", // Privacy URL
25 | useSnapEffect: true,
26 | fetchOnPostInit: false, //only for selfhosted sites
27 | modules: [
28 | { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "News", typeId: wordpressModule.MOSTRECENT } },
29 | { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "Bookmark", typeId: wordpressModule.BOOKMARKS } },
30 | { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "Featured", typeId: wordpresscomModule.CATEGORY, categoryId: 530, isHero: true } },
31 | { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "Open Data", typeId: wordpresscomModule.CATEGORY, categoryId: 1729, isHero: true } },
32 | { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "Events", typeId: wordpresscomModule.CATEGORY, categoryId: 4, isHero: true } },
33 | { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "Training & Webcasts", typeId: wordpresscomModule.CATEGORY, categoryId: 350, isHero: true } },
34 | { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "Featured", typeId: wordpresscomModule.CATEGORY, categoryId: 530, isHero: true } },
35 | ],
36 | searchModule: { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "Search" } },
37 | liveTileModule: { name: wordpressModule, options: { apiUrl: 'http://www.webnotwar.ca/', title: "Live Tile", squareTileType: Windows.UI.Notifications.TileTemplateType.tileSquarePeekImageAndText04, wideTileType: Windows.UI.Notifications.TileTemplateType.tileWideImageAndText01 } },
38 | };
39 | });
40 | })();
41 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/fullScreen.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wp-list .win-horizontal { overflow-x: hidden; }
5 | .wp-list .win-vertical { overflow-y: hidden; }
6 | .wp-list .win-horizontal.win-viewport { overflow-x: hidden;}
7 | .wp-list .win-vertical.win-viewport { overflow-y: hidden;}
8 | /*Overwrite class to make it work*/
9 | #hub-container {
10 | padding-left:0px;
11 | padding: 0px;
12 | }
13 | #hub-container .mp-module {
14 | padding-right: 0px;
15 | padding: 0px;
16 | min-width:0px;
17 | -ms-grid-rows: 0px 1fr;
18 |
19 | margin-left: -5px;
20 | }
21 |
22 | /*.fragment { -ms-grid-rows: 0px 1fr;}*/
23 | .wp-text-section .mp-bg-overlay{ padding: 0px;}
24 |
25 | @media (min-width: 500px) {
26 | .wp-list .wp-item {
27 | overflow: visible ;
28 | display: -ms-grid;
29 | -ms-grid-columns: 240px;
30 | -ms-grid-rows: 180px 60px;
31 | width: 220px;
32 | height: 220px;
33 | }
34 |
35 | .wp-list .win-item {
36 | overflow: visible ;
37 | }
38 |
39 | .wp-list .win-container {
40 | width: 240px !important; /* override inline css*/
41 | height: 240px !important; /* override inline css*/
42 | overflow: hidden;
43 | }
44 |
45 | .wp-list .wp-item .wp-image-container {
46 | overflow: hidden;
47 | position: relative;
48 | -ms-grid-row: 1;
49 | -ms-grid-row-span: 2;
50 | }
51 |
52 | .wp-list .wp-item .wp-image-container .wp-image {
53 | height: 240px;
54 | width: 240px;
55 | background-position: center;
56 | background-size: cover;
57 | }
58 |
59 |
60 | .wp-list .wp-item .wp-text-section {
61 | padding: 4px 12px 8px;
62 | -ms-grid-row: 2;
63 | z-index: 100;
64 | width: 215px;
65 | height: 60px;
66 | position: absolute;
67 | opacity: 0.6;
68 | margin-top: 30px;
69 | -ms-transition-property: margin-top, opacity;
70 | -ms-transition-duration: 0.3s;
71 | -ms-transition-timing-function: linear;
72 | }
73 |
74 | .wp-list .wp-item .wp-text-section h5 {
75 | display: none;
76 | }
77 |
78 | .wp-list .wp-item:hover .wp-text-section {
79 | opacity: 1;
80 | margin-top: 0px;
81 | }
82 |
83 | .wp-list .wp-item:hover .wp-text-section h5 {
84 | display: block;
85 | }
86 | }
87 |
88 | @media (min-width: 32px) and (max-width: 499px) {
89 | .wp-list .wp-item {
90 | overflow: hidden;
91 | display: -ms-grid;
92 | -ms-grid-columns: 1fr;
93 | -ms-grid-rows: 160px 60px;
94 | height: 220px;
95 | }
96 |
97 | .wp-list .wp-item .wp-image-container {
98 | overflow: hidden;
99 | position: relative;
100 | -ms-grid-row: 1;
101 | -ms-grid-column: 1;
102 | }
103 |
104 | .wp-list .wp-item .wp-text-section {
105 | -ms-grid-row: 2;
106 | -ms-grid-column: 1;
107 | padding: 8px 12px 8px;
108 | opacity: 1;
109 | margin-top: 0px;
110 | }
111 | .wp-list .wp-item .wp-text-section h5 {
112 | display: block;
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/fullScreen.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wp-list .win-horizontal { overflow-x: hidden; }
5 | .wp-list .win-vertical { overflow-y: hidden; }
6 | .wp-list .win-horizontal.win-viewport { overflow-x: hidden;}
7 | .wp-list .win-vertical.win-viewport { overflow-y: hidden;}
8 | /*Overwrite class to make it work*/
9 | #hub-container {
10 | padding-left:0px;
11 | padding: 0px;
12 | }
13 | #hub-container .mp-module {
14 | padding-right: 0px;
15 | padding: 0px;
16 | min-width:0px;
17 | -ms-grid-rows: 0px 1fr;
18 |
19 | margin-left: -5px;
20 | }
21 |
22 | /*.fragment { -ms-grid-rows: 0px 1fr;}*/
23 | .wp-text-section .mp-bg-overlay{ padding: 0px;}
24 | @media (min-width: 501px) {
25 | .wpc-list .wpc-item {
26 | overflow: visible;
27 | display: -ms-grid;
28 | -ms-grid-columns: 240px;
29 | -ms-grid-rows: 180px 60px;
30 | width: 220px;
31 | height: 220px;
32 | }
33 |
34 | .wpc-list .win-item {
35 | overflow: visible;
36 | }
37 |
38 | .wpc-list .win-container {
39 | width: 240px !important; /* override inline css*/
40 | height: 240px !important; /* override inline css*/
41 | overflow: hidden;
42 | }
43 |
44 | .wpc-list .wpc-item .wpc-image-container {
45 | overflow: hidden;
46 | position: relative;
47 | -ms-grid-row: 1;
48 | -ms-grid-row-span: 2;
49 | }
50 |
51 | .wpc-list .wpc-item .wpc-image-container .wpc-image {
52 | height: 240px;
53 | width: 240px;
54 | background-position: center;
55 | background-size: cover;
56 | }
57 |
58 |
59 | .wpc-list .wpc-item .wpc-text-section {
60 | padding: 4px 12px 8px;
61 | -ms-grid-row: 2;
62 | z-index: 100;
63 | width: 216px;
64 | height: 60px;
65 | position: absolute;
66 | opacity: 0.6;
67 | margin-top: 30px;
68 | -ms-transition-property: margin-top, opacity;
69 | -ms-transition-duration: 0.3s;
70 | -ms-transition-timing-function: linear;
71 | }
72 |
73 | .wpc-list .wpc-item .wpc-text-section h5 {
74 | display: none;
75 | }
76 |
77 | .wpc-list .wpc-item:hover .wpc-text-section {
78 | opacity: 1;
79 | margin-top: 0px;
80 | }
81 |
82 | .wpc-list .wpc-item:hover .wpc-text-section h5 {
83 | display: block;
84 | }
85 | }
86 |
87 | @media (min-width: 320px) and (max-width: 499px) {
88 | .wpc-list .wpc-item {
89 | overflow: hidden;
90 | display: -ms-grid;
91 | -ms-grid-columns: 1fr;
92 | -ms-grid-rows: 160px 60px;
93 | height: 220px;
94 | }
95 |
96 | .wpc-list .wpc-item .wpc-image-container {
97 | overflow: hidden;
98 | position: relative;
99 | -ms-grid-row: 1;
100 | -ms-grid-column: 1;
101 | }
102 |
103 | .wpc-list .wpc-item .wpc-text-section {
104 | -ms-grid-row: 2;
105 | -ms-grid-column: 1;
106 | padding: 8px 12px 8px;
107 | opacity: 1;
108 | margin-top: 0px;
109 | }
110 | .wpc-list .wpc-item .wpc-text-section h5 {
111 | display: block;
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/pages/wpcom.module.detail.html:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 | post
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
32 |
33 |
58 |
59 |
Related Post
60 |
61 |
62 |
63 |
64 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/js/wp.module.section.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Wordpress JSON API module
7 | Author: IdeaNotion
8 | */
9 | (function () {
10 | "use strict";
11 |
12 | var item;
13 | var fetching = false;
14 |
15 | function hideLoader() {
16 | if (fetching === false) {
17 | var loader = document.querySelector("progress");
18 | ideaPress.toggleElement(loader, "hide");
19 | }
20 | }
21 |
22 | function showLoader() {
23 | var loader = document.querySelector("progress");
24 | ideaPress.toggleElement(loader, "show");
25 | }
26 |
27 | function getOlderPosts() {
28 | if (document.querySelector('.wp-list')) {
29 | var listview = document.querySelector('.wp-list').winControl;
30 |
31 | if ('itemsLoaded' === listview.loadingState && (listview.indexOfLastVisible + 1) >= item.list.length && fetching === false) {
32 | showLoader();
33 | fetching = item.fetch((item.list.length / item.defaultCount)).then(function () {
34 | fetching = false;
35 | hideLoader();
36 | }, function () {
37 | fetching = false;
38 | hideLoader();
39 | }, function () {
40 | });
41 | } else if ('complete' === listview.loadingState) {
42 | item.scrollPosition = listview.scrollPosition;
43 | }
44 | }
45 | }
46 |
47 | function scrollToPosition() {
48 | var listview = document.querySelector(".wp-list").winControl;
49 |
50 | if ('complete' === listview.loadingState) {
51 |
52 | listview.removeEventListener('loadingstatechanged', scrollToPosition);
53 | }
54 | }
55 |
56 |
57 | WinJS.UI.Pages.define("/modules/wordpress/pages/wp.module.section.html", {
58 | ready: function (element, options) {
59 | item = options.category;
60 |
61 | WinJS.UI.Animation.enterPage(document.querySelector('header'), { top: '0px', left: '200px' });
62 |
63 | document.querySelector('.pagetitle').innerText = item.title;
64 |
65 | this.updateLayout(element, Windows.UI.ViewManagement.ApplicationView.value);
66 |
67 | var wc = document.querySelector('.wp-list').winControl;
68 | wc.addEventListener('loadingstatechanged', hideLoader);
69 |
70 | wc.addEventListener("mousewheel", function (eventObject) {
71 | var delta = -Math.round(eventObject.wheelDelta);
72 | wc.scrollPosition = wc.scrollPosition + delta;
73 | return true;
74 | });
75 |
76 | // scroll background
77 | wc.addEventListener("mousewheel", ideaPress.scrollBackground);
78 | },
79 |
80 | // This function updates the page layout in response to viewState changes.
81 | updateLayout: function (element, viewState) {
82 | var listView = element.querySelector('.wp-list').winControl;
83 | var listViewLayout;
84 |
85 | if (viewState === Windows.UI.ViewManagement.ApplicationViewState.snapped) {
86 | listViewLayout = new WinJS.UI.ListLayout();
87 | } else {
88 | listViewLayout = new WinJS.UI.GridLayout();
89 | }
90 |
91 | WinJS.UI.setOptions(listView, {
92 | itemDataSource: item.list.dataSource,
93 | itemTemplate: element.querySelector('.wp-post-template'),
94 | selectionMode: 'none',
95 | swipeBehavior: 'none',
96 | layout: listViewLayout,
97 | item: self
98 | });
99 | listView.oniteminvoked = function (e) { item.showPost(e); };
100 |
101 | if (item.scrollPosition > 0) {
102 | //hideLoader();
103 | listView.addEventListener('loadingstatechanged', scrollToPosition);
104 | }
105 |
106 | listView.addEventListener('loadingstatechanged', getOlderPosts);
107 |
108 | },
109 | });
110 | })();
111 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/js/wpcom.module.section.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Wordpress.COM API module
7 | Author: IdeaNotion
8 | */
9 | (function () {
10 | "use strict";
11 |
12 | var item;
13 | var fetching = false;
14 | function hideLoader() {
15 | if (fetching === false) {
16 | var loader = document.querySelector("progress");
17 | ideaPress.toggleElement(loader, "hide");
18 | }
19 | }
20 |
21 | function showLoader() {
22 | var loader = document.querySelector("progress");
23 | ideaPress.toggleElement(loader, "show");
24 | }
25 |
26 | function getOlderPosts() {
27 | if (document.querySelector('.wpc-list')) {
28 | var listview = document.querySelector('.wpc-list').winControl;
29 |
30 | if ('itemsLoaded' === listview.loadingState && (listview.indexOfLastVisible + 1) >= item.list.length && fetching === false) {
31 | showLoader();
32 | fetching = item.fetch((item.list.length / item.defaultCount)).then(function () {
33 | fetching = false;
34 | hideLoader();
35 | }, function () {
36 | fetching = false;
37 | hideLoader();
38 | }, function () {
39 | //hideLoader();
40 | });
41 | } else if ('complete' === listview.loadingState) {
42 | item.scrollPosition = listview.scrollPosition;
43 |
44 | }
45 | }
46 | }
47 |
48 | function scrollToPosition() {
49 | var listview = document.querySelector(".wpc-list").winControl;
50 | if ('complete' === listview.loadingState) {
51 | listview.removeEventListener('loadingstatechanged', scrollToPosition);
52 | }
53 | }
54 |
55 | WinJS.UI.Pages.define("/modules/wordpressCom/pages/wpcom.module.section.html", {
56 | ready: function (element, options) {
57 |
58 | item = options.category;
59 |
60 | WinJS.UI.Animation.enterPage(document.querySelector('header'), { top: '0px', left: '200px' });
61 |
62 |
63 | document.querySelector('.pagetitle').innerText = item.title;
64 |
65 | this.updateLayout(element, Windows.UI.ViewManagement.ApplicationView.value);
66 |
67 | var wc = document.querySelector('.wpc-list').winControl;
68 |
69 | wc.addEventListener('loadingstatechanged', hideLoader);
70 | wc.addEventListener("mousewheel", function (eventObject) {
71 | var delta = -Math.round(eventObject.wheelDelta);
72 | wc.scrollPosition = wc.scrollPosition + delta;
73 | });
74 |
75 |
76 | // scroll background
77 | wc.addEventListener("mousewheel", ideaPress.scrollBackground);
78 |
79 | },
80 |
81 | // This function updates the page layout in response to viewState changes.
82 | updateLayout: function (element, viewState) {
83 | var listView = element.querySelector('.wpc-list').winControl;
84 | var listViewLayout;
85 |
86 | if (viewState === Windows.UI.ViewManagement.ApplicationViewState.snapped) {
87 | listViewLayout = new WinJS.UI.ListLayout();
88 | } else {
89 | listViewLayout = new WinJS.UI.GridLayout();
90 | }
91 |
92 | WinJS.UI.setOptions(listView, {
93 | itemDataSource: item.list.dataSource,
94 | itemTemplate: element.querySelector('.wpc-post-template'),
95 | selectionMode: 'none',
96 | swipeBehavior: 'none',
97 | layout: listViewLayout,
98 | item: self
99 | });
100 | listView.oniteminvoked = function (e) { item.showPost(e); };
101 |
102 | if (item.scrollPosition > 0) {
103 |
104 | listView.addEventListener('loadingstatechanged', scrollToPosition);
105 | }
106 |
107 | listView.addEventListener('loadingstatechanged', getOlderPosts);
108 |
109 | },
110 | });
111 | })();
112 |
--------------------------------------------------------------------------------
/IdeaPress/pages/post.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | post
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
25 |
26 |
27 |
33 |
34 |
38 |
39 |
40 |
41 |
42 |
72 |
73 |
74 |
Related Post
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/pages/wp.module.detail.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | post
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
22 |
29 |
30 |
77 |
78 |
Related Post
79 |
80 |
81 |
82 |
83 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/IdeaPress/js/navigator.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Version 2.0
7 | File: navigator.js
8 | Author: IdeaNotion
9 | Description: Controls the navigational behaviors of the App
10 | */
11 | (function () {
12 | "use strict";
13 |
14 | var appView = Windows.UI.ViewManagement.ApplicationView;
15 | var nav = WinJS.Navigation;
16 |
17 | WinJS.Namespace.define("IdeaPress", {
18 | PageControlNavigator: WinJS.Class.define(
19 | // Define the constructor function for the PageControlNavigator.
20 | function PageControlNavigator(element, options) {
21 | this.element = element || document.createElement("div");
22 | this.element.appendChild(this._createPageElement());
23 |
24 | this.home = options.home;
25 | this.lastViewstate = appView.value;
26 | nav.onnavigating = this._navigating.bind(this);
27 | nav.onnavigated = this._navigated.bind(this);
28 | window.onresize = this._resized.bind(this);
29 |
30 | document.body.onkeyup = this._keyupHandler.bind(this);
31 | document.body.onkeypress = this._keypressHandler.bind(this);
32 | document.body.onmspointerup = this._mspointerupHandler.bind(this);
33 |
34 | nav.navigate(this.home);
35 | }, {
36 | ///
37 | element: null,
38 | home: "",
39 | lastViewstate: 0,
40 |
41 | // This function creates a new container for each page.
42 | _createPageElement: function () {
43 | var element = document.createElement("div");
44 | element.style.width = "100%";
45 | element.style.height = "100%";
46 | return element;
47 | },
48 |
49 | // This function responds to keypresses to only navigate when
50 | // the backspace key is not used elsewhere.
51 | _keypressHandler: function (args) {
52 | if (args.key === "Backspace") {
53 | ideaPress.navBack(nav);
54 | }
55 | },
56 |
57 | // This function responds to keyup to enable keyboard navigation.
58 | _keyupHandler: function (args) {
59 | if ((args.key === "Left" && args.altKey) || (args.key === "BrowserBack")) {
60 | ideaPress.navBack(nav);
61 | } else if ((args.key === "Right" && args.altKey) || (args.key === "BrowserForward")) {
62 | nav.forward();
63 | }
64 | },
65 |
66 | _mspointerupHandler: function (args) {
67 | if (args.button === 3) {
68 | ideaPress.navBack(nav);
69 | } else if (args.button === 4) {
70 | nav.forward();
71 | }
72 | },
73 |
74 | _navigating: function (args) {
75 | if (ideaPress.initialized) {
76 | ideaPress.cancel();
77 | }
78 | },
79 |
80 |
81 | // This function responds to navigation by adding new pages
82 | // to the DOM.
83 | _navigated: function (args) {
84 | var newElement = this._createPageElement();
85 | var parentedComplete;
86 | var parented = new WinJS.Promise(function (c) { parentedComplete = c; });
87 |
88 | var that = this;
89 |
90 | WinJS.UI.Pages.render(args.detail.location, newElement, args.detail.state, parented).
91 | then(function (control) {
92 | that.element.appendChild(newElement);
93 | that.element.removeChild(that.pageElement);
94 | parentedComplete();
95 | document.body.focus();
96 | that.navigated();
97 | });
98 | },
99 |
100 | _resized: function (args) {
101 | if (this.pageControl && this.pageControl.updateLayout) {
102 | this.pageControl.updateLayout.call(this.pageControl, this.pageElement, appView.value, this.lastViewstate);
103 | }
104 | this.lastViewstate = appView.value;
105 | },
106 |
107 | // This function updates application controls once a navigation
108 | // has completed.
109 | navigated: function () {
110 | // Do application specific on-navigated work here
111 | var backButton = this.pageElement.querySelector("header[role=banner] .win-backbutton");
112 | if (backButton) {
113 | backButton.onclick = function () {
114 | if (backButton.id != 'back-button')
115 | ideaPress.navBack(nav);
116 | };
117 |
118 | if (nav.canGoBack) {
119 | backButton.removeAttribute("disabled");
120 | }
121 | else {
122 | backButton.setAttribute("disabled", "disabled");
123 | }
124 | }
125 | },
126 |
127 | // This is the PageControlNavigator object.
128 | pageControl: {
129 | get: function () { return this.pageElement && this.pageElement.winControl; }
130 | },
131 |
132 | // This is the root element of the current page.
133 | pageElement: {
134 | get: function () { return this.element.firstElementChild; }
135 | }
136 | }
137 | )
138 | });
139 | })();
140 |
--------------------------------------------------------------------------------
/IdeaPress/js/hub.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Version 2.0
7 | File: hub.js
8 | Author: IdeaNotion
9 | Description: Controls the hub.html page, and intialize the modules.
10 | */
11 | (function () {
12 | "use strict";
13 |
14 | WinJS.UI.Pages.define("/pages/hub.html", {
15 | ready: function (element, options) {
16 | WinJS.UI.Animation.enterPage(document.querySelector('header'), { top: '0px', left: '200px' });
17 | var self = this;
18 | document.getElementsByClassName("pagetitle")[0].innerHTML = ideaPress.options.appTitle;
19 |
20 | if (ideaPress.options.appTitleImage) {
21 | document.getElementsByClassName("titleImage")[0].src = ideaPress.options.appTitleImage;
22 | document.querySelector('header').className = 'showImage';
23 | }
24 | var elem = document.querySelector('#hub-container');
25 |
26 | // initialize IdeaPress modules
27 | if (!ideaPress.initialized) {
28 | ideaPress.initModules(elem);
29 | ideaPress.initialized = true;
30 |
31 | ideaPress.registerHero();
32 | }
33 | if (ideaPress.heroModule) {
34 | WinJS.Utilities.addClass(document.getElementById("hero"), "show");
35 | }
36 | var promises = ideaPress.renderModules(elem);
37 |
38 |
39 | WinJS.Promise.join(promises).done(function () {
40 | setTimeout(function () { self.updateLayout(element, Windows.UI.ViewManagement.ApplicationView.value); }, 1000);
41 | ideaPress.startHero();
42 |
43 | // scroll background
44 | document.getElementById('hub-container').addEventListener("scroll", self.scrolling);
45 | });
46 |
47 | pingServer();
48 | self.loadingComplete(element, options);
49 | },
50 |
51 |
52 | loadingComplete: function (element, options) {
53 | document.getElementById("refresh").addEventListener("click", ideaPress.refresh, false);
54 | },
55 |
56 | // This function updates the page layout in response to viewState changes.
57 | updateLayout: function (element, viewState) {
58 | if (document.getElementById('hub-container')) {
59 | var windowWidth = document.documentElement.offsetWidth;
60 | if (windowWidth <= 500) {
61 | document.getElementById('hub-container').winControl.orientation = WinJS.UI.Orientation.vertical;
62 | if (ideaPress.heroModule)
63 | WinJS.Utilities.removeClass(document.getElementById("hero"), "show");
64 | }
65 | else {
66 | document.getElementById('hub-container').winControl.orientation = WinJS.UI.Orientation.horizontal;
67 | if (ideaPress.heroModule)
68 | WinJS.Utilities.addClass(document.getElementById("hero"), "show");
69 | }
70 | ideaPress.update(element, viewState);
71 | }
72 | },
73 |
74 | timeoutHandle : null,
75 |
76 | scrolling: function (element) {
77 | ideaPress.scrollBackground(element);
78 | if (document.querySelector('#hub-container').scrollLeft / document.querySelector('#hub-container').offsetWidth > 0.5 ||
79 | document.querySelector('#hub-container').scrollTop / document.querySelector('#hub-container').offsetHeight > 0.5) {
80 | ideaPress.updateRemaining(element, Windows.UI.ViewManagement.ApplicationView.value);
81 | }
82 | if (this.timeoutHandle)
83 | window.clearTimeout(this.timeoutHandle);
84 |
85 | var self = this;
86 | this.timeoutHandle = setTimeout(function () {
87 | ideaPress.snapEffect();
88 | self.timeoutHandle = null;
89 | }, 200);
90 | },
91 | });
92 |
93 | function pingServer() {
94 | //ping server
95 | var winStoreId = Windows.ApplicationModel.Store.CurrentApp.appId.toString();
96 | var appId = 1;
97 |
98 | if (ideaPress.options.appId) {
99 | appId = ideaPress.options.appId;
100 | }
101 | var packageSpecificToken;
102 | var nonce;
103 | packageSpecificToken = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(nonce);
104 |
105 | // hardware id, signature, certificate IBuffer objects
106 | // that can be accessed through properties.
107 | var hardwareId = packageSpecificToken.id;
108 | var dataReader = Windows.Storage.Streams.DataReader.fromBuffer(hardwareId);
109 | var array = new Array(hardwareId.length);
110 | dataReader.readBytes(array);
111 | var machineId = array.toString();
112 |
113 | var appname;
114 | Windows.ApplicationModel.Package.current.installedLocation.getFileAsync("AppxManifest.xml").then(function (file) {
115 | Windows.Storage.FileIO.readTextAsync(file).done(function (text) {
116 | var xdoc = new Windows.Data.Xml.Dom.XmlDocument();
117 | xdoc.loadXml(text);
118 | appname = xdoc.selectNodesNS("m:Package/m:Applications/m:Application/m2:VisualElements",
119 | "xmlns:m=\"http://schemas.microsoft.com/appx/2010/manifest\" xmlns:m2=\"http://schemas.microsoft.com/appx/2013/manifest\"")[0]
120 | .attributes.getNamedItem("DisplayName").nodeValue;
121 | });
122 | });
123 |
124 | var encodedData = window.btoa(winStoreId + "::" + appname);
125 |
126 | var querystring = '/v1/' + appId + '?winStoreId=' + encodedData + '&devId=' + machineId + '&appUrl=' + ideaPress.options.mainUrl;
127 | var fullUrl = 'http://api.ideapress.me' + querystring;
128 |
129 | var headers = { "User-Agent": 'wp-window8' };
130 | try {
131 | WinJS.xhr({ type: 'GET', url: fullUrl, headers: headers }).then(function (r) {
132 |
133 | },
134 | function (e) {
135 | //maybe put it in the queue
136 | },
137 | function (p) {
138 | //maybe put it in the queue
139 | }
140 | );
141 | } catch (e) {
142 | //do nothing
143 | }
144 | }
145 | })();
146 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/templates/variable.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wpc-list .wpc-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr;
8 | -ms-grid-rows: 160px 60px;
9 | width: 220px;
10 | height: 220px;
11 | }
12 |
13 | .wpc-list .wpc-item .wpc-image-container {
14 | overflow: hidden;
15 | position: relative;
16 | -ms-grid-row: 1;
17 | -ms-grid-row-span: 1;
18 | }
19 |
20 | .wpc-list .wpc-item .wpc-image-container .wpc-image{
21 | height:160px;
22 | width:220px;
23 | background-position: center;
24 | background-size:cover;
25 | }
26 |
27 | .wpc-list .wpc-item .wpc-text-section {
28 | padding: 4px 12px 8px;
29 | -ms-grid-row: 2;
30 | z-index: 1;
31 | width: calc(100% - 24px);
32 | height: 100%;
33 | }
34 |
35 | .wpc-list .wpc-item-0 {
36 | overflow: hidden;
37 | display: -ms-grid;
38 | -ms-grid-rows: 1fr 100px;
39 | -ms-grid-columns: 1fr;
40 | width: 460px;
41 | height: 460px;
42 | }
43 |
44 | .wpc-list .wpc-item-0 .wpc-image-container .wpc-image{
45 | height:380px;
46 | width:460px;
47 | }
48 |
49 |
50 | .wpc-list .wpc-item-0 .wpc-text-section {
51 | font-size: 160%;
52 | }
53 |
54 | .wpc-list .wpc-item-1 {
55 | overflow: hidden;
56 | display: -ms-grid;
57 | -ms-grid-rows: 1fr;
58 | -ms-grid-columns: 1fr 160px;
59 | width: 460px;
60 | height: 220px;
61 | }
62 |
63 | .wpc-list .wpc-item-1 .wpc-image-container .wpc-image{
64 | height:220px;
65 | width:300px;
66 | }
67 |
68 |
69 | .wpc-list .wpc-item-1 .wpc-image-container {
70 | overflow: hidden;
71 | position: relative;
72 | -ms-grid-column: 1;
73 | -ms-grid-row: 1;
74 | }
75 |
76 | .wpc-list .wpc-item-1 .wpc-text-section {
77 | padding: 4px 12px 8px;
78 | -ms-grid-column: 2;
79 | -ms-grid-row: 1;
80 | z-index: 1;
81 | width: calc(100% - 24px);
82 | height: 100%;
83 | }
84 |
85 | .wpc-list .wpc-item-1 .wpc-text-section h3 {
86 | text-overflow: clip;
87 | word-wrap: break-word;
88 | white-space: pre-wrap;
89 | }
90 |
91 | .wpc-list .wpc-item-1 .wpc-text-section h5 {
92 | text-overflow: clip;
93 | word-wrap: break-word;
94 | white-space: pre-wrap;
95 | }
96 |
97 | .wpc-list .wpc-item-5 .wpc-text-section h3 {
98 | text-overflow: clip;
99 | word-wrap: break-word;
100 | white-space: pre-wrap;
101 | }
102 |
103 | .wpc-list .wpc-item-5 .wpc-text-section h5 {
104 | text-overflow: clip;
105 | word-wrap: break-word;
106 | white-space: pre-wrap;
107 | }
108 |
109 |
110 |
111 | @media screen and (max-device-height: 800px) {
112 | .wpc-list .wpc-item-4 {
113 | overflow: hidden;
114 | display: -ms-grid;
115 | -ms-grid-rows: 1fr 180px;
116 | -ms-grid-columns: 1fr;
117 | width: 220px;
118 | height: 460px;
119 | }
120 |
121 |
122 | .wpc-list .wpc-item-4 .wpc-image-container .wpc-image {
123 | height: 280px;
124 | width: 220px;
125 | }
126 |
127 |
128 | .wpc-list .wpc-item-4 .wpc-image-container {
129 | overflow: hidden;
130 | position: relative;
131 | -ms-grid-column: 1;
132 | -ms-grid-row: 1;
133 | }
134 |
135 | .wpc-list .wpc-item-4 .wpc-text-section {
136 | padding: 4px 12px 8px;
137 | -ms-grid-column: 1;
138 | -ms-grid-row: 2;
139 | z-index: 1;
140 | width: calc(100% - 24px);
141 | height: 100%;
142 | }
143 |
144 | .wpc-list .wpc-item-4 .wpc-text-section h3 {
145 | text-overflow: clip;
146 | word-wrap: break-word;
147 | }
148 | }
149 |
150 | @media screen and (min-device-height: 801px) {
151 | .wpc-list .wpc-item-5 {
152 | overflow: hidden;
153 | display: -ms-grid;
154 | -ms-grid-rows: 1fr 180px;
155 | -ms-grid-columns: 1fr;
156 | width: 220px;
157 | height: 460px;
158 | }
159 |
160 |
161 | .wpc-list .wpc-item-5 .wpc-image-container .wpc-image {
162 | height: 280px;
163 | width: 220px;
164 | }
165 |
166 |
167 | .wpc-list .wpc-item-5 .wpc-image-container {
168 | overflow: hidden;
169 | position: relative;
170 | -ms-grid-column: 1;
171 | -ms-grid-row: 1;
172 | }
173 |
174 | .wpc-list .wpc-item-5 .wpc-text-section {
175 | padding: 4px 12px 8px;
176 | -ms-grid-column: 1;
177 | -ms-grid-row: 2;
178 | z-index: 1;
179 | width: calc(100% - 24px);
180 | height: 100%;
181 | }
182 |
183 | .wpc-list .wpc-item-5 .wpc-text-section h3 {
184 | text-overflow: clip;
185 | word-wrap: break-word;
186 | }
187 | }
188 |
189 |
190 | @media (min-width: 320px) and (max-width: 499px) {
191 | .wpc-list .wpc-item {
192 | overflow: hidden;
193 | display: -ms-grid;
194 | -ms-grid-columns: 1fr;
195 | -ms-grid-rows: 160px 60px;
196 | height: 220px;
197 | }
198 |
199 | .wpc-list .wpc-item .wpc-image-container {
200 | overflow: hidden;
201 | position: relative;
202 | -ms-grid-row: 1;
203 | -ms-grid-column: 1;
204 | }
205 |
206 | .wpc-list .wpc-item .wpc-text-section {
207 | -ms-grid-row: 2;
208 | -ms-grid-column: 1;
209 | padding: 8px 12px 8px;
210 | opacity: 1;
211 | margin-top: 0px;
212 | }
213 | .wpc-list .wpc-item .wpc-text-section h3 {
214 | text-overflow:ellipsis;
215 | word-wrap:normal;
216 | }
217 |
218 | .wpc-list .wpc-item .wpc-text-section h5 {
219 | display: block;
220 | }
221 |
222 | .wpc-list .wpc-item-5 .wpc-text-section h3 {
223 | text-overflow: ellipsis;
224 | white-space: nowrap;
225 | overflow:hidden;
226 | word-wrap: normal;
227 | }
228 | .wpc-list .wpc-item-1 .wpc-text-section h3 {
229 | text-overflow: ellipsis;
230 | white-space: nowrap;
231 | overflow:hidden;
232 | word-wrap: normal;
233 | }
234 | .wpc-list .wpc-item-5 .wpc-text-section h5 {
235 | text-overflow: ellipsis;
236 | white-space: nowrap;
237 | overflow:hidden;
238 | word-wrap: normal;
239 | }
240 | .wpc-list .wpc-item-1 .wpc-text-section h5 {
241 | text-overflow: ellipsis;
242 | white-space: nowrap;
243 | overflow:hidden;
244 | word-wrap: normal;
245 | }
246 | }
247 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/templates/variable.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 | .wp-list .wp-item {
5 | overflow: hidden;
6 | display: -ms-grid;
7 | -ms-grid-columns: 1fr;
8 | -ms-grid-rows: 160px 60px;
9 | width: 220px;
10 | height: 220px;
11 | }
12 |
13 | .wp-list .wp-item .wp-image-container {
14 | overflow: hidden;
15 | position: relative;
16 | -ms-grid-row: 1;
17 | -ms-grid-row-span: 1;
18 | }
19 |
20 | .wp-list .wp-item .wp-image-container .wp-image {
21 | height: 160px;
22 | width: 220px;
23 | background-position: center;
24 | background-size: cover;
25 | }
26 |
27 | .wp-list .wp-item .wp-text-section {
28 | padding: 4px 12px 8px;
29 | -ms-grid-row: 2;
30 | z-index: 1;
31 | width: calc(100% - 24px);
32 | height: 100%;
33 | }
34 |
35 | .wp-list .wp-item-0 {
36 | overflow: hidden;
37 | display: -ms-grid;
38 | -ms-grid-rows: 1fr 100px;
39 | -ms-grid-columns: 1fr;
40 | width: 460px;
41 | height: 460px;
42 | }
43 |
44 | .wp-list .wp-item-0 .wp-image-container .wp-image {
45 | height: 380px;
46 | width: 460px;
47 | }
48 |
49 |
50 | .wp-list .wp-item-0 .wp-text-section {
51 | font-size: 160%;
52 | }
53 |
54 | .wp-list .wp-item-1 {
55 | overflow: hidden;
56 | display: -ms-grid;
57 | -ms-grid-rows: 1fr;
58 | -ms-grid-columns: 1fr 160px;
59 | width: 460px;
60 | height: 220px;
61 | }
62 |
63 | .wp-list .wp-item-1 .wp-image-container .wp-image {
64 | height: 220px;
65 | width: 300px;
66 | }
67 |
68 |
69 | .wp-list .wp-item-1 .wp-image-container {
70 | overflow: hidden;
71 | position: relative;
72 | -ms-grid-column: 1;
73 | -ms-grid-row: 1;
74 | }
75 |
76 | .wp-list .wp-item-1 .wp-text-section {
77 | padding: 4px 12px 8px;
78 | -ms-grid-column: 2;
79 | -ms-grid-row: 1;
80 | z-index: 1;
81 | width: calc(100% - 24px);
82 | height: 100%;
83 | }
84 |
85 | .wp-list .wp-item-1 .wp-text-section h3 {
86 | text-overflow: clip;
87 | word-wrap: break-word;
88 | white-space: pre-wrap;
89 | }
90 |
91 | .wp-list .wp-item-1 .wp-text-section h5 {
92 | text-overflow: clip;
93 | word-wrap: break-word;
94 | white-space: pre-wrap;
95 | }
96 |
97 | .wp-list .wp-item-5 .wp-text-section h3 {
98 | text-overflow: clip;
99 | word-wrap: break-word;
100 | white-space: pre-wrap;
101 | }
102 |
103 | .wp-list .wp-item-5 .wp-text-section h5 {
104 | text-overflow: clip;
105 | word-wrap: break-word;
106 | white-space: pre-wrap;
107 | }
108 |
109 |
110 | @media screen and (max-device-height: 800px) {
111 | .wp-list .wp-item-4 {
112 | overflow: hidden;
113 | display: -ms-grid;
114 | -ms-grid-rows: 1fr 180px;
115 | -ms-grid-columns: 1fr;
116 | width: 220px;
117 | height: 460px;
118 | }
119 |
120 |
121 | .wp-list .wp-item-4 .wp-image-container .wp-image {
122 | height: 280px;
123 | width: 220px;
124 | }
125 |
126 |
127 | .wp-list .wp-item-4 .wp-image-container {
128 | overflow: hidden;
129 | position: relative;
130 | -ms-grid-column: 1;
131 | -ms-grid-row: 1;
132 | }
133 |
134 | .wp-list .wp-item-4 .wp-text-section {
135 | padding: 4px 12px 8px;
136 | -ms-grid-column: 1;
137 | -ms-grid-row: 2;
138 | z-index: 1;
139 | width: calc(100% - 24px);
140 | height: 100%;
141 | }
142 |
143 | .wp-list .wp-item-4 .wp-text-section h3 {
144 | text-overflow: clip;
145 | word-wrap: break-word;
146 | }
147 | }
148 |
149 | @media screen and (min-device-height: 801px) {
150 | .wp-list .wp-item-5 {
151 | overflow: hidden;
152 | display: -ms-grid;
153 | -ms-grid-rows: 1fr 180px;
154 | -ms-grid-columns: 1fr;
155 | width: 220px;
156 | height: 460px;
157 | }
158 |
159 |
160 | .wp-list .wp-item-5 .wp-image-container .wp-image {
161 | height: 280px;
162 | width: 220px;
163 | }
164 |
165 |
166 | .wp-list .wp-item-5 .wp-image-container {
167 | overflow: hidden;
168 | position: relative;
169 | -ms-grid-column: 1;
170 | -ms-grid-row: 1;
171 | }
172 |
173 | .wp-list .wp-item-5 .wp-text-section {
174 | padding: 4px 12px 8px;
175 | -ms-grid-column: 1;
176 | -ms-grid-row: 2;
177 | z-index: 1;
178 | width: calc(100% - 24px);
179 | height: 100%;
180 | }
181 |
182 | .wp-list .wp-item-5 .wp-text-section h3 {
183 | text-overflow: clip;
184 | word-wrap: break-word;
185 | }
186 | }
187 |
188 |
189 | @media (min-width: 320px) and (max-width: 499px) {
190 | .wp-list .wp-item {
191 | overflow: hidden;
192 | display: -ms-grid;
193 | -ms-grid-columns: 1fr;
194 | -ms-grid-rows: 160px 60px;
195 | height: 220px;
196 | }
197 |
198 | .wp-list .wp-item .wp-image-container {
199 | overflow: hidden;
200 | position: relative;
201 | -ms-grid-row: 1;
202 | -ms-grid-column: 1;
203 | }
204 |
205 | .wp-list .wp-item .wp-text-section {
206 | -ms-grid-row: 2;
207 | -ms-grid-column: 1;
208 | padding: 8px 12px 8px;
209 | opacity: 1;
210 | margin-top: 0px;
211 | }
212 |
213 | .wp-list .wp-item .wp-text-section h3 {
214 | text-overflow: ellipsis;
215 | word-wrap: normal;
216 | }
217 |
218 | .wp-list .wp-item .wp-text-section h5 {
219 | display: block;
220 | }
221 |
222 | .wp-list .wp-item-5 .wp-text-section h3 {
223 | text-overflow: ellipsis;
224 | white-space: nowrap;
225 | overflow: hidden;
226 | word-wrap: normal;
227 | }
228 |
229 | .wp-list .wp-item-1 .wp-text-section h3 {
230 | text-overflow: ellipsis;
231 | white-space: nowrap;
232 | overflow: hidden;
233 | word-wrap: normal;
234 | }
235 |
236 | .wp-list .wp-item-5 .wp-text-section h5 {
237 | text-overflow: ellipsis;
238 | white-space: nowrap;
239 | overflow: hidden;
240 | word-wrap: normal;
241 | }
242 |
243 | .wp-list .wp-item-1 .wp-text-section h5 {
244 | text-overflow: ellipsis;
245 | white-space: nowrap;
246 | overflow: hidden;
247 | word-wrap: normal;
248 | }
249 | }
250 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/js/wpcom.module.searchResults.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Wordpress.COM API module
7 | Author: IdeaNotion
8 | */
9 | (function () {
10 | "use strict";
11 |
12 | WinJS.Binding.optimizeBindingReferences = true;
13 |
14 | var appModel = Windows.ApplicationModel;
15 | var appViewState = Windows.UI.ViewManagement.ApplicationViewState;
16 | var nav = WinJS.Navigation;
17 | var ui = WinJS.UI;
18 | var searchPageUri = "/modules/wordpressCom/pages/wpcom.module.searchResults.html";
19 |
20 | ui.Pages.define(searchPageUri, {
21 | _filters: [],
22 | _lastSearch: "",
23 |
24 | // This function is called whenever a user navigates to this page. It
25 | // populates the page elements with the app's data.
26 | ready: function (element, options) {
27 | var listView = element.querySelector(".resultslist").winControl;
28 | listView.itemTemplate = element.querySelector(".wpc-post-template");
29 | listView.oniteminvoked = this._itemInvoked;
30 | this._handleQuery(element, options);
31 | listView.element.focus();
32 |
33 | document.getElementById("home").addEventListener("click", function () { ideaPress.navBack(nav, nav.history.backStack.length);/*nav.back(nav.history.backStack.length);*/ }, false);
34 |
35 | var wc = document.querySelector('.wpc-list').winControl;
36 | wc.addEventListener("mousewheel", ideaPress.scrollBackground);
37 | },
38 |
39 | // This function updates the page layout in response to viewState changes.
40 | updateLayout: function (element, viewState, lastViewState) {
41 | ///
42 |
43 | var listView = element.querySelector(".resultslist").winControl;
44 | if (lastViewState !== viewState) {
45 | if (lastViewState === appViewState.snapped || viewState === appViewState.snapped) {
46 | var handler = function(e) {
47 | listView.removeEventListener("contentanimating", handler, false);
48 | e.preventDefault();
49 | };
50 | listView.addEventListener("contentanimating", handler, false);
51 | var firstVisible = listView.indexOfFirstVisible;
52 | this._initializeLayout(listView, viewState);
53 | if (firstVisible >= 0 && listView.itemDataSource.list.length > 0) {
54 | listView.indexOfFirstVisible = firstVisible;
55 | }
56 | }
57 | }
58 | },
59 |
60 | // This function filters the search data using the specified filter.
61 | _applyFilter: function (filter, originalResults) {
62 | if (filter.results === null) {
63 | filter.results = originalResults.createFiltered(filter.predicate);
64 | }
65 | return filter.results;
66 | },
67 |
68 | // This function responds to a user selecting a new filter. It updates the
69 | // selection list and the displayed results.
70 | _filterChanged: function (element, filterIndex) {
71 | var listView = element.querySelector(".resultslist").winControl;
72 |
73 | listView.itemDataSource = this._filters[filterIndex].results.dataSource;
74 | },
75 |
76 | _generateFilters: function () {
77 | this._filters = [];
78 | this._filters.push({ results: null, text: "All", predicate: function () { return true; } });
79 | },
80 |
81 | // This function executes each step required to perform a search.
82 | _handleQuery: function (element, args) {
83 | var self = this;
84 | this._lastSearch = args.queryText;
85 | WinJS.Namespace.define("searchResults", { markText: WinJS.Binding.converter(this._markText.bind(this)) });
86 | this._initializeLayout(element.querySelector(".resultslist").winControl, Windows.UI.ViewManagement.ApplicationView.value);
87 | this._generateFilters();
88 |
89 | self.loader = element.querySelector("progress");
90 | ideaPress.toggleElement(self.loader, "show");
91 | this._searchData(args.queryText).then(function (originalResults) {
92 | if (originalResults.length === 0) {
93 | document.querySelector('.resultsmessage').style.display = "block";
94 | }
95 |
96 | ideaPress.toggleElement(self.loader, "hide");
97 | self._populateFilterBar(element, originalResults);
98 | self._applyFilter(self._filters[0], originalResults);
99 | }, function () { }, function () { });
100 | },
101 |
102 | // This function updates the ListView with new layouts
103 | _initializeLayout: function (listView, viewState) {
104 |
105 | if (viewState === appViewState.snapped) {
106 | listView.layout = new ui.ListLayout();
107 | document.querySelector(".titlearea .pagetitle").textContent = '“' + this._lastSearch + '”';
108 | } else {
109 | listView.layout = new ui.GridLayout();
110 |
111 | document.querySelector(".titlearea .pagetitle").textContent = "Results for “" + this._lastSearch + '”';
112 | }
113 | },
114 |
115 | _itemInvoked: function (args) {
116 | ideaPress.searchModule.showPost(args);
117 | },
118 |
119 | // This function colors the search term. Referenced in /searchResults.html
120 | // as part of the ListView item templates.
121 | _markText: function (text) {
122 | return text.replace(this._lastSearch, "" + this._lastSearch + " ");
123 | },
124 |
125 | // This function generates the filter selection list.
126 | _populateFilterBar: function (element, originalResults) {
127 | var listView = element.querySelector(".resultslist").winControl;
128 | var filterIndex;
129 |
130 | for (filterIndex = 0; filterIndex < this._filters.length; filterIndex++) {
131 | this._applyFilter(this._filters[filterIndex], originalResults);
132 |
133 | if (filterIndex === 0) {
134 | listView.itemDataSource = this._filters[filterIndex].results.dataSource;
135 | }
136 | }
137 | },
138 |
139 | // This function populates a WinJS.Binding.List with search results for the
140 | // provided query.
141 | _searchData: function (queryText) {
142 |
143 | return ideaPress.searchModule.search(queryText);
144 | }
145 | });
146 |
147 | WinJS.Application.addEventListener("activated", function (args) {
148 | if (args.detail.kind === appModel.Activation.ActivationKind.search) {
149 | args.setPromise(ui.processAll().then(function () {
150 | if (!nav.location) {
151 | nav.history.current = { location: Application.navigator.home, initialState: {} };
152 | }
153 |
154 | return nav.navigate(searchPageUri, { queryText: args.detail.queryText });
155 | }));
156 | }
157 | });
158 | })();
159 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/js/wp.module.searchResults.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Wordpress JSON API module
7 | Author: IdeaNotion
8 | */
9 | (function () {
10 | "use strict";
11 |
12 | WinJS.Binding.optimizeBindingReferences = true;
13 |
14 | var appModel = Windows.ApplicationModel;
15 | var appViewState = Windows.UI.ViewManagement.ApplicationViewState;
16 | var nav = WinJS.Navigation;
17 | var ui = WinJS.UI;
18 | var searchPageUri = "/modules/wordpress/pages/wp.module.searchResults.html";
19 |
20 | ui.Pages.define(searchPageUri, {
21 | _filters: [],
22 | _lastSearch: "",
23 |
24 | // This function is called whenever a user navigates to this page. It
25 | // populates the page elements with the app's data.
26 | ready: function (element, options) {
27 | var listView = element.querySelector(".resultslist").winControl;
28 | listView.itemTemplate = element.querySelector(".wp-post-template");
29 | listView.oniteminvoked = this._itemInvoked;
30 | this._handleQuery(element, options);
31 | listView.element.focus();
32 |
33 | document.getElementById("home").addEventListener("click", function () { ideaPress.navBack(nav, nav.history.backStack.length);/*nav.back(nav.history.backStack.length);*/ }, false);
34 |
35 | var wc = document.querySelector('.wp-list').winControl;
36 | wc.addEventListener("mousewheel", ideaPress.scrollBackground);
37 | },
38 |
39 | // This function updates the page layout in response to viewState changes.
40 | updateLayout: function (element, viewState, lastViewState) {
41 | ///
42 |
43 | var listView = element.querySelector(".resultslist").winControl;
44 | if (lastViewState !== viewState) {
45 | if (lastViewState === appViewState.snapped || viewState === appViewState.snapped) {
46 | var handler = function(e) {
47 | listView.removeEventListener("contentanimating", handler, false);
48 | e.preventDefault();
49 | };
50 | listView.addEventListener("contentanimating", handler, false);
51 | var firstVisible = listView.indexOfFirstVisible;
52 | this._initializeLayout(listView, viewState);
53 | if (firstVisible >= 0 && listView.itemDataSource.list.length > 0) {
54 | listView.indexOfFirstVisible = firstVisible;
55 | }
56 | }
57 | }
58 | },
59 |
60 | // This function filters the search data using the specified filter.
61 | _applyFilter: function (filter, originalResults) {
62 | if (filter.results === null) {
63 | filter.results = originalResults.createFiltered(filter.predicate);
64 | }
65 | return filter.results;
66 | },
67 |
68 | // This function responds to a user selecting a new filter. It updates the
69 | // selection list and the displayed results.
70 | _filterChanged: function (element, filterIndex) {
71 | var listView = element.querySelector(".resultslist").winControl;
72 |
73 | listView.itemDataSource = this._filters[filterIndex].results.dataSource;
74 | },
75 |
76 | _generateFilters: function () {
77 | this._filters = [];
78 | this._filters.push({ results: null, text: "All", predicate: function () { return true; } });
79 | },
80 |
81 | // This function executes each step required to perform a search.
82 | _handleQuery: function (element, args) {
83 | var self = this;
84 | this._lastSearch = args.queryText;
85 | WinJS.Namespace.define("searchResults", { markText: WinJS.Binding.converter(this._markText.bind(this)) });
86 | this._initializeLayout(element.querySelector(".resultslist").winControl, Windows.UI.ViewManagement.ApplicationView.value);
87 | this._generateFilters();
88 |
89 | self.loader = element.querySelector("progress");
90 | ideaPress.toggleElement(self.loader, "show");
91 | this._searchData(args.queryText).then(function (originalResults) {
92 | if (originalResults.length === 0) {
93 | document.querySelector('.resultsmessage').style.display = "block";
94 | }
95 |
96 | ideaPress.toggleElement(self.loader, "hide");
97 | self._populateFilterBar(element, originalResults);
98 | self._applyFilter(self._filters[0], originalResults);
99 | }, function () { }, function () { });
100 | },
101 |
102 | // This function updates the ListView with new layouts
103 | _initializeLayout: function (listView, viewState) {
104 |
105 | if (viewState === appViewState.snapped) {
106 | listView.layout = new ui.ListLayout();
107 | document.querySelector(".titlearea .pagetitle").textContent = '“' + this._lastSearch + '”';
108 | } else {
109 | listView.layout = new ui.GridLayout();
110 |
111 | document.querySelector(".titlearea .pagetitle").textContent = "Results for “" + this._lastSearch + '”';
112 | }
113 | },
114 |
115 | _itemInvoked: function (args) {
116 | ideaPress.searchModule.showPost(args);
117 | },
118 |
119 | // This function colors the search term. Referenced in /searchResults.html
120 | // as part of the ListView item templates.
121 | _markText: function (text) {
122 | return text.replace(this._lastSearch, "" + this._lastSearch + " ");
123 | },
124 |
125 | // This function generates the filter selection list.
126 | _populateFilterBar: function (element, originalResults) {
127 | var listView = element.querySelector(".resultslist").winControl;
128 | var filterIndex;
129 |
130 | for (filterIndex = 0; filterIndex < this._filters.length; filterIndex++) {
131 | this._applyFilter(this._filters[filterIndex], originalResults);
132 |
133 | if (filterIndex === 0) {
134 | listView.itemDataSource = this._filters[filterIndex].results.dataSource;
135 | }
136 | }
137 | },
138 |
139 | // This function populates a WinJS.Binding.List with search results for the
140 | // provided query.
141 | _searchData: function (queryText) {
142 |
143 | return ideaPress.searchModule.search(queryText);
144 | }
145 | });
146 |
147 | WinJS.Application.addEventListener("activated", function (args) {
148 | if (args.detail.kind === appModel.Activation.ActivationKind.search) {
149 | args.setPromise(ui.processAll().then(function () {
150 | if (!nav.location) {
151 | nav.history.current = { location: Application.navigator.home, initialState: {} };
152 | }
153 |
154 | return nav.navigate(searchPageUri, { queryText: args.detail.queryText });
155 | }));
156 | }
157 | });
158 |
159 |
160 | })();
161 |
--------------------------------------------------------------------------------
/IdeaPress/IdeaPress.jsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 |
8 |
9 | Debug
10 | ARM
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Debug
18 | x86
19 |
20 |
21 | Release
22 | AnyCPU
23 |
24 |
25 | Release
26 | ARM
27 |
28 |
29 | Release
30 | x64
31 |
32 |
33 | Release
34 | x86
35 |
36 |
37 |
38 | b0d292f6-2ba4-40f4-a1eb-97df50b68bed
39 |
40 |
41 |
42 |
43 |
44 | Windows
45 | 8.1
46 | en-US
47 | IdeaPress.pfx
48 | True
49 | 12.0
50 | 12.0
51 | neutral
52 | 37DC4471B70F5E1DC87BAE36C493E09BC22C523F
53 |
54 |
55 |
56 | Designer
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
142 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/css/wp.module.detail.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | #commentUI {
6 | width: 320px;
7 | height: 190px;
8 | padding: 12px 15px 10px;
9 | }
10 |
11 | #commentUI textarea {
12 | height: 125px;
13 | width: 307px;
14 | padding: 4px 6px;
15 | }
16 |
17 | #commentUI input[type=button] {
18 | float: right;
19 | margin: 8px 0 0 0;
20 | background-color: #1e8cbe;
21 | color: #fff;
22 | border: none;
23 | outline: 2px solid #1e8cbe;
24 | }
25 |
26 | #commentUI input[type=button]:hover:active {
27 | background-color: #ff6102;
28 | outline: none;
29 | }
30 |
31 | .wp-post section[role=main] {
32 | display: block;
33 | overflow-x: auto;
34 | margin: 0px 0 0 0;
35 | overflow-y: hidden;
36 | }
37 |
38 | .wp-post article {
39 | margin-bottom:55px;
40 | margin-top:20px;
41 | }
42 |
43 | .wp-post section[role=main] article .comments {
44 | break-after: auto;
45 | break-before: column;
46 | break-inside: avoid;
47 | page-break-inside: avoid;
48 | column-width: 350px;
49 | }
50 |
51 | .wp-post section[role=main] article .relatedPosts {
52 | break-after: auto;
53 | break-before: column;
54 | break-inside: avoid;
55 | page-break-inside: avoid;
56 | column-width: 350px;
57 | }
58 |
59 | .relatedPosts .item, .comments .item {
60 | border-bottom:solid 1px #ccc;
61 | padding:10px 10px 0px 0px;
62 | margin-right:40px;
63 | overflow:hidden;
64 | }
65 | .item p {
66 | padding:0; margin:0;
67 | }
68 |
69 |
70 | .wp-post section[role=main] article {
71 | column-fill: auto;
72 | column-width: 560px;
73 | column-gap: 0;
74 | height: 90%;
75 | width: 560px;
76 | margin-left: 120px;
77 | }
78 |
79 | .wp-post section[role=main] article .win-body {
80 | margin-right: 80px;
81 | }
82 |
83 | .wp-post section[role=main] article img {
84 | max-width: 100%;
85 | }
86 |
87 | .wp-post section[role=main] article div.meta {
88 | margin-bottom: 10px;
89 | line-height: 1.5em;
90 | overflow: hidden;
91 | }
92 |
93 | .wp-post section[role=main] article div.meta img {
94 | vertical-align: middle;
95 | float: left;
96 | }
97 |
98 | .wp-post section[role=main] article div.meta div.meta-txt {
99 | }
100 |
101 | /* Media Styles */
102 |
103 | .content img {
104 | display: block;
105 | }
106 |
107 | .content img[class*="align"],
108 | .content img[class*="wp-image-"],
109 | .content img[class*="attachment-"] {
110 | height: auto;
111 | }
112 |
113 | .content img.size-full,
114 | .content img.size-large {
115 | max-width: 100%;
116 | width: auto;
117 | height: auto;
118 | }
119 |
120 | .content img.wp-smiley {
121 | border: none;
122 | margin-bottom: 0;
123 | margin-top: 0;
124 | padding: 0;
125 | display: inline;
126 | }
127 |
128 | .content .alignleft,
129 | .content .alignright,
130 | .content .aligncenter {
131 | margin-bottom: 10px;
132 | margin-top: 10px;
133 | }
134 |
135 | .content .alignleft {
136 | display: inline;
137 | float: left;
138 | margin-right: 20px;
139 | }
140 |
141 | .content .alignright {
142 | display: inline;
143 | float: right;
144 | margin-left: 20px;
145 | }
146 |
147 | .content .aligncenter {
148 | clear: both;
149 | display: block;
150 | margin-left: auto;
151 | margin-right: auto;
152 | }
153 | .comment .wp-caption,
154 | .content .wp-caption {
155 | background: rgba(0,0,0,0.05);
156 | padding: 10px;
157 | max-width: 97%;
158 | break-inside: avoid;
159 | max-height: 100%;
160 | }
161 |
162 | .comment .wp-caption,
163 | .content .wp-caption {
164 | background: rgba(0,0,0,0.05);
165 | padding: 10px;
166 | max-width: 97%;
167 | break-inside: avoid;
168 | max-height: 100%;
169 | }
170 |
171 | .comment .wp-caption p,
172 | .content .wp-caption p {
173 | line-height: 14pt;
174 | }
175 |
176 | .comment .wp-caption br,
177 | .content .wp-caption br {
178 | display: none;
179 | }
180 |
181 | .comment .wp-caption img,
182 | .content .wp-caption img {
183 | width: 100%;
184 | height: auto;
185 | }
186 |
187 | .comment .wp-caption .wp-caption-text,
188 | .comment .wp-caption .wp-caption-dd,
189 | .content .wp-caption .wp-caption-text,
190 | .content .wp-caption .wp-caption-dd {
191 | margin: 4px 0 0;
192 | padding: 0;
193 | }
194 |
195 | .content object,
196 | .content embed,
197 | .content video,
198 | .content iframe {
199 | max-width: 100%;
200 | }
201 |
202 | /* Typography */
203 |
204 | .comment p,
205 | .content p,
206 | .content li,
207 | .content span,
208 | .content address {
209 | line-height: 20pt !important; /* These styles must be important to override inline CSS in articles */
210 | text-align: left !important;
211 | font-family: "Segoe UI" !important;
212 | font-size: 11pt !important;
213 | font-style: normal;
214 | }
215 |
216 | .comment p,
217 | .content p {
218 | padding: 0 !important;
219 | }
220 |
221 | .comment .wp-caption p,
222 | .content .wp-caption p {
223 | font-size: 9pt !important;
224 | line-height: 15pt !important;
225 | margin-bottom: 0;
226 | }
227 |
228 | .comment p,
229 | .content p,
230 | .content ul,
231 | .content ol,
232 | .content address {
233 | margin-bottom: 20pt;
234 | }
235 |
236 | .content ul,
237 | .content ol {
238 | padding-left: 16px;
239 | }
240 |
241 | /* External Iframe for Links */
242 |
243 | iframe#external-link {
244 | position: absolute;
245 | top: 0;
246 | left: 120px;
247 | padding-top:69px;
248 | height: 100%;
249 | width: calc(100% - 120px);
250 | border: none;
251 | }
252 |
253 | div#backbar {
254 | position: absolute;
255 | top: 0;
256 | left: 0;
257 | height: 100%;
258 | width: 120px;
259 | }
260 |
261 | div#backbar .win-backbutton {
262 | margin-top:69px;
263 | margin-left:39px;
264 | }
265 |
266 |
267 | #iframe-loader {
268 | color: rgb(30, 140, 190);
269 | width: 40px;
270 | height: 40px;
271 | position: absolute;
272 | bottom: 60px;
273 | left: 39px;
274 | z-index: 999;
275 | }
276 |
277 |
278 | @media (min-width: 320px) and (max-width: 499px) {
279 | .wp-post section[role=main] article {
280 | margin-left: 0px;
281 | }
282 | }
283 |
284 | @media (-ms-high-contrast) {
285 | div#backbar {
286 | background: ButtonFace;
287 | }
288 |
289 | iframe#external-link {
290 | background: ButtonFace;
291 | }
292 | }
293 |
294 | @media (min-width: 320px) and (max-width: 499px) {
295 | .wp-post {
296 | overflow-y: auto;
297 | overflow-x: hidden;
298 | display: block;
299 | }
300 |
301 | .wp-post .win-contentTitle {
302 | font-size: 11pt;
303 | line-height: 15pt;
304 | }
305 |
306 | .wp-post section[role=main] {
307 | overflow-y: visible;
308 | }
309 |
310 | .wp-post section[role=main] article {
311 | column-count: 1;
312 | display: block;
313 | width: calc(100% - 60px);
314 | padding-left: 20px;
315 | margin-left: 0;
316 | padding-right: 20px;
317 | overflow-y: visible;
318 | overflow-x: visible;
319 | height: auto;
320 | }
321 |
322 | .wp-post section[role=main] article .win-body {
323 | margin-right: 0;
324 | }
325 |
326 |
327 | .wp-post section[role=main] {
328 | margin-top: 0;
329 | }
330 |
331 | .wp-post section[role=main] .content img {
332 | height: auto;
333 | }
334 |
335 | .wp-post section[role=main] article .commentBox {
336 | width: 70%;
337 | height: 450px;
338 | margin-left: 5%;
339 | }
340 |
341 | .wp-post section[role=main] article .comments {
342 | break-after: avoid;
343 | break-before: avoid;
344 | break-inside: avoid;
345 | page-break-inside: avoid;
346 | }
347 |
348 | .wp-post section[role=main] article .relatedPosts {
349 | break-after: avoid;
350 | break-before: avoid;
351 | break-inside: avoid;
352 | page-break-inside: avoid;
353 | }
354 |
355 | #commentUI {
356 | width: 276px;
357 | height: 190px;
358 | padding: 12px 15px 10px;
359 | }
360 |
361 | #commentUI textarea {
362 | height: 125px;
363 | width: 263px;
364 | padding: 4px 6px;
365 | }
366 |
367 | .alignleft,
368 | .alignright,
369 | .aligncenter {
370 | clear: both;
371 | display: block;
372 | float: none;
373 | margin-left: auto;
374 | margin-right: auto;
375 | }
376 |
377 | div#backbar {
378 | position: absolute;
379 | top: 200px;
380 | left: 20px;
381 | height: 74px;
382 | width: 100%;
383 | background: #000;
384 | }
385 |
386 | iframe#external-link {
387 | position: absolute;
388 | top: 74px;
389 | left: 0;
390 | height: calc(100% - 74px);
391 | width: 100%;
392 | border: none;
393 | background: #000;
394 | }
395 | iframe#external-link.loaded {
396 | height: calc(100% - 74px);
397 | }
398 |
399 | #iframe-loader {
400 | width: 30px;
401 | height: 30px;
402 | top: 22px;
403 | left: auto;
404 | right: 18px;
405 | z-index: 999;
406 | }
407 |
408 | #viewblog {
409 | display: none;
410 | }
411 | }
412 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/css/wpcom.module.detail.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | .comment-container{ display: none;}
6 | #commentUI {
7 | width: 320px;
8 | height: 190px;
9 | padding: 12px 15px 10px;
10 | }
11 |
12 | #commentUI textarea {
13 | height: 125px;
14 | width: 307px;
15 | padding: 4px 6px;
16 | }
17 |
18 | #commentUI input[type=button] {
19 | float: right;
20 | margin: 8px 0 0 0;
21 | background-color: #1e8cbe;
22 | color: #fff;
23 | border: none;
24 | outline: 2px solid #1e8cbe;
25 | }
26 |
27 | #commentUI input[type=button]:hover:active {
28 | background-color: #ff6102;
29 | outline: none;
30 | }
31 |
32 | .wpc-post section[role=main] {
33 | display: block;
34 | overflow-x: auto;
35 | margin: 0px 0 0 0;
36 | overflow-y: hidden;
37 | }
38 |
39 |
40 |
41 | .wpc-post article {
42 | margin-bottom:55px;
43 | margin-top:20px;
44 | }
45 |
46 | .wpc-post section[role=main] article .comments {
47 | break-after: auto;
48 | break-before: column;
49 | break-inside: avoid;
50 | page-break-inside: avoid;
51 | column-width: 350px;
52 | }
53 |
54 | .wpc-post section[role=main] article .relatedPosts {
55 | break-after: auto;
56 | break-before: column;
57 | break-inside: avoid;
58 | page-break-inside: avoid;
59 | column-width: 350px;
60 | }
61 |
62 | .relatedPosts .item, .comments .item {
63 | border-bottom:solid 1px #ccc;
64 | padding:10px 10px 0px 0px;
65 | margin-right:40px;
66 | overflow:hidden;
67 | }
68 | .item p {
69 | padding:0; margin:0;
70 | }
71 |
72 |
73 | .wpc-post section[role=main] article {
74 | column-fill: auto;
75 | column-width: 560px;
76 | column-gap: 0;
77 | height: 90%;
78 | width: 560px;
79 | margin-left: 120px;
80 | }
81 |
82 | .wpc-post section[role=main] article .win-body {
83 | margin-right: 80px;
84 | }
85 |
86 | .wpc-post section[role=main] article img {
87 | max-width: 100%;
88 | }
89 |
90 | .wpc-post section[role=main] article div.meta {
91 | margin-bottom: 10px;
92 | line-height: 1.5em;
93 | overflow: hidden;
94 | }
95 |
96 | .wpc-post section[role=main] article div.meta img {
97 | vertical-align: middle;
98 | float: left;
99 | }
100 |
101 | .wpc-post section[role=main] article div.meta div.meta-txt {
102 | }
103 |
104 | /* Media Styles */
105 |
106 | .content img {
107 | display: block;
108 | }
109 |
110 | .content img[class*="align"],
111 | .content img[class*="wpc-image-"],
112 | .content img[class*="attachment-"] {
113 | height: auto;
114 | }
115 |
116 | .content img.size-full,
117 | .content img.size-large {
118 | max-width: 100%;
119 | width: auto;
120 | height: auto;
121 | }
122 |
123 | .content img.wpc-smiley {
124 | border: none;
125 | margin-bottom: 0;
126 | margin-top: 0;
127 | padding: 0;
128 | display: inline;
129 | }
130 |
131 | .content .alignleft,
132 | .content .alignright,
133 | .content .aligncenter {
134 | margin-bottom: 10px;
135 | margin-top: 10px;
136 | }
137 |
138 | .content .alignleft {
139 | display: inline;
140 | float: left;
141 | margin-right: 20px;
142 | }
143 |
144 | .content .alignright {
145 | display: inline;
146 | float: right;
147 | margin-left: 20px;
148 | }
149 |
150 | .content .aligncenter {
151 | clear: both;
152 | display: block;
153 | margin-left: auto;
154 | margin-right: auto;
155 | }
156 | .comment .wpc-caption,
157 | .content .wpc-caption {
158 | background: rgba(0,0,0,0.05);
159 | padding: 10px;
160 | max-width: 97%;
161 | break-inside: avoid;
162 | max-height: 100%;
163 | }
164 |
165 | .comment .wpc-caption,
166 | .content .wpc-caption {
167 | background: rgba(0,0,0,0.05);
168 | padding: 10px;
169 | max-width: 97%;
170 | break-inside: avoid;
171 | max-height: 100%;
172 | }
173 |
174 | .comment .wpc-caption p,
175 | .content .wpc-caption p {
176 | line-height: 14pt;
177 | }
178 |
179 | .comment .wpc-caption br,
180 | .content .wpc-caption br {
181 | display: none;
182 | }
183 |
184 | .comment .wpc-caption img,
185 | .content .wpc-caption img {
186 | width: 100%;
187 | height: auto;
188 | }
189 |
190 | .comment .wpc-caption .wpc-caption-text,
191 | .comment .wpc-caption .wpc-caption-dd,
192 | .content .wpc-caption .wpc-caption-text,
193 | .content .wpc-caption .wpc-caption-dd {
194 | margin: 4px 0 0;
195 | padding: 0;
196 | }
197 |
198 | .content object,
199 | .content embed,
200 | .content video,
201 | .content iframe {
202 | max-width: 100%;
203 | }
204 |
205 | /* Typography */
206 |
207 | .comment p,
208 | .content p,
209 | .content li,
210 | .content span,
211 | .content address {
212 | line-height: 20pt !important; /* These styles must be important to override inline CSS in articles */
213 | text-align: left !important;
214 | font-family: "Segoe UI" !important;
215 | font-size: 11pt !important;
216 | font-style: normal;
217 | }
218 |
219 | .comment p,
220 | .content p {
221 | padding: 0 !important;
222 | }
223 |
224 | .comment .wpc-caption p,
225 | .content .wpc-caption p {
226 | font-size: 9pt !important;
227 | line-height: 15pt !important;
228 | margin-bottom: 0;
229 | }
230 |
231 | .comment p,
232 | .content p,
233 | .content ul,
234 | .content ol,
235 | .content address {
236 | margin-bottom: 20pt;
237 | }
238 |
239 | .content ul,
240 | .content ol {
241 | padding-left: 16px;
242 | }
243 |
244 | /* External Iframe for Links */
245 |
246 | iframe#external-link {
247 | position: absolute;
248 | top: 0;
249 | left: 120px;
250 | padding-top:69px;
251 | height: 100%;
252 | width: calc(100% - 120px);
253 | border: none;
254 | }
255 |
256 | div#backbar {
257 | position: absolute;
258 | top: 0;
259 | left: 0;
260 | height: 100%;
261 | width: 120px;
262 | }
263 |
264 | div#backbar .win-backbutton {
265 | margin-top:69px;
266 | margin-left:39px;
267 | }
268 |
269 |
270 | #iframe-loader {
271 | color: rgb(30, 140, 190);
272 | width: 40px;
273 | height: 40px;
274 | position: absolute;
275 | bottom: 60px;
276 | left: 39px;
277 | z-index: 999;
278 | }
279 | /* --- */
280 |
281 | @media (min-width: 320px) and (max-width: 499px) {
282 | .wpc-post {
283 | overflow-y: auto;
284 | overflow-x: hidden;
285 | display: block;
286 | }
287 |
288 | .wpc-post .win-contentTitle {
289 | font-size: 11pt;
290 | line-height: 15pt;
291 | }
292 |
293 | .wpc-post section[role=main] {
294 | overflow-y: visible;
295 | display: inline;
296 | }
297 |
298 | .wpc-post section[role=main] article {
299 | column-count: 1;
300 | display: block;
301 | width: calc(100% - 60px);
302 | padding-left: 20px;
303 | margin-left: 0;
304 | padding-right: 20px;
305 | overflow-y: visible;
306 | overflow-x: visible;
307 | height: auto;
308 | }
309 |
310 | .wpc-post section[role=main] article .win-body {
311 | margin-right: 0;
312 | }
313 |
314 |
315 | .wpc-post section[role=main] {
316 | margin-top: 0;
317 | }
318 |
319 | .wpc-post section[role=main] .content img {
320 | height: auto;
321 | }
322 |
323 | .wpc-post section[role=main] article .commentBox {
324 | width: 70%;
325 | height: 450px;
326 | margin-left: 5%;
327 | }
328 |
329 | .wpc-post section[role=main] article .comments {
330 | break-after: avoid;
331 | break-before: avoid;
332 | break-inside: avoid;
333 | page-break-inside: avoid;
334 | }
335 |
336 | .wpc-post section[role=main] article .relatedPosts {
337 | break-after: avoid;
338 | break-before: avoid;
339 | break-inside: avoid;
340 | page-break-inside: avoid;
341 | }
342 |
343 | #commentUI {
344 | width: 276px;
345 | height: 190px;
346 | padding: 12px 15px 10px;
347 | }
348 |
349 | #commentUI textarea {
350 | height: 125px;
351 | width: 263px;
352 | padding: 4px 6px;
353 | }
354 |
355 | .alignleft,
356 | .alignright,
357 | .aligncenter {
358 | clear: both;
359 | display: block;
360 | float: none;
361 | margin-left: auto;
362 | margin-right: auto;
363 | }
364 |
365 | div#backbar {
366 | position: absolute;
367 | top: 200px;
368 | left: 20px;
369 | height: 74px;
370 | width: 100%;
371 | background: #000;
372 | }
373 |
374 | iframe#external-link {
375 | position: absolute;
376 | top: 74px;
377 | left: 0;
378 | height: calc(100% - 74px);
379 | width: 100%;
380 | border: none;
381 | background: #000;
382 | }
383 | iframe#external-link.loaded {
384 | height: calc(100% - 74px);
385 | }
386 |
387 | #iframe-loader {
388 | width: 30px;
389 | height: 30px;
390 | top: 22px;
391 | left: auto;
392 | right: 18px;
393 | z-index: 999;
394 | }
395 |
396 | #viewblog {
397 | display: none;
398 | }
399 | }
400 |
401 | @media screen and (orientation: portrait) {
402 | .wpc-post section[role=main] article {
403 | margin-left: 104px;
404 | }
405 |
406 | .wpc-post header[role=banner] h1 {
407 | margin-right: 20px;
408 | }
409 |
410 | .wpc-post header[role=banner] h2 {
411 | margin-right: 20px;
412 | }
413 |
414 | .wpc-post header[role=banner] .win-backbutton {
415 | margin-top: 60px;
416 | }
417 | }
418 |
419 | @media (-ms-high-contrast) {
420 | div#backbar {
421 | background: ButtonFace;
422 | }
423 |
424 | iframe#external-link {
425 | background: ButtonFace;
426 | }
427 | }
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpress/js/wp.module.detail.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Wordpress JSON API module
7 | Author: IdeaNotion
8 | */
9 | (function () {
10 | "use strict";
11 |
12 | var item;
13 |
14 | function ready(element, options) {
15 | WinJS.UI.Animation.enterPage(document.querySelector('.fragment.wp-post'), { top: '0px', left: '200px' });
16 |
17 | item = options.item; // needs to be a global
18 |
19 | // Populate the Comment buttons events
20 | document.getElementById("commentButton").addEventListener("click", showCommentFlyout, false);
21 | document.getElementById("submitCommentButton").addEventListener("click", submitComment, false);
22 | document.getElementById("commentFlyout").addEventListener("afterhide", onDismiss, false);
23 |
24 | // Populate the page with Blog info
25 | document.title = ideaPress.decodeEntities(item.title);
26 | document.querySelector('.wp-post').setAttribute('id', item.id);
27 | document.querySelector('.wp-post').setAttribute('permalink', item.permalink);
28 |
29 | document.querySelector('.title').innerText = item.title;
30 |
31 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector('.content'), item.content);
32 | // hot fix
33 |
34 | if (ideaPress.options.fetchOnPostInit && item.type === 'post')
35 | item.module.getPostContent(item.id, document.querySelector('.content'));
36 |
37 | document.querySelector('.meta').innerHTML += 'by ' + item.authorName + ' Posted ' + ideaPress.timeSince(item.date) + ' ago
';
38 |
39 | // setup sharing
40 | document.querySelector('.mp-share').innerText = document.querySelector('.content').innerText.substr(0, 50);
41 | document.querySelector('.mp-share').setAttribute('permalink', item.permalink);
42 | document.querySelector('.mp-share').setAttribute('title', item.title);
43 |
44 | document.getElementById("like").addEventListener("click", bookmarkClick, false);
45 | document.getElementById("home").addEventListener("click", function () { var nav = WinJS.Navigation; ideaPress.navBack(nav, nav.history.backStack.length);/*nav.back(nav.history.backStack.length);*/ }, false);
46 |
47 | document.getElementById('viewblog').removeEventListener("click", viewBlog);
48 | document.getElementById('viewblog').addEventListener("click", viewBlog, false);
49 |
50 | document.querySelector('.contentArea').addEventListener("mousewheel", function (eventObject) {
51 | var delta = -Math.round(eventObject.wheelDelta);
52 | document.querySelector('.contentArea').scrollLeft += delta;
53 | });
54 |
55 | // scroll background
56 | document.querySelector('.contentArea').addEventListener("scroll", ideaPress.scrollBackground);
57 |
58 | // Catch link clicks and iframe them.
59 | ideaPress.iframePostLinks();
60 |
61 | // Comments
62 | // Loop through all comments
63 |
64 | if (item && item.comments) {
65 | var comments = '';
66 | for (var i = 0; i < item.comments.length; i++) {
67 | comments += '';
68 | comments += item.comments[i].content + '
';
69 | comments += '
Posted by ' + item.comments[i].name + ' ';
70 | comments += getDateDifference(item.comments[i].date) + ' ago
';
71 | }
72 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector('.comment'), comments);
73 | }
74 | // Related Post
75 | var relatedPost = '';
76 | var primCat = item.module;
77 |
78 | if (primCat) {
79 | for (var l = 0; l < primCat.list.length && l < primCat.numberOfRelatedPosts; l++) {
80 | // Only add post that is not itself.
81 | var value = primCat.list.getAt(l);
82 | if (value.id != item.id) {
83 | relatedPost += '';
84 | relatedPost += '
From ' + value.authorName + ' ' + getDateDifference(value.date) + ' ago
';
85 | }
86 | }
87 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector(".relatedPost"), relatedPost);
88 |
89 | // We'll add the listener after we add the elements into the script
90 | primCat.list.forEach(
91 | function (v) {
92 | if (v.id != item.id) {
93 | if (document.getElementById('related' + v.id)) {
94 | document.getElementById('related' + v.id).addEventListener("click", function() {
95 | WinJS.Navigation.navigate("/modules/wordpress/pages/wp.module.detail.html", { item: v });
96 | }, false);
97 | }
98 | }
99 | }
100 | );
101 |
102 | // Make sure the bookmark icon is properly updated.
103 | updateButton(item.module.checkIsBookmarked(item.id));
104 | }
105 |
106 | return; // convenient to set breakpoint :)
107 | }
108 |
109 | function getDateDifference(lsPostDateString) {
110 | // Expected Format:
111 | // 0123456789012345678
112 | // 2012-10-26 07:49:03
113 | var year = lsPostDateString.substring(0, 4);
114 | var month = parseInt(lsPostDateString.substring(5, 7)) - 1; // month starts from 0 to 11
115 | var day = lsPostDateString.substring(8, 10);
116 | var hour = lsPostDateString.substring(11, 13);
117 | var minute = lsPostDateString.substring(14, 16);
118 | var milli = lsPostDateString.substring(17);
119 | return ideaPress.timeSince(new Date(year, month, day, hour, minute, milli, 0));
120 | }
121 |
122 | function viewBlog() {
123 | if (WinJS.Utilities.hasClass(document.querySelector("button#viewblog"), 'open-in-browser'))
124 | top.location.href = item.permalink;
125 | else
126 | ideaPress.renderIframeView(item.permalink);
127 | }
128 |
129 | function updateLayout(element, viewState) {
130 | if (viewState == Windows.UI.ViewManagement.ApplicationViewState.snapped) {
131 | var backlink = document.getElementById("backlink");
132 | if (backlink) {
133 | backlink.click();
134 | }
135 | }
136 | }
137 |
138 | // Update the behavior of the app button
139 | function updateButton(isBookmarked) {
140 | var likeButton = document.getElementById('like');
141 |
142 | if (!isBookmarked) {
143 | WinJS.Utilities.removeClass(likeButton, "selected");
144 | likeButton.onmouseover = "";
145 | likeButton.onmouseout = "";
146 |
147 | likeButton.getElementsByClassName('win-label').item(0).innerText = "Bookmark";
148 | }
149 | else {
150 | likeButton.getElementsByClassName('win-label').item(0).innerText = "Bookmarked";
151 | WinJS.Utilities.addClass(likeButton, "selected");
152 | likeButton.onmouseover = function() {
153 | likeButton.getElementsByClassName('win-label').item(0).innerText = "Unbookmark";
154 | };
155 | likeButton.onmouseout = function() {
156 | likeButton.getElementsByClassName('win-label').item(0).innerText = "Bookmarked";
157 | };
158 | }
159 | }
160 |
161 | function clone(obj) {
162 | if (!obj || "object" !== typeof obj) return obj;
163 | var copy = obj.constructor();
164 | for (var attr in obj) {
165 | if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];
166 | }
167 | return copy;
168 | }
169 |
170 | function bookmarkClick() {
171 | var isBookmarked = item.module.checkIsBookmarked(item.id);
172 | if (!isBookmarked) {
173 | var copyItem = clone(item);
174 | item.module.addBookmark(copyItem);
175 | updateButton(true);
176 | }
177 | else {
178 | item.module.removeBookmark(item.id);
179 | updateButton(false);
180 | }
181 | }
182 |
183 | // Show the flyout
184 | function showCommentFlyout() {
185 | //loggedIn = false;
186 | //WinJS.log && WinJS.log("", "sample", "status", "status");
187 |
188 | var commentButton = document.getElementById("commentButton");
189 | document.getElementById("commentFlyout").winControl.show(commentButton);
190 | // Clear the results text
191 | document.getElementById('comments#results').innerText = "";
192 | }
193 |
194 | // Show errors if any of the text fields are not filled out when the Comment button is clicked
195 | function submitComment() {
196 | var error = false;
197 | if (document.getElementById("commentName").value.trim() === "") {
198 | document.getElementById("commentNameError").innerHTML = "Name is required";
199 | document.getElementById("commentName").focus();
200 | error = true;
201 | } else {
202 | document.getElementById("commentNameError").innerHTML = "";
203 | }
204 | if (document.getElementById("commentEmail").value.trim() === "") {
205 | document.getElementById("commentEmailError").innerHTML = "Email is required";
206 | document.getElementById("commentEmail").focus();
207 | error = true;
208 | } else {
209 | document.getElementById("commentEmailError").innerHTML = "";
210 | }
211 | if (document.getElementById("commentComment").value.trim() === "") {
212 | document.getElementById("commentCommentError").innerHTML = "Comment is required";
213 | document.getElementById("commentComment").focus();
214 | error = true;
215 | } else {
216 | document.getElementById("commentCommentError").innerHTML = "";
217 | }
218 |
219 | if (!error) {
220 | //loggedIn = true;
221 | //WinJS.log && WinJS.log("You have logged in.", "sample", "status");
222 | item.module.submitComment(item.id,
223 | document.getElementById("commentName").value.trim(),
224 | document.getElementById("commentEmail").value.trim(),
225 | document.getElementById("commentUrl").value.trim(),
226 | document.getElementById("commentComment").value.trim(),
227 | function (result) {
228 | var data = JSON.parse(result.responseText);
229 | if (data.status === 'pending') {
230 | document.getElementById('comments#results').innerText = 'Comment submitted. Pending approval.';
231 | }
232 | else if (data.status === 'ok') {
233 | document.getElementById('comments#results').innerText = 'Comment submitted successfully.';
234 | }
235 | else if (data.status === 'error') {
236 | document.getElementById('comments#results').innerText = 'An error occurred: ' + data.error;
237 | } else {
238 | document.getElementById('comments#results').innerText = result.responseText;
239 | }
240 | },
241 | function (result) {
242 | document.getElementById('comments#results').innerText = 'An error occurred: ' + result.status + ' ' + result.statusText;
243 | },
244 | function () {
245 | document.getElementById('comments#results').innerText = "Posting in progress.";
246 | }
247 | );
248 |
249 | document.getElementById("commentFlyout").winControl.hide();
250 | }
251 | }
252 |
253 | // On dismiss of the flyout, reset the fields in the flyout
254 | function onDismiss() {
255 |
256 | // Clear fields on dismiss
257 | document.getElementById("commentName").value = "";
258 | document.getElementById("commentNameError").innerHTML = "";
259 | document.getElementById("commentEmail").value = "";
260 | document.getElementById("commentEmailError").innerHTML = "";
261 | document.getElementById("commentComment").value = "";
262 | document.getElementById("commentCommentError").innerHTML = "";
263 | document.getElementById("commentUrl").value = "";
264 |
265 | //if (!loggedIn) {
266 | // WinJS.log && WinJS.log("You have not logged in.", "sample", "status");
267 | //}
268 | }
269 |
270 | WinJS.UI.Pages.define("/modules/wordpress/pages/wp.module.detail.html", {
271 | ready: ready,
272 | updateLayout: updateLayout
273 | });
274 | })();
275 |
--------------------------------------------------------------------------------
/IdeaPress/css/default.css:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /* Import rules for custom themes, you can import custom.dark.css or custom.orange.css */
6 | @import url('/css/themes/custom.css');
7 |
8 | html {
9 | cursor: default;
10 | height: 100%;
11 | width: 100%;
12 | }
13 |
14 | body {
15 | background-image: url('/images/BackgroundPic.png');
16 | background-color:#333;
17 | background-size: cover;
18 | background-position: 0 center;
19 | height: 100%;
20 | width: 100%;
21 | transition-property: background-position-x;
22 | transition-timing-function: ease;
23 | transition-duration: 0.8s;
24 | }
25 |
26 | /* content host in default.html*/
27 | #contenthost {
28 | height: 100%;
29 | width: 100%;
30 | }
31 |
32 | /* layout and headers */
33 | .fragment {
34 | display: -ms-grid;
35 | -ms-grid-columns: 1fr;
36 | -ms-grid-rows: 140px 1fr;
37 | height: 100%;
38 | }
39 |
40 | /*================== header style start =========================*/
41 | header[role=banner] {
42 | -ms-grid-row :1;
43 | /* Define a grid with columns for the back button and page title. */
44 | display: -ms-grid;
45 | -ms-grid-columns: 120px 400px 1fr;
46 | -ms-grid-rows: 1fr;
47 | z-index:100;
48 | position:absolute;
49 | }
50 |
51 | header[role=banner] .win-backbutton {
52 | margin-left: 39px;
53 | margin-top: 69px;
54 | }
55 |
56 | header[role=banner] .titlearea {
57 | -ms-grid-column: 2;
58 | margin-top: 48px;
59 | height: 80px;
60 | margin-right: 35px;
61 | margin-left: -4px;
62 | }
63 |
64 | header[role=banner] .titleImage {
65 | display:none;
66 | height:80px;
67 | }
68 |
69 | header[role=banner].showImage .titleImage {
70 | display: block;
71 | /*margin-left:-5px;*/
72 | }
73 |
74 | header[role=banner].showImage .pagetitle {
75 | display: none;
76 | }
77 |
78 | header[role=banner] .titlearea {
79 | width:1200px;
80 | position:relative;
81 | }
82 |
83 | header[role=banner] .titlearea .pagetitle {
84 | width: calc(100% - 20px);
85 | letter-spacing: 0;
86 | }
87 | /*================== header styling end =========================*/
88 |
89 | section[role=main] {
90 | -ms-grid-row:2;
91 | height: 100%;
92 | width: 100%;
93 |
94 | }
95 |
96 |
97 | .win-body {
98 | font-size: 11pt;
99 | font-weight: 300;
100 | }
101 |
102 | /* back button styling */
103 | .win-backbutton {
104 | border-color: black;
105 | color: black;
106 | }
107 |
108 | button {
109 | border: solid 2px #666;
110 | background: #ccc;
111 | color:#000;
112 | }
113 |
114 | .hide {
115 | display: none !important;
116 | }
117 |
118 | .show {
119 | display: block;
120 | }
121 |
122 | .win-contentcaption {
123 | font-size: 9pt;
124 | }
125 |
126 | section[role=main] article {
127 | display:block;
128 | height:100%;
129 | width:100%;
130 | }
131 |
132 | progress.win-ring {
133 | width: 100px;
134 | height: 100px;
135 | position: absolute;
136 | left: calc(50% - 50px);
137 | top: calc(50% - 100px);
138 | }
139 |
140 | /* error msg container*/
141 | div.error {
142 | width: 100%;
143 | position: absolute;
144 | margin: 0 auto 0 auto;
145 | text-align: center;
146 | top: 45%;
147 | color: #fff;
148 | }
149 |
150 | .mp-share { display: none;}
151 |
152 | /*========================================== app bar related item style start ============================*/
153 | #refresh .win-commandimage::before {
154 | content: "\e149";
155 | }
156 |
157 | #like .win-commandimage::before {
158 | content: "\e0b4";
159 | }
160 |
161 | #viewblog {
162 | float: right;
163 | }
164 |
165 | #viewblog .win-commandimage::before {
166 | content: "\e17c";
167 | }
168 |
169 | #viewblog.open-in-browser .win-commandimage::before {
170 | content: "\e17c";
171 | }
172 |
173 | #home .win-commandimage::before {
174 | content: "\e10f";
175 | }
176 |
177 |
178 | .win-appbar #viewblog.open-in-browser .win-commandimage {
179 | margin-top: -4px;
180 | margin-left: -1px;
181 | margin-right: -1px;
182 | font-size: 13pt;
183 | }
184 |
185 | #viewblog.open-in-browser .win-commandicon {
186 | background: none;
187 | }
188 |
189 | .win-commandicon {
190 | background-position: center;
191 | background-repeat: no-repeat;
192 | background-size: 32px, 32px;
193 | font-family: "Segoe UI Symbol";
194 | }
195 |
196 | .win-command {
197 | white-space: nowrap;
198 | }
199 |
200 | .win-command.selected .win-commandicon,
201 | .win-command:hover:active .win-commandicon {
202 | background-color: #fff;
203 | }
204 |
205 | .win-command.selected .win-commandimage::before,
206 | .win-command:hover:active .win-commandimage::before {
207 | color: #ccc;
208 | }
209 |
210 | .win-command .win-label {
211 | color: #fff;
212 | }
213 |
214 | .win-appbar {
215 | background-color: #333333;
216 | }
217 |
218 | .win-appbar .win-commandimage {
219 | margin-top: -3px;
220 | }
221 | /*======================================== app bar style end ==============================*/
222 |
223 | /*======================================== win-listview style start =============================*/
224 | .win-listview {
225 | overflow:hidden;
226 | height:100%;
227 | width:100%;
228 | }
229 |
230 | .win-horizontal.win-viewport .win-surface {
231 | margin-top: 0px;
232 | height: 100%;
233 | margin-bottom: 60px;
234 | }
235 |
236 | .win-container {
237 | margin-right: 8px;
238 | margin-bottom: 8px;
239 | }
240 |
241 | .win-selected, .win-item:focus, .win-item:focus {
242 | outline: none;
243 | border: none;
244 | box-shadow: none;
245 | }
246 |
247 |
248 | .win-groups.win-listview > .win-horizontal .win-surface {
249 | margin-left: 40px;
250 | }
251 |
252 | .win-listview > .win-horizontal .win-surface {}
253 | /*======================================== win-listview style end ==========================*/
254 |
255 | @media screen and (orientation: portrait) {
256 | header[role=banner] {
257 | -ms-grid-columns: 100px 400px 1fr;
258 | }
259 |
260 | header[role=banner] .win-backbutton {
261 | margin-left: 29px;
262 | }
263 |
264 | }
265 |
266 | @media (-ms-high-contrast) {
267 | .win-commandicon {
268 | background-position: center;
269 | background-repeat: no-repeat;
270 | background-size: 32px, 32px;
271 | font-family: "Segoe UI Symbol";
272 | }
273 | .selected .win-commandicon {
274 | background-color: #fff;
275 | }
276 | .selected .win-commandimage::before {
277 | color: #000;
278 | }
279 |
280 | }
281 |
282 | @media (min-width: 320px) and (max-width: 499px) {
283 | .fragment {
284 | display: block;
285 | }
286 |
287 | header[role=banner] {
288 | display: block;
289 | position:static;
290 | }
291 |
292 | header[role=banner] .titlearea {
293 | float: left;
294 | margin-top: 20px;
295 | height: 44px;
296 | width: calc(100% - 100px);
297 | margin-left:0;
298 | margin-right:0;
299 | overflow: visible;
300 | }
301 |
302 | header[role=banner] .title {
303 | width: 210px;
304 | -ms-text-overflow: ellipsis;
305 | overflow:hidden;
306 | display:block;
307 | font-size:0.5em;
308 | }
309 |
310 | header[role=banner] .pagetitle {
311 | width: 210px;
312 | -ms-text-overflow: ellipsis;
313 | overflow:hidden;
314 | display:block;
315 | font-size:0.5em;
316 | }
317 |
318 | header[role=banner] .win-backbutton {
319 | float:left;
320 | margin-top: 25px;
321 | margin-left:20px;
322 | margin-right:20px;
323 | }
324 |
325 | header[role=banner] .win-backbutton[disabled=disabled] {
326 | margin-left:0px;
327 | margin-right:9px;
328 | }
329 |
330 | header[role=banner].showImage .titleImage {
331 | height: 42px;
332 | margin-left:1px;
333 |
334 | }
335 |
336 | progress.win-ring {
337 | width: 50px;
338 | height: 50px;
339 | position: absolute;
340 | left: calc(50% - 25px);
341 | top: calc(50% - 25px);
342 | }
343 |
344 | }
345 |
346 | /*====================================================== Hub ======================================================*/
347 | #hub-container {
348 | width: 100%;
349 | -ms-grid-row:1;
350 | -ms-grid-row-span:2;
351 | height: 100%;
352 | width: 100%;
353 |
354 | }
355 |
356 | #hub-content {
357 | display:-ms-grid;
358 | height:100%;
359 | -ms-grid-rows: 1fr;
360 | overflow-x:scroll;
361 | padding-left:116px;
362 |
363 | }
364 |
365 | #hub-container .mp-module {
366 | -ms-grid-rows: 0px 1fr;
367 | padding-right: 116px;
368 | height:100%;
369 | position:relative;
370 | }
371 |
372 | #hub-container .mp-module .win-hub-section-content {
373 | min-width:240px;
374 | }
375 |
376 | #hub-container .mp-module .win-hub-section-content h2 {
377 | margin-top:129px;
378 | height:40px;
379 | padding-bottom: 4px;
380 | }
381 | #hub-container .mp-module .win-hub-section-content .mp-module-content {
382 | height:calc(100% - 40px);
383 | }
384 |
385 | .hub #hero {
386 | display:none;
387 | overflow:hidden;
388 | position:relative;
389 | background-image: url(/images/hero.jpg);
390 | background-size:cover;
391 | background-repeat:no-repeat;
392 | background-position:center;
393 | }
394 |
395 | .hub #hero.show {
396 | display:block;
397 | }
398 |
399 | .hub #hero #hero-bg {
400 | background-image: url(/images/hero.jpg);
401 | background-size:cover;
402 | background-repeat:no-repeat;
403 | background-position:center;
404 | z-index:1;
405 | }
406 |
407 | .hub #hero #hero-overlay {
408 | /*background: radial-gradient(ellipse at center, rgba(255,255,255,0) 30%,rgba(255,255,255,0) 71%,rgba(255,255,255,0.08) 75%,rgba(68,68,68,0.98) 100%); */
409 | background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%,rgba(51,51,51,0.15) 10%,rgba(255,255,255,0) 50%,rgba(51,51,51,0.15) 70%,rgba(0,0,0,0.5) 100%);
410 | position:absolute;
411 | width:100%;
412 | height:100%;
413 | top:0;
414 | left:0;
415 | z-index:5;
416 | }
417 |
418 | .hub #hero #hero-bg.animation-0 {
419 | width:140%;
420 | height:100%;
421 | transform: scale(1.0);
422 | position:absolute;
423 | top:0%;
424 | left:-15%;
425 |
426 | animation-delay: 1s;
427 | animation-iteration-count:1;
428 | animation-duration: 9s;
429 | animation-name: animation-left;
430 | }
431 |
432 | .hub #hero #hero-bg.animation-1 {
433 | width:140%;
434 | height:100%;
435 | transform: scale(1.0);
436 | position:absolute;
437 | top:0%;
438 | left:-25%;
439 |
440 | animation-delay: 1s;
441 | animation-iteration-count:1;
442 | animation-duration: 9s;
443 | animation-name: animation-right;
444 | }
445 |
446 | .hub #hero .hero-info {
447 | display:none;
448 | position:absolute;
449 | bottom:40px;
450 | left:80px;
451 | padding-right:80px;
452 | z-index:25;
453 | text-transform:capitalize;
454 | }
455 |
456 | .hub #hero .hero-info .hero-title {
457 | font-weight:bolder;
458 | }
459 |
460 | @keyframes animation-left {
461 | 0% {
462 | top:0%;
463 | left:-15%;
464 | }
465 | 100% {
466 | top:0%;
467 | left:-20%;
468 | }
469 | }
470 |
471 | @keyframes animation-right {
472 | 0% {
473 | top:0%;
474 | left:-25%;
475 | }
476 | 100% {
477 | top:0%;
478 | left:-20%;
479 | }
480 | }
481 |
482 |
483 |
484 | .hub .win-hub-horizontal #hero {
485 | margin-left: -80px;
486 | margin-right: 20px;
487 | min-width: 400px;
488 | width: 60vw;
489 | font-size:28pt;
490 | }
491 |
492 | .hub .win-hub-section .win-hub-section-header {
493 | visibility: hidden;
494 | }
495 |
496 |
497 | @media (min-width: 500px) and (max-width: 800px) {
498 | .hub .win-hub-horizontal #hero {
499 | width: 40vw;
500 | }
501 | .hub .hero-info h1 {
502 | font-size:24pt;
503 | }
504 | }
505 |
506 | @media (min-width: 320px) and (max-width: 500px) {
507 | #hub-container {
508 | display:block;
509 | position:static;
510 | padding:0;
511 | }
512 | #hub-container .win-hub-section-header {
513 | display:none;
514 | }
515 | .hub .win-hub-horizontal #hero {
516 | display:none;
517 | }
518 |
519 | .hub .win-hub-section-content h2 {
520 | display:none;
521 | }
522 |
523 | .hub #hub-container .mp-module {
524 | display:block;
525 | margin:auto;
526 | padding:0;
527 | width:100%;
528 | position:static;
529 | }
530 |
531 | .hub #hub-container .mp-module .win-listview > .win-vertical.win-viewport {
532 | overflow-y:hidden;
533 | }
534 |
535 | #hub-container .win-vertical .win-container {
536 | margin-left:20px;
537 | }
538 | }
539 | }
540 |
--------------------------------------------------------------------------------
/IdeaPress/modules/wordpressCom/js/wpcom.module.detail.js:
--------------------------------------------------------------------------------
1 | /*!
2 | IdeaPress v2.0.1 (Wednesday, June 5, 2013) | ideapress.me/license
3 | */
4 |
5 | /*
6 | IdeaPress Wordpress.COM API module
7 | Author: IdeaNotion
8 | */
9 | (function () {
10 | "use strict";
11 |
12 | var item;
13 |
14 | function ready(element, options) {
15 | WinJS.UI.Animation.enterPage(document.querySelector('.fragment.wpc-post'), { top: '0px', left: '200px' });
16 |
17 | item = options.item; // needs to be a global
18 |
19 | // Populate the Comment buttons events
20 | document.getElementById("commentButton").addEventListener("click", showCommentFlyout, false);
21 | document.getElementById("submitCommentButton").addEventListener("click", submitComment, false);
22 | document.getElementById("commentFlyout").addEventListener("afterhide", onDismiss, false);
23 |
24 | // Populate the page with Blog info
25 | document.title = ideaPress.decodeEntities(item.title);
26 | document.querySelector('.wpc-post').setAttribute('id', item.id);
27 | document.querySelector('.title').innerText = item.title;
28 | //document.querySelector('.wp-post').setAttribute('permalink', item.permalink);
29 |
30 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector('.content'), item.content);
31 |
32 | document.querySelector('.meta').innerHTML += 'by ' + item.authorName + ' Posted ' + ideaPress.timeSince(item.date) + ' ago
';
33 |
34 | // setup sharing
35 | document.querySelector('.mp-share').innerText = document.querySelector('.content').innerText.substr(0, 50);
36 | document.querySelector('.mp-share').setAttribute('permalink', item.permalink);
37 | document.querySelector('.mp-share').setAttribute('title', item.title);
38 |
39 |
40 | document.getElementById("like").addEventListener("click", bookmarkClick, false);
41 | document.getElementById("home").addEventListener("click", function () { var nav = WinJS.Navigation; ideaPress.navBack(nav, nav.history.backStack.length);/*nav.back(nav.history.backStack.length);*/ }, false);
42 |
43 | document.getElementById('viewblog').removeEventListener("click", viewBlog);
44 | document.getElementById('viewblog').addEventListener("click", viewBlog, false);
45 |
46 | document.querySelector('.contentArea').addEventListener("mousewheel", function (eventObject) {
47 | var delta = -Math.round(eventObject.wheelDelta);
48 | document.querySelector('.contentArea').scrollLeft += delta;
49 | });
50 |
51 | // scroll background
52 | document.querySelector('.contentArea').addEventListener("scroll", ideaPress.scrollBackground);
53 |
54 | // Catch link clicks and iframe them.
55 | ideaPress.iframePostLinks();
56 |
57 | // Comments
58 | // Loop through all comments
59 | getComment(item.id);
60 |
61 | // if no WP client ID/Secret, enable the post comment button
62 | if (item.module.clientId && item.module.clientSecret)
63 | document.getElementById('commentButton').style.display = "block";
64 |
65 | if (item.module) {
66 | // Related Post
67 | var relatedPost = '';
68 | var primCat = item.module;
69 |
70 | for (var l = 0; l < primCat.list.length && l < primCat.numberOfRelatedPosts; l++) {
71 | // Only add post that is not itself.
72 | var value = primCat.list.getAt(l);
73 | if (value.id != item.id) {
74 | relatedPost += '';
75 | relatedPost += '
From ' + value.authorName + ' ' + getDateDifference(value.date) + ' ago
';
76 | }
77 | }
78 |
79 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector(".relatedPost"), relatedPost);
80 |
81 | // We'll add the listener after we add the elements into the script
82 | primCat.list.forEach(
83 | function (v) {
84 | if (v.id != item.id) {
85 | if (document.getElementById('related' + v.id)) {
86 | document.getElementById('related' + v.id).addEventListener("click", function () {
87 | WinJS.Navigation.navigate("/modules/wordpressCom/pages/wpcom.module.detail.html", { item: v });
88 | }, false);
89 | }
90 | }
91 | }
92 | );
93 |
94 | // Make sure the bookmark icon is properly updated.
95 | updateButton(item.module.checkIsBookmarked(item.id));
96 | }
97 | return; // convenient to set breakpoint :)
98 | }
99 |
100 | // fetch comment
101 | function getComment(postId) {
102 | item.module.getComments(
103 | postId,
104 | function (result) {
105 | var data = result;
106 | if (data.found > 0) {
107 |
108 | var comments = '';
109 |
110 | for (var i = 0; i < data.comments.length; i++) {
111 | comments += '';
112 | comments += data.comments[i].content + '
';
113 | comments += '
Posted by ' + data.comments[i].author.name + ' ';
114 | comments += getDateDifference(data.comments[i].date) + ' ago
';
115 | }
116 |
117 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector('.comment'), comments);
118 | }
119 | else
120 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector('.comment'), '');
121 | },
122 | function () {
123 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector('.comment'), 'Error in fetching comments');
124 | },
125 | function () {
126 | }
127 | );
128 | }
129 |
130 | function getDateDifference(lsPostDateString) {
131 | // Expected Format:
132 | // 0123456789012345678
133 | // 2012-10-26 07:49:03
134 | var year = lsPostDateString.substring(0, 4);
135 | var month = parseInt(lsPostDateString.substring(5, 7)) - 1; // month starts from 0 to 11
136 | var day = lsPostDateString.substring(8, 10);
137 | var hour = lsPostDateString.substring(11, 13);
138 | var minute = lsPostDateString.substring(14, 16);
139 | var milli = lsPostDateString.substring(17, 19);
140 | return ideaPress.timeSince(new Date(year, month, day, hour, minute, milli, 0));
141 | }
142 |
143 | function viewBlog() {
144 | if (WinJS.Utilities.hasClass(document.querySelector("button#viewblog"), 'open-in-browser'))
145 | top.location.href = item.permalink;
146 | else
147 | ideaPress.renderIframeView(item.permalink);
148 | }
149 |
150 | function updateLayout(element, viewState) {
151 | if (viewState == Windows.UI.ViewManagement.ApplicationViewState.snapped) {
152 | var backlink = document.getElementById("backlink");
153 | if (backlink) {
154 | backlink.click();
155 | }
156 | }
157 | }
158 |
159 | // Update the behavior of the app button
160 | function updateButton(isBookmarked) {
161 | var likeButton = document.getElementById('like');
162 |
163 | if (!isBookmarked) {
164 | WinJS.Utilities.removeClass(likeButton, "selected");
165 | likeButton.onmouseover = "";
166 | likeButton.onmouseout = "";
167 |
168 | likeButton.getElementsByClassName('win-label').item(0).innerText = "Bookmark";
169 | }
170 | else {
171 | likeButton.getElementsByClassName('win-label').item(0).innerText = "Bookmarked";
172 | WinJS.Utilities.addClass(likeButton, "selected");
173 | likeButton.onmouseover = function() {
174 | likeButton.getElementsByClassName('win-label').item(0).innerText = "Unbookmark";
175 | };
176 | likeButton.onmouseout = function() {
177 | likeButton.getElementsByClassName('win-label').item(0).innerText = "Bookmarked";
178 | };
179 | }
180 | }
181 | function clone(obj) {
182 | if (!obj || "object" !== typeof obj) return obj;
183 | var copy = obj.constructor();
184 | for (var attr in obj) {
185 | if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr];
186 | }
187 | return copy;
188 | }
189 |
190 | function bookmarkClick() {
191 | var isBookmarked = item.module.checkIsBookmarked(item.id);
192 | if (!isBookmarked) {
193 | var copyItem = clone(item);
194 | item.module.addBookmark(copyItem);
195 | updateButton(true);
196 | }
197 | else {
198 | item.module.removeBookmark(item.id);
199 | updateButton(false);
200 | }
201 | }
202 |
203 | // Show the flyout
204 | function showCommentFlyout() {
205 | var commentButton = document.getElementById("commentButton");
206 | document.getElementById("commentFlyout").winControl.show(commentButton);
207 | // Clear the results text
208 | document.getElementById('comments#results').innerText = "";
209 | }
210 |
211 | // Show errors if any of the text fields are not filled out when the Comment button is clicked
212 | function submitComment() {
213 | var error = false;
214 |
215 | if (document.getElementById("commentComment").value.trim() === "") {
216 | document.getElementById("commentCommentError").innerHTML = "Comment is required";
217 | document.getElementById("commentComment").focus();
218 | error = true;
219 | } else {
220 | document.getElementById("commentCommentError").innerHTML = "";
221 | }
222 |
223 | if (!error) {
224 | // I tried to access the Element in the call back method but it keeps returning null
225 | // probably the form is in another one already.
226 | var comment = document.getElementById("commentComment").value.trim();
227 |
228 | // Check to see if an access token is stored
229 | var token = ideaPress.getAccessToken();
230 | if (!token)
231 | item.module.submitCommentWithoutToken(function (t, e) {
232 | if (e) {
233 | document.getElementById('comments#results').innerText = "Error Posting Comment. " + e;
234 | }
235 | else {
236 | document.getElementById("commentFlyout").winControl.hide();
237 | submitCommentWithToken(comment, t);
238 | }
239 | }); // ReceiveToken is the function call to invoke when token retrieval is completed.
240 | else
241 | submitCommentWithToken(comment, token);
242 | }
243 | }
244 |
245 | function submitCommentWithToken(comment, token) {
246 | document.getElementById('comments#results').innerText = "Posting comment...";
247 |
248 | item.module.submitCommentWithToken(
249 | token,
250 | item.id,
251 | comment,
252 | function (result) {
253 | var data = JSON.parse(result.responseText);
254 | if (data.status === 'unapproved') {
255 | document.getElementById('comments#results').innerText = 'Comment not approved.';
256 | }
257 | else if (data.status === 'approved') {
258 | // Once it is approved, we will show the comment by fetching the existing data and append to it..
259 | var existingComment = document.querySelector('.comment').innerHTML;
260 | existingComment += '';
261 | existingComment += data.content + '
';
262 | existingComment += '
Posted by ' + data.author.name + ' ';
263 | existingComment += getDateDifference(data.date) + ' ago
';
264 |
265 | WinJS.Utilities.setInnerHTMLUnsafe(document.querySelector('.comment'), existingComment);
266 | // Clear any progress status
267 | document.getElementById('comments#results').innerText = '';
268 | }
269 | else if (data.status === 'spam') {
270 | document.getElementById('comments#results').innerText = 'Comment marked as spam.';
271 | }
272 | else if (data.status === 'trash') {
273 | document.getElementById('comments#results').innerText = 'Comment sent to trash.';
274 | }
275 | else {
276 | document.getElementById('comments#results').innerText = result.responseText;
277 | }
278 | },
279 | function (e) {
280 | document.getElementById('comments#results').innerText = "Error Posting Comment. " + e;
281 | },
282 | function () {
283 | }
284 | );
285 | }
286 |
287 | // On dismiss of the flyout, reset the fields in the flyout
288 | function onDismiss() {
289 |
290 | // Clear fields on dismiss
291 | document.getElementById("commentComment").value = "";
292 | document.getElementById("commentCommentError").innerHTML = "";
293 | }
294 |
295 | WinJS.UI.Pages.define("/modules/wordpressCom/pages/wpcom.module.detail.html", {
296 | ready: ready,
297 | updateLayout: updateLayout
298 | });
299 | })();
300 |
--------------------------------------------------------------------------------
Comments
36 | 37 |39 | 40 |