github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/doc/themes/docsy/assets/scss/_taxonomy.scss (about)

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