You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

510 lines
10 KiB

  1. /*!
  2. * jquery-drawer v3.2.0
  3. * Flexible drawer menu using jQuery, iScroll and CSS.
  4. * http://git.blivesta.com/drawer
  5. * License : MIT
  6. * Author : blivesta <design@blivesta.com> (http://blivesta.com/)
  7. */
  8. /*!------------------------------------*\
  9. Base
  10. \*!------------------------------------*/
  11. .drawer-nav {
  12. position: fixed;
  13. z-index: 101;
  14. top: 0;
  15. overflow: hidden;
  16. width: 16.25rem;
  17. height: 100%;
  18. color: #222;
  19. background-color: #fff;
  20. }
  21. .drawer-brand {
  22. font-size: 1.5rem;
  23. font-weight: bold;
  24. line-height: 3.75rem;
  25. display: block;
  26. padding-right: .75rem;
  27. padding-left: .75rem;
  28. text-decoration: none;
  29. color: #222;
  30. }
  31. .drawer-menu {
  32. margin: 0;
  33. padding: 0;
  34. list-style: none;
  35. }
  36. .drawer-menu-item {
  37. font-size: 1rem;
  38. display: block;
  39. padding: .75rem;
  40. text-decoration: none;
  41. color: #222;
  42. }
  43. .drawer-menu-item:hover {
  44. text-decoration: underline;
  45. color: #555;
  46. background-color: transparent;
  47. }
  48. /*! overlay */
  49. .drawer-overlay {
  50. position: fixed;
  51. z-index: 100;
  52. top: 0;
  53. left: 0;
  54. display: none;
  55. width: 100%;
  56. height: 100%;
  57. background-color: rgba(0, 0, 0, .2);
  58. }
  59. .drawer-open .drawer-overlay {
  60. display: block;
  61. }
  62. /* XXX: local patch waiting for:
  63. https://github.com/blivesta/drawer/pull/36
  64. */
  65. .drawer-open {
  66. overflow: hidden;
  67. }
  68. /* end local patch */
  69. /*!------------------------------------*\
  70. Top
  71. \*!------------------------------------*/
  72. .drawer--top .drawer-nav {
  73. top: -100%;
  74. left: 0;
  75. width: 100%;
  76. height: auto;
  77. max-height: 100%;
  78. -webkit-transition: top .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  79. transition: top .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  80. }
  81. .drawer--top.drawer-open .drawer-nav {
  82. top: 0;
  83. }
  84. .drawer--top .drawer-hamburger,
  85. .drawer--top.drawer-open .drawer-hamburger {
  86. right: 0;
  87. }
  88. /*!------------------------------------*\
  89. Left
  90. \*!------------------------------------*/
  91. .drawer--left .drawer-nav {
  92. left: -16.25rem;
  93. -webkit-transition: left .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  94. transition: left .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  95. }
  96. .drawer--left.drawer-open .drawer-nav,
  97. .drawer--left .drawer-hamburger,
  98. .drawer--left.drawer-open .drawer-navbar .drawer-hamburger {
  99. left: 0;
  100. }
  101. .drawer--left.drawer-open .drawer-hamburger {
  102. left: 16.25rem;
  103. }
  104. /*!------------------------------------*\
  105. Right
  106. \*!------------------------------------*/
  107. .drawer--right .drawer-nav {
  108. right: -16.25rem;
  109. -webkit-transition: right .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  110. transition: right .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  111. }
  112. .drawer--right.drawer-open .drawer-nav,
  113. .drawer--right .drawer-hamburger,
  114. .drawer--right.drawer-open .drawer-navbar .drawer-hamburger {
  115. right: 0;
  116. }
  117. .drawer--right.drawer-open .drawer-hamburger {
  118. right: 16.25rem;
  119. }
  120. /*!------------------------------------*\
  121. Hamburger
  122. \*!------------------------------------*/
  123. .drawer-hamburger {
  124. position: fixed;
  125. z-index: 104;
  126. top: 0;
  127. display: block;
  128. box-sizing: content-box;
  129. width: 2rem;
  130. padding: 0;
  131. padding-top: 18px;
  132. padding-right: .75rem;
  133. padding-bottom: 30px;
  134. padding-left: .75rem;
  135. -webkit-transition: all .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  136. transition: all .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  137. -webkit-transform: translate3d(0, 0, 0);
  138. transform: translate3d(0, 0, 0);
  139. border: 0;
  140. outline: 0;
  141. background-color: transparent;
  142. }
  143. .drawer-hamburger:hover {
  144. cursor: pointer;
  145. background-color: transparent;
  146. }
  147. .drawer-hamburger-icon {
  148. position: relative;
  149. display: block;
  150. margin-top: 10px;
  151. }
  152. .drawer-hamburger-icon,
  153. .drawer-hamburger-icon:before,
  154. .drawer-hamburger-icon:after {
  155. width: 100%;
  156. height: 2px;
  157. -webkit-transition: all .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  158. transition: all .6s cubic-bezier(0.190, 1.000, 0.220, 1.000);
  159. background-color: #222;
  160. }
  161. .drawer-hamburger-icon:before,
  162. .drawer-hamburger-icon:after {
  163. position: absolute;
  164. top: -10px;
  165. left: 0;
  166. content: ' ';
  167. }
  168. .drawer-hamburger-icon:after {
  169. top: 10px;
  170. }
  171. .drawer-open .drawer-hamburger-icon {
  172. background-color: transparent;
  173. }
  174. .drawer-open .drawer-hamburger-icon:before,
  175. .drawer-open .drawer-hamburger-icon:after {
  176. top: 0;
  177. }
  178. .drawer-open .drawer-hamburger-icon:before {
  179. -webkit-transform: rotate(45deg);
  180. -ms-transform: rotate(45deg);
  181. transform: rotate(45deg);
  182. }
  183. .drawer-open .drawer-hamburger-icon:after {
  184. -webkit-transform: rotate(-45deg);
  185. -ms-transform: rotate(-45deg);
  186. transform: rotate(-45deg);
  187. }
  188. /*!------------------------------------*\
  189. accessibility
  190. \*!------------------------------------*/
  191. /*!
  192. * Only display content to screen readers
  193. * See: http://a11yproject.com/posts/how-to-hide-content
  194. */
  195. .sr-only {
  196. position: absolute;
  197. overflow: hidden;
  198. clip: rect(0, 0, 0, 0);
  199. width: 1px;
  200. height: 1px;
  201. margin: -1px;
  202. padding: 0;
  203. border: 0;
  204. }
  205. /*!
  206. * Use in conjunction with .sr-only to only display content when it's focused.
  207. * Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
  208. * Credit: HTML5 Boilerplate
  209. */
  210. .sr-only-focusable:active,
  211. .sr-only-focusable:focus {
  212. position: static;
  213. overflow: visible;
  214. clip: auto;
  215. width: auto;
  216. height: auto;
  217. margin: 0;
  218. }
  219. /*!------------------------------------*\
  220. Sidebar
  221. \*!------------------------------------*/
  222. .drawer--sidebar {
  223. background-color: #fff;
  224. }
  225. .drawer--sidebar .drawer-contents {
  226. background-color: #fff;
  227. }
  228. @media (min-width: 64em) {
  229. .drawer--sidebar .drawer-hamburger {
  230. display: none;
  231. visibility: hidden;
  232. }
  233. .drawer--sidebar .drawer-nav {
  234. display: block;
  235. -webkit-transform: none;
  236. -ms-transform: none;
  237. transform: none;
  238. position: fixed;
  239. width: 12.5rem;
  240. height: 100%;
  241. }
  242. /*! Left */
  243. .drawer--sidebar.drawer--left .drawer-nav {
  244. left: 0;
  245. border-right: 1px solid #ddd;
  246. }
  247. .drawer--sidebar.drawer--left .drawer-contents {
  248. margin-left: 12.5rem;
  249. }
  250. /*! Right */
  251. .drawer--sidebar.drawer--right .drawer-nav {
  252. right: 0;
  253. border-left: 1px solid #ddd;
  254. }
  255. .drawer--sidebar.drawer--right .drawer-contents {
  256. margin-right: 12.5rem;
  257. }
  258. /*! container */
  259. .drawer--sidebar .drawer-container {
  260. max-width: 48rem;
  261. }
  262. }
  263. @media (min-width: 75em) {
  264. .drawer--sidebar .drawer-nav {
  265. width: 16.25rem;
  266. }
  267. .drawer--sidebar.drawer--left .drawer-contents {
  268. margin-left: 16.25rem;
  269. }
  270. .drawer--sidebar.drawer--right .drawer-contents {
  271. margin-right: 16.25rem;
  272. }
  273. /*! container */
  274. .drawer--sidebar .drawer-container {
  275. max-width: 60rem;
  276. }
  277. }
  278. /*!------------------------------------*\
  279. Navbar
  280. \*!------------------------------------*/
  281. .drawer--navbarTopGutter {
  282. padding-top: 3.75rem;
  283. }
  284. .drawer-navbar .drawer-navbar-header {
  285. border-bottom: 1px solid #ddd;
  286. background-color: #fff;
  287. }
  288. .drawer-navbar {
  289. z-index: 102;
  290. top: 0;
  291. width: 100%;
  292. }
  293. /*! .drawer-navbar modifier */
  294. .drawer-navbar--fixed {
  295. position: fixed;
  296. }
  297. .drawer-navbar-header {
  298. position: relative;
  299. z-index: 102;
  300. box-sizing: border-box;
  301. width: 100%;
  302. height: 3.75rem;
  303. padding: 0 .75rem;
  304. text-align: center;
  305. }
  306. .drawer-navbar .drawer-brand {
  307. line-height: 3.75rem;
  308. display: inline-block;
  309. padding-top: 0;
  310. padding-bottom: 0;
  311. text-decoration: none;
  312. }
  313. .drawer-navbar .drawer-brand:hover {
  314. background-color: transparent;
  315. }
  316. .drawer-navbar .drawer-nav {
  317. padding-top: 3.75rem;
  318. }
  319. .drawer-navbar .drawer-menu {
  320. padding-bottom: 7.5rem;
  321. }
  322. @media (min-width: 64em) {
  323. .drawer-navbar {
  324. height: 3.75rem;
  325. border-bottom: 1px solid #ddd;
  326. background-color: #fff;
  327. }
  328. .drawer-navbar .drawer-navbar-header {
  329. position: relative;
  330. display: block;
  331. float: left;
  332. width: auto;
  333. padding: 0;
  334. border: 0;
  335. }
  336. .drawer-navbar .drawer-menu--right {
  337. float: right;
  338. }
  339. .drawer-navbar .drawer-menu li {
  340. float: left;
  341. }
  342. .drawer-navbar .drawer-menu-item {
  343. line-height: 3.75rem;
  344. padding-top: 0;
  345. padding-bottom: 0;
  346. }
  347. .drawer-navbar .drawer-hamburger {
  348. display: none;
  349. }
  350. .drawer-navbar .drawer-nav {
  351. position: relative;
  352. left: 0;
  353. overflow: visible;
  354. width: auto;
  355. height: 3.75rem;
  356. padding-top: 0;
  357. -webkit-transform: translate3d(0, 0, 0);
  358. transform: translate3d(0, 0, 0);
  359. }
  360. .drawer-navbar .drawer-menu {
  361. padding: 0;
  362. }
  363. /*! dropdown */
  364. .drawer-navbar .drawer-dropdown-menu {
  365. position: absolute;
  366. width: 16.25rem;
  367. border: 1px solid #ddd;
  368. }
  369. .drawer-navbar .drawer-dropdown-menu-item {
  370. padding-left: .75rem;
  371. }
  372. }
  373. /*!------------------------------------*\
  374. Dropdown
  375. \*!------------------------------------*/
  376. .drawer-dropdown-menu {
  377. display: none;
  378. box-sizing: border-box;
  379. width: 100%;
  380. margin: 0;
  381. padding: 0;
  382. background-color: #fff;
  383. }
  384. .drawer-dropdown-menu > li {
  385. width: 100%;
  386. list-style: none;
  387. }
  388. .drawer-dropdown-menu-item {
  389. line-height: 3.75rem;
  390. display: block;
  391. padding: 0;
  392. padding-right: .75rem;
  393. padding-left: 1.5rem;
  394. text-decoration: none;
  395. color: #222;
  396. }
  397. .drawer-dropdown-menu-item:hover {
  398. text-decoration: underline;
  399. color: #555;
  400. background-color: transparent;
  401. }
  402. /*! open */
  403. .drawer-dropdown.open > .drawer-dropdown-menu {
  404. display: block;
  405. }
  406. /*! drawer-caret */
  407. .drawer-dropdown .drawer-caret {
  408. display: inline-block;
  409. width: 0;
  410. height: 0;
  411. margin-left: 4px;
  412. -webkit-transition: opacity .2s ease, -webkit-transform .2s ease;
  413. transition: opacity .2s ease, -webkit-transform .2s ease;
  414. transition: transform .2s ease, opacity .2s ease;
  415. transition: transform .2s ease, opacity .2s ease, -webkit-transform .2s ease;
  416. -webkit-transform: rotate(0deg);
  417. -ms-transform: rotate(0deg);
  418. transform: rotate(0deg);
  419. vertical-align: middle;
  420. border-top: 4px solid;
  421. border-right: 4px solid transparent;
  422. border-left: 4px solid transparent;
  423. }
  424. /*! open */
  425. .drawer-dropdown.open .drawer-caret {
  426. -webkit-transform: rotate(180deg);
  427. -ms-transform: rotate(180deg);
  428. transform: rotate(180deg);
  429. }
  430. /*!------------------------------------*\
  431. Container
  432. \*!------------------------------------*/
  433. .drawer-container {
  434. margin-right: auto;
  435. margin-left: auto;
  436. }
  437. @media (min-width: 64em) {
  438. .drawer-container {
  439. max-width: 60rem;
  440. }
  441. }
  442. @media (min-width: 75em) {
  443. .drawer-container {
  444. max-width: 70rem;
  445. }
  446. }