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.

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