ilog 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +6 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +7 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +44 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/ilog.gemspec +29 -0
  13. data/lib/ilog/assets/favicon.ico +0 -0
  14. data/lib/ilog/assets/images/.gitkeep +0 -0
  15. data/lib/ilog/assets/javascripts/.gitkeep +0 -0
  16. data/lib/ilog/assets/javascripts/index.js +60723 -0
  17. data/lib/ilog/assets/javascripts/vue-config.js +92 -0
  18. data/lib/ilog/assets/javascripts/vue-index.js +60725 -0
  19. data/lib/ilog/assets/stylesheets/.gitkeep +0 -0
  20. data/lib/ilog/assets/stylesheets/log-style.css +3858 -0
  21. data/lib/ilog/assets/stylesheets/style.css +3858 -0
  22. data/lib/ilog/config/routes.rb +13 -0
  23. data/lib/ilog/configuration.rb +8 -0
  24. data/lib/ilog/controllers/.gitkeep +0 -0
  25. data/lib/ilog/controllers/digital/show.rb +23 -0
  26. data/lib/ilog/controllers/digital/tags.rb +15 -0
  27. data/lib/ilog/controllers/index/.DS_Store +0 -0
  28. data/lib/ilog/controllers/index/digital.rb +27 -0
  29. data/lib/ilog/controllers/index/index.rb +95 -0
  30. data/lib/ilog/controllers/platform/platform.rb +12 -0
  31. data/lib/ilog/controllers/post/post.rb +12 -0
  32. data/lib/ilog/models/item.rb +5 -0
  33. data/lib/ilog/models/post.rb +9 -0
  34. data/lib/ilog/models/stuff.rb +8 -0
  35. data/lib/ilog/templates/application.html.erb +11 -0
  36. data/lib/ilog/templates/digital/show.html.erb +0 -0
  37. data/lib/ilog/templates/digital/tags.html.erb +0 -0
  38. data/lib/ilog/templates/index/digital.html.erb +40 -0
  39. data/lib/ilog/templates/index/index.html.haml +10 -0
  40. data/lib/ilog/templates/index/vue.html.erb +0 -0
  41. data/lib/ilog/templates/platform/platform.html.erb +0 -0
  42. data/lib/ilog/templates/post/post.html.erb +0 -0
  43. data/lib/ilog/version.rb +3 -0
  44. data/lib/ilog/views/application_layout.rb +7 -0
  45. data/lib/ilog/views/digital/show.rb +9 -0
  46. data/lib/ilog/views/digital/tags.rb +9 -0
  47. data/lib/ilog/views/index/.DS_Store +0 -0
  48. data/lib/ilog/views/index/digital.rb +10 -0
  49. data/lib/ilog/views/index/index.rb +10 -0
  50. data/lib/ilog/views/platform/platform.rb +9 -0
  51. data/lib/ilog/views/post/post.rb +9 -0
  52. data/lib/ilog.rb +331 -0
  53. data/mix-manifest.json +5 -0
  54. data/package.json +40 -0
  55. data/src/js/vue-config.js +7 -0
  56. data/src/sass/.DS_Store +0 -0
  57. data/src/sass/_variables.scss +3 -0
  58. data/src/sass/components/.DS_Store +0 -0
  59. data/src/sass/components/article-text.scss +223 -0
  60. data/src/sass/components/card.scss +33 -0
  61. data/src/sass/components/post.scss +5 -0
  62. data/src/sass/components/selectize.scss +324 -0
  63. data/src/sass/components/single.scss +80 -0
  64. data/src/sass/components/tag.scss +46 -0
  65. data/src/sass/fonts/headings.scss +105 -0
  66. data/src/sass/fonts/pure.scss +29 -0
  67. data/src/sass/libs/selectize.scss +8 -0
  68. data/src/sass/log/.DS_Store +0 -0
  69. data/src/sass/log/base.scss +132 -0
  70. data/src/sass/log/grid.scss +82 -0
  71. data/src/sass/log/instagram-header.scss +123 -0
  72. data/src/sass/log/list.scss +242 -0
  73. data/src/sass/log/style.scss +3 -0
  74. data/src/sass/log/treestyle-addons.scss +102 -0
  75. data/src/sass/log/treestyle.scss +163 -0
  76. data/src/sass/style.scss +28 -0
  77. data/src/vue/Log.vue +257 -0
  78. data/src/vue/components/.DS_Store +0 -0
  79. data/src/vue/components/Item.vue +46 -0
  80. data/src/vue/components/Modal.vue +27 -0
  81. data/src/vue/components/Post.vue +125 -0
  82. data/src/vue/components/PostBody.vue +86 -0
  83. data/src/vue/components/Stuff.vue +63 -0
  84. data/src/vue/configs/app.js +5 -0
  85. data/src/vue/configs/axios.js +14 -0
  86. data/src/vue/elements/People.vue +75 -0
  87. data/src/vue/elements/Profile.vue +63 -0
  88. data/src/vue/elements/Tunekit.vue +82 -0
  89. data/src/vue/index.js +30 -0
  90. data/src/vue/router.js +50 -0
  91. data/src/vue/views/.DS_Store +0 -0
  92. data/src/vue/views/Introduction.vue +88 -0
  93. data/src/vue/views/List.vue +46 -0
  94. data/src/vue/views/Post.vue +163 -0
  95. data/webpack.mix.js +6 -0
  96. metadata +141 -0
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <div class="search-form">
3
+ <form v-on:submit.prevent="onSubmit" class="pure-form">
4
+ <multiselect
5
+ placeholder="mention"
6
+ v-model="person"
7
+ :options="people"
8
+ track-by="id"
9
+ label="identifier"
10
+ :multiple="false"
11
+ :taggable="true"
12
+ @tag="addPeople"
13
+ class="input-multiselect"
14
+ selectLabel=""
15
+ deselect-label=""
16
+ :loading="isLoading"
17
+ @search-change="asyncFind"
18
+ ></multiselect>
19
+ <button type="submit"><i class="fas fa-filter"></i></button>
20
+ </form>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+
26
+ import app from '../configs/app'
27
+ import Multiselect from 'vue-multiselect'
28
+ export default {
29
+ name: 'People',
30
+ props: [],
31
+ components: {
32
+ Multiselect
33
+ },
34
+ data () {
35
+ return {
36
+ person: null,
37
+ people: [],
38
+ isLoading: false,
39
+ }
40
+ },
41
+ methods: {
42
+ asyncFind (query) {
43
+ this.isLoading = true;
44
+ let self = this;
45
+ this.$http.get(app.host + '/modules/people/search/?person=' + encodeURIComponent(query))
46
+ .then(function(response){
47
+ console.log(query)
48
+ self.people = response.data
49
+ self.isLoading = false
50
+ });
51
+ },
52
+ addPeople (newPerson) {
53
+ const person = {
54
+ name: newPerson,
55
+ }
56
+ this.people.push(person)
57
+ },
58
+ onSubmit () {
59
+ if (this.person.id != '') {
60
+ this.$router.push({ name: 'mention', params: { id: this.person.id, identifier: this.person.identifier }})
61
+ } else {
62
+
63
+ }
64
+ },
65
+ },
66
+ created() {
67
+
68
+ },
69
+ filters: {
70
+
71
+ },
72
+ watch: {
73
+ }
74
+ }
75
+ </script>
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <div class="profile">
3
+ <span class="avatar-container"><img class="avatar" :src="avatar" /></span>
4
+ <div>
5
+ <span class="h2"><a :href="website">{{ author }}</a></span><br />
6
+ <span class="detail">
7
+ <a :href="address"><i class="fas fa-book"></i> Digital Log</a> | <i class="fas fa-map-marked-alt"></i> {{ location }}
8
+ </span><br />
9
+ <span class="status">{{ status }}</span>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+
16
+ import app from '../configs/app'
17
+
18
+ export default {
19
+ name: 'Profile',
20
+ components: {
21
+ },
22
+ data () {
23
+ return {
24
+ address: '',
25
+ location: app.profile.location,
26
+ author: app.profile.author,
27
+ status: app.profile.status,
28
+ avatar: app.profile.avatar,
29
+ // email: app.profile.email,
30
+ website: app.profile.website,
31
+ tag: {},
32
+ tags: [],
33
+ dashboard_1: '',
34
+ dashboard_2: '',
35
+ rss: '',
36
+ atom: '',
37
+ }
38
+ },
39
+ methods: {
40
+ },
41
+ created() {
42
+ this.address = app.host;
43
+ this.dashboard_1 = Window.Config.dasbhoard_1
44
+ this.dashboard_2 = Window.Config.dasbhoard_2
45
+
46
+ this.rss = app.host + '/feed/rss'
47
+ this.atom = app.host + '/feed/atom'
48
+ },
49
+ filters: {
50
+ capitalize: function(text) {
51
+ return text[0].toUpperCase() + text.slice(1);
52
+ },
53
+ fromNow: function(date) {
54
+ return moment(date).fromNow();
55
+ }
56
+ },
57
+ watch: {
58
+ }
59
+ }
60
+ </script>
61
+
62
+ <style scoped>
63
+ </style>
@@ -0,0 +1,82 @@
1
+ <template>
2
+
3
+ <div class="tunekit">
4
+ <div id="tags" class="content search-form" style="overflow: visible;">
5
+ <div v-if="tags">
6
+ <form v-on:submit.prevent="onSubmit" class="pure-form">
7
+ <multiselect
8
+ placeholder="tag"
9
+ v-model="tag"
10
+ :options="tags"
11
+ track-by="id"
12
+ label="word"
13
+ :multiple="false"
14
+ :taggable="true"
15
+ class="input-multiselect"
16
+ selectLabel=""
17
+ deselect-label=""
18
+ ></multiselect>
19
+ <button type="submit"><i class="fas fa-filter"></i></button>
20
+ </form>
21
+
22
+ </div>
23
+ </div>
24
+
25
+ <div id="search" class="content" style="overflow: visible;">
26
+ <people></people>
27
+ </div>
28
+
29
+ </div>
30
+
31
+ </template>
32
+
33
+ <script>
34
+
35
+ import app from '../configs/app'
36
+ import People from '../elements/People'
37
+ import Multiselect from 'vue-multiselect'
38
+
39
+ export default {
40
+ name: 'Tunekit',
41
+ components: {
42
+ People,
43
+ Multiselect,
44
+ },
45
+ data () {
46
+ return {
47
+ tag: {},
48
+ tags: [],
49
+ }
50
+ },
51
+ methods: {
52
+ onSubmit () {
53
+ this.$router.push({ name: 'tag', params: { id: this.tag.id } })
54
+ },
55
+ },
56
+ created() {
57
+ let self = this
58
+ this.$http.get(app.host + '/modules/tags/')
59
+ .then(function(response){
60
+ self.tags = response.data
61
+ });
62
+ this.dashboard_1 = Window.Config.dasbhoard_1
63
+ this.dashboard_2 = Window.Config.dasbhoard_2
64
+ },
65
+ filters: {
66
+ capitalize: function(text) {
67
+ return text[0].toUpperCase() + text.slice(1);
68
+ },
69
+ fromNow: function(date) {
70
+ return moment(date).fromNow();
71
+ }
72
+ },
73
+ watch: {
74
+ }
75
+ }
76
+ </script>
77
+
78
+ <style scoped>
79
+ .tag {
80
+ float: left;
81
+ }
82
+ </style>
data/src/vue/index.js ADDED
@@ -0,0 +1,30 @@
1
+ import Vue from 'vue';
2
+
3
+ import VueRouter from 'vue-router';
4
+ import Meta from 'vue-meta'
5
+
6
+ Vue.use(VueRouter);
7
+ Vue.use(Meta)
8
+
9
+ Vue.config.productionTip = false
10
+
11
+ import axiosApp from './configs/axios';
12
+
13
+ Vue.prototype.$http = axiosApp;
14
+
15
+ import {VueMasonryPlugin} from 'vue-masonry';
16
+ Vue.use(VueMasonryPlugin)
17
+
18
+ import lodash from 'lodash';
19
+ Object.defineProperty(Vue.prototype, '_', { value: lodash });
20
+
21
+ import Ilog from './Ilog'
22
+
23
+ import router from './router.js'
24
+
25
+ const ibaIlog = new Vue({
26
+ el: '#bp-log',
27
+ router,
28
+ template: '<Ilog/>',
29
+ components: { Ilog },
30
+ })
data/src/vue/router.js ADDED
@@ -0,0 +1,50 @@
1
+ import VueRouter from 'vue-router'
2
+
3
+ import Post from './components/PostBody'
4
+
5
+ let routes = [
6
+ {
7
+ path: '/',
8
+ name: 'home',
9
+ /*
10
+ components: {
11
+ single: ''
12
+ }
13
+ */
14
+ },
15
+ {
16
+ path: '/tag/:id/',
17
+ name: 'tag',
18
+ },
19
+ {
20
+ path: '/mention/:id/',
21
+ name: 'mention',
22
+ },
23
+ {
24
+ path: '/:id/',
25
+ name: 'post',
26
+ pathToRegexpOptions: { strict: true }
27
+ },
28
+ ];
29
+
30
+ export default new VueRouter({
31
+ mode: 'history',
32
+ base: '/' + Window.Config.digital.uri,
33
+ routes,
34
+ scrollBehavior (to, from, savedPosition) {
35
+ if (to.hash) {
36
+ return {
37
+ selector: to.hash
38
+ // , offset: { x: 0, y: 10 }
39
+ }
40
+ }
41
+ if ( to.name == 'tag' ) {
42
+ return { x: 0, y: 0 }
43
+ }
44
+ /* FIX THIS ISSUE FROM NAVIGATING TO A TAG FROM INSIDE A POST
45
+ if ( to.name != 'post' ) {
46
+ return { x: 0, y: 0 }
47
+ }
48
+ */
49
+ }
50
+ });
Binary file
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <div>
3
+ <div class="post-single">
4
+ <article class="text shadow">
5
+ <div>
6
+ <h2>{{ content.title.value }}</h2>
7
+ </div>
8
+ <div>
9
+ <span class="mc tag">{{ content.timestamp.publish | date }}</span> |
10
+ <template v-if="content.bundles">
11
+ <template v-for="bundle in content.bundles" v-if="bundle.type == 'category'">
12
+ <router-link class="inlink-sc" :to="{ name: 'categories', params: { slug: bundle.slug.value }}">
13
+ {{ bundle.title.value }}
14
+ </router-link>
15
+ </template>
16
+ </template>
17
+ </div>
18
+ <div v-html="content.content">
19
+ </div>
20
+ <div>
21
+ <template v-if="content.keywords">
22
+ <template v-for="keyword in content.keywords">
23
+ <span class="mc"><router-link :to="{ name: 'home', query: { tag: keyword.word }}">
24
+ #{{ keyword.word }}
25
+ </router-link>, </span>
26
+ </template>
27
+ </template>
28
+ </div>
29
+ </article>
30
+ </div>
31
+ </div>
32
+ </template>
33
+
34
+ <script>
35
+
36
+ import app from '../configs/app'
37
+ var _ = require('underscore')
38
+ var moment = require('moment')
39
+
40
+ export default {
41
+ data () {
42
+ return {
43
+ content: {},
44
+ underscore: _,
45
+ }
46
+ },
47
+ components: {
48
+ },
49
+ methods: {
50
+ initiate() {
51
+
52
+
53
+ }
54
+ },
55
+ created() {
56
+ let self = this;
57
+
58
+ this.$http.get(app.host + this.$route.params.id )
59
+ .then(function(response){
60
+ self.content = response.data
61
+ });
62
+ },
63
+ filters: {
64
+ date(date) {
65
+ return moment(date).format("MMMM D, YYYY");
66
+ }
67
+ }
68
+ }
69
+ </script>
70
+
71
+ <style>
72
+ .post-single {
73
+ padding: 2rem 0px 1rem 0px;
74
+ }
75
+ .tag-sc {
76
+ background-color: #e691e6;
77
+ }
78
+ @media screen and (min-width: 64em) {
79
+ .post-single {
80
+ margin: 0px 5vw;
81
+ }
82
+ }
83
+ @media screen and (min-width: 80em) {
84
+ .post-single {
85
+ margin: 0px 10vw;
86
+ }
87
+ }
88
+ </style>
@@ -0,0 +1,46 @@
1
+ <template>
2
+
3
+
4
+
5
+ </template>
6
+
7
+ <script>
8
+
9
+ import Item from '../components/Item'
10
+
11
+
12
+ var _ = require('underscore')
13
+
14
+ export default {
15
+ name: 'list',
16
+ props: ['items', 'collection', 'title', 'next', 'empty', 'status', 'prev'],
17
+ data () {
18
+ return {
19
+ underscore: _,
20
+ elements: {},
21
+ }
22
+ },
23
+ components: {
24
+ Tunekit,
25
+ Item,
26
+ Profile,
27
+ },
28
+ methods: {
29
+ },
30
+ created() {
31
+ },
32
+ watch: {
33
+ empty() {
34
+ // the route has changed, hence empty the elements
35
+ if (this.empty == false) { this.elements = []; }
36
+ },
37
+ items()
38
+ {
39
+ this.elements = _.union(this.elements, this.items);
40
+ }
41
+ }
42
+ }
43
+ </script>
44
+
45
+ <style>
46
+ </style>
@@ -0,0 +1,163 @@
1
+ <template>
2
+
3
+ <modal v-on:close="close()">
4
+
5
+ <template v-if="content.thumbnail">
6
+ <img :src="thumbnail" class="shadow" style="max-width: 100%; margin: 0px auto; display: block; position: relative; z-index: -1;" />
7
+ </template>
8
+
9
+ <div class="post-single">
10
+
11
+ <div class="container shadow" v-if="!isNaN($route.params.id)">
12
+ <article class="text">
13
+ <h1 v-html="content.title.value"></h1>
14
+ </article>
15
+
16
+ <article class="text" v-html="content.content"></article>
17
+ </div>
18
+
19
+ <div class="tag-container">
20
+
21
+ <template v-if="content.keywords && content.keywords.length != 0">
22
+ <template v-for="keyword in content.keywords">
23
+ <span class="tag tag-sc">
24
+ <router-link :to="{ name: 'tag', params: { id: keyword.id }}">
25
+ <i class="fas fa-tag"></i>{{ keyword.word }}
26
+ </router-link>
27
+ </span>
28
+ </template>
29
+ </template>
30
+
31
+ <div class="timestamps">
32
+ <p v-if="content.timestamp.draft">
33
+ <span class="label">Draft | </span>
34
+ {{ content.timestamp.draft | date }}
35
+ </p>
36
+ <p v-if="content.timestamp.publish">
37
+ <span class="label">Published | </span>
38
+ {{ content.timestamp.publish | date }}
39
+ </p>
40
+ <p v-if="content.timestamp.amend">
41
+ <span class="label">Updated | </span>
42
+ {{ content.timestamp.amend | date }}
43
+ </p>
44
+ </div>
45
+ </div>
46
+
47
+ <div class="container shadow" v-if="isNaN($route.params.id)">
48
+ <article class="text">
49
+ <h1 v-html="content.title"></h1>
50
+ <p><span v-html="content.date"></span></p>
51
+ </article>
52
+ <article class="text" v-html="content.content"></article>
53
+ </div>
54
+
55
+ </div>
56
+ </modal>
57
+
58
+ </template>
59
+
60
+ <script>
61
+
62
+ import app from '../configs/app'
63
+ import Modal from '../components/Modal'
64
+ var _ = require('underscore')
65
+ var moment = require('moment')
66
+
67
+ export default {
68
+ props: ['route'],
69
+ data () {
70
+ return {
71
+ content: {
72
+ title: {
73
+ value: '',
74
+ },
75
+ date: {
76
+
77
+ },
78
+ timestamp: {
79
+ publish: ''
80
+ },
81
+ },
82
+ underscore: _,
83
+ previous: null,
84
+ }
85
+ },
86
+ components: {
87
+ Modal,
88
+ },
89
+ metaInfo () {
90
+ return {
91
+ title: 'Post #' + this.content.id + ' by ' + Window.Config.profile.author + ' (Digital Log)',
92
+ meta: [{ vmid: 'description', name: 'description', content: this.content.title.value }],
93
+ }
94
+ },
95
+ methods: {
96
+ close() {
97
+ this.back()
98
+ },
99
+ initialize() {
100
+ let self = this;
101
+ this.$http.get(app.host + '/' + this.$route.params.id )
102
+ .then( function(response) {
103
+ if ( !isNaN(self.$route.params.id) ) {
104
+ self.content = response.data
105
+ }
106
+ else
107
+ {
108
+ self.content = response.data.leaf
109
+ }
110
+ });
111
+
112
+ },
113
+ back() {
114
+ /*
115
+ if (this.route == 0) {
116
+ this.$router.push({ path: '/' })
117
+ return;
118
+ }
119
+ this.$router.go(-1)
120
+ */
121
+ if (_.size(this.$parent.collection) > 0 )
122
+ {
123
+ this.$router.push({ path: this.previous })
124
+ } else {
125
+ this.$router.push({ path: '/' })
126
+ }
127
+ },
128
+ },
129
+ mounted() {
130
+ this.initialize();
131
+
132
+ },
133
+ filters: {
134
+ date(date) {
135
+ if (date)
136
+ return moment(date).format("MMMM D, YYYY");
137
+ else
138
+ return null;
139
+ }
140
+ },
141
+ watch: {
142
+ '$route.params.id': function() {
143
+ this.initialize();
144
+ }
145
+ },
146
+ beforeRouteEnter (to, from, next) {
147
+ let self = this
148
+ next(self => {
149
+ self.previous = from.fullPath
150
+ })
151
+ },
152
+ computed: {
153
+ thumbnail: function() {
154
+ return Window.Config.host + '/' + Window.Config.digital.uri + '/' + this.content.id + '/' + this.content.thumbnail.name;
155
+ },
156
+ }
157
+ }
158
+ </script>
159
+
160
+ <style scoped lang="scss">
161
+ </style>
162
+ <style lang="sass">
163
+ </style>
data/webpack.mix.js ADDED
@@ -0,0 +1,6 @@
1
+ const { mix } = require('laravel-mix');
2
+
3
+ mix
4
+ .js('assets/vue/index.js', 'assets/javascripts/vue-index.js')
5
+ .js('assets/js/vue-config', 'assets/javascripts/vue-config.js')
6
+ .sass('assets/sass/style.scss', 'assets/stylesheets/log-style.css');