Fix Explore sidebar

This commit is contained in:
SHAcollision
2024-10-22 03:42:06 +02:00
parent 5d853253ca
commit c301f00018
62 changed files with 114 additions and 127 deletions

View File

@@ -13,11 +13,22 @@
"state": {
"type": "image",
"state": {
"file": "images/pubky-arch.png"
"file": "Explore/images/pubky-arch.png"
}
}
},
{
"id": "697b4658292e14ce",
"type": "leaf",
"state": {
"type": "release-notes",
"state": {
"currentVersion": "1.6.7"
}
}
}
]
],
"currentTab": 1
}
],
"direction": "vertical"
@@ -83,7 +94,7 @@
"state": {
"type": "backlink",
"state": {
"file": "images/pubky-arch.png",
"file": "Explore/images/pubky-arch.png",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@@ -100,7 +111,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "images/pubky-arch.png",
"file": "Explore/images/pubky-arch.png",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
@@ -123,7 +134,7 @@
"state": {
"type": "outline",
"state": {
"file": "images/pubky-arch.png"
"file": "Explore/images/pubky-arch.png"
}
}
}
@@ -147,51 +158,51 @@
},
"active": "75a1317f66991245",
"lastOpenFiles": [
"images/pubky-core.png_original",
"images/pubky-core.png_exiftool_tmp",
"images/pubky-backend.png_exiftool_tmp",
"images/pubky-arch.png_original",
"images/pubky-arch.png_exiftool_tmp",
"images/pubky-app.png_exiftool_tmp",
"images/pubky-header.png",
"images/pubky-core.png",
"images/pubky-backend.png",
"images/pubky-arch.png",
"images/pubky-app.png",
"images/client-homeserver.png",
"Technologies/DNS.md",
"Concepts/Credible Exit.md",
"quartz/public/404.html",
"quartz/public/static/pubky-core-logo.svg",
"quartz/public/static/pubky-core-logo.png",
"quartz/public/static/og-image.png",
"quartz/public/static/icon.png",
"quartz/public/static/contentIndex.json",
"quartz/public/static/bg.png",
"quartz/public/static/bg-3.png",
"quartz/public/static/bg-2.png",
"quartz/public/static",
"quartz/public/index.xml",
"quartz/public/sitemap.xml",
"quartz/public/tags/segwit.html",
"quartz/public/tags/privacy.html",
"quartz/public/tags/index.html",
"quartz/public/tags/Pubky.html",
"quartz/public/tags",
"quartz/public/readme.html",
"quartz/public/quartz/quartz/static/pubky-core-logo.svg",
"quartz/public/quartz/quartz/static/pubky-core-logo.png",
"quartz/public/quartz/quartz/static/og-image.png",
"Explore/Technologies/DNS.md",
"Explore/Concepts/Credible Exit.md",
"The vision of Pubky.md",
"Pubky App/Introduction.md",
"Pubky Core/Introduction.md",
"Explore/Pubky App/Introduction.md",
"Explore/Pubky Core/Introduction.md",
"index.md",
"Pubky Core/Homeservers.md",
"Pubky Core/Pkarr/ELI5.md",
"Technologies/DoH.md",
"Pubky Core/Pkarr/4.Architecture.md",
"Pubky Core/Pkarr/3.Expectations.md",
"Explore/Pubky Core/Homeservers.md",
"Explore/Pubky Core/Pkarr/ELI5.md",
"Explore/Technologies/DoH.md",
"Explore/Pubky Core/Pkarr/4.Architecture.md",
"Explore/Pubky Core/Pkarr/3.Expectations.md",
"Pubky Core/Pkarr/1.Why PKARR?.md",
"Pubky Core/Pkarr/2.Getting Started with PKARR.md",
"Pubky Core/Pkarr/0.Introduction.md",
"quartz/public/404.html",
"quartz/public/quartz/quartz/plugins/transformers/toc.ts",
"quartz/public/quartz/quartz/plugins/transformers/syntax.ts",
"quartz/public/quartz/quartz/plugins/transformers/oxhugofm.ts",
"quartz/public/quartz/quartz/plugins/transformers/ofm.ts",
"quartz/public/quartz/quartz/static/og-image.png",
"quartz/public/quartz/quartz/static/icon.png",
"quartz/public/images/mermaid_charts/semantic_social_graph.svg",
"quartz/public/images/pubky-header.png",
"Pubky Core/ELI5.md",
"Technologies/DHT.md",
"Pubky App/Backend/Introduction.md",
"Pubky App/Client/Introduction.md",
"Pubky App/Backend/Web Server.md",
"Pubky App/Backend/Indexer.md",
"Pubky App/Backend/Aggregator.md",
"Pubky App/App Architectures/4. Custom Backend.md",
"Pubky App/App Architectures/3. Global Aggregators.md",
"Pubky App/App Architectures/2. Client - Homeserver.md",
"Pubky App/App Architectures/1. Introduction.md"
"Explore/Pubky Core/Pkarr/0.Introduction.md",
"Explore/Pubky Core/ELI5.md",
"Explore/Technologies/DHT.md",
"Explore/Pubky App/Backend/Introduction.md",
"Explore/Pubky App/Client/Introduction.md",
"Explore/Pubky App/Backend/Web Server.md",
"Explore/Pubky App/Backend/Indexer.md",
"Explore/Pubky App/Backend/Aggregator.md",
"Explore/Pubky App/App Architectures/4. Custom Backend.md",
"Explore/Pubky App/App Architectures/3. Global Aggregators.md",
"Explore/Pubky App/App Architectures/2. Client - Homeserver.md",
"Explore/Pubky App/App Architectures/1. Introduction.md"
]
}

