Lungo.layout.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace LUNGO
  5. * @class Layout
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. @import "mixins.less";
  10. @defaultTrasition : @easeOutSine;
  11. /* @group <section> */
  12. section{
  13. position: absolute;
  14. position: fixed;
  15. width: 100%;
  16. height: inherit;
  17. z-index: 0;
  18. .transform(translate3d(100%, 0, 0));
  19. //.transform(translate3d(320px, 0, 0));
  20. -webkit-backface-visibility: hidden;
  21. -webkit-transition: -webkit-transform 250ms @defaultTrasition;
  22. }
  23. section:first-child, section.show {
  24. z-index: 1;
  25. .transform(translate3d(0%, 0, 0));
  26. //.transform(translate3d(0px, 0, 0));
  27. }
  28. section.hide {
  29. z-index: 0;
  30. .transform(translate3d(-100%, 0, 0));
  31. //.transform(translate3d(-320px, 0, 0));
  32. }
  33. /* @end */
  34. /* @group <header> & <footer> */
  35. header, footer {
  36. position: absolute;
  37. left: 0px;
  38. width: 100%;
  39. height: 38px;
  40. display: block;
  41. z-index: 2;
  42. line-height: 38px;
  43. }
  44. header {
  45. top: 0px
  46. }
  47. footer {
  48. bottom:0px;
  49. }
  50. header .title, footer .title {
  51. float: left;
  52. margin: 0 8px;
  53. font-size: 1.15em;
  54. }
  55. header .title {
  56. position: absolute;
  57. left: 0px;
  58. width: 100%;
  59. margin:0px auto;
  60. z-index: -1;
  61. text-align: center;
  62. }
  63. section header a.button, section footer a.button {
  64. margin: 3px 3px auto 4px;
  65. }
  66. section header a.button.icon, section footer a.button.icon {
  67. width: 17px;
  68. }
  69. /* @end */
  70. /* @group <aside> */
  71. aside {
  72. position: absolute;
  73. top: 0px;
  74. bottom: 0px;
  75. height: auto;
  76. width: 256px;
  77. opacity: 0;
  78. }
  79. aside.show {
  80. opacity: 1;
  81. }
  82. header ~ aside { padding-top: 40px; }
  83. footer ~ aside { padding-bottom: 40px; }
  84. aside ~ article {
  85. .transform(translate3d(0px, 0, 0));
  86. -webkit-transition: -webkit-transform 250ms @defaultTrasition;
  87. }
  88. aside a {
  89. display: block;
  90. width: 244px;
  91. height: 40px;
  92. padding: 0 6px;
  93. font-size: 1.1em;
  94. font-weight: bold;
  95. line-height: 40px;
  96. }
  97. aside .icon {
  98. width: 28px;
  99. height: 28px;
  100. float: left;
  101. margin: 8px 6px 0 0;
  102. font-size: 1.9em;
  103. line-height: 1.0em;
  104. text-align: center;
  105. }
  106. aside .anchor {
  107. font-weight: bold;
  108. padding: 3px 10px 4px;
  109. }
  110. aside .bubble {
  111. float: right;
  112. margin: 12px 4px 0 0;
  113. }
  114. @media handheld, only screen and (min-width: 768px) {
  115. [data-target="aside"] {
  116. display: none !important;
  117. }
  118. aside { opacity: 1; }
  119. aside ~ article{
  120. width: auto !important;
  121. left: 256px;
  122. right: 0px !important;
  123. }
  124. }
  125. /* @end */
  126. /* @group <article> */
  127. article {
  128. position: absolute;
  129. width: inherit;
  130. height: inherit;
  131. top: 0px;
  132. bottom: 0px;
  133. display: block;
  134. z-index: 0;
  135. opacity: 0;
  136. }
  137. header ~ article { top: 40px; }
  138. footer ~ article { bottom: 40px; }
  139. article.current {
  140. z-index: 1;
  141. opacity: 1;
  142. }
  143. article.aside { .transform(translate3d(256px, 0, 0)); }
  144. @media handheld, only screen and (min-width: 768px) {
  145. article.aside { .transform(translate3d(0px, 0, 0)); }
  146. }
  147. article .title {
  148. font-size: 1.1em;
  149. margin: 0px 0 4px;
  150. }
  151. article .title .icon { margin-right: 4px; }
  152. article .text {
  153. margin: 4px 0 8px;
  154. display: block;
  155. font-size: 0.9em;
  156. font-weight: normal;
  157. line-height: 1.4em;
  158. }
  159. /* @end */
  160. /* @group <nav> */
  161. nav {
  162. height: inherit;
  163. text-align: center;
  164. }
  165. nav a {
  166. display: inline-block;
  167. padding: 0 6px;
  168. height: inherit;
  169. float: left;
  170. }
  171. nav .icon {
  172. font-size: 2.2em;
  173. line-height: 38px;
  174. }
  175. nav a abbr {
  176. position: relative;
  177. bottom: 5px;
  178. margin-left: 2px;
  179. display: none;
  180. font-size: 1.05em;
  181. }
  182. nav a.current abbr { display: inline; }
  183. .toolbar {
  184. height: 48px;
  185. display: block;
  186. }
  187. .toolbar a {
  188. float: left;
  189. padding: 0;
  190. }
  191. .toolbar .icon {
  192. display: block;
  193. font-size: 2.5em;
  194. line-height: 48px;
  195. }
  196. nav .bubble {
  197. position: relative;
  198. top: -14px;
  199. left: -10px;
  200. margin-right: -16px;
  201. }
  202. .toolbar .bubble {
  203. top: -58px;
  204. left: 12px;
  205. padding: 1px 4px;
  206. }
  207. /* @end */