blogo 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (333) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.markdown +97 -0
  4. data/Rakefile +24 -0
  5. data/app/assets/images/blogo/background.png +0 -0
  6. data/app/assets/images/blogo/github-icon-active.png +0 -0
  7. data/app/assets/images/blogo/github-icon.png +0 -0
  8. data/app/assets/images/blogo/rss-icon-active.png +0 -0
  9. data/app/assets/images/blogo/rss-icon.png +0 -0
  10. data/app/assets/images/blogo/twitter-icon-active.png +0 -0
  11. data/app/assets/images/blogo/twitter-icon.png +0 -0
  12. data/app/assets/javascripts/blogo/admin/application.js +13 -0
  13. data/app/assets/javascripts/blogo/admin/ckeditor.js +2 -0
  14. data/app/assets/javascripts/blogo/admin/helpers/post_preview.js.coffee +41 -0
  15. data/app/assets/javascripts/blogo/admin/helpers/title_to_url.js.coffee +19 -0
  16. data/app/assets/javascripts/blogo/ckeditor/ckeditor_basepath.js.erb +6 -0
  17. data/app/assets/javascripts/blogo/ckeditor/config.js.erb +41 -0
  18. data/app/assets/stylesheets/blogo/admin.sass +105 -0
  19. data/app/assets/stylesheets/blogo/blog.sass +198 -0
  20. data/app/controllers/blogo/admin/base_controller.rb +19 -0
  21. data/app/controllers/blogo/admin/comments_controller.rb +7 -0
  22. data/app/controllers/blogo/admin/images_controller.rb +44 -0
  23. data/app/controllers/blogo/admin/posts_controller.rb +64 -0
  24. data/app/controllers/blogo/admin/sessions_controller.rb +24 -0
  25. data/app/controllers/blogo/application_controller.rb +2 -0
  26. data/app/controllers/blogo/posts_controller.rb +82 -0
  27. data/app/form_builders/blogo/form_builder.rb +17 -0
  28. data/app/helpers/blogo/admin/base_helper.rb +10 -0
  29. data/app/helpers/blogo/application_helper.rb +40 -0
  30. data/app/models/blogo/post.rb +59 -0
  31. data/app/models/blogo/tag.rb +10 -0
  32. data/app/models/blogo/tagging.rb +4 -0
  33. data/app/models/blogo/user.rb +9 -0
  34. data/app/services/blogo/base_post_service.rb +51 -0
  35. data/app/services/blogo/create_post_service.rb +27 -0
  36. data/app/services/blogo/destroy_post_service.rb +13 -0
  37. data/app/services/blogo/preview_post_service.rb +20 -0
  38. data/app/services/blogo/update_post_service.rb +24 -0
  39. data/app/views/blogo/admin/comments/index.html.erb +5 -0
  40. data/app/views/blogo/admin/images/create.erb +6 -0
  41. data/app/views/blogo/admin/posts/_form.html.erb +57 -0
  42. data/app/views/blogo/admin/posts/_post_li.html.erb +14 -0
  43. data/app/views/blogo/admin/posts/edit.html.erb +5 -0
  44. data/app/views/blogo/admin/posts/index.html.erb +18 -0
  45. data/app/views/blogo/admin/posts/new.html.erb +5 -0
  46. data/app/views/blogo/admin/sessions/new.html.erb +14 -0
  47. data/app/views/blogo/admin/shared/_nav_bar.html.erb +10 -0
  48. data/app/views/blogo/posts/_icons.html.erb +11 -0
  49. data/app/views/blogo/posts/_meta.html.erb +33 -0
  50. data/app/views/blogo/posts/_paginator.html.erb +20 -0
  51. data/app/views/blogo/posts/_post_header.html.erb +20 -0
  52. data/app/views/blogo/posts/_post_overview.html.erb +9 -0
  53. data/app/views/blogo/posts/feed.atom.builder +18 -0
  54. data/app/views/blogo/posts/index.html.erb +6 -0
  55. data/app/views/blogo/posts/show.html.erb +4 -0
  56. data/app/views/blogo/shared/_aside.html.erb +24 -0
  57. data/app/views/blogo/shared/_disqus_comments.html.erb +20 -0
  58. data/app/views/blogo/shared/_google_analytics.html.erb +16 -0
  59. data/app/views/blogo/shared/_post.html.erb +7 -0
  60. data/app/views/layouts/blogo/admin.html.erb +29 -0
  61. data/app/views/layouts/blogo/blog.html.erb +41 -0
  62. data/config/routes.rb +27 -0
  63. data/db/migrate/20140218134508_create_blogo_users.rb +15 -0
  64. data/db/migrate/20140218134512_create_blogo_tags.rb +13 -0
  65. data/db/migrate/20140218134550_create_blogo_posts.rb +29 -0
  66. data/db/migrate/20140218134620_create_blogo_taggings.rb +12 -0
  67. data/lib/blogo.rb +25 -0
  68. data/lib/blogo/config.rb +46 -0
  69. data/lib/blogo/engine.rb +20 -0
  70. data/lib/blogo/errors.rb +5 -0
  71. data/lib/blogo/paginator.rb +111 -0
  72. data/lib/blogo/renderer.rb +29 -0
  73. data/lib/blogo/renderer/base.rb +48 -0
  74. data/lib/blogo/renderer/html.rb +10 -0
  75. data/lib/blogo/renderer/markdown.rb +14 -0
  76. data/lib/blogo/version.rb +3 -0
  77. data/lib/tasks/blogo_tasks.rake +25 -0
  78. data/vendor/assets/images/blogo/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  79. data/vendor/assets/images/blogo/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  80. data/vendor/assets/images/blogo/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
  81. data/vendor/assets/images/blogo/ckeditor/plugins/icons.png +0 -0
  82. data/vendor/assets/images/blogo/ckeditor/plugins/icons_hidpi.png +0 -0
  83. data/vendor/assets/images/blogo/ckeditor/plugins/image/images/noimage.png +0 -0
  84. data/vendor/assets/images/blogo/ckeditor/plugins/link/images/anchor.png +0 -0
  85. data/vendor/assets/images/blogo/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  86. data/vendor/assets/images/blogo/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  87. data/vendor/assets/images/blogo/ckeditor/plugins/magicline/images/icon.png +0 -0
  88. data/vendor/assets/images/blogo/ckeditor/skins/moono/icons.png +0 -0
  89. data/vendor/assets/images/blogo/ckeditor/skins/moono/icons_hidpi.png +0 -0
  90. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/arrow.png +0 -0
  91. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/close.png +0 -0
  92. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  93. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  94. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  95. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  96. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/lock-open.png +0 -0
  97. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/lock.png +0 -0
  98. data/vendor/assets/images/blogo/ckeditor/skins/moono/images/refresh.png +0 -0
  99. data/vendor/assets/javascripts/blogo/ckeditor/ckeditor.js +902 -0
  100. data/vendor/assets/javascripts/blogo/ckeditor/lang/af.js +5 -0
  101. data/vendor/assets/javascripts/blogo/ckeditor/lang/ar.js +5 -0
  102. data/vendor/assets/javascripts/blogo/ckeditor/lang/bg.js +5 -0
  103. data/vendor/assets/javascripts/blogo/ckeditor/lang/bn.js +5 -0
  104. data/vendor/assets/javascripts/blogo/ckeditor/lang/bs.js +5 -0
  105. data/vendor/assets/javascripts/blogo/ckeditor/lang/ca.js +5 -0
  106. data/vendor/assets/javascripts/blogo/ckeditor/lang/cs.js +5 -0
  107. data/vendor/assets/javascripts/blogo/ckeditor/lang/cy.js +5 -0
  108. data/vendor/assets/javascripts/blogo/ckeditor/lang/da.js +5 -0
  109. data/vendor/assets/javascripts/blogo/ckeditor/lang/de.js +5 -0
  110. data/vendor/assets/javascripts/blogo/ckeditor/lang/el.js +5 -0
  111. data/vendor/assets/javascripts/blogo/ckeditor/lang/en-au.js +5 -0
  112. data/vendor/assets/javascripts/blogo/ckeditor/lang/en-ca.js +5 -0
  113. data/vendor/assets/javascripts/blogo/ckeditor/lang/en-gb.js +5 -0
  114. data/vendor/assets/javascripts/blogo/ckeditor/lang/en.js +5 -0
  115. data/vendor/assets/javascripts/blogo/ckeditor/lang/eo.js +5 -0
  116. data/vendor/assets/javascripts/blogo/ckeditor/lang/es.js +5 -0
  117. data/vendor/assets/javascripts/blogo/ckeditor/lang/et.js +5 -0
  118. data/vendor/assets/javascripts/blogo/ckeditor/lang/eu.js +5 -0
  119. data/vendor/assets/javascripts/blogo/ckeditor/lang/fa.js +5 -0
  120. data/vendor/assets/javascripts/blogo/ckeditor/lang/fi.js +5 -0
  121. data/vendor/assets/javascripts/blogo/ckeditor/lang/fo.js +5 -0
  122. data/vendor/assets/javascripts/blogo/ckeditor/lang/fr-ca.js +5 -0
  123. data/vendor/assets/javascripts/blogo/ckeditor/lang/fr.js +5 -0
  124. data/vendor/assets/javascripts/blogo/ckeditor/lang/gl.js +5 -0
  125. data/vendor/assets/javascripts/blogo/ckeditor/lang/gu.js +5 -0
  126. data/vendor/assets/javascripts/blogo/ckeditor/lang/he.js +5 -0
  127. data/vendor/assets/javascripts/blogo/ckeditor/lang/hi.js +5 -0
  128. data/vendor/assets/javascripts/blogo/ckeditor/lang/hr.js +5 -0
  129. data/vendor/assets/javascripts/blogo/ckeditor/lang/hu.js +5 -0
  130. data/vendor/assets/javascripts/blogo/ckeditor/lang/id.js +5 -0
  131. data/vendor/assets/javascripts/blogo/ckeditor/lang/is.js +5 -0
  132. data/vendor/assets/javascripts/blogo/ckeditor/lang/it.js +5 -0
  133. data/vendor/assets/javascripts/blogo/ckeditor/lang/ja.js +5 -0
  134. data/vendor/assets/javascripts/blogo/ckeditor/lang/ka.js +5 -0
  135. data/vendor/assets/javascripts/blogo/ckeditor/lang/km.js +5 -0
  136. data/vendor/assets/javascripts/blogo/ckeditor/lang/ko.js +5 -0
  137. data/vendor/assets/javascripts/blogo/ckeditor/lang/ku.js +5 -0
  138. data/vendor/assets/javascripts/blogo/ckeditor/lang/lt.js +5 -0
  139. data/vendor/assets/javascripts/blogo/ckeditor/lang/lv.js +5 -0
  140. data/vendor/assets/javascripts/blogo/ckeditor/lang/mk.js +5 -0
  141. data/vendor/assets/javascripts/blogo/ckeditor/lang/mn.js +5 -0
  142. data/vendor/assets/javascripts/blogo/ckeditor/lang/ms.js +5 -0
  143. data/vendor/assets/javascripts/blogo/ckeditor/lang/nb.js +5 -0
  144. data/vendor/assets/javascripts/blogo/ckeditor/lang/nl.js +5 -0
  145. data/vendor/assets/javascripts/blogo/ckeditor/lang/no.js +5 -0
  146. data/vendor/assets/javascripts/blogo/ckeditor/lang/pl.js +5 -0
  147. data/vendor/assets/javascripts/blogo/ckeditor/lang/pt-br.js +5 -0
  148. data/vendor/assets/javascripts/blogo/ckeditor/lang/pt.js +5 -0
  149. data/vendor/assets/javascripts/blogo/ckeditor/lang/ro.js +5 -0
  150. data/vendor/assets/javascripts/blogo/ckeditor/lang/ru.js +5 -0
  151. data/vendor/assets/javascripts/blogo/ckeditor/lang/si.js +5 -0
  152. data/vendor/assets/javascripts/blogo/ckeditor/lang/sk.js +5 -0
  153. data/vendor/assets/javascripts/blogo/ckeditor/lang/sl.js +5 -0
  154. data/vendor/assets/javascripts/blogo/ckeditor/lang/sq.js +5 -0
  155. data/vendor/assets/javascripts/blogo/ckeditor/lang/sr-latn.js +5 -0
  156. data/vendor/assets/javascripts/blogo/ckeditor/lang/sr.js +5 -0
  157. data/vendor/assets/javascripts/blogo/ckeditor/lang/sv.js +5 -0
  158. data/vendor/assets/javascripts/blogo/ckeditor/lang/th.js +5 -0
  159. data/vendor/assets/javascripts/blogo/ckeditor/lang/tr.js +5 -0
  160. data/vendor/assets/javascripts/blogo/ckeditor/lang/ug.js +5 -0
  161. data/vendor/assets/javascripts/blogo/ckeditor/lang/uk.js +5 -0
  162. data/vendor/assets/javascripts/blogo/ckeditor/lang/vi.js +5 -0
  163. data/vendor/assets/javascripts/blogo/ckeditor/lang/zh-cn.js +5 -0
  164. data/vendor/assets/javascripts/blogo/ckeditor/lang/zh.js +5 -0
  165. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  166. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
  167. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
  168. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +12 -0
  169. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +13 -0
  170. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  171. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  172. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +12 -0
  173. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
  174. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
  175. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +12 -0
  176. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +12 -0
  177. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
  178. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  179. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +12 -0
  180. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +12 -0
  181. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  182. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
  183. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
  184. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
  185. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
  186. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  187. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
  188. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  189. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +12 -0
  190. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  191. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
  192. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +11 -0
  193. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +12 -0
  194. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
  195. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +13 -0
  196. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  197. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
  198. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +11 -0
  199. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  200. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  201. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  202. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +11 -0
  203. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  204. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
  205. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  206. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  207. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +12 -0
  208. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +12 -0
  209. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +11 -0
  210. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
  211. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
  212. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +12 -0
  213. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
  214. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  215. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +11 -0
  216. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  217. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  218. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  219. data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +10 -0
  220. data/vendor/assets/javascripts/blogo/ckeditor/plugins/about/dialogs/about.js +7 -0
  221. data/vendor/assets/javascripts/blogo/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  222. data/vendor/assets/javascripts/blogo/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  223. data/vendor/assets/javascripts/blogo/ckeditor/plugins/image/dialogs/image.js +43 -0
  224. data/vendor/assets/javascripts/blogo/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  225. data/vendor/assets/javascripts/blogo/ckeditor/plugins/link/dialogs/link.js +37 -0
  226. data/vendor/assets/javascripts/blogo/ckeditor/plugins/link/images/anchor.png +0 -0
  227. data/vendor/assets/javascripts/blogo/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  228. data/vendor/assets/javascripts/blogo/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  229. data/vendor/assets/javascripts/blogo/ckeditor/plugins/scayt/dialogs/options.js +20 -0
  230. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  231. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  232. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  233. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  234. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  235. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  236. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  237. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  238. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  239. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  240. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  241. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  242. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  243. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  244. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  245. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  246. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  247. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  248. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  249. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  250. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  251. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  252. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  253. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  254. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  255. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  256. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  257. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  258. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  259. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  260. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  261. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  262. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  263. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  264. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  265. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  266. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  267. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  268. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  269. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  270. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  271. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  272. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  273. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
  274. data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  275. data/vendor/assets/javascripts/blogo/ckeditor/plugins/table/dialogs/table.js +21 -0
  276. data/vendor/assets/javascripts/blogo/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
  277. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/demo.html +67 -0
  278. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/images/more.gif +0 -0
  279. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/images/more_bug.gif +0 -0
  280. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/images/page.gif +0 -0
  281. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/plugin.js +179 -0
  282. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  283. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/tmp.html +118 -0
  284. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  285. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  286. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/wsc.js +67 -0
  287. data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  288. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog.css +5 -0
  289. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_ie.css +5 -0
  290. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_ie7.css +5 -0
  291. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_ie8.css +5 -0
  292. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  293. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_opera.css +5 -0
  294. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor.css +5 -0
  295. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_gecko.css +5 -0
  296. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_ie.css +5 -0
  297. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_ie7.css +5 -0
  298. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_ie8.css +5 -0
  299. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_iequirks.css +5 -0
  300. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/icons.png +0 -0
  301. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/icons_hidpi.png +0 -0
  302. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/arrow.png +0 -0
  303. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/close.png +0 -0
  304. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  305. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  306. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  307. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  308. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/lock-open.png +0 -0
  309. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/lock.png +0 -0
  310. data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/refresh.png +0 -0
  311. data/vendor/assets/javascripts/blogo/ckeditor/styles.js +111 -0
  312. data/vendor/assets/javascripts/blogo/modal.js +315 -0
  313. data/vendor/assets/javascripts/blogo/moment.js +6 -0
  314. data/vendor/assets/javascripts/blogo/pikaday.js +920 -0
  315. data/vendor/assets/stylesheets/blogo/ckeditor/contents.css +123 -0
  316. data/vendor/assets/stylesheets/blogo/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  317. data/vendor/assets/stylesheets/blogo/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  318. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog.css +5 -0
  319. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_ie.css +5 -0
  320. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_ie7.css +5 -0
  321. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_ie8.css +5 -0
  322. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  323. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_opera.css +5 -0
  324. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor.css +5 -0
  325. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_gecko.css +5 -0
  326. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_ie.css +5 -0
  327. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_ie7.css +5 -0
  328. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_ie8.css +5 -0
  329. data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_iequirks.css +5 -0
  330. data/vendor/assets/stylesheets/blogo/modal.scss +326 -0
  331. data/vendor/assets/stylesheets/blogo/pikaday.css +170 -0
  332. data/vendor/assets/stylesheets/blogo/pure-min.css +11 -0
  333. metadata +418 -0
