Skip to content

Commit

Permalink
style: beautify homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
msyfls123 committed Apr 25, 2024
1 parent e4cda2b commit 41e2874
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
4 changes: 2 additions & 2 deletions client/src/component/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ pub fn bucket(props: &BucketProps) -> Html {
html! { <span class="item-count">{" ("} {l.len()} {")"}</span> }
} else { html! {} }}
</h2>
<div>
<div class="bucket">
{
if *is_loading {
html! { "loading" }
} else if list.is_some() {
html! {<>
<table class="bucket">
<table>
<thead>
<tr>
<th class="file">{"File"}</th>
Expand Down
2 changes: 1 addition & 1 deletion client/src/component/uploader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ pub fn uploader(props: &UploaderProps) -> Html {
}
} else {
html! {
<div class="upload-input">
<div class="upload-input fa-solid fa-file">
<input type="file" onchange={move |e: Event| {
let target = e.target().unwrap();
let input_el: HtmlInputElement = target.dyn_into().unwrap();
Expand Down
42 changes: 37 additions & 5 deletions client/src/css/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ body
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Helvetica, Arial, PingFang SC, Hiragino Sans GB, STHeiti, Droid Sans Fallback, Droid Sans, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif

.bucket
border-collapse: collapse
display: table
margin: 20px 0
padding: 15px
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.24)
border-radius: 6px
table
border-collapse: collapse
th
padding-bottom: 8px
td
Expand All @@ -46,7 +52,7 @@ body
.item-count
font-variant: diagonal-fractions
.bucket-paginator
margin: 20px 0
margin-top: 20px
height: 32px
font-size: medium
min-width: 50px
Expand All @@ -62,9 +68,35 @@ body
margin: 10px 0
padding: 10px
max-width: 250px
border-width: thin
border-style: dashed
border-color: var(--grey-2_5, rgba(20,30,41,0.12))
border-radius: 6px
border: none
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.24)
.upload-input
position: relative
width: 100%
height: 25px
padding: 0
text-indent: 0.5em
line-height: 25px
text-shadow: 1px 1px 1px #c0c0c0
&::before
&::after
font-size: large
text-indent: 2rem
&::after
content: 'Click to upload'
font-size: small
margin-left: 10px
letter-spacing: 1.5px
input
position: absolute
display: block
top: 0
left: 0
right: 0
bottom: 0
opacity: 0
cursor: pointer
.progress
--circle-radius: 50px
--circle-border: 10px
Expand Down

0 comments on commit 41e2874

Please sign in to comment.