Skip to content
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.history
.cache/
.env
41 changes: 26 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
# Academy
Projekty wykonywane przez społeczność discorda
[helloroman](https://discordapp.com/invite/VTyJc9N)
[helloroman](https://discordapp.com/invite/VTyJc9N)
Projekt jest we wczesnej fazie i obecne challenge sa testowe. Wszelkie sugestie propozycje pomocy mile widziane.

## Challenge #1 - Landing Page
Celem wyzwania jest wykonanie warstwy frontendowej Landing Page, zbierającego adressy e-mail osób zainteresowanych udziałem w akademii.
Stack Technologiczny do wykonania zadania to html/css/js bez zadnych frameworkow, preprocesorow.
Rozwiązanie powinno dzialać na:
Celem wyzwania jest wykonanie warstwy frontendowej Landing Page, zbierającego adressy e-mail osób zainteresowanych udziałem w akademii.
Stack Technologiczny do wykonania zadania to html/css/js bez zadnych frameworkow, preprocesorow.
Rozwiązanie powinno dzialać na:
* Chrome 58+
* Edge 16+
* Safari 10.1+
* Firefox 54+
Przycisk do wysyania formularza powinien mieć ID: LandingEmail
Wykonane zadanie należy przesylac jako pull request na branch develop.
Zwrocie uwagę na sematyke html i accessibility.
Przycisk do wysyania formularza powinien mieć ID: LandingEmail
Wykonane zadanie należy przesylac jako pull request na branch develop.
Zwrocie uwagę na sematyke html i accessibility.

### Grafiki
[Project.pdf](/assets/Layout.pdf.pdf})
[Figma](https://www.figma.com/file/gCTf2Ux96ETR0DMxr6T2m039/LandingPage?node-id=1%3A13)
[Zeppelin](https://zpl.io/boKzeQv)
[Project.pdf](/assets/Layout.pdf.pdf})
[Figma](https://www.figma.com/file/gCTf2Ux96ETR0DMxr6T2m039/LandingPage?node-id=1%3A13)
[Zeppelin](https://zpl.io/boKzeQv)
<sub> Marginesy mogą się trochę nie zgadzać dopiero się uczę figmy</sub>
#### Bonus challenge
#### Bonus challenge
* Wykonaj zadanie bez użycia javascriptu
* Stwórz warstwe backendowa(dowolny język) lub podepnij się do firebase
### Termin
Wstępny czas na wykonanie challenga 21.01.2019
### Termin
Wstępny czas na wykonanie challenga 21.01.2019



Jak ktoś ma ochotę zrobić lepszy readme, to niech to zrobi :D

### Struktura
Podzieliłem projekt na:
* backend
* frontend
* server

Dlaczego? Poniewaz, kazda z tych czesci projektu mozna reuzyc. Przykladowo warstwa frontendu. To jest tylko jedna strona z jakims formularzem i wyslaniem danych tego formularza w jakies miejsce.
Dlatego doszedl <b>serwer</b>, ktory obsluguje dane przychodzace z tego formularza i gdzies je zapisuje.
Dodatkowo jest <b>backend</b>, ktory ma byc panelem admina. On rowniez nie musi byc na tej samej domenie co frontend i serwer. Rownie dobrze nigdzie nie musi byc serwowany, bo admin moze miec to narzedzie po prostu lokalnie.

Binary file removed assets/Layout.pdf
Binary file not shown.
Binary file removed assets/Thumbs.db
Binary file not shown.
Binary file removed assets/coming-soon-ribbon.png
Binary file not shown.
1 change: 1 addition & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
API_URL=
5 changes: 5 additions & 0 deletions backend/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"EmailSubscriptionsBackend": "domanchallange1backend"
}
}
5 changes: 5 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
.env
dist/
.cache/
.firebase/
11 changes: 11 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Subscribers - backend

Strona panelu administratora.

### Uzyte narzedzia
* [VueJs](https://github.com/vuejs/vue) - w sumie moglby byc VanillaJs - ale to zadanie bylo potraktowane jako dodatkowe, wiec tak bylo szybciej.
* [axios](https://github.com/axios/axios) - paczka do requestow HTTP


### Demo
https://domanchallange1backend.firebaseapp.com/
10 changes: 10 additions & 0 deletions backend/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
13 changes: 13 additions & 0 deletions backend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Backend</title>
</head>
<body>
<div id="app"></div>
<script src="index.js"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions backend/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import dotenv from 'dotenv';
dotenv.config();

require('./src/index');
23 changes: 23 additions & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "doman_challange_01_backend",
"version": "1.0.0",
"main": "index.js",
"author": "hello@mateuszlittwin.pl",
"license": "MIT",
"scripts": {
"parcel:dev": "parcel -p 1235 index.html",
"parcel:prod": "parcel build index.html --out-dir dist"
},
"dependencies": {
"axios": "^0.18.0",
"dotenv": "^6.2.0",
"vue": "^2.5.22",
"vue-hot-reload-api": "^2.3.1"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@vue/component-compiler-utils": "^2.5.0",
"cssnano": "^4.1.8",
"vue-template-compiler": "^2.5.22"
}
}
43 changes: 43 additions & 0 deletions backend/src/components/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<div>
List of subscribers:
<WithLoading :isLoading="isLoading">
<ul>
<li v-for="email in emails" :key="email.id">
{{ email.data }}
</li>
</ul>
</WithLoading>
</div>
</template>

<script>
import axios from "axios";
import WithLoading from './WithLoading';

export default {
name: "BackendApp",

components: {
WithLoading,
},

data () {
return {
emails: [],
isLoading: false,
};
},

mounted() {
this.isLoading = true;
axios
.get(`${process.env.API_URL}/getEmails`)
.then(response => {
this.emails = response.data.emails;
this.isLoading = false;
});
}
};
</script>

21 changes: 21 additions & 0 deletions backend/src/components/WithLoading.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<div class="with-loading">
<slot v-if="!isLoading"></slot>
<div v-else>Loading..</div>
</div>
</template>

<script>
export default {
props: {
isLoading: {
type: Boolean,
default: false,
},
}
}
</script>

<style>

</style>
7 changes: 7 additions & 0 deletions backend/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Vue from 'vue';
import App from './components/App.vue';

new Vue({
el: '#app',
render: h => h(App),
})
Loading