mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-22 14:22:33 +03:00
Feature - Post design (#11)
* feat: add date and id in post design * feat: add file styling
This commit is contained in:
parent
a02884e6b5
commit
672e82d06e
@ -1,17 +1,24 @@
|
|||||||
.post-container {
|
.post-container {
|
||||||
border: 1px solid rgba(0,0,0,.125);
|
border: 1px solid rgba(0,0,0,.125);
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
display: flex;
|
}
|
||||||
|
|
||||||
|
.post-info-container {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: #6c757d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.files-container {
|
.files-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-container {
|
.file-container {
|
||||||
max-width: 5rem;
|
max-width: 5rem;
|
||||||
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file {
|
.file {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
{{ define "post" }}
|
{{ define "post" }}
|
||||||
<div class="post-container mb-4">
|
<div class="post-container mb-4">
|
||||||
|
<div class="p-2">
|
||||||
|
<div class="post-info-container">
|
||||||
|
<span>{{ .CreatedAt.Format "Jan 02, 2006 15:04:05" }}</span>
|
||||||
|
<span>#{{ .ID }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="post-body-container">
|
||||||
{{ $filesLength := len .Files }}
|
{{ $filesLength := len .Files }}
|
||||||
{{ if gt $filesLength 0 }}
|
{{ if gt $filesLength 0 }}
|
||||||
<div class="files-container">
|
<div class="files-container">
|
||||||
@ -13,8 +20,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="p-2">
|
|
||||||
<p class="card-text line-break text-break">{{.Text}}</p>
|
<p class="card-text line-break text-break">{{.Text}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user