_taxonomy.scss 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. // Taxonomies - e.g. Tags, Categories, ...
  2. .taxonomy-terms-article {
  3. width: 100%;
  4. clear: both;
  5. font-size: 0.8rem;
  6. .taxonomy-title {
  7. display: inline;
  8. font-size: 1.25em;
  9. height: 1em;
  10. line-height: 1em;
  11. margin-right: 0.5em;
  12. padding: 0;
  13. }
  14. }
  15. .taxonomy-terms-cloud {
  16. width: 100%;
  17. clear: both;
  18. font-size: 0.8rem;
  19. .taxonomy-title {
  20. display: inline-block;
  21. width: 100%;
  22. font-size: 1rem;
  23. font-weight: $font-weight-bold;
  24. color: var(--bs-primary-text-emphasis);
  25. border-bottom: 1px solid var(--bs-tertiary-color);
  26. margin-bottom: 1em;
  27. padding-bottom: 0.375rem;
  28. margin-top: 1em;
  29. }
  30. }
  31. .taxonomy-terms-page {
  32. max-width: 800px;
  33. margin: auto;
  34. h1 {
  35. margin-bottom: 1em;
  36. }
  37. .taxonomy-terms-cloud {
  38. font-size: 1em;
  39. li {
  40. display: block;
  41. }
  42. }
  43. .taxo-text-tags {
  44. li + li::before {
  45. content: none;
  46. }
  47. }
  48. .taxo-fruits {
  49. .taxonomy-count,
  50. .taxonomy-label {
  51. display: inherit;
  52. font-size: 1rem;
  53. margin: 0;
  54. padding: 0;
  55. padding-right: 0.5em;
  56. }
  57. .taxonomy-count::before {
  58. content: "(";
  59. }
  60. .taxonomy-count::after {
  61. content: ")";
  62. }
  63. }
  64. }
  65. .taxonomy-terms {
  66. list-style: none;
  67. margin: 0;
  68. overflow: hidden;
  69. padding: 0;
  70. display: inline;
  71. li {
  72. // https://stackoverflow.com/questions/3247358/how-do-i-wrap-text-with-no-whitespace-inside-a-td
  73. display: inline;
  74. overflow-wrap: break-word;
  75. word-wrap: break-word;
  76. -ms-word-break: break-all;
  77. word-break: break-all;
  78. word-break: break-word;
  79. -ms-hyphens: auto;
  80. -moz-hyphens: auto;
  81. -webkit-hyphens: auto;
  82. hyphens: auto;
  83. }
  84. }
  85. .taxonomy-count {
  86. font-size: 0.8em;
  87. line-height: 1.25em;
  88. display: inline-block;
  89. padding-left: 0.6em;
  90. padding-right: 0.6em;
  91. margin-left: 0.6em;
  92. text-align: center;
  93. border-radius: 1em;
  94. background-color: var(--bs-body-bg);
  95. }
  96. .taxonomy-term {
  97. background: var(--bs-secondary-bg);
  98. border-width: 0;
  99. border-radius: 0 3px 3px 0;
  100. color: var(--bs-body-color);
  101. display: inline-block;
  102. font-size: 1em;
  103. line-height: 1.5em;
  104. min-height: 1.5em;
  105. max-width: 100%;
  106. padding: 0 0.5em 0 1em;
  107. position: relative;
  108. margin: 0 0.5em 0.2em 0;
  109. text-decoration: none;
  110. -webkit-transition: color 0.2s;
  111. -webkit-clip-path: polygon(100% 0, 100% 100%, 0.8em 100%, 0 50%, 0.8em 0);
  112. clip-path: polygon(100% 0, 100% 100%, 0.8em 100%, 0 50%, 0.8em 0);
  113. &:hover {
  114. background-color: var(--bs-primary-bg-subtle);
  115. color: var(--bs-body-color-dark);
  116. .taxonomy-count {
  117. color: var(--bs-body-color-dark);
  118. }
  119. }
  120. &:hover::before {
  121. background: $primary;
  122. }
  123. }
  124. // Example for simple tags layout
  125. .taxo-text-tags {
  126. .taxonomy-term {
  127. background: none;
  128. border-width: 0;
  129. border-radius: 0;
  130. color: $gray-600;
  131. font-size: 1em;
  132. line-height: 1.5em;
  133. min-height: 1.5em;
  134. max-width: 100%;
  135. padding: 0;
  136. position: relative;
  137. margin: 0;
  138. text-decoration: none;
  139. -webkit-clip-path: none;
  140. clip-path: none;
  141. &:hover {
  142. background: none;
  143. color: $link-color;
  144. .taxonomy-count {
  145. color: $dark !important;
  146. }
  147. }
  148. &:hover::before {
  149. background: none;
  150. }
  151. }
  152. li + li::before {
  153. content: "|";
  154. color: $gray-600;
  155. margin-right: 0.2em;
  156. }
  157. .taxonomy-count {
  158. font-size: 1em;
  159. line-height: 1.25em;
  160. display: inline-block;
  161. padding: 0;
  162. margin: 0;
  163. text-align: center;
  164. border-radius: 0;
  165. background: none;
  166. vertical-align: super;
  167. font-size: 0.75em;
  168. }
  169. .taxonomy-term:hover .taxonomy-count {
  170. color: $link-color !important;
  171. }
  172. }
  173. // Example for icon tags
  174. .taxo-fruits {
  175. .taxonomy-term[data-taxonomy-term]::before {
  176. font-style: normal;
  177. font-variant: normal;
  178. text-rendering: auto;
  179. -webkit-font-smoothing: antialiased;
  180. font-family: $font-awesome-font-name;
  181. // font-weight: 900;
  182. padding-right: 0.5em;
  183. font-size: 2em;
  184. min-width: 1.5em;
  185. display: inline-block;
  186. }
  187. .taxonomy-term[data-taxonomy-term="apple"]::before {
  188. content: "\f5d1";
  189. color: red;
  190. }
  191. .taxonomy-term[data-taxonomy-term="carrot"]::before {
  192. content: "\f787";
  193. color: orange;
  194. }
  195. .taxonomy-term[data-taxonomy-term="lemon"]::before {
  196. content: "\f094";
  197. color: limegreen;
  198. }
  199. .taxonomy-term[data-taxonomy-term="pepper"]::before {
  200. content: "\f816";
  201. color: darkred;
  202. }
  203. .taxonomy-term {
  204. background: none;
  205. border-width: 0;
  206. border-radius: 0;
  207. color: $gray-600;
  208. font-size: 1em;
  209. line-height: 2.5em;
  210. max-width: 100%;
  211. padding: 0;
  212. position: relative;
  213. margin: 0;
  214. text-decoration: none;
  215. -webkit-clip-path: none;
  216. clip-path: none;
  217. &:hover {
  218. background: none;
  219. color: $link-color;
  220. .taxonomy-count {
  221. color: $dark !important;
  222. }
  223. }
  224. &:hover::before {
  225. background: none;
  226. text-shadow: 0 0 3px $gray-900;
  227. }
  228. }
  229. .taxonomy-count,
  230. .taxonomy-label {
  231. display: none;
  232. }
  233. &.taxonomy-terms-article {
  234. margin-bottom: 1rem;
  235. .taxonomy-title {
  236. display: none;
  237. }
  238. }
  239. }
  240. .taxonomy-taxonomy-page {
  241. max-width: 800px;
  242. margin: auto;
  243. h1 {
  244. margin-bottom: 1em;
  245. }
  246. }
  247. .article-meta {
  248. margin-bottom: 1.5rem;
  249. }
  250. .article-teaser.article-type-docs h3 a::before {
  251. display: inline-block;
  252. font-style: normal;
  253. font-variant: normal;
  254. text-rendering: auto;
  255. -webkit-font-smoothing: antialiased;
  256. font-family: $font-awesome-font-name;
  257. content: "\f02d";
  258. padding-right: 0.5em;
  259. }
  260. .article-teaser.article-type-blog h3 a::before {
  261. display: inline-block;
  262. font-style: normal;
  263. font-variant: normal;
  264. text-rendering: auto;
  265. -webkit-font-smoothing: antialiased;
  266. font-family: $font-awesome-font-name;
  267. content: "\f781";
  268. padding-right: 0.5em;
  269. }
  270. .all-taxonomy-terms {
  271. font-weight: 500;
  272. line-height: 1.2;
  273. font-size: 1.5rem;
  274. &::before {
  275. display: inline-block;
  276. font-style: normal;
  277. font-variant: normal;
  278. text-rendering: auto;
  279. -webkit-font-smoothing: antialiased;
  280. font-family: $font-awesome-font-name;
  281. content: "\f122";
  282. padding-right: 0.5em;
  283. }
  284. }
  285. .article-teaser {
  286. &.card {
  287. padding: 1em;
  288. margin-bottom: 1.5em;
  289. }
  290. .breadcrumb {
  291. margin-bottom: 0;
  292. font-size: 0.85rem;
  293. }
  294. .article-meta {
  295. margin-bottom: 0;
  296. }
  297. }