]> git.openstreetmap.org Git - rails.git/commitdiff
Inline welcome/fixthemap sprites
authorAnton Khorev <tony29@yandex.ru>
Mon, 27 May 2024 00:16:33 +0000 (03:16 +0300)
committerAnton Khorev <tony29@yandex.ru>
Mon, 27 May 2024 00:29:34 +0000 (03:29 +0300)
app/assets/images/welcome-sprite.svg [deleted file]
app/assets/stylesheets/common.scss
app/views/site/_any_questions.html.erb
app/views/site/welcome.html.erb

diff --git a/app/assets/images/welcome-sprite.svg b/app/assets/images/welcome-sprite.svg
deleted file mode 100644 (file)
index 64959a2..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="800" height="100">
-  <g>
-    <circle cx="50" cy="50" r="45" fill="#70cd8f"/>
-    <path d="M31 46h-2l-3 3v2l14 14 5 5 5-5 25-25v-2l-3-3h-2l-25 25z" fill="#fff"/>
-  </g>
-  <g>
-    <circle cx="150" cy="50" r="45" fill="#cd7070"/>
-    <path d="M135 30h-2l-3 3v2l15 15-15 15v2l3 3h2l15-15 15 15h2l3-3v-2l-15-15 15-15v-2l-3-3h-2l-15 15z" fill="#fff"/>
-  </g>
-  <g>
-    <path d="M250 5c-20.71 0-37.5 16.789-37.5 37.5s37.5 52.5 37.5 52.5 37.5-31.789 37.5-52.5-16.789-37.5-37.5-37.5z" fill="#7092ff"/>
-    <circle cx="250" cy="42.5" r="15" fill="#fff"/>
-  </g>
-  <g>
-    <line x1="320" y1="80" x2="380" y2="20" stroke="#7092ff" stroke-width="15"/>
-    <circle cx="320" cy="80" r="15" fill="#7092ff"/>
-    <circle cx="380" cy="20" r="15" fill="#7092ff"/>
-    <circle cx="320" cy="80" r="7" fill="#fff"/>
-    <circle cx="380" cy="20" r="7" fill="#fff"/>
-  </g>
-  <g>
-    <path d="M425 87l-20-20v-29l20-20h68l2 2v65l-2 2z" fill="#7092ff"/>
-    <rect width="10" height="15" x="415" y="45" rx="3" ry="2.25" fill="#fff"/>
-  </g>
-  <g fill="#7092ff">
-    <path d="M519.728 30.552l19.834-15.219L580 65l-19.834 15.219z" opacity=".5"/>
-    <path d="M510.597 18.651l19.834-15.219 6.088 7.934-19.834 15.219zm52.613 65.535l19.834-15.219 1.198 17.988-3.967 3.044z"/>
-  </g>
-  <g>
-    <circle cx="650" cy="50" r="45" fill="#7092ff"/>
-    <path d="M644.42 54.95q0-3 1.26-5.04 1.26-2.04 4.32-4.26 2.7-1.92 3.84-3.3 1.2-1.44 1.2-3.36 0-1.92-1.44-2.88-1.38-1.02-3.9-1.02-2.52 0-4.98.78-2.46.78-5.04 2.1l-3.18-6.42q2.94-1.62 6.36-2.64 3.42-1.02 7.5-1.02 6.24 0 9.66 3 3.48 3 3.48 7.62 0 2.46-.78 4.26-.78 1.8-2.34 3.36-1.56 1.5-3.9 3.24-1.74 1.26-2.7 2.16-.96.9-1.32 1.74-.3.84-.3 2.1v1.74h-7.74zm-.96 12.18q0-2.76 1.5-3.84 1.5-1.14 3.66-1.14 2.1 0 3.6 1.14 1.5 1.08 1.5 3.84 0 2.64-1.5 3.84-1.5 1.14-3.6 1.14-2.16 0-3.66-1.14-1.5-1.2-1.5-3.84z" fill="#fff"/>
-  </g>
-  <g>
-    <circle cx="750" cy="50" r="45" fill="#7092ff"/>
-    <path d="M741.072 49.28q0-2.4 1.152-3.84 1.152-1.488 2.64-2.208-1.728-.96-2.688-2.256-.96-1.344-.96-3.264 0-2.88 2.448-4.512 2.448-1.68 7.008-1.68 2.688 0 4.56.48 1.872.432 3.648 1.152l-1.296 3.216q-1.632-.672-3.264-1.104-1.632-.48-3.936-.48-2.88 0-4.08.768-1.152.72-1.152 2.064 0 1.344 1.344 2.304 1.344.912 4.992 2.256 3.696 1.344 5.76 3.072 2.064 1.728 2.064 4.608 0 2.448-1.104 4.032-1.104 1.536-2.496 2.352 1.68.912 2.592 2.208.96 1.248.96 3.072 0 3.312-2.784 5.136-2.736 1.824-7.68 1.824-2.64 0-4.608-.384-1.968-.432-3.504-1.2v-3.6q1.536.72 3.792 1.344 2.256.624 4.512.624 3.552 0 4.896-1.008 1.344-1.056 1.344-2.4 0-.912-.48-1.584-.432-.672-1.776-1.392-1.296-.768-3.936-1.728-2.496-.96-4.32-1.968-1.776-1.008-2.736-2.4-.912-1.392-.912-3.504zm3.6-.48q0 1.776 1.488 3.024 1.536 1.2 5.376 2.64l1.056.384q1.104-.672 2.064-1.68 1.008-1.056 1.008-2.688 0-1.2-.672-2.16-.624-.96-2.256-1.824-1.632-.912-4.608-1.824-1.344.336-2.4 1.44-1.056 1.104-1.056 2.688z" fill="#fff" stroke="#fff"/>
-  </g>
-</svg>
index 605f4f077efd3d7eabe5fb0ad7d30f97f5139689..7c216ad4b861a7c9bf2c92efe92bb61e72b868dc 100644 (file)
@@ -876,45 +876,6 @@ div.secondary-actions {
   }
 }
 
