]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Share page improved (mobile + header's padding)
authorSimounet <contact@simounet.net>
Sat, 2 Dec 2017 17:43:32 +0000 (18:43 +0100)
committerSimounet <contact@simounet.net>
Sun, 3 Dec 2017 13:38:46 +0000 (14:38 +0100)
app/Resources/static/themes/_global/share.scss
src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
web/wallassets/public.css

index 5a853324c89c5ebaa1de2c790d239cd3924b3883..d6f6b669599c6c235187a291bd7d64c2a65378e0 100644 (file)
@@ -148,7 +148,7 @@ article h3,
 article h4,
 article h5,
 article h6 {
-  text-align: left !important;
+  text-align: left;
   line-height: 1.3;
 }
 
@@ -380,28 +380,37 @@ tbody {
   border-width: 1px 0;
 }
 
-article {
-  padding: 0 1em;
+header {
+  text-align: center;
+}
+
+.shared-by {
+  margin-bottom: 1em;
 }
 
 /* --------------------- Responsive design ------------------------- */
 
+@media (max-width: 719px) {
+  header > *:not(.preview),
+  article {
+    padding: 0 1em;
+  }
+}
+
 @media (min-width: 720px) {
   blockquote {
     margin-left: -1.4375em;
     padding-left: 1.25em;
   }
 
-  article {
-    margin: 0 auto;
-    max-width: 43.75em;
-    padding: 0 1.25em;
+  header {
+    margin-top: 32px;
   }
 
-  header {
+  .block {
+    margin-left: auto;
+    margin-right: auto;
     max-width: 43.75em;
-    margin: 0 auto;
-    margin-top: 32px;
-    text-align: center;
+    padding: 0 1.25em;
   }
 }
index 955420ba41c8de4034f1318d9267479efd1acdae..9b0503d65b0720c1a7ab85fd74b0c03f9c94df61 100644 (file)
@@ -1,6 +1,9 @@
+<!DOCTYPE html>
 <html>
     <head>
+        <meta charset="utf-8">
         <title>{{ entry.title|e|raw }}</title>
+        <meta name="viewport" content="initial-scale=1.0">
         <meta property="og:title" content="{{ entry.title|e|raw }}" />
         <meta property="og:type" content="article" />
         <meta property="og:url" content="{{ app.request.uri }}" />
 
     </head>
     <body>
-        <header>
+        <header class="block">
             <h1>{{ entry.title|e|raw }}</h1>
-            <div><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a></div>
-            <div>{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.</div>
-
+            <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a>
+            <p class="shared-by">{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.</p>
             {% if entry.previewPicture is not null %}
-                <div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|striptags|e('html_attr') }}" /></div>
+                <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|striptags|e('html_attr') }}" />
             {% endif %}
         </header>
-        <article>
+        <article class="block">
             {{ entry.content | raw }}
         </article>
     </body>
index 6ddfa9546df808a54b133e9d1195d5bdc9544ad1..292d7117b45807daabb404ce16f9a2e1d5550acf 100644 (file)
@@ -1,2 +1,2 @@
-a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-spacing:0}body{background-color:#fff;color:#444;font-family:Georgia;line-height:1.7;-ms-content-zooming:none;margin-bottom:64px}h1,h2,h3,h4,h5,h6{font-weight:600;margin:.2em 0}article h1,article h2,article h3,article h4,article h5,article h6{text-align:left!important;line-height:1.3}h1{font-size:1.4em}h2{font-size:1.3em}h3,h4{font-size:1.2em}h5,h6{font-size:1.1em}p{margin-bottom:.75em}b,strong{font-weight:700}em,i{font-style:italic}a{color:#444;text-decoration:underline}a:active,a:hover{outline:0}dl,ol,p,ul{margin:0 0 1.75em}ol,ul{padding-left:1.25em}li{padding-bottom:.2em;line-height:1.6}li li:last-child,li p:last-child{margin-bottom:-.2em}ol li:last-child,ul li:last-child{padding-bottom:0}mark{padding:0 .2em}mark a{text-decoration:none}blockquote{font-style:italic;border-left:.25em solid #000;margin-left:-20px;padding-left:17px;margin-bottom:.5em;margin-top:.5em}blockquote cite{text-transform:uppercase;font-size:.8em;font-style:normal}blockquote cite:before{content:"\2014";margin-right:.5em}img{display:block;height:auto;margin-bottom:.5em;max-width:100%}figure{margin:0}figure figcaption{display:block;margin-top:.3em;font-style:italic;font-size:.8em}button{display:none!important}hr{display:block;height:1px;border:solid #666;border-width:1px 0 0;margin:1.6em 0;padding:0}small{font-size:.7em}dl{margin:1.6em 0}dl dt{float:left;width:11.25em;overflow:hidden;clear:left;text-align:right;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;font-weight:700}dl dd,dl dt{margin-bottom:1em}dl dd{margin-left:12.5em}pre{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:4em 0;border:.0625em solid #efefef;width:100%;padding:1em;font-family:Consolas,monospace;white-space:pre;overflow:auto}pre code{line-height:1.6em;white-space:pre-wrap;background:transparent;border:none;padding:0;vertical-align:inherit}code,pre code{font-size:.8em}code{padding:.125em .375em;margin:0 .2em;font-family:Consolas,monospace;white-space:pre;border:1px solid #d3d3d3;overflow:auto}audio,video{max-width:43.75em}::selection,mark{background:#666;color:#fff}table{border-collapse:collapse;margin-bottom:2em;width:100%}td,th{padding:.25em;text-align:left}thead tr{text-transform:uppercase;font-size:.85em;letter-spacing:1px;font-family:Segoe UI,sans-serif;font-weight:600}tbody tr:nth-child(odd){background:rgba(0,0,0,.1)}tbody{border:solid #999;border-width:1px 0}article{padding:0 1em}@media (min-width:720px){blockquote{margin-left:-1.4375em;padding-left:1.25em}article{padding:0 1.25em}article,header{margin:0 auto;max-width:43.75em}header{margin-top:32px;text-align:center}}
+a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,video{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{background-color:#fff;color:#444;font-family:Georgia;line-height:1.7;-ms-content-zooming:none;margin-bottom:64px}h1,h2,h3,h4,h5,h6{font-weight:600;margin:.2em 0}article h1,article h2,article h3,article h4,article h5,article h6{text-align:left;line-height:1.3}h1{font-size:1.4em}h2{font-size:1.3em}h3,h4{font-size:1.2em}h5,h6{font-size:1.1em}p{margin-bottom:.75em}b,strong{font-weight:700}em,i{font-style:italic}a{color:#444;text-decoration:underline}a:active,a:hover{outline:0}dl,ol,p,ul{margin:0 0 1.75em}ol,ul{padding-left:1.25em}li{padding-bottom:.2em;line-height:1.6}li li:last-child,li p:last-child{margin-bottom:-.2em}ol li:last-child,ul li:last-child{padding-bottom:0}mark{padding:0 .2em}mark a{text-decoration:none}blockquote{font-style:italic;border-left:.25em solid #000;margin-left:-20px;padding-left:17px;margin-bottom:.5em;margin-top:.5em}blockquote cite{text-transform:uppercase;font-size:.8em;font-style:normal}blockquote cite:before{content:"\2014";margin-right:.5em}img{display:block;height:auto;margin-bottom:.5em;max-width:100%}figure{margin:0}figure figcaption{display:block;margin-top:.3em;font-style:italic;font-size:.8em}button{display:none!important}hr{display:block;height:1px;border:solid #666;border-width:1px 0 0;margin:1.6em 0;padding:0}small{font-size:.7em}dl{margin:1.6em 0}dl dt{float:left;width:11.25em;overflow:hidden;clear:left;text-align:right;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;font-weight:700}dl dd,dl dt{margin-bottom:1em}dl dd{margin-left:12.5em}pre{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:4em 0;border:.0625em solid #efefef;width:100%;padding:1em;font-family:Consolas,monospace;white-space:pre;overflow:auto}pre code{line-height:1.6em;white-space:pre-wrap;background:transparent;border:none;padding:0;vertical-align:inherit}code,pre code{font-size:.8em}code{padding:.125em .375em;margin:0 .2em;font-family:Consolas,monospace;white-space:pre;border:1px solid #d3d3d3;overflow:auto}audio,video{max-width:43.75em}::selection,mark{background:#666;color:#fff}table{border-collapse:collapse;margin-bottom:2em;width:100%}td,th{padding:.25em;text-align:left}thead tr{text-transform:uppercase;font-size:.85em;letter-spacing:1px;font-family:Segoe UI,sans-serif;font-weight:600}tbody tr:nth-child(2n+1){background:rgba(0,0,0,.1)}tbody{border:solid #999;border-width:1px 0}header{text-align:center}.shared-by{margin-bottom:1em}@media (max-width:719px){article,header>:not(.preview){padding:0 1em}}@media (min-width:720px){blockquote{margin-left:-1.4375em;padding-left:1.25em}header{margin-top:32px}.block{margin-left:auto;margin-right:auto;max-width:43.75em;padding:0 1.25em}}
 /*# sourceMappingURL=public.css.map*/
\ No newline at end of file