اذهب إلى المحتوى

tdimdev

الأعضاء
  • المساهمات

    12
  • تاريخ الانضمام

  • تاريخ آخر زيارة

أجوبة بواسطة tdimdev

  1. السلام عليكم

    انا اواجه مشكلة عند تضمين ملف html داخل تطبيق اندرويد ليتم عرضه 

    المشكلة هي انه عند عرض الملف اذا كان يحتوي علي هذا الكود 

    <p>&#9974;</p>

    يتم عرض الكود  علي هذا شكل 𕙧 وليس هكذا ⛶ 

    اذا ماذا يمكن ان افعل ؟ أرجو حلا سريع !

  2. لماذا لا يتم تحديد كل الصور 

    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <style>
    *{margin:0;outline:none}
    img{width:200px}
    </style>
    </head>
    <body>
    <center>
    <input type='file' accept="image/*" id='file'/><br>
              <img    id="out1" title="logo"><br>
              <img class="out1" title="logo"><br>
              <img class="out1" title="logo"><br>
    </center>
        <script>
          function getBase64(file) {
            var reader = new FileReader();
            reader.readAsDataURL(file);
            reader.onload = function () {
              console.log(reader.result.substring(0,100));
              document.getElementById('out1').src = reader.result;
              //لماذا لا يتم تحديد الكل
              document.querySelectorAll('.out1').src = reader.result;
            };
            reader.onerror=function(error){
              console.log('Error:',error);
            };
          }
          document.getElementById('file').addEventListener('change', function(event){
            const file = event.target.files[0];
            getBase64(file);
          });
        </script>
      </body>
    </html>

     

  3. انا معي قوالب html,css,js واريد تحويلها قالب يعمل مع بلوجر{xml}

    مثلا هذا الكود

    <!DOCTYPE html>
    <html lang="en" >
    <head>
      <meta charset="UTF-8">
      <title>Basic Drag and Drop</title>
    <style>
    body {
      font-size: 0.8em;
    }
    [data-draggable="target"] {
      float: left;
      list-style-type: none;
      width: 42%;
      height: 7.5em;
      overflow: hidden;
      margin: 0 0.5em 0.5em 0;
      padding: 0.5em;
      border-radius: 0.2em;
      background: #ddd;
      box-sizing: border-box;
    }
    [data-draggable="target"].dragging {
      background: #eee;
      border: 3px dashed #0088ff;
    }
    [data-draggable="item"] {
      float: left;
      max-width: 50px;
      cursor: pointer;
      list-style-type: none;
      background: #0088ff;
      padding: 2em;
      margin: 5px;
      border-radius: 0.2em;
      line-height: 1.3;
    }
    </style>
    </head>
    <body>
    <ol data-draggable="target">
      <li data-draggable="item"></li>
      <li data-draggable="item"></li></ol>
    
    <ol data-draggable="target">
      <li data-draggable="item"></li>
      <li data-draggable="item"></li>
    </ol>
    
    <ol data-draggable="target">
      <li data-draggable="item"></li>
      <li data-draggable="item"></li>
    </ol>
    
    <ol data-draggable="target">
      <li data-draggable="item"></li>
      <li data-draggable="item"></li>
    </ol>
      <script>
    (function()
    {
    	if (!document.querySelectorAll || !('draggable' in document.createElement('span')) ||  window.opera) { 
        return; 
      }
    	for (var 
        items = document.querySelectorAll('[data-draggable="item"]'), 
    		len = items.length, 
    		i = 0; i < len; i ++) {
    		  items[i].setAttribute('draggable', 'true');
      }
    	var item = null;
    	document.addEventListener('dragstart', function(e) {
    		item = e.target;
    		e.dataTransfer.setData('text', '');
    	}, false);
    	document.addEventListener('dragover', function(e) {
    		if (item) e.preventDefault();
    	});	
      document.addEventListener('dragenter', function(e){
        if(e.target.getAttribute('data-draggable') == 'target') {
          e.target.className = 'dragging';
        }
      });
      document.addEventListener('dragleave', function(e){
        if(e.target.getAttribute('data-draggable') == 'target') {
          e.target.className =  '';
        }
      });
    	document.addEventListener('drop', function(e)	{
    		if(e.target.getAttribute('data-draggable') == 'target') {
    			e.target.appendChild(item);
                e.target.className =  '';
    			e.preventDefault();
    		}
    	});
    	document.addEventListener('dragend', function(e) {
    		item = null;
    	});
    })();
    </script>
    
    </body>
    </html>

    لكنني جربت طرق كثيرة ولاكن بلوجر يعطيني اخطاء

  4. السلام عليكم اخوتي الاعزاء مشاهدين هذا الطلب 

    هذا كود لأدة تحويل كود الوان hex الي كود الوان rgb علام اعتقد ان الخطا في javascript ولا استطيع اصلاحة واتمني ان يصلحه احد لي وشكرا

    <style>
    @import url("https://fonts.googleapis.com/css?family=Montserrat:400,400i,700");
    :root {
      --shortTiming: 0.3s;
      --timing: 1.5s;
      --longTiming: 3s;
      --converter-color: white;
    }
    
    body {
      margin: 0;
      padding: 0;
      width: 100vw;
      overflow-x: hidden;
      box-sizing: border-box;
      font-family: "Montserrat";
      background: #f5f5f5;
    }
    body *,
    body *:after,
    body *:before {
      box-sizing: inherit;
    }
    
    * {
      position: relative;
    }
    .color-block {
      width: 100px;
      height: 100%;
      background: var(--color-block-bg);
      border-radius: 8px;
      box-shadow: 0 0.5vmin 1vmin rgba(0, 0, 0, 0.1);
      margin-bottom: 2rem;
    }
    
    #converter .error {
      color: #e57373;
    }
    #converter .color-block {
      display: flex;
      justify-content: center;
      align-items: center;
      background: var(--converter-color);
      width: 300px;
      height: 100px;
    }
    #converter .converter__hex {
      display: flex;
      height: 4rem;
      align-items: center;
      border-radius: 8px;
      max-width: 400px;
      overflow: hidden;
      background: #37474f;
      color: white;
    }
    #converter .converter__hex .hash {
      padding: 10px;
      width: 30px;
      display: inline-block;
    }
    #converter .converter__hex input {
      flex: 2;
      min-width: 100px;
      height: 100%;
      font-size: 2rem;
      padding-left: 10px;
      letter-spacing: 5px;
      color: #37474f;
      margin: 0;
    }
    #converter .converter__hex button {
      border: none;
      margin: 0;
      -webkit-appearance: button;
      height: 100%;
      flex: 1;
      background: #9575cd;
      outline: none;
      color: white;
      font-size: 1rem;
    }
    #converter .converter__hex button:hover {
      background: #37474f;
    }
    
    </style>
    	<div class="divider from-guide">
    		👍
    		<h3>Great work, You did it!!!</h3>
    	</div>
    	<section class="converter">
    		<h2>In case you didnt do the math with us</h2>
    		<p>Here is a hex to rgb converter that uses the above algorithm.</p>
    		<div id="converter">
    			<h3>Hex 2 RGB Converter</h3>
    			<div class="converter__wrapper">
    				<div class="color-block">rgb(255,255,255)</div>
    				<div class="converter__hex">
    					<span class="hash">#</span> <input type="text" />
    					<button>convert</button>
    				</div>
    				<div class="error"></div>
    			</div>
    		</div>
    <script>
    
    //converter
    const newError = msg => {
    	const errorTag = document.querySelector(".error");
    	errorTag.innerHTML = msg;
    };
    const removeError = () => {
    	const errorTag = document.querySelector(".error");
    	errorTag.innerHTML = "";
    };
    const base16 = {
    	0: 0,
    	1: 1,
    	2: 2,
    	3: 3,
    	4: 4,
    	5: 5,
    	6: 6,
    	7: 7,
    	8: 8,
    	9: 9,
    	a: 10,
    	b: 11,
    	c: 12,
    	d: 13,
    	e: 14,
    	f: 15
    };
    
    const convertBtn = document.querySelector("#converter button");
    convertBtn.addEventListener("click", function() {
    	removeError();
    	const input = document.querySelector("#converter input").value;
    	if (input.length !== 6) return newError("must have exactly 6 values");
    	const hex = input.split("");
    	const r = hex
    		.splice(0, 2)
    		.map((n, index) => (index === 1 ? base16[n] : 16 * base16[n]))
    		.reduce((total, n) => total + n, 0);
    	const g = hex
    		.splice(0, 2)
    		.map((n, index) => (index === 1 ? base16[n] : 16 * base16[n]))
    		.reduce((total, n) => total + n, 0);
    	const b = hex
    		.splice(0, 2)
    		.map((n, index) => (index === 1 ? base16[n] : 16 * base16[n]))
    		.reduce((total, n) => total + n, 0);
    
    	if (isNaN(r) || isNaN
  5. شكرا لك اخي حران المري قد يفيدني هذا الموقع 

    لكن احتاج احد يستطيع انشاء محرر اعلم انها صعبة وانا املك كود لمحرر وهو يعمل بدون انترنت لكن بعد التحرير لا يقوم بحفظ النصوص البرمجية ولا استطيع تحميلها

    • أعجبني 1
  6. اخوتي الاعزاء مشاهدين هذا الطلبات اتمني ان تجاوبوا عليها :>

    • ما هو افضل موقع لتحرير وعرض النصوص البرمجية اونلاين مجانا؟ 

    او

    • اريد كود لإنشاء "موقع تحرير وعرض النصوص البرمجية " ويكون بلغتي htmlوcss وتكون الشاشة منقسمة الي نصفين النصف الايمن هو مكان المفسر به الكود   والجانب الايسر به محررالاكواد

    وشكراااااااااااااا لمن يقدم المساعدة!

×
×
  • أضف...