From 50374458f75e7ee3e7fde2ae5a8d40f5cbfe1dad Mon Sep 17 00:00:00 2001 From: nipos Date: Sun, 2 Dec 2018 15:01:21 +0100 Subject: [PATCH] Added search suggestions,added instance info page,fixed bugs in profile and autocomplete,search for post urls now possible --- .htaccess | 4 ++ Caddyfile | 4 ++ README.md | 1 + assets/css/dark.css | 18 +++++ assets/css/style.css | 100 ++++++++++++++++++++++++++ assets/js/autocomplete/search.js | 55 ++++++++++++++ assets/js/autocomplete/textarea.js | 4 ++ assets/js/halcyon/halcyonFunctions.js | 2 + assets/js/halcyon/halcyonSettings.js | 13 ++-- assets/js/halcyon/halcyonUI.js | 44 ++++++++++-- footer.php | 2 - header.php | 6 +- instance.php | 65 +++++++++++++++++ login/auth.php | 1 + nginx.conf | 3 + search_hash_tag.php | 12 +++- search_user.php | 5 ++ version.txt | 2 +- widgets/side_footer.php | 4 +- 19 files changed, 324 insertions(+), 21 deletions(-) create mode 100644 assets/js/autocomplete/search.js create mode 100644 instance.php diff --git a/.htaccess b/.htaccess index 8e1bf87..e7122f1 100644 --- a/.htaccess +++ b/.htaccess @@ -36,6 +36,10 @@ RewriteRule ^whotofollow/?$ who_to_follow\.php [NC,L] RewriteBase /direct RewriteRule ^direct/?$ direct\.php [NC,L] +# Instance +RewriteBase /instance +RewriteRule ^instance/?$ instance\.php [NC,L] + # Lists RewriteBase /lists RewriteRule ^lists/?$ lists\.php [NC,L] diff --git a/Caddyfile b/Caddyfile index d5b8b4c..65a794b 100644 --- a/Caddyfile +++ b/Caddyfile @@ -63,6 +63,10 @@ r ^/direct/?$ to direct.php } rewrite { +r ^/instance/?$ +to instance.php +} +rewrite { r ^/lists/?$ to lists.php } diff --git a/README.md b/README.md index 1e06ea0..764aacf 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ We moved our instances list to a wiki page: https://notabug.org/halcyon-suite/ha or read our new wiki pages to install it manually: https://notabug.org/halcyon-suite/halcyon/wiki ## Blog +- Release of Version 2.1.6 - Added search suggestions,fixed autocomplete bug,added instance info page,fixed small bug in profile settings,search for posts now supported - Release of Version 2.1.5 - Added support for filter,added possibility to filter all bots,it's now easier to detect bots - Release of Version 2.1.4 - Added custom profile fields,verified links,custom profile link settings and improved regular expressions for links - Release of Version 2.1.3 - Added a autocomplete feature for usernames,hashtags and emojis,fixed a bug in the emoji picker (didn't open sometimes) diff --git a/assets/css/dark.css b/assets/css/dark.css index cb5efc1..7676a83 100644 --- a/assets/css/dark.css +++ b/assets/css/dark.css @@ -358,6 +358,21 @@ color:#fff; color:#fff; background-color:#189EFC; } +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions { +background-color:#243447; +box-shadow:.5px .5px 3px rgba(0,0,0,0.26); +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions::before { +background-color:#243447; +border:.5px solid rgba(0,0,0,.26); +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box h3, +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover .un { +color:#FFFFFF !important; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover .un { +color:#66757F; +} #main .profile_nav_wrap { background-color:#1b2836; box-shadow:0 1px 3px 0 rgba(0,0,0,0.25); @@ -594,3 +609,6 @@ color:#FFF; .hoverLi h3,.hoverLi .un { color:#FFF !important; } +.instance_field { +border:1px solid #000000; +} diff --git a/assets/css/style.css b/assets/css/style.css index ec1286f..ca31990 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1690,6 +1690,96 @@ background-color: #189EFC; text-decoration: none; color: #fff; } +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions { +display: block; +position: absolute; +cursor: pointer; +top: 50px; +width: 320px; +font-size: 12px; +border-radius: 3px; +box-sizing: border-box; +background-color: #fff; +box-shadow: 0.5px 0.5px 3px rgba(0,0,0,0.26); +margin-left:50px +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions::before { +display: block; +content: ""; +z-index: -1; +width: 20px; +height: 20px; +position: absolute; +transform: rotate(45deg); +top: -5px; +left: 8px; +background-color: #fff; +border: 0.5px solid rgba(0,0,0,.26); +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box { +margin-bottom:0; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover { +background-color:#189EFC; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover h3, +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:hover .un { +color:#FFFFFF !important; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:first-child { +border-top-left-radius:3px; +border-top-right-radius:3px; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li.account_box:last-child { +border-bottom-left-radius:3px; +border-bottom-right-radius:3px; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li .icon_box img { +margin-left:12px; +margin-top:8px; +width:32px; +height:32px; +border-radius:5px; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li .icon_box img.emoji { +border-radius:0; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li h3 { +font-size:16px; +} +/*#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul { +margin: 0 -21px; +margin-bottom: 8px; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul::after { +content: ""; +display: block; +margin-top: 8px; +border-bottom: 1px solid #E6ECF0; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul:last-child::after { +border-bottom: 0px solid #E6ECF0; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li { +box-sizing: border-box; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li a .display_name { +display: block; +color: #000; +font-size: 14px; +font-weight: 600; +margin-bottom: 4px; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions a { +display: block; +padding: 8px 21px; +} +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions a:hover, +#header .header_nav_wrap .header_right_box .search_form_wrap .header_search_suggestions ul li a:hover .display_name { +background-color: #189EFC; +text-decoration: none; +color: #fff; +}*/ .toot_button { width: 90px; height: 100%; @@ -2584,3 +2674,13 @@ display:inline; .hideDropDown { display:none; } +.instance_field { +width:100%; +text-align:center; +font-size:40px; +font-weight:bold; +border:1px solid #E6ECF0; +border-radius:5px; +padding-top:34px; +padding-bottom:35px; +} diff --git a/assets/js/autocomplete/search.js b/assets/js/autocomplete/search.js new file mode 100644 index 0000000..4004ef5 --- /dev/null +++ b/assets/js/autocomplete/search.js @@ -0,0 +1,55 @@ +function searchlocalfill() { +var dropdown = $("