Skip to content

Commit

Permalink
Added sponsor sample logos
Browse files Browse the repository at this point in the history
  • Loading branch information
elirehema committed Mar 27, 2021
1 parent a0cf976 commit 1934650
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 5 deletions.
9 changes: 9 additions & 0 deletions assets/css/_image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
&.post-image {
height: 200px;
width: 200px;
object-fit: fill;
border-radius: 50%;
}
}
.round{
img{
width: 50px;
width: 50px;
border-radius: 50%;
object-fit: cover;
}
}
8 changes: 7 additions & 1 deletion assets/css/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions components/RImage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<div class="round">
<img :src="imgSrc()" :alt="alt" />
</div>
</template>

<script lang="js">
export default {
props: {
src: {
type: String,
required: true,
},
alt: {
type: String,
required: true,
},
},
methods: {
imgSrc() {
try {
const { post } = this.$parent;
// eslint-disable-next-line no-console
return require(`@/static/${this.src}`);
} catch (error) {
return null;
}
},
},
};
</script>

4 changes: 2 additions & 2 deletions content/en/sponsors.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ createdAt: '2021-03-30'
| :--- | :----: | :----: | :----: | :----: | :----: | :----: |
| | | | | | | |
| <hr> | <hr> | <hr> | <hr> | <hr> | <hr> | <hr> |
| Sponsor1 | Logo | <icon icon="check"></icon> | | | | |
| Sponsor 1 | <rimg src="sponsor.jpg"></rimg> | <v-icon large>mdi-check</v-icon> | | | | |
| <hr> | <hr> | <hr> | <hr> | <hr> | <hr> | <hr> |
| Sponsor2 | Logo | | | | <icon icon="check"></icon> | |
| Sponsor 2 | <rimg src="sponsor-icon.jpg"></rimg> | | | | <v-icon large>mdi-check</v-icon> | |

</div>
4 changes: 3 additions & 1 deletion mixins/mixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import BlogPage from "@/components/blog-page.vue";
import AuthorPage from "@/components/Author.vue"
import PrevNext from "@/components/PrevNext"
import AppIcon from "@/components/AppIcon.vue";
import RoundImage from "@/components/RImage"
Vue.mixin({
components:{
"c-image":VImg,
Expand All @@ -17,7 +18,8 @@ Vue.mixin({
"blog-page":BlogPage,
"v-author": AuthorPage,
"prev-next":PrevNext,
"icon":AppIcon
"icon":AppIcon,
"rimg":RoundImage
},
data: function () {
return { }
Expand Down
Binary file added static/sponsor-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/sponsor.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1934650

Please sign in to comment.