Code cleanup, move docs data to json, update docs structure
This commit is contained in:
@@ -1,29 +1,11 @@
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import Carousel from '../components/Carousel/Carousel.svelte'
|
||||
import Color from './Color.svelte'
|
||||
import AlbumsPreview from './AlbumsPreview/AlbumsPreview.svelte'
|
||||
import Divider from './Divider.svelte'
|
||||
|
||||
const colors = [
|
||||
{ color: '#85d78b', text: '#85d78b' },
|
||||
{ color: '#71d077', text: '#71d077' },
|
||||
{ color: '#5dca64', text: '#5dca64' },
|
||||
{ color: '#49c351', text: '#49c351' },
|
||||
{ color: '#35bd3e', text: '#35bd3e' },
|
||||
{ color: '#2faa37', text: '#2faa37' },
|
||||
{ color: '#2a9731', text: '#2a9731' },
|
||||
{ color: '#25842b', text: '#25842b' },
|
||||
{ color: '#1f7125', text: '#1f7125' },
|
||||
]
|
||||
|
||||
const images = [
|
||||
'https://cdn.pixabay.com/photo/2017/03/13/10/25/hummingbird-2139278_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2016/03/27/19/49/nature-1283976_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2018/07/09/18/17/apple-3526737_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2016/08/30/16/05/leaf-1631181_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2019/11/13/11/01/meadow-4623279_1280.jpg'
|
||||
]
|
||||
import Color from './components/Color.svelte'
|
||||
import AlbumsPreview from './components/AlbumsPreview/AlbumsPreview.svelte'
|
||||
import Divider from './components/Divider.svelte'
|
||||
import images from './data/images.json'
|
||||
import colors from './data/colors.json'
|
||||
</script>
|
||||
|
||||
# Features
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<div class="divider">
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.divider {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
height: 1px;
|
||||
}
|
||||
</style>
|
||||
@@ -23,57 +23,57 @@
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.docs__main-layout__main-container {
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
.docs__main-layout__main-container {
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
|
||||
.docs__main-layout__header-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 300px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f0e68c;
|
||||
}
|
||||
.docs__main-layout__logo {
|
||||
height: 80%;
|
||||
}
|
||||
.docs__main-layout__links-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px;
|
||||
}
|
||||
.docs__main-layout__links-container > a {
|
||||
text-decoration: none;
|
||||
color: #009800;
|
||||
}
|
||||
.docs__main-layout__links-container > a:not(:last-child) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.docs__main-layout__header-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 300px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f0e68c;
|
||||
}
|
||||
.docs__main-layout__logo {
|
||||
height: 80%;
|
||||
}
|
||||
.docs__main-layout__links-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px;
|
||||
}
|
||||
.docs__main-layout__links-container > a {
|
||||
text-decoration: none;
|
||||
color: #009800;
|
||||
}
|
||||
.docs__main-layout__links-container > a:not(:last-child) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.docs__main-layout__content-container {
|
||||
margin: 0 auto;
|
||||
}
|
||||
@media screen and (min-width: 0px) {
|
||||
.docs__main-layout__content-container {
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
.docs__main-layout__content-container {
|
||||
width: 70%;
|
||||
@media screen and (min-width: 0px) {
|
||||
.docs__main-layout__content-container {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 992px) {
|
||||
.docs__main-layout__content-container {
|
||||
width: 60%;
|
||||
@media screen and (min-width: 768px) {
|
||||
.docs__main-layout__content-container {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1200px) {
|
||||
.docs__main-layout__content-container {
|
||||
width: 50%;
|
||||
@media screen and (min-width: 992px) {
|
||||
.docs__main-layout__content-container {
|
||||
width: 60%;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1200px) {
|
||||
.docs__main-layout__content-container {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,47 +1,8 @@
|
||||
<script>
|
||||
import Carousel from '../../components/Carousel/Carousel.svelte'
|
||||
import Carousel from '../../../components/Carousel/Carousel.svelte'
|
||||
import Image from './Image.svelte'
|
||||
import albums from '../../data/albums.json'
|
||||
|
||||
const albums = {
|
||||
forest: {
|
||||
title: 'Forest',
|
||||
tags: ['forest', 'trees'],
|
||||
images: [
|
||||
'https://cdn.pixabay.com/photo/2017/04/09/09/56/avenue-2215317_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2017/11/12/13/37/forest-2942477_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2016/08/11/23/55/trees-1587301_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2016/08/16/19/09/forest-1598756_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2016/11/29/07/12/forest-1868028_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2015/03/26/09/45/woods-690257_1280.jpg'
|
||||
]
|
||||
},
|
||||
birds: {
|
||||
title: 'Birds',
|
||||
tags: ['birds', 'owl', 'parrot'],
|
||||
images: [
|
||||
'https://cdn.pixabay.com/photo/2016/11/18/12/14/owl-1834152_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2016/05/26/04/19/macaw-1416388_1280.jpg'
|
||||
]
|
||||
},
|
||||
flowers: {
|
||||
title: 'Flowers',
|
||||
tags: ['flowers', 'blossom', 'beauty'],
|
||||
images: [
|
||||
'https://cdn.pixabay.com/photo/2018/09/06/23/37/hydrangea-3659614_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2016/04/12/18/19/carnation-1325012_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2017/06/06/19/18/rose-2378156_1280.jpg'
|
||||
]
|
||||
},
|
||||
coffee: {
|
||||
title: 'Coffee',
|
||||
tags: ['coffee', 'cup'],
|
||||
images: [
|
||||
'https://cdn.pixabay.com/photo/2017/05/12/08/29/coffee-2306471_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2016/03/30/21/59/coffee-beans-1291656_1280.jpg',
|
||||
'https://cdn.pixabay.com/photo/2018/01/31/09/57/coffee-3120750_1280.jpg',
|
||||
]
|
||||
}
|
||||
}
|
||||
function imagesLength(length) {
|
||||
return `${length} image${length > 1 ? 's' : ''}`
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
<div
|
||||
class="color-container"
|
||||
style="background-color: {color};"
|
||||
>
|
||||
>
|
||||
<p>{text}</p>
|
||||
</div>
|
||||
|
||||
11
src/docs/components/Divider.svelte
Normal file
11
src/docs/components/Divider.svelte
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="divider">
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.divider {
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
height: 1px;
|
||||
}
|
||||
</style>
|
||||
40
src/docs/data/albums.json
Normal file
40
src/docs/data/albums.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"forest": {
|
||||
"title": "Forest",
|
||||
"tags": ["forest", "trees"],
|
||||
"images": [
|
||||
"https://cdn.pixabay.com/photo/2017/04/09/09/56/avenue-2215317_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2017/11/12/13/37/forest-2942477_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2016/08/11/23/55/trees-1587301_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2016/08/16/19/09/forest-1598756_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2016/11/29/07/12/forest-1868028_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2015/03/26/09/45/woods-690257_1280.jpg"
|
||||
]
|
||||
},
|
||||
"birds": {
|
||||
"title": "Birds",
|
||||
"tags": ["birds", "owl", "parrot"],
|
||||
"images": [
|
||||
"https://cdn.pixabay.com/photo/2016/11/18/12/14/owl-1834152_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2016/05/26/04/19/macaw-1416388_1280.jpg"
|
||||
]
|
||||
},
|
||||
"flowers": {
|
||||
"title": "Flowers",
|
||||
"tags": ["flowers", "blossom", "beauty"],
|
||||
"images": [
|
||||
"https://cdn.pixabay.com/photo/2018/09/06/23/37/hydrangea-3659614_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2016/04/12/18/19/carnation-1325012_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2017/06/06/19/18/rose-2378156_1280.jpg"
|
||||
]
|
||||
},
|
||||
"coffee": {
|
||||
"title": "Coffee",
|
||||
"tags": ["coffee", "cup"],
|
||||
"images": [
|
||||
"https://cdn.pixabay.com/photo/2017/05/12/08/29/coffee-2306471_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2016/03/30/21/59/coffee-beans-1291656_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2018/01/31/09/57/coffee-3120750_1280.jpg"
|
||||
]
|
||||
}
|
||||
}
|
||||
11
src/docs/data/colors.json
Normal file
11
src/docs/data/colors.json
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{ "color": "#85d78b", "text": "#85d78b" },
|
||||
{ "color": "#71d077", "text": "#71d077" },
|
||||
{ "color": "#5dca64", "text": "#5dca64" },
|
||||
{ "color": "#49c351", "text": "#49c351" },
|
||||
{ "color": "#35bd3e", "text": "#35bd3e" },
|
||||
{ "color": "#2faa37", "text": "#2faa37" },
|
||||
{ "color": "#2a9731", "text": "#2a9731" },
|
||||
{ "color": "#25842b", "text": "#25842b" },
|
||||
{ "color": "#1f7125", "text": "#1f7125" }
|
||||
]
|
||||
7
src/docs/data/images.json
Normal file
7
src/docs/data/images.json
Normal file
@@ -0,0 +1,7 @@
|
||||
[
|
||||
"https://cdn.pixabay.com/photo/2017/03/13/10/25/hummingbird-2139278_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2016/03/27/19/49/nature-1283976_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2018/07/09/18/17/apple-3526737_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2016/08/30/16/05/leaf-1631181_1280.jpg",
|
||||
"https://cdn.pixabay.com/photo/2019/11/13/11/01/meadow-4623279_1280.jpg"
|
||||
]
|
||||
Reference in New Issue
Block a user