View File

@@ -22,7 +22,7 @@ In **Pubky**, a decentralized Semantic Social Graph is central to providing a mo
This diagram shows how a Semantic Social Graph works, representing users, content, and tags. Users tag content and peers, which adds context and helps determine how information flows through the network. Relationships are weighted (Pubky weighting features are under development), meaning users can specify trust levels and the strength of connections to further personalize their experience.
![Semantic Social graph](../images/mermaid_charts/semantic_social_graph.svg)
![Semantic Social graph](Explore/images/mermaid_charts/semantic_social_graph.svg)
**Tags and Contextual Meaning**: Pubky allows users to add tags to content and connections, giving them the ability to add context to their relationships. This means users can easily categorize and prioritize content based on what matters to them most.

View File

@@ -1,5 +1,5 @@
![Semantic Social graph](../images/mermaid_charts/semantic_social_graph.svg)
![Semantic Social graph](Explore/images/mermaid_charts/semantic_social_graph.svg)
**Semantic Relationships:** Connections between users and content are tagged with meaningful metadata, capturing the context, relevance, and nature of each relationship.
**Weighted Connections:** Relationships aren't just binary; they carry weights that represent their strength, trust level, or relevance, enabling more sophisticated interactions.

View File

@@ -0,0 +1,9 @@
Leveraging the [[Explore/Pubky Core/Introduction|Pubky Core]] protocol as the foundational layer, we can envision a diverse array of applications with distinct functionalities. While each app can implement its own unique design patterns and user interfaces, they all share a common underlying architecture: interacting with the distributed data stores, colloquially referred to as [[Homeservers|homeservers]], through standardized read and write operations.
The [[Explore/Pubky Core/Introduction|Pubky Core protocol]] enables a decentralized approach to data management, facilitating seamless communication between clients and their respective data stores. This architecture promotes data sovereignty and enhances system resilience.
Below, we present several high-level designs that showcase the versatility of this architecture, from simple client (browser) apps that interact directly with one or several [[Homeservers|homeservers]] to more complex applications with custom aggregators and backends capable of powerful inference:
- [[2. Client - Homeserver|Client-Homeserver]]
- [[4. Custom Backend|Custom backend]]
- [[3. Global Aggregators|Global aggregators]]

View File

@@ -1,4 +1,4 @@
![[client-homeserver.png]]
![[Explore/images/client-homeserver.png]]
In this architecture, we implement a direct communication model between the client application and the home server. This approach minimizes latency and reduces system complexity by establishing a direct data flow pathway.

View File

@@ -1,4 +1,4 @@
![[global_aggregator.png]]
![[Explore/images/global_aggregator.png]]
This architectural pattern implements a distributed system model centered around a global aggregation layer, eliminating the need to fetch data from a multitude (maybe thousands!) of homesevers by the client. The core component of this design is a centralized global aggregator that interfaces with multiple home servers, consuming events from each in a unified manner.

View File

