Explorar o código

:art: ::after样式修改

Bhikkhu-Kosalla %!s(int64=4) %!d(string=hai) anos
pai
achega
8f969add88
Modificáronse 5 ficheiros con 26 adicións e 21 borrados
  1. 8 4
      app/guide/guide.css
  2. 4 4
      app/guide/guide.js
  3. 1 0
      app/term/term.css
  4. 9 9
      app/term/term_edit_dlg.js
  5. 4 4
      app/term/term_popup.js

+ 8 - 4
app/guide/guide.css

@@ -24,7 +24,7 @@ guide ol {
 	padding-left: 20px;
 }
 .guide_contence {
-	border-top: 7px;
+	/*border-top: 7px;*/
 	position: absolute;
 	border: 1px solid var(--border-line-color);
 	border-radius: 5px;
@@ -39,9 +39,7 @@ guide ol {
 	font-size: 10pt;
 	text-align: left;
 	display: none;
-
-	margin: 0.3em;
-	margin: -1px 0px;
+	margin: 10px 0 0 0;
 	box-shadow: 0px 3px 13px 0px var(--shadow-color);
 	color: var(--main-color);
 	z-index: 200;
@@ -58,6 +56,12 @@ guide ol {
 	position: absolute;
 	top: -20px;
 }
+.left:after {
+	left: 10px;
+}
+.right:after {
+	right: 10px;
+}
 
 .guide_contence h1 {
 	font-size: 1.5em;

+ 4 - 4
app/guide/guide.js

@@ -5,11 +5,11 @@ function guide_init() {
 				$(this).css("background", "unset");
 			}
 			if ($(this).offset().left < $(document.body).width() / 2) {
-				$(this).append('<div  class="guide_contence" style="left: -5px;"></div>');
-				$(".guide_contence:after").css("left", "0");
+				$(this).append('<div  class="guide_contence left" style="left: -5px;"></div>');
+				//$(".guide_contence:after").css("left", "0");
 			} else {
-				$(this).append('<div  class="guide_contence" style="right: -5px;"></div>');
-				$(".guide_contence:after").css("right", "0");
+				$(this).append('<div  class="guide_contence right" style="right: -5px;"></div>');
+				//$(".guide_contence:after").css("right", "0");
 			}
 			$(this).attr("init", "1");
 		}

+ 1 - 0
app/term/term.css

@@ -854,4 +854,5 @@ span.keybutton {
 	padding: 0 3px;
 	color: white;
 	font-weight: 300;
+	height: fit-content;
 }

+ 9 - 9
app/term/term_edit_dlg.js

@@ -4,6 +4,7 @@ function term_edit_dlg_init(title = gLocal.gui.dict_terms) {
 	$("#term_edit_dlg").dialog({
 		autoOpen: false,
 		width: 550,
+		outerHeight: "80vh",
 		buttons: [
 			{
 				text: gLocal.gui.save,
@@ -95,22 +96,22 @@ function term_edit_dlg_render(word = "") {
 	output += "</fieldset>";
 
 	output += "<fieldset>";
-	output += "<legend>" + gLocal.gui.tag + "</legend>";
+	output += "<legend>" + gLocal.gui.language + "</legend>";
 	output +=
-		"<input type='input' id='term_edit_form_tag name='tag' name='tag' value='" +
-		word.tag +
+		"<input type='input' id='term_edit_form_language' name='language' value='" +
+		word.language +
 		"' placeholder=" +
-		gLocal.gui.optional +
+		gLocal.gui.required +
 		" >";
 	output += "</fieldset>";
 
 	output += "<fieldset>";
-	output += "<legend>" + gLocal.gui.language + "</legend>";
+	output += "<legend>" + gLocal.gui.tag + "</legend>";
 	output +=
-		"<input type='input' id='term_edit_form_language' name='language' value='" +
-		word.language +
+		"<input type='input' id='term_edit_form_tag name='tag' name='tag' value='" +
+		word.tag +
 		"' placeholder=" +
-		gLocal.gui.required +
+		gLocal.gui.optional +
 		" >";
 	output += "</fieldset>";
 
@@ -133,7 +134,6 @@ function term_edit_dlg_render(word = "") {
 		word.note +
 		"</textarea>";
 	output += "</fieldset>";
-
 	output += "</form>";
 
 	return output;

+ 4 - 4
app/term/term_popup.js

@@ -10,17 +10,17 @@ function term_popup_init() {
         $(this).append(
           '<div term-popup="' +
             gid +
-            '"  class="guide_contence" style="left: -5px;"></div>'
+            '"  class="guide_contence left" style="left: -5px;"></div>'
         );
-        $(".guide_contence:after").css("left", "0");
+        //$(".guide_contence:after").css("left", "0");
       } else {
         //出现在右侧
         $(this).append(
           '<div term-popup="' +
             gid +
-            '" class="guide_contence" style="right: -5px;"></div>'
+            '" class="guide_contence right" style="right: -5px;"></div>'
         );
-        $(".guide_contence:after").css("right", "0");
+        //$(".guide_contence:after").css("right", "0");
       }
       $(this).attr("init", "1");
     }