laravel-bjyblog icon indicating copy to clipboard operation
laravel-bjyblog copied to clipboard

Question about navigation

Open yuri25 opened this issue 5 years ago • 11 comments

What is the point of using the target = "_ blank" attribute when opening an article or comment? Maybe it makes sense to make an opening in the current browser tab? If a user views articles and comments, many tabs open. I have commented out this attribute in the file so far: /resources/views/home/index/index.blade.php Line 30: <a class="b-oa-title" href="{{ $v-> url}} "> <! - target =" _ blank "-> {{$ v-> title}} </a> Line 75: <a class=" b-readall" href="{{ $v-> url}} "> <! - target =" _ blank "-> {{__ ('Read More')}} </a> And in the file: /resources/views/layouts/home.blade.php Line 131: <a class="b-recommend-a" href="{{ $v-> url}} "> <! - target =" _ blank "-> <span class =" fa fa-th-list b- black "> </span> {{$ v-> title}} </a> Line 145: {{ __('Comment') }}<a href="{{ $comment->article->url }}#comment-{{ $comment->id }}"> <!--target="_blank"--> → {{ $comment->article->sub_title }}</a>

This element on line 145 → improves the display of comments in the sidebar block. By the way, if it is possible in this block letters in words are also cut off, it would be nice to increase the number of words there and cut off words

Only now when updating these changes will be overwritten ... and you will have to manually make the changes again. What do you think? It may make sense to remove this attribute so as not to produce many tabs or make this parameter customizable in the admin panel. It would be great to introduce breadcrumbs into the blog .... https://dev.to/jordanirabor/building-dynamic-breadcrumbs-in-laravel-926 Or this: https://github.com/davejamesmiller/laravel-breadcrumbs  But probably it is very difficult. But perhaps you find it necessary to simply remove the target = "_ blank" attribute from the files that I wrote. Your opinion? Thank you very much for your work!

yuri25 avatar Dec 24 '19 17:12 yuri25

OK, I will add a config to allow custom target values.
And I will check all the word truncation issues.
For breadcrumbs, I don't know where to put it on the page? Functionally it can be easily added, but it won't be beautiful.
Thank you.

baijunyao avatar Dec 25 '19 14:12 baijunyao

Dear Junyao Bai! Thank you for your loyalty and responsiveness. Where to place the breadcrumbs is possible as in the screenshot ... Although now I'm not sure that this is necessary at all :)) Perhaps you are right that it will not look very beautiful. Perhaps this also makes sense to make a custom item in the admin panel. This is at your discretion. If this is really ugly, then probably it’s not worth doing. And about other problems - thank you very much for your work!

inst-1

yuri25 avatar Dec 25 '19 16:12 yuri25

OK, I try to do this.

baijunyao avatar Dec 26 '19 12:12 baijunyao

Now, you can custom link target, please pull the latest code and upgrade. image If the translation is inaccurate, please open a PR. https://github.com/baijunyao/laravel-bjyblog/blob/d764df50d326ef26ff19188b453003589f622612/resources/lang/ru.json#L187-L189

baijunyao avatar Dec 28 '19 08:12 baijunyao

Updated, everything works fine. A translation would be preferable: "Link Target": "Открывать ссылки", "New Tab": "В новой вкладке", "Current Tab": "В текущей вкладке", Thank you!

yuri25 avatar Dec 28 '19 13:12 yuri25

Which of the following do you like? Option 2 feels better?

image

image

baijunyao avatar Dec 29 '19 04:12 baijunyao

Yes, the second option is better.

yuri25 avatar Dec 29 '19 17:12 yuri25

Now, breadcrumb is completed.
image

baijunyao avatar Jan 04 '20 03:01 baijunyao

Thank you so much! Please correct the translation as follows: ~~хлебный мякиш~~ Instead, the correct menu item in the admin panel would be: Отображать строку навигации (breadcrumbs) Thank you so much for the job well done!

yuri25 avatar Jan 04 '20 20:01 yuri25

The translation has been updated.

baijunyao avatar Jan 11 '20 04:01 baijunyao

Thank you very much!

yuri25 avatar Jan 12 '20 11:01 yuri25