mehdi_minaee
Hello, Thanks for this atricle, i have a problem:
where is location for @assets/css/main.css in my frontend project?
i have to create main.css beside uikit.js?
Thanks
Hello, Thanks for this atricle, i have a problem:
where is location for @assets/css/main.css in my frontend project?
i have to create main.css beside uikit.js?
Thanks
hi mehdi, frontend in this tut is vue(nuxt by the way),you can add it in your nuxt.config.js like this
export default {
css: [
'@/assets/main.css',
],
}
or if if you want to use in one page head you can add it to layout or in head of your page.vue like this
head() {
return {
link: [
{
rel: "stylesheet",
href:
"/asset/css/main.css"
},
],
}
}
and if its not for whole project you can do it at the end of your component too
<style scope>
some property: some value
/* you can remove scope */
</style>
Hello, thanks for this article!
I juste have a little question : do you know how to “orderby” in your .gql files ?
Thanks
The article was interesting and the one problem faced was that , when I visit an article it throw undefined error. This is due to the delay getting the data from apollo. So I go with computed property and check the the null with v-if in the template
here is then snippets I used
computed:{
getArticle() {return this.article.data.attributes ? this.article.data : null }
},
in the template
<div
v-if="getArticle"
id="banner"
class="uk-height-small uk-flex uk-flex-center uk-flex-middle uk-background-cover uk-light uk-padding"
:data-src="api_url + getArticle.attributes.image.data.attributes.url"
uk-img
>
<h1 v-if="getArticle">{{ getArticle.attributes.title }}</h1>
</div>
Hope this will help someone.
Thank you, good work
Manoj from India
[Blog](https:// javascriptsu.wordpress.com)
Found this super interesting
For me adding a
<div v-if="!this.$apollo.loading">
at the main div worked for articles, still can’t get categories to display though for some reason
Gibbo