-/* Rules for the "Welcome" and "Fix the map" pages */
-
-.site-welcome, .site-fixthemap {
-  .sprite {
-    width: 50px;
-    height: 50px;
-    background-image: image-url("welcome-sprite.svg");
-    background-size: 400px 50px;
-  }
-
-  .sprite.x {
-    /*rtl:ignore*/ background-position: -50px 0;
-  }
-
-  .sprite.node {
-    /*rtl:ignore*/ background-position: -100px 0;
-  }
-
-  .sprite.way {
-    /*rtl:ignore*/ background-position: -150px 0;
-  }
-
-  .sprite.tag {
-    /*rtl:ignore*/ background-position: -200px 0;
-  }
-
-  .sprite.editor {
-    /*rtl:ignore*/ background-position: -250px 0;
-  }
-
-  .sprite.question {
-    /*rtl:ignore*/ background-position: -300px 0;
-  }
-
-  .sprite.rules {
-    /*rtl:ignore*/ background-position: -350px 0;
-  }
-}
-
 /* Rules for the "About" page */
 
 .site-about #content {
index 3458999a6dc83902d6e75095251b780c263a4622..0224fd3ea89d82a55a4de32fed27df6e3325d1d6 100644 (file)
@@ -1,6 +1,9 @@
 <h2><%= t ".title" %></h2>
 <div class='d-flex align-items-center gap-2'>
