Sfoglia il codice sorgente

Enhance look of embedded pages

George Baugh 2 anni fa
parent
commit
1a4f93b1b7

+ 1 - 0
lib/Trog/Routes/HTML.pm

@@ -1104,6 +1104,7 @@ sub posts ( $query, $direct = 0 ) {
             years             => [ reverse( $oldest_year .. $now_year ) ],
             months            => [ 0 .. 11 ],
             emoji_picker      => $picker,
+            embed             => $query->{embed},
         },
         contenttype => 'text/html',
         component   => 1,

+ 4 - 4
www/templates/html/components/edit_head.tx

@@ -1,8 +1,8 @@
-<br />
+<: if ( !$embed ) { :><br /><: } :>
 : if ( !!$post.addpost ) {
-    <a style="cursor:pointer" onclick="switchMenu('submissions')">[Add Post]</a><hr />
+    <a style="cursor:pointer" <: if ( $embed ) { :>class="hidon"<: } :> onclick="switchMenu('submissions')">[Add Post]</a><: if ( !$embed ) { :><hr /><: } :>
     <div id="submissions" style="display:none;" class="posteditor">
 : } else {
-    <a style="display: inline-block;cursor:pointer;" onclick="switchMenu('<: $post.id :>-<: $post.version :>');">[Edit]</a>
+    <a <: if ( $embed ) { :>class="hidon"<: } else { :>style="display: inline-block;cursor:pointer;"<: } :> onclick="switchMenu('<: $post.id :>-<: $post.version :>');">[Edit]</a>
     <div id="<: $post.id :>-<: $post.version :>" style="display:none;" class="posteditor">
-:}
+: }

+ 1 - 1
www/templates/html/components/paginator.tx

@@ -1,4 +1,4 @@
-:if ( $pages ) {
+:if ( $pages && !$embed ) {
 <div id="paginator">
 : } else {
 <div id="paginator" class="disabled">

+ 3 - 0
www/templates/html/embed.tx

@@ -1,3 +1,4 @@
+<: $header | mark_raw :>
 :if ($embed_video) {
 <style>
 .divider, .blogtitles, #postData {
@@ -17,3 +18,5 @@ video {
 : if (!$embed_video) {
 </div>
 : }
+<: $footer | mark_raw :>
+