update
This commit is contained in:
@@ -35,9 +35,6 @@
|
||||
<? if ( is_array( $this -> categories ) and count( $this -> categories ) ):?>
|
||||
<? foreach ( $this -> categories as $category ):?>
|
||||
<? $category_name = isset( $category['name'] ) ? (string)$category['name'] : '';?>
|
||||
<? $category_text = isset( $category['text'] ) ? strip_tags( (string)$category['text'] ) : '';?>
|
||||
<? $category_preview = trim( $category_text );?>
|
||||
<? if ( strlen( $category_preview ) > 170 ) $category_preview = substr( $category_preview, 0, 170 ) . '...';?>
|
||||
<article class="wiki-card" data-name="<?= htmlspecialchars( strtolower( $category_name ) );?>">
|
||||
<div class="wiki-card-top">
|
||||
<label class="wiki-select-one-label">
|
||||
@@ -45,11 +42,6 @@
|
||||
</label>
|
||||
<a href="/wiki/category_preview/id=<?= (int)$category['id'];?>" class="wiki-card-title"><?= htmlspecialchars( $category_name );?></a>
|
||||
</div>
|
||||
<? if ( $category_preview !== '' ):?>
|
||||
<div class="wiki-card-preview"><?= htmlspecialchars( $category_preview );?></div>
|
||||
<? else:?>
|
||||
<div class="wiki-card-preview wiki-card-preview-empty">Brak podglądu treści.</div>
|
||||
<? endif;?>
|
||||
<div class="wiki-card-bottom">
|
||||
<div class="users">
|
||||
<? $category_users = \factory\Wiki::category_users( (int)$category['id'] );?>
|
||||
@@ -77,18 +69,10 @@
|
||||
<? if ( is_array( $this -> categories ) and count( $this -> categories ) ):?>
|
||||
<? foreach ( $this -> categories as $category ):?>
|
||||
<? $category_name = isset( $category['name'] ) ? (string)$category['name'] : '';?>
|
||||
<? $category_text = isset( $category['text'] ) ? strip_tags( (string)$category['text'] ) : '';?>
|
||||
<? $category_preview = trim( $category_text );?>
|
||||
<? if ( strlen( $category_preview ) > 170 ) $category_preview = substr( $category_preview, 0, 170 ) . '...';?>
|
||||
<article class="wiki-card" data-name="<?= htmlspecialchars( strtolower( $category_name ) );?>">
|
||||
<div class="wiki-card-top">
|
||||
<a href="/wiki/category_preview/id=<?= (int)$category['id'];?>" class="wiki-card-title"><?= htmlspecialchars( $category_name );?></a>
|
||||
</div>
|
||||
<? if ( $category_preview !== '' ):?>
|
||||
<div class="wiki-card-preview"><?= htmlspecialchars( $category_preview );?></div>
|
||||
<? else:?>
|
||||
<div class="wiki-card-preview wiki-card-preview-empty">Brak podglądu treści.</div>
|
||||
<? endif;?>
|
||||
</article>
|
||||
<? endforeach;?>
|
||||
<? else:?>
|
||||
@@ -154,21 +138,22 @@
|
||||
|
||||
.wiki-main .wiki-categories-grid {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: 14px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||||
}
|
||||
|
||||
.wiki-main .wiki-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
gap: 12px;
|
||||
border: 1px solid var(--wiki-border);
|
||||
border-radius: 10px;
|
||||
padding: 12px;
|
||||
padding: 14px;
|
||||
background: #fff;
|
||||
transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
min-height: 96px;
|
||||
}
|
||||
|
||||
.wiki-main .wiki-card:hover {
|
||||
@@ -197,20 +182,6 @@
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wiki-main .wiki-card-preview {
|
||||
color: var(--wiki-text);
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
min-height: 38px;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.wiki-main .wiki-card-preview-empty {
|
||||
color: var(--wiki-muted);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.wiki-main .wiki-card-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -271,6 +242,12 @@
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1400px) {
|
||||
.wiki-main .wiki-categories-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user