Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5907f1b2 authored by Daniel J. Ramirez's avatar Daniel J. Ramirez
Browse files

Added missing categories, and other improvements

parent e0638f17
Loading
Loading
Loading
Loading
+82 −8
Original line number Diff line number Diff line
@@ -505,7 +505,7 @@ nav #eelo_links > * {
#search_form #search_params {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-size: 14px;
  padding-bottom: 16px;
  padding-top: 16px;
  padding-left: 24px;
@@ -520,8 +520,11 @@ nav #eelo_links > * {
  text-align: right;
  padding-right: 32px;
}
#search_form #search_params #time_and_lang > :first-child {
  margin-right: 16px;
#search_form #search_params #time_and_lang {
  text-align: right;
}
#search_form #search_params #time_and_lang > * {
  width: 160px;
}
#search_form .search_categories,
#search_form #categories {
@@ -529,30 +532,96 @@ nav #eelo_links > * {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  flex: 100%;
}
#search_form .search_categories label,
#search_form #categories label {
  flex-grow: 1;
  flex-basis: auto;
  font-size: 14px;
  font-weight: normal;
  margin-right: 16px;
}
#search_form .search_categories input[type="checkbox"]:checked + label,
#search_form #categories input[type="checkbox"]:checked + label {
#search_form .search_categories input[type="radio"]:checked + label,
#search_form #categories input[type="radio"]:checked + label {
  color: #5068dd;
  font-weight: bold;
}
#search_form #more_categories {
  position: absolute;
  top: 24px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  background-color: #eeeeee;
  padding-bottom: 16px;
  left: 0;
  z-index: 998;
}
#search_form #more_categories > label {
  padding: 16px;
  padding-bottom: 0;
  white-space: nowrap;
}
#more_categories_container {
  border-left: 1px solid rgba(0, 0, 0, 0.24);
  padding-left: 16px;
  display: flex;
  align-items: center;
  position: relative;
}
#more_categories_toggle:checked ~ #more_categories,
#more_categories_toggle_[checked] ~ #more_categories {
  display: flex;
}
#more_categories_toggle:checked ~ #show_more_categories,
#more_categories_toggle_[checked] ~ #show_more_categories {
  display: none;
}
#more_categories_toggle:checked ~ #show_less_categories,
#more_categories_toggle_[checked] ~ #show_less_categories {
  display: initial;
}
#more_categories_toggle:not(:checked) ~ #more_categories,
#more_categories_toggle_:not([checked]) ~ #more_categories {
  display: none;
}
#more_categories_toggle:not(:checked) ~ #show_more_categories,
#more_categories_toggle_:not([checked]) ~ #show_more_categories {
  display: initial;
}
#more_categories_toggle:not(:checked) ~ #show_less_categories,
#more_categories_toggle_:not([checked]) ~ #show_less_categories {
  display: none;
}
@media screen and (max-width: 600px) {
  #search_form #search_params {
    overflow-x: scroll;
  }
  #search_form #search_params #time_and_lang {
    display: flex;
  }
  #search_form #search_params #time_and_lang > * {
    width: auto;
  }
  #search_form #search_params,
  #search_form #categories {
    flex-wrap: nowrap;
  }
  #search_form #time_and_lang {
    display: flex;
  #search_form #more_categories {
    position: relative;
    flex-direction: row;
    align-items: center;
    top: 0;
    border: none;
    border-radius: 0;
    padding-bottom: 0;
    background-color: transparent;
    margin-left: 16px;
  }
  #search_form #more_categories > label {
    padding: 0;
  }
  #search_input_container {
    margin-right: 40px;
@@ -651,6 +720,11 @@ nav #eelo_links > * {
  width: 100%;
  margin-top: 16px;
}
#image_result_mini_gallery_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media screen and (max-width: 1100px) {
  #results.image-gallery {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+44 −22
