Просмотр исходного кода

Tiny messages styling changes.

Ralfp 12 лет назад
Родитель
Сommit
c16d9bb33f

+ 3 - 3
misago/markdown/factory.py

@@ -73,9 +73,9 @@ def post_markdown(request, text):
 
 
 def tidy_markdown(md, text):
-    text = text.replace('<p><h3><quotetitle>', '<h3><quotetitle>')
-    text = text.replace('</quotetitle></h3></p>', '</quotetitle></h3>')
-    text = text.replace('</quotetitle></h3><br>\r\n', '</quotetitle></h3>\r\n<p>')
+    text = text.replace('<p><h3><quotetitle>', '<article><header><quotetitle>')
+    text = text.replace('</quotetitle></h3></p>', '</quotetitle></header></article>')
+    text = text.replace('</quotetitle></h3><br>\r\n', '</quotetitle></header></article>\r\n<p>')
     text = text.replace('\r\n<p></p>', '')
     return md, text
 

+ 6 - 5
static/cranefly/css/cranefly.css

@@ -863,9 +863,9 @@ a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#ffffff;text-decor
 .header-primary .header-tabs li a.btn{border:1px solid #cccccc;*border:0;border-radius:3px;margin:0px;padding:4px 12px;color:#333333;}.header-primary .header-tabs li a.btn i{position:relative;top:0px;}
 .header-primary .header-tabs li a.btn:visited,.header-primary .header-tabs li a.btn:hover{background-color:#ffffff;border-color:#a6a6a6;}
 html,body{height:100%;}
-#wrap{min-height:100%;height:auto !important;height:100%;margin:0 auto -142px;}#wrap .container-primary{padding-top:20px;padding-bottom:160px;}#wrap .container-primary .page-description{margin-bottom:20px;}
+#wrap{min-height:100%;height:auto !important;height:100%;margin:0 auto -102px;}#wrap .container-primary{padding-top:20px;padding-bottom:120px;}#wrap .container-primary .page-description{margin-bottom:20px;}
 #wrap .container-primary hr{border:none;border-top:1px solid #eeeeee;}
-footer{background-color:#eeeeee;border-top:1px solid #dadada;height:130px;padding:11px 19px;padding-bottom:0px;}footer .container hr{border-bottom:1px solid #dadada;margin:10px 0px;}
+footer{background-color:#eeeeee;border-top:1px solid #dadada;height:90px;padding:11px 19px;padding-bottom:0px;}footer .container hr{border-bottom:1px solid #dadada;margin:10px 0px;}
 footer .container .credits p{margin-bottom:0px;color:#555555;font-size:90%;}footer .container .credits p a:link,footer .container .credits p a:active,footer .container .credits p a:visited,footer .container .credits p a:hover{color:#555555;}
 ::selection{background:#f89406;color:#ffffff;}
 ::-moz-selection{background:#f89406;color:#ffffff;}
@@ -943,15 +943,16 @@ a.btn-link:hover,a.btn-link:active,a.btn-link:focus{opacity:0.9;filter:alpha(opa
 .error-page .error-protips a:link,.error-page .error-protips a:visited{background-color:#333333;border:1px solid #000000;border-radius:5px;margin:2px 10px;opacity:0.7;filter:alpha(opacity=70);padding:11px 19px;color:#ffffff;font-weight:bold;text-decoration:none;}
 .error-page .error-protips a:hover,.error-page .error-protips a:active{opacity:1;filter:alpha(opacity=100);}
 .markdown,.markdown article{margin:0px;overflow:auto;}.markdown>:first-child,.markdown article>:first-child{margin-top:0px;}
-.markdown>:last-child,.markdown article>:last-child{margin-bottom:0px;}
+.markdown>:last-child,.markdown article>:last-child{margin-bottom:0px;}.markdown>:last-child img:last-child,.markdown article>:last-child img:last-child{margin-bottom:0px;}
 .markdown h1,.markdown article h1{font-size:23.8px;}
 .markdown h2,.markdown article h2{font-size:21px;}
 .markdown h3,.markdown article h3{font-size:16.8px;}
 .markdown h4,.markdown article h4{font-size:14px;}
 .markdown hr,.markdown article hr{border:none;border-top:1px solid #eeeeee;margin:20px 0px;}
-.markdown blockquote,.markdown article blockquote{background-color:#fcfcfc;border:1px solid #f0f0f0;border-radius:3px;padding:14px;}.markdown blockquote>h3:first-child,.markdown article blockquote>h3:first-child{margin:0px;margin-bottom:10px;padding:0px;font-size:14px;line-height:20px;}
+.markdown blockquote,.markdown article blockquote{background-color:#fcfcfc;border:1px solid #f0f0f0;border-radius:3px;opacity:0.6;filter:alpha(opacity=60);padding:14px;}.markdown blockquote:hover,.markdown article blockquote:hover{opacity:1;filter:alpha(opacity=100);}
+.markdown blockquote header,.markdown article blockquote header{border-bottom:1px solid #e0e0e0;margin-bottom:10px;padding-bottom:14px;font-size:16.8px;font-weight:bold;line-height:20px;}
 .markdown blockquote>:first-child,.markdown article blockquote>:first-child{margin-top:0px;}
-.markdown blockquote>:last-child,.markdown article blockquote>:last-child{margin-bottom:0px;}
+.markdown blockquote>:last-child,.markdown article blockquote>:last-child{margin-bottom:0px;}.markdown blockquote>:last-child img:last-child,.markdown article blockquote>:last-child img:last-child{margin-bottom:0px;}
 .markdown blockquote p,.markdown article blockquote p{margin:0 0 10px;font-size:11.9px;}
 .markdown blockquote blockquote,.markdown article blockquote blockquote{background-color:#ffffff;border:1px solid #f2f2f2;border-radius:3px;padding:14px;}
 .markdown code,.markdown article code{background-color:#333333;border:none;color:#eeeeee;font-size:14px;}

+ 18 - 4
static/cranefly/css/cranefly/markdown.less

@@ -11,6 +11,10 @@
 
   &>:last-child {
     margin-bottom: 0px;
+
+    img:last-child {
+      margin-bottom: 0px;
+    }
   }
 
   h1 {
@@ -39,14 +43,20 @@
     background-color: darken(@postBackground, 1%);
     border: 1px solid darken(@postBackground, 6%);
     border-radius: @baseBorderRadius;
+    .opacity(60);
     padding: @baseFontSize;
 
-    &>h3:first-child {
-      margin: 0px;
+    &:hover {
+      .opacity(100);
+    }
+
+    header {
+      border-bottom: 1px solid darken(@postBackground, 12%);
       margin-bottom: @baseLineHeight / 2;
-      padding: 0px;
+      padding-bottom: @baseFontSize;
 
-      font-size: @baseFontSize;
+      font-size: @baseFontSize * 1.2;
+      font-weight: bold;
       line-height: @baseLineHeight;
     }
 
@@ -56,6 +66,10 @@
 
     &>:last-child {
       margin-bottom: 0px;
+      
+      img:last-child {
+        margin-bottom: 0px;
+      }
     }
 
     p {