Skip to content

Commit

Permalink
V1
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat-meoww committed Dec 11, 2022
1 parent aa5d79f commit a8f527d
Show file tree
Hide file tree
Showing 8 changed files with 300 additions and 203 deletions.
261 changes: 195 additions & 66 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
"devDependencies": {
"@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "next",
"@tailwindcss/typography": "^0.5.8",
"autoprefixer": "^10.4.13",
"daisyui": "^2.40.1",
"flatted": "^3.2.7",
"json5": "^2.2.1",
"mongodb": "^4.11.0",
"postcss": "^8.4.19",
"postcss-load-config": "^4.0.1",
Expand All @@ -21,10 +24,6 @@
},
"type": "module",
"dependencies": {
"@tailwindcss/typography": "^0.5.8",
"flatted": "^3.2.7",
"json5": "^2.2.1",
"remixicon": "^2.5.0",
"theme-change": "^2.2.0"
"remixicon": "^2.5.0"
}
}
10 changes: 10 additions & 0 deletions src/lib/Components/Icons/Folder.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<svg
width="14"
height="14"
fill="none"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
aria-label="Folder Icon"
><path
d="M2 2a1 1 0 00-1 1v10a1 1 0 001 1h12a1 1 0 001-1V5a1 1 0 00-1-1H8a1 1 0 01-1-1 1 1 0 00-1-1H2z"
fill="currentColor" /></svg>
17 changes: 7 additions & 10 deletions src/lib/Components/Navbar/CollectionBar.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<script>
import {
sidebar
} from "$Components/stores.js";
import { sidebar } from "$Components/stores.js";
import Folder from "$Components/Icons/Folder.svelte";
//event dispather
import {
createEventDispatcher
} from "svelte";
import { createEventDispatcher } from "svelte";
import Bin from "$Components/Page/Database/Icons/Bin.svelte";
const dispatch = createEventDispatcher();
export let collection;
Expand Down Expand Up @@ -57,11 +54,11 @@
class="flex gap-1 hover:bg-base-300 justify-center items-center"
class:active={status}>
<span class="h-5 w-5" />
<span class="h-5 w-5 flex justify-center"
><i class="ri-folder-fill" /></span>
<span class="h-5 w-5 flex justify-center items-center"><Folder /></span>
<span class="flex-1 capitalize">{collection}</span>
{#if hovering.state}
<button on:click|stopPropagation={hovering.dropCollection}
<button
on:click|stopPropagation={hovering.dropCollection}
class="flex-0 flex justify-center items-center w-5 h-5 capitalize hover:bg-mongo-card-btnborder rounded-full transition-colors duration-100 hover:fill-mongo-white fill-white">
<span class="" title="Drop Collection"><Bin /></span></button>
{/if}
Expand All @@ -73,4 +70,4 @@
.active {
background-color: #575b5c;
}
</style>
</style>
93 changes: 58 additions & 35 deletions src/lib/Components/Navbar/Topnav.svelte
Original file line number Diff line number Diff line change
@@ -1,41 +1,64 @@
<script>
import {
PUBLIC_APP_VERSION,
PUBLIC_APPNAME_PREFIX,
PUBLIC_APPNAME_SUFFIX,
} from "$env/static/public";
import ChangeTheme from "../Themes/ChangeTheme.svelte";
import {
PUBLIC_APP_VERSION,
PUBLIC_APPNAME_PREFIX,
PUBLIC_APPNAME_SUFFIX,
} from "$env/static/public";
import Github from "../Themes/Github.svelte";
</script>

<div class="
<div
class="
sticky top-0 z-30 flex h-16 w-full justify-center bg-opacity-90 backdrop-blur transition-all duration-100
bg-base-100 text-base-content
">
<nav class="navbar w-full">
<div class="flex flex-1 md:gap-1 lg:gap-2">
<span class="tooltip tooltip-bottom before:text-xs before:content-[attr(data-tip)]" data-tip="Menu"><label
for="drawer" class="btn btn-square btn-ghost drawer-button lg:hidden"><svg width="20" height="20"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
class="inline-block h-5 w-5 stroke-current md:h-6 md:w-6">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 6h16M4 12h16M4 18h16" />
</svg></label></span>
<div class="flex items-center gap-2 lg:hidden">
<a href="/" aria-current="page" aria-label="Homepage" class="flex-0 btn btn-ghost px-2 ">
<div class="font-title text-primary inline-flex text-lg transition-all duration-200 md:text-3xl">
<span class="lowercase text-primary">{PUBLIC_APPNAME_PREFIX}</span>
<span class="uppercase text-base-content">{PUBLIC_APPNAME_SUFFIX}</span>
</div>
</a>
<a href="/docs/changelog" class="link link-hover font-mono text-xs text-opacity-50 ">
<div data-tip="Changelog" class="tooltip tooltip-bottom">
{PUBLIC_APP_VERSION}
</div>
</a>
</div>
</div>
<div class="flex-0">
<ChangeTheme />
</div>
</nav>
</div>
<nav class="navbar w-full">
<div class="flex flex-1 md:gap-1 lg:gap-2">
<span
class="tooltip tooltip-bottom before:text-xs before:content-[attr(data-tip)]"
data-tip="Menu"
><label
for="drawer"
class="btn btn-square btn-ghost drawer-button lg:hidden"
><svg
width="20"
height="20"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="inline-block h-5 w-5 stroke-current md:h-6 md:w-6">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 6h16M4 12h16M4 18h16" />
</svg></label
></span>
<div class="flex items-center gap-2 lg:hidden">
<a
href="/"
aria-current="page"
aria-label="Homepage"
class="flex-0 btn btn-ghost px-2 ">
<div
class="font-title text-primary inline-flex text-lg transition-all duration-200 md:text-3xl">
<span class="lowercase text-primary">{PUBLIC_APPNAME_PREFIX}</span>
<span class="uppercase text-base-content"
>{PUBLIC_APPNAME_SUFFIX}</span>
</div>
</a>
<a
href="/docs/changelog"
class="link link-hover font-mono text-xs text-opacity-50 ">
<div data-tip="Changelog" class="tooltip tooltip-bottom">
{PUBLIC_APP_VERSION}
</div>
</a>
</div>
</div>
<div class="flex-0">
<Github />
<!-- <ChangeTheme /> -->
</div>
</nav>
</div>
4 changes: 2 additions & 2 deletions src/lib/Components/Themes/ChangeTheme.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script>
import { onMount } from "svelte";
import { themeChange } from "theme-change";
//import { themeChange } from "theme-change";
// NOTE: the element that is using one of the theme attributes must be in the DOM on mount
onMount(() => {
themeChange(false);
//themeChange(false);
// 👆 false parameter is required for svelte
});
let themes = [
Expand Down
24 changes: 24 additions & 0 deletions src/lib/Components/Themes/Github.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script>
let href = "https://github.com/Cat-meoww/";
</script>

<span
class="tooltip tooltip-bottom before:text-xs before:content-[attr(data-tip)]"
data-tip="GitHub"
><div class="flex-none items-center">
<a
aria-label="Github"
target="_blank"
{href}
rel="noreferrer"
class="btn btn-ghost drawer-button btn-square normal-case"
><svg
width="20"
height="20"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
class="inline-block h-5 w-5 fill-current md:h-6 md:w-6"
><path
d="M256,32C132.3,32,32,134.9,32,261.7c0,101.5,64.2,187.5,153.2,217.9a17.56,17.56,0,0,0,3.8.4c8.3,0,11.5-6.1,11.5-11.4,0-5.5-.2-19.9-.3-39.1a102.4,102.4,0,0,1-22.6,2.7c-43.1,0-52.9-33.5-52.9-33.5-10.2-26.5-24.9-33.6-24.9-33.6-19.5-13.7-.1-14.1,1.4-14.1h.1c22.5,2,34.3,23.8,34.3,23.8,11.2,19.6,26.2,25.1,39.6,25.1a63,63,0,0,0,25.6-6c2-14.8,7.8-24.9,14.2-30.7-49.7-5.8-102-25.5-102-113.5,0-25.1,8.7-45.6,23-61.6-2.3-5.8-10-29.2,2.2-60.8a18.64,18.64,0,0,1,5-.5c8.1,0,26.4,3.1,56.6,24.1a208.21,208.21,0,0,1,112.2,0c30.2-21,48.5-24.1,56.6-24.1a18.64,18.64,0,0,1,5,.5c12.2,31.6,4.5,55,2.2,60.8,14.3,16.1,23,36.6,23,61.6,0,88.2-52.4,107.6-102.3,113.3,8,7.1,15.2,21.1,15.2,42.5,0,30.7-.3,55.5-.3,63,0,5.4,3.1,11.5,11.4,11.5a19.35,19.35,0,0,0,4-.4C415.9,449.2,480,363.1,480,261.7,480,134.9,379.7,32,256,32Z" /></svg
></a>
</div></span>
85 changes: 0 additions & 85 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,89 +15,4 @@ const config = {
},
};


export default config;

let ok = {
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection":
"automaticallyOverrodeDefaultValue",
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true,
},
"editor.fontSize": 20,
"editor.formatOnPaste": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"workbench.colorTheme": "Material Theme Darker High Contrast",
"git.autofetch": true,
"liveServer.settings.useBrowserPreview": false,
"liveServer.settings.ChromeDebuggingAttachment": false,
"liveServer.settings.fullReload": false,
"liveServer.settings.CustomBrowser": "chrome",
"liveServer.settings.donotShowInfoMsg": true,
"java.jdt.ls.java.home": "C:\\Program Files\\Java\\jdk1.8.0_261",
"php.validate.executablePath": "C:/xampp/php/php.exe",
"liveServer.settings.donotVerifyTags": true,
"liveServer.settings.useLocalIp": false,
"liveServer.settings.useWebExt": false,
"markdown.preview.breaks": true,
"markdown.preview.doubleClickToSwitchToEditor": false,
"debug.console.fontSize": 24,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.fontLigatures": true,
"editor.formatOnSave": true,
miDebuggerPath: "C:\\MinGW\\bin\\gcc.exe",
"[json]": {
"editor.quickSuggestions": {
strings: true,
},
"editor.suggest.insertMode": "replace",
"editor.defaultFormatter": "HookyQR.beautify",
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.suggest.insertMode": "replace",
"diffEditor.codeLens": false,
"emmet.triggerExpansionOnTab": false,
},
"explorer.confirmDelete": false,
"security.workspace.trust.untrustedFiles": "open",
"liveServer.settings.NoBrowser": false,
"liveServer.settings.port": 5500,
"[php]": {
"editor.quickSuggestions": {
strings: true,
},
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client",
"editor.suggest.insertMode": "replace",
},
"cmake.configureOnOpen": true,
"explorer.confirmDragAndDrop": false,
"workbench.startupEditor": "none",
"editor.bracketPairColorization.enabled": false,
"beautify.ignore": "",
"beautify.language": {
js: {
type: ["javascript", "json", "jsonc", "js"],
filename: [".jshintrc", ".jsbeautifyrc"],
},
css: ["css", "less", "scss"],
html: ["htm", "html", "svelte"],
},
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.suggest.insertMode": "replace",
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"svelte.enable-ts-plugin": true,
"diffEditor.ignoreTrimWhitespace": false,
"svelte.plugin.svelte.note-new-transformation": false,
"window.zoomLevel": -1,
"files.autoSave": "afterDelay",
};

0 comments on commit a8f527d

Please sign in to comment.