diff --git a/app/assets/stylesheets/embed.scss b/app/assets/stylesheets/embed.scss index ed76e3c7798..746709e1991 100644 --- a/app/assets/stylesheets/embed.scss +++ b/app/assets/stylesheets/embed.scss @@ -186,6 +186,7 @@ div.lightbox-wrapper { border-bottom: 1px solid $primary-low; padding: 0.5rem; width: 100%; + display: inline-block; a { color: $primary; @@ -195,5 +196,37 @@ div.lightbox-wrapper { color: $primary-medium; } } + + .topic-title-link { + float: left; + } + + .topic-featured-image { + float: right; + + img { + max-width: 200px; + max-height: 100px; + } + } + + .topic-last-posted-at, .topic-author-avatar-timestamp, .topic-stats { + clear: left; + float: left; + padding-top: 5px; + } + + .topic-author-avatar-timestamp img { + max-height: 20px; + } + + .topic-created-at { + padding-left: 5px; + vertical-align: middle; + } + + .topic-last-posted-at, .topic-created-at, .topic-stats { + color: $primary-medium; + } } } diff --git a/app/controllers/embed_controller.rb b/app/controllers/embed_controller.rb index 3c3fe259302..49be221ce26 100644 --- a/app/controllers/embed_controller.rb +++ b/app/controllers/embed_controller.rb @@ -36,6 +36,12 @@ class EmbedController < ApplicationController raise Discourse::InvalidParameters.new(:embed_id) unless @embed_id =~ /^de\-[a-zA-Z0-9]+$/ end + if params.has_key?(:template) + @template = params[:template] + else + @template = "basic" + end + list_options = build_topic_list_options list_options[:per_page] = params[:per_page].to_i if params.has_key?(:per_page) topic_query = TopicQuery.new(current_user, list_options) diff --git a/app/views/embed/topics.html.erb b/app/views/embed/topics.html.erb index 629577dc9f0..d13e98a22a0 100644 --- a/app/views/embed/topics.html.erb +++ b/app/views/embed/topics.html.erb @@ -2,9 +2,45 @@