├── .gitignore ├── .meteor ├── .finished-upgraders ├── .gitignore ├── .id ├── cordova-plugins ├── packages ├── packages.json ├── platforms ├── release └── versions ├── README.md ├── README_EN.md ├── client ├── helpers │ └── handlebars.js ├── main.html ├── main.js └── views │ ├── admin │ ├── settings_form.html │ └── settings_form.js │ ├── comments │ ├── comment_edit.html │ ├── comment_edit.js │ ├── comment_form.html │ ├── comment_form.js │ ├── comment_item.html │ ├── comment_item.js │ ├── comment_list.html │ ├── comment_list.js │ ├── comment_reply.html │ └── comment_reply.js │ ├── common │ ├── css.html │ ├── css.js │ ├── footer.html │ ├── footer.js │ ├── layout.html │ ├── layout.js │ ├── message_item.html │ ├── message_item.js │ ├── messages.html │ └── messages.js │ ├── errors │ ├── already_logged_in.html │ ├── loading.html │ ├── loading.js │ ├── no_account.html │ ├── no_account.js │ ├── no_invite.html │ ├── no_invite.js │ ├── no_rights.html │ └── not_found.html │ ├── forms │ ├── quickFormTelescope.html │ └── quickFormTelescope.js │ ├── nav │ ├── admin_menu.html │ ├── admin_menu.js │ ├── menu_item.html │ ├── nav.html │ ├── nav.js │ ├── submit_button.html │ ├── user_menu.html │ ├── user_menu.js │ ├── views_menu.html │ └── views_menu.js │ ├── posts │ ├── after_post_item.html │ ├── before_post_item.html │ ├── modules │ │ ├── post_actions.html │ │ ├── post_actions.js │ │ ├── post_admin.html │ │ ├── post_admin.js │ │ ├── post_author.html │ │ ├── post_avatars.html │ │ ├── post_avatars.js │ │ ├── post_comments_link.html │ │ ├── post_content.html │ │ ├── post_content.js │ │ ├── post_discuss.html │ │ ├── post_info.html │ │ ├── post_info.js │ │ ├── post_rank.html │ │ ├── post_rank.js │ │ ├── post_title.html │ │ ├── post_title.js │ │ ├── post_upvote.html │ │ └── post_upvote.js │ ├── post_body.html │ ├── post_edit.html │ ├── post_edit.js │ ├── post_item.html │ ├── post_item.js │ ├── post_list │ │ ├── posts_list.html │ │ ├── posts_list.js │ │ ├── posts_list_incoming.html │ │ ├── posts_list_incoming.js │ │ ├── posts_load_more.html │ │ └── posts_load_more.js │ ├── post_page.html │ ├── post_page.js │ ├── post_submit.html │ └── post_submit.js │ └── users │ ├── account │ ├── user_account.html │ └── user_account.js │ ├── list │ ├── users.html │ ├── users.js │ ├── users_list_actions.html │ ├── users_list_actions.js │ ├── users_list_avatar.html │ ├── users_list_created_at.html │ ├── users_list_email.html │ └── users_list_username.html │ ├── profile │ ├── user_comments.html │ ├── user_comments.js │ ├── user_downvoted_posts.html │ ├── user_downvoted_posts.js │ ├── user_info.html │ ├── user_info.js │ ├── user_posts.html │ ├── user_posts.js │ ├── user_upvoted_posts.html │ └── user_upvoted_posts.js │ ├── sign_out.html │ ├── user_edit.html │ ├── user_edit.js │ ├── user_email.html │ ├── user_email.js │ ├── user_item.html │ ├── user_item.js │ ├── user_profile.html │ └── user_profile.js ├── collections ├── comments.js ├── events.js ├── messages.js ├── posts.js ├── settings.js └── users.js ├── docs ├── WHY.md ├── checkpoint.md └── telescope.md ├── i18n ├── en.i18n.json └── zh-CN.i18n.json ├── lib ├── analytics.js ├── config │ ├── at_config.js │ ├── avatar.js │ └── debug.js ├── debug.js ├── events.js ├── helpers.js ├── parameters.js ├── publications.js ├── router │ ├── comments.js │ ├── config.js │ ├── filters.js │ ├── other.js │ ├── posts.js │ ├── server.js │ └── users.js ├── scoring.js ├── users.js ├── version.js └── vote.js ├── license.md ├── mobile-config.js ├── packages.json ├── packages ├── .gitignore ├── meteorbb-base │ ├── .gitignore │ ├── lib │ │ ├── base.js │ │ ├── base_client.js │ │ └── base_server.js │ ├── package.js │ └── versions.json ├── meteorbb-daily │ ├── .gitignore │ ├── i18n │ │ ├── de.i18n.json │ │ ├── en.i18n.json │ │ ├── es.i18n.json │ │ ├── fr.i18n.json │ │ ├── it.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── client │ │ │ ├── stylesheets │ │ │ │ └── daily.scss │ │ │ └── templates │ │ │ │ ├── after_day.html │ │ │ │ ├── before_day.html │ │ │ │ ├── posts_daily.html │ │ │ │ └── posts_daily.js │ │ ├── daily.js │ │ └── routes.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-datetimepicker │ ├── .gitignore │ ├── autoform-bs-datetimepicker.html │ ├── autoform-bs-datetimepicker.js │ ├── bootstrap-collapse-transitions.js │ ├── datetimepicker.scss │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── package.js │ └── versions.json ├── meteorbb-email │ ├── .gitignore │ ├── .npm │ │ └── package │ │ │ ├── .gitignore │ │ │ ├── README │ │ │ └── npm-shrinkwrap.json │ ├── i18n │ │ ├── de.i18n.json │ │ ├── en.i18n.json │ │ ├── es.i18n.json │ │ ├── fr.i18n.json │ │ ├── it.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ └── server │ │ │ ├── email.js │ │ │ ├── routes.js │ │ │ └── templates │ │ │ ├── emailAccountApproved.handlebars │ │ │ ├── emailInvite.handlebars │ │ │ ├── emailNewComment.handlebars │ │ │ ├── emailNewPendingPost.handlebars │ │ │ ├── emailNewPost.handlebars │ │ │ ├── emailNewReply.handlebars │ │ │ ├── emailNewUser.handlebars │ │ │ ├── emailPostApproved.handlebars │ │ │ ├── emailTest.handlebars │ │ │ └── emailWrapper.handlebars │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-getting-started │ ├── .gitignore │ ├── content │ │ ├── customizing_meteorbb.md │ │ ├── deploying_meteorbb.md │ │ ├── getting_help.md │ │ ├── images │ │ │ ├── stackoverflow.png │ │ │ └── telescope.png │ │ ├── read_this_first.md │ │ ├── removing_getting_started_posts.md │ │ └── why.md │ ├── i18n │ │ ├── en.i18n.json │ │ ├── pt-BR.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── getting_started.js │ │ └── server │ │ │ └── dummy_content.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-i18n │ ├── .gitignore │ ├── i18n.js │ ├── package.js │ └── versions.json ├── meteorbb-invites │ ├── .gitignore │ ├── i18n │ │ ├── de.i18n.json │ │ ├── en.i18n.json │ │ ├── es.i18n.json │ │ ├── fr.i18n.json │ │ ├── it.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── client │ │ │ └── templates │ │ │ │ ├── user_invites.html │ │ │ │ └── user_invites.js │ │ ├── invites.js │ │ └── server │ │ │ ├── invites.js │ │ │ └── publications.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-kadira │ ├── .gitignore │ ├── i18n │ │ └── en.i18n.json │ ├── lib │ │ ├── kadira-settings.js │ │ └── server │ │ │ └── kadira.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-notifications │ ├── .gitignore │ ├── i18n │ │ ├── de.i18n.json │ │ ├── en.i18n.json │ │ ├── es.i18n.json │ │ ├── fr.i18n.json │ │ ├── it.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── client │ │ │ └── templates │ │ │ │ ├── notification_item.html │ │ │ │ ├── notification_item.js │ │ │ │ ├── notification_new_comment.html │ │ │ │ ├── notification_new_reply.html │ │ │ │ ├── notification_post_approved.html │ │ │ │ ├── notifications_menu.html │ │ │ │ ├── notifications_menu.js │ │ │ │ ├── unsubscribe.html │ │ │ │ └── unsubscribe.js │ │ ├── herald.js │ │ ├── notifications.js │ │ └── server │ │ │ ├── notifications-server.js │ │ │ └── routes.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-releases │ ├── .gitignore │ ├── i18n │ │ ├── en.i18n.json │ │ └── pt-BR.i18n.json │ ├── lib │ │ ├── client │ │ │ ├── scss │ │ │ │ └── releases.scss │ │ │ └── templates │ │ │ │ ├── current_release.html │ │ │ │ └── current_release.js │ │ ├── releases.js │ │ └── server │ │ │ ├── import_releases.js │ │ │ └── publications.js │ ├── package-tap.i18n │ ├── package.js │ ├── releases │ │ └── 0.0.1.md │ └── versions.json ├── meteorbb-richeditor │ ├── .gitignore │ ├── autoform-meteorbb-richeditor.html │ ├── autoform-meteorbb-richeditor.js │ ├── package.js │ ├── richeditor.scss │ └── versions.json ├── meteorbb-rss │ ├── .gitignore │ ├── .npm │ │ └── package │ │ │ ├── .gitignore │ │ │ ├── README │ │ │ └── npm-shrinkwrap.json │ ├── lib │ │ └── server │ │ │ ├── routes.js │ │ │ └── rss.js │ ├── package.js │ └── versions.json ├── meteorbb-search │ ├── .gitignore │ ├── i18n │ │ ├── de.i18n.json │ │ ├── en.i18n.json │ │ ├── es.i18n.json │ │ ├── fr.i18n.json │ │ ├── it.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ ├── tr.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── client │ │ │ ├── routes.js │ │ │ ├── stylesheets │ │ │ │ └── search.scss │ │ │ └── templates │ │ │ │ ├── search.html │ │ │ │ ├── search.js │ │ │ │ ├── search_logs.html │ │ │ │ └── search_logs.js │ │ ├── search.js │ │ └── server │ │ │ ├── log_search.js │ │ │ └── publications.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-singleday │ ├── .gitignore │ ├── i18n │ │ ├── bg.i18n.json │ │ ├── de.i18n.json │ │ ├── en.i18n.json │ │ ├── es.i18n.json │ │ ├── fr.i18n.json │ │ ├── it.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ ├── tr.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── client │ │ │ └── templates │ │ │ │ ├── single_day.html │ │ │ │ ├── single_day.js │ │ │ │ ├── single_day_nav.html │ │ │ │ └── single_day_nav.js │ │ ├── routes.js │ │ └── singleday.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-subscribe-to-posts │ ├── .gitignore │ ├── i18n │ │ ├── en.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── client │ │ │ ├── stylesheets │ │ │ │ └── subscribe-to-posts.scss │ │ │ └── templates │ │ │ │ ├── post_subscribe.html │ │ │ │ ├── post_subscribe.js │ │ │ │ ├── user_subscribed_posts.html │ │ │ │ └── user_subscribed_posts.js │ │ ├── server │ │ │ └── publications.js │ │ └── subscribe-to-posts.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-tags │ ├── .gitignore │ ├── i18n │ │ ├── bg.i18n.json │ │ ├── de.i18n.json │ │ ├── en.i18n.json │ │ ├── es.i18n.json │ │ ├── fr.i18n.json │ │ ├── it.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── categories.js │ │ ├── client │ │ │ ├── routes.js │ │ │ ├── scss │ │ │ │ └── categories.scss │ │ │ └── templates │ │ │ │ ├── categories.html │ │ │ │ ├── categories.js │ │ │ │ ├── categories_tags.html │ │ │ │ ├── categories_tags.js │ │ │ │ ├── category_item.html │ │ │ │ ├── category_item.js │ │ │ │ ├── post_categories.html │ │ │ │ └── post_categories.js │ │ ├── custom_fields.js │ │ ├── hooks.js │ │ └── server │ │ │ └── publications.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── meteorbb-theme-base │ ├── .gitignore │ ├── lib │ │ └── client │ │ │ └── scss │ │ │ ├── global │ │ │ └── _main.scss │ │ │ ├── includes │ │ │ ├── _breakpoints.scss │ │ │ ├── _colors.scss │ │ │ └── _mixins.scss │ │ │ ├── screen.scss │ │ │ └── specific │ │ │ ├── _avatars.scss │ │ │ ├── _errors.scss │ │ │ ├── _header.scss │ │ │ ├── _loading.scss │ │ │ ├── _notifications.scss │ │ │ ├── _posts.scss │ │ │ └── _users.scss │ ├── package.js │ └── versions.json ├── meteorbb-theme-hubble │ ├── .gitignore │ ├── lib │ │ ├── client │ │ │ └── scss │ │ │ │ ├── modules │ │ │ │ ├── _accounts.scss │ │ │ │ ├── _banners.scss │ │ │ │ ├── _comments.scss │ │ │ │ ├── _dialogs.scss │ │ │ │ ├── _errors.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _posts.scss │ │ │ │ └── _user-profile.scss │ │ │ │ ├── partials │ │ │ │ ├── _colors.scss │ │ │ │ ├── _grid.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _tooltips.scss │ │ │ │ └── _typography.scss │ │ │ │ └── screen.scss │ │ └── hubble.js │ ├── package.js │ └── versions.json ├── npm-container │ ├── index.js │ └── package.js ├── telescope-api │ ├── .gitignore │ ├── lib │ │ └── server │ │ │ ├── api.js │ │ │ └── routes.js │ ├── package.js │ └── versions.json ├── telescope-blank │ ├── .gitignore │ ├── i18n │ │ ├── en.i18n.json │ │ └── pt-BR.i18n.json │ ├── lib │ │ ├── client │ │ │ ├── stylesheets │ │ │ │ └── custom.scss │ │ │ └── templates │ │ │ │ ├── customPostTitle.html │ │ │ │ ├── custom_template.html │ │ │ │ └── custom_template.js │ │ ├── custom_fields.js │ │ ├── hooks.js │ │ ├── main.js │ │ ├── routes.js │ │ ├── server │ │ │ └── publications.js │ │ ├── settings.js │ │ └── templates.js │ ├── package-tap.i18n │ ├── package.js │ └── versions.json ├── telescope-lib │ ├── .gitignore │ ├── lib │ │ ├── autolink.js │ │ ├── client │ │ │ └── jquery.exists.js │ │ ├── deep.js │ │ ├── deep_extend.js │ │ ├── lib.js │ │ └── permissions.js │ ├── package.js │ └── versions.json ├── telescope-module-share │ ├── .gitignore │ ├── lib │ │ ├── client │ │ │ ├── post_share.html │ │ │ ├── post_share.js │ │ │ └── post_share.scss │ │ └── share.js │ ├── package.js │ └── versions.json ├── telescope-newsletter │ ├── .gitignore │ ├── .npm │ │ └── package │ │ │ ├── .gitignore │ │ │ ├── README │ │ │ └── npm-shrinkwrap.json │ ├── History.md │ ├── README.md │ ├── i18n │ │ ├── de.i18n.json │ │ ├── en.i18n.json │ │ ├── es.i18n.json │ │ ├── fr.i18n.json │ │ ├── it.i18n.json │ │ ├── pl.i18n.json │ │ ├── pt-BR.i18n.json │ │ └── zh-CN.i18n.json │ ├── lib │ │ ├── client │ │ │ ├── stylesheets │ │ │ │ └── newsletter_banner.scss │ │ │ └── templates │ │ │ │ ├── newsletter_banner.html │ │ │ │ └── newsletter_banner.js │ │ ├── newsletter.js │ │ └── server │ │ │ ├── campaign.js │ │ │ ├── cron.js │ │ │ ├── mailchimp.js │ │ │ ├── routes.js │ │ │ └── templates │ │ │ ├── emailDigest.handlebars │ │ │ ├── emailDigestConfirmation.handlebars │ │ │ └── emailPostItem.handlebars │ ├── package-tap.i18n │ └── package.js ├── telescope-tagline-banner │ ├── i18n │ │ └── en.i18n.json │ ├── lib │ │ ├── client │ │ │ ├── stylesheets │ │ │ │ └── tagline_banner.scss │ │ │ └── templates │ │ │ │ ├── tagline_banner.html │ │ │ │ └── tagline_banner.js │ │ └── tagline.js │ ├── package-tap.i18n │ └── package.js └── telescope-update-prompt │ ├── .gitignore │ ├── lib │ ├── client │ │ ├── templates │ │ │ ├── update_banner.css │ │ │ ├── update_banner.html │ │ │ └── update_banner.js │ │ └── update.js │ └── server │ │ └── phone_home.js │ ├── package.js │ └── versions.json ├── project-tap.i18n ├── public └── img │ ├── bg-black.png │ ├── bg-black@2x.png │ ├── bg-header.png │ ├── bg-header@2x.png │ ├── bg.png │ ├── bg@2x.png │ ├── default-avatar.png │ ├── favicon.ico │ ├── loading-balls.svg │ ├── loading.gif │ ├── loading.svg │ ├── logo.png │ ├── logo@2x.png │ ├── telescope-logo.png │ ├── telescope-logo2.png │ ├── telescope-logo@2x.png │ └── thegrid.svg ├── resources ├── icon.psd ├── icons │ ├── drawable-hdpi-icon.png │ ├── drawable-ldpi-icon.png │ ├── drawable-mdpi-icon.png │ ├── drawable-xhdpi-icon.png │ ├── drawable-xxhdpi-icon.png │ ├── drawable-xxxhdpi-icon.png │ ├── icon-40.png │ ├── icon-40@2x.png │ ├── icon-50.png │ ├── icon-50@2x.png │ ├── icon-60.png │ ├── icon-60@2x.png │ ├── icon-60@3x.png │ ├── icon-72.png │ ├── icon-72@2x.png │ ├── icon-76.png │ ├── icon-76@2x.png │ ├── icon-small.png │ ├── icon-small@2x.png │ ├── icon-small@3x.png │ ├── icon.png │ └── icon@2x.png ├── logo.psd ├── splash.psd └── splash │ ├── Default-568h@2x~iphone.png │ ├── Default-667h.png │ ├── Default-736h.png │ ├── Default-Landscape-736h.png │ ├── Default-Landscape@2x~ipad.png │ ├── Default-Landscape~ipad.png │ ├── Default-Portrait@2x~ipad.png │ ├── Default-Portrait~ipad.png │ ├── Default@2x~iphone.png │ ├── Default~iphone.png │ ├── drawable-land-hdpi-screen.png │ ├── drawable-land-ldpi-screen.png │ ├── drawable-land-mdpi-screen.png │ ├── drawable-land-xhdpi-screen.png │ ├── drawable-land-xxhdpi-screen.png │ ├── drawable-land-xxxhdpi-screen.png │ ├── drawable-port-hdpi-screen.png │ ├── drawable-port-ldpi-screen.png │ ├── drawable-port-mdpi-screen.png │ ├── drawable-port-xhdpi-screen.png │ ├── drawable-port-xxhdpi-screen.png │ └── drawable-port-xxxhdpi-screen.png ├── scss.json ├── server ├── indexes.js ├── migrations.js ├── publications │ ├── posts_list.js │ ├── settings.js │ ├── single_comment.js │ ├── single_post.js │ ├── user_profile.js │ ├── users.js │ └── users_dashboard.js ├── scoring.js ├── start.js ├── start_cron.js └── users.js └── settings.json /.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | .DS_Store 3 | mup.json 4 | -------------------------------------------------------------------------------- /.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | -------------------------------------------------------------------------------- /.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | meteorite 3 | -------------------------------------------------------------------------------- /.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | adtvcqcdlr761u2znzz 8 | -------------------------------------------------------------------------------- /.meteor/cordova-plugins: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.meteor/packages.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /.meteor/platforms: -------------------------------------------------------------------------------- 1 | android 2 | browser 3 | ios 4 | server 5 | -------------------------------------------------------------------------------- /.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.1.0.2 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 介绍 2 | MeteorBB 是基于[Telescope](https://github.com/TelescopeJS/Telescope)二次开发的中文Meteor社区。关于Telescope的介绍,[点击这里](https://github.com/cobola/meteorbb/blob/dev/docs/telescope.md)。 3 | 4 | MeteorBB会保留Telescope的大部分特性,并定制化为对中文开发者友好的Meteor社区。 5 | 6 | # 名字起源 7 | 8 | MeteorBB是用来致敬NodeBB的,不过目前的解读是:` No Meteor No BB ` ,也很酷。 9 | 10 | 11 | 12 | ## 需知 13 | 14 | MeteorBB尚处于开发过程,欢迎感兴趣的朋友一同参与,任何建议和问题可以在[issues](https://github.com/cobola/meteorbb/issues)中提出 15 | 16 | 17 | 18 | ## 演示网址 [www.meteorbb.com](http://www.meteorbb.com) 19 | 20 | 21 | 22 | 23 | #License 24 | 25 | "THE COFFE-WARE LICENSE" (Revision 43): 26 | 27 | As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a cup of coffe in return. 28 | -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | # Intruduction 2 | MeteorBB is based on [Telescope](https://github.com/TelescopeJS/Telescope), a well-formed code for forum with awesome fetures. Keeping friendly to chinese developer and users, MeteorBB will retain most features of Telescope and do some further development. 3 | 4 | 5 | # Why We Name It MeteorBB 6 | 7 | In honor of NodeBB, MeteorBB's slogan is ` No Meteor No BB ` , coooooool! 8 | 9 | 10 | ## Issue 11 | 12 | MeteorBB is still being developed. We delightly appriciate any contribution from you. You can post any question and any issue at [issues](https://github.com/cobola/meteorbb/issues). If you want to get involved into our code, just fork it! 13 | 14 | 15 | 16 | 17 | ## DEMO [www.meteorbb.com](http://www.meteorbb.com) 18 | 19 | 20 | 21 | 22 | 23 | #LICENSE 24 | 25 | "THE BEAR-WARE LICENSE" (Revision 43): 26 | 27 | As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a bear in return. 28 | -------------------------------------------------------------------------------- /client/main.html: -------------------------------------------------------------------------------- 1 | 2 | Loading... 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /client/main.js: -------------------------------------------------------------------------------- 1 | // Session variables 2 | Session.set('postsLimit', getSetting('postsPerPage', 10)); 3 | 4 | // Sort postModules array position using modulePositions as index 5 | postModules = _.sortBy(postModules, 'order'); 6 | 7 | postHeading = _.sortBy(postHeading, 'order'); 8 | 9 | postMeta = _.sortBy(postMeta, 'order'); 10 | 11 | Meteor.startup(function () { 12 | $('#rss-link').attr('title', i18n.t('new_posts')); 13 | }); 14 | 15 | // AutoForm.debug(); -------------------------------------------------------------------------------- /client/views/admin/settings_form.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/admin/settings_form.js: -------------------------------------------------------------------------------- 1 | AutoForm.hooks({ 2 | updateSettingsForm: { 3 | 4 | before: { 5 | update: function(modifier) { 6 | this.template.$('button[type=submit]').addClass('loading'); 7 | return modifier; 8 | } 9 | }, 10 | 11 | onSuccess: function(operation, result) { 12 | this.template.$('button[type=submit]').removeClass('loading'); 13 | }, 14 | 15 | onError: function(operation, result, template) { 16 | this.template.$('button[type=submit]').removeClass('loading'); 17 | } 18 | 19 | }, 20 | insertSettingsForm: { 21 | 22 | before: { 23 | insert: function(doc) { 24 | this.template.$('button[type=submit]').addClass('loading'); 25 | return doc; 26 | } 27 | }, 28 | 29 | onSuccess: function(operation, result) { 30 | this.template.$('button[type=submit]').removeClass('loading'); 31 | }, 32 | 33 | onError: function(operation, result) { 34 | this.template.$('button[type=submit]').removeClass('loading'); 35 | } 36 | 37 | } 38 | }); -------------------------------------------------------------------------------- /client/views/comments/comment_edit.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('comment_edit')].events({ 2 | 'click input[type=submit]': function(e, instance){ 3 | var comment = this; 4 | var content = instance.$('#body').val(); 5 | 6 | e.preventDefault(); 7 | 8 | if(!Meteor.user()) 9 | throw i18n.t('you_must_be_logged_in'); 10 | 11 | Comments.update(comment._id, { 12 | $set: { 13 | body: content 14 | } 15 | }); 16 | 17 | trackEvent("edit comment", {'postId': comment.postId, 'commentId': comment._id}); 18 | Router.go('post_page_comment', {_id: comment.postId, commentId: comment._id}); 19 | }, 20 | 'click .delete-link': function(e){ 21 | var comment = this; 22 | 23 | e.preventDefault(); 24 | 25 | if(confirm(i18n.t("are_you_sure"))){ 26 | Meteor.call('removeComment', comment._id); 27 | Router.go('post_page', {_id: comment.postId}); 28 | flashMessage("Your comment has been deleted.", "success"); 29 | } 30 | } 31 | }); 32 | -------------------------------------------------------------------------------- /client/views/comments/comment_form.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /client/views/comments/comment_list.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /client/views/comments/comment_list.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('comment_list')].helpers({ 2 | comment_item: function () { 3 | return getTemplate('comment_item'); 4 | }, 5 | child_comments: function(){ 6 | var post = this; 7 | var comments = Comments.find({postId: post._id}, {sort: {score: -1, postedAt: -1}}); 8 | return comments; 9 | }, 10 | threadModules: function () { 11 | return threadModules; 12 | }, 13 | getTemplate: function () { 14 | return getTemplate(this.template); 15 | } 16 | }); 17 | 18 | Template[getTemplate('comment_list')].rendered = function(){ 19 | // once all comments have been rendered, activate comment queuing for future real-time comments 20 | window.queueComments = true; 21 | }; -------------------------------------------------------------------------------- /client/views/comments/comment_reply.html: -------------------------------------------------------------------------------- 1 | 26 | -------------------------------------------------------------------------------- /client/views/comments/comment_reply.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('comment_reply')].helpers({ 2 | post_item: function () { 3 | return getTemplate('post_item'); 4 | }, 5 | comment_item: function () { 6 | return getTemplate('comment_item'); 7 | }, 8 | comment_form: function () { 9 | return getTemplate('comment_form'); 10 | }, 11 | post: function () { 12 | if(this.comment){ // XXX 13 | var post = Posts.findOne(this.comment.postId); 14 | return post; 15 | } 16 | } 17 | }); -------------------------------------------------------------------------------- /client/views/common/css.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('css')].helpers({ 2 | hideAuthClass: function () { 3 | 4 | var authClass = ''; 5 | var authMethods = getSetting('authMethods', ["email"]); 6 | var selectors = [ 7 | {name: 'email', selector: ".at-pwd-form"}, 8 | {name: 'twitter', selector: "#at-twitter"}, 9 | {name: 'facebook', selector: "#at-facebook"} 10 | ]; 11 | selectors.forEach(function (method) { 12 | // if current method is not one of the enabled auth methods, hide it 13 | if (authMethods.indexOf(method.name) == -1) { 14 | authClass += method.selector + ", "; 15 | } 16 | }); 17 | 18 | // unless we're showing at least one of twitter and facebook AND the password form, 19 | // hide separator 20 | if (authMethods.indexOf('email') == -1 || (authMethods.indexOf('facebook') == -1 && authMethods.indexOf('twitter') == -1)) { 21 | authClass += ".at-sep, "; 22 | } 23 | 24 | return authClass.slice(0, - 2) + "{display:none !important}"; 25 | 26 | } 27 | }); -------------------------------------------------------------------------------- /client/views/common/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/common/footer.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('footer')].helpers({ 2 | footerCode: function(){ 3 | return getSetting('footerCode'); 4 | }, 5 | footerClass: function(){ 6 | return Session.get('isPostsList') ? 'absolute' : 'static'; 7 | }, 8 | footerModules: function () { 9 | return footerModules; 10 | }, 11 | getTemplate: function () { 12 | return getTemplate(this.template); 13 | } 14 | }); -------------------------------------------------------------------------------- /client/views/common/layout.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/common/message_item.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/common/message_item.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('message_item')].helpers({ 2 | 3 | }); 4 | 5 | Template[getTemplate('message_item')].created = function(){ 6 | var messageId=this.data._id; 7 | Meteor.setTimeout(function(){ 8 | Messages.update(messageId, {$set: {seen:true}}); 9 | }, 100); 10 | }; -------------------------------------------------------------------------------- /client/views/common/messages.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/common/messages.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('messages')].helpers({ 2 | message_item: function () { 3 | return getTemplate('message_item'); 4 | }, 5 | messages: function(){ 6 | return Messages.find({show: true}); 7 | } 8 | }); -------------------------------------------------------------------------------- /client/views/errors/already_logged_in.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/errors/loading.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/errors/loading.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('loading')].helpers({ 2 | log: function () { 3 | console.log('loading…') 4 | } 5 | }); -------------------------------------------------------------------------------- /client/views/errors/no_account.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/errors/no_account.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('no_account')].helpers({ 2 | landingPageText: function(){ 3 | return getSetting("landingPageText"); 4 | } 5 | }); 6 | Template[getTemplate('no_account')].events({ 7 | 'click .twitter-button': function(){ 8 | Meteor.loginWithTwitter(function(){ 9 | Router.go('/'); 10 | }); 11 | } 12 | }); -------------------------------------------------------------------------------- /client/views/errors/no_invite.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/errors/no_invite.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('no_invite')].helpers({ 2 | afterSignupText: function(){ 3 | return getSetting("afterSignupText"); 4 | } 5 | }); -------------------------------------------------------------------------------- /client/views/errors/no_rights.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/errors/not_found.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/nav/admin_menu.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/nav/admin_menu.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('adminMenu')].helpers({ 2 | menuItem: function () { 3 | return getTemplate('menuItem'); 4 | }, 5 | menu: function () { 6 | return adminMenu; 7 | } 8 | }); -------------------------------------------------------------------------------- /client/views/nav/menu_item.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/nav/nav.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('nav')].helpers({ 2 | primaryNav: function () { 3 | return _.sortBy(primaryNav, 'order'); 4 | }, 5 | hasPrimaryNav: function () { 6 | return !!primaryNav.length; 7 | }, 8 | secondaryNav: function () { 9 | return _.sortBy(secondaryNav, 'order'); 10 | }, 11 | hasSecondaryNav: function () { 12 | return !!secondaryNav.length; 13 | }, 14 | dropdownClass: function () { 15 | return getThemeSetting('useDropdowns', true) ? 'has-dropdown' : 'no-dropdown'; 16 | }, 17 | getTemplate: function () { 18 | return getTemplate(this.template); 19 | }, 20 | site_title: function(){ 21 | return getSetting('title', "MeteorBB中国开源社区"); 22 | }, 23 | logo_url: function(){ 24 | return getSetting('logoUrl'); 25 | }, 26 | headerClass: function () { 27 | var color = getSetting('headerColor'); 28 | return (color == 'white' || color == '#fff' || color == '#ffffff') ? "white-background" : ''; 29 | } 30 | }); 31 | 32 | Template[getTemplate('nav')].events({ 33 | 'click .mobile-menu-button': function(e){ 34 | e.preventDefault(); 35 | e.stopPropagation(); // Make sure we don't immediately close the mobile nav again. See layout.js event handler. 36 | $('body').toggleClass('mobile-nav-open'); 37 | } 38 | }); -------------------------------------------------------------------------------- /client/views/nav/submit_button.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/nav/user_menu.html: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /client/views/nav/user_menu.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('userMenu')].helpers({ 2 | isLoggedIn: function () { 3 | return !!Meteor.user(); 4 | }, 5 | name: function () { 6 | return getDisplayName(Meteor.user()); 7 | }, 8 | profileUrl: function () { 9 | return Router.path('user_profile', {_idOrSlug: Meteor.user().slug}); 10 | }, 11 | userEditUrl: function () { 12 | return Router.path('user_edit', {slug: Meteor.user().slug}); 13 | } 14 | }); 15 | -------------------------------------------------------------------------------- /client/views/nav/views_menu.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/nav/views_menu.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('viewsMenu')].helpers({ 2 | menuItem: function () { 3 | return getTemplate('menuItem'); 4 | }, 5 | views: function () { 6 | return viewsMenu; 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /client/views/posts/after_post_item.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/before_post_item.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_actions.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_actions.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postActions')].helpers({ 2 | 3 | }); 4 | 5 | Template[getTemplate('postActions')].events({ 6 | 'click .toggle-actions-link': function(e, instance){ 7 | e.preventDefault(); 8 | var $post = $(e.target).parents('.post'); 9 | var h = $post.height(); 10 | if ($post.hasClass('show-actions')) { 11 | $post.height('auto'); 12 | $post.removeClass('show-actions'); 13 | } else { 14 | $post.height(h+'px'); 15 | $post.addClass('show-actions'); 16 | } 17 | } 18 | }); -------------------------------------------------------------------------------- /client/views/posts/modules/post_admin.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_admin.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postAdmin')].helpers({ 2 | showApprove: function () { 3 | return this.status == STATUS_PENDING; 4 | }, 5 | showUnapprove: function(){ 6 | return !!getSetting('requirePostsApproval') && this.status == STATUS_APPROVED; 7 | }, 8 | shortScore: function(){ 9 | return Math.floor(this.score*1000)/1000; 10 | } 11 | }); 12 | 13 | Template[getTemplate('postAdmin')].events({ 14 | 'click .approve-link': function(e, instance){ 15 | Meteor.call('approvePost', this); 16 | e.preventDefault(); 17 | }, 18 | 'click .unapprove-link': function(e, instance){ 19 | Meteor.call('unapprovePost', this); 20 | e.preventDefault(); 21 | } 22 | }); -------------------------------------------------------------------------------- /client/views/posts/modules/post_author.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_avatars.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_avatars.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postAvatars')].helpers({ 2 | commenters: function () { 3 | // remove post author ID from commenters to avoid showing author's avatar again 4 | // limit to 4 commenters in case there's more 5 | // TODO: show a "..." sign or something 6 | return _.first(_.without(this.commenters, this.userId), 4); 7 | } 8 | }); -------------------------------------------------------------------------------- /client/views/posts/modules/post_comments_link.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_content.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_content.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postContent')].helpers({ 2 | postThumbnail: function () { 3 | return postThumbnail; 4 | }, 5 | postHeading: function () { 6 | return postHeading; 7 | }, 8 | postMeta: function () { 9 | return postMeta; 10 | }, 11 | getTemplate: function () { 12 | return getTemplate(this.template); 13 | }, 14 | sourceLink: function(){ 15 | return "/posts/"+this._id; 16 | }, 17 | current_domain: function(){ 18 | return "http://"+document.domain; 19 | }, 20 | timestamp: function(){ 21 | time = this.status == STATUS_APPROVED ? this.postedAt : this.createdAt; 22 | return moment(time).format("MMMM Do, h:mm:ss a"); 23 | }, 24 | userAvatar: function(){ 25 | // THIS FUNCTION IS DEPRECATED -- package bengott:avatar is used instead. 26 | var author = Meteor.users.findOne(this.userId, {reactive: false}); 27 | if(!!author) 28 | return getAvatarUrl(author); // ALSO DEPRECATED 29 | }, 30 | inactiveClass: function(){ 31 | return (isAdmin(Meteor.user()) && this.inactive) ? i18n.t('inactive') : ""; 32 | }, 33 | commentsDisplayText: function(){ 34 | return this.comments == 1 ? i18n.t('comment') : i18n.t('comments'); 35 | } 36 | }); -------------------------------------------------------------------------------- /client/views/posts/modules/post_discuss.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_info.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_info.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postInfo')].helpers({ 2 | getTemplate: function() { 3 | return getTemplate("postAuthor"); 4 | } 5 | }); -------------------------------------------------------------------------------- /client/views/posts/modules/post_rank.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_rank.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postRank')].helpers({ 2 | oneBasedRank: function(){ 3 | if (typeof this.rank !== 'undefined') { 4 | return this.rank + 1; 5 | } 6 | } 7 | }); -------------------------------------------------------------------------------- /client/views/posts/modules/post_title.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_title.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postTitle')].helpers({ 2 | postLink: function(){ 3 | return "/posts/"+this._id; 4 | } 5 | }); -------------------------------------------------------------------------------- /client/views/posts/modules/post_upvote.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/modules/post_upvote.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postUpvote')].helpers({ 2 | upvoted: function(){ 3 | var user = Meteor.user(); 4 | if(!user) return false; 5 | return _.include(this.upvoters, user._id); 6 | } 7 | }); 8 | 9 | Template[getTemplate('postUpvote')].events({ 10 | 'click .upvote-link': function(e, instance){ 11 | var post = this; 12 | e.preventDefault(); 13 | if(!Meteor.user()){ 14 | Router.go('atSignIn'); 15 | flashMessage(i18n.t("please_log_in_first"), "info"); 16 | } 17 | Meteor.call('upvotePost', post, function(error, result){ 18 | trackEvent("post upvoted", {'_id': post._id}); 19 | }); 20 | }, 21 | 'click .cancel-upvote-link': function(e, instance){ 22 | var post = this; 23 | e.preventDefault(); 24 | if(!Meteor.user()){ 25 | Router.go('atSignIn'); 26 | flashMessage(i18n.t("please_log_in_first"), "info"); 27 | } 28 | Meteor.call('cancelUpvotePost', post, function(error, result){ 29 | trackEvent("post upvoted", {'_id': post._id}); 30 | }); 31 | } 32 | }); 33 | -------------------------------------------------------------------------------- /client/views/posts/post_body.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/post_edit.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/post_item.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /client/views/posts/post_item.js: -------------------------------------------------------------------------------- 1 | var post = {}; 2 | 3 | Template[getTemplate('post_item')].created = function () { 4 | post = this.data; 5 | }; 6 | 7 | Template[getTemplate('post_item')].helpers({ 8 | postModules: function () { 9 | return postModules; 10 | }, 11 | getTemplate: function () { 12 | return getTemplate(this.template); 13 | }, 14 | moduleContext: function () { // not used for now 15 | var module = this; 16 | module.templateClass = camelToDash(this.template) + ' ' + this.position + ' cell'; 17 | module.post = post; 18 | return module; 19 | }, 20 | moduleClass: function () { 21 | return camelToDash(this.template) + ' post-module'; 22 | }, 23 | postClass: function () { 24 | var post = this; 25 | var postAuthorClass = "author-"+post.author; 26 | 27 | var postClass = postClassCallbacks.reduce(function(result, currentFunction) { 28 | return currentFunction(post, result); 29 | }, postAuthorClass); 30 | 31 | return postClass; 32 | } 33 | }); 34 | -------------------------------------------------------------------------------- /client/views/posts/post_list/posts_list_incoming.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/post_list/posts_list_incoming.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postsListIncoming')].events({ 2 | 'click .show-new': function(e, instance) { 3 | Session.set('listPopulatedAt', new Date()); 4 | } 5 | }); -------------------------------------------------------------------------------- /client/views/posts/post_list/posts_load_more.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/posts/post_list/posts_load_more.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('postsLoadMore')].helpers({ 2 | postsReady: function () { 3 | return this.postsReady; 4 | }, 5 | hasPosts: function () { 6 | return !!this.postsCursor.count(); 7 | } 8 | }); 9 | 10 | Template[getTemplate('postsLoadMore')].events({ 11 | 'click .more-button': function (event, instance) { 12 | event.preventDefault(); 13 | if (this.controllerInstance) { 14 | // controller is a template 15 | this.loadMoreHandler(this.controllerInstance); 16 | } else { 17 | // controller is router 18 | this.loadMoreHandler(); 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /client/views/posts/post_page.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('post_page')].helpers({ 2 | post_item: function () { 3 | return getTemplate('post_item'); 4 | }, 5 | post_body: function () { 6 | return getTemplate('post_body'); 7 | }, 8 | comment_form: function () { 9 | return getTemplate('comment_form'); 10 | }, 11 | comment_list: function () { 12 | return getTemplate('comment_list'); 13 | }, postUpvote: function () { 14 | return getTemplate('postUpvote'); 15 | } 16 | }); 17 | 18 | Template[getTemplate('post_page')].rendered = function () { 19 | $('body').scrollTop(0); 20 | }; 21 | -------------------------------------------------------------------------------- /client/views/posts/post_submit.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/users/list/users.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /client/views/users/list/users.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('users')].helpers({ 2 | settings: function() { 3 | return { 4 | collection: 'all-users', 5 | rowsPerPage: 20, 6 | showFilter: true, 7 | fields: [ 8 | { key: 'avatar', label: '', tmpl: Template.users_list_avatar, sortable: false }, 9 | { key: 'username', label: 'Username', tmpl: Template.users_list_username }, 10 | { key: 'profile.name', label: 'Display Name' }, 11 | { key: 'profile.email', label: 'Email', tmpl: Template.users_list_email }, 12 | { key: 'createdAt', label: 'Member Since', tmpl: Template.users_list_created_at, sort: 'descending' }, 13 | { key: 'postCount', label: 'Posts' }, 14 | { key: 'commentCount', label: 'Comments' }, 15 | { key: 'karma', label: 'Karma', fn: function(val){return Math.round(100*val)/100} }, 16 | { key: 'inviteCount', label: 'Invites' }, 17 | { key: 'isInvited', label: 'Invited', fn: function(val){return val ? 'Yes':'No'} }, 18 | { key: 'isAdmin', label: 'Admin', fn: function(val){return val ? 'Yes':'No'} }, 19 | { key: 'actions', label: 'Actions', tmpl: Template.users_list_actions, sortable: false } 20 | ] 21 | }; 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /client/views/users/list/users_list_actions.html: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /client/views/users/list/users_list_actions.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('users_list_actions')].helpers({ 2 | isInvited: function() { 3 | return this.isInvited; 4 | }, 5 | userIsAdmin: function(){ 6 | return isAdmin(this); 7 | }, 8 | }); 9 | 10 | Template[getTemplate('users_list_actions')].events({ 11 | 'click .invite-link': function(e){ 12 | e.preventDefault(); 13 | Meteor.call('inviteUser', { userId : this._id }); 14 | }, 15 | 'click .uninvite-link': function(e){ 16 | e.preventDefault(); 17 | Meteor.users.update(this._id,{ 18 | $set:{ 19 | isInvited: false 20 | } 21 | }); 22 | }, 23 | 'click .admin-link': function(e){ 24 | e.preventDefault(); 25 | updateAdmin(this._id, true); 26 | }, 27 | 'click .unadmin-link': function(e){ 28 | e.preventDefault(); 29 | updateAdmin(this._id, false); 30 | }, 31 | 'click .delete-link': function(e){ 32 | e.preventDefault(); 33 | if(confirm(i18n.t("are_you_sure_you_want_to_delete")+getDisplayName(this)+"?")) 34 | Meteor.users.remove(this._id); 35 | } 36 | }); 37 | -------------------------------------------------------------------------------- /client/views/users/list/users_list_avatar.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /client/views/users/list/users_list_created_at.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /client/views/users/list/users_list_email.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /client/views/users/list/users_list_username.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /client/views/users/profile/user_comments.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/users/profile/user_downvoted_posts.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/users/profile/user_info.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('userInfo')].helpers({ 2 | canEditProfile: function() { 3 | var currentUser = Meteor.user(); 4 | return currentUser && (this._id == currentUser._id || isAdmin(currentUser)); 5 | }, 6 | createdAtFormatted: function() { 7 | return this.createdAt; 8 | }, 9 | canInvite: function() { 10 | // if the user is logged in, the target user hasn't been invited yet, invites are enabled, and user is not viewing their own profile 11 | return Meteor.user() && Meteor.user()._id != this._id && !isInvited(this) && invitesEnabled() && can.invite(Meteor.user()); 12 | }, 13 | inviteCount: function() { 14 | return Meteor.user().inviteCount; 15 | }, 16 | getTwitterName: function () { 17 | return getTwitterName(this); 18 | }, 19 | getGitHubName: function () { 20 | return getGitHubName(this); 21 | } 22 | }); 23 | 24 | Template[getTemplate('userInfo')].events({ 25 | 'click .invite-link': function(e, instance){ 26 | Meteor.call('inviteUser', instance.data.user._id); 27 | flashMessage('Thanks, user has been invited.', "success"); 28 | } 29 | }); 30 | -------------------------------------------------------------------------------- /client/views/users/profile/user_posts.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/users/profile/user_upvoted_posts.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/users/sign_out.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/users/user_edit.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /client/views/users/user_edit.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('user_edit')].helpers({ 2 | userProfileEdit: function () { 3 | return userProfileEdit; 4 | }, 5 | getTemplate: function () { 6 | return getTemplate(this.template); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /client/views/users/user_email.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/views/users/user_profile.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /client/views/users/user_profile.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('user_profile')].helpers({ 2 | userProfileDisplay: function () { 3 | return userProfileDisplay; 4 | }, 5 | getTemplate: function () { 6 | return getTemplate(this.template); 7 | } 8 | }); -------------------------------------------------------------------------------- /collections/events.js: -------------------------------------------------------------------------------- 1 | var eventSchema = new SimpleSchema({ 2 | createdAt: { 3 | type: Date 4 | }, 5 | name: { 6 | type: String 7 | }, 8 | description: { 9 | type: String, 10 | optional: true 11 | }, 12 | unique: { 13 | type: Boolean, 14 | optional: true 15 | }, 16 | important: { // marking an event as important means it should never be erased 17 | type: Boolean, 18 | optional: true 19 | }, 20 | properties: { 21 | type: Object, 22 | optional: true, 23 | blackbox: true 24 | } 25 | }); 26 | 27 | 28 | Events = new Meteor.Collection('events'); 29 | Events.attachSchema(eventSchema); 30 | 31 | if (Meteor.isServer) { 32 | logEvent = function (event) { 33 | 34 | // if event is supposed to be unique, check if it has already been logged 35 | if (!!event.unique && !!Events.findOne({name: event.name})) { 36 | return 37 | } 38 | 39 | event.createdAt = new Date(); 40 | 41 | Events.insert(event); 42 | 43 | } 44 | } -------------------------------------------------------------------------------- /collections/messages.js: -------------------------------------------------------------------------------- 1 | if(Meteor.isClient){ 2 | // Local (client-only) collection 3 | Messages = new Meteor.Collection(null); 4 | 5 | flashMessage = function(message, type){ 6 | type = (typeof type === 'undefined') ? 'error': type; 7 | // Store errors in the 'Messages' local collection 8 | Messages.insert({message:message, type:type, seen: false, show:true}); 9 | }; 10 | 11 | clearSeenMessages = function(){ 12 | Messages.update({seen:true}, {$set: {show:false}}, {multi:true}); 13 | }; 14 | 15 | } -------------------------------------------------------------------------------- /docs/WHY.md: -------------------------------------------------------------------------------- 1 | 2 | ### meteorbb 项目 需求和说明文档 3 | 4 | 5 | # 这是一个啥? 6 | 7 | meteorbb 是一个论坛,论坛当然主要的功能是发帖子。另外 因为meteor的特性,我们会加上把实时交互的特性柔和进来。 8 | 9 | 比如 帖子可以一个个发 发完这个帖子后,别人可以正式的回复。 10 | 11 | 那么就出来两个东西 12 | 13 | * 正式的帖子 14 | 15 | * 正式的回复 16 | 17 | 18 | 在这两个上面 可以起一个聊天 就是针对证实帖子 回复的实时交流系统 19 | 20 | 实时交流的内容,可以设一个时间间隔 存档一次 做成一个timeline 21 | 22 | 23 | 24 | # 为啥要做? 25 | 26 | 一个新的新技术,为了推广他,搞一个开源的东西 稍微复杂点的 让大家学习很平常。 27 | 28 | 通常就是搞一个论坛或者一个cms 29 | 30 | meteorbb 就是这么一个 31 | 32 | 33 | #有啥用? 34 | 35 | 通过做这个,一方面可以大家一块来学习 meteor的开发 同时也可以作为一个社区(论坛)的载体,来给大家提供一个讨论交流的地方 36 | 37 | 38 | #补充 39 | 40 | * 看到有一个 meteor-bbs 开源的 2年前做的 可以借鉴参考 41 | 42 | * meteorbb 是用来致敬 Nodebb的 43 | 44 | 45 | #体验一下 46 | 47 | 48 | -------------------------------------------------------------------------------- /docs/checkpoint.md: -------------------------------------------------------------------------------- 1 | 参与人员 3名 分别是 cobola 2 | 3 | 4 | #MeteorBB 需求点 5 | 6 | ##需求1 : 7 | 完成MeteorBB主要功能开发 8 | 9 | 10 | * 包括:用户注册、登陆 用户资料 11 | 12 | * 用户发帖,编辑 13 | * 用户发表回复 14 | * 用户顶贴 15 | * 帖子订阅 16 | * MeteorBB开发使用相关文档 17 | 等等 18 | 19 | 20 | ##需求2 21 | 22 | 23 | * 基于帖子的实时聊天功能 24 | * 所有功能基本完善 25 | * 增加资料和学习 供大家学习 26 | * 增加技术交流模块 供大家交流 27 | 28 | * 论坛适应手机浏览 29 | 30 | 31 | ##需求3 32 | 33 | * 功能完成 基本测试通过 34 | * 开始宣传推广 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/config/avatar.js: -------------------------------------------------------------------------------- 1 | Avatar.options = { 2 | fallbackType: 'initials', 3 | emailHashProperty: 'email_hash' 4 | }; 5 | -------------------------------------------------------------------------------- /lib/config/debug.js: -------------------------------------------------------------------------------- 1 | // SimpleSchema.debug = true; -------------------------------------------------------------------------------- /lib/debug.js: -------------------------------------------------------------------------------- 1 | clog = function (s) { 2 | if(getSetting('debug', false)) 3 | console.log(s); 4 | } -------------------------------------------------------------------------------- /lib/events.js: -------------------------------------------------------------------------------- 1 | trackEvent = function(event, properties){ 2 | // console.log('trackevent: ', event, properties); 3 | var properties= (typeof properties === 'undefined') ? {} : properties; 4 | //TODO 5 | // add event to an Events collection for logging and buffering purposes 6 | if(Meteor.isClient){ 7 | if(typeof mixpanel !== 'undefined' && typeof mixpanel.track !== 'undefined'){ 8 | mixpanel.track(event, properties); 9 | } 10 | if(typeof GoSquared !== 'undefined' && typeof GoSquared.DefaultTracker !== 'undefined'){ 11 | GoSquared.DefaultTracker.TrackEvent(event, JSON.stringify(properties)); 12 | } 13 | } 14 | }; -------------------------------------------------------------------------------- /lib/router/comments.js: -------------------------------------------------------------------------------- 1 | // Controller for comment pages 2 | 3 | CommentPageController = RouteController.extend({ 4 | waitOn: function() { 5 | return [ 6 | coreSubscriptions.subscribe('singleCommentAndChildren', this.params._id), 7 | coreSubscriptions.subscribe('commentUsers', this.params._id), 8 | coreSubscriptions.subscribe('commentPost', this.params._id) 9 | ]; 10 | }, 11 | data: function() { 12 | return { 13 | comment: Comments.findOne(this.params._id) 14 | }; 15 | }, 16 | onAfterAction: function () { 17 | window.queueComments = false; 18 | }, 19 | fastRender: true 20 | }); 21 | 22 | Meteor.startup( function () { 23 | 24 | // Comment Reply 25 | 26 | //Router.route('/comments/:_id', { 27 | // name: 'comment_reply', 28 | // template: getTemplate('comment_reply'), 29 | // controller: CommentPageController, 30 | // onAfterAction: function() { 31 | // window.queueComments = false; 32 | // } 33 | //}); 34 | 35 | // Comment Edit 36 | 37 | Router.route('/comments/:_id/edit', { 38 | name: 'comment_edit', 39 | template: getTemplate('comment_edit'), 40 | controller: CommentPageController, 41 | onAfterAction: function() { 42 | window.queueComments = false; 43 | } 44 | }); 45 | 46 | }); -------------------------------------------------------------------------------- /lib/router/config.js: -------------------------------------------------------------------------------- 1 | Router.setTemplateNameConverter(function (str) { return str; }); 2 | 3 | preloadSubscriptions.push('settings'); 4 | preloadSubscriptions.push('currentUser'); 5 | 6 | Router.configure({ 7 | layoutTemplate: getTemplate('layout'), 8 | loadingTemplate: getTemplate('loading'), 9 | notFoundTemplate: getTemplate('notFound'), 10 | waitOn: function () { 11 | return _.map(preloadSubscriptions, function(sub){ 12 | // can either pass strings or objects with subName and subArguments properties 13 | if (typeof sub === 'object'){ 14 | Meteor.subscribe(sub.subName, sub.subArguments); 15 | }else{ 16 | Meteor.subscribe(sub); 17 | } 18 | }); 19 | } 20 | }); 21 | 22 | T9n.setLanguage("zh-cn") 23 | 24 | // adding common subscriptions that's need to be loaded on all the routes 25 | // notification does not included here since it is not much critical and 26 | // it might have considerable amount of docs 27 | if(Meteor.isServer) { 28 | FastRender.onAllRoutes(function() { 29 | var router = this; 30 | _.each(preloadSubscriptions, function(sub){ 31 | router.subscribe(sub); 32 | }); 33 | }); 34 | } 35 | -------------------------------------------------------------------------------- /lib/router/other.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function (){ 2 | 3 | // Settings 4 | 5 | Router.route('/settings', { 6 | name: 'settings', 7 | template: getTemplate('settingsForm'), 8 | data: function () { 9 | // we only have one set of settings for now 10 | return { 11 | hasSettings: !!Settings.find().count(), 12 | settings: Settings.findOne() 13 | } 14 | } 15 | }); 16 | 17 | // Loading (for testing purposes) 18 | 19 | Router.route('/loading', { 20 | name: 'loading', 21 | template: getTemplate('loading') 22 | }); 23 | 24 | // Toolbox 25 | 26 | Router.route('/toolbox', { 27 | name: 'toolbox', 28 | template: getTemplate('toolbox') 29 | }); 30 | 31 | }); -------------------------------------------------------------------------------- /lib/router/server.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Meteor.startup(function (){ 5 | 6 | 7 | 8 | 9 | // Account approved email 10 | 11 | Router.route('/email/account-approved/:id?', { 12 | name: 'accountApproved', 13 | where: 'server', 14 | action: function() { 15 | var user = Meteor.users.findOne(this.params.id); 16 | var emailProperties = { 17 | profileUrl: getProfileUrl(user), 18 | username: getUserName(user), 19 | siteTitle: getSetting('title'), 20 | siteUrl: getSiteUrl() 21 | }; 22 | html = Handlebars.templates[getTemplate('emailAccountApproved')](emailProperties); 23 | this.response.write(buildEmailTemplate(html)); 24 | this.response.end(); 25 | } 26 | }); 27 | 28 | }); -------------------------------------------------------------------------------- /lib/version.js: -------------------------------------------------------------------------------- 1 | telescopeVersion = "0.14.3"; -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /packages.json: -------------------------------------------------------------------------------- 1 | { 2 | "qiniu" : "6.1.3" 3 | } -------------------------------------------------------------------------------- /packages/.gitignore: -------------------------------------------------------------------------------- 1 | /npm-container -------------------------------------------------------------------------------- /packages/meteorbb-base/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-base/lib/base_client.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-base/lib/base_client.js -------------------------------------------------------------------------------- /packages/meteorbb-base/lib/base_server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-base/lib/base_server.js -------------------------------------------------------------------------------- /packages/meteorbb-daily/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-daily/i18n/de.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Daily" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-daily/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Daily", 3 | "day_by_day_view": "The most popular posts of each day.", 4 | "load_next_days": "Load Next Days" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-daily/i18n/es.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Diario", 3 | "day_by_day_view": "Los post mas populares de cada día.", 4 | "load_next_days": "Cargar días siguientes" 5 | } 6 | -------------------------------------------------------------------------------- /packages/meteorbb-daily/i18n/fr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Jour par jour" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-daily/i18n/it.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Daily" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-daily/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Dziennie", 3 | "day_by_day_view": "Najpopularniejsze posty każdego dnia.", 4 | "load_next_days": "Wczytaj kolejne dni" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-daily/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Diário", 3 | "day_by_day_view": "As postagens mais populares de cada dia.", 4 | "load_next_days": "Carregar Próximos Dias" 5 | } 6 | -------------------------------------------------------------------------------- /packages/meteorbb-daily/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Daily" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-daily/lib/client/stylesheets/daily.scss: -------------------------------------------------------------------------------- 1 | .posts-day-heading{ 2 | font-size: 16px; 3 | color: rgba(0,0,0,0.5); 4 | margin: 0 0 10px 0; 5 | } 6 | .empty-day-notice{ 7 | padding: 15px; 8 | } 9 | .posts-day .post:last-child{ 10 | border-radius: 0 0 3px 3px; 11 | } 12 | .load-more-days-button{ 13 | display: block; 14 | background: none; 15 | width:100%; 16 | text-align:center; 17 | font-size:18px; 18 | padding: 0px; 19 | text-align: center; 20 | margin: 20px 0; 21 | } -------------------------------------------------------------------------------- /packages/meteorbb-daily/lib/client/templates/after_day.html: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /packages/meteorbb-daily/lib/client/templates/before_day.html: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /packages/meteorbb-daily/lib/client/templates/posts_daily.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /packages/meteorbb-daily/lib/client/templates/posts_daily.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | Template[getTemplate('postsDaily')].helpers({ 4 | days: function () { 5 | var daysArray = []; 6 | // var days = this.days; 7 | var days = Session.get('postsDays'); 8 | for (i = 0; i < days; i++) { 9 | daysArray.push({ 10 | date: moment().subtract(i, 'days').startOf('day').toDate(), 11 | index: i 12 | }); 13 | } 14 | return daysArray; 15 | }, 16 | before_day: function () { 17 | return getTemplate('beforeDay'); 18 | }, 19 | singleDay: function () { 20 | return getTemplate('singleDay'); 21 | }, 22 | context: function () { 23 | var context = this; 24 | context.showDateNav = false; 25 | return context; 26 | }, 27 | after_day: function () { 28 | return getTemplate('afterDay'); 29 | }, 30 | loadMoreDaysUrl: function () { 31 | var count = parseInt(Session.get('postsDays')) + daysPerPage; 32 | return '/daily/' + count; 33 | } 34 | }); 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /packages/meteorbb-daily/lib/daily.js: -------------------------------------------------------------------------------- 1 | daysPerPage = 5; 2 | 3 | //viewsMenu.push({ 4 | // route: 'postsDaily', 5 | // label: 'daily', 6 | // description: 'day_by_day_view' 7 | //}); -------------------------------------------------------------------------------- /packages/meteorbb-daily/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-daily/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({summary: "Telescope daily view"}); 2 | 3 | Package.onUse(function (api) { 4 | 5 | api.use([ 6 | 'telescope-lib', 7 | 'meteorbb-base', 8 | 'iron:router', 9 | 'meteorhacks:fast-render', 10 | 'meteorhacks:subs-manager', 11 | 'tap:i18n', 12 | 'meteorbb-singleday', 13 | 'fourseven:scss' 14 | ], ['client', 'server']); 15 | 16 | api.use([ 17 | 'jquery', 18 | 'underscore', 19 | 'templating' 20 | ], 'client'); 21 | 22 | api.add_files([ 23 | 'package-tap.i18n', 24 | 'lib/daily.js', 25 | 'lib/routes.js', 26 | ], ['client', 'server']); 27 | 28 | api.add_files([ 29 | 'lib/client/templates/posts_daily.html', 30 | 'lib/client/templates/after_day.html', 31 | 'lib/client/templates/before_day.html', 32 | 'lib/client/templates/posts_daily.js', 33 | 'lib/client/stylesheets/daily.scss', 34 | ], ['client']); 35 | 36 | api.add_files([ 37 | "i18n/de.i18n.json", 38 | "i18n/en.i18n.json", 39 | "i18n/es.i18n.json", 40 | "i18n/fr.i18n.json", 41 | "i18n/it.i18n.json", 42 | "i18n/zh-CN.i18n.json", 43 | ], ["client", "server"]); 44 | 45 | api.export(['PostsDailyController']); 46 | }); -------------------------------------------------------------------------------- /packages/meteorbb-datetimepicker/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-datetimepicker/autoform-bs-datetimepicker.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/meteorbb-datetimepicker/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-datetimepicker/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /packages/meteorbb-datetimepicker/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-datetimepicker/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /packages/meteorbb-datetimepicker/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-datetimepicker/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /packages/meteorbb-datetimepicker/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | name: 'meteorbb-datetimepicker', 3 | summary: 'Custom bootstrap-datetimepicker input type for AutoForm', 4 | version: '1.0.3' 5 | }); 6 | 7 | Package.onUse(function(api) { 8 | api.use('templating@1.0.0'); 9 | api.use('blaze@2.0.0'); 10 | api.use('aldeed:autoform'); 11 | api.use('fourseven:scss'); 12 | // api.use('jquery'); 13 | // api.use('tsega:bootstrap3-datetimepicker'); 14 | // api.use('chriswessels:glyphicons-halflings'); 15 | 16 | api.addFiles([ 17 | 'datetimepicker.scss', 18 | 'autoform-bs-datetimepicker.html', 19 | 'autoform-bs-datetimepicker.js', 20 | 'bootstrap-collapse-transitions.js', 21 | 'fonts/glyphicons-halflings-regular.eot', 22 | 'fonts/glyphicons-halflings-regular.svg', 23 | 'fonts/glyphicons-halflings-regular.ttf', 24 | 'fonts/glyphicons-halflings-regular.woff' 25 | ], 'client'); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/meteorbb-email/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-email/.npm/package/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /packages/meteorbb-email/.npm/package/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /packages/meteorbb-email/.npm/package/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "html-to-text": { 4 | "version": "0.1.0", 5 | "dependencies": { 6 | "htmlparser": { 7 | "version": "1.7.7" 8 | }, 9 | "underscore": { 10 | "version": "1.7.0" 11 | }, 12 | "underscore.string": { 13 | "version": "2.3.3" 14 | }, 15 | "optimist": { 16 | "version": "0.6.1", 17 | "dependencies": { 18 | "wordwrap": { 19 | "version": "0.0.2" 20 | }, 21 | "minimist": { 22 | "version": "0.0.10" 23 | } 24 | } 25 | } 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/meteorbb-email/i18n/de.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "has_created_a_new_post": "has created a new post" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-email/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "has_created_a_new_post": "has created a new post" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-email/i18n/es.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "has_created_a_new_post": "has created a new post" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-email/i18n/fr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "has_created_a_new_post": "a créé un nouveau post" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-email/i18n/it.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "has_created_a_new_post": "has created a new post" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-email/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "has_created_a_new_post": "dodał nowego posta" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-email/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "has_created_a_new_post": "criou uma nova postagem" 3 | } 4 | -------------------------------------------------------------------------------- /packages/meteorbb-email/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "has_created_a_new_post": "has created a new post" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/routes.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | // New user email 4 | 5 | Router.route('/email/new-user/:id?', { 6 | name: 'newUser', 7 | where: 'server', 8 | action: function() { 9 | var user = Meteor.users.findOne(this.params.id); 10 | var emailProperties = { 11 | profileUrl: getProfileUrl(user), 12 | username: getUserName(user) 13 | }; 14 | html = getEmailTemplate('emailNewUser')(emailProperties); 15 | this.response.write(buildEmailTemplate(html)); 16 | this.response.end(); 17 | } 18 | }); 19 | 20 | // New post email 21 | 22 | Router.route('/email/new-post/:id?', { 23 | name: 'newPost', 24 | where: 'server', 25 | action: function() { 26 | var post = Posts.findOne(this.params.id); 27 | if (!!post) { 28 | html = getEmailTemplate('emailNewPost')(getPostProperties(post)); 29 | } else { 30 | html = "

没有相关帖子.

" 31 | } 32 | this.response.write(buildEmailTemplate(html)); 33 | this.response.end(); 34 | } 35 | }); 36 | 37 | 38 | }); -------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailAccountApproved.handlebars: -------------------------------------------------------------------------------- 1 | {{username}}, 欢迎访问 {{siteTitle}}!

2 | 3 | 这是您的邀请链接. 点击访问.

-------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailInvite.handlebars: -------------------------------------------------------------------------------- 1 | 2 | {{invitedBy}} 3 | 邀请你 {{communityName}} 4 |

5 | 6 | {{#if newUser}} 7 | 加入 {{communityName}} 8 | {{else}} 9 | 登录 {{communityName}} 10 | {{/if}} 11 |

12 | -------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailNewComment.handlebars: -------------------------------------------------------------------------------- 1 | 2 | {{comment.author}} 3 | 评论了 4 | {{post.title}}: 5 | 6 |

7 | 8 |
9 | {{{body}}} 10 |
11 |
12 | 13 | 点击回复

-------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailNewPendingPost.handlebars: -------------------------------------------------------------------------------- 1 | 2 | {{postAuthorName}} 3 | 审核通过: 4 | {{#if url}} 5 | {{postTitle}}} 6 | {{else}} 7 | {{postTitle}}} 8 | {{/if}} 9 |

10 | 11 | {{#if htmlBody}} 12 |
13 | {{{htmlBody}}} 14 |
15 |
16 | {{/if}} 17 | 18 | 访问

19 | -------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailNewPost.handlebars: -------------------------------------------------------------------------------- 1 | 2 | {{postAuthorName}} 3 | 发表了一个帖子: 4 | {{#if url}} 5 | {{postTitle}}} 6 | {{else}} 7 | {{postTitle}}} 8 | {{/if}} 9 |

10 | 11 | {{#if htmlBody}} 12 |
13 | {{{htmlBody}}} 14 |
15 |
16 | {{/if}} 17 | 18 | 点击回复

19 | -------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailNewReply.handlebars: -------------------------------------------------------------------------------- 1 | {{comment.author}} 2 | 回复了您的评论 3 | {{post.title}}: 4 | 5 |

6 | 7 |
8 | {{{body}}} 9 |
10 |
11 | 12 | 点击回复

-------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailNewUser.handlebars: -------------------------------------------------------------------------------- 1 | 用户创建成功 {{username}}

-------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailPostApproved.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 恭喜,您的帖子审核通过了 3 | 4 |

5 | {{postTitle}}} 6 |

-------------------------------------------------------------------------------- /packages/meteorbb-email/lib/server/templates/emailTest.handlebars: -------------------------------------------------------------------------------- 1 | This is just a test

2 | 3 | Sent at {{date}}.

-------------------------------------------------------------------------------- /packages/meteorbb-email/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_" 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/content/getting_help.md: -------------------------------------------------------------------------------- 1 | ### Stack Overflow 2 | 3 | The best place to ask for help with specific Telescope questions is [Stack Overflow](http://stackoverflow.com/questions/tagged/telescope). Just make sure you use the `telescope` tag! 4 | 5 | ### Telescope Meta 6 | 7 | If you don't have a question, but instead want to discuss a specific aspect of Telescope (or show the world your new Telescope site!), feel free to open a topic on [Telescope Meta](http://meta.telesc.pe). 8 | 9 | ### GitHub Issues 10 | 11 | Finally, if you've found a bug in Telescope, then you should [leave an issue on GitHub](https://github.com/TelescopeJS/Telescope/issues). 12 | 13 | ### Stack Overflow 14 | 15 | 如果你需要一些Telescope帮助,[Stack Overflow](http://stackoverflow.com/questions/tagged/telescope)是最好的提问题场所。你仅仅需要确认你的问题使用了`telescope`标签。 16 | 17 | ### Telescope Meta 18 | 19 | 如果你仅仅是想讨论一些Telescope的特性,或者展示你用Telescope做的app,你可以在[Telescope Meta](http://meta.telesc.pe)创建一个讨论主题。 20 | 21 | ### GitHub Issues 22 | 23 | 如果你找到一个Telescope的Bug,你可以在Github上[留下你一个issue](https://github.com/TelescopeJS/Telescope/issues). -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/content/images/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-getting-started/content/images/stackoverflow.png -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/content/images/telescope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-getting-started/content/images/telescope.png -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/content/removing_getting_started_posts.md: -------------------------------------------------------------------------------- 1 | Removing Getting Started Posts 2 | 3 | If you're ready to insert your own content and want to delete these getting started posts, comments, and users, you can do so with a single command. 4 | 5 | Just make sure you're logged in, then open your browser console and type: 6 | 7 | Meteor.call('removeGettingStartedContent'); 8 | See you on the other side! 9 | 10 | 11 | ### 清除所有帖子 12 | 13 | 如果你已经安装好了Telescope,就可以删掉这些初始化的帖子了,只用一个命令就可以了。 14 | 15 | 16 | 首先登陆,然后打开浏览器的 [browser console](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers) 敲入: 17 | 18 | ```js 19 | Meteor.call('removeGettingStartedContent'); 20 | ``` -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/content/why.md: -------------------------------------------------------------------------------- 1 | ### meteorbb 项目 需求和说明文档 2 | 3 | 4 | # 这是一个啥? 5 | 6 | meteorbb 是一个论坛,论坛当然主要的功能是发帖子。另外 因为meteor的特性,我们会加上把实时交互的特性柔和进来。 7 | 8 | 比如 帖子可以一个个发 发完这个帖子后,别人可以正式的回复。 9 | 10 | 那么就出来两个东西 11 | 12 | * 正式的帖子 13 | 14 | * 正式的回复 15 | 16 | 17 | 在这两个上面 可以起一个聊天 就是针对证实帖子 回复的实时交流系统 18 | 19 | 实时交流的内容,可以设一个时间间隔 存档一次 做成一个timeline 20 | 21 | 22 | 23 | # 为啥要做? 24 | 25 | 一个新的新技术,为了推广他,搞一个开源的东西 稍微复杂点的 让大家学习很平常。 26 | 27 | 通常就是搞一个论坛或者一个cms 28 | 29 | meteorbb 就是这么一个 30 | 31 | 32 | #有啥用? 33 | 34 | 通过做这个,一方面可以大家一块来学习 meteor的开发 同时也可以作为一个社区(论坛)的载体,来给大家提供一个讨论交流的地方 35 | 36 | 37 | # 注意 38 | * meteorbb 是尝试在[Telescope](https://github.com/TelescopeJS/Telescope)的基础上做二次开发。 39 | 40 | * 看到有一个 meteor-bbs 开源的 2年前做的 可以借鉴参考。 41 | 42 | * meteorbb 是用来致敬 Nodebb的。 43 | 44 | 45 | #体验一下 46 | 47 | 48 | -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "chaves de tradução" 3 | } 4 | -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/lib/getting_started.js: -------------------------------------------------------------------------------- 1 | addToPostSchema.push( 2 | { 3 | propertyName: 'dummySlug', 4 | propertySchema: { 5 | type: String, 6 | optional: true, 7 | autoform: { 8 | omit: true 9 | } 10 | } 11 | } 12 | ); 13 | 14 | addToPostSchema.push( 15 | { 16 | propertyName: 'isDummy', 17 | propertySchema: { 18 | type: Boolean, 19 | optional: true, 20 | autoform: { 21 | omit: true 22 | } 23 | } 24 | } 25 | ); 26 | 27 | addToCommentsSchema.push( 28 | { 29 | propertyName: 'isDummy', 30 | propertySchema: { 31 | type: Boolean, 32 | optional: true, 33 | autoform: { 34 | omit: true 35 | } 36 | } 37 | } 38 | ); -------------------------------------------------------------------------------- /packages/meteorbb-getting-started/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-i18n/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-i18n/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({summary: "Telescope i18n package"}); 2 | 3 | Package.onUse(function (api) { 4 | api.use(["tap:i18n"], ["client", "server"]); 5 | api.use(["session"], "client"); 6 | api.add_files(['i18n.js'], ['client', 'server']); 7 | api.export([ 8 | 'i18n', 9 | 'setLanguage' 10 | ]); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/meteorbb-invites/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-invites/i18n/de.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-invites/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-invites/i18n/es.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-invites/i18n/fr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-invites/i18n/it.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-invites/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-invites/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "chave de tradução" 3 | } 4 | -------------------------------------------------------------------------------- /packages/meteorbb-invites/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-invites/lib/server/publications.js: -------------------------------------------------------------------------------- 1 | Meteor.publish('invites', function (userId) { 2 | var invites = Invites.find({invitingUserId: userId}) 3 | return (this.userId === userId || isAdmin(Meteor.user())) ? invites : [] 4 | }); -------------------------------------------------------------------------------- /packages/meteorbb-invites/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-kadira/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-kadira/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "kadiraAppId": "Kadira App ID", 3 | "kadiraAppSecret": "Kadira App Secret" 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-kadira/lib/kadira-settings.js: -------------------------------------------------------------------------------- 1 | var kadiraAppIdProperty = { 2 | propertyName: 'kadiraAppId', 3 | propertyGroup: 'kadira', 4 | propertySchema: { 5 | type: String, 6 | optional: true, 7 | autoform: { 8 | group: 'kadira' 9 | } 10 | } 11 | } 12 | addToSettingsSchema.push(kadiraAppIdProperty); 13 | 14 | var kadiraAppSecretProperty = { 15 | propertyName: 'kadiraAppSecret', 16 | propertyGroup: 'kadira', 17 | propertySchema: { 18 | type: String, 19 | optional: true, 20 | autoform: { 21 | group: 'kadira', 22 | private: true 23 | } 24 | } 25 | } 26 | addToSettingsSchema.push(kadiraAppSecretProperty); -------------------------------------------------------------------------------- /packages/meteorbb-kadira/lib/server/kadira.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function() { 2 | if(!!getSetting('kadiraAppId') && !!getSetting('kadiraAppSecret')){ 3 | Kadira.connect(getSetting('kadiraAppId'), getSetting('kadiraAppSecret')); 4 | } 5 | }); -------------------------------------------------------------------------------- /packages/meteorbb-kadira/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-kadira/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Telescope Kadira package", 3 | version: '0.1.0', 4 | name: "meteorbb-kadira" 5 | }); 6 | 7 | Package.onUse(function (api) { 8 | 9 | api.use([ 10 | 'templating', 11 | 'telescope-lib', 12 | 'meteorbb-base', 13 | 'tap:i18n', 14 | 'meteorhacks:kadira@2.17.2' 15 | ], ['client', 'server']); 16 | 17 | api.add_files([ 18 | 'package-tap.i18n', 19 | 'lib/kadira-settings.js' 20 | ], ['client', 'server']); 21 | 22 | api.add_files([ 23 | 'lib/server/kadira.js' 24 | ], ['server']); 25 | 26 | api.add_files([ 27 | "i18n/en.i18n.json" 28 | ], ["client", "server"]); 29 | 30 | }); -------------------------------------------------------------------------------- /packages/meteorbb-notifications/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/i18n/de.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "left_a_new_comment_on": "left a new comment on", 3 | "has_replied_to_your_comment_on": "has replied to your comment on", 4 | "mark_as_read": "Mark as read", 5 | "no_notifications": "No notifications", 6 | "you_have_been_unsubscribed_from_all_notifications": "You have been unsubscribed from all notifications.", 7 | "user_not_found": "User not found", 8 | "1_notification": "1 notification", 9 | "notifications": "notifications" 10 | } -------------------------------------------------------------------------------- /packages/meteorbb-notifications/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "left_a_new_comment_on": "left a new comment on", 3 | "has_replied_to_your_comment_on": "has replied to your comment on", 4 | "mark_as_read": "Mark as read", 5 | "no_notifications": "No notifications", 6 | "you_have_been_unsubscribed_from_all_notifications": "You have been unsubscribed from all notifications.", 7 | "user_not_found": "User not found", 8 | "1_notification": "1 notification", 9 | "notifications": "notifications", 10 | "notifications_fieldset": "Notifications", 11 | "emailNotifications": "Email Notifications", 12 | "your_post": "Your post", 13 | "has_been_approved": "has been approved" 14 | } 15 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/i18n/es.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "left_a_new_comment_on": "left a new comment on", 3 | "has_replied_to_your_comment_on": "has replied to your comment on", 4 | "mark_as_read": "Mark as read", 5 | "no_notifications": "No notifications", 6 | "you_have_been_unsubscribed_from_all_notifications": "You have been unsubscribed from all notifications.", 7 | "user_not_found": "User not found", 8 | "1_notification": "1 notification", 9 | "notifications": "notifications" 10 | } -------------------------------------------------------------------------------- /packages/meteorbb-notifications/i18n/fr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "left_a_new_comment_on": "a laissé un nouveau commentaire sur", 3 | "has_replied_to_your_comment_on": "a répondu à", 4 | "mark_as_read": "Marquer comme lu", 5 | "no_notifications": "Aucune notification", 6 | "you_have_been_unsubscribed_from_all_notifications": "Vous avez été désabonné de toutes les notifications.", 7 | "user_not_found": "Utilisateur non trouvé", 8 | "1_notification": "1 notification", 9 | "notifications": "notifications", 10 | "emailNotifications": "Notifications par Email", 11 | "your_post": "Votre post", 12 | "has_been_approved": "a été approuvé" 13 | } -------------------------------------------------------------------------------- /packages/meteorbb-notifications/i18n/it.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "left_a_new_comment_on": "left a new comment on", 3 | "has_replied_to_your_comment_on": "has replied to your comment on", 4 | "mark_as_read": "Mark as read", 5 | "no_notifications": "No notifications", 6 | "you_have_been_unsubscribed_from_all_notifications": "You have been unsubscribed from all notifications.", 7 | "user_not_found": "User not found", 8 | "1_notification": "1 notification", 9 | "notifications": "notifications" 10 | } -------------------------------------------------------------------------------- /packages/meteorbb-notifications/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "left_a_new_comment_on": "dodał nowy komentarz w", 3 | "has_replied_to_your_comment_on": "odpowiedział na twój komentarz w", 4 | "mark_as_read": "Oznacz jako przeczytane", 5 | "no_notifications": "Brak powiadomień", 6 | "you_have_been_unsubscribed_from_all_notifications": "Zostałeś wypisany ze wszystkich powiadomień.", 7 | "user_not_found": "Użytkownik nie został odnaleziony", 8 | "1_notification": "1 powiadomienie", 9 | "notifications": "powiadomień", 10 | "notifications_fieldset": "Powiadomienia", 11 | "emailNotifications": "Powiadomienia Email", 12 | "your_post": "Twój post", 13 | "has_been_approved": "został zaakceptowany" 14 | } -------------------------------------------------------------------------------- /packages/meteorbb-notifications/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "left_a_new_comment_on": "deixou um novo comentário em", 3 | "has_replied_to_your_comment_on": "respondeu ao seu comentário em", 4 | "mark_as_read": "Marcar como lido", 5 | "no_notifications": "Sem notificações", 6 | "you_have_been_unsubscribed_from_all_notifications": "Você se desinscreveu de todas as notificações.", 7 | "user_not_found": "Usuário não encontrado", 8 | "1_notification": "1 notificação", 9 | "notifications": "notificações", 10 | "notifications_fieldset": "Notificações", 11 | "emailNotifications": "Notificações por Email", 12 | "your_post": "Sua postagem", 13 | "has_been_approved": "foi aprovada" 14 | } 15 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "left_a_new_comment_on": "留下了一个评论", 3 | "has_replied_to_your_comment_on": "回复了您的评论", 4 | "mark_as_read": "标记为已读", 5 | "no_notifications": "木有消息", 6 | "you_have_been_unsubscribed_from_all_notifications": "你已经取消了所有的消息提醒.", 7 | "user_not_found": "用户木找到", 8 | "1_notification": "1个提醒", 9 | "notifications": "提醒", 10 | "emailNotifications": "邮件提醒" 11 | } -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/client/templates/notification_item.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/client/templates/notification_item.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('notificationItem')].helpers({ 2 | properties: function(){ 3 | return this.data; 4 | }, 5 | notificationHTML: function(){ 6 | return this.message(); 7 | } 8 | }); 9 | 10 | Template[getTemplate('notificationItem')].events({ 11 | 'click .action-link': function(event, instance){ 12 | var notificationId=instance.data._id; 13 | Herald.collection.update( 14 | {_id: notificationId}, 15 | { 16 | $set:{ 17 | read: true 18 | } 19 | }, 20 | function(error, result){ 21 | if(error){ 22 | console.log(error); 23 | } 24 | } 25 | ); 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/client/templates/notification_new_comment.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/client/templates/notification_new_reply.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/client/templates/notification_post_approved.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/client/templates/notifications_menu.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/client/templates/unsubscribe.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/client/templates/unsubscribe.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('unsubscribe')].created = function(){ 2 | var hash = this.data.hash; 3 | Meteor.call('unsubscribeUser', hash, function(error, result){ 4 | if(result){ 5 | Session.set('unsubscribedMessage', __('you_have_been_unsubscribed_from_all_notifications')); 6 | }else{ 7 | Session.set('unsubscribedMessage', __('user_not_found')); 8 | } 9 | }); 10 | trackEvent('notificationsUnsubcribe', {hash: hash}); 11 | }; 12 | 13 | Template[getTemplate('unsubscribe')].helpers({ 14 | unsubscribed : function(){ 15 | // we have to use a session variable because the string we want to display 16 | // depends on the return value of an asynchronous callback (unsubscribeUser) 17 | return Session.get('unsubscribedMessage'); 18 | } 19 | }); -------------------------------------------------------------------------------- /packages/meteorbb-notifications/lib/server/routes.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | // Notification email 4 | 5 | Router.route('/email/notification/:id?', { 6 | name: 'notification', 7 | where: 'server', 8 | action: function() { 9 | var notification = Herald.collection.findOne(this.params.id); 10 | var notificationContents = buildEmailNotification(notification); 11 | this.response.write(notificationContents.html); 12 | this.response.end(); 13 | } 14 | }); 15 | 16 | }); -------------------------------------------------------------------------------- /packages/meteorbb-notifications/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-releases/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-releases/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "telescope_has_been_updated": "Telescope has been updated." 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-releases/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "telescope_has_been_updated": "Telescope foi atualizado." 3 | } 4 | -------------------------------------------------------------------------------- /packages/meteorbb-releases/lib/client/scss/releases.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-releases/lib/client/scss/releases.scss -------------------------------------------------------------------------------- /packages/meteorbb-releases/lib/client/templates/current_release.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/meteorbb-releases/lib/client/templates/current_release.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | Template[getTemplate('currentRelease')].created = function () { 4 | this.release = function () { 5 | return Releases.find({read: false}).fetch()[0]; 6 | } 7 | }; 8 | 9 | Template[getTemplate('currentRelease')].helpers({ 10 | currentRelease: function () { 11 | return Template.instance().release(); 12 | } 13 | }); 14 | 15 | Template[getTemplate('currentRelease')].events({ 16 | 'click .release-dismiss': function (event, instance) { 17 | event.preventDefault(); 18 | Releases.update(instance.release()._id, {$set: {read: true}}); 19 | } 20 | }) 21 | 22 | }); 23 | -------------------------------------------------------------------------------- /packages/meteorbb-releases/lib/releases.js: -------------------------------------------------------------------------------- 1 | Releases = new Meteor.Collection('releases'); 2 | 3 | heroModules.push({ 4 | template: 'currentRelease' 5 | }); 6 | 7 | preloadSubscriptions.push('currentRelease'); 8 | 9 | Meteor.startup(function () { 10 | Releases.allow({ 11 | insert: isAdminById, 12 | update: isAdminById, 13 | remove: isAdminById 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/meteorbb-releases/lib/server/import_releases.js: -------------------------------------------------------------------------------- 1 | importRelease = function (number) { 2 | var releaseNotes = Assets.getText("releases/" + number + ".md"); 3 | 4 | if (!Releases.findOne({number: number})) { 5 | 6 | release = { 7 | number: number, 8 | notes: releaseNotes, 9 | createdAt: new Date(), 10 | read: false 11 | } 12 | Releases.insert(release); 13 | 14 | } else { 15 | 16 | // if release note already exists, update its content in case it's been updated 17 | Releases.update({number: number}, {$set: {notes: releaseNotes}}) 18 | 19 | } 20 | }; 21 | 22 | Meteor.startup(function () { 23 | 24 | importRelease('0.0.1'); 25 | 26 | 27 | // if this is before the first run, mark all release notes as read to avoid showing them 28 | if (!Events.findOne({name: 'firstRun'})) { 29 | var r = Releases.update({}, {$set: {read: true}}, {multi: true}); 30 | } 31 | 32 | }); -------------------------------------------------------------------------------- /packages/meteorbb-releases/lib/server/publications.js: -------------------------------------------------------------------------------- 1 | Meteor.publish('currentRelease', function() { 2 | if(isAdminById(this.userId)){ 3 | return Releases.find({}, {sort: {createdAt: -1}, limit: 1}); 4 | } 5 | return []; 6 | }); -------------------------------------------------------------------------------- /packages/meteorbb-releases/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-releases/releases/0.0.1.md: -------------------------------------------------------------------------------- 1 | ### v0.0.1 “OK 发布第一个版本” 2 | 3 | * ok 了 -------------------------------------------------------------------------------- /packages/meteorbb-richeditor/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-richeditor/autoform-meteorbb-richeditor.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/meteorbb-richeditor/autoform-meteorbb-richeditor.js: -------------------------------------------------------------------------------- 1 | AutoForm.addInputType("meteorbb-richeditor", { 2 | template: "RichEditor" 3 | }); 4 | 5 | Template.RichEditor.helpers({ 6 | atts: function addFormControlAtts() { 7 | var atts = _.clone(this.atts); 8 | // Add bootstrap class 9 | atts = AutoForm.Utility.addClass(atts, "form-control"); 10 | atts = AutoForm.Utility.addClass(atts, "richeditor"); 11 | 12 | return atts; 13 | }, 14 | value:function getvalue(){ 15 | 16 | return Template.currentData().value; 17 | } 18 | }); 19 | 20 | -------------------------------------------------------------------------------- /packages/meteorbb-richeditor/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | name: 'meteorbb-richeditor', 3 | summary: 'Custom richeditor input type for AutoForm', 4 | version: '1.0.3' 5 | }); 6 | 7 | Package.onUse(function(api) { 8 | api.use('templating@1.0.0'); 9 | api.use('blaze@2.0.0'); 10 | api.use('aldeed:autoform'); 11 | api.use('fourseven:scss'); 12 | api.use('jeremy:ghostdown'); 13 | 14 | api.addFiles([ 15 | 'richeditor.scss', 16 | 'autoform-meteorbb-richeditor.html', 17 | 'autoform-meteorbb-richeditor.js' 18 | ], 'client'); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/meteorbb-richeditor/richeditor.scss: -------------------------------------------------------------------------------- 1 | body{ 2 | .meteorbb-richeditor{ 3 | background: white; 4 | width: auto; 5 | box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); 6 | border: 1px solid rgba(0, 0, 0, 0.15); 7 | font-size: 13px; 8 | display: none; 9 | .btn{ 10 | } 11 | .collapse{ 12 | display: none; 13 | &.in{ 14 | display: block; 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/meteorbb-rss/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-rss/.npm/package/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /packages/meteorbb-rss/.npm/package/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /packages/meteorbb-rss/.npm/package/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "rss": { 4 | "version": "0.3.2", 5 | "dependencies": { 6 | "xml": { 7 | "version": "0.0.12" 8 | }, 9 | "mime": { 10 | "version": "1.2.11" 11 | } 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/meteorbb-rss/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({summary: "Telescope RSS package"}); 2 | 3 | Npm.depends({rss: "0.3.2"}); 4 | 5 | Package.onUse(function (api) { 6 | 7 | api.use(['meteorbb-base', 'telescope-lib'], ['server']); 8 | 9 | api.add_files(['lib/server/rss.js', 'lib/server/routes.js'], ['server']); 10 | 11 | api.export(['serveRSS']); 12 | }); -------------------------------------------------------------------------------- /packages/meteorbb-search/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/de.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "Mehr Laden", 3 | "search": "Suchen" 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "Load more", 3 | "search": "Search", 4 | "search_logs": "Search Logs", 5 | "see_what_people_are_searching_for": "See what people are searching for." 6 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/es.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "Cargar más", 3 | "search": "Búsqueda" 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/fr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "Charger plus", 3 | "search": "Rechercher" 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/it.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "Carica altro", 3 | "search": "Ricerca" 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "Wczytaj więcej", 3 | "search": "Szukaj", 4 | "search_logs": "Historia wyszukiwań", 5 | "see_what_people_are_searching_for": "Zobacz co wyszukują użytkownicy." 6 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "Carregar mais", 3 | "search": "Busca", 4 | "search_logs": "Logs de Busca", 5 | "see_what_people_are_searching_for": "Veja o que as pessoas estão procurando." 6 | } 7 | -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/tr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "Daha Fazla yükle", 3 | "search": "Search" 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "load_more": "加载更多", 3 | "search": "搜索", 4 | "search_logs": "搜索记录", 5 | "see_what_people_are_searching_for": "小伙伴们都在搜.", 6 | "keywords":"关键词", 7 | "timestamp":"时间" 8 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/lib/client/stylesheets/search.scss: -------------------------------------------------------------------------------- 1 | .mobile-nav .search{ 2 | padding: 10px; 3 | } 4 | .search { 5 | $compressed-width: 120px; 6 | $expanded-width: 200px; 7 | 8 | position: relative; 9 | .search-field { 10 | color: #4a4444; 11 | font-size: 14px; 12 | padding: 4px 12px; 13 | line-height: 1.3; 14 | border-radius: 20px; 15 | border: 0px; 16 | width: $expanded-width; 17 | transition: 0.2s all; 18 | -webkit-appearance: textfield; 19 | background: white; 20 | &:focus { 21 | outline: none; 22 | } 23 | .white-background &{ 24 | border: 1px solid #ddd; 25 | } 26 | } 27 | &.empty { 28 | .search-field { 29 | width: $compressed-width; 30 | background: white(0.1); 31 | &:focus { 32 | background: white; 33 | width: $expanded-width; 34 | } 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/lib/client/templates/search.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/meteorbb-search/lib/client/templates/search_logs.html: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /packages/meteorbb-search/lib/client/templates/search_logs.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | Template[getTemplate('searchLogs')].helpers({ 3 | getTime: function () { 4 | return moment(this.timestamp).format("HH:mm:ss"); 5 | }, 6 | getDate: function () { 7 | currentDate = moment(this.timestamp).format("MMMM DD"); 8 | return currentDate; 9 | }, 10 | searchCount: function () { 11 | // TODO: doesn't work properly with "load more" 12 | var after = moment(this.timestamp).startOf('day').valueOf(), 13 | before = moment(this.timestamp).endOf('day').valueOf(); 14 | 15 | return Searches.find({ 16 | timestamp: { 17 | $gte: after, 18 | $lt: before 19 | } 20 | }).count(); 21 | }, 22 | isNewDate: function () { 23 | return (typeof currentDate === 'undefined') ? true : (currentDate !== moment(this.timestamp).format("MMMM DD")); 24 | }, 25 | loadMoreUrl: function () { 26 | var count = parseInt(Session.get('logsLimit')) + 100; 27 | return '/logs/' + count; 28 | }, 29 | }); 30 | }); -------------------------------------------------------------------------------- /packages/meteorbb-search/lib/server/log_search.js: -------------------------------------------------------------------------------- 1 | var logSearch = function (keyword) { 2 | Searches.insert({ 3 | timestamp: new Date(), 4 | keyword: keyword 5 | }); 6 | }; 7 | 8 | Meteor.methods({ 9 | logSearch: function (keyword) { 10 | logSearch.call(this, keyword); 11 | } 12 | }); -------------------------------------------------------------------------------- /packages/meteorbb-search/lib/server/publications.js: -------------------------------------------------------------------------------- 1 | Meteor.publish('searches', function(limit) { 2 | var limit = typeof limit === undefined ? 20 : limit; 3 | if(isAdminById(this.userId)){ 4 | return Searches.find({}, {limit: limit, sort: {timestamp: -1}}); 5 | } 6 | return []; 7 | }); -------------------------------------------------------------------------------- /packages/meteorbb-search/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-search/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({summary: "MeteorBB search package"}); 2 | 3 | Package.onUse(function (api) { 4 | 5 | api.use(['telescope-lib', 'meteorbb-base', 'aldeed:simple-schema'], ['client', 'server']); 6 | 7 | api.use([ 8 | 'jquery', 9 | 'underscore', 10 | 'iron:router', 11 | 'templating', 12 | 'tap:i18n', 13 | 'fourseven:scss' 14 | ], 'client'); 15 | 16 | api.add_files([ 17 | 'lib/search.js', 18 | 'package-tap.i18n' 19 | ], ['client', 'server']); 20 | 21 | api.add_files([ 22 | 'lib/client/routes.js', 23 | 'lib/client/templates/search.html', 24 | 'lib/client/templates/search.js', 25 | 'lib/client/templates/search_logs.html', 26 | 'lib/client/templates/search_logs.js', 27 | 'lib/client/stylesheets/search.scss' 28 | ], ['client']); 29 | 30 | api.add_files([ 31 | 'lib/server/log_search.js', 32 | 'lib/server/publications.js' 33 | ], ['server']); 34 | 35 | api.add_files([ 36 | "i18n/de.i18n.json", 37 | "i18n/en.i18n.json", 38 | "i18n/es.i18n.json", 39 | "i18n/fr.i18n.json", 40 | "i18n/it.i18n.json", 41 | "i18n/zh-CN.i18n.json", 42 | ], ["client", "server"]); 43 | 44 | api.export(['adminMenu', 'viewParameters']); 45 | }); -------------------------------------------------------------------------------- /packages/meteorbb-singleday/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/bg.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "Топ 5 публикации от всеки ден", 3 | "previous_day": "Предишен ден", 4 | "next_day": "Следващ ден", 5 | "sorry_no_posts_for_today": "Няма публикации за днес", 6 | "sorry_no_posts_for": "Няма публикации за", 7 | "today": "Днес", 8 | "yesterday": "Вчера", 9 | "single_day": "определен ден.", 10 | "posts_of_a_single_day": "Публикации за определен ден.", 11 | "singleday": "Определен ден" 12 | } 13 | -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/de.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "Die Top-5-Links eines jeden Tages.", 3 | "previous_day": "Einen Tag zurück", 4 | "next_day": "Einen Tag vor", 5 | "sorry_no_posts_for_today": "Heute gibt es keine Links.", 6 | "sorry_no_posts_for": "Keine Links für", 7 | "today": "Heute", 8 | "yesterday": "Gestern" 9 | } -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "The top 5 posts of each day.", 3 | "previous_day": "Previous Day", 4 | "next_day": "Next Day", 5 | "sorry_no_posts_for_today": "Sorry, no posts for today", 6 | "sorry_no_posts_for": "Sorry, no posts for", 7 | "today": "Today", 8 | "yesterday": "Yesterday", 9 | "single_day": "Single Day", 10 | "singleday": "Single Day", 11 | "posts_of_a_single_day": "The posts of a single day." 12 | } -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/es.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "Los 5 mejores posts de cada día", 3 | "previous_day": "Dia anterior", 4 | "next_day": "Dia siguiente", 5 | "sorry_no_posts_for_today": "Lo sentimos, no hay post para hoy", 6 | "today": "Hoy", 7 | "yesterday": "Ayer" 8 | } -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/fr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "5 meilleurs post par jours", 3 | "previous_day": "Jour précédent", 4 | "next_day": "Jour suivant", 5 | "sorry_no_posts_for_today": "Désolé, aucun post aujourd'hui", 6 | "sorry_no_posts_for": "Désolé, aucun post pour", 7 | "today": "Aujourd'hui", 8 | "yesterday": "Hier" 9 | } -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/it.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "I 5 migliori post di ogni giorno.", 3 | "previous_day": "Giorno Precedente", 4 | "next_day": "Giorno Successivo", 5 | "sorry_no_posts_for_today": "Ci spiace, non ci sono post per oggi", 6 | "sorry_no_posts_for": "Ci spiace, non ci sono post per", 7 | "today": "Oggi", 8 | "yesterday": "Ieri" 9 | } -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "Najlepsze 5 postów z każdego dnia.", 3 | "previous_day": "Poprzedni dzień", 4 | "next_day": "Następny dzień", 5 | "sorry_no_posts_for_today": "Brak postów na dzisiaj", 6 | "sorry_no_posts_for": "Brak postów na ", 7 | "today": "Dzisiaj", 8 | "yesterday": "Wczoraj", 9 | "single_day": "Jeden dzień", 10 | "posts_of_a_single_day": "Posty z jednego dnia." 11 | } -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "As principais 5 postagens de cada dia.", 3 | "previous_day": "Dia Anterior", 4 | "next_day": "Próximo Dia", 5 | "sorry_no_posts_for_today": "Desculpe, sem postagens por hoje", 6 | "sorry_no_posts_for": "Desculpe sem postagem para", 7 | "today": "Hoje", 8 | "yesterday": "Ontem", 9 | "single_day": "Único Dia", 10 | "posts_of_a_single_day": "As postagens de um único dia." 11 | } 12 | -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/tr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "Her günün en üst 5 paylaşımı", 3 | "previous_day": "Önceki gün", 4 | "next_day": "Sonraki gün", 5 | "Sorry, no posts for today": "Özür dileriz, bugün bir paylaşım yok", 6 | "sorry_no_posts_for_today": "Özür dileriz, paylaşım yok", 7 | "today": "Bugün", 8 | "yesterday": "Dün" 9 | } -------------------------------------------------------------------------------- /packages/meteorbb-singleday/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "the_top_5_posts_of_each_day": "每天前5名的帖子", 3 | "previous_day": "前一天", 4 | "next_day": "后一天", 5 | "sorry_no_posts_for_today": "抱歉今天没有新的帖子", 6 | "today": "今天", 7 | "yesterday": "昨天" 8 | } -------------------------------------------------------------------------------- /packages/meteorbb-singleday/lib/client/templates/single_day.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /packages/meteorbb-singleday/lib/client/templates/single_day_nav.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /packages/meteorbb-singleday/lib/routes.js: -------------------------------------------------------------------------------- 1 | // Controller for post digest 2 | 3 | PostsSingledayController = RouteController.extend({ 4 | 5 | template: getTemplate('singleDay'), 6 | 7 | data: function() { 8 | var currentDate = this.params.day ? new Date(this.params.year, this.params.month-1, this.params.day) : Session.get('today'); 9 | Session.set('currentDate', currentDate); 10 | }, 11 | 12 | getTitle: function () { 13 | return i18n.t('single_day') + ' - ' + getSetting('title', 'Telescope'); 14 | }, 15 | 16 | getDescription: function () { 17 | return i18n.t('posts_of_a_single_day'); 18 | }, 19 | 20 | fastRender: true 21 | 22 | }); 23 | 24 | Meteor.startup(function () { 25 | 26 | // Digest 27 | 28 | Router.route('/day/:year/:month/:day', { 29 | name: 'postsSingleDay', 30 | controller: PostsSingledayController 31 | }); 32 | 33 | Router.route('/day', { 34 | name: 'postsSingleDayDefault', 35 | controller: PostsSingledayController 36 | }); 37 | 38 | }); -------------------------------------------------------------------------------- /packages/meteorbb-singleday/lib/singleday.js: -------------------------------------------------------------------------------- 1 | //viewsMenu.push({ 2 | // route: 'postsSingleDayDefault', 3 | // label: 'singleday', 4 | // description: 'posts_of_a_single_day' 5 | //}); 6 | 7 | viewParameters.singleday = function (terms) { 8 | return { 9 | find: { 10 | postedAt: { 11 | $gte: terms.after, 12 | $lt: terms.before 13 | } 14 | }, 15 | options: { 16 | sort: {sticky: -1, score: -1} 17 | } 18 | }; 19 | }; 20 | 21 | getDateURL = function(moment){ 22 | return Router.path('postsSingleDay', { 23 | year: moment.year(), 24 | month: moment.month() + 1, 25 | day: moment.date() 26 | }); 27 | }; -------------------------------------------------------------------------------- /packages/meteorbb-singleday/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "subscribed_posts": "Subscribed Posts", 3 | "subscribe_to_thread": "Subscribe to comment thread", 4 | "unsubscribe_from_thread": "Unsubscribe from comment thread" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "subscribed_posts": "Posty które subskrybujesz", 3 | "subscribe_to_thread": "Subskrybuj", 4 | "unsubscribe_from_thread": "Nie subskrybuj" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "subscribed_posts": "Postagens inscritas", 3 | "subscribe_to_thread": "Inscreva-se aos comentários", 4 | "unsubscribe_from_thread": "Desinscreva-se dos comentários" 5 | } 6 | -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "subscribed_posts": "订阅本帖子", 3 | "subscribe_to_thread": "订阅回复", 4 | "unsubscribe_from_thread": "取消订阅回复" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/lib/client/stylesheets/subscribe-to-posts.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/meteorbb-subscribe-to-posts/lib/client/stylesheets/subscribe-to-posts.scss -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/lib/client/templates/post_subscribe.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/lib/client/templates/user_subscribed_posts.html: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/lib/server/publications.js: -------------------------------------------------------------------------------- 1 | Meteor.publish('userSubscribedPosts', function(terms) { 2 | var parameters = getPostsParameters(terms); 3 | var posts = Posts.find(parameters.find, parameters.options); 4 | return posts; 5 | }); 6 | -------------------------------------------------------------------------------- /packages/meteorbb-subscribe-to-posts/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/bg.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "Категории", 3 | "add_and_remove_categories": "Добавяне и изтриване на категории." 4 | } 5 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/de.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "Kategorien" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "Categories", 3 | "add_and_remove_categories": "Add and remove categories." 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/es.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "Categorías" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/fr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "Catégories" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/it.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "Categorie" 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "Kategorie", 3 | "add_and_remove_categories": "Dodaj/Usuń kategorie." 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "Categorias", 3 | "add_and_remove_categories": "Adicionar e remover categorias." 4 | } 5 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": "全部", 3 | "add_and_remove_categories":"添加或者删除节点" 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/routes.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | Router.onBeforeAction(Router._filters.isAdmin, {only: ['categories']}); 4 | 5 | PostsCategoryController = PostsListController.extend({ 6 | 7 | view: 'category', 8 | 9 | getCurrentCategory: function () { 10 | return Categories.findOne({slug: this.params.slug}); 11 | }, 12 | 13 | getTitle: function () { 14 | var category = this.getCurrentCategory(); 15 | return category.name + ' - ' + getSetting('title', 'MeteorBB'); 16 | }, 17 | 18 | getDescription: function () { 19 | return this.getCurrentCategory().description; 20 | } 21 | 22 | }); 23 | 24 | // Categories 25 | 26 | Router.route('/category/:slug/:limit?', { 27 | name: 'posts_category', 28 | controller: PostsCategoryController, 29 | onAfterAction: function() { 30 | this.slug = this.params.slug; 31 | Session.set('categorySlug', this.params.slug); 32 | } 33 | }); 34 | 35 | // Categories Admin 36 | 37 | Router.route('/categories', { 38 | name: 'categories' 39 | }); 40 | 41 | 42 | }); -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/scss/categories.scss: -------------------------------------------------------------------------------- 1 | $red: #DD3416; 2 | $light-yellow:#fffcea; 3 | 4 | .post-category{ 5 | display:inline-block; 6 | font-size:12px; 7 | background:#eee; 8 | padding:3px 5px 1px 5px; 9 | text-transform:uppercase; 10 | font-weight:normal; 11 | vertical-align:middle; 12 | &:hover{ 13 | background:$red; 14 | color:white; 15 | } 16 | } 17 | 18 | .add-category{ 19 | background: $light-yellow; 20 | } 21 | 22 | .post-categories{ 23 | text-align: right; 24 | } -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/templates/categories.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/templates/categories.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | Template[getTemplate('categories')].helpers({ 3 | categories: function(){ 4 | return Categories.find({}, {sort: {order: 1, name: 1}}); 5 | }, 6 | categoryItem: function () { 7 | return getTemplate('categoryItem'); 8 | } 9 | }); 10 | 11 | Template[getTemplate('categories')].events({ 12 | 'click input[type=submit]': function(e){ 13 | e.preventDefault(); 14 | 15 | var name = $('#name').val(); 16 | var numberOfCategories = Categories.find().count(); 17 | var order = parseInt($('#order').val()) || (numberOfCategories + 1); 18 | var slug = slugify(name); 19 | 20 | Meteor.call('submitCategory', { 21 | name: name, 22 | order: order, 23 | slug: slug 24 | }, function(error, categoryName) { 25 | if(error){ 26 | console.log(error); 27 | flashMessage(error.reason, "error"); 28 | clearSeenMessages(); 29 | }else{ 30 | $('#name').val(''); 31 | // flashMessage('New category "'+categoryName+'" created', "success"); 32 | } 33 | }); 34 | } 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/templates/categories_tags.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/templates/categories_tags.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | Template[getTemplate('categoriesTags')].helpers({ 3 | hasCategories: function(){ 4 | return typeof Categories !== 'undefined' && Categories.find().count(); 5 | }, 6 | cat: function () { 7 | return __('categories') 8 | }, 9 | categories: function(){ 10 | return Categories.find({}, {sort: {order: 1, name: 1}}); 11 | }, 12 | categoryLink: function () { 13 | return getCategoryUrl(this.slug); 14 | } 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/templates/category_item.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/templates/category_item.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | Template[getTemplate('categoryItem')].helpers({ 3 | formId: function () { 4 | return 'updateCategory-'+ this._id 5 | } 6 | }); 7 | 8 | Template[getTemplate('categoryItem')].events({ 9 | 'click .delete-link': function(e, instance){ 10 | e.preventDefault(); 11 | if (confirm("Delete category?")) { 12 | Categories.remove(instance.data._id); 13 | } 14 | } 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/templates/post_categories.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/client/templates/post_categories.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | Template[getTemplate('postCategories')].helpers({ 3 | categoriesArray: function(){ 4 | return _.map(this.categories, function (categoryId) { // note: this.categories maybe be undefined 5 | return Categories.findOne(categoryId); 6 | }); 7 | }, 8 | categoryLink: function(){ 9 | return getCategoryUrl(this.slug); 10 | } 11 | }); 12 | }); -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/custom_fields.js: -------------------------------------------------------------------------------- 1 | addToPostSchema.push( 2 | { 3 | propertyName: 'categories', 4 | propertySchema: { 5 | type: [String], 6 | optional: true, 7 | editable: true, 8 | autoform: { 9 | editable: true, 10 | noselect: true, 11 | options: function () { 12 | var categories = Categories.find().map(function (category) { 13 | return { 14 | value: category._id, 15 | label: category.name 16 | } 17 | }); 18 | return categories; 19 | } 20 | } 21 | } 22 | } 23 | ); -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/hooks.js: -------------------------------------------------------------------------------- 1 | adminMenu.push({ 2 | route: 'categories', 3 | label: 'categories', 4 | description: 'add_and_remove_categories' 5 | }); 6 | 7 | // push "categories" modules to postHeading 8 | postHeading.push({ 9 | template: 'postCategories', 10 | order: 30 11 | }); 12 | 13 | // push "categoriesMenu" template to primaryNav 14 | //primaryNav.push({ 15 | // template: 'categoriesMenu', 16 | // order: 50 17 | //}); 18 | 19 | // we want to wait until categories are all loaded to load the rest of the app 20 | preloadSubscriptions.push('categories'); 21 | -------------------------------------------------------------------------------- /packages/meteorbb-tags/lib/server/publications.js: -------------------------------------------------------------------------------- 1 | Meteor.publish('categories', function() { 2 | if(can.viewById(this.userId)){ 3 | return Categories.find(); 4 | } 5 | return []; 6 | }); -------------------------------------------------------------------------------- /packages/meteorbb-tags/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/global/_main.scss: -------------------------------------------------------------------------------- 1 | .hidden{ 2 | display:none; 3 | } 4 | .visible{ 5 | display: block; 6 | } 7 | .overlay{ 8 | position:fixed; 9 | top:0; 10 | left:0; 11 | height:100%; 12 | width:100%; 13 | z-index:50; 14 | } 15 | 16 | 17 | #spinner{ 18 | margin: 100px 0; 19 | } 20 | .debug{ 21 | display:none; 22 | } 23 | 24 | .footer{ 25 | text-align:center; 26 | padding:10px 0 70px 0; 27 | color:black(0.4); 28 | font-size:14px; 29 | &.absolute{ 30 | position:absolute; 31 | } 32 | } 33 | #login-buttons .loading{ 34 | display:none; 35 | } 36 | #loading, .loading-page{ 37 | height:300px; 38 | } 39 | 40 | .notifications-toggle{ 41 | background: white; 42 | margin-bottom: $grid-margin; 43 | padding: $grid-padding; 44 | } 45 | 46 | .search-date-header{ 47 | background: $lightest-grey; 48 | th{ 49 | @include cf; 50 | } 51 | .search-date{ 52 | display: block; 53 | float: left; 54 | font-weight: bold; 55 | } 56 | .search-count{ 57 | font-size: 13px; 58 | display: block; 59 | float: right; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/includes/_breakpoints.scss: -------------------------------------------------------------------------------- 1 | $grid-unit:70px; 2 | $grid-margin:10px; 3 | $grid-padding:15px; 4 | $break-small:500px; 5 | 6 | $small-break: 40em; 7 | $medium-break: 50em; 8 | 9 | @mixin small(){ 10 | @media screen and (max-width: $small-break) { 11 | @content; 12 | } 13 | } 14 | @mixin small-medium(){ 15 | @media screen and (max-width: $medium-break) { 16 | @content; 17 | } 18 | } 19 | @mixin medium(){ 20 | @media screen and (min-width: $small-break) and (max-width: $medium-break) { 21 | @content; 22 | } 23 | } 24 | @mixin medium-large(){ 25 | @media screen and (min-width: $small-break) { 26 | @content; 27 | } 28 | } 29 | @mixin large(){ 30 | @media screen and (min-width: $medium-break) { 31 | @content; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/includes/_colors.scss: -------------------------------------------------------------------------------- 1 | $red: #DD3416; 2 | $green:#a3d06d; 3 | 4 | $blue:#7ac0e4; 5 | $dark-blue:#4e555d; 6 | $blue-grey:#b3c1c6; 7 | $blue-grey2:#a4a9ab; 8 | $light-blue:#d8e9f5; 9 | $light-blue2:#92b5c3; 10 | 11 | $yellow:#f8e121; 12 | $light-yellow:#fffcea; 13 | 14 | $grey:#b5b0b0; 15 | $lighter-grey:#dfdbdb; 16 | $lightest-grey:#e7eff2; 17 | $dark-grey:#444444; 18 | 19 | $header-bg:$dark-grey; 20 | $text:$dark-grey; 21 | $medium-text:$blue-grey2; 22 | $light-text:$blue-grey; 23 | $lighter-text:$lighter-grey; 24 | $border-color:$grey; 25 | $highlight-color:$dark-blue; -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/screen.scss: -------------------------------------------------------------------------------- 1 | 2 | 3 | @import "includes/_breakpoints.scss"; 4 | @import "includes/_colors.scss"; 5 | @import "includes/_mixins.scss"; 6 | 7 | 8 | 9 | @import "global/_main.scss"; 10 | 11 | // Specific Styles (header, posts, etc.) 12 | 13 | @import "specific/avatars"; 14 | @import "specific/errors"; 15 | @import "specific/header"; 16 | @import "specific/loading"; 17 | @import "specific/notifications"; 18 | @import "specific/posts"; 19 | @import "specific/users"; 20 | -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/specific/_avatars.scss: -------------------------------------------------------------------------------- 1 | .avatar-xsmall { 2 | .avatar-initials{ 3 | font-size: 12px; 4 | line-height: 20px; 5 | } 6 | } 7 | .avatar-small { 8 | height: 24px; 9 | width: 24px; 10 | .avatar-initials{ 11 | font-size: 13px; 12 | line-height: 24px; 13 | } 14 | } 15 | .avatar-medium { 16 | height: 30px; 17 | width: 30px; 18 | .avatar-initials{ 19 | font-size: 14px; 20 | line-height: 30px; 21 | } 22 | } 23 | 24 | .avatar-initials{ 25 | font-weight: normal; 26 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/specific/_errors.scss: -------------------------------------------------------------------------------- 1 | .error, .at-error{ 2 | background: $red; 3 | color: white; 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/specific/_loading.scss: -------------------------------------------------------------------------------- 1 | .loading-module{ 2 | height: 70px; 3 | position: relative; 4 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/specific/_notifications.scss: -------------------------------------------------------------------------------- 1 | .notification-item{ 2 | margin-bottom: 10px; 3 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/lib/client/scss/specific/_posts.scss: -------------------------------------------------------------------------------- 1 | .posts-wrapper{ 2 | background: none; 3 | } 4 | .more-button{ 5 | display: block; 6 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-base/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({summary: "Telescope base theme"}); 2 | 3 | Package.onUse(function (api) { 4 | 5 | api.use(['telescope-lib', 'meteorbb-base', 'fourseven:scss'], ['client', 'server']); 6 | 7 | api.addFiles( 8 | [ 9 | // global 10 | 11 | 'lib/client/scss/global/_main.scss', 12 | // includes 13 | 'lib/client/scss/includes/_breakpoints.scss', 14 | 'lib/client/scss/includes/_colors.scss', 15 | 'lib/client/scss/includes/_mixins.scss', 16 | 17 | 18 | // specific 19 | 'lib/client/scss/specific/_avatars.scss', 20 | 'lib/client/scss/specific/_errors.scss', 21 | 'lib/client/scss/specific/_header.scss', 22 | 'lib/client/scss/specific/_loading.scss', 23 | 'lib/client/scss/specific/_notifications.scss', 24 | 'lib/client/scss/specific/_posts.scss', 25 | 'lib/client/scss/specific/_users.scss', 26 | 27 | // screen 28 | 'lib/client/scss/screen.scss' 29 | ], 30 | 'client' 31 | ); 32 | 33 | }); -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | 3 | config.codekit 4 | lib/client/config.codekit -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/modules/_accounts.scss: -------------------------------------------------------------------------------- 1 | .at-oauth{ 2 | text-align: center; 3 | .at-social-btn{ 4 | margin: 0 auto 15px auto; 5 | } 6 | } 7 | 8 | .at-sep{ 9 | text-align: center; 10 | position: relative; 11 | overflow: hidden; 12 | margin-bottom: 15px; 13 | &:before, &:after{ 14 | display: block; 15 | content: " "; 16 | border-bottom: 1px solid #ddd; 17 | width: 100%; 18 | position: absolute; 19 | top: 48%; 20 | } 21 | &:before{ 22 | left: -55%; 23 | } 24 | &:after{ 25 | right: -55%; 26 | } 27 | } 28 | 29 | .at-input{ 30 | label{ 31 | margin-bottom: 5px; 32 | } 33 | } 34 | 35 | #at-forgotPwd{ 36 | font-size: 13px; 37 | float: right; 38 | margin-top: -8px; 39 | } 40 | 41 | #at-btn{ 42 | margin: 0 auto; 43 | } 44 | .at-title{ 45 | border-bottom: 1px solid #ddd; 46 | margin-bottom: 20px; 47 | padding-bottom: 5px; 48 | text-align: center; 49 | } 50 | .at-signup-link, .at-signin-link{ 51 | border-top: 1px solid #ddd; 52 | margin-top: 15px; 53 | padding-top: 15px; 54 | text-align: center; 55 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/modules/_banners.scss: -------------------------------------------------------------------------------- 1 | .banner.banner{ 2 | background: rgba(255,255,255,0.7); 3 | margin-bottom: 10px; 4 | padding: 20px; 5 | position: relative; 6 | overflow: hidden; 7 | } 8 | 9 | .banner-heading{ 10 | border-bottom: 1px solid $grey; 11 | font-weight: bold; 12 | color: $medium-text; 13 | padding-bottom: 10px; 14 | margin-bottom: 10px; 15 | } 16 | 17 | .banner-dismiss, .banner-dismiss:link, .banner-dismiss:visited{ 18 | display: block; 19 | position: absolute; 20 | height: 30px; 21 | width: 30px; 22 | border-radius: 100%; 23 | background: rgba(0,0,0,0.15); 24 | color: white; 25 | top: 50%; 26 | margin-top: -15px; 27 | right: 20px; 28 | font-size: 24px; 29 | text-align: center; 30 | vertical-align: middle; 31 | line-height: 32px; 32 | @include small{ 33 | top: 10px; 34 | right: 10px; 35 | margin-top: 0px; 36 | } 37 | } 38 | .banner-dismiss:hover{ 39 | color: inherit; 40 | } 41 | -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/modules/_dialogs.scss: -------------------------------------------------------------------------------- 1 | .dialog{ 2 | h2{ 3 | text-align:center; 4 | padding-bottom:$grid-padding; 5 | margin-bottom:$grid-margin; 6 | } 7 | margin-bottom:$grid-margin; 8 | } 9 | .footer-notice{ 10 | text-align:center; 11 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/modules/_errors.scss: -------------------------------------------------------------------------------- 1 | .error, .at-error{ 2 | @extend .grid-block; 3 | margin-bottom:$grid-margin; 4 | text-align:center; 5 | background:$red; 6 | color:white; 7 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/modules/_icons.scss: -------------------------------------------------------------------------------- 1 | .action { 2 | position: relative; 3 | display: block; 4 | padding: 0; 5 | text-align: center; 6 | color: $light-text; 7 | &.discuss-link { 8 | color: $blue-grey; 9 | } 10 | } 11 | .action-icon { 12 | font-size: 36px; 13 | height: 36px; 14 | display: block; 15 | &:before { 16 | position: relative; 17 | top: -10px; 18 | } 19 | } 20 | .action-label { 21 | font-weight: bold; 22 | display: block; 23 | height: 20px; 24 | line-height: 20px; 25 | bottom: 5px; 26 | left: 0; 27 | font-size: 13px; 28 | color: $light-text; 29 | pointer-events: none; 30 | // color: $red; 31 | } 32 | .action-count { 33 | position: absolute; 34 | top: 4px; 35 | display: block; 36 | width: 100%; 37 | height: 20px; 38 | line-height: 20px; 39 | font-size: 14px; 40 | } 41 | -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/modules/_user-profile.scss: -------------------------------------------------------------------------------- 1 | .user-profile { 2 | .user-avatar { 3 | height: 80px; 4 | width: 80px; 5 | display: block; 6 | border-radius: 80px; 7 | } 8 | } 9 | 10 | .menu-label{ 11 | display: block; 12 | } 13 | .menu-description{ 14 | display: block; 15 | font-weight: normal; 16 | font-size: 12px; 17 | margin-top: 2px; 18 | color: $medium-text; 19 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/partials/_colors.scss: -------------------------------------------------------------------------------- 1 | $red: #DD3416; 2 | $green:#a3d06d; 3 | 4 | $blue:#7ac0e4; 5 | $dark-blue:#4e555d; 6 | $blue-grey:#b3c1c6; 7 | $blue-grey2:#a4a9ab; 8 | $light-blue:#d8e9f5; 9 | $light-blue2:#92b5c3; 10 | 11 | $yellow:#f8e121; 12 | $light-yellow:#fffce0; 13 | 14 | $grey:#b5b0b0; 15 | $lighter-grey:#dfdbdb; 16 | $lightest-grey:#e7eff2; 17 | $dark-grey:#4a4444; 18 | 19 | $header-bg:$dark-grey; 20 | $text:$dark-grey; 21 | $medium-text:$blue-grey2; 22 | $light-text:$blue-grey; 23 | $lighter-text:$lighter-grey; 24 | $border-color:$grey; 25 | $highlight-color:$dark-blue; -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/partials/_tooltips.scss: -------------------------------------------------------------------------------- 1 | .has-tooltip{ 2 | position:relative; 3 | .tooltip{ 4 | pointer-events: none; 5 | position:absolute; 6 | z-index:9999; 7 | left:50%; 8 | top:-40px; 9 | opacity:0; 10 | transition: ease-out, opacity, 300ms, 0ms; 11 | span{ 12 | display:block; 13 | white-space:nowrap; 14 | position:relative; 15 | background:black(0.6); 16 | border-radius: 3px; 17 | padding:0px 8px; 18 | left:-50%; 19 | font-size:14px; 20 | color:#fff; 21 | &:after { 22 | top: 100%; 23 | border: solid transparent; 24 | content: " "; 25 | height: 0; 26 | width: 0; 27 | position: absolute; 28 | border-top-color: black(0.6); 29 | border-width: 6px; 30 | left: 50%; 31 | margin-left: -6px; 32 | } 33 | } 34 | } 35 | &:hover .tooltip{ 36 | opacity:1; 37 | } 38 | } -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/partials/_typography.scss: -------------------------------------------------------------------------------- 1 | body, textarea, input, button, input[type="submit"], input[type="button"] { 2 | font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, sans-serif; 3 | } 4 | 5 | body, textarea, input { 6 | color: $text; 7 | line-height: 1.6; 8 | } 9 | 10 | .post-title, .header, .post-rank, .button { 11 | // font-family:"kulturista-web", Rokkitt, Georgia, serif; 12 | } 13 | 14 | h2 { 15 | font-size: 36px; 16 | margin-top: 0px; 17 | 18 | } 19 | 20 | h3 { 21 | font-weight: bold; 22 | 23 | } 24 | 25 | .small { 26 | font-size: 80%; 27 | color: $light-text; 28 | } 29 | 30 | strong { 31 | font-weight: bold; 32 | } 33 | 34 | em { 35 | font-style: italic; 36 | } 37 | -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/client/scss/screen.scss: -------------------------------------------------------------------------------- 1 | 2 | @import "partials/grid"; 3 | @import "partials/colors"; 4 | @import "partials/mixins"; 5 | @import "partials/typography"; 6 | @import "partials/icons"; 7 | @import "partials/tooltips"; 8 | 9 | @import "modules/accounts"; 10 | @import "modules/banners"; 11 | @import "modules/posts"; 12 | @import "modules/comments"; 13 | @import "modules/dialogs"; 14 | @import "modules/user-profile"; 15 | @import "modules/errors"; 16 | @import "modules/icons"; -------------------------------------------------------------------------------- /packages/meteorbb-theme-hubble/lib/hubble.js: -------------------------------------------------------------------------------- 1 | themeSettings.useDropdowns = true; // not strictly needed since "true" is the current default -------------------------------------------------------------------------------- /packages/npm-container/index.js: -------------------------------------------------------------------------------- 1 | Meteor.npmRequire = function(moduleName) { // 85 2 | var module = Npm.require(moduleName); // 86 3 | return module; // 87 4 | }; // 88 5 | // 89 6 | Meteor.require = function(moduleName) { // 90 7 | console.warn('Meteor.require is deprecated. Please use Meteor.npmRequire instead!'); // 91 8 | return Meteor.npmRequire(moduleName); // 92 9 | }; // 93 -------------------------------------------------------------------------------- /packages/telescope-api/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/telescope-api/lib/server/routes.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | Router.route('api', { 4 | where: 'server', 5 | path: '/api/:limit?', 6 | action: function() { 7 | var limit = parseInt(this.params.limit); 8 | this.response.write(serveAPI(limit)); 9 | this.response.end(); 10 | } 11 | }); 12 | 13 | }); -------------------------------------------------------------------------------- /packages/telescope-api/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({summary: "Telescope API package"}); 2 | 3 | Package.onUse(function (api) { 4 | 5 | api.use(['meteorbb-base', 'telescope-lib'], ['server']); 6 | 7 | api.add_files(['lib/server/api.js', 'lib/server/routes.js'], ['server']); 8 | 9 | api.export(['serveAPI']); 10 | 11 | }); -------------------------------------------------------------------------------- /packages/telescope-blank/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/telescope-blank/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "translation string", 3 | "customViewLink": "Custom View Link", 4 | "customAdminLink": "Custom Admin Link" 5 | } -------------------------------------------------------------------------------- /packages/telescope-blank/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "translation_key": "chave de tradução", 3 | "customViewLink": "Link de Visão Personalizado", 4 | "customAdminLink": "Link Admin Personalizado" 5 | } 6 | -------------------------------------------------------------------------------- /packages/telescope-blank/lib/client/stylesheets/custom.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/packages/telescope-blank/lib/client/stylesheets/custom.scss -------------------------------------------------------------------------------- /packages/telescope-blank/lib/client/templates/customPostTitle.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/telescope-blank/lib/client/templates/custom_template.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/telescope-blank/lib/client/templates/custom_template.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | Template[getTemplate('customTemplate')].helpers({ 4 | name: function () { 5 | return "Bruce Willis"; 6 | } 7 | }); 8 | 9 | }); 10 | -------------------------------------------------------------------------------- /packages/telescope-blank/lib/custom_fields.js: -------------------------------------------------------------------------------- 1 | // Custom Post Property 2 | 3 | var customProperty = { 4 | propertyName: 'customProperty', 5 | propertySchema: { 6 | type: String, // property type 7 | label: 'customLabel', // key string used for internationalization 8 | optional: true, // make this property optional 9 | autoform: { 10 | editable: true, // make this property editable by users 11 | type: "bootstrap-datetimepicker", // assign a custom input type 12 | omit: false // set to true to omit field from form entirely 13 | } 14 | } 15 | } 16 | addToPostSchema.push(customProperty); -------------------------------------------------------------------------------- /packages/telescope-blank/lib/main.js: -------------------------------------------------------------------------------- 1 | // Global Function 2 | 3 | myFunction = function (a, b) { 4 | return a + b; 5 | } -------------------------------------------------------------------------------- /packages/telescope-blank/lib/routes.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | Router.route('/custom-path', { 4 | name: 'customRoute', 5 | template: getTemplate('customTemplate') 6 | }); 7 | 8 | }); -------------------------------------------------------------------------------- /packages/telescope-blank/lib/server/publications.js: -------------------------------------------------------------------------------- 1 | Meteor.publish('customPublication', function (limit) { 2 | return Posts.find({}, {limit: limit}); 3 | }); -------------------------------------------------------------------------------- /packages/telescope-blank/lib/settings.js: -------------------------------------------------------------------------------- 1 | // Custom Setting 2 | 3 | var customSetting = { 4 | propertyName: 'customSetting', 5 | propertySchema: { 6 | type: String, 7 | optional: true, 8 | autoform: { 9 | group: 'customGroup', // assign custom group (fieldset) in Settings form 10 | private: true // mark as private (not published to client) 11 | } 12 | } 13 | } 14 | addToSettingsSchema.push(customSetting); -------------------------------------------------------------------------------- /packages/telescope-blank/lib/templates.js: -------------------------------------------------------------------------------- 1 | // Override "postTitle" template 2 | 3 | templates["postTitle"] = "customPostTitle"; -------------------------------------------------------------------------------- /packages/telescope-blank/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/telescope-lib/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/telescope-lib/lib/autolink.js: -------------------------------------------------------------------------------- 1 | //https://github.com/bryanwoods/autolink-js 2 | (function(){var a,b=[].slice;a=function(){var j,i,d,f,e,c,g,h;c=1<=arguments.length?b.call(arguments,0):[];g=/(^|\s)(\b(https?):\/\/[\-A-Z0-9+&@#\/%?=~_|!:,.;]*[\-A-Z0-9+&@#\/%=~_|]\b)/ig;if(c.length>0){e=c[0];i=e.callback;if((i!=null)&&typeof i==="function"){j=i;delete e.callback;}f="";for(d in e){h=e[d];f+=" "+d+"='"+h+"'";}return this.replace(g,function(l,o,k){var n,m;m=j&&j(k);n=m||(""+k+"");return""+o+n;});}else{return this.replace(g,"$1$2");}};String.prototype.autoLink=a;}).call(this); 3 | -------------------------------------------------------------------------------- /packages/telescope-lib/lib/client/jquery.exists.js: -------------------------------------------------------------------------------- 1 | $.fn.exists = function () { 2 | return this.length !== 0; 3 | } -------------------------------------------------------------------------------- /packages/telescope-lib/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Telescope library package", 3 | version: '0.2.9', 4 | name: "telescope-lib" 5 | }); 6 | 7 | Package.onUse(function (api) { 8 | 9 | api.use([ 10 | 'underscore' 11 | ], ['client', 'server']); 12 | 13 | api.use([ 14 | 'jquery' 15 | ], 'client'); 16 | 17 | api.add_files([ 18 | 'lib/lib.js', 19 | 'lib/deep.js', 20 | 'lib/deep_extend.js', 21 | 'lib/autolink.js', 22 | 'lib/permissions.js' 23 | ], ['client', 'server']); 24 | 25 | api.add_files(['lib/client/jquery.exists.js'], ['client']); 26 | 27 | api.export([ 28 | 'deepExtend', 29 | 'camelToDash', 30 | 'dashToCamel', 31 | 'camelCaseify', 32 | 'getSetting', 33 | 'getThemeSetting', 34 | 'getSiteUrl', 35 | 'trimWords', 36 | 'can', 37 | '_', 38 | 'capitalise' 39 | ]); 40 | }); -------------------------------------------------------------------------------- /packages/telescope-lib/versions.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | [ 4 | "jquery", 5 | "1.0.1" 6 | ], 7 | [ 8 | "meteor", 9 | "1.1.3" 10 | ], 11 | [ 12 | "underscore", 13 | "1.0.1" 14 | ] 15 | ], 16 | "pluginDependencies": [], 17 | "toolVersion": "meteor-tool@1.0.36", 18 | "format": "1.0" 19 | } -------------------------------------------------------------------------------- /packages/telescope-module-share/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/telescope-module-share/lib/client/post_share.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/telescope-module-share/lib/client/post_share.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | Template[getTemplate('postShare')].helpers({ 3 | sourceLink: function(){ 4 | return !!this.url ? this.url : getSiteUrl() + "posts/"+this._id; 5 | }, 6 | viaTwitter: function () { 7 | return !!getSetting('twitterAccount') ? 'via='+getSetting('twitterAccount') : ''; 8 | } 9 | }); 10 | 11 | Template[getTemplate('postShare')].events({ 12 | 'click .share-link': function(e){ 13 | var $this = $(e.target).parents('.post-share').find('.share-link'); 14 | var $share = $this.parents('.post-share').find('.share-options'); 15 | e.preventDefault(); 16 | $('.share-link').not($this).removeClass("active"); 17 | $(".share-options").not($share).addClass("hidden"); 18 | $this.toggleClass("active"); 19 | $share.toggleClass("hidden"); 20 | } 21 | }); 22 | }); -------------------------------------------------------------------------------- /packages/telescope-module-share/lib/share.js: -------------------------------------------------------------------------------- 1 | postModules.push({ 2 | template: 'postShare', 3 | order: 25 4 | }); -------------------------------------------------------------------------------- /packages/telescope-module-share/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({summary: "Telescope share module package"}); 2 | 3 | Package.onUse(function (api) { 4 | 5 | api.use(['telescope-lib', 'meteorbb-base', 'fourseven:scss'], ['client', 'server']); 6 | 7 | api.use([ 8 | 'jquery', 9 | 'underscore', 10 | 'templating' 11 | ], 'client'); 12 | 13 | api.add_files(['lib/share.js'], ['client', 'server']); 14 | 15 | api.add_files(['lib/client/post_share.html', 'lib/client/post_share.js', 'lib/client/post_share.scss'], ['client']); 16 | 17 | // api.export(); 18 | }); -------------------------------------------------------------------------------- /packages/telescope-newsletter/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/telescope-newsletter/.npm/package/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /packages/telescope-newsletter/.npm/package/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /packages/telescope-newsletter/.npm/package/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "html-to-text": { 4 | "version": "0.1.0", 5 | "dependencies": { 6 | "htmlparser": { 7 | "version": "1.7.7" 8 | }, 9 | "underscore": { 10 | "version": "1.7.0" 11 | }, 12 | "underscore.string": { 13 | "version": "2.3.3" 14 | }, 15 | "optimist": { 16 | "version": "0.6.1", 17 | "dependencies": { 18 | "wordwrap": { 19 | "version": "0.0.2" 20 | }, 21 | "minimist": { 22 | "version": "0.0.10" 23 | } 24 | } 25 | } 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/telescope-newsletter/History.md: -------------------------------------------------------------------------------- 1 | ## v0.1.6 2 | 3 | - Return error message or campaign subject for cron job. 4 | - Change Newsletter Frequency option to a `select` input. 5 | 6 | ## v0.1.5 7 | 8 | - Added option to show/hide newsletter sign-up banner -------------------------------------------------------------------------------- /packages/telescope-newsletter/i18n/de.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "receive_the_best_of": "Receive the best of", 3 | "right_in_your_inbox": "right in your inbox.", 4 | "get_newsletter": "Get Newsletter", 5 | "thanks_for_subscribing": "Thanks for subscribing!" 6 | } -------------------------------------------------------------------------------- /packages/telescope-newsletter/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "receive_the_best_of": "Receive the best of", 3 | "right_in_your_inbox": "right in your inbox.", 4 | "get_newsletter": "Get Newsletter", 5 | "thanks_for_subscribing": "Thanks for subscribing!", 6 | "newsletter": "newsletter", 7 | "showBanner": "Show Banner", 8 | "mailChimpAPIKey": "MailChimp API Key", 9 | "mailChimpListId": "MailChimp List ID", 10 | "postsPerNewsletter": "Posts per Newsletter", 11 | "newsletterFrequency": "Newsletter Frequency", 12 | "newsletterTime": "Newsletter Time", 13 | "enableNewsletter": "Enable Newsletter", 14 | "autoSubscribe": "Auto Subscribe" 15 | } -------------------------------------------------------------------------------- /packages/telescope-newsletter/i18n/es.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "receive_the_best_of": "Receive the best of", 3 | "right_in_your_inbox": "right in your inbox.", 4 | "get_newsletter": "Get Newsletter", 5 | "thanks_for_subscribing": "Thanks for subscribing!" 6 | } -------------------------------------------------------------------------------- /packages/telescope-newsletter/i18n/fr.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "receive_the_best_of": "Receive the best of", 3 | "right_in_your_inbox": "right in your inbox.", 4 | "get_newsletter": "Get Newsletter", 5 | "thanks_for_subscribing": "Thanks for subscribing!", 6 | "newsletter": "newsletter", 7 | "showBanner": "Afficher la Bannière", 8 | "mailChimpAPIKey": "Clé API MailChimp", 9 | "mailChimpListId": "ID Liste MailChimp", 10 | "postsPerNewsletter": "Posts par Newsletter", 11 | "newsletterFrequency": "Fréquence de la Newsletter" 12 | } -------------------------------------------------------------------------------- /packages/telescope-newsletter/i18n/it.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "receive_the_best_of": "Receive the best of", 3 | "right_in_your_inbox": "right in your inbox.", 4 | "get_newsletter": "Get Newsletter", 5 | "thanks_for_subscribing": "Thanks for subscribing!" 6 | } -------------------------------------------------------------------------------- /packages/telescope-newsletter/i18n/pl.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "receive_the_best_of": "Otrzymuj najlepsze z", 3 | "right_in_your_inbox": "prosto do twojej skrzynki.", 4 | "get_newsletter": "Zapisz się do Newslettera", 5 | "thanks_for_subscribing": "Dziękujemy!", 6 | "newsletter": "newsletter", 7 | "showBanner": "Pokaż Baner", 8 | "mailChimpAPIKey": "MailChimp API Key", 9 | "mailChimpListId": "MailChimp List ID", 10 | "postsPerNewsletter": "Liczba postów przypadająca na jeden Newsletter", 11 | "newsletterFrequency": "Częstotliwość Newslettera", 12 | "newsletterTime": "Godzina, w której ma być wysłany Newsletter", 13 | "enableNewsletter": "Włącz Newsletter", 14 | "autoSubscribe": "Auto Subskrybcja" 15 | } -------------------------------------------------------------------------------- /packages/telescope-newsletter/i18n/pt-BR.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "receive_the_best_of": "Receba o melhor de", 3 | "right_in_your_inbox": "direto em sua caixa de emails.", 4 | "get_newsletter": "Inscrever na Newsletter", 5 | "thanks_for_subscribing": "Obrigado por assinar!", 6 | "newsletter": "newsletter", 7 | "showBanner": "Exibir Banner", 8 | "mailChimpAPIKey": "MailChimp API Key", 9 | "mailChimpListId": "MailChimp List ID", 10 | "postsPerNewsletter": "Postagens por Newsletter", 11 | "newsletterFrequency": "Frequência Newsletter", 12 | "newsletterTime": "Hora da Newsletter", 13 | "enableNewsletter": "Habilitar Newsletter", 14 | "autoSubscribe": "Auto Inscrição" 15 | } 16 | -------------------------------------------------------------------------------- /packages/telescope-newsletter/i18n/zh-CN.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "receive_the_best_of": "Receive the best of", 3 | "right_in_your_inbox": "right in your inbox.", 4 | "get_newsletter": "Get Newsletter", 5 | "thanks_for_subscribing": "Thanks for subscribing!" 6 | } -------------------------------------------------------------------------------- /packages/telescope-newsletter/lib/client/templates/newsletter_banner.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/telescope-newsletter/lib/server/routes.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | 3 | Router.route('/email/campaign', { 4 | name: 'campaign', 5 | where: 'server', 6 | action: function() { 7 | var campaign = buildCampaign(getCampaignPosts(getSetting('postsPerNewsletter', 5))); 8 | var campaignSubject = '
Subject: '+campaign.subject+' (note: contents might change)
'; 9 | var campaignSchedule = '
Scheduled for: '+ Meteor.call('getNextJob') +'
'; 10 | 11 | this.response.write(campaignSubject+campaignSchedule+campaign.html); 12 | this.response.end(); 13 | } 14 | }); 15 | 16 | Router.route('/email/digest-confirmation', { 17 | name: 'digestConfirmation', 18 | where: 'server', 19 | action: function() { 20 | var confirmationHtml = getEmailTemplate('emailDigestConfirmation')({ 21 | time: 'January 1st, 1901', 22 | newsletterLink: 'http://example.com', 23 | subject: 'Lorem ipsum dolor sit amet' 24 | }); 25 | this.response.write(buildEmailTemplate(confirmationHtml)); 26 | this.response.end(); 27 | } 28 | }); 29 | 30 | }); -------------------------------------------------------------------------------- /packages/telescope-newsletter/lib/server/templates/emailDigest.handlebars: -------------------------------------------------------------------------------- 1 | 40 | 41 | Recently on {{siteName}} 42 | – {{date}} 43 |

44 | 45 | 48 |
-------------------------------------------------------------------------------- /packages/telescope-newsletter/lib/server/templates/emailDigestConfirmation.handlebars: -------------------------------------------------------------------------------- 1 | Newsletter scheduled for {{time}}

2 | 3 | {{subject}}

-------------------------------------------------------------------------------- /packages/telescope-newsletter/lib/server/templates/emailPostItem.handlebars: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | {{#if thumbnailUrl}} 6 |   7 | {{/if}} 8 | 9 | {{title}} 10 | 11 | 12 | 22 | 23 | 24 | {{#if body}} 25 |
26 | {{{htmlBody}}} 27 | Read more 28 |
29 | {{/if}} 30 | 31 | 32 |
33 |
34 | 35 | -------------------------------------------------------------------------------- /packages/telescope-newsletter/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/telescope-tagline-banner/i18n/en.i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "showTaglineBanner": "Show Tagline Banner" 3 | } -------------------------------------------------------------------------------- /packages/telescope-tagline-banner/lib/client/stylesheets/tagline_banner.scss: -------------------------------------------------------------------------------- 1 | $small-break: 30em; 2 | $medium-break: 50em; 3 | 4 | @mixin small(){ 5 | @media screen and (max-width: $small-break) { 6 | @content; 7 | } 8 | } 9 | @mixin medium-large(){ 10 | @media screen and (min-width: 50em) { 11 | @content; 12 | } 13 | } 14 | 15 | .tagline{ 16 | text-align: center; 17 | margin: 30px 0 20px 0; 18 | text-align: center; 19 | font-size: 22px; 20 | font-weight: normal; 21 | } -------------------------------------------------------------------------------- /packages/telescope-tagline-banner/lib/client/templates/tagline_banner.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/telescope-tagline-banner/lib/client/templates/tagline_banner.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('taglineBanner')].helpers({ 2 | showTaglineBanner: function () { 3 | return Router.current().location.get().path == '/' && !!getSetting('tagline') && !!getSetting('showTaglineBanner'); 4 | } 5 | }); 6 | 7 | -------------------------------------------------------------------------------- /packages/telescope-tagline-banner/lib/tagline.js: -------------------------------------------------------------------------------- 1 | heroModules.push({ 2 | template: 'taglineBanner', 3 | order: 0 4 | }); 5 | 6 | var showTaglineBanner = { 7 | propertyName: 'showTaglineBanner', 8 | propertySchema: { 9 | type: Boolean, 10 | optional: true, 11 | label: '标语banner', 12 | autoform: { 13 | group: 'general', 14 | instructions: '在首页显示标语' 15 | } 16 | } 17 | } 18 | addToSettingsSchema.push(showTaglineBanner); -------------------------------------------------------------------------------- /packages/telescope-tagline-banner/package-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "translation_function_name": "__", 3 | "helper_name": "_", 4 | "namespace": "project" 5 | } -------------------------------------------------------------------------------- /packages/telescope-update-prompt/.gitignore: -------------------------------------------------------------------------------- 1 | .build* 2 | -------------------------------------------------------------------------------- /packages/telescope-update-prompt/lib/client/templates/update_banner.css: -------------------------------------------------------------------------------- 1 | .update-banner{ 2 | overflow: hidden; 3 | } 4 | .update-content{ 5 | float: left; 6 | } 7 | .update-version{ 8 | float: left; 9 | background: #DD3416; 10 | color: white; 11 | text-align: center; 12 | padding: 5px 10px; 13 | margin: 0px 15px 0px 0px; 14 | } 15 | .update-prompt{ 16 | font-weight: bold; 17 | line-height: 1; 18 | margin-bottom: 5px; 19 | } 20 | .update-message{ 21 | font-size: 14px; 22 | } -------------------------------------------------------------------------------- /packages/telescope-update-prompt/lib/client/templates/update_banner.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/telescope-update-prompt/lib/client/templates/update_banner.js: -------------------------------------------------------------------------------- 1 | Template[getTemplate('updateBanner')].helpers({ 2 | showBanner: function () { 3 | return Session.get('updateVersion'); 4 | }, 5 | version: function () { 6 | return Session.get('updateVersion'); 7 | }, 8 | currentVersion: function () { 9 | return telescopeVersion; 10 | }, 11 | message: function () { 12 | return Session.get('updateMessage'); 13 | } 14 | }); -------------------------------------------------------------------------------- /packages/telescope-update-prompt/lib/server/phone_home.js: -------------------------------------------------------------------------------- 1 | Meteor.methods({ 2 | phoneHome: function () { 3 | 4 | var url = 'http://version.meteorbb.com/'; 5 | 6 | var params = { 7 | currentVersion: telescopeVersion, 8 | siteTitle: getSetting('title'), 9 | siteUrl: getSiteUrl(), 10 | users: Meteor.users.find().count(), 11 | posts: Posts.find().count(), 12 | comments: Comments.find().count() 13 | } 14 | 15 | if(Meteor.user() && isAdmin(Meteor.user())){ 16 | 17 | this.unblock(); 18 | try { 19 | var result = HTTP.get(url, { 20 | params: params 21 | }) 22 | return result; 23 | } catch (e) { 24 | // Got a network error, time-out or HTTP error in the 400 or 500 range. 25 | return false; 26 | } 27 | } 28 | } 29 | }) -------------------------------------------------------------------------------- /packages/telescope-update-prompt/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Telescope update prompt package.", 3 | version: '0.1.0', 4 | name: "telescope-update-prompt" 5 | }); 6 | 7 | Package.onUse(function (api) { 8 | 9 | api.use(['telescope-lib', 'meteorbb-base', 'http'], ['client', 'server']); 10 | 11 | api.use([ 12 | 'jquery', 13 | 'underscore', 14 | 'iron:router', 15 | 'templating' 16 | ], 'client'); 17 | 18 | 19 | api.add_files([ 20 | 'lib/client/update.js', 21 | 'lib/client/templates/update_banner.html', 22 | 'lib/client/templates/update_banner.js', 23 | 'lib/client/templates/update_banner.css' 24 | ], ['client']); 25 | 26 | api.add_files([ 27 | 'lib/server/phone_home.js' 28 | ], ['server']); 29 | 30 | api.export([ 31 | 'compareVersions' 32 | ]); 33 | }); -------------------------------------------------------------------------------- /project-tap.i18n: -------------------------------------------------------------------------------- 1 | { 2 | "helper_name": "_" 3 | } 4 | -------------------------------------------------------------------------------- /public/img/bg-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/bg-black.png -------------------------------------------------------------------------------- /public/img/bg-black@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/bg-black@2x.png -------------------------------------------------------------------------------- /public/img/bg-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/bg-header.png -------------------------------------------------------------------------------- /public/img/bg-header@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/bg-header@2x.png -------------------------------------------------------------------------------- /public/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/bg.png -------------------------------------------------------------------------------- /public/img/bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/bg@2x.png -------------------------------------------------------------------------------- /public/img/default-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/default-avatar.png -------------------------------------------------------------------------------- /public/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/favicon.ico -------------------------------------------------------------------------------- /public/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/loading.gif -------------------------------------------------------------------------------- /public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/logo.png -------------------------------------------------------------------------------- /public/img/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/logo@2x.png -------------------------------------------------------------------------------- /public/img/telescope-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/telescope-logo.png -------------------------------------------------------------------------------- /public/img/telescope-logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/telescope-logo2.png -------------------------------------------------------------------------------- /public/img/telescope-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/public/img/telescope-logo@2x.png -------------------------------------------------------------------------------- /resources/icon.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icon.psd -------------------------------------------------------------------------------- /resources/icons/drawable-hdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/drawable-hdpi-icon.png -------------------------------------------------------------------------------- /resources/icons/drawable-ldpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/drawable-ldpi-icon.png -------------------------------------------------------------------------------- /resources/icons/drawable-mdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/drawable-mdpi-icon.png -------------------------------------------------------------------------------- /resources/icons/drawable-xhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/drawable-xhdpi-icon.png -------------------------------------------------------------------------------- /resources/icons/drawable-xxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/drawable-xxhdpi-icon.png -------------------------------------------------------------------------------- /resources/icons/drawable-xxxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/drawable-xxxhdpi-icon.png -------------------------------------------------------------------------------- /resources/icons/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-40.png -------------------------------------------------------------------------------- /resources/icons/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-40@2x.png -------------------------------------------------------------------------------- /resources/icons/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-50.png -------------------------------------------------------------------------------- /resources/icons/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-50@2x.png -------------------------------------------------------------------------------- /resources/icons/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-60.png -------------------------------------------------------------------------------- /resources/icons/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-60@2x.png -------------------------------------------------------------------------------- /resources/icons/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-60@3x.png -------------------------------------------------------------------------------- /resources/icons/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-72.png -------------------------------------------------------------------------------- /resources/icons/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-72@2x.png -------------------------------------------------------------------------------- /resources/icons/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-76.png -------------------------------------------------------------------------------- /resources/icons/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-76@2x.png -------------------------------------------------------------------------------- /resources/icons/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-small.png -------------------------------------------------------------------------------- /resources/icons/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-small@2x.png -------------------------------------------------------------------------------- /resources/icons/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon-small@3x.png -------------------------------------------------------------------------------- /resources/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon.png -------------------------------------------------------------------------------- /resources/icons/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/icons/icon@2x.png -------------------------------------------------------------------------------- /resources/logo.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/logo.psd -------------------------------------------------------------------------------- /resources/splash.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash.psd -------------------------------------------------------------------------------- /resources/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /resources/splash/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default-667h.png -------------------------------------------------------------------------------- /resources/splash/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default-736h.png -------------------------------------------------------------------------------- /resources/splash/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default-Landscape-736h.png -------------------------------------------------------------------------------- /resources/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /resources/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /resources/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /resources/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /resources/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /resources/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/Default~iphone.png -------------------------------------------------------------------------------- /resources/splash/drawable-land-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-land-hdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-land-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-land-ldpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-land-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-land-mdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-land-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-land-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-land-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-land-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-land-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-land-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-port-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-port-hdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-port-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-port-ldpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-port-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-port-mdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-port-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-port-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-port-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-port-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/splash/drawable-port-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobola/meteorbb/db60c13ee0e51295572b6db2309e9e0e944e55bd/resources/splash/drawable-port-xxxhdpi-screen.png -------------------------------------------------------------------------------- /scss.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableAutoprefixer": true, 3 | "outputStyle": "compressed", 4 | "sourceComments": true, 5 | "sourceMap": true 6 | } -------------------------------------------------------------------------------- /server/indexes.js: -------------------------------------------------------------------------------- 1 | Posts._ensureIndex({"status": 1, "postedAt": 1}); 2 | Comments._ensureIndex({"postId": 1}); 3 | -------------------------------------------------------------------------------- /server/publications/posts_list.js: -------------------------------------------------------------------------------- 1 | // Publish a list of posts 2 | 3 | Meteor.publish('postsList', function(terms) { 4 | if(can.viewById(this.userId)){ 5 | var parameters = getPostsParameters(terms), 6 | posts = Posts.find(parameters.find, parameters.options); 7 | return posts; 8 | } 9 | return []; 10 | }); 11 | 12 | // Publish all the users that have posted the currently displayed list of posts 13 | // plus the commenters for each post 14 | 15 | Meteor.publish('postsListUsers', function(terms) { 16 | if(can.viewById(this.userId)){ 17 | var parameters = getPostsParameters(terms), 18 | posts = Posts.find(parameters.find, parameters.options), 19 | postsIds = _.pluck(posts.fetch(), '_id'), 20 | userIds = _.pluck(posts.fetch(), 'userId'); 21 | 22 | // for each post, add first four commenter's userIds to userIds array 23 | posts.forEach(function (post) { 24 | userIds = userIds.concat(_.first(post.commenters,4)); 25 | }); 26 | 27 | userIds = _.unique(userIds); 28 | 29 | return Meteor.users.find({_id: {$in: userIds}}, {fields: avatarOptions, multi: true}); 30 | } 31 | return []; 32 | }); 33 | -------------------------------------------------------------------------------- /server/publications/settings.js: -------------------------------------------------------------------------------- 1 | Meteor.publish('settings', function() { 2 | var options = {}; 3 | var privateFields = {}; 4 | 5 | // look at SettingsSchema to see which fields should be kept private 6 | _.each(SettingsSchema._schema, function( val, key ) { 7 | if (val.autoform && !!val.autoform.private) 8 | privateFields[key] = false; 9 | }); 10 | 11 | if(!isAdminById(this.userId)){ 12 | options = _.extend(options, { 13 | fields: privateFields 14 | }); 15 | } 16 | return Settings.find({}, options); 17 | }); -------------------------------------------------------------------------------- /server/publications/single_post.js: -------------------------------------------------------------------------------- 1 | // Publish a single post 2 | 3 | Meteor.publish('singlePost', function(id) { 4 | if (can.viewById(this.userId)){ 5 | return Posts.find(id); 6 | } 7 | return []; 8 | }); 9 | 10 | // Publish authors of the current post and its comments 11 | 12 | Meteor.publish('postUsers', function(postId) { 13 | if (can.viewById(this.userId)){ 14 | // publish post author and post commenters 15 | var post = Posts.findOne(postId), 16 | users = []; 17 | 18 | if (post) { 19 | var comments = Comments.find({postId: post._id}).fetch(); 20 | // get IDs from all commenters on the post, plus post author's ID 21 | users = _.pluck(comments, "userId"); 22 | users.push(post.userId); 23 | users = _.unique(users); 24 | } 25 | 26 | return Meteor.users.find({_id: {$in: users}}, {fields: privacyOptions}); 27 | } 28 | return []; 29 | }); 30 | 31 | // Publish comments for a specific post 32 | 33 | Meteor.publish('postComments', function(postId) { 34 | if (can.viewById(this.userId)){ 35 | return Comments.find({postId: postId}); 36 | } 37 | return []; 38 | }); -------------------------------------------------------------------------------- /server/publications/users.js: -------------------------------------------------------------------------------- 1 | // Publish the current user 2 | 3 | Meteor.publish('currentUser', function() { 4 | var user = Meteor.users.find({_id: this.userId}); 5 | return user; 6 | }); 7 | 8 | // publish all users for admins to make autocomplete work 9 | // TODO: find a better way 10 | 11 | Meteor.publish('allUsersAdmin', function() { 12 | var selector = getSetting('requirePostInvite') ? {isInvited: true} : {}; // only users that can post 13 | if (isAdminById(this.userId)) { 14 | return Meteor.users.find(selector, {fields: { 15 | _id: true, 16 | profile: true, 17 | slug: true 18 | }}); 19 | } 20 | return []; 21 | }); 22 | -------------------------------------------------------------------------------- /server/publications/users_dashboard.js: -------------------------------------------------------------------------------- 1 | // Publish all users to reactive-table (if admin) 2 | // Limit, filter, and sort handled by reactive-table. 3 | // https://github.com/aslagle/reactive-table#server-side-pagination-and-filtering-beta 4 | 5 | ReactiveTable.publish("all-users", function() { 6 | if(isAdminById(this.userId)){ 7 | return Meteor.users; 8 | } else { 9 | return []; 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /server/start.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function () { 2 | logEvent({ 3 | name: "firstRun", 4 | unique: true, // will only get logged a single time 5 | important: true 6 | }) 7 | }); 8 | 9 | if (getSetting('mailUrl')) 10 | process.env.MAIL_URL = getSetting('mailUrl'); 11 | -------------------------------------------------------------------------------- /server/start_cron.js: -------------------------------------------------------------------------------- 1 | Meteor.startup(function() { 2 | SyncedCron.start(); 3 | }); 4 | -------------------------------------------------------------------------------- /settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": { 3 | 4 | } 5 | } --------------------------------------------------------------------------------