diff --git a/app/javascript/widget/components/ArticleCategoryCard.vue b/app/javascript/widget/components/ArticleCategoryCard.vue new file mode 100644 index 000000000..97d91f254 --- /dev/null +++ b/app/javascript/widget/components/ArticleCategoryCard.vue @@ -0,0 +1,42 @@ + + + + diff --git a/app/javascript/widget/components/ArticleHero.vue b/app/javascript/widget/components/ArticleHero.vue new file mode 100644 index 000000000..6345b05f6 --- /dev/null +++ b/app/javascript/widget/components/ArticleHero.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/app/javascript/widget/components/ArticleList.vue b/app/javascript/widget/components/ArticleList.vue new file mode 100644 index 000000000..00612b50d --- /dev/null +++ b/app/javascript/widget/components/ArticleList.vue @@ -0,0 +1,34 @@ + + diff --git a/app/javascript/widget/components/ArticleListItem.vue b/app/javascript/widget/components/ArticleListItem.vue new file mode 100644 index 000000000..3e68552a3 --- /dev/null +++ b/app/javascript/widget/components/ArticleListItem.vue @@ -0,0 +1,37 @@ + + diff --git a/app/javascript/widget/components/ArticleSearch.vue b/app/javascript/widget/components/ArticleSearch.vue new file mode 100644 index 000000000..8ce663321 --- /dev/null +++ b/app/javascript/widget/components/ArticleSearch.vue @@ -0,0 +1,51 @@ + + + diff --git a/app/javascript/widget/components/SearchArticle.vue b/app/javascript/widget/components/SearchArticle.vue new file mode 100644 index 000000000..df38af763 --- /dev/null +++ b/app/javascript/widget/components/SearchArticle.vue @@ -0,0 +1,51 @@ + + + diff --git a/app/javascript/widget/components/stories/ArticleHero.stories.js b/app/javascript/widget/components/stories/ArticleHero.stories.js new file mode 100644 index 000000000..354eeaf2d --- /dev/null +++ b/app/javascript/widget/components/stories/ArticleHero.stories.js @@ -0,0 +1,30 @@ +import { action } from '@storybook/addon-actions'; +import ArticleHero from '../ArticleHero.vue'; // adjust this path to match your file's location + +export default { + title: 'Components/Widgets/ArticleHero', + component: ArticleHero, + argTypes: { + articles: { control: 'array', description: 'Array of articles' }, + }, +}; + +const Template = (args, { argTypes }) => ({ + props: Object.keys(argTypes), + components: { ArticleHero }, + template: + '', + methods: { + viewAllArticles: action('view-all-articles'), + }, +}); + +export const Default = Template.bind({}); +Default.args = { + articles: [ + { title: 'Article 1', content: 'This is article 1.' }, + { title: 'Article 2', content: 'This is article 2.' }, + { title: 'Article 3', content: 'This is article 3.' }, + { title: 'Article 4', content: 'This is article 4.' }, + ], +}; diff --git a/app/javascript/widget/i18n/locale/en.json b/app/javascript/widget/i18n/locale/en.json index 67843ddda..e5fb85643 100644 --- a/app/javascript/widget/i18n/locale/en.json +++ b/app/javascript/widget/i18n/locale/en.json @@ -105,5 +105,9 @@ "CLICK_HERE_TO_JOIN": "Click here to join", "LEAVE_THE_ROOM": "Leave the call" } + }, + "PORTAL": { + "POPULAR_ARTICLES": "Popular Articles", + "VIEW_ALL_ARTICLES": "View all articles" } }