Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #87

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

test #87

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Doc/tweeterlarge.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Doc/tweetersmall.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@

Tweeter is a simple, single-page Twitter clone.

This repository is the starter code for the project: Students will fork and clone this repository, then build upon it to practice their HTML, CSS, JS, jQuery and AJAX front-end skills, and their Node, Express back-end skills.
HTML, CSS, JS, jQuery and AJAX front-end skills, and their Node, Express back-end skills.

## Getting Started

1. [Create](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) a new repository using this repository as a template.
2. Clone your repository onto your local device.
3. Install dependencies using the `npm install` command.
3. Start the web server using the `npm run local` command. The app will be served at <http://localhost:8080/>.
4. Go to <http://localhost:8080/> in your browser.
npm start to start the server

## Dependencies

- Express
- Node 5.10.x or above
- body-parser
- chance

## Sceenshots
["Screenshot of desktop page"](https://github.com/Vuvvy1/tweeter/blob/73a5125faef96edb1ee8c91a8694b1db593f1451/Doc/tweeterlarge.JPG)
["Screenshot of moblie with error"](https://github.com/Vuvvy1/tweeter/blob/73a5125faef96edb1ee8c91a8694b1db593f1451/Doc/tweetersmall.JPG)
## Created by Hadley Sutherland
52 changes: 38 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server/index.js",
"local": "./node_modules/.bin/nodemon --watch server -e js server/index.js"
"local": "./node_modules/.bin/nodemon --watch server -e js server/index.js",
"stop": "node server.stop.js"
},
"author": "Lighthouse Labs",
"license": "ISC",
"dependencies": {
"body-parser": "^1.15.2",
"chance": "^1.0.2",
"chance": "^1.1.9",
"express": "^4.13.4",
"md5": "^2.1.0"
"md5": "^2.1.0",
"timeago.js": "^4.0.2"
},
"devDependencies": {
"nodemon": "^1.9.2"
Expand Down
52 changes: 48 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,67 @@
<!-- External CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" type="text/css" />

<!-- timeago -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/timeago.js/4.0.2/timeago.min.js" integrity="sha512-SVDh1zH5N9ChofSlNAK43lcNS7lWze6DTVx1JCXH1Tmno+0/1jMpdbR8YDgDUfcUrPp1xyE53G42GFrcM0CMVg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<!-- Font -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Bungee&family=Source+Sans+Pro:ital,wght@0,300;0,600;1,300;1,600&display=swap" rel="stylesheet">

<!-- App CSS -->
<link rel="stylesheet" href="/styles/layout.css" type="text/css" />
<link rel="stylesheet" href="/styles/nav.css" type="text/css" />
<link rel="stylesheet" href="/styles/header.css" type="text/css" />
<link rel="stylesheet" href="/styles/new-tweet.css" type="text/css" />
<link rel="stylesheet" href="/styles/oldTweet.css" type="text/css" />


<!-- External JS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />

<!-- App JS -->
<script type="text/javascript" src="/scripts/client.js"></script>
<script type="text/javascript" src="/scripts/composer-char-counter.js"></script>
</head>

<body>
<!-- Top nav bar (fixed) -->
<nav>
<span>tweeter</span>
</nav>
<div class="writeTweet">
<span><b>Write</b> a new tweet</span>
<div>
<i class="fa-solid fa-angles-down"></i>
</div>
</div>
</nav>
<span> class="bar"></span>
<header>
<div>
<img src="/images/profile-hex.png">
</div>
<br>
<div>
<h2>Vuvvy</h2>
</div>
</header>
<main class="container">
<section class="new-tweet" >
<form action="/tweets" method="POST" class="tweetSubmit">
<div class='errorBox'>
</div>
<div class="newTweetTop">
<textarea name="text" id="tweet-text" placeholder="What are you humming about?"></textarea>
</div>
<div class="newTweetBottom">
<button type="submit">Tweet</button>
<output name="counter" class="counter" for="tweet-text">140</output>
</div>
</form>
</section>

<!-- Page-specific (main) content here -->
<main class="container"></main>
<section id = "tweets-container">
</section>
</main>
</body>
</html>
49 changes: 49 additions & 0 deletions public/scripts/Untitled-2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

const transpose = function(array) {
let result = [];

for (let c = 0; c < array[0].length; c++) {
let temp = [];

for (let r = 0; r < array.length; r++) {
if (array[r][c]) {
temp.push(array[r][c]);
}
}
result.push(temp);
}
return result;
};

// Do not edit this function.
const printMatrix = (matrix) => {
for (const row of matrix) {
for (const el of row) {
process.stdout.write(el + " ");
}
process.stdout.write("\n");
}
};

printMatrix(
transpose([
[1, 2, 3, 4],
[1, 2, 3, 4],
[1, 2, 3, 4],
[1, 2, 3, 4],
])
);

console.log("----");

printMatrix(
transpose([
[1, 2],
[3, 4],
[5, 6],
])
);

console.log("----");

printMatrix(transpose([[1, 2, 3, 4, 5, 6, 7]]));
Loading