Original line number Diff line number Diff line
@@ -62,7 +62,34 @@ $(document).ready(function() {
        });
    }
});
;/**
;
function configure_image_view(target) {
  document.getElementById("image_view_image").src = target.href;
  document.getElementById("image_view_file_link").href = target.href;
  document.getElementById("image_view_url_link").href = target.dataset.url;
}

function show_image_view_modal(event) {
  event.preventDefault();
  var target = event.target;
  if (target.tagName == "IMG") {
      target = target.parentElement;
  }

  var modal = document.getElementById("image_view_modal");
  modal.classList.remove("hidden");
  modal.style.top = window.scrollY + "px";
  configure_image_view(target);
  document.body.classList.add("lock");
}

function close_image_view_modal() {
  document.getElementById("image_view_modal").classList.add("hidden");
  document.getElementById("image_view_image").src = "";
  document.getElementById("image_view_file_link").href = "#";
  document.getElementById("image_view_url_link").href = "#";
  document.body.classList.remove("lock");
};/**
 * searx is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
@@ -83,7 +110,7 @@ $(document).ready(function() {
    /**
     * focus element if class="autofocus" and id="q"
     */
    document.querySelector("#q[autofocus]").focus();
    // document.querySelector("#q[autofocus]").focus();
    $('#q[autofocus]').focus();

    /**
@@ -141,26 +168,21 @@ $(document).ready(function() {
        }
    });

    /**
     * Select or deselect every categories on double clic
     */
    $(".btn-sm").dblclick(function() {
    var btnClass = 'btn-' + $(this).data('btn-class'); // primary
        if($(this).hasClass('btn-default')) {
            $(".btn-sm > input").attr('checked', 'checked');
            $(".btn-sm > input").prop("checked", true);
            $(".btn-sm").addClass(btnClass);
            $(".btn-sm").addClass('active');
            $(".btn-sm").removeClass('btn-default');
        } else {
            $(".btn-sm > input").attr('checked', '');
            $(".btn-sm > input").removeAttr('checked');
            $(".btn-sm > input").checked = false;
            $(".btn-sm").removeClass(btnClass);
            $(".btn-sm").removeClass('active');
            $(".btn-sm").addClass('btn-default');
        }

    // kinda hack, to make the more categories menu work, when JS is enabled.
    $("#show_more_categories_").click(function(event) {
        $(event.target).addClass("hidden");
        $("#show_less_categories_").removeClass("hidden");
        $("#more_categories_toggle_").attr("checked", true);
    });
    $("#show_less_categories_").click(function(event) {
        $(event.target).addClass("hidden");
        $("#show_more_categories_").removeClass("hidden");
        $("#more_categories_toggle_").attr("checked", false);
    });
    $("#show_more_categories_").removeClass("hidden");
    $('<div id="more_categories_toggle_" class="hidden"></div>').insertAfter($("#more_categories_toggle"));
    $("#more_categories_toggle, #show_more_categories, #show_less_categories").remove();
});
;/**
 * searx is free software: you can redistribute it and/or modify
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+28 −0
Original line number Diff line number Diff line

function configure_image_view(target) {
  document.getElementById("image_view_image").src = target.href;
  document.getElementById("image_view_file_link").href = target.href;
  document.getElementById("image_view_url_link").href = target.dataset.url;
}

function show_image_view_modal(event) {
  event.preventDefault();
  var target = event.target;
  if (target.tagName == "IMG") {
      target = target.parentElement;
  }

  var modal = document.getElementById("image_view_modal");
  modal.classList.remove("hidden");
  modal.style.top = window.scrollY + "px";
  configure_image_view(target);
  document.body.classList.add("lock");
}

function close_image_view_modal() {
  document.getElementById("image_view_modal").classList.add("hidden");
  document.getElementById("image_view_image").src = "";
  document.getElementById("image_view_file_link").href = "#";
  document.getElementById("image_view_url_link").href = "#";
  document.body.classList.remove("lock");
}
 No newline at end of file
Loading