@@ -0,0 +1,27 @@
1
+ module Blogo
2
+ class CreatePostService < BasePostService
3
+ attr_reader :post
4
+
5
+ def initialize(user, params)
6
+ @post = user.posts.build
7
+ @tags_string = params.delete(:tags_string)
8
+ @post_attrs = params
9
+ end
10
+
11
+ def create!
12
+ assign_attributes
13
+ return false unless @post.valid?
14
+
15
+ @post.transaction do
16
+ @post.save!
17
+ set_tags!(@tags_string)
18
+
19
+ # Save tags_string
20
+ # TODO: fix to have 1 save
21
+ @post.save!
22
+ end
23
+
24
+ true
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,13 @@
1
+ module Blogo
2
+ class DestroyPostService < BasePostService
3
+ def initialize(post)
4
+ @post = post
5
+ end
6
+
7
+ def destroy!
8
+ clear_tags!
9
+ @post.destroy!
10
+ true
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,20 @@
1
+ module Blogo
2
+ # Creates new model of posts applying post params on it so ti can be previewed.
3
+ class PreviewPostService < BasePostService
4
+
5
+ # @param user [Blogo::User]
6
+ # @param params [Hash]
7
+ def initialize(user, params)
8
+ @post = user.posts.build
9
+ @post_attrs = params
10
+ end
11
+
12
+ # Assign post attributes and return a post.
13
+ #
14
+ # @return [Blogo::Post]
15
+ def preview
16
+ assign_attributes
17
+ @post
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,24 @@
1
+ module Blogo
2
+ class UpdatePostService < BasePostService
3
+ attr_reader :post
4
+
5
+ def initialize(post, params)
6
+ @post = post
7
+ @tags_string = params.delete(:tags_string)
8
+ @post_attrs = params
9
+ end
10
+
11
+ def update!
12
+ assign_attributes
13
+ return false unless @post.valid?
14
+
15
+ @post.transaction do
16
+ clear_tags!
17
+ set_tags!(@tags_string)
18
+ @post.save!
19
+ end
20
+
21
+ true
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ <div id="recent-comments">
2
+ <h1 class="admin-header">Recent comments</h1>
3
+ <script type="text/javascript" src="//<%= Blogo.config.disqus_shortname%>.disqus.com/recent_comments_widget.js?num_items=20&avatar_size=48&excerpt_length=500"></script>
4
+ </div>
5
+
@@ -0,0 +1,6 @@
1
+ <script type="text/javascript">
2
+ var callback = '<%= params['CKEditorFuncNum'] %>';
3
+ var imagePath = '<%= @image_path %>';
4
+ var error = '<%= @error.html_safe if @error %>';
5
+ window.parent.CKEDITOR.tools.callFunction(callback, imagePath, error)
6
+ </script>
@@ -0,0 +1,57 @@
1
+ <%= f.error_messages %>
2
+
3
+ <div class="pure-g-r form-new-post">
4
+ <div class="pure-u-17-24">
5
+ <div class="left-fields"^>
6
+ <%= f.text_field :title, required: true, id: 'post-title', placeholder: 'Post Title' %>
7
+
8
+ <%= f.text_area :raw_content, class: 'ckeditor', required: true %>
9
+
10
+ <%= f.text_field :tags_string, placeholder: 'Tags separated with commas' %>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="pure-u-7-24">
15
+ <%= f.text_field :permalink, class: 'pure-input-1', required: true, id: 'permalink', placeholder: 'unique-permalink' %>
16
+
17
+ <%= f.label :published_at, 'Published on' %>
18
+ <%= f.text_field :published_at, class: 'pure-input-1', id: 'input-datepicker', placeholder: 'Today' %>
19
+
20
+ <%= f.label :published, class: 'pure-checkbox' do %>
21
+ <%= f.check_box :published %>
22
+ Publish
23
+ <% end %>
24
+
25
+ </div>
26
+ </div>
27
+
28
+ <br />
29
+ <%= f.button "Save" , class: 'pure-button button-success', id: 'button-save' %>
30
+ <%= f.button "Preview" , class: 'pure-button button-secondary', id: 'button-preview' %>
31
+
32
+
33
+ <section class="semantic-content" id="modal-preview" tabindex="-1" role="dialog" aria-labelledby="modal-label" aria-hidden="true">
34
+ <div class="modal-inner">
35
+ <header id="modal-label">
36
+ <h1>Preview. Press ESC to back.</h1>
37
+ </header>
38
+ <div class="modal-content"><iframe></iframe></div>
39
+ </div>
40
+ <a href="#!" class="modal-close" title="Close preview" data-close="Close" data-dismiss="modal">×</a>
41
+ </section>
42
+
43
+
44
+
45
+ <script>
46
+ jQuery(function(){
47
+ new Pikaday({
48
+ field: document.getElementById('input-datepicker'),
49
+ format: 'YYYY-MM-DD'
50
+ });
51
+
52
+ $('#post-title').titleToUrl('#permalink')
53
+
54
+ var preview = new PostPreview('button-preview', 'post-form', '<%= admin_post_preview_path %>', 'modal-preview');
55
+ preview.init();
56
+ })
57
+ </script>
@@ -0,0 +1,14 @@
1
+ <%
2
+ confirm_message = %Q'Are you sure you want to delete "#{post.title}"?'
3
+ %>
4
+
5
+ <tr>
6
+ <td><%= link_to post.title, edit_admin_post_path(post) %></td>
7
+ <td><%= post.status %></td>
8
+ <td><%= post.user.name %></td>
9
+ <td><%= post.published_at.to_date %></td>
10
+ <td>
11
+ <%= link_to 'edit', edit_admin_post_path(post), class: "pure-button button-secondary" %>
12
+ <%= link_to 'delete', admin_post_path(post), method: :delete, data: {confirm: confirm_message}, class: "pure-button button-warning" %>
13
+ </td>
14
+ </tr>
@@ -0,0 +1,5 @@
1
+ <h1 class="admin-header">Edit post</h1>
2
+
3
+ <%= blogo_form_for [:admin, @post], method: :patch, html: {id: 'post-form', class: 'pure-form pure-form-stacked'} do |f| %>
4
+ <%= render partial: 'form', locals: {f: f} %>
5
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <h1 class="admin-header">Posts</h1>
2
+
3
+ <table class="pure-table pure-table-striped">
4
+ <thead>
5
+ <tr>
6
+ <th><%= 'Title' %></th>
7
+ <th><%= 'Status' %></th>
8
+ <th><%= 'Author' %></th>
9
+ <th><%= 'Published on' %></th>
10
+ <th></th>
11
+ </tr>
12
+ </thead>
13
+ <tbody>
14
+ <% @posts.each do |post|%>
15
+ <%= render partial: 'post_li', locals: {post: post} %>
16
+ <% end %>
17
+ </tbody>
18
+ </table>
@@ -0,0 +1,5 @@
1
+ <h1 class="admin-header">Add a new post</h1>
2
+
3
+ <%= blogo_form_for @post, :url => admin_posts_path, html: {id: 'post-form', class: 'pure-form pure-form-stacked'} do |f| %>
4
+ <%= render partial: 'form', locals: {f: f} %>
5
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <%= form_tag admin_sessions_path, class: 'pure-form pure-form-stacked' do %>
2
+ <fieldset>
3
+
4
+ <legend>Login</legend>
5
+
6
+ <%= label_tag :email %>
7
+ <%= text_field_tag :email, params[:email] %>
8
+
9
+ <%= label_tag :password %>
10
+ <%= password_field_tag :password %>
11
+
12
+ <%= submit_tag "Login", class: 'pure-button' %>
13
+ <fieldset>
14
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <div class="pure-menu pure-menu-open pure-menu-horizontal nav">
2
+ <ul>
3
+ <li><%= link_to "Blogo", admin_path %> </li>
4
+ <li><%= link_to "New Post", new_admin_post_path %></li>
5
+ <li><%= link_to "Comments", admin_comments_path %></li>
6
+ </ul>
7
+ <ul class="pull-right">
8
+ <li><%= link_to "Sign out", admin_logout_path %></li>
9
+ </ul>
10
+ </div>
@@ -0,0 +1,11 @@
1
+ <% if Blogo.config.twitter_username %>
2
+ <%= link_to '',"https://twitter.com/#{Blogo.config.twitter_username}", class: 'twitter-icon', target: 'twitter' %>
3
+ <% end %>
4
+
5
+ <% if Blogo.config.github_username %>
6
+ <%= link_to '',"https://github.com/#{Blogo.config.github_username}", class: 'github-icon', target: 'github' %>
7
+ <% end %>
8
+
9
+ <% if Blogo.config.show_rss_icon %>
10
+ <%= link_to '', feed_path, class: 'rss-icon', target: 'rss' %>
11
+ <% end %>
@@ -0,0 +1,33 @@
1
+ <meta name="description" content="<%= @meta[:description] %>">
2
+ <meta name="keywords" content="<%= @meta[:keywords] %>">
3
+
4
+ <%# Used by Vkontakte %>
5
+ <link rel="image_src" href="<%= @meta[:image] %>" />
6
+
7
+ <%# Open Graph (Facebook) %>
8
+ <meta property="og:title" content="<%= @meta[:title] %>" />
9
+ <meta property="og:description" content="<%= @meta[:description] %>" />
10
+ <% if @meta[:url] %>
11
+ <meta property="og:url" content="<%= @meta[:url] %>" />
12
+ <% end %>
13
+ <% if @meta[:image] %>
14
+ <meta property="og:image" content="<%= @meta[:image] %>" />
15
+ <% end %>
16
+ <% if @meta[:type] %>
17
+ <meta property="og:type" content="<%= @meta[:type] %>" />
18
+ <% end %>
19
+ <% if @meta[:site_name] %>
20
+ <meta property="og:site_name" content="<%= @meta[:site_name] %>" />
21
+ <% end %>
22
+
23
+ <%# Twitter Card %>
24
+ <meta name="twitter:card" content="summary">
25
+ <meta name="twitter:title" content="<%= @meta[:title] %>">
26
+ <meta name="twitter:description" content="<%= @meta[:title] %>">
27
+ <% if @meta[:image] %>
28
+ <meta name="twitter:image" content="<%= @meta[:image] %>">
29
+ <% end %>
30
+ <% if Blogo.config.twitter_username %>
31
+ <meta name="twitter:site" content="@<%= Blogo.config.twitter_username %>">
32
+ <meta name="twitter:creator" content="@<%= Blogo.config.twitter_username %>">
33
+ <% end %>
@@ -0,0 +1,20 @@
1
+ <ul class="pure-paginator paginator">
2
+ <% if @paginator.prev_page %>
3
+ <% prev_link = path_to_page(@paginator.prev_page, @tag) %>
4
+ <li> <a class="pure-button prev" href="<%= prev_link %>">&#171;</a> </li>
5
+ <% end %>
6
+
7
+
8
+ <% @paginator.pages.each do |page| %>
9
+ <% page_class = 'pure-button' %>
10
+ <% page_class << ' pure-button-active' if @paginator.page == page %>
11
+
12
+ <li><%= link_to page, path_to_page(page, @tag), class: page_class %></li>
13
+ <% end %>
14
+
15
+
16
+ <% if @paginator.next_page %>
17
+ <% next_link = path_to_page(@paginator.next_page, @tag) %>
18
+ <li><a class="pure-button prev" href="<%= next_link %>">&#187;</a></li>
19
+ <% end %>
20
+ </ul>
@@ -0,0 +1,20 @@
1
+ <header>
2
+ <h1><%= link_to post.title, path_to_post(post) %></h1>
3
+
4
+ <div class="posted">
5
+ <span>
6
+ By <%= post.user.name %>
7
+ </span> |
8
+ <span>
9
+ <time datetime="<%= post.published_at %>">
10
+ <%= I18n.localize(post.published_at.to_date, format: :long) %>
11
+ </time>
12
+ </span>
13
+
14
+ <div class="article-tags">
15
+ <% post.tag_names.each do |tag_name| %>
16
+ <%= link_to tag_name, tag_path(tag_name), class: 'tag pure-button button-secondary' %>
17
+ <% end %>
18
+ </div>
19
+ </div>
20
+ </header>
@@ -0,0 +1,9 @@
1
+ <section class="blogo-article article-overview">
2
+ <%= render partial: 'blogo/posts/post_header', locals: {post: post} %>
3
+
4
+ <div class="content">
5
+ <%= raw post_overview(post) %>
6
+ </div>
7
+
8
+ <%= link_to "Read ➞", path_to_post(post), class: 'pure-button button-secondary' %>
9
+ </section>
@@ -0,0 +1,18 @@
1
+ atom_feed do |feed|
2
+ feed.title Blogo.config.site_title
3
+ feed.subtitle Blogo.config.site_subtitle
4
+ feed.updated @updated
5
+
6
+ @posts.each do |post|
7
+ feed.entry(post, url: url_to_post(post)) do |entry|
8
+ entry.url url_to_post(post)
9
+ entry.title post.title
10
+ entry.content post_overview(post), :type => 'html'
11
+ entry.updated post.updated_at.strftime("%Y-%m-%dT%H:%M:%SZ")
12
+
13
+ entry.author do |author|
14
+ author.name post.user.name
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,6 @@
1
+ <div id="main">
2
+ <% @paginator.items.each do |post| %>
3
+ <%= render partial: 'post_overview', locals: {post: post} %>
4
+ <% end %>
5
+ </div>
6
+ <%= render partial: 'paginator' %>
@@ -0,0 +1,4 @@
1
+ <div id="main">
2
+ <%= render 'blogo/shared/post' %>
3
+ <%= render 'blogo/shared/disqus_comments' if Blogo.config.disqus_shortname %>
4
+ </div>
@@ -0,0 +1,24 @@
1
+ <aside>
2
+ <% if @recent_posts %>
3
+ <header>
4
+ <h1>Recent posts</h1>
5
+ </header>
6
+ <ul class="blogo-recent-posts">
7
+ <% @recent_posts.each do |post| %>
8
+ <li>
9
+ <%= link_to post.title, path_to_post(post) %>
10
+ </li>
11
+ <% end %>
12
+ </ul>
13
+ <% end %>
14
+
15
+
16
+ <header>
17
+ <h1>Tags</h1>
18
+ </header>
19
+ <div class="tags">
20
+ <% @tags.each do |tag| %>
21
+ <%= link_to tag.name, tag_path(tag), class: 'tag pure-button button-secondary' %>
22
+ <% end %>
23
+ <div>
24
+ </aside>
@@ -0,0 +1,20 @@
1
+ <section id='disqus-comments'>
2
+ <h1> Comments </h1>
3
+ <div id="disqus_thread" aria-live="polite"></div>
4
+ <noscript>Please enable JavaScript to view the comments.</noscript>
5
+ </section>
6
+
7
+
8
+ <script type="text/javascript">
9
+ var disqus_shortname = '<%= Blogo.config.disqus_shortname %>';
10
+ var disqus_identifier = 'blog-post-<%= @post.id %>';
11
+ var disqus_url = '<%= url_to_post(@post) %>';
12
+ var disqus_title = '<%= @post.title %>';
13
+ var disqus_script = 'embed.js';
14
+
15
+ (function () {
16
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
17
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
18
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
19
+ }());
20
+ </script>
@@ -0,0 +1,16 @@
1
+ <% if Blogo.config.google_analytics_id %>
2
+
3
+ <script type="text/javascript">
4
+ var _gaq = _gaq || [];
5
+ _gaq.push(['_setAccount', '<%= Blogo.config.google_analytics_id %>']);
6
+ _gaq.push(['_trackPageview']);
7
+
8
+ (function() {
9
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
10
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
11
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
12
+ })();
13
+ </script>
14
+
15
+ <% end %>
16
+