Skip to content

Commit

Permalink
Some style fixes, search results use routerlink
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Nov 24, 2023
1 parent 791ef38 commit c336294
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<app-container [showHeader]="true" [showSearchBar]="true">
<app-container [showHeader]="true" [showSearchBar]="true" [listSideView]='true'>
<div #container class="budgetkey-item-wrapper container-fluid" [ngClass]="'style-' + style" *ngIf='init'>
<div class='item-container'>
<app-item-budget0dig *ngIf='prefix("budget/00/")' [item]='item'></app-item-budget0dig>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,22 @@
.list {
flex: 0 0 auto;
width: 400px;
position: sticky;
left: 0;
top: 0;
max-height: 100vh;
overflow: scroll;
border-right: 1px solid #DAEAF5;
box-shadow: 0px 1px 2px 0px rgba(189, 189, 189, 0.60);
}

.main {
flex: 0 1 auto;
width: auto;
width: 100%;
display: flex;
flex-flow: column;
align-items: center;
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
background-image: url(../../../assets/lists/bg.png);
background-size: 8px;
background-repeat: repeat;
background: url(../../../assets/lists/bg.png), lightgray 0% 0% / 25px 25px repeat, #FFF;
padding-top: 64px;
padding-bottom: 56px;
display: flex;
Expand Down Expand Up @@ -93,5 +94,6 @@
flex-flow: column;
gap: 8px;
max-width: @max-width;
border-top: 2px solid #CFDDE7;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@
<div class='body-title' *ngIf='p.title'>
<app-add-to-list-icon [item]='item' *ngIf='listable'></app-add-to-list-icon>
<a [href]='href()'
[target]='bare ? "_blank" : "_self"'
[style.color]='p.primaryColor'
clickOnReturn
[attr.aria-label]='p.title + " - מעבר לעמוד הפריט"'
[target]='bare ? "_blank" : "_self"'
[style.color]='p.primaryColor'
clickOnReturn
[attr.aria-label]='p.title + " - מעבר לעמוד הפריט"'
[routerLink]='routerLink()'
[queryParams]='{li: index}'
[queryParamsHandling]='"merge"'
>
<span [innerHtml]='p.title' [title]='p.title'></span>
<div class='fadeoff'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { GlobalSettingsService } from '../../common-components/global-settings.s

import * as dayjs from 'dayjs';
import 'dayjs/locale/he';
import { DomSanitizer } from '@angular/platform-browser';
dayjs.locale('he');

type StringOrFunc = string | ((x: any) => string);
Expand Down Expand Up @@ -558,7 +559,7 @@ export class SearchResultComponent implements OnInit {

public p: Parameter;

constructor(private globalSettings: GlobalSettingsService) { }
constructor(private globalSettings: GlobalSettingsService, private sanitizer: DomSanitizer) { }

ngOnInit() {
const parts = this.item.source.doc_id.split('/');
Expand Down Expand Up @@ -680,13 +681,21 @@ export class SearchResultComponent implements OnInit {
return x['payments'][x['payments'].length - 1];
}

routerLink() {
const doc_id = this.item.source.doc_id;
if (doc_id.indexOf('activities/gov_social_service') === 0) {
return null;
}
return [`/i/${doc_id}`];
}

href() {
const doc_id = this.item.source.doc_id;
let base = '';
if (doc_id.indexOf('activities/gov_social_service') === 0) {
base = 'https://www.socialpro.org.il';
const theme = (!this.bare && this.globalSettings.themeId) ? `&theme=${this.globalSettings.themeId}` : '';
return this.sanitizer.bypassSecurityTrustUrl(`https://www.socialpro.org.il/i/${doc_id}?li=${this.index}${theme}`);
}
return base + '/i/' + doc_id + '?li=' + this.index + (!this.bare && this.globalSettings.themeId ? '&theme=' + this.globalSettings.themeId : '');
return null;
}

remainingTime(x: any) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<app-container [listSideView]='true'>
<div class="container" *ngIf='init'>
<div class="inner" *ngIf='init'>
<app-search></app-search>
</div>
</app-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
background: #fafafa fixed;
min-height: 400px;
display: block;
.container {
.inner {
display:flex;
flex-flow: column;
align-content: center;
align-items: center;
padding: 0 32px;
width: 100%;
max-width: 100%;
overflow-x: hidden;
app-search {
display: flex;
flex-flow: column;
Expand Down Expand Up @@ -50,7 +54,7 @@
}

app-container {
.container {
.inner {
app-search {
& > .row {
width: 100vw;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div class="search_body">
<ng-container *ngFor="let item of ((searchManager.searchResults | async)?.docs || []); let i = index" >
<search-result [item]="item" [index]="i" [kind]="item.type" [bare]='bare'></search-result>
<div class='separator'></div>
</ng-container>
<div i18n="@@statusText" class="status" [innerHtml]='getStatusText()'></div>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.search_body {
.separator {
height: 20px;
}
:host {
display: flex;
flex-flow: column;
align-items: center;
.search_body {
display: flex;
flex-flow: column;
gap: 20px;
max-width: 800px;
}
}
18 changes: 18 additions & 0 deletions projects/budgetkey/src/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
@import (css) url('//fonts.googleapis.com/css?family=Heebo:900&amp;subset=hebrew');
@import (css) url('//next.obudget.org/_fonts/stylesheet.css');

html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}

body {
display: block;
margin: 0;
Expand All @@ -16,8 +23,19 @@ body {
-webkit-font-feature-settings: 'tnum','lnum';
-moz-font-feature-settings: 'tnum','lnum';
overflow-x: hidden;
direction: rtl;
padding: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
overscroll-behavior: none;
}

*, *:before, *:after {
box-sizing: inherit;
}


@font-face {
font-family: 'arrows';
src: url('data:application/octet-stream;base64,d09GRgABAAAAAAugAA8AAAAAFFwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+IU3QY21hcAAAAdgAAABQAAABfohI7KpjdnQgAAACKAAAABMAAAAgBtX/BGZwZ20AAAI8AAAFkAAAC3CKkZBZZ2FzcAAAB8wAAAAIAAAACAAAABBnbHlmAAAH1AAAASYAAAF4epoc2WhlYWQAAAj8AA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p7Mu5Sowfx8rx1HLPYz9Yx67eh/t54us0UolsOc29GvmJr13jz3bV003QNmYu51ot5dBmyJVWC98zTmjMqtto/D0PAyissIVGxKsKYSBRo61zbqOJFjqkKTMkM/OsCAlcxDQu1twRZisp4z7HnFFC6zMjJjvw+F0e+TEp4P6YVfTR6mE8Ie3OiDIv2ZfD7g6zRqQky3QzO/vtPcWGp7VpDXftutRZVxLDgxqS97FbW9B49E52K4a2iwbff/7vB+x4hFUAeJxjYGKAAC4G7ICZkYmRmZGFgTsnNa1ENyWxOCM1hQXEZmAAAEOzBhcAAAB4nGPw3sFwIihiIyNjX+QGxp0cDBwMyQUbGVidNjEwMmiBGJu5mBg5ICw+BjCLzWkX0wGgNCeQze60i8EBwmZmcNmowtgRGLHBoSNiI3OKy0Y1EG8XRwMDI4tDR3JIBEhJJBBs5mFi5NHawfi/dQNL70YmBhcADHYj9AAA') format('woff'),
Expand Down

0 comments on commit c336294

Please sign in to comment.