mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 23:07:28 +08:00
Change category-boxes so it's easier to customize with CSS
This commit is contained in:
@ -1,15 +1,16 @@
|
|||||||
{{#each categories as |c|}}
|
{{#each categories as |c|}}
|
||||||
<div class='category-box'>
|
<div class='category-box category-box-{{unbound c.slug}}'>
|
||||||
<a href={{c.url}}>
|
<a href={{c.url}}>
|
||||||
{{#if c.uploaded_logo.url}}
|
<div class='category-box-heading'>
|
||||||
{{cdn-img src=c.uploaded_logo.url class="logo"}}
|
{{#if c.uploaded_logo.url}}
|
||||||
{{/if}}
|
{{cdn-img src=c.uploaded_logo.url class="logo"}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class='details'>
|
|
||||||
<h3>{{c.name}}</h3>
|
<h3>{{c.name}}</h3>
|
||||||
<div class='description'>
|
</div>
|
||||||
{{{c.description_excerpt}}}
|
|
||||||
</div>
|
<div class='description'>
|
||||||
|
{{{c.description_excerpt}}}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -197,19 +197,6 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.details {
|
|
||||||
h3 {
|
|
||||||
font-size: 1.5em;
|
|
||||||
margin-bottom: 0.5em;
|
|
||||||
margin-top: 0.25em;
|
|
||||||
line-height: 1.1em;
|
|
||||||
}
|
|
||||||
.description {
|
|
||||||
font-size: 1.05em;
|
|
||||||
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 40%));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
display: block;
|
display: block;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -230,10 +217,26 @@
|
|||||||
margin: 0 1% 1.5em 1%;
|
margin: 0 1% 1.5em 1%;
|
||||||
> a {
|
> a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 1em;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.details {
|
|
||||||
|
.category-box-heading {
|
||||||
|
padding: 1em 1em 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
padding: 0 1em 1em 1em;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.05em;
|
||||||
|
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 40%));
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
margin-top: 0.25em;
|
||||||
|
line-height: 1.1em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user