-  <span class='flex-shrink-0 align-self-start sprite question'></span>
+  <svg width='50' height='50' viewBox='0 0 100 100' class='flex-shrink-0 align-self-start'>
+    <circle cx="50" cy="50" r="45" fill="#7092ff" />
+    <path d="M44.42 54.95q0-3 1.26-5.04 1.26-2.04 4.32-4.26 2.7-1.92 3.84-3.3 1.2-1.44 1.2-3.36 0-1.92-1.44-2.88-1.38-1.02-3.9-1.02-2.52 0-4.98.78-2.46.78-5.04 2.1l-3.18-6.42q2.94-1.62 6.36-2.64 3.42-1.02 7.5-1.02 6.24 0 9.66 3 3.48 3 3.48 7.62 0 2.46-.78 4.26-.78 1.8-2.34 3.36-1.56 1.5-3.9 3.24-1.74 1.26-2.7 2.16-.96.9-1.32 1.74-.3.84-.3 2.1v1.74h-7.74zm-.96 12.18q0-2.76 1.5-3.84 1.5-1.14 3.66-1.14 2.1 0 3.6 1.14 1.5 1.08 1.5 3.84 0 2.64-1.5 3.84-1.5 1.14-3.6 1.14-2.16 0-3.66-1.14-1.5-1.2-1.5-3.84z" fill="#fff" />
+  </svg>
   <p><%= t ".paragraph_1_html", :help_link => link_to(t(".get_help_here"), help_path),
                                 :welcome_mat_link => link_to(t(".welcome_mat"), t(".welcome_mat_url")) %></p>
 </div>
index 22783ce2d19de49fbbe44a8d2ca6f4a143b3045a..33c9a7e24609f10427ef84759a89bec893d3d5b7 100644 (file)
 
 <div class='row'>
   <div class='col-sm'>
-    <span class='d-block mx-auto sprite check'></span>
+    <svg width='50' height='50' viewBox='0 0 100 100' class='d-block mx-auto'>
+      <circle cx="50" cy="50" r="45" fill="#70cd8f" />
+      <path d="M31 46h-2l-3 3v2l14 14 5 5 5-5 25-25v-2l-3-3h-2l-25 25z" fill="#fff" />
+    </svg>
     <p><%= t ".whats_on_the_map.on_the_map_html", :real_and_current => tag.em(t(".whats_on_the_map.real_and_current")) %></p>
   </div>
   <div class='col-sm'>
-    <span class='d-block mx-auto sprite x'></span>
+    <svg width='50' height='50' viewBox='0 0 100 100' class='d-block mx-auto'>
+      <circle cx="50" cy="50" r="45" fill="#cd7070" />
+      <path d="M35 30h-2l-3 3v2l15 15-15 15v2l3 3h2l15-15 15 15h2l3-3v-2l-15-15 15-15v-2l-3-3h-2l-15 15z" fill="#fff" />
+    </svg>
     <p><%= t ".whats_on_the_map.off_the_map_html", :doesnt => tag.em(t(".whats_on_the_map.doesnt")) %></p>
   </div>
 </div>
 
 <ul class='list-unstyled'>
   <li class='d-flex align-items-center gap-2 mb-2'>
-    <span class='flex-shrink-0 align-self-start sprite editor'></span>
+    <svg width='50' height='50' viewBox='0 0 100 100' class='flex-shrink-0 align-self-start'>
+      <path d="M19.728 30.552l19.834-15.219L80 65l-19.834 15.219z" fill="#7092ff" opacity=".5" />
+      <path d="M10.597 18.651l19.834-15.219 6.088 7.934-19.834 15.219zm52.613 65.535l19.834-15.219 1.198 17.988-3.967 3.044z" fill="#7092ff" />
+    </svg>
     <span><%= t ".basic_terms.an_editor_html", :editor => tag.strong(t(".basic_terms.editor")) %></span>
   </li>
   <li class='d-flex align-items-center gap-2 mb-2'>
-    <span class='flex-shrink-0 align-self-start sprite node'></span>
+    <svg width='50' height='50' viewBox='0 0 100 100' class='flex-shrink-0 align-self-start'>
+      <path d="M50 5c-20.71 0-37.5 16.789-37.5 37.5s37.5 52.5 37.5 52.5 37.5-31.789 37.5-52.5-16.789-37.5-37.5-37.5z" fill="#7092ff" />
+      <circle cx="50" cy="42.5" r="15" fill="#fff" />
+    </svg>
     <span><%= t ".basic_terms.a_node_html", :node => tag.strong(t(".basic_terms.node")) %></span>
   </li>
   <li class='d-flex align-items-center gap-2 mb-2'>
