Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Improve features page

Smaug6739b9e95451a8f3
diff --git a/frontend/app/components/AppAccordion.vue b/frontend/app/components/AppAccordion.vue
new file mode 100644
index 00000000..1f4d0186
--- /dev/null
+++ b/frontend/app/components/AppAccordion.vue
@@ -0,0 +1,198 @@
+<template>
+ <div class="accordion-item" :class="{ open: isOpen, disabled }">
+ <button
+ class="accordion-trigger"
+ type="button"
+ :aria-expanded="isOpen ? 'true' : 'false'"
+ :aria-controls="contentId"
+ :id="triggerId"
+ :disabled="disabled"
+ @click="onToggle"
+ @keydown.enter.prevent="onToggle"
+ @keydown.space.prevent="onToggle"
+ >
+ <span class="accordion-title">{{ summary }}</span>
+ <svg class="chevron" viewBox="0 0 24 24" aria-hidden="true">
+ <path d="M7 10l5 5 5-5" />
+ </svg>
+ </button>
+
+ <transition name="accordion-expand" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave">
+ <div v-show="isOpen" class="accordion-content-wrapper" :id="contentId" role="region" :aria-labelledby="triggerId" ref="contentEl">
+ <div class="accordion-content">
+ <slot />
+ </div>
+ </div>
+ </transition>
+ </div>
+</template>
+
+<script setup lang="ts">
+const props = withDefaults(defineProps<{ summary: string; modelValue?: boolean; open?: boolean; disabled?: boolean }>(), {
+ modelValue: undefined,
+ open: undefined,
+ disabled: false,
+});
+
+const emit = defineEmits<{ (e: 'update:modelValue', value: boolean): void; (e: 'toggle', value: boolean): void }>();
+
+const uuid = Math.random().toString(36).slice(2);
+const triggerId = `acc-trigger-${uuid}`;
+const contentId = `acc-content-${uuid}`;
+
+const internalOpen = ref<boolean>(false);
+const isControlled = computed(() => props.modelValue !== undefined || props.open !== undefined);
+const isOpen = computed<boolean>(() => (props.modelValue ?? props.open ?? internalOpen.value) as boolean);
+
+const contentEl = ref<HTMLDivElement | null>(null);
+
+function onToggle() {
+ const next = !isOpen.value;
+ if (isControlled.value) {
+ emit('update:modelValue', next);
+ emit('toggle', next);
+ } else {
+ internalOpen.value = next;
+ emit('toggle', next);
+ emit('update:modelValue', next);
+ }
+}
+
+function onEnter(el: Element) {
+ const elDiv = el as HTMLDivElement;
+ elDiv.style.maxHeight = '0px';
+ elDiv.style.opacity = '0';
+ requestAnimationFrame(() => {
+ const scrollH = elDiv.scrollHeight;
+ elDiv.style.maxHeight = `${scrollH}px`;
+ elDiv.style.opacity = '1';
+ });
+}
+
+function onAfterEnter(el: Element) {
+ const elDiv = el as HTMLDivElement;
+ elDiv.style.maxHeight = 'none';
+}
+
+function onLeave(el: Element) {
+ const elDiv = el as HTMLDivElement;
+ const height = elDiv.scrollHeight;
+ elDiv.style.maxHeight = `${height}px`;
+ // Force reflow to ensure the transition starts from current height
+ void elDiv.offsetHeight;
+ elDiv.style.maxHeight = '0px';
+ elDiv.style.opacity = '0';
+}
+</script>
+
+<style scoped lang="scss">
+.accordion-item {
+ background: #fff;
+ border: 1px solid #e5e7eb;
+ border-radius: 12px;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
+ transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
+ overflow: hidden;
+
+ &.open {
+ border-color: var(--primary);
+ }
+
+ &.disabled {
+ opacity: 0.6;
+ pointer-events: none;
+ }
+}
+
+.accordion-trigger {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.75rem;
+ padding: 1.1rem 1.4rem;
+ background: transparent;
+ border: 0;
+ cursor: pointer;
+ text-align: left;
+
+ &:focus-visible {
+ outline: 2px solid var(--primary);
+ outline-offset: 2px;
+ border-radius: 10px;
+ }
+}
+
+.accordion-title {
+ font-size: 1.05rem;
+ color: var(--font-color, #111);
+}
+
+.chevron {
+ width: 20px;
+ height: 20px;
+ stroke: #444;
+ stroke-width: 2;
+ fill: none;
+ transition: transform 0.3s ease, stroke 0.3s ease;
+}
+
+.open .chevron {
+ transform: rotate(180deg);
+ stroke: var(--primary);
+}
+
+.accordion-content-wrapper {
+ overflow: hidden;
+}
+
+.accordion-content {
+ padding: 0 1.4rem 1.1rem 1.4rem;
+ color: #555;
+ line-height: 1.6;
+ background: #fafafa;
+ border-top: 1px solid #eee;
+}
+
+.accordion-expand-enter-active,
+.accordion-expand-leave-active {
+ transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
+}
+
+.accordion-expand-enter-from,
+.accordion-expand-leave-to {
+ opacity: 0;
+ max-height: 0;
+}
+
+@media (min-width: 768px) {
+ .accordion-title {
+ font-size: 1.1rem;
+ }
+
+ .accordion-trigger {
+ padding: 1.2rem 1.6rem;
+ }
+
+ .accordion-content {
+ padding: 0 1.6rem 1.2rem 1.6rem;
+ }
+}
+</style>
+
+<!--
+Usage example:
+
+<app-accordion v-model="open" summary="Is it open-source?">
+ Yes, Alexandrie is 100% open-source and MIT licensed.
+ You can also place any HTML here.
+ <br />
+ <a href="#">Learn more</a>
+
+</app-accordion>
+
+Also supports controlled open prop:
+<app-accordion :open="someBool" @update:modelValue="val => (someBool = val)" summary="Question">
+ Answer
+</app-accordion>
+-->
diff --git a/frontend/app/pages/(public)/_components/features/FeaturesFAQ.vue b/frontend/app/pages/(public)/_components/features/FeaturesFAQ.vue
index fa32cd10..cc97b7a6 100644
--- a/frontend/app/pages/(public)/_components/features/FeaturesFAQ.vue
+++ b/frontend/app/pages/(public)/_components/features/FeaturesFAQ.vue
@@ -1,29 +1,17 @@
<template>
<section class="faq">
- <h2>FAQ</h2>
+ <h2 class="title">Frequently asked questions</h2>
+ <p class="subtitle">Everything you need to know about using Alexandrie.</p>
<div class="faq-list">
- <div v-for="(f, i) in faqs" :key="i" class="faq-item" :class="{ open: openIndex === i }" @click="toggle(i)">
- <div class="faq-question">
- <h3>{{ f.q }}</h3>
- <svg class="arrow" viewBox="0 0 24 24">
- <path d="M7 10l5 5 5-5" />
- </svg>
- </div>
- <transition name="expand">
- <div v-if="openIndex === i" class="faq-answer">
- <p>{{ f.a }}</p>
- </div>
- </transition>
- </div>
+ <app-accordion v-for="(f, i) in faqs" :key="i" :summary="f.q" :open="openIndex === i" @update:modelValue="val => (openIndex = val ? i : null)">
+ <p>{{ f.a }}</p>
+ </app-accordion>
</div>
</section>
</template>
<script setup lang="ts">
const openIndex = ref<number | null>(null);
-function toggle(i: number) {
- openIndex.value = openIndex.value === i ? null : i;
-}
const faqs = [
{ q: 'Is it open-source?', a: 'Yes, Alexandrie is 100% open-source and MIT licensed.' },
@@ -35,96 +23,28 @@ const faqs = [
<style scoped lang="scss">
.faq {
- padding: 6rem 2rem;
- max-width: 800px;
+ padding: 3rem 2rem;
+ max-width: 900px;
margin: 0 auto;
text-align: center;
- h2 {
- font-size: 2.2rem;
- margin-bottom: 2rem;
- color: #222;
+ .title {
+ font-size: 2rem;
+ margin: 0 0 0.25rem;
+ color: var(--font-color-dark, #0f172a);
}
-}
-
-.faq-list {
- display: flex;
- flex-direction: column;
- gap: 1rem;
-}
-.faq-item {
- background: #fff;
- border: 1px solid #e5e7eb;
- border-radius: 12px;
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
- overflow: hidden;
- transition: box-shadow 0.25s ease, border-color 0.25s ease;
- cursor: pointer;
-
- &:hover {
- border-color: #d0d6f9;
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
- }
-
- &.open {
- border-color: var(--primary);
+ .subtitle {
+ color: var(--font-color-light, #64748b);
+ margin: 0 0 1.25rem;
}
}
-.faq-question {
+.faq-list {
display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 1.3rem 1.6rem;
- transition: background 0.3s ease;
-
- h3 {
- margin: 0;
- font-size: 1.1rem;
- color: #111;
- }
-
- .arrow {
- width: 20px;
- height: 20px;
- stroke: #444;
- stroke-width: 2;
- fill: none;
- transition: transform 0.3s ease;
- }
-
- .faq-item.open & .arrow {
- transform: rotate(180deg);
- stroke: var(--primary);
- }
-}
-
-.faq-answer {
- padding: 0 1.6rem 1.2rem 1.6rem;
- color: #555;
- line-height: 1.6;
- background: #fafafa;
- border-top: 1px solid #eee;
-}
-
-.expand-enter-active,
-.expand-leave-active {
- transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
- overflow: hidden;
-}
-
-.expand-enter-from,
-.expand-leave-to {
- opacity: 0;
- max-height: 0;
- transform: translateY(-8px);
+ flex-direction: column;
+ gap: 0.75rem;
}
-.expand-enter-to,
-.expand-leave-from {
- opacity: 1;
- max-height: 400px;
- transform: translateY(0);
-}
+/* Styles for old inline accordion removed in favor of <app-accordion> */
</style>
diff --git a/frontend/app/pages/(public)/_components/features/FeaturesTimeline.vue b/frontend/app/pages/(public)/_components/features/FeaturesTimeline.vue
index d70fa06f..1a5c36a9 100644
--- a/frontend/app/pages/(public)/_components/features/FeaturesTimeline.vue
+++ b/frontend/app/pages/(public)/_components/features/FeaturesTimeline.vue
@@ -117,7 +117,7 @@ section {
.timeline {
position: relative;
- max-width: 1100px;
+ max-width: 1500px;
margin: 0 auto;
padding: 2rem 0;
@@ -181,7 +181,7 @@ section {
img {
width: 100%;
- max-width: 480px;
+ max-width: 800px;
border-radius: 16px;
border: 1px solid #e5e7eb;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);