├── src
├── assets
│ ├── fonts
│ │ ├── quicksand.scss
│ │ ├── Lora
│ │ │ ├── Lora-Bold.ttf
│ │ │ ├── Lora-Italic.ttf
│ │ │ ├── Lora-Regular.ttf
│ │ │ ├── Lora-BoldItalic.ttf
│ │ │ └── SIL Open Font License.txt
│ │ ├── Raleway-Bold.ttf
│ │ ├── Raleway-Light.ttf
│ │ ├── Raleway-Regular.ttf
│ │ ├── Quicksand-Regular.otf
│ │ ├── SIL Open Font License.txt
│ │ └── Apache License.txt
│ ├── img
│ │ ├── images.jpg
│ │ ├── app_logo.png
│ │ ├── login_bg.jpeg
│ │ ├── header-author-bg.jpg
│ │ ├── header-menu-bg.jpeg
│ │ ├── placeholder-img.png
│ │ └── category
│ │ │ ├── art_img.jpeg
│ │ │ ├── science_img.jpeg
│ │ │ ├── sport_img.jpeg
│ │ │ ├── business_img.jpeg
│ │ │ ├── finances_img.jpeg
│ │ │ └── technology_img.jpg
│ └── icon
│ │ └── favicon.ico
├── pages
│ ├── bookmark
│ │ ├── bookmark.scss
│ │ ├── bookmark.html
│ │ ├── bookmark.module.ts
│ │ └── bookmark.ts
│ ├── contact
│ │ ├── contact.html
│ │ ├── contact.scss
│ │ ├── contact.module.ts
│ │ └── contact.ts
│ ├── home
│ │ ├── home.scss
│ │ ├── category-tab
│ │ │ ├── category-tab.scss
│ │ │ ├── category-tab.module.ts
│ │ │ ├── category-tab.html
│ │ │ └── category-tab.ts
│ │ ├── recent-tab
│ │ │ ├── recent-tab.scss
│ │ │ ├── recent-tab.module.ts
│ │ │ ├── recent-tab.html
│ │ │ └── recent-tab.ts
│ │ ├── home.html
│ │ ├── home.module.ts
│ │ └── home.ts
│ ├── author
│ │ ├── author.scss
│ │ ├── author.module.ts
│ │ ├── author.html
│ │ └── author.ts
│ ├── about
│ │ ├── about.scss
│ │ ├── about.module.ts
│ │ ├── about.ts
│ │ └── about.html
│ ├── register
│ │ ├── register.scss
│ │ ├── register.module.ts
│ │ ├── register.html
│ │ └── register.ts
│ ├── login
│ │ ├── login.scss
│ │ ├── login.module.ts
│ │ ├── login.html
│ │ └── login.ts
│ ├── post-list
│ │ ├── post-list.scss
│ │ ├── post-list.module.ts
│ │ ├── post-list.html
│ │ └── post-list.ts
│ ├── tag-list
│ │ ├── tag-list.scss
│ │ ├── tag-list.module.ts
│ │ ├── tag-list.html
│ │ └── tag-list.ts
│ ├── category-list
│ │ ├── category-list.scss
│ │ ├── category-list.module.ts
│ │ ├── category-list.html
│ │ └── category-list.ts
│ ├── search
│ │ ├── search.module.ts
│ │ ├── tags-tab
│ │ │ ├── tags-tab.module.ts
│ │ │ ├── tags-tab.html
│ │ │ └── tags-tab.ts
│ │ ├── authors-tab
│ │ │ ├── authors-tab.module.ts
│ │ │ ├── authors-tab.html
│ │ │ └── authors-tab.ts
│ │ ├── search.scss
│ │ ├── search.html
│ │ ├── posts-tab
│ │ │ ├── posts-tab.module.ts
│ │ │ ├── posts-tab.html
│ │ │ └── posts-tab.ts
│ │ └── search.ts
│ ├── welcome
│ │ ├── welcome.module.ts
│ │ ├── welcome.scss
│ │ ├── welcome.ts
│ │ └── welcome.html
│ ├── faq
│ │ ├── faq.module.ts
│ │ ├── faq.html
│ │ └── faq.ts
│ ├── tos
│ │ ├── tos.module.ts
│ │ ├── tos.html
│ │ └── tos.ts
│ ├── setting
│ │ ├── setting.module.ts
│ │ ├── setting.html
│ │ └── setting.ts
│ ├── comment
│ │ ├── comment.module.ts
│ │ ├── comment.scss
│ │ ├── comment.html
│ │ └── comment.ts
│ └── post-content
│ │ ├── post-content.module.ts
│ │ ├── post-content.scss
│ │ ├── post-content.html
│ │ └── post-content.ts
├── providers
│ ├── local.providers.ts
│ ├── setting.provider.ts
│ ├── storage.provider.ts
│ ├── auth.provider.ts
│ └── client.provider.ts
├── components
│ ├── post-list
│ │ ├── random-list
│ │ │ ├── random-list.html
│ │ │ ├── random-list.ts
│ │ │ └── random-list.scss
│ │ ├── big-card-list
│ │ │ ├── big-card-list.ts
│ │ │ ├── big-card-list.html
│ │ │ └── big-card-list.scss
│ │ ├── grid-list
│ │ │ ├── grid-list.ts
│ │ │ ├── grid-list.html
│ │ │ └── grid-list.scss
│ │ ├── card-list
│ │ │ ├── card-list.ts
│ │ │ ├── card-list.html
│ │ │ └── card-list.scss
│ │ ├── header-slides
│ │ │ ├── header-slides.ts
│ │ │ ├── header-slides.scss
│ │ │ └── header-slides.html
│ │ └── post-list.component.ts
│ ├── header-transparent
│ │ ├── header-transparent.html
│ │ ├── header-transparent.scss
│ │ └── header-transparent.ts
│ ├── header-author
│ │ ├── header-author.html
│ │ ├── header-author.ts
│ │ └── header-author.scss
│ ├── category-list
│ │ ├── category-thumbnail-list
│ │ │ ├── category-thumbnail-list.html
│ │ │ ├── category-thumbnail-list.ts
│ │ │ └── category-thumbnail-list.scss
│ │ └── category-list.component.ts
│ └── aeon.module.ts
├── models
│ ├── setting.model.ts
│ ├── tag.model.ts
│ ├── category.model.ts
│ ├── post.model.ts
│ └── user.model.ts
├── app
│ ├── main.ts
│ ├── app.module.ts
│ ├── app.html
│ ├── app.scss
│ └── app.component.ts
├── manifest.json
├── directives
│ ├── parallax.directive.ts
│ ├── square.directive.ts
│ └── shrink-header-title.directive.ts
├── theme
│ ├── aeon-platforms.scss
│ ├── aeon-theme.scss
│ ├── aeon-animations.scss
│ ├── aeon-components.scss
│ └── variables.scss
├── declarations.d.ts
├── constants
│ ├── endpoint.constant.ts
│ └── variables.constant.ts
├── service-worker.js
└── index.html
├── .io-config.json
├── _config.yml
├── resources
├── icon.png
├── splash.png
├── ios
│ ├── icon
│ │ ├── icon.png
│ │ ├── icon-40.png
│ │ ├── icon-50.png
│ │ ├── icon-60.png
│ │ ├── icon-72.png
│ │ ├── icon-76.png
│ │ ├── icon@2x.png
│ │ ├── icon-40@2x.png
│ │ ├── icon-40@3x.png
│ │ ├── icon-50@2x.png
│ │ ├── icon-60@2x.png
│ │ ├── icon-60@3x.png
│ │ ├── icon-72@2x.png
│ │ ├── icon-76@2x.png
│ │ ├── icon-83.5@2x.png
│ │ ├── icon-small.png
│ │ ├── icon-small@2x.png
│ │ └── icon-small@3x.png
│ └── splash
│ │ ├── Default-667h.png
│ │ ├── Default-736h.png
│ │ ├── Default~iphone.png
│ │ ├── Default@2x~iphone.png
│ │ ├── Default-568h@2x~iphone.png
│ │ ├── Default-Landscape-736h.png
│ │ ├── Default-Landscape~ipad.png
│ │ ├── Default-Portrait~ipad.png
│ │ ├── Default-Landscape@2x~ipad.png
│ │ └── Default-Portrait@2x~ipad.png
└── android
│ ├── icon
│ ├── drawable-hdpi-icon.png
│ ├── drawable-ldpi-icon.png
│ ├── drawable-mdpi-icon.png
│ ├── drawable-xhdpi-icon.png
│ ├── drawable-xxhdpi-icon.png
│ └── drawable-xxxhdpi-icon.png
│ └── splash
│ ├── drawable-land-hdpi-screen.png
│ ├── drawable-land-ldpi-screen.png
│ ├── drawable-land-mdpi-screen.png
│ ├── drawable-land-xhdpi-screen.png
│ ├── drawable-port-hdpi-screen.png
│ ├── drawable-port-ldpi-screen.png
│ ├── drawable-port-mdpi-screen.png
│ ├── drawable-port-xhdpi-screen.png
│ ├── drawable-land-xxhdpi-screen.png
│ ├── drawable-land-xxxhdpi-screen.png
│ ├── drawable-port-xxhdpi-screen.png
│ └── drawable-port-xxxhdpi-screen.png
├── ionic.config.json
├── tslint.json
├── .editorconfig
├── onesignal-filter.php
├── .gitignore
├── tsconfig.json
├── README.md
├── LICENSE
├── package.json
└── config.xml
/src/assets/fonts/quicksand.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/bookmark/bookmark.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/contact/contact.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/providers/local.providers.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/providers/setting.provider.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.io-config.json:
--------------------------------------------------------------------------------
1 | {"app_id":"c21ecdb6"}
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/src/pages/home/home.scss:
--------------------------------------------------------------------------------
1 | page-home {}
--------------------------------------------------------------------------------
/src/pages/author/author.scss:
--------------------------------------------------------------------------------
1 | page-author {}
--------------------------------------------------------------------------------
/src/pages/contact/contact.scss:
--------------------------------------------------------------------------------
1 | page-contact {}
--------------------------------------------------------------------------------
/src/components/post-list/random-list/random-list.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/home/category-tab/category-tab.scss:
--------------------------------------------------------------------------------
1 | tab-video {}
--------------------------------------------------------------------------------
/src/pages/home/recent-tab/recent-tab.scss:
--------------------------------------------------------------------------------
1 | tab-recent {}
--------------------------------------------------------------------------------
/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/icon.png
--------------------------------------------------------------------------------
/resources/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/splash.png
--------------------------------------------------------------------------------
/src/assets/img/images.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/images.jpg
--------------------------------------------------------------------------------
/src/pages/about/about.scss:
--------------------------------------------------------------------------------
1 | page-about {
2 | div.about-name {
3 | text-align: center;
4 | }
5 | }
--------------------------------------------------------------------------------
/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "WPClient2",
3 | "app_id": "c21ecdb6",
4 | "type": "ionic-angular"
5 | }
6 |
--------------------------------------------------------------------------------
/resources/ios/icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon.png
--------------------------------------------------------------------------------
/src/assets/icon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/icon/favicon.ico
--------------------------------------------------------------------------------
/src/assets/img/app_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/app_logo.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-40.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-50.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-60.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-72.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-76.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon@2x.png
--------------------------------------------------------------------------------
/src/assets/img/login_bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/login_bg.jpeg
--------------------------------------------------------------------------------
/src/models/setting.model.ts:
--------------------------------------------------------------------------------
1 | export class Setting {
2 | constructor(
3 | public pushNotification: boolean
4 | ){}
5 | }
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-40@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-40@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-50@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-60@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-60@3x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-72@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-76@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-83.5@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-small.png
--------------------------------------------------------------------------------
/src/assets/fonts/Lora/Lora-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/fonts/Lora/Lora-Bold.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Raleway-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/fonts/Raleway-Bold.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Raleway-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/fonts/Raleway-Light.ttf
--------------------------------------------------------------------------------
/src/assets/img/header-author-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/header-author-bg.jpg
--------------------------------------------------------------------------------
/src/assets/img/header-menu-bg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/header-menu-bg.jpeg
--------------------------------------------------------------------------------
/src/assets/img/placeholder-img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/placeholder-img.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-small@2x.png
--------------------------------------------------------------------------------
/resources/ios/icon/icon-small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/icon/icon-small@3x.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-667h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default-667h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default-736h.png
--------------------------------------------------------------------------------
/src/assets/fonts/Lora/Lora-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/fonts/Lora/Lora-Italic.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Raleway-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/fonts/Raleway-Regular.ttf
--------------------------------------------------------------------------------
/src/assets/img/category/art_img.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/category/art_img.jpeg
--------------------------------------------------------------------------------
/src/models/tag.model.ts:
--------------------------------------------------------------------------------
1 | export class Tag {
2 | constructor(
3 | public name: string,
4 | public count: number
5 | ){}
6 | }
--------------------------------------------------------------------------------
/resources/ios/splash/Default~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default~iphone.png
--------------------------------------------------------------------------------
/src/assets/fonts/Lora/Lora-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/fonts/Lora/Lora-Regular.ttf
--------------------------------------------------------------------------------
/src/assets/fonts/Quicksand-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/fonts/Quicksand-Regular.otf
--------------------------------------------------------------------------------
/src/assets/img/category/science_img.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/category/science_img.jpeg
--------------------------------------------------------------------------------
/src/assets/img/category/sport_img.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/category/sport_img.jpeg
--------------------------------------------------------------------------------
/resources/ios/splash/Default@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default@2x~iphone.png
--------------------------------------------------------------------------------
/src/assets/fonts/Lora/Lora-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/fonts/Lora/Lora-BoldItalic.ttf
--------------------------------------------------------------------------------
/src/assets/img/category/business_img.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/category/business_img.jpeg
--------------------------------------------------------------------------------
/src/assets/img/category/finances_img.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/category/finances_img.jpeg
--------------------------------------------------------------------------------
/src/assets/img/category/technology_img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/src/assets/img/category/technology_img.jpg
--------------------------------------------------------------------------------
/src/models/category.model.ts:
--------------------------------------------------------------------------------
1 | export class Category {
2 | constructor(
3 | public name: string,
4 | public count: number
5 | ){}
6 | }
--------------------------------------------------------------------------------
/resources/android/icon/drawable-hdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/icon/drawable-hdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-ldpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/icon/drawable-ldpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-mdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/icon/drawable-mdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/icon/drawable-xhdpi-icon.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/icon/drawable-xxhdpi-icon.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-568h@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default-568h@2x~iphone.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default-Landscape-736h.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default-Landscape~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default-Portrait~ipad.png
--------------------------------------------------------------------------------
/resources/android/icon/drawable-xxxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/icon/drawable-xxxhdpi-icon.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Landscape@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default-Landscape@2x~ipad.png
--------------------------------------------------------------------------------
/resources/ios/splash/Default-Portrait@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/ios/splash/Default-Portrait@2x~ipad.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-land-hdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-land-ldpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-land-mdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-land-xhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-port-hdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-port-ldpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-port-mdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-port-xhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-land-xxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-land-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-land-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-port-xxhdpi-screen.png
--------------------------------------------------------------------------------
/resources/android/splash/drawable-port-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rivafarabi/aeon-wordpress/master/resources/android/splash/drawable-port-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/src/pages/register/register.scss:
--------------------------------------------------------------------------------
1 | page-register {
2 | ion-content {
3 | @extend .aeon-bg-page;
4 | }
5 | ion-item {
6 | @extend .aeon-input-item;
7 | }
8 | }
--------------------------------------------------------------------------------
/src/components/header-transparent/header-transparent.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/pages/login/login.scss:
--------------------------------------------------------------------------------
1 | page-login {
2 | ion-content {
3 | @extend .aeon-bg-page;
4 | }
5 | ion-item {
6 | @extend .aeon-input-item;
7 | }
8 | a {
9 | font-weight: 700;
10 | }
11 | }
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-duplicate-variable": true,
4 | "no-unused-variable": [
5 | true
6 | ]
7 | },
8 | "rulesDirectory": [
9 | "node_modules/tslint-eslint-rules/dist/rules"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/src/pages/post-list/post-list.scss:
--------------------------------------------------------------------------------
1 | page-post-list {
2 | ion-spinner#init-spinner {
3 | position: absolute;
4 | margin: auto;
5 | top: 0;
6 | right: 0;
7 | bottom: 0;
8 | left: 0;
9 | }
10 | }
--------------------------------------------------------------------------------
/src/models/post.model.ts:
--------------------------------------------------------------------------------
1 | export class Post {
2 | constructor(
3 | public id: number,
4 | public title: any,
5 | public author: string,
6 | public date: string,
7 | public media_url: any,
8 | public content: any
9 | ){}
10 | }
--------------------------------------------------------------------------------
/src/pages/home/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/pages/tag-list/tag-list.scss:
--------------------------------------------------------------------------------
1 | page-tag-list {
2 | button {
3 | span {
4 | text-transform: uppercase;
5 | letter-spacing: 3px;
6 | }
7 | ion-note {
8 | font-weight: 700;
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/pages/category-list/category-list.scss:
--------------------------------------------------------------------------------
1 | page-category-list {
2 | button {
3 | span {
4 | text-transform: uppercase;
5 | letter-spacing: 3px;
6 | }
7 | ion-note {
8 | font-weight: 700;
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/app/main.ts:
--------------------------------------------------------------------------------
1 | import 'intersection-observer';
2 | import { enableProdMode } from '@angular/core';
3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4 |
5 | import { AppModule } from './app.module';
6 |
7 | enableProdMode();
8 | platformBrowserDynamic().bootstrapModule(AppModule);
--------------------------------------------------------------------------------
/src/pages/home/home.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { HomePage } from './home';
4 |
5 | @NgModule({
6 | declarations: [HomePage],
7 | imports: [IonicPageModule.forChild(HomePage)]
8 | })
9 | export class HomePageModule { }
--------------------------------------------------------------------------------
/src/components/header-author/header-author.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/post-list/random-list/random-list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { PostListComponent } from '../post-list.component';
3 |
4 | @Component({
5 | selector: 'random-list',
6 | templateUrl: 'random-list.html'
7 | })
8 | export class RandomListComponent extends PostListComponent {}
--------------------------------------------------------------------------------
/src/pages/about/about.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { AboutPage } from './about';
4 |
5 | @NgModule({
6 | declarations: [AboutPage],
7 | imports: [IonicPageModule.forChild(AboutPage)]
8 | })
9 | export class AboutPageModule { }
--------------------------------------------------------------------------------
/src/components/post-list/big-card-list/big-card-list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { PostListComponent } from '../post-list.component';
3 |
4 | @Component({
5 | selector: 'big-card-list',
6 | templateUrl: 'big-card-list.html'
7 | })
8 | export class BigCardList extends PostListComponent {}
--------------------------------------------------------------------------------
/src/pages/search/search.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { SearchPage } from './search';
4 |
5 | @NgModule({
6 | declarations: [SearchPage],
7 | imports: [IonicPageModule.forChild(SearchPage)]
8 | })
9 | export class SearchPageModule { }
--------------------------------------------------------------------------------
/src/pages/welcome/welcome.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { WelcomePage } from './welcome';
4 |
5 | @NgModule({
6 | declarations: [WelcomePage],
7 | imports: [IonicPageModule.forChild(WelcomePage)]
8 | })
9 | export class WelcomePageModule { }
--------------------------------------------------------------------------------
/src/pages/contact/contact.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { ContactPage } from './contact';
4 |
5 | @NgModule({
6 | declarations: [ContactPage],
7 | imports: [IonicPageModule.forChild(ContactPage)]
8 | })
9 | export class CommentListPageModule { }
--------------------------------------------------------------------------------
/src/pages/tag-list/tag-list.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { TagListPage } from './tag-list';
4 |
5 | @NgModule({
6 | declarations: [TagListPage],
7 | imports: [IonicPageModule.forChild(TagListPage)]
8 | })
9 | export class TagListPageModule { }
--------------------------------------------------------------------------------
/src/pages/search/tags-tab/tags-tab.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { TagsTabPage } from './tags-tab';
4 |
5 | @NgModule({
6 | declarations: [TagsTabPage],
7 | imports: [IonicPageModule.forChild(TagsTabPage)]
8 | })
9 | export class TagsTabPageModule { }
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Ionic",
3 | "short_name": "Ionic",
4 | "start_url": "index.html",
5 | "display": "standalone",
6 | "icons": [{
7 | "src": "assets/imgs/logo.png",
8 | "sizes": "512x512",
9 | "type": "image/png"
10 | }],
11 | "background_color": "#4e8ef7",
12 | "theme_color": "#4e8ef7"
13 | }
--------------------------------------------------------------------------------
/src/pages/faq/faq.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { FaqModal } from './faq';
4 |
5 | @NgModule({
6 | declarations: [FaqModal],
7 | imports: [IonicPageModule.forChild(FaqModal)],
8 | exports: [FaqModal]
9 | })
10 | export class FaqModalModule { }
--------------------------------------------------------------------------------
/src/pages/tos/tos.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { TosModal } from './tos';
4 |
5 | @NgModule({
6 | declarations: [TosModal],
7 | imports: [IonicPageModule.forChild(TosModal)],
8 | exports: [TosModal]
9 | })
10 | export class TosModalModule { }
--------------------------------------------------------------------------------
/src/pages/search/authors-tab/authors-tab.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { AuthorsTabPage } from './authors-tab';
4 |
5 | @NgModule({
6 | declarations: [AuthorsTabPage],
7 | imports: [IonicPageModule.forChild(AuthorsTabPage)]
8 | })
9 | export class AuthorsTabPageModule { }
--------------------------------------------------------------------------------
/src/components/post-list/grid-list/grid-list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { SquareDirective } from '../directive/square.directive';
3 | import { PostListComponent } from '../post-list.component';
4 |
5 | @Component({
6 | selector: 'grid-list',
7 | templateUrl: 'grid-list.html'
8 | })
9 | export class GridList extends PostListComponent {}
--------------------------------------------------------------------------------
/src/directives/parallax.directive.ts:
--------------------------------------------------------------------------------
1 |
2 | import { Directive, ElementRef } from '@angular/core';
3 |
4 | @Directive({
5 | selector: '[parallax]'
6 | })
7 | export class ParallaxDirective {
8 | constructor(private el: ElementRef) { }
9 | private highlight(color: string) {
10 | this.el.nativeElement.style.backgroundColor = color;
11 | }
12 | }
--------------------------------------------------------------------------------
/src/pages/category-list/category-list.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { CategoryListPage } from './category-list';
4 |
5 | @NgModule({
6 | declarations: [CategoryListPage],
7 | imports: [IonicPageModule.forChild(CategoryListPage)]
8 | })
9 | export class CategoryListPageModule { }
--------------------------------------------------------------------------------
/src/directives/square.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive, ElementRef, Input } from '@angular/core';
2 |
3 | @Directive({ selector: '[square]' })
4 | export class SquareDirective {
5 | constructor(private el: ElementRef) {
6 | }
7 |
8 | ngAfterViewInit() {
9 | this.el.nativeElement.style.height = this.el.nativeElement.offsetWidth + "px";
10 | }
11 | }
--------------------------------------------------------------------------------
/src/theme/aeon-platforms.scss:
--------------------------------------------------------------------------------
1 | ///Aeon Android Specific Style///
2 | .platform-android5,
3 | .platform-android6,
4 | .platform-android7 {
5 | ion-header {
6 | background-color: color($colors, primary, base);
7 | ion-navbar {
8 | margin-top: 24px;
9 | }
10 | }
11 | ion-content {
12 | margin-top: 0px;
13 | }
14 | }
--------------------------------------------------------------------------------
/src/components/category-list/category-thumbnail-list/category-thumbnail-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/models/user.model.ts:
--------------------------------------------------------------------------------
1 | export class Login {
2 | constructor(
3 | public username: string,
4 | public password: string
5 | ){}
6 | }
7 |
8 | export class Register {
9 | constructor(
10 | public username: string,
11 | public firstname: string,
12 | public lastname: string,
13 | public email: string,
14 | public password: string
15 | ){}
16 | }
--------------------------------------------------------------------------------
/src/pages/welcome/welcome.scss:
--------------------------------------------------------------------------------
1 | page-welcome {
2 | background-color: color($colors, primary, base);
3 | .slide-zoom {
4 | height: 80%;
5 | }
6 | ion-card {
7 | height: 80%;
8 | width: 80% !important;
9 | margin: auto !important;
10 | }
11 | ion-buttons {
12 | button {
13 | font-weight: 700 !important;
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/pages/faq/faq.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | FAQs
4 |
5 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/components/post-list/card-list/card-list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { SlicePipe } from '@angular/common';
3 | import { PostListComponent } from '../post-list.component';
4 | import { ViewportModule } from 'angular2-viewport';
5 |
6 | @Component({
7 | selector: 'card-list',
8 | templateUrl: 'card-list.html'
9 | })
10 | export class CardList extends PostListComponent {
11 | }
--------------------------------------------------------------------------------
/src/pages/search/search.scss:
--------------------------------------------------------------------------------
1 | page-post-tab {
2 | ion-spinner#init-spinner {
3 | position: absolute;
4 | margin: auto;
5 | top: 0;
6 | right: 0;
7 | bottom: 0;
8 | left: 0;
9 | }
10 | }
11 |
12 | page-posts-tab,
13 | page-authors-tab,
14 | page-tags-tab {
15 | ion-navbar.show-back-button .back-button {
16 | display: inline-block;
17 | }
18 | }
--------------------------------------------------------------------------------
/src/pages/setting/setting.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { SettingPage } from './setting';
4 |
5 | @NgModule({
6 | declarations: [SettingPage],
7 | imports: [
8 | IonicPageModule.forChild(SettingPage),
9 | ],
10 | exports: [
11 | SettingPage
12 | ]
13 | })
14 | export class SettingPageModule { }
--------------------------------------------------------------------------------
/src/pages/tos/tos.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Term of Service
4 |
5 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/pages/tos/tos.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, ViewController } from 'ionic-angular';
3 | @IonicPage()
4 | @Component({
5 | selector: 'modal-tos',
6 | templateUrl: 'tos.html'
7 | })
8 | export class TosModal {
9 |
10 | constructor(
11 | private viewCtrl: ViewController
12 | ) { }
13 |
14 | dismiss() {
15 | this.viewCtrl.dismiss();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/pages/bookmark/bookmark.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bookmark
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/pages/login/login.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { LoginPage } from './login';
4 | import { AeonModule } from '../../components/aeon.module';
5 |
6 | @NgModule({
7 | declarations: [LoginPage],
8 | imports: [
9 | IonicPageModule.forChild(LoginPage),
10 | AeonModule
11 | ]
12 | })
13 | export class LoginPageModule { }
--------------------------------------------------------------------------------
/src/pages/faq/faq.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, ViewController } from 'ionic-angular';
3 |
4 | @IonicPage()
5 | @Component({
6 | selector: 'modal-faq',
7 | templateUrl: 'faq.html'
8 | })
9 | export class FaqModal {
10 |
11 | constructor(
12 | private viewCtrl: ViewController
13 | ) { }
14 |
15 | dismiss() {
16 | this.viewCtrl.dismiss();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | indent_style = space
8 | indent_size = 2
9 |
10 | # We recommend you to keep these unchanged
11 | end_of_line = lf
12 | charset = utf-8
13 | trim_trailing_whitespace = true
14 | insert_final_newline = true
15 |
16 | [*.md]
17 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/src/components/category-list/category-thumbnail-list/category-thumbnail-list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { SquareDirective } from '../directive/square.directive';
3 | import { CategoryListComponent } from '../category-list.component';
4 |
5 | @Component({
6 | selector: 'category-thumbnail-list',
7 | templateUrl: 'category-thumbnail-list.html'
8 | })
9 | export class CategoryThumbnailList extends CategoryListComponent {}
--------------------------------------------------------------------------------
/src/pages/register/register.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { RegisterPage } from './register';
4 | import { AeonModule } from '../../components/aeon.module';
5 |
6 | @NgModule({
7 | declarations: [RegisterPage],
8 | imports: [
9 | IonicPageModule.forChild(RegisterPage),
10 | AeonModule
11 | ]
12 | })
13 | export class RegisterPageModule { }
--------------------------------------------------------------------------------
/onesignal-filter.php:
--------------------------------------------------------------------------------
1 | $fields['id'],
10 | "myappurl" => $fields['url']
11 | );
12 | unset($fields['url']);
13 | return $fields;
14 | }
--------------------------------------------------------------------------------
/src/pages/search/search.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/pages/comment/comment.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { CommentModal } from './comment';
4 | import { MomentModule } from 'angular2-moment';
5 |
6 | @NgModule({
7 | declarations: [
8 | CommentModal
9 | ],
10 | imports: [
11 | IonicPageModule.forChild(CommentModal),
12 | MomentModule
13 | ],
14 | exports: [CommentModal]
15 | })
16 | export class CommentModalModule { }
--------------------------------------------------------------------------------
/src/pages/about/about.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, ModalController } from 'ionic-angular';
3 |
4 | @IonicPage()
5 | @Component({
6 | selector: 'page-about',
7 | templateUrl: 'about.html'
8 | })
9 | export class AboutPage {
10 | constructor(private modalCtrl: ModalController) {
11 | }
12 |
13 | openModal(modalName: string) {
14 | let modal = this.modalCtrl.create(modalName);
15 | modal.present();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/components/header-author/header-author.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter, ElementRef, Renderer, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'header-author',
5 | templateUrl: 'header-author.html'
6 | })
7 | export class HeaderAuthor implements OnInit {
8 | @Input('authorImg') img: any;
9 | @Input('authorName') name: number;
10 |
11 | constructor(private el: ElementRef, private renderer: Renderer) { }
12 |
13 | ngOnInit() {
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/src/components/post-list/header-slides/header-slides.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
2 | import { ImgLoader } from 'ionic-image-loader';
3 | import { ImageLoaderConfig } from 'ionic-image-loader';
4 | import { MomentModule } from 'angular2-moment';
5 | import { PostListComponent } from '../post-list.component';
6 |
7 | @Component({
8 | selector: 'header-slides',
9 | templateUrl: 'header-slides.html'
10 | })
11 | export class HeaderSlides extends PostListComponent {
12 | }
--------------------------------------------------------------------------------
/src/components/category-list/category-thumbnail-list/category-thumbnail-list.scss:
--------------------------------------------------------------------------------
1 | category-thumbnail-list {
2 | ion-grid,
3 | ion-row,
4 | ion-col,
5 | ion-card {
6 | margin: 0 !important;
7 | padding: 0 !important;
8 | }
9 | img {
10 | height: 100%;
11 | -webkit-filter: brightness(80%);
12 | }
13 | p {
14 | margin: 0 3px;
15 | position: absolute;
16 | bottom: 0;
17 | color: white !important;
18 | font-weight: 700 !important;
19 | font-size: 36px !important;
20 | }
21 | }
--------------------------------------------------------------------------------
/src/pages/bookmark/bookmark.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { BookmarkPage } from './bookmark';
4 | import { IonicImageLoader } from 'ionic-image-loader';
5 | import { AeonModule } from '../../components/aeon.module';
6 |
7 | @NgModule({
8 | declarations: [BookmarkPage],
9 | imports: [
10 | IonicPageModule.forChild(BookmarkPage),
11 | IonicImageLoader,
12 | AeonModule
13 | ],
14 | exports: [
15 | BookmarkPage
16 | ]
17 | })
18 | export class BookmarkPageModule { }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | *.log
7 | *.tmp
8 | *.tmp.*
9 | log.txt
10 | *.sublime-project
11 | *.sublime-workspace
12 | .vscode/
13 | npm-debug.log*
14 |
15 | .idea/
16 | .sass-cache/
17 | .tmp/
18 | .versions/
19 | coverage/
20 | dist/
21 | node_modules/
22 | tmp/
23 | temp/
24 | hooks/
25 | platforms/
26 | plugins/
27 | plugins/android.json
28 | plugins/ios.json
29 | www/
30 | $RECYCLE.BIN/
31 |
32 | .DS_Store
33 | Thumbs.db
34 | UserInterfaceState.xcuserstate
35 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowSyntheticDefaultImports": true,
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "lib": [
8 | "dom",
9 | "es2015"
10 | ],
11 | "module": "es2015",
12 | "moduleResolution": "node",
13 | "sourceMap": true,
14 | "target": "es5"
15 | },
16 | "include": [
17 | "src/**/*.ts"
18 | ],
19 | "exclude": [
20 | "node_modules"
21 | ],
22 | "compileOnSave": false,
23 | "atom": {
24 | "rewriteTsconfig": false
25 | }
26 | }
--------------------------------------------------------------------------------
/src/pages/author/author.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { AuthorPage } from './author';
4 | import { IonicImageLoader } from 'ionic-image-loader';
5 | import { MomentModule } from 'angular2-moment';
6 | import { AeonModule } from '../../components/aeon.module';
7 |
8 | @NgModule({
9 | declarations: [
10 | AuthorPage
11 | ],
12 | imports: [
13 | IonicPageModule.forChild(AuthorPage),
14 | AeonModule,
15 | IonicImageLoader,
16 | MomentModule
17 | ],
18 | exports: [
19 | AuthorPage
20 | ]
21 | })
22 | export class AuthorPageModule { }
--------------------------------------------------------------------------------
/src/pages/post-content/post-content.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { PostContentPage } from './post-content';
4 | import { IonicImageLoader } from 'ionic-image-loader';
5 | import { MomentModule } from 'angular2-moment';
6 | import { AeonModule } from '../../components/aeon.module';
7 |
8 | @NgModule({
9 | declarations: [PostContentPage],
10 | imports: [
11 | IonicPageModule.forChild(PostContentPage),
12 | IonicImageLoader,
13 | MomentModule,
14 | AeonModule
15 | ],
16 | exports: [PostContentPage]
17 | })
18 | export class PostContentPageModule { }
--------------------------------------------------------------------------------
/src/pages/post-list/post-list.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { PostListPage } from './post-list';
4 | import { IonicImageLoader } from 'ionic-image-loader';
5 | import { MomentModule } from 'angular2-moment';
6 | import { AeonModule } from '../../components/aeon.module';
7 |
8 |
9 | @NgModule({
10 | declarations: [PostListPage],
11 | imports: [
12 | IonicPageModule.forChild(PostListPage),
13 | AeonModule,
14 | IonicImageLoader,
15 | MomentModule
16 | ],
17 | exports: [
18 | PostListPage
19 | ]
20 | })
21 | export class PostListPageModule { }
--------------------------------------------------------------------------------
/src/pages/search/posts-tab/posts-tab.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { PostsTabPage } from './posts-tab';
4 | import { IonicImageLoader } from 'ionic-image-loader';
5 | import { MomentModule } from 'angular2-moment';
6 | import { AeonModule } from '../../../components/aeon.module';
7 |
8 | @NgModule({
9 | declarations: [PostsTabPage],
10 | imports: [
11 | IonicPageModule.forChild(PostsTabPage),
12 | AeonModule,
13 | IonicImageLoader,
14 | MomentModule
15 | ],
16 | exports: [
17 | PostsTabPage
18 | ]
19 | })
20 | export class PostsTabPageModule { }
--------------------------------------------------------------------------------
/src/pages/home/recent-tab/recent-tab.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { RecentTabPage } from './recent-tab';
4 | import { IonicImageLoader } from 'ionic-image-loader';
5 | import { MomentModule } from 'angular2-moment';
6 | import { AeonModule } from '../../../components/aeon.module';
7 |
8 | @NgModule({
9 | declarations: [
10 | RecentTabPage
11 | ],
12 | imports: [
13 | IonicPageModule.forChild(RecentTabPage),
14 | IonicImageLoader,
15 | MomentModule,
16 | AeonModule
17 | ],
18 | exports: [
19 | RecentTabPage
20 | ]
21 | })
22 | export class HomePageModule { }
--------------------------------------------------------------------------------
/src/pages/tag-list/tag-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Tags
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/pages/home/category-tab/category-tab.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { IonicPageModule } from 'ionic-angular';
3 | import { CategoryTabPage } from './category-tab';
4 | import { IonicImageLoader } from 'ionic-image-loader';
5 | import { MomentModule } from 'angular2-moment';
6 | import { AeonModule } from '../../../components/aeon.module';
7 |
8 | @NgModule({
9 | declarations: [
10 | CategoryTabPage
11 | ],
12 | imports: [
13 | IonicPageModule.forChild(CategoryTabPage),
14 | IonicImageLoader,
15 | MomentModule,
16 | AeonModule
17 | ],
18 | exports: [
19 | CategoryTabPage
20 | ]
21 | })
22 | export class HomePageModule { }
--------------------------------------------------------------------------------
/src/pages/welcome/welcome.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { IonicPage, NavController, Slides } from 'ionic-angular';
3 | import { Storage } from '@ionic/storage';
4 |
5 | @IonicPage()
6 | @Component({
7 | selector: 'page-welcome',
8 | templateUrl: 'welcome.html'
9 | })
10 | export class WelcomePage {
11 | @ViewChild(Slides) slides: Slides;
12 | constructor(
13 | public navCtrl: NavController,
14 | private storage: Storage
15 | ) {}
16 |
17 | next() {
18 | this.slides.slideNext();
19 | }
20 |
21 | skip() {
22 | this.storage.set('isInit', true);
23 | this.navCtrl.setRoot("HomePage");
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/pages/setting/setting.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Settings
5 |
6 |
7 |
8 |
9 | Options
10 |
11 |
12 | Push Notification
13 |
14 |
15 |
16 | Account
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/pages/category-list/category-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Categories
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/declarations.d.ts:
--------------------------------------------------------------------------------
1 | /*
2 | Declaration files are how the Typescript compiler knows about the type information(or shape) of an object.
3 | They're what make intellisense work and make Typescript know all about your code.
4 |
5 | A wildcard module is declared below to allow third party libraries to be used in an app even if they don't
6 | provide their own type declarations.
7 |
8 | To learn more about using third party libraries in an Ionic app, check out the docs here:
9 | http://ionicframework.com/docs/v2/resources/third-party-libs/
10 |
11 | For more info on type definition files, check out the Typescript docs here:
12 | https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html
13 | */
14 | declare module '*';
--------------------------------------------------------------------------------
/src/pages/about/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | About
5 |
6 |
7 |
8 |
9 |

10 |
Aion Wordpress Demo
11 |
Riva Farabi
12 |
2017
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/pages/home/home.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, NavController, NavParams } from 'ionic-angular';
3 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
4 | import 'rxjs/Rx'
5 |
6 | import { ClientProvider } from '../../providers/client.provider';
7 |
8 | @IonicPage()
9 | @Component({
10 | selector: 'page-home',
11 | templateUrl: 'home.html',
12 | providers: [ClientProvider]
13 | })
14 | export class HomePage {
15 | tab1Root = "RecentTabPage";
16 | tab2Root = "CategoryTabPage";
17 | tab3Root = "PhotoTabPage";
18 | searchParams : any;
19 | constructor(public navParams: NavParams) {
20 | this.searchParams = {
21 | name: this.navParams.get('name')
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/pages/search/search.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, NavController, NavParams } from 'ionic-angular';
3 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
4 | import 'rxjs/Rx'
5 |
6 | import { ClientProvider } from '../../providers/client.provider';
7 |
8 | @IonicPage()
9 | @Component({
10 | selector: 'page-search',
11 | templateUrl: 'search.html',
12 | providers: [ClientProvider]
13 | })
14 | export class SearchPage {
15 | tab1Root = "PostsTabPage";
16 | tab2Root = "AuthorsTabPage";
17 | tab3Root = "TagsTabPage";
18 | searchParams : any;
19 | constructor(public navParams: NavParams) {
20 | this.searchParams = {
21 | name: this.navParams.get('name')
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/components/category-list/category-list.component.ts:
--------------------------------------------------------------------------------
1 |
2 | import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
3 | import { ImgLoader } from 'ionic-image-loader';
4 | import { ImageLoaderConfig } from 'ionic-image-loader';
5 | import { MomentModule } from 'angular2-moment';
6 |
7 | @Component({})
8 | export class CategoryListComponent {
9 | @Input('categoryList') categories: any;
10 | @Output() itemTap: EventEmitter = new EventEmitter();
11 |
12 | constructor(private imageLoaderConfig: ImageLoaderConfig) {
13 | imageLoaderConfig.enableSpinner(false);
14 | }
15 |
16 | categoryNav(categoryId, categoryName) {
17 | this.itemTap.emit({
18 | id: categoryId,
19 | name: categoryName
20 | });
21 | }
22 | }
--------------------------------------------------------------------------------
/src/components/header-transparent/header-transparent.scss:
--------------------------------------------------------------------------------
1 | header-transparent {
2 | .header-md.transparent::after,
3 | .header-ios.transparent::after {
4 | background: transparent;
5 | background-image: none
6 | }
7 | ion-header {
8 | background: transparent !important;
9 | }
10 | .toolbar-background.toolbar-background-md,
11 | .toolbar-background.toolbar-background-ios,
12 | .toolbar-background.toolbar-background-wp {
13 | background: transparent;
14 | border: none;
15 | }
16 | .show-header {
17 | transition: background 0.5s ease;
18 | background: color($colors, primary, base) !important;
19 | }
20 | .hide-header {
21 | transition: background 0.5s ease;
22 | background: transparent !important;
23 | }
24 | }
--------------------------------------------------------------------------------
/src/constants/endpoint.constant.ts:
--------------------------------------------------------------------------------
1 | // const WP_URL = "https://aeon-wp.000webhostapp.com";
2 | const WP_URL = "https://aeon-wp.000webhostapp.com/";
3 |
4 | export const WP_API = {
5 | GET_POSTS : `${WP_URL}/wp-json/wp/v2/posts`,
6 | GET_CATEGORIES : `${WP_URL}/wp-json/wp/v2/categories/`,
7 | GET_TAGS : `${WP_URL}/wp-json/wp/v2/tags/`,
8 | GET_PAGES : `${WP_URL}/wp-json/wp/v2/pages/`,
9 | GET_COMMENTS : `${WP_URL}/wp-json/wp/v2/comments/`,
10 | GET_MEDIA : `${WP_URL}/wp-json/wp/v2/media/`,
11 | GET_USER : `${WP_URL}/wp-json/wp/v2/users/`,
12 | POST_COMMENTS : `${WP_URL}/wp-json/wp/v2/comments`,
13 | }
14 |
15 | export const WP_USER = {
16 | REGISTER : `${WP_URL}/wp-json/wp/v2/users/`,
17 | GET_TOKEN : `${WP_URL}/wp-json/jwt-auth/v1/token`,
18 | VALIDATE: `${WP_URL}/wp-json/jwt-auth/v1/token/validate`
19 | }
--------------------------------------------------------------------------------
/src/pages/home/category-tab/category-tab.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Category
5 |
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/service-worker.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Check out https://googlechrome.github.io/sw-toolbox/docs/master/index.html for
3 | * more info on how to use sw-toolbox to custom configure your service worker.
4 | */
5 |
6 |
7 | 'use strict';
8 | importScripts('./build/sw-toolbox.js');
9 |
10 | self.toolbox.options.cache = {
11 | name: 'ionic-cache'
12 | };
13 |
14 | // pre-cache our key assets
15 | self.toolbox.precache(
16 | [
17 | './build/main.js',
18 | './build/main.css',
19 | './build/polyfills.js',
20 | 'index.html',
21 | 'manifest.json'
22 | ]
23 | );
24 |
25 | // dynamically cache any other local assets
26 | self.toolbox.router.any('/*', self.toolbox.cacheFirst);
27 |
28 | // for any other requests go to the network, cache,
29 | // and then only use that cached resource if your user goes offline
30 | self.toolbox.router.default = self.toolbox.networkFirst;
--------------------------------------------------------------------------------
/src/components/header-author/header-author.scss:
--------------------------------------------------------------------------------
1 | header-author {
2 | div.header-container {
3 | padding: 100px 16px 60px 16px;
4 | position: relative;
5 | top: -16px;
6 | left: -16px;
7 | width: calc(100% + 32px);
8 | height: 300px;
9 | text-align: center;
10 | div.header-bg {
11 | background-image: url('../assets/img/header-author-bg.jpg');
12 | position: absolute;
13 | left: 0;
14 | top: 0;
15 | height: 100%;
16 | width: 100%;
17 | background-size: cover;
18 | -webkit-filter: brightness(50%);
19 | }
20 | div.header-content {
21 | position: relative;
22 | img.author-thumbnail {
23 | height: 100px;
24 | width: 100px;
25 | background-color: #fff;
26 | border-radius: 50px;
27 | }
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/pages/search/tags-tab/tags-tab.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Search for: {{pageTitle}}
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RWL5M8UDP5ZU8)
2 |
3 | # Aeon-Wordpress
4 | Aeon Wordpress - Ionic 3 Wordpress Client
5 | Ver 0.1 Beta
6 |
7 | ## Features
8 |
9 | - Resposive layout
10 | - User login and register
11 | - Push notification
12 | - Comment section
13 | - Bookmark
14 | - Posts, authors, and tags search
15 |
16 | ## Requirement
17 |
18 | - Wordpress site with WP REST API V2 enabled.
19 | - Wordpress plugins
20 | * Better REST API Featured Images
21 | * Category and Taxonomy Image
22 | * JWT Authentication for WP-API
23 | * WP REST API - Pure Taxonomies
24 | * WP REST API - filter fields
25 |
26 | ## Installation
27 |
28 | Clone the project to your folder
29 | ````
30 | git clone https://github.com/rivafarabi/aeon-wordpress my-wordpress-app
31 | ````
32 |
33 | Set `WP_URL` with your Wordpress website URL in src/constants/endpoint.constant.ts
34 | ````
35 | const WP_URL = "https://YOUR-WORDPRESS-SITE.com/";
36 | ````
37 | Use `ionic serve` to start a local dev server for app testing.
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/pages/search/posts-tab/posts-tab.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Search for: {{pageTitle}}
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Riva Farabi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/pages/setting/setting.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, ModalController } from 'ionic-angular';
3 | import { OneSignal } from '@ionic-native/onesignal';
4 | import { Setting } from '../../models/setting.model';
5 |
6 | @IonicPage()
7 | @Component({
8 | selector: 'page-setting',
9 | templateUrl: 'setting.html'
10 | })
11 | export class SettingPage {
12 | setting: Setting = new Setting(true);
13 | constructor(
14 | private modalCtrl: ModalController,
15 | private oneSignal: OneSignal
16 | ) { }
17 |
18 | ngOnInit(){
19 | //Check if push notification is enabled.
20 | }
21 |
22 | togglePushNotification(){
23 | if(this.setting.pushNotification){
24 | this.oneSignal.setSubscription(false);
25 | this.setting.pushNotification = false;
26 | } else{
27 | this.oneSignal.setSubscription(true);
28 | this.setting.pushNotification = true;
29 | }
30 | }
31 |
32 | openModal(modalName: string){
33 | let modal = this.modalCtrl.create(modalName);
34 | modal.present();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/theme/aeon-theme.scss:
--------------------------------------------------------------------------------
1 | // Grid List Component
2 | $grid-list-margin: 0px;
3 | $grid-list-radius: 0px;
4 | $grid-list-category-font-size: 0.9rem;
5 | $grid-list-category-spacing: 2px;
6 | $grid-list-title-font-size: 1em;
7 | $grid-list-date-font-size: 0.8em;
8 | // Card List Component
9 | $card-list-height: 120px;
10 | $card-list-content-padding: 5px 13px;
11 | $card-list-image-height: 120px;
12 | $card-list-image-height-md: 150px;
13 | $card-list-title-font-size: 1.5rem;
14 | $card-list-title-font-size-md: 1.3rem;
15 | $card-list-date-font-size: 1.2rem;
16 | $card-list-date-margin: 10px 18px;
17 | $card-list-no-image-title-font-size: 1.9rem;
18 | $card-list-no-image-title-font-size-md: 2rem;
19 | // Card List Component
20 | $big-card-list-radius: 4px;
21 | $big-card-list-height: 100px;
22 | $big-card-list-content-padding: 5px 13px;
23 | $big-card-list-image-height: 200px;
24 | $big-card-list-image-height-md: 200px;
25 | $big-card-list-title-font-size: 1.8rem;
26 | $big-card-list-title-font-size-md: 2rem;
27 | $big-card-list-date-font-size: 1.2rem;
28 | $big-card-list-date-margin: 3px 18px;
29 | // Header Slides Component
30 | $header-slides-height: 300px;
31 | $header-slides-subheader: 14px;
--------------------------------------------------------------------------------
/src/components/post-list/grid-list/grid-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{item.date | amCalendar: { sameDay: '[Today]', lastDay: '[Yesterday]', lastWeek: '[last] dddd', sameElse: 'MMMM DD, YYYY'} }}
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/constants/variables.constant.ts:
--------------------------------------------------------------------------------
1 | export const OneSignalConst = {
2 | APP_ID : "7c56563e-57fb-49bb-ad7b-752087c3c8bc", /*"YOUR_APP_ID";*/
3 | GOOGLE_PROJECT_ID : "613293614430" /*"YOUR_GOOGLE_PROJECT_ID";*/
4 | }
5 |
6 | export const AdMobConst = {
7 | GOOGLE_AD_ID : "",
8 | IOS_AD_ID : ""
9 | }
10 |
11 | export const GoogleMapsConst = {
12 |
13 | }
14 |
15 | export const CategoryConst = [
16 | {
17 | id: 4,
18 | name: 'Business',
19 | thumbnail: 'assets/img/category/business_img.jpeg'
20 | },
21 | {
22 | id: 7,
23 | name: 'Events',
24 | thumbnail: 'assets/img/category/art_img.jpeg'
25 | },
26 | {
27 | id: 5,
28 | name: 'Finances',
29 | thumbnail: 'assets/img/category/finances_img.jpeg'
30 | },
31 | {
32 | id: 2,
33 | name: 'Science',
34 | thumbnail: 'assets/img/category/science_img.jpeg'
35 | },
36 | {
37 | id: 6,
38 | name: 'Sport',
39 | thumbnail: 'assets/img/category/sport_img.jpeg'
40 | },
41 | {
42 | id: 3,
43 | name: 'Technology',
44 | thumbnail: 'assets/img/category/technology_img.jpg'
45 | }
46 | ]
--------------------------------------------------------------------------------
/src/pages/search/authors-tab/authors-tab.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Search for: {{pageTitle}}
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/pages/welcome/welcome.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HELLO!
5 |
6 | Explore your wordpress articles on the go!
7 |
8 |
9 |
10 | HELLO!
11 |
12 | Comment, share, and love your favorite post!
13 |
14 |
15 |
16 | HELLO!
17 |
18 | Now enjoy the demo!
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
32 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/pages/login/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
28 |
--------------------------------------------------------------------------------
/src/theme/aeon-animations.scss:
--------------------------------------------------------------------------------
1 | ///Scroll Reveal Animation
2 | ///Fade Animation
3 | .fade-reveal {
4 | &.fade-active {
5 | opacity: 1 !important;
6 | transition: all 1.0s ease !important;
7 | }
8 | &.fade-inactive {
9 | opacity: 0 !important;
10 | transition: all 1.0s ease !important;
11 | }
12 | }
13 |
14 | //Zoom Animation
15 | .zoom-reveal {
16 | &.zoom-active {
17 | transform: scale(1);
18 | transition: all 0.5s ease !important;
19 | }
20 | &.zoom-inactive {
21 | transform: scale(0);
22 | transition: all 0.5s ease !important;
23 | }
24 | }
25 |
26 | //Slide Right
27 | .slide-right-reveal {
28 | &.slide-right-active {
29 | transform: translate3d(0, 0, 0);
30 | transition: all 1.0s ease !important;
31 | }
32 | &.slide-right-inactive {
33 | transform: translate3d(-150px, 0, 0);
34 | transition: all 1.0s ease !important;
35 | }
36 | }
37 |
38 | //Slide Left
39 | .slide-left-reveal {
40 | &.slide-left-active {
41 | transform: translate3d(0, 0, 0);
42 | transition: all 1.0s ease !important;
43 | }
44 | &.slide-left-inactive {
45 | transform: translate3d(150px, 0, 0);
46 | transition: all 1.0s ease !important;
47 | }
48 | }
--------------------------------------------------------------------------------
/src/components/post-list/big-card-list/big-card-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.date | date:'dd'}}
10 | {{item.date | date:'MMM '}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/directives/shrink-header-title.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive, Input, Output, EventEmitter, ElementRef, OnInit } from '@angular/core';
2 |
3 | @Directive({ selector: '[shrink-header-title]' })
4 | export class ShrinkHeaderTitle implements OnInit {
5 | threshold: number;
6 | start: number = 0;
7 | slideHeaderPrevious: number = 0;
8 | headerBar: any;
9 | ionScroll: any;
10 | showHeader: boolean;
11 | hideHeader: boolean;
12 | headercontent: any;
13 | headerTitle: any;
14 | constructor(private el: ElementRef) { }
15 |
16 | ngOnInit() {
17 | this.threshold = (this.threshold != null ? this.threshold : 150);
18 | this.headerTitle = this.el.nativeElement;
19 | this.ionScroll = this.el.nativeElement.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByClassName('scroll-content')[0];
20 | this.ionScroll.addEventListener("scroll", () => {
21 | if (this.ionScroll.scrollTop - this.start > this.threshold) {
22 | this.updateHeader(this.headerTitle, true);
23 | } else {
24 | this.updateHeader(this.headerTitle, false);
25 | }
26 | this.slideHeaderPrevious = this.ionScroll.scrollTop - this.start;
27 | });
28 | }
29 |
30 | updateHeader(headerTitle: any, shrink: boolean) {
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/src/pages/author/author.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/pages/tag-list/tag-list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, NavController, NavParams } from 'ionic-angular';
3 | import 'rxjs/Rx'
4 |
5 | import { ClientProvider } from '../../providers/client.provider'
6 |
7 | @IonicPage()
8 | @Component({
9 | selector: 'page-tag-list',
10 | templateUrl: 'tag-list.html',
11 | providers: [ClientProvider]
12 | })
13 | export class TagListPage {
14 | private tags: any;
15 | private page: number;
16 |
17 | constructor(
18 | public navCtrl: NavController,
19 | public clientProvider: ClientProvider) {
20 | this.page = 1;
21 | this.fetch();
22 | }
23 |
24 | fetch() {
25 | this.clientProvider.getListTags(this.page)
26 | .subscribe(res => {
27 | this.tags = res;
28 | })
29 | }
30 |
31 | goToTag(id, name) {
32 | this.navCtrl.push(
33 | "PostListPage", {
34 | 'type': 'tags',
35 | 'id': id,
36 | 'name': name
37 | });
38 | }
39 |
40 | loadMore(infiniteScroll) {
41 | this.page++;
42 | setTimeout(() => {
43 | this.clientProvider.getListTags(this.page)
44 | .subscribe(res => {
45 | res.forEach(element => {
46 | this.tags.push(element)
47 | });
48 | infiniteScroll.complete();
49 | })
50 | }, 500)
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/src/pages/home/recent-tab/recent-tab.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Recent
5 |
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/components/header-transparent/header-transparent.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter, ElementRef, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'header-transparent',
5 | templateUrl: 'header-transparent.html'
6 | })
7 | export class HeaderTransparent implements OnInit {
8 | @Input('headerTitle') headerTitle: string;
9 | @Input('threshold') threshold: number;
10 | @Input('showMenuButton') showMenuButton: boolean;
11 |
12 | start: number = 0;
13 | slideHeaderPrevious: number = 0;
14 | headerBar: any;
15 | ionScroll: any;
16 | showHeader: boolean;
17 | hideHeader: boolean;
18 | headercontent: any;
19 |
20 | constructor(private el: ElementRef) { }
21 |
22 | ngOnInit() {
23 | this.threshold = (this.threshold != null ? this.threshold : 150);
24 | this.ionScroll = this.el.nativeElement.parentNode.getElementsByClassName('scroll-content')[0];
25 | this.ionScroll.addEventListener("scroll", () => {
26 | if (this.ionScroll.scrollTop - this.start > this.threshold) {
27 | this.showHeader = true;
28 | this.hideHeader = false;
29 | } else {
30 | this.showHeader = false;
31 | this.hideHeader = true;
32 | }
33 | this.slideHeaderPrevious = this.ionScroll.scrollTop - this.start;
34 | });
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/src/pages/post-list/post-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{pageTitle}}
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/pages/category-list/category-list.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, NavController } from 'ionic-angular';
3 | import 'rxjs/Rx'
4 |
5 | import { ClientProvider } from '../../providers/client.provider'
6 |
7 | @IonicPage()
8 | @Component({
9 | selector: 'page-category-list',
10 | templateUrl: 'category-list.html',
11 | providers: [ClientProvider]
12 | })
13 | export class CategoryListPage {
14 | private categories: any;
15 | private page: number;
16 |
17 | constructor(
18 | public navCtrl: NavController,
19 | public clientProvider: ClientProvider) {
20 | this.page = 1;
21 | this.fetch();
22 | }
23 |
24 | fetch() {
25 | this.clientProvider.getListCategories(this.page)
26 | .subscribe(res => {
27 | this.categories = res;
28 | })
29 | }
30 |
31 | goToCategory(id, name) {
32 | this.navCtrl.push(
33 | "PostListPage", {
34 | 'opt': [{
35 | 'type': 'categories',
36 | 'id': id,
37 | 'name': name
38 | }]
39 | });
40 | }
41 |
42 | loadMore(infiniteScroll) {
43 | this.page++;
44 | setTimeout(() => {
45 | this.clientProvider.getListCategories(this.page)
46 | .subscribe(res => {
47 | res.forEach(element => {
48 | this.categories.push(element)
49 | });
50 | infiniteScroll.complete();
51 | })
52 | }, 500)
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Ionic App
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/providers/storage.provider.ts:
--------------------------------------------------------------------------------
1 | import { Component, Injectable } from '@angular/core';
2 | import { Storage } from '@ionic/storage';
3 | import 'rxjs/Rx';
4 |
5 | @Injectable()
6 | export class StorageProvider {
7 | tempBookmark: any;
8 | constructor(
9 | private storage: Storage
10 | ) {
11 | }
12 |
13 | fetchBookmark() {
14 | return this.storage.get('bookmark').then((val) => {
15 | return val;
16 | })
17 | }
18 |
19 | saveBookmark(postItem: any) {
20 | let bookmark: any;
21 | return this.fetchBookmark()
22 | .then(res => {
23 | this.tempBookmark = res;
24 | bookmark = (this.tempBookmark == null ? [] : this.tempBookmark);
25 | bookmark.push(postItem);
26 | return this.storage.set('bookmark', bookmark)
27 | .then(() => {
28 | return true;
29 | })
30 | .catch(() => {
31 | return false;
32 | })
33 | })
34 | }
35 |
36 | isDuplicate(postItem: any) {
37 | let result: any;
38 | let bookmark: any;
39 | return this.fetchBookmark()
40 | .then(res => {
41 | bookmark = res.filter(item => item.id == postItem.id)[0];
42 | return bookmark;
43 | })
44 | }
45 |
46 | removeBookmark(postItem: any) {
47 | let result: any;
48 | let bookmark: any;
49 | return this.fetchBookmark()
50 | .then(res => {
51 | bookmark = res.filter(item => item.id != postItem.id);
52 | this.storage.set('bookmark', bookmark);
53 | return bookmark;
54 | })
55 | }
56 |
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/src/components/post-list/header-slides/header-slides.scss:
--------------------------------------------------------------------------------
1 | header-slides {
2 | ion-slides.featured-media {
3 | @extend .aeon-img-placeholder;
4 | position: relative;
5 | top: -16px;
6 | left: -16px;
7 | width: calc(100% + 32px);
8 | height: $header-slides-height;
9 | .slide-zoom {
10 | text-align: initial;
11 | }
12 | .swiper-pagination-progress {
13 | top: initial;
14 | bottom: 0 !important;
15 | }
16 | .post-header {
17 | position: absolute;
18 | bottom: 0;
19 | margin: 16px;
20 | @media only screen and (min-width: 768px) {
21 | left: 25%;
22 | width: 50%;
23 | }
24 | h1 {
25 | font-family: 'lora';
26 | font-weight: bold;
27 | margin-top: 10px;
28 | }
29 | span {
30 | text-align: right;
31 | font-weight: 300;
32 | font-size: $header-slides-subheader;
33 | &.text-category {
34 | text-transform: uppercase;
35 | letter-spacing: 5px;
36 | font-weight: 700;
37 | text-align: right;
38 | background: #fff;
39 | padding: 5px 5px 5px 8px;
40 | }
41 | }
42 | }
43 | img-loader {
44 | @extend .aeon-header-img;
45 | height: $header-slides-height !important;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/src/components/aeon.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule, ModuleWithProviders } from '@angular/core';
2 | import { IonicModule } from 'ionic-angular'
3 |
4 | /**
5 | * Import External Module
6 | */
7 | import { IonicImageLoader } from 'ionic-image-loader';
8 | import { MomentModule } from 'angular2-moment';
9 | import { InViewportModule } from 'ng-in-viewport';
10 | /**
11 | * Import Directive
12 | */
13 | import { SquareDirective } from '../directives/square.directive'
14 |
15 | /**
16 | * Export Component Module
17 | */
18 | import { CategoryThumbnailList } from './category-list/category-thumbnail-list/category-thumbnail-list';
19 | import { BigCardList } from './post-list/big-card-list/big-card-list';
20 | import { CardList } from './post-list/card-list/card-list';
21 | import { GridList } from './post-list/grid-list/grid-list';
22 | import { HeaderSlides } from './post-list/header-slides/header-slides';
23 | import { HeaderAuthor } from './header-author/header-author';
24 | import { HeaderTransparent } from './header-transparent/header-transparent';
25 |
26 | @NgModule({
27 | declarations: [
28 | SquareDirective,
29 | CategoryThumbnailList,
30 | CardList,
31 | GridList,
32 | HeaderAuthor,
33 | HeaderSlides,
34 | HeaderTransparent
35 | ],
36 | imports: [
37 | IonicModule,
38 | IonicImageLoader,
39 | MomentModule,
40 | InViewportModule
41 | ],
42 | exports: [
43 | CategoryThumbnailList,
44 | CardList,
45 | GridList,
46 | HeaderAuthor,
47 | HeaderSlides,
48 | HeaderTransparent
49 | ]
50 | })
51 | export class AeonModule {}
--------------------------------------------------------------------------------
/src/components/post-list/post-list.component.ts:
--------------------------------------------------------------------------------
1 |
2 | import { Component, Input, Output, EventEmitter, Renderer2, OnInit } from '@angular/core';
3 | import { ImgLoader } from 'ionic-image-loader';
4 | import { ImageLoaderConfig } from 'ionic-image-loader';
5 | import { MomentModule } from 'angular2-moment';
6 |
7 | @Component({})
8 | export class PostListComponent implements OnInit {
9 | @Input('postList') posts: any;
10 | @Input('start') start: number;
11 | @Input('end') end: number;
12 | @Input('scrollReveal') scroll_anim: string;
13 | @Output() postTarget: EventEmitter = new EventEmitter();
14 |
15 | constructor(
16 | private imageLoaderConfig: ImageLoaderConfig,
17 | private renderer: Renderer2
18 | ) {
19 | imageLoaderConfig.enableSpinner(false);
20 | }
21 |
22 | ngOnInit() {
23 | this.start = (this.start != null ? this.start : 0);
24 | this.end = (this.end != null ? this.end : 4);
25 | }
26 |
27 | postNav(postId, postMediaUrl) {
28 | this.postTarget.emit({
29 | id: postId,
30 | media: postMediaUrl
31 | });
32 | }
33 |
34 | onImageLoad(imgLoader: ImgLoader) {
35 | }
36 |
37 | onReveal(event) {
38 | if (event.value) {
39 | this.renderer.addClass(event.target, this.scroll_anim + '-active');
40 | this.renderer.removeClass(event.target, this.scroll_anim + '-inactive');
41 | } else {
42 | this.renderer.addClass(event.target, this.scroll_anim + '-inactive');
43 | this.renderer.removeClass(event.target, this.scroll_anim + '-active');
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/src/theme/aeon-components.scss:
--------------------------------------------------------------------------------
1 | .aeon-bg-page {
2 | background: url('../assets/img/login_bg.jpeg') center center no-repeat;
3 | background-size: cover;
4 | &:before {
5 | content: '';
6 | position: absolute;
7 | top: 0;
8 | right: 0;
9 | bottom: 0;
10 | left: 0;
11 | background-image: linear-gradient(to bottom right, #10aacc, #aa4225);
12 | opacity: .5;
13 | }
14 | }
15 |
16 | .aeon-input-item {
17 | background: transparent !important;
18 | &.item-input:last-child {
19 | border: none !important
20 | }
21 | ion-label {
22 | text-transform: uppercase;
23 | letter-spacing: 3px;
24 | }
25 | ion-input {
26 | input {
27 | background-color: transparent !important;
28 | }
29 | }
30 | }
31 |
32 | .aeon-img-placeholder {
33 | &:before {
34 | content: '';
35 | position: absolute;
36 | top: 0;
37 | right: 0;
38 | bottom: 0;
39 | left: 0;
40 | background-image: linear-gradient(to bottom right, #1f5acc, #bb4225);
41 | opacity: .5;
42 | }
43 | }
44 |
45 | .aeon-header-img {
46 | background-position: center;
47 | background-repeat: no-repeat !important;
48 | background-position-x: center !important;
49 | background-size: cover !important;
50 | border: none !important;
51 | -webkit-filter: brightness(50%);
52 | }
53 |
54 | ion-title {
55 | text-transform: uppercase !important;
56 | font-weight: bold;
57 | }
58 |
59 | ion-content[header-overlay] {
60 | .scroll-content {
61 | padding-top: 80px !important;
62 | }
63 | }
--------------------------------------------------------------------------------
/src/components/post-list/random-list/random-list.scss:
--------------------------------------------------------------------------------
1 | random-list {
2 | ion-grid {
3 | ion-row {
4 | ion-col {
5 | position: relative;
6 | text-align: left;
7 | height: width;
8 | width: 100% !important;
9 | margin: $grid-list-margin !important;
10 | border-radius: $grid-list-radius !important;
11 | img {
12 | width: 100%;
13 | height: 100%;
14 | object-fit: cover;
15 | background-color: gray;
16 | }
17 | p {
18 | margin: 5px;
19 | min-height: 10px;
20 | &.post-category {
21 | margin-top: 5px;
22 | text-transform: uppercase;
23 | font-size: $grid-list-category-font-size;
24 | font-weight: 700;
25 | letter-spacing: $grid-list-category-spacing;
26 | color: gray;
27 | }
28 | &.post-title {
29 | font-size: $grid-list-title-font-size;
30 | font-weight: 700;
31 | }
32 | &.post-date {
33 | position: absolute;
34 | bottom: 5px;
35 | right: 0;
36 | font-size: $grid-list-date-font-size;
37 | text-transform: uppercase;
38 | }
39 | }
40 | }
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/src/pages/contact/contact.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, NavController, NavParams } from 'ionic-angular';
3 | // import {
4 | // GoogleMaps,
5 | // GoogleMap,
6 | // GoogleMapsEvent,
7 | // LatLng,
8 | // CameraPosition,
9 | // MarkerOptions,
10 | // Marker
11 | // } from '@ionic-native/google-maps';
12 |
13 | @IonicPage()
14 | @Component({
15 | selector: 'page-contact',
16 | templateUrl: 'contact.html'
17 | })
18 | export class ContactPage {
19 |
20 | constructor(
21 | public navCtrl: NavController,
22 | public navParams: NavParams
23 | // private googleMaps: GoogleMaps
24 | ) { }
25 |
26 | // ionViewDidLoad() {
27 | // console.log('ionViewDidLoad CommentListPage');
28 | // }
29 |
30 | // ngAfterViewInit(){
31 | // this.initMap();
32 | // }
33 |
34 | // initMap(){
35 | // let element: HTMLElement = document.getElementById('map');
36 | // let map: GoogleMap = this.googleMaps.create(element);
37 | // map.one(GoogleMapsEvent.MAP_READY).then(
38 | // ()=>{
39 | // console.log('map is ready');
40 | // }
41 | // )
42 | // let targetLatLng: LatLng = new LatLng(43.0741904,-89.3809802);
43 | // let position: CameraPosition = {
44 | // target: targetLatLng,
45 | // zoom: 18,
46 | // tilt: 30
47 | // };
48 | // map.moveCamera(position);
49 |
50 | // let markerOptions: MarkerOptions = {
51 | // position: targetLatLng,
52 | // title: 'Our Location'
53 | // };
54 |
55 | // const marker = map.addMarker(markerOptions)
56 | // .then((marker: Marker) => {
57 | // marker.showInfoWindow();
58 | // })
59 |
60 | // }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { HttpModule } from '@angular/http';
3 | import { NgModule, ErrorHandler } from '@angular/core';
4 | import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
5 | import { File } from '@ionic-native/file';
6 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
7 | import { Transfer } from '@ionic-native/transfer';
8 | import { IonicStorageModule } from '@ionic/storage';
9 | import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
10 | import { IonicImageLoader, ImageLoader, ImageLoaderConfig } from 'ionic-image-loader';
11 | import { MomentModule } from 'angular2-moment';
12 | import { MyApp } from './app.component';
13 | import { AeonModule } from '../components/aeon.module';
14 | import { InViewportModule } from 'ng-in-viewport';
15 | import { AuthProvider } from '../providers/auth.provider';
16 | import { ClientProvider } from '../providers/client.provider';
17 |
18 |
19 | @NgModule({
20 | declarations: [
21 | MyApp
22 | ],
23 | imports: [
24 | BrowserModule,
25 | HttpModule,
26 | IonicModule.forRoot(MyApp),
27 | AeonModule,
28 | IonicStorageModule.forRoot(),
29 | InViewportModule.forRoot(),
30 | IonicImageLoader,
31 | MomentModule
32 | ],
33 | bootstrap: [IonicApp],
34 | entryComponents: [
35 | MyApp
36 | ],
37 | providers: [{ provide: ErrorHandler, useClass: IonicErrorHandler },
38 | IonicImageLoader,
39 | ImageLoader,
40 | ImageLoaderConfig,
41 | File,
42 | Transfer,
43 | NativePageTransitions,
44 | AdMobFree,
45 | AuthProvider,
46 | ClientProvider
47 | ]
48 | })
49 | export class AppModule { }
50 |
--------------------------------------------------------------------------------
/src/app/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/components/post-list/grid-list/grid-list.scss:
--------------------------------------------------------------------------------
1 | grid-list {
2 | ion-grid {
3 | ion-row {
4 | ion-col {
5 | position: relative;
6 | text-align: left;
7 | height: width;
8 | width: 100% !important;
9 | margin: $grid-list-margin !important;
10 | border-radius: $grid-list-radius !important;
11 | &.post-thumbnail {
12 | padding: 0 !important;
13 | }
14 | img {
15 | @extend .aeon-img-placeholder;
16 | width: 100%;
17 | height: 100%;
18 | object-fit: cover;
19 | }
20 | p {
21 | margin: 5px;
22 | min-height: 10px;
23 | &.post-category {
24 | margin-top: 5px;
25 | text-transform: uppercase;
26 | font-size: $grid-list-category-font-size;
27 | font-weight: 700;
28 | letter-spacing: $grid-list-category-spacing;
29 | color: gray;
30 | }
31 | &.post-title {
32 | font-size: $grid-list-title-font-size;
33 | font-weight: 700;
34 | }
35 | &.post-date {
36 | position: absolute;
37 | bottom: 5px;
38 | right: 0;
39 | font-size: $grid-list-date-font-size;
40 | text-transform: uppercase;
41 | }
42 | }
43 | }
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/src/pages/bookmark/bookmark.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, NavController, NavParams } from 'ionic-angular';
3 | import { ImgLoader } from 'ionic-image-loader';
4 | import { Observable } from 'rxjs/Observable';
5 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
6 | import 'rxjs/Rx'
7 |
8 | import { StorageProvider } from '../../providers/storage.provider';
9 |
10 | @IonicPage()
11 | @Component({
12 | selector: 'page-bookmark',
13 | templateUrl: 'bookmark.html',
14 | providers: [StorageProvider]
15 | })
16 | export class BookmarkPage {
17 | pageTitle: string;
18 | options: any;
19 | posts: any;
20 | page: number;
21 |
22 | constructor(public navCtrl: NavController,
23 | public navParams: NavParams,
24 | private nativePageTransitions: NativePageTransitions,
25 | public storageProvider: StorageProvider
26 | ) { }
27 |
28 | ionViewWillEnter(){
29 | this.fetch();
30 | }
31 |
32 | ionViewWillLeave(){
33 | let opt: NativeTransitionOptions = {
34 | duration: 300,
35 | iosdelay: 50,
36 | androiddelay: 100
37 | };
38 | this.nativePageTransitions.fade(opt);
39 | }
40 |
41 | fetch() {
42 | let fetch = Observable.fromPromise(this.storageProvider.fetchBookmark());
43 | fetch.subscribe(res => {
44 | this.posts = res;
45 | })
46 | }
47 |
48 | toPostContent(postDetail: any) {
49 | let opt: NativeTransitionOptions = {
50 | duration: 100,
51 | iosdelay: 50,
52 | androiddelay: 100
53 | };
54 | this.nativePageTransitions.fade(opt);
55 | this.navCtrl.push(
56 | "PostContentPage", {
57 | 'postId': postDetail.id,
58 | 'postMedia': postDetail.media
59 | });
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/components/post-list/header-slides/header-slides.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
29 |
30 |
--------------------------------------------------------------------------------
/src/components/post-list/card-list/card-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{item.date | amCalendar: { sameDay: '[Today]', lastDay: '[Yesterday]', sameElse: 'MMMM DD, YYYY'} }}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{item.date | amCalendar: { sameDay: '[Today]', lastDay: '[Yesterday]', lastWeek: '[last] dddd', sameElse: 'MMMM DD, YYYY'} }}
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/pages/login/login.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, ViewController, LoadingController, AlertController, ModalController } from 'ionic-angular';
3 |
4 | import { Login } from '../../models/user.model';
5 | import { AuthProvider } from '../../providers/auth.provider';
6 |
7 | @IonicPage()
8 | @Component({
9 | selector: 'page-login',
10 | templateUrl: 'login.html'
11 | })
12 | export class LoginPage {
13 | login: Login = new Login("", "");
14 |
15 | constructor(
16 | private auth: AuthProvider,
17 | private viewCtrl: ViewController,
18 | private loadingCtrl: LoadingController,
19 | private alertCtrl: AlertController,
20 | private modalCtrl: ModalController
21 | ) { }
22 |
23 | ionViewWillLoad() {
24 | this.auth.getToken().then(res => {
25 | if (res != null) {
26 | this.dismiss();
27 | }
28 | })
29 | }
30 |
31 | dismiss() {
32 | this.viewCtrl.dismiss();
33 | }
34 |
35 | submit() {
36 | let loader = this.loadingCtrl.create({
37 | content: "Sign you in..."
38 | });
39 | loader.present();
40 | this.auth.login(this.login)
41 | .subscribe(
42 | () => {
43 | loader.dismiss();
44 | this.dismiss();
45 | }, err => {
46 | err = err.json();
47 | loader.dismiss();
48 | let alert = this.alertCtrl.create({
49 | title: 'Login Error',
50 | subTitle: err.message,
51 | buttons: ['Dismiss']
52 | });
53 | alert.present();
54 | })
55 | }
56 |
57 | goToPage(page: string) {
58 | let modal = this.modalCtrl.create(page);
59 | modal.present();
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/pages/comment/comment.scss:
--------------------------------------------------------------------------------
1 | modal-comment {
2 | .no-item {
3 | position: absolute;
4 | margin: auto;
5 | top: 0;
6 | right: 0;
7 | bottom: 0;
8 | left: 0;
9 | text-align: center;
10 | align-items: center;
11 | ion-icon {
12 | font-size: 150px;
13 | }
14 | p {
15 | font-weight: 700;
16 | }
17 | }
18 | ion-item {
19 | ion-col.comment-img {
20 | text-align: center;
21 | img {
22 | position: relative;
23 | border-radius: 24px;
24 | }
25 | }
26 | p {
27 | white-space: normal;
28 | line-height: 20px !important;
29 | &.comment-author {
30 | font-weight: 700;
31 | }
32 | &.comment-content {
33 | font-size: 1.2rem !important;
34 | border: 1px solid color($colors, primary, base);
35 | padding: 12px;
36 | margin: 0px 10px;
37 | border-radius: 10px;
38 | border-top-left-radius: 0px;
39 | &::after {
40 | content: '';
41 | position: absolute;
42 | left: 0;
43 | top: 39px;
44 | width: 0;
45 | height: 0;
46 | border: 16px solid transparent;
47 | border-right-color: color($colors, primary, base);
48 | border-left: 0;
49 | border-top: 0;
50 | margin-top: -12px;
51 | margin-left: 0px;
52 | }
53 | }
54 | &.comment-date {
55 | font-size: 1rem;
56 | text-align: right;
57 | }
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/src/pages/register/register.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
39 |
--------------------------------------------------------------------------------
/src/pages/comment/comment.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Comments
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
There is no comment for this post yet.
15 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/pages/register/register.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, ViewController, LoadingController, AlertController } from 'ionic-angular';
3 |
4 | import { Register } from '../../models/user.model';
5 | import { AuthProvider } from '../../providers/auth.provider';
6 | import { Observable } from 'rxjs/Observable';
7 |
8 | @IonicPage()
9 | @Component({
10 | selector: 'page-register',
11 | templateUrl: 'register.html'
12 | })
13 | export class RegisterPage {
14 | register: Register = new Register("", "", "", "", "");
15 |
16 | constructor(
17 | private auth: AuthProvider,
18 | private viewCtrl: ViewController,
19 | private loadingCtrl: LoadingController,
20 | private alertCtrl: AlertController
21 | ) { }
22 |
23 | ionViewWillLoad() {
24 | this.auth.getToken().then(res => {
25 | if (res != null) {
26 | this.dismiss();
27 | }
28 | })
29 | }
30 |
31 | dismiss() {
32 | this.viewCtrl.dismiss();
33 | }
34 |
35 | submit() {
36 | let loader = this.loadingCtrl.create({
37 | content: "Sign you up..."
38 | });
39 | loader.present();
40 | this.auth.register(this.register)
41 | .subscribe(
42 | () => {
43 | loader.dismiss();
44 | this.dismiss();
45 | },
46 | err => {
47 | err = err.json();
48 | loader.dismiss();
49 | let alert = this.alertCtrl.create({
50 | title: 'Register Error',
51 | subTitle: err.message,
52 | buttons: ['Dismiss']
53 | });
54 | alert.present();
55 | })
56 |
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/providers/auth.provider.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { Http, Response } from '@angular/http';
3 | import { Storage } from '@ionic/storage';
4 | import 'rxjs/Rx';
5 |
6 | import { WP_API, WP_USER } from '../constants/endpoint.constant';
7 |
8 | @Injectable()
9 | export class AuthProvider {
10 | constructor(private http: Http, private storage: Storage) {
11 | }
12 |
13 | register(registerData) {
14 | return this.http.post(WP_USER.REGISTER, registerData)
15 | .map((res: Response) => res.json())
16 | .map(res => {
17 | return this.login({ username: registerData.username, password: registerData.password }).subscribe(res => {
18 | return res
19 | })
20 | })
21 | }
22 |
23 | login(loginData) {
24 | return this.http.post(WP_USER.GET_TOKEN, loginData)
25 | .map((res: Response) => res.json())
26 | .map(res => {
27 | this.saveToken(res);
28 | this.fetchProfile(res.user_display_name).subscribe(res => {
29 | this.storage.set('profile', res[0]);
30 | })
31 | return res;
32 | })
33 | .catch(error => { return error; })
34 | }
35 |
36 | logout() {
37 | return this.storage.remove('token')
38 | .then(sucess => { return sucess; })
39 | .catch(error => { return error; })
40 | }
41 |
42 | validateToken() {
43 | return this.http.post(WP_USER.VALIDATE, this.getToken()).toPromise()
44 | .then(sucess => { return sucess; })
45 | .catch(error => { return error; })
46 | }
47 |
48 | saveToken(token: any) {
49 | this.storage.set('token', token);
50 | }
51 |
52 | getToken() {
53 | return this.storage.get('token').then(res => {
54 | return res;
55 | });
56 | }
57 |
58 | fetchProfile(user: string) {
59 | return this.http.get(WP_API.GET_USER + '?search=' + user)
60 | .map((res: Response) => res.json())
61 | .map(res => {
62 | return res;
63 | })
64 | }
65 |
66 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Aeon-Wordpress",
3 | "author": "Riva Farabi",
4 | "homepage": "http://ionicframework.com/",
5 | "private": true,
6 | "scripts": {
7 | "clean": "ionic-app-scripts clean",
8 | "build": "ionic-app-scripts build && ionic-app-scripts minify",
9 | "ionic:build": "ionic-app-scripts build && ionic-app-scripts minify",
10 | "ionic:serve": "ionic-app-scripts serve"
11 | },
12 | "dependencies": {
13 | "@angular/common": "4.0.0",
14 | "@angular/compiler": "4.0.0",
15 | "@angular/compiler-cli": "4.0.0",
16 | "@angular/core": "4.0.0",
17 | "@angular/forms": "4.0.0",
18 | "@angular/http": "4.0.0",
19 | "@angular/platform-browser": "4.0.0",
20 | "@angular/platform-browser-dynamic": "4.0.0",
21 | "@angular/platform-server": "4.0.0",
22 | "@ionic-native/admob-free": "^3.10.3",
23 | "@ionic-native/core": "^3.9.2",
24 | "@ionic-native/file": "^3.4.4",
25 | "@ionic-native/google-maps": "^3.8.1",
26 | "@ionic-native/keyboard": "^3.10.3",
27 | "@ionic-native/native-page-transitions": "^3.10.3",
28 | "@ionic-native/native-storage": "^3.4.4",
29 | "@ionic-native/onesignal": "^3.9.2",
30 | "@ionic-native/social-sharing": "^3.4.4",
31 | "@ionic-native/sqlite": "^3.5.0",
32 | "@ionic-native/transfer": "^3.4.4",
33 | "@ionic/storage": "2.0.0",
34 | "angular2-disqus": "^6.0.0",
35 | "angular2-moment": "^1.3.3",
36 | "ionic-angular": "3.0.0",
37 | "ionic-image-loader": "^3.0.0",
38 | "ionic-native": "^2.4.1",
39 | "ionicons": "3.0.0",
40 | "ng2-awesome-disqus": "^1.1.1",
41 | "rxjs": "5.2.0",
42 | "sw-toolbox": "^3.4.0",
43 | "typescript": "^2.2.2",
44 | "zone.js": "0.7.2"
45 | },
46 | "devDependencies": {
47 | "@ionic/app-scripts": "1.3.0",
48 | "typescript": "2.2.2"
49 | },
50 | "cordovaPlugins": [
51 | "cordova-plugin-whitelist",
52 | "cordova-plugin-statusbar",
53 | "cordova-plugin-console",
54 | "cordova-plugin-device",
55 | "cordova-plugin-splashscreen",
56 | "ionic-plugin-keyboard"
57 | ],
58 | "cordovaPlatforms": [],
59 | "description": "Aeon Wordpress - Ionic Wordpress Client"
60 | }
--------------------------------------------------------------------------------
/src/pages/post-content/post-content.scss:
--------------------------------------------------------------------------------
1 | page-post-content {
2 | ion-spinner {
3 | position: absolute;
4 | margin: auto;
5 | top: 0;
6 | right: 0;
7 | bottom: 0;
8 | left: 0;
9 | }
10 | div.featured-media {
11 | position: relative;
12 | top: -16px;
13 | left: -16px;
14 | width: calc(100% + 32px);
15 | height: 300px;
16 | &:before {
17 | content: '';
18 | position: absolute;
19 | top: 0;
20 | right: 0;
21 | bottom: 0;
22 | left: 0;
23 | background-image: linear-gradient(to bottom right, #10aacc, #aa4225);
24 | opacity: .5;
25 | }
26 | div.post-header {
27 | position: absolute;
28 | bottom: 0;
29 | margin: 16px;
30 | width: calc(100% - 32px);
31 | @media only screen and (min-width: 768px) {
32 | left: 25%;
33 | width: 50%;
34 | }
35 | h1 {
36 | font-family: 'lora';
37 | font-weight: bold;
38 | margin-top: 10px;
39 | }
40 | span {
41 | text-align: right;
42 | font-weight: 300;
43 | &.text-category {
44 | text-transform: uppercase;
45 | letter-spacing: 5px;
46 | font-weight: 700;
47 | text-align: right;
48 | background: #fff;
49 | padding: 5px 5px 5px 8px;
50 | }
51 | }
52 | }
53 | img-loader {
54 | height: 300px;
55 | @extend .aeon-header-img;
56 | }
57 | }
58 | .content-container {
59 | line-height: 1.8;
60 | font-size: 11pt;
61 | @media only screen and (min-width: 768px) {
62 | left: 25%;
63 | width: 50%;
64 | }
65 | h1,
66 | h2,
67 | h3 {
68 | font-weight: bold;
69 | padding-top: 20px;
70 | }
71 | img {
72 | width: 100%;
73 | height: auto;
74 | }
75 | a {
76 | text-decoration: none;
77 | }
78 | iframe {
79 | width: 100%;
80 | }
81 | }
82 | }
--------------------------------------------------------------------------------
/src/pages/comment/comment.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, ViewController, NavParams, ToastController, ModalController } from 'ionic-angular';
3 | import { MomentModule } from 'angular2-moment';
4 |
5 | import { ClientProvider } from '../../providers/client.provider';
6 |
7 | @IonicPage()
8 | @Component({
9 | selector: 'modal-comment',
10 | templateUrl: 'comment.html',
11 | providers: [ClientProvider]
12 | })
13 | export class CommentModal {
14 | postID: number;
15 | comments: any;
16 | commentInput: any;
17 | page: number;
18 |
19 | constructor(
20 | private viewCtrl: ViewController,
21 | private clientProvider: ClientProvider,
22 | private navParams: NavParams,
23 | private toastCtrl: ToastController
24 | ) {
25 | this.postID = this.navParams.get('id');
26 | this.page = 1;
27 | this.fetch();
28 | }
29 |
30 | dismiss() {
31 | this.viewCtrl.dismiss();
32 | }
33 |
34 | fetch() {
35 | this.clientProvider.getComments(this.postID, this.page)
36 | .subscribe(res => {
37 | console.log(res.length);
38 | this.comments = res;
39 | })
40 | }
41 |
42 | postComment() {
43 | let opts = [{
44 | 'type': 'content',
45 | 'id': this.commentInput
46 | }, {
47 | 'type': 'post',
48 | 'id': this.postID
49 | }];
50 | this.clientProvider.postCommnent(opts)
51 | .subscribe(
52 | success => {
53 | let toast = this.toastCtrl.create({
54 | message: 'Comment Submitted.',
55 | duration: 3000,
56 | position: 'bottom'
57 | })
58 | toast.present();
59 | this.fetch();
60 | this.commentInput = "";
61 | },
62 | err => {
63 | console.log(err);
64 | let toast = this.toastCtrl.create({
65 | message: 'Comment Failed.',
66 | duration: 3000,
67 | position: 'bottom'
68 | })
69 | toast.present();
70 | })
71 |
72 | }
73 |
74 | loadMoreComments(infiniteScroll) {
75 | this.page++;
76 | setTimeout(() => {
77 | this.clientProvider.getComments(this.postID, this.page)
78 | .subscribe(res => {
79 | res.forEach(element => {
80 | this.comments.push(element)
81 | });
82 | infiniteScroll.complete();
83 | })
84 | }, 500)
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Aion Wordpress
4 | An Ionic Wordpress client app.
5 | Riva Farabi
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 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/theme/variables.scss:
--------------------------------------------------------------------------------
1 | // Ionic Variables and Theming. For more info, please see:
2 | // http://ionicframework.com/docs/v2/theming/
3 | $font-path: "../assets/fonts";
4 | $font-family-md-base: "raleway";
5 | $font-family-ios-base: "raleway";
6 | @import "ionic.globals";
7 | // Shared Variables
8 | // --------------------------------------------------
9 | // To customize the look and feel of this app, you can override
10 | // the Sass variables found in Ionic's source scss files.
11 | // To view all the possible Ionic variables, see:
12 | // http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/
13 | // Named Color Variables
14 | // --------------------------------------------------
15 | // Named colors makes it easy to reuse colors on various components.
16 | // It's highly recommended to change the default colors
17 | // to match your app's branding. Ionic uses a Sass map of
18 | // colors so you can add, rename and remove colors as needed.
19 | // The "primary" color is the only required color in the map.
20 | $colors: ( primary: #1C1F24, secondary: #62bcfa, danger: #f53d3d, light: #f4f4f4, white: #fff, dark: #222, transparent: ( base: #ffffff, contrast: #000000, background-image: none));
21 | // App iOS Variables
22 | // --------------------------------------------------
23 | // iOS only Sass variables can go here
24 | // App Material Design Variables
25 | // --------------------------------------------------
26 | // Material Design only Sass variables can go here
27 | // App Windows Variables
28 | // --------------------------------------------------
29 | // Windows only Sass variables can go here
30 | // App Theme
31 | // --------------------------------------------------
32 | // Ionic apps can have different themes applied, which can
33 | // then be future customized. This import comes last
34 | // so that the above variables are used and Ionic's
35 | // default are overridden.
36 | @import "ionic.theme.default";
37 | // Ionicons
38 | // --------------------------------------------------
39 | // The premium icon font for Ionic. For more info, please see:
40 | // http://ionicframework.com/docs/v2/ionicons/
41 | @import "ionic.ionicons";
42 | // Fonts
43 | // --------------------------------------------------
44 | @import "roboto";
45 | @import "noto-sans";
46 | @import "../pages/home/home";
47 | @import "aeon-platforms";
48 | @import "aeon-theme";
49 | @import "aeon-components";
50 | @import "aeon-animations";
--------------------------------------------------------------------------------
/src/components/post-list/big-card-list/big-card-list.scss:
--------------------------------------------------------------------------------
1 | big-card-list {
2 | ion-card {
3 | position: relative;
4 | width: 100% !important;
5 | margin: 0px !important;
6 | background: #fff;
7 | border-radius: $big-card-list-radius !important;
8 | opacity: 0;
9 | &.fade-in {
10 | opacity: 1;
11 | transition: all 1.0s ease;
12 | }
13 | img {
14 | object-fit: cover;
15 | background-color: gray;
16 | -webkit-filter: brightness(70%);
17 | height: $big-card-list-image-height;
18 | @media only screen and (min-width: 768px) {
19 | height: $big-card-list-image-height-md;
20 | }
21 | }
22 | ion-grid {
23 | position: absolute;
24 | width: 100%;
25 | top: 0;
26 | margin-top: 0px;
27 | padding: 10px;
28 | text-shadow: 0px 0px 4px #000;
29 | text-transform: uppercase;
30 | font-weight: bold;
31 | .post-category {
32 | white-space: pre-line;
33 | font-size: 1.5rem;
34 | letter-spacing: 3px;
35 | }
36 | .post-date {
37 | span {
38 | margin: 0;
39 | letter-spacing: 3px;
40 | &:first-child {
41 | font-size: 3.1rem;
42 | }
43 | }
44 | }
45 | }
46 | div {
47 | text-shadow: 0px 0px 5px #000;
48 | position: absolute;
49 | bottom: 0px;
50 | width: 100%;
51 | padding-top: 10px;
52 | ion-card-title {
53 | padding: 10px !important;
54 | font-weight: 700;
55 | color: color($colors, light, base) !important;
56 | font-size: $big-card-list-title-font-size !important;
57 | @media only screen and (min-width: 768px) {
58 | font-size: $big-card-list-title-font-size-md !important;
59 | }
60 | }
61 | p {
62 | margin: $big-card-list-date-margin;
63 | color: color($colors, light, base) !important;
64 | text-align: right;
65 | font-size: $card-list-date-font-size !important;
66 | }
67 | }
68 | }
69 | }
--------------------------------------------------------------------------------
/src/pages/post-content/post-content.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
10 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
48 |
49 |
--------------------------------------------------------------------------------
/src/app/app.scss:
--------------------------------------------------------------------------------
1 | // http://ionicframework.com/docs/v2/theming/
2 | // App Global Sass
3 | // --------------------------------------------------
4 | // Put style rules here that you want to apply globally. These
5 | // styles are for the entire app and not just one component.
6 | // Additionally, this file can be also used as an entry point
7 | // to import other Sass files to be included in the output CSS.
8 | //
9 | // Shared Sass variables, which can be used to adjust Ionic's
10 | // default Sass variables, belong in "theme/variables.scss".
11 | //
12 | // To declare rules for a specific mode, create a child rule
13 | // for the .md, .ios, or .wp mode classes. The mode class is
14 | // automatically applied to the element in the app.
15 | @font-face {
16 | font-family: 'raleway';
17 | src: url('../assets/fonts/Raleway-Regular.ttf');
18 | }
19 |
20 | @font-face {
21 | font-family: 'raleway';
22 | src: url('../assets/fonts/Raleway-Bold.ttf');
23 | font-weight: bold;
24 | }
25 |
26 | //Lora Fonts
27 | @font-face {
28 | font-family: 'lora';
29 | src: url('../assets/fonts/Lora/Lora-Regular.ttf');
30 | }
31 |
32 | @font-face {
33 | font-family: 'lora';
34 | src: url('../assets/fonts/Lora/Lora-Bold.ttf');
35 | font-weight: bold;
36 | }
37 |
38 | ion-menu {
39 | padding-top: 48px;
40 | div.header-container {
41 | padding: 80px 16px;
42 | position: relative;
43 | top: -16px;
44 | left: -16px;
45 | width: calc(100% + 32px);
46 | height: 250px;
47 | text-align: center;
48 | div.header-bg {
49 | background-image: url('../assets/img/header-menu-bg.jpeg');
50 | position: absolute;
51 | left: 0;
52 | top: 0;
53 | height: 100%;
54 | width: 100%;
55 | background-size: cover;
56 | -webkit-filter: brightness(50%);
57 | }
58 | div.header-content {
59 | position: absolute;
60 | top: 0;
61 | left: 16px;
62 | height: 100%;
63 | width: calc(100% - 32px);
64 | img.author-thumbnail {
65 | height: 100px;
66 | width: 100px;
67 | background-color: #fff;
68 | border-radius: 50px;
69 | }
70 | ion-grid {
71 | position: absolute;
72 | bottom: 0px;
73 | }
74 | }
75 | }
76 | ion-list {
77 | button {
78 | font-size: 1rem !important;
79 | font-weight: 700 !important;
80 | text-transform: uppercase !important;
81 | letter-spacing: 3px;
82 | }
83 | }
84 | }
--------------------------------------------------------------------------------
/src/pages/search/tags-tab/tags-tab.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { IonicPage, NavController, NavParams, Navbar, Searchbar } from 'ionic-angular';
3 | import 'rxjs/Rx'
4 |
5 | import { ClientProvider } from '../../../providers/client.provider'
6 |
7 | @IonicPage()
8 | @Component({
9 | selector: 'page-tags-tab',
10 | templateUrl: 'tags-tab.html',
11 | providers: [ClientProvider]
12 | })
13 | export class TagsTabPage {
14 | @ViewChild('searchbar') searchbar: Searchbar;
15 | @ViewChild(Navbar) navBar: Navbar;
16 | options: any;
17 | tags: any;
18 | page: number;
19 | pageTitle: string;
20 | showSearchBar: boolean;
21 |
22 | constructor(
23 | public navCtrl: NavController,
24 | public clientProvider: ClientProvider,
25 |
26 | private navParams: NavParams
27 | ) {
28 | this.init();
29 | }
30 |
31 | ionViewWillEnter(){
32 | if (this.options[0].id != this.navParams.data.name) {
33 | this.init();
34 | }
35 | }
36 |
37 | ionViewDidLoad() {
38 | this.navBar.backButtonClick = (e: UIEvent) => {
39 | this.navCtrl.parent.viewCtrl.dismiss();
40 | };
41 | }
42 |
43 | ionViewWillLeave() {
44 | this.showSearchBar = false;
45 | }
46 |
47 | init(){
48 | this.pageTitle = this.navParams.data.name;
49 | this.options = [{
50 | type: 'search',
51 | id: this.navParams.data.name
52 | }]
53 | this.page = 1;
54 | this.fetch(this.options);
55 | }
56 |
57 | fetch(opt: any) {
58 | this.clientProvider.getListTags(this.page, this.options)
59 | .subscribe(res => {
60 | this.tags = res;
61 | })
62 | }
63 |
64 | goToTag(id, name) {
65 | this.navCtrl.push(
66 | "PostListPage", {
67 | 'type': 'tags',
68 | 'id': id,
69 | 'name': name
70 | });
71 | }
72 |
73 | loadMore(infiniteScroll) {
74 | this.page++;
75 | setTimeout(() => {
76 | this.clientProvider.getListTags(this.page, this.options)
77 | .subscribe(res => {
78 | res.forEach(element => {
79 | this.tags.push(element)
80 | });
81 | infiniteScroll.complete();
82 | })
83 | }, 500)
84 | }
85 |
86 | search(event: any) {
87 | this.navParams.data.name = event.target.value;
88 | this.init();
89 | }
90 |
91 | searchBlurred(event:any){
92 | this.showSearchBar = false;
93 | }
94 |
95 | toggleSearchBar() {
96 | this.showSearchBar = !this.showSearchBar;
97 | if (this.showSearchBar) {
98 | setTimeout(() => {
99 | this.searchbar.setFocus();
100 | }, 150);
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/src/pages/search/authors-tab/authors-tab.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { IonicPage, NavController, NavParams, Navbar, Searchbar } from 'ionic-angular';
3 | import 'rxjs/Rx'
4 |
5 | import { ClientProvider } from '../../../providers/client.provider'
6 |
7 | @IonicPage()
8 | @Component({
9 | selector: 'page-authors-tab',
10 | templateUrl: 'authors-tab.html',
11 | providers: [ClientProvider]
12 | })
13 | export class AuthorsTabPage {
14 | @ViewChild('searchbar') searchbar: Searchbar;
15 | @ViewChild(Navbar) navBar: Navbar;
16 | pageTitle: string;
17 | authors: any;
18 | options: any;
19 | page: number;
20 | showSearchBar: boolean;
21 |
22 | constructor(
23 | public navCtrl: NavController,
24 | public clientProvider: ClientProvider,
25 | private navParams: NavParams,
26 |
27 | ) {
28 | this.init();
29 | }
30 |
31 | ionViewWillEnter() {
32 | if (this.options[0].id != this.navParams.data.name) {
33 | this.init();
34 | }
35 | }
36 |
37 | ionViewDidLoad() {
38 | this.navBar.backButtonClick = (e: UIEvent) => {
39 | this.navCtrl.parent.viewCtrl.dismiss();
40 | };
41 | }
42 |
43 | ionViewWillLeave() {
44 | this.showSearchBar = false;
45 | }
46 |
47 | init() {
48 | this.pageTitle = this.navParams.data.name;
49 | this.options = [{
50 | type: 'search',
51 | id: this.navParams.data.name
52 | }]
53 | this.page = 1;
54 | this.fetch(this.options);
55 | }
56 |
57 | fetch(opt: any) {
58 | this.clientProvider.getListAuthors(this.page, this.options)
59 | .subscribe(res => {
60 | this.authors = res;
61 | })
62 | }
63 |
64 | goToAuthor(id, name) {
65 | this.navCtrl.push("AuthorPage", {
66 | 'opt': [{
67 | 'type': 'author',
68 | 'id': id
69 | }],
70 | 'id': id,
71 | 'name': name
72 | })
73 | }
74 |
75 | loadMore(infiniteScroll) {
76 | this.page++;
77 | setTimeout(() => {
78 | this.clientProvider.getListAuthors(this.page, this.options)
79 | .subscribe(res => {
80 | res.forEach(element => {
81 | this.authors.push(element)
82 | });
83 | infiniteScroll.complete();
84 | })
85 | }, 500)
86 | }
87 |
88 | search(event: any) {
89 | this.navParams.data.name = event.target.value;
90 | this.init();
91 | }
92 |
93 | searchBlurred(event:any){
94 | this.showSearchBar = false;
95 | }
96 |
97 | toggleSearchBar() {
98 | this.showSearchBar = !this.showSearchBar;
99 | if (this.showSearchBar) {
100 | setTimeout(() => {
101 | this.searchbar.setFocus();
102 | }, 150);
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/src/pages/home/category-tab/category-tab.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { IonicPage, Platform, NavController, Searchbar } from 'ionic-angular';
3 | import { ImgLoader } from 'ionic-image-loader';
4 | import { ImageLoaderConfig } from 'ionic-image-loader';
5 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
6 | import 'rxjs/Rx'
7 |
8 | import { CategoryConst } from '../../../constants/variables.constant';
9 | import { ClientProvider } from '../../../providers/client.provider';
10 |
11 | @IonicPage()
12 | @Component({
13 | selector: 'tab-category',
14 | templateUrl: 'category-tab.html',
15 | providers: [ClientProvider]
16 | })
17 | export class CategoryTabPage {
18 | @ViewChild('searchbar') searchbar: Searchbar;
19 | categories: any;
20 | page: number;
21 | onProgress: boolean;
22 | showSearchBar: boolean;
23 |
24 | constructor(
25 | public navCtrl: NavController,
26 | public platform: Platform,
27 | public clientProvider: ClientProvider,
28 | private nativePageTransitions: NativePageTransitions
29 | ) {
30 | this.page = 1;
31 | this.fetch();
32 | this.showSearchBar = false;
33 | }
34 |
35 | ionViewWillLeave() {
36 | this.showSearchBar = false;
37 | let opt: NativeTransitionOptions = {
38 | duration: 300,
39 | iosdelay: 50,
40 | androiddelay: 100
41 | };
42 | this.nativePageTransitions.fade(opt);
43 | }
44 |
45 | fetch() {
46 | this.onProgress = true;
47 | this.categories = CategoryConst;
48 |
49 | /** Use this to fetch category from REST API
50 | this.clientProvider.getListCategories(this.page)
51 | .subscribe(res => {
52 | this.categories = res;
53 | })
54 | */
55 | }
56 |
57 | refresh(refresher) {
58 | this.page = 1;
59 | this.fetch();
60 | setTimeout(() => {
61 | refresher.complete();
62 | }, 2000);
63 | }
64 |
65 | loadMore(infiniteScroll) {
66 | this.page++;
67 | setTimeout(() => {
68 | this.clientProvider.getListCategories(this.page)
69 | .subscribe(res => {
70 | res.forEach(element => {
71 | this.categories.push(element)
72 | });
73 | infiniteScroll.complete();
74 | })
75 | }, 500)
76 | }
77 |
78 | toCategory(categoryDetail) {
79 | this.navCtrl.push(
80 | "PostListPage", {
81 | 'opt': [{
82 | 'type': 'categories',
83 | 'id': categoryDetail.id,
84 | 'name': categoryDetail.name
85 | }],
86 | "name": categoryDetail.name
87 | });
88 | }
89 |
90 | search(event: any) {
91 | this.navCtrl.push(
92 | "SearchPage", {
93 | 'type': 'search',
94 | 'name': event.target.value
95 | }
96 | )
97 | }
98 |
99 | searchBlurred(event:any){
100 | this.showSearchBar = false;
101 | }
102 |
103 | toggleSearchBar() {
104 | this.showSearchBar = !this.showSearchBar;
105 | if (this.showSearchBar) {
106 | setTimeout(() => {
107 | this.searchbar.setFocus();
108 | }, 150);
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/src/pages/post-list/post-list.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { IonicPage, NavController, NavParams, Searchbar } from 'ionic-angular';
3 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
4 | import 'rxjs/Rx'
5 |
6 | import { ClientProvider } from '../../providers/client.provider';
7 |
8 | @IonicPage()
9 | @Component({
10 | selector: 'page-post-list',
11 | templateUrl: 'post-list.html',
12 | providers: [ClientProvider]
13 | })
14 | export class PostListPage {
15 | @ViewChild('searchbar') searchbar: Searchbar;
16 | pageTitle: string;
17 | options: any;
18 | posts: any;
19 | page: number;
20 | onProgress: boolean;
21 | onInitProgress: boolean;
22 | showSearchBar: boolean;
23 |
24 | constructor(
25 | public navCtrl: NavController,
26 | public navParams: NavParams,
27 | private nativePageTransitions: NativePageTransitions,
28 | public clientProvider: ClientProvider
29 | ) {
30 | this.pageTitle = this.navParams.get('name');
31 | this.options = this.navParams.get('opt');
32 | this.page = 1;
33 | this.fetch();
34 | this.showSearchBar = false;
35 | }
36 |
37 | ionViewWillLeave() {
38 | this.showSearchBar = false;
39 | let opt: NativeTransitionOptions = {
40 | duration: 300,
41 | iosdelay: 50,
42 | androiddelay: 100
43 | };
44 | this.nativePageTransitions.fade(opt);
45 | }
46 |
47 | fetch(searchOpt?: any) {
48 | this.onProgress = true;
49 | this.clientProvider.getListPosts(this.page, this.options)
50 | .subscribe(res => {
51 | this.onInitProgress = (this.page == 1 ? false : true);
52 | this.posts = res;
53 | this.onProgress = false;
54 | })
55 | }
56 |
57 | refresh(refresher) {
58 | this.page = 1;
59 | this.fetch(this.options);
60 | setTimeout(() => {
61 | refresher.complete();
62 | }, 2000);
63 | }
64 |
65 | loadMore(infiniteScroll) {
66 | this.page++;
67 | setTimeout(() => {
68 | this.clientProvider.getListPosts(this.page)
69 | .subscribe(res => {
70 | res.forEach(element => {
71 | this.posts.push(element)
72 | });
73 | infiniteScroll.complete();
74 | })
75 | }, 500)
76 | }
77 |
78 | toPostContent(postDetail: any) {
79 | let opt: NativeTransitionOptions = {
80 | duration: 300,
81 | iosdelay: 50,
82 | androiddelay: 100
83 | };
84 | this.nativePageTransitions.fade(opt);
85 | this.navCtrl.push(
86 | "PostContentPage", {
87 | 'postId': postDetail.id,
88 | 'postMedia': postDetail.media
89 | });
90 | }
91 |
92 | search(event: any) {
93 | this.navCtrl.push(
94 | "SearchPage", {
95 | 'type': 'search',
96 | 'name': event.target.value
97 | }
98 | )
99 | }
100 |
101 | searchBlurred(event:any){
102 | this.showSearchBar = false;
103 | }
104 |
105 | toggleSearchBar() {
106 | this.showSearchBar = !this.showSearchBar;
107 | if (this.showSearchBar) {
108 | setTimeout(() => {
109 | this.searchbar.setFocus();
110 | }, 150);
111 | }
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/src/pages/home/recent-tab/recent-tab.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { IonicPage, Platform, NavController, Searchbar } from 'ionic-angular';
3 | import { ImgLoader } from 'ionic-image-loader';
4 | import { ImageLoaderConfig } from 'ionic-image-loader';
5 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
6 | import 'rxjs/Rx'
7 |
8 | import { ClientProvider } from '../../../providers/client.provider';
9 |
10 | @IonicPage()
11 | @Component({
12 | selector: 'tab-recent',
13 | templateUrl: 'recent-tab.html',
14 | providers: [ClientProvider]
15 | })
16 | export class RecentTabPage {
17 | @ViewChild('searchbar') searchbar: Searchbar;
18 | posts: any;
19 | page: number;
20 | onProgress: boolean;
21 | showSearchBar: boolean;
22 | searchString: string;
23 |
24 | constructor(
25 | public navCtrl: NavController,
26 | public platform: Platform,
27 | public clientProvider: ClientProvider,
28 | private nativePageTransitions: NativePageTransitions
29 | ) {
30 | this.page = 1;
31 | this.fetch();
32 | this.showSearchBar = false;
33 | }
34 |
35 | ionViewWillLeave() {
36 | this.showSearchBar = false;
37 | let opt: NativeTransitionOptions = {
38 | duration: 300,
39 | iosdelay: 50,
40 | androiddelay: 100
41 | };
42 | this.nativePageTransitions.fade(opt);
43 | }
44 |
45 | fetch() {
46 | this.onProgress = true;
47 | this.clientProvider.getListPosts(this.page)
48 | .subscribe(res => {
49 | this.posts = res;
50 | this.onProgress = false;
51 | })
52 | }
53 |
54 | refresh(refresher) {
55 | this.page = 1;
56 | this.fetch();
57 | setTimeout(() => {
58 | refresher.complete();
59 | }, 2000);
60 | }
61 |
62 | loadMore(infiniteScroll) {
63 | this.page++;
64 | setTimeout(() => {
65 | this.clientProvider.getListPosts(this.page)
66 | .subscribe(res => {
67 | res.forEach(element => {
68 | this.posts.push(element)
69 | });
70 | infiniteScroll.complete();
71 | })
72 | }, 500)
73 | }
74 |
75 | toPostContent(postDetail: any) {
76 | let opt: NativeTransitionOptions = {
77 | duration: 100,
78 | iosdelay: 50,
79 | androiddelay: 100
80 | };
81 | this.nativePageTransitions.fade(opt);
82 | this.navCtrl.push(
83 | "PostContentPage", {
84 | 'postId': postDetail.id,
85 | 'postMedia': postDetail.media
86 | });
87 | }
88 |
89 | search(event: any) {
90 | let opt: NativeTransitionOptions = {
91 | duration: 100,
92 | iosdelay: 50,
93 | androiddelay: 100
94 | };
95 | this.nativePageTransitions.fade(opt);
96 | this.navCtrl.push(
97 | "SearchPage", {
98 | 'type': 'search',
99 | 'name': event.target.value
100 | }
101 | )
102 | }
103 |
104 | searchBlurred(event:any){
105 | this.showSearchBar = false;
106 | }
107 |
108 | toggleSearchBar() {
109 | this.showSearchBar = !this.showSearchBar;
110 | if (this.showSearchBar) {
111 | setTimeout(() => {
112 | this.searchbar.setFocus();
113 | }, 150);
114 | }
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/src/components/post-list/card-list/card-list.scss:
--------------------------------------------------------------------------------
1 | card-list {
2 | ion-col {
3 | @extend .fade-reveal;
4 | @extend .zoom-reveal;
5 | @extend .slide-right-reveal;
6 | @extend .slide-left-reveal;
7 | }
8 | ion-card {
9 | position: relative;
10 | width: 100% !important;
11 | margin: 0px !important;
12 | background: #fff;
13 | border-radius: 1px !important;
14 | box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
15 | &.fade-in {
16 | opacity: 1;
17 | transition: all 1.0s ease;
18 | }
19 | img {
20 | object-fit: cover;
21 | height: $card-list-image-height;
22 | @media only screen and (min-width: 768px) {
23 | height: $card-list-image-height-md;
24 | }
25 | }
26 | span.post-category {
27 | position: absolute;
28 | width: 100%;
29 | top: 0;
30 | margin: 0;
31 | padding: 10px;
32 | background: linear-gradient(to top, transparent, #444) !important;
33 | white-space: pre-line;
34 | text-transform: uppercase;
35 | font-size: 0.9rem;
36 | font-weight: 700;
37 | letter-spacing: 3px;
38 | }
39 | ion-card-content {
40 | height: $card-list-height;
41 | padding: $card-list-content-padding !important;
42 | ion-card-title {
43 | font-weight: 700;
44 | font-size: $card-list-title-font-size !important;
45 | @media only screen and (min-width: 768px) {
46 | font-size: $card-list-title-font-size-md !important;
47 | }
48 | }
49 | p.post-date {
50 | position: absolute;
51 | bottom: 0;
52 | right: 0;
53 | margin: $card-list-date-margin;
54 | text-align: right;
55 | font-size: $card-list-date-font-size !important;
56 | }
57 | }
58 | &.no-image-card {
59 | ion-card-content {
60 | height: $card-list-height + $card-list-image-height;
61 | @media only screen and (min-width: 768px) {
62 | height: $card-list-height + $card-list-image-height-md;
63 | }
64 | ion-card-title {
65 | font-size: $card-list-no-image-title-font-size !important;
66 | @media only screen and (min-width: 768px) {
67 | font-size: $card-list-no-image-title-font-size-md !important;
68 | }
69 | }
70 | p {
71 | &.post-date {
72 | margin: $card-list-date-margin;
73 | }
74 | &.post-category {
75 | padding: 10px 0px;
76 | white-space: pre-line;
77 | text-transform: uppercase;
78 | font-size: 0.9rem;
79 | font-weight: 700;
80 | letter-spacing: 3px;
81 | }
82 | }
83 | }
84 | }
85 | }
86 | }
--------------------------------------------------------------------------------
/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { Nav, Platform, ModalController } from 'ionic-angular';
3 | import { StatusBar, Splashscreen } from 'ionic-native';
4 | import { Storage } from '@ionic/storage';
5 | import { OneSignal } from '@ionic-native/onesignal';
6 | import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
7 |
8 | import { OneSignalConst, AdMobConst } from '../constants/variables.constant';
9 | import { AuthProvider } from '../providers/auth.provider';
10 |
11 | @Component({
12 | templateUrl: 'app.html',
13 | providers: [OneSignal]
14 | })
15 | export class MyApp {
16 | @ViewChild(Nav) nav: Nav;
17 |
18 | rootPage: any;
19 | pages: Array<{ title: string, component: any }>;
20 | isAuth;
21 |
22 | constructor(
23 | private auth: AuthProvider,
24 | public platform: Platform,
25 | private modalCtrl: ModalController,
26 | private storage: Storage,
27 | private oneSignal: OneSignal,
28 | private admobFree: AdMobFree
29 | ) {
30 | this.initializeApp();
31 |
32 | this.pages = [
33 | { title: 'Home', component: "HomePage" },
34 | { title: 'Bookmark', component: "BookmarkPage" },
35 | { title: 'Settings', component: "SettingPage" },
36 | { title: 'About', component: "AboutPage" },
37 | { title: 'Contact', component: "ContactPage" }
38 | ];
39 | }
40 |
41 | checkAuth() {
42 | this.auth.getToken().then(res => {
43 | this.isAuth = ((res == null) ? false : true);
44 | })
45 | }
46 |
47 | initializeApp() {
48 | this.platform.ready().then(() => {
49 | StatusBar.styleDefault();
50 | Splashscreen.hide();
51 |
52 | this.storage.get('isInit').then((val) => {
53 | if (val != null) {
54 | this.rootPage = "HomePage";
55 | }
56 | else this.rootPage = "WelcomePage";
57 | });
58 |
59 | //OneSignal Config
60 | if (this.platform.is('android')) {
61 | let kOSSettingsKeyAutoPrompt: boolean = true;
62 | let kOSSettingsKeyInAppLaunchURL: boolean = false
63 |
64 | this.oneSignal.startInit(
65 | OneSignalConst.APP_ID,
66 | OneSignalConst.GOOGLE_PROJECT_ID
67 | );
68 | this.oneSignal.handleNotificationOpened().subscribe(jsonData => {
69 | this.nav.push("PostContentPage", {
70 | postId: jsonData.notification.payload.additionalData.id
71 | })
72 | });
73 | this.oneSignal.endInit();
74 | }
75 |
76 | //AdMob Config
77 | const bannerConfig: AdMobFreeBannerConfig = {
78 | isTesting: true,
79 | autoShow: true
80 | };
81 | this.admobFree.banner.config(bannerConfig);
82 |
83 | // this.admobFree.banner.prepare()
84 | // .then(() => { })
85 | // .catch(e => console.log(e));
86 | });
87 | this.checkAuth();
88 | }
89 |
90 | openPage(page) {
91 | if (this.nav.getActive().name != page.component) {
92 | this.nav.setRoot(page.component);
93 | }
94 | }
95 |
96 | openModal(modalName) {
97 | let modal = this.modalCtrl.create(modalName);
98 | modal.present();
99 | }
100 |
101 | logout() {
102 | this.auth.logout()
103 | .then(success => {
104 | console.log(success);
105 | this.checkAuth();
106 | })
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/src/pages/search/posts-tab/posts-tab.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { IonicPage, NavController, NavParams, Navbar, Searchbar } from 'ionic-angular';
3 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
4 | import 'rxjs/Rx'
5 |
6 | import { ClientProvider } from '../../../providers/client.provider';
7 |
8 | @IonicPage()
9 | @Component({
10 | selector: 'page-posts-tab',
11 | templateUrl: 'posts-tab.html',
12 | providers: [ClientProvider]
13 | })
14 | export class PostsTabPage {
15 | @ViewChild('searchbar') searchbar: Searchbar;
16 | @ViewChild(Navbar) navBar: Navbar;
17 | options: any;
18 | posts: any;
19 | page: number;
20 | pageTitle: string;
21 | onProgress: boolean;
22 | onInitProgress: boolean;
23 | showSearchBar: boolean;
24 |
25 | constructor(
26 | public navCtrl: NavController,
27 | public navParams: NavParams,
28 |
29 | private nativePageTransitions: NativePageTransitions,
30 | public clientProvider: ClientProvider
31 | ) {
32 | this.init();
33 | }
34 |
35 | ionViewWillEnter() {
36 | if (this.options[0].id != this.navParams.data.name) {
37 | this.init()
38 | }
39 | }
40 |
41 | ionViewDidLoad() {
42 | this.navBar.backButtonClick = (e: UIEvent) => {
43 | this.navCtrl.parent.viewCtrl.dismiss();
44 | };
45 | }
46 |
47 | ionViewWillLeave() {
48 | this.showSearchBar = false;
49 | }
50 |
51 | init(){
52 | this.pageTitle = this.navParams.data.name;
53 | this.options = [{
54 | type: 'search',
55 | id: this.navParams.data.name
56 | }]
57 | this.page = 1;
58 | this.fetch(this.options);
59 | }
60 |
61 | fetch(opt: any) {
62 | this.onProgress = true;
63 | this.clientProvider.getListPosts(this.page, this.options)
64 | .subscribe(res => {
65 | this.onInitProgress = (this.page == 1 ? false : true);
66 | this.posts = res;
67 | this.onProgress = false;
68 | })
69 | }
70 |
71 | refresh(refresher) {
72 | this.page = 1;
73 | this.fetch(this.options);
74 | setTimeout(() => {
75 | refresher.complete();
76 | }, 2000);
77 | }
78 |
79 | loadMore(infiniteScroll) {
80 | this.page++;
81 | setTimeout(() => {
82 | this.clientProvider.getListPosts(this.page)
83 | .subscribe(res => {
84 | res.forEach(element => {
85 | this.posts.push(element)
86 | });
87 | infiniteScroll.complete();
88 | })
89 | }, 500)
90 | }
91 |
92 | toPostContent(postDetail: any) {
93 | let opt: NativeTransitionOptions = {
94 | duration: 300,
95 | iosdelay: 50,
96 | androiddelay: 100
97 | };
98 | this.nativePageTransitions.fade(opt);
99 | this.navCtrl.push(
100 | "PostContentPage", {
101 | 'postId': postDetail.id,
102 | 'postMedia': postDetail.media
103 | });
104 | }
105 |
106 | search(event: any) {
107 | this.navParams.data.name = event.target.value;
108 | this.init();
109 | }
110 |
111 | searchBlurred(event:any){
112 | this.showSearchBar = false;
113 | }
114 |
115 | toggleSearchBar() {
116 | this.showSearchBar = !this.showSearchBar;
117 | if (this.showSearchBar) {
118 | setTimeout(() => {
119 | this.searchbar.setFocus();
120 | }, 150);
121 | }
122 | }
123 | }
--------------------------------------------------------------------------------
/src/pages/author/author.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewChild } from '@angular/core';
2 | import { IonicPage, NavController, NavParams, Searchbar } from 'ionic-angular';
3 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
4 | import 'rxjs/Rx'
5 |
6 | import { ClientProvider } from '../../providers/client.provider';
7 |
8 | @IonicPage()
9 | @Component({
10 | selector: 'page-author',
11 | templateUrl: 'author.html',
12 | providers: [ClientProvider]
13 | })
14 | export class AuthorPage {
15 | @ViewChild('searchbar') searchbar: Searchbar;
16 | pageTitle: string;
17 | options: any;
18 | authorAvatar: any;
19 | posts: any;
20 | page: number;
21 | onProgress: boolean;
22 | onInitProgress: boolean;
23 | showSearchBar: boolean;
24 |
25 | constructor(
26 | public navCtrl: NavController,
27 | public navParams: NavParams,
28 | private nativePageTransitions: NativePageTransitions,
29 | public clientProvider: ClientProvider
30 | ) {
31 | this.pageTitle = this.navParams.get('name');
32 | this.options = this.navParams.get('opt');
33 | this.page = 1;
34 | this.fetchAuthor();
35 | this.fetch();
36 | this.showSearchBar = false;
37 | }
38 |
39 | ionViewWillLeave() {
40 | this.showSearchBar = false;
41 | let opt: NativeTransitionOptions = {
42 | duration: 300,
43 | iosdelay: 50,
44 | androiddelay: 100
45 | };
46 | this.nativePageTransitions.fade(opt);
47 | }
48 |
49 | fetchAuthor(){
50 | this.clientProvider.getAuthor(this.navParams.get('id'))
51 | .subscribe(res => {
52 | this.authorAvatar = res.avatar_urls[96];
53 | console.log(res);
54 | })
55 | }
56 |
57 | fetch(searchOpt?: any) {
58 | this.onProgress = true;
59 | this.clientProvider.getListPosts(this.page, this.options)
60 | .subscribe(res => {
61 | this.onInitProgress = (this.page == 1 ? false : true);
62 | this.posts = res;
63 | this.onProgress = false;
64 | })
65 | }
66 |
67 | refresh(refresher) {
68 | this.page = 1;
69 | this.fetch(this.options);
70 | setTimeout(() => {
71 | refresher.complete();
72 | }, 2000);
73 | }
74 |
75 | loadMore(infiniteScroll) {
76 | this.page++;
77 | setTimeout(() => {
78 | this.clientProvider.getListPosts(this.page)
79 | .subscribe(res => {
80 | res.forEach(element => {
81 | this.posts.push(element)
82 | });
83 | infiniteScroll.complete();
84 | })
85 | }, 500)
86 | }
87 |
88 | toPostContent(postDetail: any) {
89 | let opt: NativeTransitionOptions = {
90 | duration: 300,
91 | iosdelay: 50,
92 | androiddelay: 100
93 | };
94 | this.nativePageTransitions.fade(opt);
95 | this.navCtrl.push(
96 | "PostContentPage", {
97 | 'postId': postDetail.id,
98 | 'postMedia': postDetail.media
99 | });
100 | }
101 |
102 | search(event: any) {
103 | this.navCtrl.push(
104 | "SearchPage", {
105 | 'type': 'search',
106 | 'name': event.target.value
107 | }
108 | )
109 | }
110 |
111 | searchBlurred(event:any){
112 | console.log(event);
113 | this.showSearchBar = false;
114 | }
115 |
116 | toggleSearchBar() {
117 | this.showSearchBar = !this.showSearchBar;
118 | if (this.showSearchBar) {
119 | setTimeout(() => {
120 | this.searchbar.setFocus();
121 | }, 150);
122 | }
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/src/pages/post-content/post-content.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { IonicPage, NavController, ViewController, NavParams, ToastController, ModalController } from 'ionic-angular';
3 | import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
4 | import { SocialSharing } from '@ionic-native/social-sharing';
5 | import { NativeStorage } from '@ionic-native/native-storage';
6 | import { NativePageTransitions, NativeTransitionOptions } from '@ionic-native/native-page-transitions';
7 | import { ImgLoader } from 'ionic-image-loader';
8 | import { ImageLoaderConfig } from 'ionic-image-loader';
9 | import 'rxjs/Rx';
10 |
11 | import { ClientProvider } from '../../providers/client.provider';
12 | import { StorageProvider } from '../../providers/storage.provider';
13 |
14 | @IonicPage()
15 | @Component({
16 | selector: 'page-post-content',
17 | templateUrl: 'post-content.html',
18 | providers: [ClientProvider, StorageProvider, SocialSharing]
19 | })
20 | export class PostContentPage {
21 | postId: number;
22 | postMedia: string;
23 | post: any = [];
24 | headercontent: any;
25 | onProgress: boolean;
26 | onImgProgress: boolean;
27 | isBookmarked: boolean;
28 |
29 | constructor(
30 | private navCtrl: NavController,
31 | private viewCtrl: ViewController,
32 | private navParams: NavParams,
33 | private modalCtrl: ModalController,
34 | public clientProvider: ClientProvider,
35 | public storageProvider: StorageProvider,
36 | private toastCtrl: ToastController,
37 | private socialSharing: SocialSharing,
38 | private nativePageTransitions: NativePageTransitions,
39 | private imageLoaderConfig: ImageLoaderConfig,
40 | private sanitizer: DomSanitizer
41 | ) {
42 | imageLoaderConfig.enableSpinner(false);
43 | this.postId = this.navParams.get("postId");
44 | this.onProgress = true;
45 | this.onImgProgress = true;
46 | this.fetch(this.postId);
47 | }
48 |
49 | ionViewWillEnter() {
50 | this.viewCtrl.setBackButtonText("");
51 | }
52 |
53 | ionViewWillLeave() {
54 | let opt: NativeTransitionOptions = {
55 | duration: 100,
56 | iosdelay: 0,
57 | androiddelay: 0
58 | };
59 | this.nativePageTransitions.fade(opt);
60 | }
61 |
62 | fetch(id) {
63 | this.clientProvider.getPostContent(id)
64 | .subscribe(res => {
65 | this.post = res;
66 | this.post.content.bypassRendered = this.sanitizer.bypassSecurityTrustHtml(this.post.content.rendered);
67 | this.onProgress = false;
68 | this.storageProvider.isDuplicate(res)
69 | .then(res => {
70 | this.isBookmarked = (res == null ? false : true);
71 | })
72 | })
73 |
74 | }
75 |
76 | bookmark(post) {
77 | if (!this.isBookmarked) {
78 | this.storageProvider.saveBookmark(post)
79 | .then(() => {
80 | let toast = this.toastCtrl.create({
81 | message: 'Bookmark added!',
82 | duration: 3000,
83 | position: 'bottom'
84 | })
85 | toast.present();
86 | this.isBookmarked = true;
87 | })
88 | } else {
89 | this.storageProvider.removeBookmark(post)
90 | .then(() => {
91 | let toast = this.toastCtrl.create({
92 | message: 'Post removed from bookmark.',
93 | duration: 3000,
94 | position: 'bottom'
95 | })
96 | toast.present();
97 | this.isBookmarked = false;
98 | })
99 | }
100 | }
101 |
102 | share(link) {
103 | this.socialSharing.share("", "", null, link);
104 | }
105 |
106 | openComment() {
107 | let commentModal = this.modalCtrl.create("CommentModal", {
108 | id: this.post.id,
109 | url: this.post.link
110 | });
111 | commentModal.present();
112 | }
113 |
114 | goToAuthor(id: number, name: string) {
115 | this.navCtrl.push("AuthorPage", {
116 | 'opt': [{
117 | 'type': 'author',
118 | 'id': id
119 | }],
120 | 'id': id,
121 | 'name': name
122 | })
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/src/assets/fonts/Lora/SIL Open Font License.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2013, Cyreal (www.cyreal.org a@cyreal.org), with
2 | Reserved Font Name 'Lora'
3 |
4 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
5 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6 |
7 | -----------------------------------------------------------
8 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
9 | -----------------------------------------------------------
10 |
11 | PREAMBLE
12 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
13 |
14 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
15 |
16 | DEFINITIONS
17 | "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
18 |
19 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s).
20 |
21 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
22 |
23 | "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
24 |
25 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
26 |
27 | PERMISSION & CONDITIONS
28 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
29 |
30 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
31 |
32 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
33 |
34 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
35 |
36 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
37 |
38 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
39 |
40 | TERMINATION
41 | This license becomes null and void if any of the above conditions are not met.
42 |
43 | DISCLAIMER
44 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
/src/assets/fonts/SIL Open Font License.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010, Matt McInerney (matt@pixelspread.com),
2 | Copyright (c) 2011, Pablo Impallari (www.impallari.com|impallari@gmail.com),
3 | Copyright (c) 2011, Rodrigo Fuenzalida (www.rfuenzalida.com|hello@rfuenzalida.com), with Reserved Font Name Raleway
4 |
5 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
6 | This license is copied below, and is also available with a FAQ at:
7 | http://scripts.sil.org/OFL
8 |
9 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
10 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
11 |
12 | -----------------------------------------------------------
13 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
14 | -----------------------------------------------------------
15 |
16 | PREAMBLE
17 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
20 |
21 | DEFINITIONS
22 | "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
23 |
24 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s).
25 |
26 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
27 |
28 | "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
29 |
30 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
31 |
32 | PERMISSION & CONDITIONS
33 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
34 |
35 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
36 |
37 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
38 |
39 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
40 |
41 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
42 |
43 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
44 |
45 | TERMINATION
46 | This license becomes null and void if any of the above conditions are not met.
47 |
48 | DISCLAIMER
49 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
/src/providers/client.provider.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { Http, Headers, Response, RequestOptions } from '@angular/http';
3 | import { Observable } from 'rxjs/Observable';
4 | import 'rxjs/Rx';
5 | import { AuthProvider } from './auth.provider';
6 | import { Post } from '../model/post.model';
7 | import { WP_API } from '../constants/endpoint.constant';
8 |
9 | @Injectable()
10 | export class ClientProvider {
11 | jwtToken: any
12 |
13 | constructor(private http: Http, private auth: AuthProvider) {
14 | this.fetchToken().subscribe(res => {
15 | this.jwtToken = res;
16 | })
17 | }
18 |
19 | getListPosts(page: number, param?: any) {
20 | let paramString: string = "";
21 | if (param != null) {
22 | paramString = this.transParams(param);
23 | }
24 | let fields = '&fields=id,title,date,categories,author,better_featured_image,pure_taxonomies,_embedded.author';
25 | return this.http.get(`${WP_API.GET_POSTS}?page=${page}${paramString}${fields}&_embed`)
26 | .map(res => {
27 | let postJson = res.json();
28 | return postJson;
29 | })
30 | }
31 |
32 | getListCategories(page: number, param?: any) {
33 | let paramString: string = "";
34 | if (param != null) {
35 | paramString = this.transParams(param);
36 | }
37 | return this.http.get(`${WP_API.GET_CATEGORIES}?page=${page}${paramString}`)
38 | .map((res: Response) => res.json())
39 | }
40 |
41 | getListAuthors(page: number, options?: any) {
42 | let opts: string = "";
43 | if (options != null) {
44 | opts = this.transParams(options);
45 | }
46 | return this.http.get(`${WP_API.GET_USER}?page=${page}${opts}`)
47 | .map((res: Response) => res.json())
48 | }
49 |
50 | getListTags(page: number, options?: any) {
51 | let opts: string = "";
52 | if (options != null) {
53 | options.forEach(opt => {
54 | opts = opts + `&${opt.type}=${opt.id}`;
55 | })
56 | }
57 | return this.http.get(`${WP_API.GET_TAGS}?page=${page}${opts}`)
58 | .map((res: Response) => res.json())
59 | }
60 |
61 | getListPages() {
62 | return this.http.get(WP_API.GET_PAGES)
63 | .map((res: Response) => res.json())
64 | .map(res => {
65 | return res;
66 | });
67 | }
68 |
69 | getComments(id: number, page: number) {
70 | return this.http.get(`${WP_API.GET_COMMENTS}?post=${id}&page=${page}`)
71 | .map((res: Response) => res.json())
72 | .map(res => {
73 | return res;
74 | });
75 | }
76 |
77 | postCommnent(param: any) {
78 | let paramString: string = this.transParams(param);
79 | let headers = new Headers({ 'Content-Type': 'application/json' });
80 | headers.append('Authorization', 'Bearer ' + this.jwtToken.token)
81 | let options = new RequestOptions({ headers: headers });
82 | let body = '';
83 | return this.http.post(`${WP_API.POST_COMMENTS}?${paramString}`, body, options)
84 | .map((res) => res.json())
85 | .map(res => {
86 | return res;
87 | });
88 | }
89 |
90 | getMedia(id: number) {
91 | return this.http.get(WP_API.GET_MEDIA + id)
92 | .map((res: Response) => res.json())
93 | .map(res => {
94 | let thumbnail_src = (res.media_details.sizes.thumbnail.source_url != null ? res.media_details.sizes.thumbnail.source_url : res.media_details.sizes.featured_thumbnail.source_url)
95 | return {
96 | sizes: res.media_details.sizes,
97 | featured: res.source_url
98 | };
99 | });
100 | }
101 |
102 | getAuthor(id: number) {
103 | let fields = '?fields=id,name,avatar_urls';
104 | return this.http.get(`${WP_API.GET_USER}${id}${fields}`)
105 | .map((res: Response) => res.json())
106 | .map(res => {
107 | return res;
108 | });
109 | }
110 |
111 | getCategory(id: number) {
112 | let fields = '?fields=id,name';
113 | return this.http.get(`${WP_API.GET_CATEGORIES}${id}${fields}`)
114 | .map((res: Response) => res.json())
115 | .map(res => {
116 | return res;
117 | })
118 | }
119 |
120 | getPostContent(id: number) {
121 | let fields = '?fields=id,title,date,link,categories,author,content,better_featured_image,pure_taxonomies,_embedded.author';
122 | return this.http.get(`${WP_API.GET_POSTS}/${id}${fields}&_embed`)
123 | .map((res: Response) => res.json())
124 | .map(res => {
125 | return res;
126 | });
127 | }
128 |
129 | transParams(param: any) {
130 | let opts: string = "";
131 | if (param != null) {
132 | param.forEach(opt => {
133 | opts = opts + `&${opt.type}=${opt.id}`;
134 | })
135 | }
136 | return opts;
137 | }
138 |
139 | fetchToken() {
140 | return Observable.fromPromise(this.auth.getToken())
141 | .map(res => {
142 | return res;
143 | });
144 | }
145 | }
--------------------------------------------------------------------------------
/src/assets/fonts/Apache License.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
--------------------------------------------------------------------------------