Skip to content

Commit

Permalink
Merge branch 'main' into Tanya
Browse files Browse the repository at this point in the history
  • Loading branch information
t4nn authored Jan 13, 2023
2 parents b1a9128 + d5e0a7b commit 764833a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/home_page_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe("Home page", () => {
it("has a title", () => {
cy.visit("/");
cy.get(".title").should("contain", "Acebook");
cy.get(".title").should("contain", "Catbook");
});
});
6 changes: 3 additions & 3 deletions cypress/integration/user_can_see_posts_count_on_post.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ describe("Timeline", () => {
cy.visit("/posts");
cy.contains("New post").click();

cy.get("#new-post-form").find('[type="text"]').type("Hello, world!");
cy.get("#message").type("Hello, world!");
cy.get("#new-post-form").submit();

cy.get(".posts").should("contain", "Hello, world!");
// cy.get(".posts").should("contain", "Hello, world!");

// Assert that we can see the likes count
cy.get(".posts").should("contain", "0 likes");
cy.get(".likes").should("contain", "0");
});
});

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"start:test": "PORT=3030 MONGODB_URL='mongodb://0.0.0.0/acebook_test' npm start",
"test": "npm run lint && npm run test:unit && npm run test:integration",
"test:unit": "jest",
"test:integration": "cypress run"
},
"test:integration": "cypress run",
},

"engines": {
"node": ">=18.1.0"
},
Expand Down
10 changes: 10 additions & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,23 @@ body{
width: 30px;
border-radius: 50%;
position: relative;
animation: blink 2.5s infinite;
}


@keyframes blink {
0% {transform: scale(1, 0.1);}
100% {transform: scale(1, 1);}
}

.eye-1{
bottom: 75px;
left: 30px;
}
.eye-r{
bottom: 105px;
left: 90px;

}
.eyeball{
background-color: #262626;
Expand All @@ -99,6 +108,7 @@ body{
position: relative;
top: 3px;
left: 3px;
animation: blink 2.5s infinite;
}
.nose{
height: 0;
Expand Down
16 changes: 8 additions & 8 deletions views/layout.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>

<title>Catbook</title>
<title class = "title">Catbook</title>
<link rel="shortcut icon" type="image/jpg" href="/images/favicon.ico">
<link rel='stylesheet' href='/stylesheets/style.css' />
</head>
Expand Down Expand Up @@ -52,8 +52,8 @@
-webkit-transition: -webkit-clip-path 0.5625s, clip-path 0.375s;
transition: -webkit-clip-path 0.5625s, clip-path 0.375s;
position:absolute;
top:34px;
left:600px;
top:0px;
left:0px;
}
nav:hover {
Expand Down Expand Up @@ -121,7 +121,7 @@
#banner{
position:relative;
top:-35px;
left:0px;
left:300px;
}
#pawburger{
Expand All @@ -143,10 +143,7 @@


<div id="headers">
<div style="display:inline-block">
<div id="banner" style="display:inline-block">
<img src="/images/Catbook.gif" alt="Welcome To Catbook">


{{#if shownavbar}}
<nav>
<div class="navicon">
Expand All @@ -159,6 +156,9 @@
</div>
</nav>
{{/if}}
<div style="display:inline-block">
<div id="banner" style="display:inline-block">
<img src="/images/Catbook.gif" alt="Welcome To Catbook">
</div>
{{{body}}}

Expand Down
6 changes: 6 additions & 0 deletions views/posts/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,18 @@ div {text-align: center;}
<small>{{ this.date }}</small>
</div>
{{!-- adds a little meow with the like counter, associated with this.id and showing this.likes_count --}}

<div class="row" style="margin-left:30px">

</div>
<span style="margin-left: -40px;"> &#x1F63B;</span>
<span id="likes-count-{{ this.id }}">{{ this.likes }}</span>

<div class="row" style="display: inline-block; margin-left: -20px;"></div>
<span>&#x1F63B;</span>
<span class="likes" id="likes-count-{{ this.id }}">{{ this.likes }}</span>


<span style="margin-left:60px">&#128062;</span>
<span id="loves-count-{{ this.id }}">{{ this.loves }}</span>

Expand Down

0 comments on commit 764833a

Please sign in to comment.