This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 68eb948  Remove the sticky-note from first visit
     new d354ad9  Merge pull request #33 from cominvent/remove-sticky-note
68eb948 is described below

commit 68eb9486590fc2de37fe11dbf80134d2d98c3785
Author: Jan Høydahl <[email protected]>
AuthorDate: Thu Aug 19 10:06:11 2021 +0200

    Remove the sticky-note from first visit
---
 themes/solr/static/css/base.css              | 159 ---------------------------
 themes/solr/static/css/operator.css          | 159 ---------------------------
 themes/solr/templates/_modal_welcomebox.html |  83 --------------
 themes/solr/templates/base.html              |   1 -
 4 files changed, 402 deletions(-)

diff --git a/themes/solr/static/css/base.css b/themes/solr/static/css/base.css
index 4c44a99..54d1663 100644
--- a/themes/solr/static/css/base.css
+++ b/themes/solr/static/css/base.css
@@ -538,165 +538,6 @@ section.orange.full-width {
 }
 
 /*
- * Modal effect for the sticky-note alert on redirect from lucene
- * From https://css-tricks.com/considerations-styling-modal/
- * Credit Chris Coyier ©2016. Coped from CodePen with permission.
- */
-
-.sticky-container {
-  z-index: 4000;
-  position: fixed;
-  top: 50%;
-  left: 50%;
-  transform: translate(-50%, -70%);
-  width: 600px;
-  max-width: 100%;
-  height: 350px;
-  max-height: 100%;
-  display: block;
-}
-
-.modal-overlay {
-  z-index: 3000;
-  position: fixed;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-
-  background: rgba(0, 0, 0, 0.6);
-}
-
-.sticky-container .close-button {
-  position: absolute;
-
-  /* don't need to go crazy with z-index here, just sits over .modal-guts */
-  z-index: 1;
-
-  top: 20px;
-
-  /* needs to look OK with or without scrollbar */
-  right: 30px;
-
-  border: 0;
-  background: black;
-  color: white;
-  padding: 4px 10px;
-  font-size: 1.3rem;
-}
-
-.closed {
-  display: none;
-}
-
-/*
- * Sticky-note effect for first visit popup message
- * Thanks to Pascal Thormeier for sharing on CodePen with a permissive license
- * https://dev.to/thormeier/fully-responsive-html-css-sticky-note-4okl
- */
-
-.sticky-outer {
-  display: flex;
-  padding-top: 92.5925926%;
-  /*position: relative;*/
-
-  width: 100%;
-}
-
-.sticky {
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-}
-
-/* Shadow behind the sticky note */
-.sticky:before {
-  box-shadow: -2px 2px 15px 0 rgba(0, 0, 0, 0.5);
-  background-color: rgba(0, 0, 0, 0.25);
-  content: '';
-  width: 90%;
-  left: 5px;
-  height: 83%;
-  position: absolute;
-  top: 30%;
-}
-
-/* The sticky note itself */
-.sticky-content {
-  background: linear-gradient(
-    180deg,
-    #FFFFBB 0%,
-    #FFFFDD 12%,
-    #FFFFDD 75%,
-    #FFFFBB 100%
-  );
-  width: 100%;
-  height: 100%;
-
-  padding: 50px;
-  display: flex;
-  flex-wrap: wrap;
-  justify-content: center;
-  align-items: center;
-  font-family: 'Kalam', cursive;
-  font-size: 1rem;
-
-  clip-path: url(#stickyClip);
-}
-
-.sticky-content .break {
-  flex-basis: 100%;
-  height: 0;
-}
-
-.sticky-content h1 {
-  font-family: 'Kalam', cursive;
-  font-size: 2rem;
-}
-
-/* Add responsiveness */
-@media screen and (min-width: 640px) {
-  .sticky:before {
-    height: 79%;
-    width: 90%;
-  }
-  .sticky-content, .sticky-content h1 {
-    font-size: 1.5rem;
-  }
-  .sticky-content h1 {
-    font-size: 2.5rem;
-  }
-}
-
-@media screen and (min-width: 768px) {
-  .sticky:before {
-    height: 75%;
-    width: 90%;
-  }
-  .sticky-content, .sticky-content h1 {
-    font-size: 1.7rem;
-  }
-  .sticky-content h1 {
-    font-size: 2.7rem;
-  }
-}
-
-@media screen and (min-width: 1024px) {
-  .sticky:before {
-    height: 73%;
-    width: 90%;
-  }
-  .sticky-content {
-    font-size: 1.95rem;
-  }
-  .sticky-content h1 {
-    font-size: 2.95rem;
-  }
-}
-
-/*
  * Footer
  */
 footer {
diff --git a/themes/solr/static/css/operator.css 
b/themes/solr/static/css/operator.css
index 64f52ca..1e5938e 100644
--- a/themes/solr/static/css/operator.css
+++ b/themes/solr/static/css/operator.css
@@ -538,165 +538,6 @@ section.orange.full-width {
 }
 
 /*
- * Modal effect for the sticky-note alert on redirect from lucene
- * From https://css-tricks.com/considerations-styling-modal/
- * Credit Chris Coyier ©2016. Coped from CodePen with permission.
- */
-
-.sticky-container {
-  z-index: 4000;
-  position: fixed;
-  top: 50%;
-  left: 50%;
-  transform: translate(-50%, -70%);
-  width: 600px;
-  max-width: 100%;
-  height: 350px;
-  max-height: 100%;
-  display: block;
-}
-
-.modal-overlay {
-  z-index: 3000;
-  position: fixed;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-
-  background: rgba(0, 0, 0, 0.6);
-}
-
-.sticky-container .close-button {
-  position: absolute;
-
-  /* don't need to go crazy with z-index here, just sits over .modal-guts */
-  z-index: 1;
-
-  top: 20px;
-
-  /* needs to look OK with or without scrollbar */
-  right: 30px;
-
-  border: 0;
-  background: black;
-  color: white;
-  padding: 4px 10px;
-  font-size: 1.3rem;
-}
-
-.closed {
-  display: none;
-}
-
-/*
- * Sticky-note effect for first visit popup message
- * Thanks to Pascal Thormeier for sharing on CodePen with a permissive license
- * https://dev.to/thormeier/fully-responsive-html-css-sticky-note-4okl
- */
-
-.sticky-outer {
-  display: flex;
-  padding-top: 92.5925926%;
-  /*position: relative;*/
-
-  width: 100%;
-}
-
-.sticky {
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-}
-
-/* Shadow behind the sticky note */
-.sticky:before {
-  box-shadow: -2px 2px 15px 0 rgba(0, 0, 0, 0.5);
-  background-color: rgba(0, 0, 0, 0.25);
-  content: '';
-  width: 90%;
-  left: 5px;
-  height: 83%;
-  position: absolute;
-  top: 30%;
-}
-
-/* The sticky note itself */
-.sticky-content {
-  background: linear-gradient(
-    180deg,
-    #FFFFBB 0%,
-    #FFFFDD 12%,
-    #FFFFDD 75%,
-    #FFFFBB 100%
-  );
-  width: 100%;
-  height: 100%;
-
-  padding: 50px;
-  display: flex;
-  flex-wrap: wrap;
-  justify-content: center;
-  align-items: center;
-  font-family: 'Kalam', cursive;
-  font-size: 1rem;
-
-  clip-path: url(#stickyClip);
-}
-
-.sticky-content .break {
-  flex-basis: 100%;
-  height: 0;
-}
-
-.sticky-content h1 {
-  font-family: 'Kalam', cursive;
-  font-size: 2rem;
-}
-
-/* Add responsiveness */
-@media screen and (min-width: 640px) {
-  .sticky:before {
-    height: 79%;
-    width: 90%;
-  }
-  .sticky-content, .sticky-content h1 {
-    font-size: 1.5rem;
-  }
-  .sticky-content h1 {
-    font-size: 2.5rem;
-  }
-}
-
-@media screen and (min-width: 768px) {
-  .sticky:before {
-    height: 75%;
-    width: 90%;
-  }
-  .sticky-content, .sticky-content h1 {
-    font-size: 1.7rem;
-  }
-  .sticky-content h1 {
-    font-size: 2.7rem;
-  }
-}
-
-@media screen and (min-width: 1024px) {
-  .sticky:before {
-    height: 73%;
-    width: 90%;
-  }
-  .sticky-content {
-    font-size: 1.95rem;
-  }
-  .sticky-content h1 {
-    font-size: 2.95rem;
-  }
-}
-
-/*
  * Footer
  */
 footer {
diff --git a/themes/solr/templates/_modal_welcomebox.html 
b/themes/solr/templates/_modal_welcomebox.html
deleted file mode 100644
index 70dbc86..0000000
--- a/themes/solr/templates/_modal_welcomebox.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<div class="modal-overlay closed" id="modal-overlay"></div>
-
-<div class="sticky-container closed" id="modal">
-    <div class="sticky-outer">
-      <div class="sticky">
-        <svg width="0" height="0">
-          <defs>
-            <clipPath id="stickyClip" clipPathUnits="objectBoundingBox">
-              <path
-                d="M 0 0 Q 0 0.69, 0.03 0.96 0.03 0.96, 1 0.96 Q 0.96 0.69, 
0.96 0 0.96 0, 0 0"
-                stroke-linejoin="round"
-                stroke-linecap="square"
-              />
-            </clipPath>
-          </defs>
-        </svg>
-        <div class="sticky-content">
-          <button class="close-button" id="close-button">X</button>
-          <div><h1>Solr has a new home!</h1></div>
-          <div class="break"></div>
-          <div>
-            Solr is now an independent Apache project here at 
<b>solr.apache.org</b>.
-            Please update your links. <a 
href="/news.html#apache-solr-becomes-an-apache-tlp" id="news-link">Read more 
about what it means for you</a>.
-          </div>
-        </div>
-      </div>
-    </div>
-</div>
-
-<script>
-  /* Cookie enabling functions. Thanks to Peter-Paul Koch for the code examples
-     at https://www.quirksmode.org/js/cookies.html (used with permission)
-  */
-  function createCookie(name,value,days) {
-    if (days) {
-      var date = new Date();
-      date.setTime(date.getTime()+(days*24*60*60*1000));
-      var expires = "; expires="+date.toGMTString();
-    }
-    else var expires = "";
-    document.cookie = name+"="+value+expires+"; path=/";
-  }
-
-  function readCookie(name) {
-    var nameEQ = name + "=";
-    var ca = document.cookie.split(';');
-    for(var i=0;i < ca.length;i++) {
-      var c = ca[i];
-      while (c.charAt(0)==' ') c = c.substring(1,c.length);
-      if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
-    }
-    return null;
-  }
-
-  function eraseCookie(name) {
-    createCookie(name,"",-1);
-  }
-</script>
-
-<script>
-  /* Script code to handle sticky note and modality */
-  var modal = document.querySelector("#modal");
-  var modalOverlay = document.querySelector("#modal-overlay");
-  var closeButton = document.querySelector("#close-button");
-  var linkText = document.querySelector("#news-link");
-
-  closeButton.addEventListener("click", function() {
-    modal.classList.toggle("closed");
-    modalOverlay.classList.toggle("closed");
-  });
-
-  linkText.addEventListener("click", function() {
-    modal.classList.toggle("closed");
-    modalOverlay.classList.toggle("closed");
-  });
-
-  // Open modal box on first visit only, and only the first year
-  if (readCookie("alreadyVisited") == null && new Date() < new 
Date('2022-03-01')) {
-    createCookie("alreadyVisited", "yes", 400)
-    modal.classList.toggle("closed");
-    modalOverlay.classList.toggle("closed");
-  }
-</script>
diff --git a/themes/solr/templates/base.html b/themes/solr/templates/base.html
index 446d5a2..305fcb3 100644
--- a/themes/solr/templates/base.html
+++ b/themes/solr/templates/base.html
@@ -43,6 +43,5 @@
     </footer>
 
     {% include "_last_scripts.html" %}
-    {% include "_modal_welcomebox.html" %}
   </body>
 </html>

Reply via email to