Skip to content
Draft
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ module.exports = {
plugins: [],
// add your custom rules here
rules: {},
ignorePatterns: ['de-urgenta-backend-web'],
}
16 changes: 12 additions & 4 deletions components/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
</p>
<div class="mt-7">
<a
href="#"
:href="buttonHref"
class="inline-block bg-red-500 hover:bg-red-600 text-white p-2.5 pl-12 pr-12 rounded-md"
>
<span>{{ button }}</span>
<span>{{ buttonText }}</span>
<img src="~/assets/icon-arrow.svg" class="inline-block" />
</a>
</div>
</div>
<div class="flex-shrink-0 lg:pt-0">
<img src="~/assets/image-creators.svg" />
<Media :src="image.url" />
</div>
</div>
</template>
Expand All @@ -36,7 +36,15 @@ export default {
type: String,
required: true,
},
button: {
image: {
type: Object,
required: true,
},
buttonText: {
type: String,
required: true,
},
buttonHref: {
type: String,
required: true,
},
Expand Down
10 changes: 7 additions & 3 deletions components/Courses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
</div>
<div class="mt-10">
<router-link
to="/courses"
:to="button.href"
class="inline-block bg-red-500 hover:bg-red-600 text-white p-2.5 pl-12 pr-12 rounded-md"
>
<span>{{ button }}</span>
<span>{{ button.text }}</span>
<img src="~/assets/icon-arrow.svg" class="inline-block ml-2.5" />
</router-link>
</div>
Expand All @@ -54,9 +54,13 @@ export default {
required: true,
},
button: {
type: String,
type: Object,
required: true,
},
},
async asyncData({ $strapi }) {
const [page] = await $strapi.$pages.find({ slug: 'home' })
return { data: page }
},
}
</script>
4 changes: 2 additions & 2 deletions components/Feature.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>
</div>
<div class="flex-shrink-0">
<img class="m-auto md:ml-20" :src="require(`~/assets/` + image)" />
<Media v-if="image.url" class-name="m-auto md:ml-20" :src="image.url" />
</div>
</div>
</template>
Expand All @@ -35,7 +35,7 @@ export default {
required: true,
},
image: {
type: String,
type: Object,
required: true,
},
list: {
Expand Down
4 changes: 2 additions & 2 deletions components/FeatureSecondary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
</div>
<div class="max-w-md mx-auto mt-12">
<img :src="require(`~/assets/` + image)" class="p-6" />
<Media v-if="image.url" :src="image.url" class="p-6" />
</div>
</div>
</template>
Expand All @@ -33,7 +33,7 @@ export default {
required: true,
},
image: {
type: String,
type: Object,
required: true,
},
list: {
Expand Down
23 changes: 23 additions & 0 deletions components/Media.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<img :class="className" :src="api_url + src" />
</template>

<script>
export default {
props: {
src: {
type: String,
required: true,
},
className: {
type: String,
default: '',
},
},
data() {
return {
api_url: process.env.strapiBaseUri,
}
},
}
</script>
16 changes: 16 additions & 0 deletions de-urgenta-backend-web/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{package.json,*.yml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions de-urgenta-backend-web/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
HOST=0.0.0.0
PORT=1337
3 changes: 3 additions & 0 deletions de-urgenta-backend-web/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cache
build
**/node_modules/**
27 changes: 27 additions & 0 deletions de-urgenta-backend-web/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parser": "babel-eslint",
"extends": "eslint:recommended",
"env": {
"commonjs": true,
"es6": true,
"node": true,
"browser": false
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": false
},
"sourceType": "module"
},
"globals": {
"strapi": true
},
"rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"no-console": 0,
"quotes": ["error", "single"],
"semi": ["error", "always"]
}
}
114 changes: 114 additions & 0 deletions de-urgenta-backend-web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
############################
# OS X
############################

.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*


############################
# Linux
############################

*~


############################
# Windows
############################

Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp


############################
# Packages
############################

*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid


############################
# Logs and databases
############################

.tmp
*.log
*.sql
*.sqlite
*.sqlite3


############################
# Misc.
############################

*#
ssl
.idea
nbproject
public/uploads/*
!public/uploads/.gitkeep

############################
# Node.js
############################

lib-cov
lcov.info
pids
logs
results
node_modules
.node_history

############################
# Tests
############################

testApp
coverage

############################
# Strapi
############################

.env
license.txt
exports
*.cache
build
.strapi-updater.json
3 changes: 3 additions & 0 deletions de-urgenta-backend-web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Strapi application

A quick description of your strapi application
52 changes: 52 additions & 0 deletions de-urgenta-backend-web/api/blog-cards/config/routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"routes": [
{
"method": "GET",
"path": "/blog-cards",
"handler": "blog-cards.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/blog-cards/count",
"handler": "blog-cards.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/blog-cards/:id",
"handler": "blog-cards.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/blog-cards",
"handler": "blog-cards.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/blog-cards/:id",
"handler": "blog-cards.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/blog-cards/:id",
"handler": "blog-cards.delete",
"config": {
"policies": []
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-controllers)
* to customize this controller
*/

module.exports = {};
8 changes: 8 additions & 0 deletions de-urgenta-backend-web/api/blog-cards/models/blog-cards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';

/**
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#lifecycle-hooks)
* to customize this model
*/

module.exports = {};
Loading