Skip to content

Commit

Permalink
Fix styles 2 (#5)
Browse files Browse the repository at this point in the history
* cssをstyle.cssに集約

* tmp

* Merge pull request #2 from louiscnovel2/patch-1

style.cssの作成

* コンポーネント別のcssをやめてstyle.cssに一本化

* 修正漏れのstyle in componentを削除
  • Loading branch information
minoritea authored Mar 5, 2023
1 parent 32afaa7 commit 0a70f78
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 113 deletions.
17 changes: 0 additions & 17 deletions src/lib/components/post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,6 @@
}
</script>

<style>
.post {
width: 100%;
border-top-style: solid;
border-color: gray;
border-top-width: 1px;
padding: 0.5em;
}
.post > .name {
margin-bottom: 0.5em;
font-weight: bold;
}
.post > .message {
margin-left: 1em;
}
</style>

<div class="post">
<div class="name">{post.post.author.displayName}</div>
<div class="message">
Expand Down
39 changes: 0 additions & 39 deletions src/lib/components/post_form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,6 @@
import { post } from "$lib/client";
</script>

<style>
form {
margin-top: 20px;
margin-bottom: 20px;
display: flex;
flex-direction: column;
align-items: center;
}
textarea[name=text] {
width: 100%;
height: 100px;
font-size:17px;
margin: 0px 0px 20px 0px;
padding:17px 15px 17px 15px;
border-radius: 20px;
}
.to-right {
width: 100%;
display: flex;
justify-content: end;
}
input[type="submit" i]{
width: 10em;
border-color: #00acee;
background-color: #00acee;
border-radius: 20px;
padding:5px 15px 5px 15px;
color: #FFFFFF;
}
input[type="submit" i]:hover{
background-color: #0095d6;
border-color: #0095d6;
}
</style>

<form name="post" method="POST" on:submit|preventDefault={post}>
<textarea name="text" />
<div class="to-right">
Expand Down
19 changes: 0 additions & 19 deletions src/lib/components/signin_form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@
import { signin } from "$lib/client";
</script>

<style>
form {
display: flex;
flex-direction: column;
align-items: center;
row-gap: 0.5em;
}
form > input, label {
width: 30em;
}
form > input[type="submit" i]{
border-color: #00acee;
background-color: #00acee;
border-radius: 20px;
padding:5px 15px 5px 15px;
color: #FFFFFF;
}
</style>

<form name="signin" method="POST" on:submit|preventDefault={signin}>
<label for="signin-identifier">Email Address</label>
<input id="signin-identifier" name="identifier" type="email" />
Expand Down
25 changes: 0 additions & 25 deletions src/lib/components/timeline.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,6 @@
import Post from "$lib/components/post.svelte";
</script>

<style>
.refresh-button {
width: 8em;
border-color: #6A5ACD;
background-color: #6A5ACD;
border-radius: 20px;
padding:5px 15px 5px 15px;
color: #FFFFFF;
}
.to-right {
width: 100%;
display: flex;
justify-content: end;
}
.timeline {
margin-top: 1.5em;
display: flex;
flex-direction: column;
align-items: center;
row-gap: 0.5em;
}
</style>

<div class="to-right">
<button class="refresh-button" on:click={refresh}>Refresh</button>
</div>
Expand Down
13 changes: 0 additions & 13 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@
import Timeline from "$lib/components/timeline.svelte";
</script>

<style>
.container {
display: flex;
flex-wrap: wrap;
}
.container > .center {
flex: 700px;
}
.container > .left, .right {
flex: 0px;
}
</style>

<div class="container">
<div class="left"></div>
<div class="center">
Expand Down
106 changes: 106 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
.container {
display: flex;
flex-wrap: wrap;
}

.container > .center {
flex: 700px;
}

.container > .left, .right {
flex: 0px;
}

.to-right {
width: 100%;
display: flex;
justify-content: end;
}

/* Sign-in form */
form[name=signin] {
display: flex;
flex-direction: column;
align-items: center;
row-gap: 0.5em;
}
form[name=signin] > input, label {
width: 30em;
}

form[name=signin] > input[type="submit" i] {
border-color: #00acee;
background-color: #00acee;
border-radius: 20px;
padding:5px 15px 5px 15px;
color: #FFFFFF;
}

/* post message form */
form[name=post] {
margin-top: 20px;
margin-bottom: 20px;
display: flex;
flex-direction: column;
align-items: center;
}

/* Post Button Design */
form[name=post] input[type="submit" i]{
width: 10em;
border-color: #00acee;
background-color: #00acee;
border-radius: 20px;
padding:5px 15px 5px 15px;
color: #FFFFFF;
}

form[name=post] input[type="submit" i]:hover{
background-color: #0095d6;
border-color: #0095d6;
}

/* Textarea Design */
form[name=post] > textarea{
width: 100%;
height: 100px;
font-size:17px;
margin: 0px 0px 20px 0px;
padding:17px 15px 17px 15px;
border-radius: 20px;
}

/* Timeline messages */
.timeline {
margin-top: 1.5em;
display: flex;
flex-direction: column;
align-items: center;
row-gap: 0.5em;
}

/* Refresh Button Design */
.refresh-button {
width: 8em;
border-color: #6A5ACD;
background-color: #6A5ACD;
border-radius: 20px;
padding:5px 15px 5px 15px;
color: #FFFFFF;
}

.post {
width: 100%;
border-top-style: solid;
border-color: gray;
border-top-width: 1px;
padding: 0.5em;
}

.post > .name {
margin-bottom: 0.5em;
font-weight: bold;
}
.post > .message {
margin-left: 1em;
}

0 comments on commit 0a70f78

Please sign in to comment.