Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yoyurec/logseq-awesome-ui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.1
Choose a base ref
...
head repository: yoyurec/logseq-awesome-ui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.2
Choose a head ref
  • 2 commits
  • 6 files changed
  • 2 contributors

Commits on Oct 13, 2023

  1. fix(search): width

    yoyurec committed Oct 13, 2023
    Copy the full SHA
    5eea7e7 View commit details
  2. chore(release): 2.3.2 [skip ci]

    ## [2.3.2](v2.3.1...v2.3.2) (2023-10-13)
    
    ### Bug Fixes
    
    * **search:** width ([5eea7e7](5eea7e7))
    semantic-release-bot committed Oct 13, 2023
    Copy the full SHA
    27e43d6 View commit details
Showing with 35 additions and 16 deletions.
  1. +7 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +0 −2 src/modules/header/headerVariant.ts
  4. +23 −10 src/modules/header/navigationPosition.ts
  5. +2 −1 src/modules/header/searchWide.css
  6. +2 −2 src/plugin/plugin.ts
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [2.3.2](https://github.com/yoyurec/logseq-awesome-ui/compare/v2.3.1...v2.3.2) (2023-10-13)


### Bug Fixes

* **search:** width ([5eea7e7](https://github.com/yoyurec/logseq-awesome-ui/commit/5eea7e76f102278fc8a34d31c50c71d6cd51f588))

## [2.3.1](https://github.com/yoyurec/logseq-awesome-ui/compare/v2.3.0...v2.3.1) (2023-10-05)


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "logseq-awesome-ui",
"description": "Reworked, simplified, fixed and pumped-up Logseq! Layout, components, etc...",
"version": "2.3.1",
"version": "2.3.2",
"author": "yoyurec <yoyurec@gmail.com>",
"main": "dist/index.html",
"scripts": {
2 changes: 0 additions & 2 deletions src/modules/header/headerVariant.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { doc, body, globals } from '../globals/globals';

import headerWideCSS from './headerWide.css?inline';
// import headerCompactCSS from './headerCompact.css?inline';

export const headerLoad = () => {
// moveHead();
headerVariantToggle();
}

33 changes: 23 additions & 10 deletions src/modules/header/navigationPosition.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,45 @@
import { doc, globals } from '../globals/globals';

let navPanel: HTMLElement;

export const navigationPositionLoad = () => {
navPanel = doc.querySelector('.r .flex.flex-row') as HTMLElement;
navigationPositionToggle();
}

export const navigationPositionToggle = () => {
switch (globals.pluginConfig.navigationPosition) {
case 'Left':
moveNavigationButtons();
leftNavigationButtons();
break;
// case 'Center':
// centerNavigationButtons();
// break;
case 'Standard':
navigationPositionUnload();
standardNavigationButtons();
break;
}
}

export const navigationPositionUnload = () => {
moveNavigationButtonsBack();
standardNavigationButtons();
}

const moveNavigationButtons = () => {
const navPanel = doc.querySelector('.r .flex.flex-row') as HTMLElement;
const leftNavigationButtons = () => {
const leftSidebarToggler = doc.querySelector('#head .l')?.firstElementChild;
if (leftSidebarToggler) {
leftSidebarToggler.insertAdjacentElement('afterend', navPanel);
}
}

const moveNavigationButtonsBack = () => {
const navPanel = doc.querySelector('.l .flex.flex-row') as HTMLElement;
const menuToggler = doc.querySelector('#head .r > .ui__dropdown-trigger');
if (menuToggler) {
menuToggler.insertAdjacentElement('beforebegin', navPanel);
// const centerNavigationButtons = () => {
// }

const standardNavigationButtons = () => {
const rightDotsMenuToggler = doc.querySelector('#head .r > .ui__dropdown-trigger');
if (rightDotsMenuToggler) {
rightDotsMenuToggler.insertAdjacentElement('beforebegin', navPanel);
}
}


3 changes: 2 additions & 1 deletion src/modules/header/searchWide.css
Original file line number Diff line number Diff line change
@@ -57,10 +57,11 @@
}
@media (min-width: 1400px) {
.ui__modal-panel .panel-content .ls-search {
width: calc(var(--ls-main-content-max-width-wide) - var(--ls-left-sidebar-width));
width: calc(var(--ls-main-content-max-width) + var(--ls-left-sidebar-width));
}
}
.ls-search .input-wrap {
position: relative;
height: 32px;
}
.ls-search .input-wrap::before {
4 changes: 2 additions & 2 deletions src/plugin/plugin.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { headerLoad, headerUnload } from '../modules/header/headerVariant';
import { searchStyleToggle, searchStyleUnload } from '../modules/header/searchStyle';
import { rightSidebarLoad, rightSidebarUnload } from '../modules/sidebars/sidebars';
import { tabsPositionToggle, tabsPositionUnload } from '../modules/extPlugins/tabs/tabsPosition';
import { navigationPositionToggle, navigationPositionUnload } from '../modules/header/navigationPosition';
import { navigationPositionLoad, navigationPositionUnload } from '../modules/header/navigationPosition';
import { setTabsCSSVarsStyles, tabsStyleToggle, tabsStyleUnload } from '../modules/extPlugins/tabs/tabsStyle';
import { compactSidebarMenuToggle, compactSidebarMenuUnload } from '../modules/sidebars/compactSidebarMenu/compactSidebarMenu';
import { hideRightSidebarToolbarToggle, hideRightSidebarToolbarUnload } from '../modules/sidebars/hideRightSidebarToolbar/hideRightSidebarToolbar';
@@ -73,7 +73,7 @@ const runStuff = () => {
hideRightSidebarToolbarToggle();
menuCalendarToggle();
headerLoad();
navigationPositionToggle();
navigationPositionLoad();
searchStyleToggle();
tabsPositionToggle();
tabsStyleToggle();