浏览代码

Fix #126: advertise tcms a bit

George S. Baugh 5 年之前
父节点
当前提交
3080285ea7
共有 3 个文件被更改,包括 18 次插入0 次删除
  1. 1 0
      lib/Trog/Routes/HTML.pm
  2. 12 0
      www/styles/screen.css
  3. 5 0
      www/templates/index.tx

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

@@ -251,6 +251,7 @@ sub index ($query,$render_cb, $content = '', $i_styles = []) {
         footbar     => _pick_processor("templates/$footbar"   ,$processor,$t_processor)->render($footbar,$query),
         category_links => _pick_processor("templates/categories.tx", $processor,$t_processor)->render("categories.tx",$query),
         stylesheets => \@styles,
+        show_madeby => $Theme::show_madeby ? 1 : 0,
     });
 }
 

+ 12 - 0
www/styles/screen.css

@@ -382,6 +382,9 @@ p.posteditortitle {
  img.nudes, .mblogimg {
   max-width: 95vw;
  }
+ .trogged {
+    display: none;
+ }
 }
 /*Responsive iframes*/
 @media(max-width: 35rem) {
@@ -390,3 +393,12 @@ p.posteditortitle {
     height: 10rem;
   }
 }
+
+/* For tcms Advert */
+.trogged {
+    right: 0;
+    bottom: 0;
+    position: fixed;
+    z-index: 100;
+    text-decoration: none;
+}

+ 5 - 0
www/templates/index.tx

@@ -37,3 +37,8 @@
 <div id="footbar">
     <: $footbar | mark_raw :>
 </div>
+: if ( $show_madeby ) {
+<a target="_blank" rel="noopener" class="trogged" href="https://tcms.troglodyne.net">
+<img src="/img/icon/tCMS.svg" style="height:2rem;" />
+</a>
+: }