From 59ff7df0b92dc4b8de05436dea56b28078d12109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Phetphoumy?= Date: Mon, 6 May 2024 14:45:53 +0000 Subject: [PATCH] First article --- app.vue | 3 + assets/css/main.css | 39 ++++- components/AppHeader.vue | 6 +- components/content/ArticleHeader.vue | 15 ++ components/content/ProseCode.vue | 30 +++- content/articles/LLM/index.md | 9 -- ...imple-chatbot-with-langchain-and-ollama.md | 139 ++++++++++++++++++ ...mple-chatbot-with-langchain-and-ollama.md} | 3 + content/articles/index.md | 2 +- ...cation-with-ollama-langchain-and-gradio.md | 44 ------ layouts/default.vue | 2 +- 11 files changed, 234 insertions(+), 58 deletions(-) create mode 100644 components/content/ArticleHeader.vue delete mode 100644 content/articles/LLM/index.md create mode 100644 content/articles/creating-a-simple-chatbot-with-langchain-and-ollama.md rename content/articles/fr/{setting-up-a-simple-rag-application-with-ollama-langchain-and-gradio.md => creating-a-simple-chatbot-with-langchain-and-ollama.md} (97%) delete mode 100644 content/articles/setting-up-a-simple-rag-application-with-ollama-langchain-and-gradio.md diff --git a/app.vue b/app.vue index 4ec1661..67eb898 100644 --- a/app.vue +++ b/app.vue @@ -6,6 +6,9 @@ +
+    {{ data }}
+    
diff --git a/assets/css/main.css b/assets/css/main.css index b889eb1..48cda5f 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -36,10 +36,31 @@ nav ul li { margin-right: 10px; } +/* Nav for mobile Hamburger */ +@media (max-width: 850px) { + nav ul { + display: flex; + flex-direction: column; + align-items: center; + } + + nav ul li { + display: block; + margin: 5px 0; + } +} + /* Main Content Area */ main { margin: 20px auto; - max-width: 800px; + max-width: 850px; +} + +/* Main for mobile */ +@media (max-width: 850px) { + main { + margin: 1.5em; + } } /* Article and Text Styling */ @@ -49,6 +70,14 @@ article { border-bottom: 1px solid #fff; } +article h1::before { + content: '.| '; +} + +article h1::after { + content: ' |.'; +} + article h3::before { content: '> '; } @@ -57,6 +86,10 @@ article h2::before { content: '// '; } +article h4::before { + content: '>> '; +} + h1 { font-size: 1.5em; } @@ -91,3 +124,7 @@ input[type="text"] { border-bottom: 2px solid #fff; animation: blink 1s step-end infinite; } + +:not(pre) > code { + color: #0BF40F; +} diff --git a/components/AppHeader.vue b/components/AppHeader.vue index bbec9c6..910837f 100644 --- a/components/AppHeader.vue +++ b/components/AppHeader.vue @@ -14,7 +14,11 @@ const props = defineProps<{ const route = useRoute(); const isActive = (href: string) => { - return route.path === href; +console.log(route); + if (href === '/') { + return route.path === '/'; + } + return route.path.includes(href); };