Skip to content

Commit

Permalink
sidebar - router
Browse files Browse the repository at this point in the history
Sidebar and router operations completed
  • Loading branch information
mehmetsagir committed Oct 16, 2020
1 parent 5b4d2a6 commit f37cf61
Show file tree
Hide file tree
Showing 43 changed files with 12,884 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
node_modules
/dist

24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# twitter-clone

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
12,058 changes: 12,058 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "twitter-clone",
"version": "1.0.0",
"private": true,
"description": "Vuejs - Twitter Clone",
"author": {
"name": "Mehmet Sağır"
},
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test": "echo \"Error: no test specified\" && exit 1"
},
"main": "index.js",
"dependencies": {
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-router": "^3.2.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^1.19.1",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended",
"@vue/prettier"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"_id": "[email protected]",
"license": "MIT",
"readme": "ERROR: No README data found!"
}
Binary file added public/favicon.ico
Binary file not shown.
16 changes: 16 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>Twitter Clone</title>
</head>

<body>
<div id="app"></div>
</body>

</html>
25 changes: 25 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<div id="app">
<Sidebar/>
<router-view class="box"/>
</div>
</template>

<script>
import Sidebar from "@/components/Sidebar";
export default {
name: "App.vue",
components : {
Sidebar,
}
}
</script>

<style lang="scss">
#app{
display: flex;
}
.box{
height: 200vh;
}
</style>
Binary file added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions src/components/Avatar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<img class="profileImage" :class="size" :src="image" alt="avatar">
</template>

<script>
export default {
name: "Avatar",
props : {
image: {
type: String,
},
size: {
type: String,
default: 'normal'
}
}
}
</script>

<style lang="scss" scoped>
.profileImage{
display: inline-block;
position: relative;
border-radius: 50%;
}
.normal{
width: 40px;
height: 40px;
}
.large{
width: 50px;
height: 50px;
}
.xlarge{
width: 60px;
height: 60px;
}
</style>
30 changes: 30 additions & 0 deletions src/components/CustomButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<template>
<button>
<slot/>
</button>
</template>

<script>
export default {
name: "CustomButton"
}
</script>

<style scoped lang="scss">
button{
background: none;
border: none;
color: #FFFFFF;
font-weight: 700;
background: #1DA1F2;
outline: none;
cursor: pointer;
font-size: 15px;
border-radius: 99px;
transition: 300ms;
&:hover{
background: rgba(#1DA1F2, .9);
}
}
</style>
45 changes: 45 additions & 0 deletions src/components/CustomText.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<template>
<components :is="tag" :class="font">
<slot/>
</components>
</template>

<script>
export default {
name: "CustomText",
props : {
tag: {
type: String,
default: 'span'
},
font: {
type: String,
default: 'normal fw-normal',
}
}
}
</script>

<style scoped>
.small{
font-size: 13px;
}
.normal{
font-size: 14px;
}
.large{
font-size: 15px;
}
.xlarge{
font-size: 19px;
}
.fw-normal{
font-weight: 400;
}
.fw-bold{
font-weight: 700;
}
.fw-heavy{
font-weight: 800;
}
</style>
Loading

0 comments on commit f37cf61

Please sign in to comment.