blogo 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.markdown +97 -0
- data/Rakefile +24 -0
- data/app/assets/images/blogo/background.png +0 -0
- data/app/assets/images/blogo/github-icon-active.png +0 -0
- data/app/assets/images/blogo/github-icon.png +0 -0
- data/app/assets/images/blogo/rss-icon-active.png +0 -0
- data/app/assets/images/blogo/rss-icon.png +0 -0
- data/app/assets/images/blogo/twitter-icon-active.png +0 -0
- data/app/assets/images/blogo/twitter-icon.png +0 -0
- data/app/assets/javascripts/blogo/admin/application.js +13 -0
- data/app/assets/javascripts/blogo/admin/ckeditor.js +2 -0
- data/app/assets/javascripts/blogo/admin/helpers/post_preview.js.coffee +41 -0
- data/app/assets/javascripts/blogo/admin/helpers/title_to_url.js.coffee +19 -0
- data/app/assets/javascripts/blogo/ckeditor/ckeditor_basepath.js.erb +6 -0
- data/app/assets/javascripts/blogo/ckeditor/config.js.erb +41 -0
- data/app/assets/stylesheets/blogo/admin.sass +105 -0
- data/app/assets/stylesheets/blogo/blog.sass +198 -0
- data/app/controllers/blogo/admin/base_controller.rb +19 -0
- data/app/controllers/blogo/admin/comments_controller.rb +7 -0
- data/app/controllers/blogo/admin/images_controller.rb +44 -0
- data/app/controllers/blogo/admin/posts_controller.rb +64 -0
- data/app/controllers/blogo/admin/sessions_controller.rb +24 -0
- data/app/controllers/blogo/application_controller.rb +2 -0
- data/app/controllers/blogo/posts_controller.rb +82 -0
- data/app/form_builders/blogo/form_builder.rb +17 -0
- data/app/helpers/blogo/admin/base_helper.rb +10 -0
- data/app/helpers/blogo/application_helper.rb +40 -0
- data/app/models/blogo/post.rb +59 -0
- data/app/models/blogo/tag.rb +10 -0
- data/app/models/blogo/tagging.rb +4 -0
- data/app/models/blogo/user.rb +9 -0
- data/app/services/blogo/base_post_service.rb +51 -0
- data/app/services/blogo/create_post_service.rb +27 -0
- data/app/services/blogo/destroy_post_service.rb +13 -0
- data/app/services/blogo/preview_post_service.rb +20 -0
- data/app/services/blogo/update_post_service.rb +24 -0
- data/app/views/blogo/admin/comments/index.html.erb +5 -0
- data/app/views/blogo/admin/images/create.erb +6 -0
- data/app/views/blogo/admin/posts/_form.html.erb +57 -0
- data/app/views/blogo/admin/posts/_post_li.html.erb +14 -0
- data/app/views/blogo/admin/posts/edit.html.erb +5 -0
- data/app/views/blogo/admin/posts/index.html.erb +18 -0
- data/app/views/blogo/admin/posts/new.html.erb +5 -0
- data/app/views/blogo/admin/sessions/new.html.erb +14 -0
- data/app/views/blogo/admin/shared/_nav_bar.html.erb +10 -0
- data/app/views/blogo/posts/_icons.html.erb +11 -0
- data/app/views/blogo/posts/_meta.html.erb +33 -0
- data/app/views/blogo/posts/_paginator.html.erb +20 -0
- data/app/views/blogo/posts/_post_header.html.erb +20 -0
- data/app/views/blogo/posts/_post_overview.html.erb +9 -0
- data/app/views/blogo/posts/feed.atom.builder +18 -0
- data/app/views/blogo/posts/index.html.erb +6 -0
- data/app/views/blogo/posts/show.html.erb +4 -0
- data/app/views/blogo/shared/_aside.html.erb +24 -0
- data/app/views/blogo/shared/_disqus_comments.html.erb +20 -0
- data/app/views/blogo/shared/_google_analytics.html.erb +16 -0
- data/app/views/blogo/shared/_post.html.erb +7 -0
- data/app/views/layouts/blogo/admin.html.erb +29 -0
- data/app/views/layouts/blogo/blog.html.erb +41 -0
- data/config/routes.rb +27 -0
- data/db/migrate/20140218134508_create_blogo_users.rb +15 -0
- data/db/migrate/20140218134512_create_blogo_tags.rb +13 -0
- data/db/migrate/20140218134550_create_blogo_posts.rb +29 -0
- data/db/migrate/20140218134620_create_blogo_taggings.rb +12 -0
- data/lib/blogo.rb +25 -0
- data/lib/blogo/config.rb +46 -0
- data/lib/blogo/engine.rb +20 -0
- data/lib/blogo/errors.rb +5 -0
- data/lib/blogo/paginator.rb +111 -0
- data/lib/blogo/renderer.rb +29 -0
- data/lib/blogo/renderer/base.rb +48 -0
- data/lib/blogo/renderer/html.rb +10 -0
- data/lib/blogo/renderer/markdown.rb +14 -0
- data/lib/blogo/version.rb +3 -0
- data/lib/tasks/blogo_tasks.rake +25 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/image/images/noimage.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/arrow.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/images/blogo/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/ckeditor.js +902 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/af.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ar.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/bg.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/bn.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/bs.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ca.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/cs.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/cy.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/da.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/de.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/el.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/en-au.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/en-ca.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/en-gb.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/en.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/eo.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/es.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/et.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/eu.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/fa.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/fi.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/fo.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/fr-ca.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/fr.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/gl.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/gu.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/he.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/hi.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/hr.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/hu.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/id.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/is.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/it.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ja.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ka.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/km.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ko.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ku.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/lt.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/lv.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/mk.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/mn.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ms.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/nb.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/nl.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/no.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/pl.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/pt-br.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/pt.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ro.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ru.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/si.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/sk.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/sl.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/sq.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/sr-latn.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/sr.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/sv.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/th.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/tr.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/ug.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/uk.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/vi.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/zh-cn.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/lang/zh.js +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +10 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/about/dialogs/about.js +7 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/image/dialogs/image.js +43 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/link/dialogs/anchor.js +8 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/link/dialogs/link.js +37 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/pastefromword/filter/default.js +31 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/scayt/dialogs/options.js +20 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/table/dialogs/table.js +21 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/demo.html +67 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/images/more.gif +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/images/more_bug.gif +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/images/page.gif +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wpmore/plugin.js +179 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/tmp.html +118 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/wsc.js +67 -0
- data/vendor/assets/javascripts/blogo/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_ie7.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/dialog_opera.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_ie.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_ie7.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/arrow.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/blogo/ckeditor/styles.js +111 -0
- data/vendor/assets/javascripts/blogo/modal.js +315 -0
- data/vendor/assets/javascripts/blogo/moment.js +6 -0
- data/vendor/assets/javascripts/blogo/pikaday.js +920 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/contents.css +123 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_ie.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_ie7.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_ie8.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_iequirks.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/dialog_opera.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_gecko.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_ie.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_ie7.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_ie8.css +5 -0
- data/vendor/assets/stylesheets/blogo/ckeditor/skins/moono/editor_iequirks.css +5 -0
- data/vendor/assets/stylesheets/blogo/modal.scss +326 -0
- data/vendor/assets/stylesheets/blogo/pikaday.css +170 -0
- data/vendor/assets/stylesheets/blogo/pure-min.css +11 -0
- 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,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,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,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,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 %>">«</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 %>">»</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,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
|
+
|