🏠 Home 

Greasy Fork is available in English.

Fandom.com – Clean Enhanced Nav [Ath]

Redesigns Wikia.com/Fandom.com and moves community menu to the left side. Removes all panels you don't need. Configurable hiding of panels, menu depth and page size. Unique feature: doesn't break website when logged in.


安装为用户样式?
  1. /* ==UserStyle==
  2. @name Fandom.com – Clean Enhanced Nav [Ath]
  3. @namespace athari
  4. @version 1.1.1
  5. @description Redesigns Wikia.com/Fandom.com and moves community menu to the left side. Removes all panels you don't need. Configurable hiding of panels, menu depth and page size. Unique feature: doesn't break website when logged in.
  6. @author Athari (https://github.com/Athari)
  7. @homepageURL https://github.com/Athari/AthariUserCSS
  8. @supportURL https://github.com/Athari/AthariUserCSS/issues
  9. @license MIT
  10. @preprocessor default
  11. @var number ath-sidebar-width "Sidebar width" [250, 150, 500, 10, 'px']
  12. @var number ath-max-content-width "Max content width" [1000, 800, 10000, 10, 'px']
  13. @var checkbox ath-center-content "Center content" 1
  14. @var range ath-expand-menu "Expand menu level (1-6 subitems)" [2, 1, 4, 1]
  15. @var checkbox ath-show-left-sidebar "Show left explore sidebar" 0
  16. @var checkbox ath-show-right-sidebar "Show right sidebar (when not logged in)" 1
  17. @var checkbox ath-show-top-bar "Show top toolbar" 0
  18. @var checkbox ath-show-bottom-bar "Show bottom social bar" 0
  19. ==/UserStyle== */
  20. @-moz-document domain("fandom.com") {
  21. :root {
  22. color-scheme: dark light;
  23. --ath-top-margin: 110px;
  24. }
  25. .fandom-sticky-header#community-navigation {
  26. position: static !important;
  27. width: auto !important;
  28. min-width: 0 !important;
  29. margin: 10px 0 auto 0 !important;
  30. padding: 0 !important;
  31. height: auto !important;
  32. display: grid !important;
  33. grid-template-columns: 1fr;
  34. grid-template-rows: auto;
  35. align-items: flex-start !important;
  36. gap: 10px !important;
  37. background: none !important;
  38. border: none !important;
  39. transform: none !important;
  40. .fandom-sticky-header__logo {
  41. grid-area: 1 / 1;
  42. img {
  43. margin: 0;
  44. width: auto !important;
  45. max-width: var(--ath-sidebar-width);
  46. height: auto !important;
  47. max-height: 300px;
  48. }
  49. }
  50. .fandom-sticky-header__sitename {
  51. grid-area: 2 / 1;
  52. max-width: var(--ath-sidebar-width);
  53. margin: 0;
  54. }
  55. .community-navigation__fandom-heart {
  56. grid-area: 3 / 1;
  57. width: 40px;
  58. }
  59. .search-container {
  60. grid-area: 3 / 1;
  61. margin: 0 0 0 50px;
  62. width: auto;
  63. min-width: 0;
  64. .search-app__wrapper {
  65. width: auto;
  66. margin: 0;
  67. }
  68. .search-app__button {
  69. display: none;
  70. }
  71. .search-app__suggestions-box {
  72. z-index: 500;
  73. }
  74. }
  75. .sign-in {
  76. grid-area: 4 / 1;
  77. margin: 0 auto 0 0;
  78. .sign-in__dropdown-content {
  79. inset-inline: 0 auto;
  80. z-index: 500;
  81. }
  82. }
  83. .wiki-tools {
  84. grid-area: 4 / 1;
  85. }
  86. .global-action__user {
  87. grid-area: 4 / 1;
  88. margin: 0 auto 0 0;
  89. }
  90. .global-action-notifications {
  91. grid-area: 4 / 1;
  92. margin: 0 auto 0 40px;
  93. }
  94. .fandom-community-header__local-navigation {
  95. grid-area: 5 / 1;
  96. margin: 0;
  97. > .wds-tabs {
  98. display: flex;
  99. flex-flow: column;
  100. align-items: stretch;
  101. ::before, ::after {
  102. display: none;
  103. }
  104. .wds-dropdown:not(.explore-menu) {
  105. display: flex;
  106. flex-flow: column;
  107. align-items: stretch;
  108. margin: 5px 0;
  109. padding: 8px 0;
  110. background: var(--wds-dropdown-background-color);
  111. color: var(--wds-dropdown-linked-item-color);
  112. border-color: var(--wds-dropdown-border-color);
  113. border-radius: 10px;
  114. .wds-tabs__tab-label {
  115. display: flex;
  116. height: auto;
  117. max-width: none;
  118. a {
  119. flex: 1;
  120. padding: 10px 10px;
  121. text-decoration: none;
  122. &:hover {
  123. background: var(--wds-dropdown-linked-item-background-color);
  124. color: var(--wds-dropdown-linked-item-color);
  125. }
  126. }
  127. .wds-dropdown__toggle-chevron {
  128. display: none !important;
  129. }
  130. }
  131. .wds-dropdown__content {
  132. position: static;
  133. width: auto;
  134. min-width: 0;
  135. max-width: none;
  136. margin: 0;
  137. padding: 0;
  138. display: block;
  139. transform: none;
  140. border: none;
  141. border-radius: 10px;
  142. > li {
  143. padding: 0 0 0 20px;
  144. }
  145. }
  146. .wds-dropdown-level-nested__content {
  147. min-width: min(var(--ath-sidebar-width), 150px);
  148. }
  149. @container style(--ath-expand-menu: 2) or style(--ath-expand-menu: 3) or style(--ath-expand-menu: 4) {
  150. .wds-dropdown-level-nested__toggle[data-tracking="custom-level-2"]:not(:has(+ div > ul > li:nth-child(7))) {
  151. svg {
  152. display: none;
  153. }
  154. }
  155. [data-tracking="custom-level-2"] + .wds-dropdown-level-nested__content:not(:has(> ul > li:nth-child(7))) {
  156. position: static;
  157. width: auto;
  158. min-width: 0;
  159. max-width: none;
  160. margin: 0;
  161. padding: 0;
  162. display: block;
  163. transform: none;
  164. border: none;
  165. border-radius: 10px;
  166. }
  167. }
  168. @container style(--ath-expand-menu: 3) or style(--ath-expand-menu: 4) {
  169. .wds-dropdown-level-nested__toggle[data-tracking="custom-level-3"]:not(:has(+ div > ul > li:nth-child(7))) {
  170. svg {
  171. display: none;
  172. }
  173. }
  174. [data-tracking="custom-level-3"] + .wds-dropdown-level-nested__content:not(:has(> ul > li:nth-child(7))) {
  175. position: static;
  176. width: auto;
  177. min-width: 0;
  178. max-width: none;
  179. margin: 0;
  180. padding: 0;
  181. display: block;
  182. transform: none;
  183. border: none;
  184. border-radius: 10px;
  185. }
  186. }
  187. @container style(--ath-expand-menu: 4) {
  188. .wds-dropdown-level-nested__toggle[data-tracking="custom-level-4"]:not(:has(+ div > ul > li:nth-child(7))) {
  189. svg {
  190. display: none;
  191. }
  192. }
  193. [data-tracking="custom-level-4"] + .wds-dropdown-level-nested__content:not(:has(> ul > li:nth-child(7))) {
  194. position: static;
  195. width: auto;
  196. min-width: 0;
  197. max-width: none;
  198. margin: 0;
  199. padding: 0;
  200. display: block;
  201. transform: none;
  202. border: none;
  203. border-radius: 10px;
  204. }
  205. }
  206. }
  207. .wds-dropdown.explore-menu {
  208. .wds-dropdown__content {
  209. inset-inline: 0 auto;
  210. transform: none;
  211. z-index: 500;
  212. }
  213. }
  214. .wds-tabs__tab {
  215. margin: 0 10px;
  216. }
  217. }
  218. }
  219. }
  220. body {
  221. display: grid !important;
  222. grid-template-areas:
  223. "r1a sidebar main rail r1b"
  224. "r2a footer footer rail r2b";
  225. grid-template-columns: minmax(20px, 1fr) var(--ath-sidebar-width) var(--ath-max-content-width) auto minmax(20px, 1fr);
  226. grid-template-rows: 1fr auto;
  227. @container style(--ath-center-content: 1) {
  228. grid-template-areas:
  229. "r1a sidebar main rail r1b"
  230. "r2a footer footer footer r2b";
  231. grid-template-columns: minmax(20px, 1fr) var(--ath-sidebar-width) var(--ath-max-content-width) var(--ath-sidebar-width) minmax(20px, 1fr);
  232. }
  233. .community-navigation#community-navigation {
  234. grid-area: sidebar;
  235. }
  236. .main-container {
  237. display: contents;
  238. > :not(:is(.fandom-community-header__background, .resizable-container, .global-footer)) {
  239. display: none !important;
  240. }
  241. .fandom-community-header__background {
  242. grid-area: 1 / 1 / 1 / span all;
  243. }
  244. .resizable-container {
  245. display: contents !important;
  246. > :not(.page, .community-header-wrapper) {
  247. display: none !important;
  248. }
  249. .community-header-wrapper { /* sticky disabled unless this is out ofscreen */
  250. position: absolute;
  251. top: -999999px;
  252. }
  253. .page {
  254. display: contents !important;
  255. .page__main {
  256. grid-area: main;
  257. margin: var(--ath-top-margin) 0px auto 30px;
  258. border-radius: 10px;
  259. }
  260. .page__right-rail {
  261. grid-area: rail;
  262. align-self: flex-start !important;
  263. position: relative !important;
  264. margin: var(--ath-top-margin) 0px 0px 30px;
  265. width: var(--ath-sidebar-width) !important;
  266. max-width: var(--ath-sidebar-width) !important;
  267. height: auto !important;
  268. min-height: 0 !important;
  269. border-radius: 10px !important;
  270. #WikiaAdInContentPlaceHolder,
  271. .render-new-wiki-recommendations,
  272. .rail-module,
  273. .right-rail-wrapper {
  274. display: block !important;
  275. width: auto !important;
  276. height: auto !important;
  277. }
  278. .alice-carousel__stage {
  279. flex-wrap: wrap !important;
  280. gap: 10px;
  281. }
  282. .alice-carousel__arrow {
  283. display: none !important;
  284. }
  285. .alice-carousel__stage-item,
  286. .slider-item {
  287. padding: 0 !important;
  288. width: auto !important;
  289. }
  290. }
  291. .page__right-rail.is-rail-hidden {
  292. width: 0 !important;
  293. .right-rail-toggle {
  294. position: relative !important;
  295. left: -57px !important;
  296. }
  297. }
  298. }
  299. }
  300. .global-footer {
  301. grid-area: footer;
  302. }
  303. }
  304. }
  305. html.is-content-expanded body {
  306. grid-template-columns: 20px var(--ath-sidebar-width) 1fr 20px;
  307. }
  308. .notifications-placeholder {
  309. z-index: 1000;
  310. }
  311. @container style(--ath-show-left-sidebar: 0) {
  312. .global-explore-navigation#global-explore-navigation {
  313. display: none !important;
  314. }
  315. }
  316. @container style(--ath-show-right-sidebar: 0) {
  317. .page__right-rail:not(:has(.right-rail-toggle)) {
  318. display: none !important;
  319. }
  320. }
  321. @container style(--ath-show-top-bar: 0) {
  322. body:not(:has(.global-action-notifications)) {
  323. .global-top-navigation#global-top-navigation {
  324. display: none !important;
  325. }
  326. }
  327. body:has(.global-action-notifications) {
  328. .global-top-navigation#global-top-navigation {
  329. position: absolute !important;
  330. height: 0;
  331. > a {
  332. height: 0;
  333. }
  334. .search-container {
  335. display: none;
  336. }
  337. .global-top-navigation__action-wrapper {
  338. margin-top: -45px !important;
  339. }
  340. .navigation-tab,
  341. #notifications__content {
  342. top: 0 !important;
  343. height: 100% !important;
  344. }
  345. }
  346. }
  347. .fandom-community-header__background {
  348. transform: none !important;
  349. }
  350. .global-explore-navigation {
  351. top: 0px !important;
  352. }
  353. }
  354. @container style(--ath-show-bottom-bar: 0) {
  355. #WikiaBar {
  356. display: none !important;
  357. }
  358. }
  359. #rail-boxad-wrapper,
  360. .gpt-ad {
  361. display: none;
  362. }
  363. }