-    <span class='flex-shrink-0 align-self-start sprite way'></span>
+    <svg width='50' height='50' viewBox='0 0 100 100' class='flex-shrink-0 align-self-start'>
+      <line x1="20" y1="80" x2="80" y2="20" stroke="#7092ff" stroke-width="15" />
+      <circle cx="20" cy="80" r="15" fill="#7092ff" />
+      <circle cx="80" cy="20" r="15" fill="#7092ff" />
+      <circle cx="20" cy="80" r="7" fill="#fff" />
+      <circle cx="80" cy="20" r="7" fill="#fff" />
+    </svg>
     <span><%= t ".basic_terms.a_way_html", :way => tag.strong(t(".basic_terms.way")) %></span>
   </li>
   <li class='d-flex align-items-center gap-2 mb-2'>
-    <span class='flex-shrink-0 align-self-start sprite tag'></span>
+    <svg width='50' height='50' viewBox='0 0 100 100' class='flex-shrink-0 align-self-start'>
+      <path d="M25 87l-20-20v-29l20-20h68l2 2v65l-2 2z" fill="#7092ff" />
+      <rect width="10" height="15" x="15" y="45" rx="3" ry="2.25" fill="#fff" />
+    </svg>
     <span><%= t ".basic_terms.a_tag_html", :tag => tag.strong(t(".basic_terms.tag")) %></span>
   </li>
 </ul>
 
 <h2><%= t ".rules.title" %></h2>
 <div class='d-flex align-items-center gap-2'>
-  <span class='flex-shrink-0 align-self-start sprite rules'></span>
+  <svg width='50' height='50' viewBox='0 0 100 100' class='flex-shrink-0 align-self-start'>
+    <circle cx="50" cy="50" r="45" fill="#7092ff" />
+    <path d="M41.072 49.28q0-2.4 1.152-3.84 1.152-1.488 2.64-2.208-1.728-.96-2.688-2.256-.96-1.344-.96-3.264 0-2.88 2.448-4.512 2.448-1.68 7.008-1.68 2.688 0 4.56.48 1.872.432 3.648 1.152l-1.296 3.216q-1.632-.672-3.264-1.104-1.632-.48-3.936-.48-2.88 0-4.08.768-1.152.72-1.152 2.064 0 1.344 1.344 2.304 1.344.912 4.992 2.256 3.696 1.344 5.76 3.072 2.064 1.728 2.064 4.608 0 2.448-1.104 4.032-1.104 1.536-2.496 2.352 1.68.912 2.592 2.208.96 1.248.96 3.072 0 3.312-2.784 5.136-2.736 1.824-7.68 1.824-2.64 0-4.608-.384-1.968-.432-3.504-1.2v-3.6q1.536.72 3.792 1.344 2.256.624 4.512.624 3.552 0 4.896-1.008 1.344-1.056 1.344-2.4 0-.912-.48-1.584-.432-.672-1.776-1.392-1.296-.768-3.936-1.728-2.496-.96-4.32-1.968-1.776-1.008-2.736-2.4-.912-1.392-.912-3.504zm3.6-.48q0 1.776 1.488 3.024 1.536 1.2 5.376 2.64l1.056.384q1.104-.672 2.064-1.68 1.008-1.056 1.008-2.688 0-1.2-.672-2.16-.624-.96-2.256-1.824-1.632-.912-4.608-1.824-1.344.336-2.4 1.44-1.056 1.104-1.056 2.688z" fill="#fff" stroke="#fff" />
+  </svg>
   <p><%= t ".rules.para_1_html", :imports_link => link_to(t(".rules.imports"), t(".rules.imports_url")),
                                  :automated_edits_link => link_to(t(".rules.automated_edits"), t(".rules.automated_edits_url")) %></p>
 </div>