@@ -1,4 +1,4 @@
![[custom_backend.png]]
![[Explore/images/custom_backend.png]]
This architectural design introduces a more sophisticated data flow model, incorporating an intermediary backend layer between the client application and the home server. This backend functions as a middleware, enhancing the system's flexibility and data processing capabilities.
@@ -16,5 +16,5 @@ b) In cases where only data normalization is necessary, the backend can bypass o
This modular approach allows for fine-grained control over data processing, enabling efficient resource utilization and optimized client-side performance based on specific application requirements.
An example of a complex backend that does aggregation, normalization, indexation, filtering (compliance) and powerful inference is [Pubky-Nexus](https://github.com/pubky/pubky-nexus), the backend that powers the [[Pubky App/Introduction|Pubky App]] social features.
An example of a complex backend that does aggregation, normalization, indexation, filtering (compliance) and powerful inference is [Pubky-Nexus](https://github.com/pubky/pubky-nexus), the backend that powers the [[Explore/Pubky App/Introduction|Pubky App]] social features.

View File

@@ -1,6 +1,6 @@
The Backend is responsible for collecting ([[Aggregator|aggregators]]) and organizing ([[Indexer|indexer]]) data from various sources, known as [[Homeservers|homeservers]].
![backend](../../images/pubky-backend.png)
![backend](Explore/images/pubky-backend.png)
Imagine you're trying to find a specific document in a large library. The backend is like a librarian who searches through the shelves, finds the right documents, and prepares them for you to use. This ensures that the data is accurate, up-to-date, and in a format that's easy to work with.
@@ -8,4 +8,4 @@ Imagine you're trying to find a specific document in a large library. The backen
- [[Aggregator|Aggregators]] execute a **data retrieval protocol** to obtain data from **data storage**, initiating a process that retrieves and collects data from various sources.
- [[Indexer|Indexers]] receive aggregated data from the **Aggregators** and initiate a rigorous **data normalization** process, transforming and converting the data into a standardized format to ensure consistency and accuracy.
- [[Web Server|Web servers]] provide the requested data to [[Pubky App/Client/Introduction|Pubky client]]
- [[Web Server|Web servers]] provide the requested data to [[Explore/Pubky App/Client/Introduction|Pubky client]]

View File

@@ -1,14 +1,14 @@
# Pubky Client
![pubkey-client](../../images/pubky-header.png)
![pubkey-client](Explore/images/pubky-header.png)
The Pubky client will be available as both a desktop application and a hosted website service (standard website) that allows users to interface with the social media layer of [[Pubky App/Backend/Introduction|Pubky Backend]] using [Synonym](https://synonym.to/) hosted services.
The Pubky client will be available as both a desktop application and a hosted website service (standard website) that allows users to interface with the social media layer of [[Explore/Pubky App/Backend/Introduction|Pubky Backend]] using [Synonym](https://synonym.to/) hosted services.
Using the library analogy again, the Pubky Client is like a personalized research assistant who takes the prepared documents from the librarian ([[Pubky App/Backend/Introduction|backend]]) and creates a customized report just for you. This report is designed to be easy to read and understand, with all the relevant information presented in a clear and concise manner.
Using the library analogy again, the Pubky Client is like a personalized research assistant who takes the prepared documents from the librarian ([[Explore/Pubky App/Backend/Introduction|backend]]) and creates a customized report just for you. This report is designed to be easy to read and understand, with all the relevant information presented in a clear and concise manner.
- Users are able to take control of the data and exit the Synonym hosted services and run their own without hampering discoverability ([[Credible Exit|credible exit]]).
- Pubky client uses the open [[Pubky Core/Introduction|Pubky Core]] for nearly all features, allowing users to avoid censorship by choosing self-hosting or alternate hosts without losing followers or integrity. 
- Pubky client uses the open [[Explore/Pubky Core/Introduction|Pubky Core]] for nearly all features, allowing users to avoid censorship by choosing self-hosting or alternate hosts without losing followers or integrity. 
- Pubky also features support for [[Paykit|paykit]], our open payment protocol for coordinating payments among peers supporting various methods. This allows users to create sub-accounts from master wallets for familiar payment experiences. This suite of features removes any requirement from [Synonym](https://synonym.to/) to custody user funds, while allowing for users to set up subscriptions, recurring payments, paywalls, etc, in a P2P way. This feature will not be in the first launch version of Pubky app, but it is worth noting that next year we will enable all users to buy and sell data in this way.

View File

@@ -1,6 +1,6 @@
![pubkey-app](../images/pubky-app.png)
![pubkey-app](Explore/images/pubky-app.png)
> Synonym will be initially hosting: [[Pubky Core/Homeservers|homeserver]] and [[Pubky App/Introduction|Pubky App]]
> Synonym will be initially hosting: [[Homeservers|homeserver]] and [[Explore/Pubky App/Introduction|Pubky App]]
## Overview
@@ -8,17 +8,17 @@ Pubky-app's initial focus is building a decentralized social media protocol.
## Key aspects
- **Data Ownership**: Users have full autonomy over their data, hosting it on **independent [[Pubky Core/Homeservers|homeservers]]** that are decentralized and distributed across the network. This approach enables users to maintain **control** and **ownership** of their data, while also ensuring **data sovereignty** and **privacy**.
- **Data Ownership**: Users have full autonomy over their data, hosting it on **independent [[Homeservers|homeservers]]** that are decentralized and distributed across the network. This approach enables users to maintain **control** and **ownership** of their data, while also ensuring **data sovereignty** and **privacy**.
- **Profiles**: The system employs a **decentralized data storage** approach, where **post**, **comment**, and **like** data are stored in association with **user profiles**.
- [[Aggregator|Aggregators]] collecting social graphs
- Feeds of followings' activities
- [[Search|Searching]] profiles and posts
- Notification delivery through [[Pubky App/Backend/Introduction|aplication backends]]
- Notification delivery through [[Explore/Pubky App/Backend/Introduction|aplication backends]]
- Distributed moderation through user blocking
## Components
The Pubky App is a complex system that can be broken down into two main components: the [[Pubky App/Backend/Introduction|backend]] and the [[Pubky App/Client/Introduction|client]]. These two pieces work together to provide a seamless user experience.
The Pubky App is a complex system that can be broken down into two main components: the [[Explore/Pubky App/Backend/Introduction|backend]] and the [[Explore/Pubky App/Client/Introduction|client]]. These two pieces work together to provide a seamless user experience.
##### Backend: The Data Organizer
@@ -30,7 +30,7 @@ It is the part of the Pubky App that you interact with directly. It's responsibl
## MVP Architecture
The early versions of Pubky app take some shortcuts over the [[Pubky Core/Introduction|Pubky Core]] design. The MVP app is centralized, therefore we saved time and complexity by aggregating functionality into fewer components. The main two components are the `Homeserver` and the `Indexer`
The early versions of Pubky app take some shortcuts over the [[Explore/Pubky Core/Introduction|Pubky Core]] design. The MVP app is centralized, therefore we saved time and complexity by aggregating functionality into fewer components. The main two components are the `Homeserver` and the `Indexer`
- The [[Homeservers|homeservers]] fulfils the function of `data stores`, republishing users keys to [[0.Introduction|PKARR]] and it acts also as an identity-provider (Oauth-like sign-in). Users maintain a trust relationship with the homeserver.
- The `Indexer` fulfils the function of the [[Pubky App/Backend/Introduction|backend]] for the Pubky App.
- The `Indexer` fulfils the function of the [[Explore/Pubky App/Backend/Introduction|backend]] for the Pubky App.

View File

@@ -17,7 +17,7 @@ Current implementations across Pubky currently only support public, unencrypted
## User Data Control and Credible Exit
- The current network is being bootstrapped by Synonym's first homeserver, which supports key accounts as a service, as well as all services required to operate the [[Pubky App/Introduction|pubky App]].
- The current network is being bootstrapped by Synonym's first homeserver, which supports key accounts as a service, as well as all services required to operate the [[Explore/Pubky App/Introduction|pubky App]].
- While Synonym is currently not charging fees for homeserving, it is totall possible for anyone to run their own homerserver and require service fees or peer-to-peer micropayments, or any other requirement, to improve data redundancy and competition.
- Synonym does not control who can join or serve data on the network, but in order to truly have a [[Credible Exit|"credible exit"]] the network will need to mature to have more providers of homeservers and Pubky applications.
- We will also need to make it as easy as possible for people to host their own homeservers, and to host homerserver clouds.

View File

@@ -1,6 +1,6 @@
## Pubky Core Overview
![pubky-core](../images/pubky-core.png)
![pubky-core](Explore/images/pubky-core.png)
Pubky Core is built on a few core concepts:
@@ -16,7 +16,7 @@ Pubky Core's distributed architecture aims to provide user autonomy through [[Cr
Pubky Core is made for developers and builders of internet software products. We will actively work to cultivate a community of builders and startups using our tech.
[[Pubky App/Introduction|Pubky App]] is made for anyone interested in social media and online publishing that wants new ways to control their data and more control over which posts they see.
[[Explore/Pubky App/Introduction|Pubky App]] is made for anyone interested in social media and online publishing that wants new ways to control their data and more control over which posts they see.
## Why? What is the reward?

View File

@@ -23,4 +23,4 @@ For more technical details on PKARR's architecture and how it works, refer to th
## Getting Started
[To start using PKARR](2.Getting%20Started%20with%20PKARR.md), you can visit the [web app demo](https://app.pkarr.org) or explore the Rust examples provided in [PKARR repository](https://github.com/Nuhvi/pkarr/).
[To start using PKARR](2.Getting%20Started%20with%20Pkarr.md), you can visit the [web app demo](https://app.pkarr.org) or explore the Rust examples provided in [PKARR repository](https://github.com/Nuhvi/pkarr/).

View File

@@ -18,4 +18,4 @@ Records are heavily cached, and updates might take some time to propagate. In ca
## Next Steps
For a deeper understanding of why [[0.Introduction|PKARR]] was created and its motivation, refer to the [[1.Why PKARR?|why PKARR?]] note.
For a deeper understanding of why [[0.Introduction|PKARR]] was created and its motivation, refer to the [[1.Why Pkarr?|why PKARR?]] note.

View File

@@ -8,7 +8,7 @@ This note is indicative and highly creative. We have not yet explored much about
**Pubky Search** - Format for full-text search indices and queries across aggregated Pubky Data. Enables cross-platform discovery.
**[Pubky Payments](Technologies/Paykit.md)** - Decentralized and interoperable payment protocol for microtransactions like tips, subscriptions and purchasing goods/services.
**[Pubky Payments](Paykit.md)** - Decentralized and interoperable payment protocol for microtransactions like tips, subscriptions and purchasing goods/services.
**Pubky Identity** - Self-sovereign digital credentials for authentication without centralized authorities like usernames/passwords.

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 391 KiB

View File

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 233 KiB

View File

Before

Width:  |  Height:  |  Size: 317 KiB

After

Width:  |  Height:  |  Size: 317 KiB

View File

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 288 KiB

View File

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 521 KiB

After

Width:  |  Height:  |  Size: 521 KiB

View File

@@ -1,9 +0,0 @@
Leveraging the [[Pubky Core/Introduction|Pubky Core]] protocol as the foundational layer, we can envision a diverse array of applications with distinct functionalities. While each app can implement its own unique design patterns and user interfaces, they all share a common underlying architecture: interacting with the distributed data stores, colloquially referred to as [[Homeservers|homeservers]], through standardized read and write operations.
The [[Pubky Core/Introduction|Pubky Core protocol]] enables a decentralized approach to data management, facilitating seamless communication between clients and their respective data stores. This architecture promotes data sovereignty and enhances system resilience.
Below, we present several high-level designs that showcase the versatility of this architecture, from simple client (browser) apps that interact directly with one or several [[Homeservers|homeservers]] to more complex applications with custom aggregators and backends capable of powerful inference:
- [[2. Client - Homeserver|Client-Homeserver]]
- [[4. Custom Backend|Custom backend]]
- [[3. Global Aggregators|Global aggregators]]

View File

@@ -1,7 +1,7 @@
### Pubky App
[[Pubky App/Introduction|Pubky App]] is an open-source web application that helps users publish and consume Pubky homeserver data within a user experience that merges the features of popular social media, search, and publishing apps.
[[Explore/Pubky App/Introduction|Pubky App]] is an open-source web application that helps users publish and consume Pubky homeserver data within a user experience that merges the features of popular social media, search, and publishing apps.
Architecture overview.
![arch](pubky-arch.png)
![arch](Explore/images/pubky-arch.png)

View File

@@ -1,17 +1,17 @@
## Welcome to the Pubky Knowledge Base
This is a knowledge base for the Pubky platform, which includes [[Pubky Core/Introduction|Pubky Core]], [[Pubky Core/Pkarr/0.Introduction|PKARR]] and [[Pubky App/Introduction|Pubky App]]. These documents are a work in progress, much like Pubky's protocols and applications!
This is a knowledge base for the Pubky platform, which includes [[Explore/Pubky Core/Introduction|Pubky Core]], [[0.Introduction|PKARR]] and [[Explore/Pubky App/Introduction|Pubky App]]. These documents are a work in progress, much like Pubky's protocols and applications!
## What is Pubky?
Pubky attempts to unlock the web by realizing our vision for a key-based, self-regulating web that puts users in control.
So far, Pubky does this by combining practical decentralized routing & identity ([[Pubky Core/Pkarr/0.Introduction|PKARR]]), with simple interoperable hosting ([[Pubky Core/Homeservers|Homeservers]]) that allow for [[Concepts/Censorship|censorship]] resistance and a [[Concepts/Credible Exit|credible exit]], as well as a publishing application, Pubky App, that facilitates the creation of a [[Concepts/Semantic Social Graph|Semantic Social Graph]], which can be used for filtering, discovery, matching and coordination.
So far, Pubky does this by combining practical decentralized routing & identity ([[0.Introduction|PKARR]]), with simple interoperable hosting ([[Homeservers|Homeservers]]) that allow for [[Censorship|censorship]] resistance and a [[Credible Exit|credible exit]], as well as a publishing application, Pubky App, that facilitates the creation of a [[Semantic Social Graph|Semantic Social Graph]], which can be used for filtering, discovery, matching and coordination.
Learn more about the overall vision here: [[The vision of Pubky|The Vision of Pubky]]
## Get Started
1. [[Pubky Core/Pkarr/0.Introduction|Getting Started with PKARR]] - If your main interest is using the most decentralized, key-based identity & routing method, start with PKARR.
2. [[Pubky Core/Introduction|Pubky Core - Introduction]] - If you want run your own Homeserver and apply PKARR, check out Pubky Core.
3. [[Pubky App/Introduction|Pubky App - Introduction]] - If you want to dig into the application, indexer, etc, start here!
1. [[0.Introduction|Getting Started with PKARR]] - If your main interest is using the most decentralized, key-based identity & routing method, start with PKARR.
2. [[Explore/Pubky Core/Introduction|Pubky Core - Introduction]] - If you want run your own Homeserver and apply PKARR, check out Pubky Core.
3. [[Explore/Pubky App/Introduction|Pubky App - Introduction]] - If you want to dig into the application, indexer, etc, start here!

View File

@@ -84,39 +84,14 @@ export default ((userOpts?: Partial<Options>) => {
constructFileTree(allFiles)
return (
<div class={classNames(displayClass, "explorer")}>
<button
<div
type="button"
id="explorer"
data-behavior={opts.folderClickBehavior}
data-collapsed={opts.folderDefaultState}
data-savestate={opts.useSavedState}
data-tree={jsonTree}
>
<h1
style={{
fontSize: "17px",
fontWeight: 600,
lineHeight: "22px",
letterSpacing: "0.4px",
}}
>
{opts.title ?? i18n(cfg.locale).components.explorer.title}
</h1>
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
height="14"
viewBox="5 8 14 8"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="fold"
>
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
/>
<div id="explorer-content">
<ul class="overflow" id="explorer-ul">
<ExplorerNode node={fileTree} opts={opts} fileData={fileData} />

View File

@@ -221,7 +221,7 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
</div>
)}
{/* Recursively render children of folder */}
<div class={`folder-outer ${node.depth === 0 || isDefaultOpen ? "open" : ""}`}>
<div class={`folder-outer ${node.depth <= 1 || isDefaultOpen ? "open" : ""}`}>
<ul
// Inline style for left folder paddings
style={{

View File

@@ -47,7 +47,7 @@ button#explorer {
overflow: hidden;
max-height: none;
transition: max-height 0.35s ease;
margin-top: 1rem;
margin-top: 0rem;
&.collapsed>.overflow::after {
opacity: 0;
@@ -57,7 +57,7 @@ button#explorer {
list-style: none;
margin: 0.08rem 0;
padding: 0;
padding-left: 25px;
padding-left: 0px;
display: flex;
flex-direction: column;
gap: 10px;
@@ -69,6 +69,7 @@ button#explorer {
max-height 0.35s ease,
transform 0.35s ease,
opacity 0.2s ease;
& li>a {
color: var(--dark);
opacity: 0.5;