Kas ir EJS un kāpēc man tas ir vajadzīgs?

Kas ir EJS un kāpēc man tas ir vajadzīgs?

Tīmekļa izstrādē izstrādātājiem ir pieejami daudzi rīki, no kuriem izvēlēties. Pareizu rīku un tehnoloģiju izvēle var būtiski ietekmēt projektu efektivitāti un funkcionalitāti. Viens no populārākajiem tīmekļa izstrādes rīkiem ir EJS, kas apzīmē Embedded JavaScript . EJS ir vienkārša JavaScript veidņu valoda, kas ģenerē HTML ar vienkāršu JavaScript. Šajā rakstā mēs apskatīsim, kas ir EJS, kāpēc tas ir nepieciešams, tā funkcijas, kā to instalēt, un sniegsim piemēru ar izvadi.

Kas ir EJS

EJS jeb Embedded JavaScript ir JavaScript veidņu dzinējs, kas tiek izmantots tīmekļa izstrādei un ļauj lietotājiem ģenerēt dinamisku HTML marķējumu, izmantojot JavaScript kodu HTML veidnēs. Tas ir izstrādāts, lai vienkāršotu dinamiska satura renderēšanas procesu tīmekļa lietojumprogrammās. Tas satur HTML un JavaScript sajaukumu, kas atvieglo dinamiska satura ģenerēšanu, pamatojoties uz datiem no jūsu lietojumprogrammas.

EJS iezīmes

  • Vienkārša sintakse: EJS piedāvā vienkāršu sintaksi, kas apvieno HTML un JavaScript, padarot to viegli apgūstamu un lietojamu.
  • Dinamiskais saturs: EJS ļauj dinamiski ģenerēt HTML un JavaScript saturu HTML tagos, uzlabojot elastību satura veidošanā.
  • Izkārtojums un daļas: EJS atbalsta izkārtojumus un daļas, ļaujot lietotājiem sadalīt veidnes atkārtoti lietojamos komponentos, samazinot koda dublēšanos un uzlabojot apkopi.
  • Kļūdu apstrāde: EJS nodrošina kļūdu ziņojumus, kas palīdz izstrādātājiem veikt atkļūdošanu, uzlabojot vispārējo izstrādes pieredzi.

Kāpēc jums ir nepieciešams EJS?

  • Dinamiskā HTML ģenerēšana: EJS ļauj ģenerēt dinamisku HTML saturu, pamatojoties uz mainīgajiem, nosacījumiem, cilpām un citu JavaScript loģiku. Tas ir īpaši noderīgi, lai renderētu dinamiskus datus, kas iegūti no datu bāzēm vai API.
  • Koda atkārtota izmantošana: Izmantojot EJS veidnes, varat izveidot atkārtoti lietojamus komponentus vai daļas, kuras var iekļaut vairākās lapās. Tas veicina koda modularitāti un samazina dublēšanos jūsu tīmekļa lietojumprogrammās.
  • Servera puses renderēšana: Izmantojot EJS, varat veikt tīmekļa lapu servera puses renderēšanu (SSR). SSR ir izdevīga SEO (Search Engine Optimization), jo ļauj meklētājprogrammām efektīvāk pārmeklēt un indeksēt jūsu saturu, salīdzinot ar klienta puses renderēšanu (CSR), ko veic tādas sistēmas kā React vai Angular.
  • Vienkārša integrācija ar Node.js un Express.js: EJS nemanāmi integrējas ar Node.js un Express.js, padarot to par populāru izvēli izstrādātājiem, kuri strādā ar servera puses JavaScript lietojumprogrammām. To ir viegli iestatīt un lietot Express.js projektā.
  • Pazīstama sintakse: Ja jau esat iepazinies ar HTML un JavaScript, EJS apguve un lietošana ir vienkārša. Sintakse ir līdzīga HTML ar iegultu JavaScript kodu > tagus, padarot to pieejamu izstrādātājiem ar dažādu prasmju līmeni.
  • Veidņu pārmantošana un izkārtojumi: EJS atbalsta veidņu pārmantošanu un izkārtojumus, ļaujot jums izveidot konsekventus izkārtojumus jūsu tīmekļa lapām. Varat definēt pamata izkārtojumu un paplašināt to citās veidnēs, atvieglojot konsekventa izskata un darbības saglabāšanu visā lietojumprogrammā.

Kā lietot EJS?

1. darbība: Instalējiet EJS kā atkarību savā projektā

 npm install ejs 

2. darbība: Izveidojiet mapi “skati” sava projekta direktorijā, ja tā vēl neeksistē. Skatu mapē izveidojiet jaunu failu ar paplašinājumu .ejs, piemēram, index.ejs

3. darbība: Lai lietojumprogrammā Express.js integrētu EJS ar Express, iestatiet EJS kā skatīšanas programmu savas Express lietojumprogrammas konfigurācijā. Šī konfigurācija ļauj Express izmantot EJS skatu renderēšanai.

app.set('view engine', 'ejs'); 

4. darbība: Renderējiet EJS veidni, jūsu Express maršruta apstrādātājos mēs renderējam EJS veidni, izmantojot 'res.render()' un sniedziet nepieciešamos datus, kas jānodod veidnei.

res.render('hello', { name: 'Geeks' }); 

Projekta struktūra:

projekta_direktorijs

Atjauninātās atkarības pack.json fails izskatīsies šādi:

'dependencies': {  'ejs': '^3.1.9',  'express': '^4.18.2'  } 

Piemērs: Īstenošana, lai demonstrētu ejs izmantošanu ar piemēru.

HTML
          EJS Piemēra nosaukums> head> <body>  <h1>Sveiki, <%= name %>!h1> body> html>>> </tag>JavaScript <tag data-text-1='// index.js  const express = require('express'); const app = express(); const port = 3000; app.set('view engine', 'ejs'); app.get('/', (req, res) =>{ res.render('hello', { name: 'Geeks' }); }); app.listen(port, () => { console.log(`Serveris darbojas vietnē http://localhost:${port}`); });>> </tag>  <p dir='ltr'>  <b>  <strong>Solis, lai palaistu lietojumprogrammu: </strong>  </b>  <span>Palaidiet lietojumprogrammu, izmantojot šo komandu no projekta saknes direktorija </span> </p>  <tag data-text-3='node index.js </pre>  </code> <p dir='ltr'>  <b>  <strong>Izvade: </strong>  </b>  <span>Jūsu projekts tiks parādīts URL http://localhost:3000/ </span> </p>  <p dir='ltr'> <img src='//techcodeview.com/img/ejs-templating-language/39/what-is-ejs-why-do-i-need-it-2.webp' alt='izvade'> </p>  <br>  <br>
                     </div>

                     <!-- Article Footer with Prominent Share Buttons -->
                     <div class="px-6 md:px-8 py-8 bg-slate-50 dark:bg-slate-900/50 border-t border-slate-200 dark:border-slate-700/50">
                          <div class="flex flex-col sm:flex-row items-center justify-between gap-6">
                              <h4 class="text-base font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wide flex items-center gap-2">
                                 <i class="fa fa-share-alt text-tech-500"> </i>
                                Kopīgot                              </h4>
                             
                              <div class="flex flex-wrap justify-center gap-3">
                                 <!-- Twitter -->
                                 <a href="https://twitter.com/intent/tweet?text=Kas ir EJS un kāpēc man tas ir vajadzīgs?&url=https://www.techcodeview.com/lv/what-is-ejs-why-do-i-need-it" 
                                   target="_blank" rel="noopener noreferrer" 
                                   class="flex items-center gap-2 px-6 py-3 rounded-xl bg-[#1DA1F2]/10 text-[#1DA1F2] hover:bg-[#1DA1F2] hover:text-white transition-all duration-300 font-bold text-sm">
                                     <i class="fa fa-twitter text-lg"> </i>
                                     <span class="hidden sm:inline">Twitter </span>
                                 </a>

                                 <!-- Facebook -->
                                 <a href="https://www.facebook.com/sharer/sharer.php?u=https://www.techcodeview.com/lv/what-is-ejs-why-do-i-need-it" 
                                   target="_blank" rel="noopener noreferrer"
                                   class="flex items-center gap-2 px-6 py-3 rounded-xl bg-[#4267B2]/10 text-[#4267B2] hover:bg-[#4267B2] hover:text-white transition-all duration-300 font-bold text-sm">
                                     <i class="fa fa-facebook text-lg"> </i>
                                     <span class="hidden sm:inline">Facebook </span>
                                 </a>
                                
                                 <!-- LinkedIn -->
                                 <a href="https://www.linkedin.com/shareArticle?mini=true&url=https://www.techcodeview.com/lv/what-is-ejs-why-do-i-need-it&title=Kas ir EJS un kāpēc man tas ir vajadzīgs?" 
                                   target="_blank" rel="noopener noreferrer"
                                   class="flex items-center gap-2 px-6 py-3 rounded-xl bg-[#0077b5]/10 text-[#0077b5] hover:bg-[#0077b5] hover:text-white transition-all duration-300 font-bold text-sm">
                                     <i class="fa fa-linkedin text-lg"> </i>
                                     <span class="hidden sm:inline">LinkedIn </span>
                                 </a>
                              </div>
                          </div>
                     </div>
                </article>

                <!-- Comments Placeholder / Random Articles -->
                <div class="mt-8 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-xl p-6 md:p-8 shadow-sm">
                     <h3 class="text-xl font-bold text-slate-900 dark:text-white mb-6 uppercase tracking-wide border-b border-slate-200 dark:border-slate-700 pb-2">
                        Jums Varētu Patikt                     </h3>
                     <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                         <div class="group">
                              <a href="/lv/linear-search-algorithm" class="block aspect-video rounded-lg overflow-hidden bg-slate-200 dark:bg-slate-700 mb-3">
                                 <img loading="lazy" src="https://techcodeview.com/img/ds-tutorial/52/linear-search-algorithm.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Lineārās meklēšanas algoritms" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                              </a>
                              <h4 class="font-bold text-slate-900 dark:text-white leading-tight group-hover:text-tech-500 transition-colors">
                                 <a href="/lv/linear-search-algorithm">Lineārās meklēšanas algoritms </a>
                              </h4>
                         </div> <div class="group">
                              <a href="/lv/memory-management-operating-system" class="block aspect-video rounded-lg overflow-hidden bg-slate-200 dark:bg-slate-700 mb-3">
                                 <img loading="lazy" src="https://techcodeview.com/img/operating-system/05/memory-management-operating-system.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Atmiņas pārvaldība operētājsistēmā (OS)" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                              </a>
                              <h4 class="font-bold text-slate-900 dark:text-white leading-tight group-hover:text-tech-500 transition-colors">
                                 <a href="/lv/memory-management-operating-system">Atmiņas pārvaldība operētājsistēmā (OS) </a>
                              </h4>
                         </div>
                     </div>
                </div>
             </div>

             <!-- SECONDARY COLUMN (SIDEBAR) -->
             <!-- Aside Column -->
 <div class="lg:col-span-4 space-y-8">
	
	 <!-- Best Articles Widget -->
	 <div class="rounded-xl bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 p-6 shadow-sm">
		 <div class="mb-4 border-b border-slate-100 dark:border-slate-700 pb-2">
			 <h2 class="text-lg font-bold text-slate-900 dark:text-white uppercase tracking-wide flex items-center">
                 <span class="mr-2 h-2 w-2 rounded-full bg-tech-500"> </span>
                Top Raksti             </h2>
		 </div>
		
		 <!-- Owl Carousel Preserved Container -->
		 <div id="owl-carousel-3" class="owl-carousel owl-theme center-owl-nav">
			 <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/23-types-doctors-131964">
						 <img src="https://techcodeview.com/img/blog/62/23-types-doctors.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="23 ārstu veidi un viņu darbības" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/23-types-doctors-131964" class="hover:text-tech-500 transition-colors line-clamp-3">23 ārstu veidi un viņu darbības </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/java-variable-declaration">
						 <img src="https://techcodeview.com/img/java-tutorial/56/java-variable-declaration.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Java mainīgā deklarācija" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/java-variable-declaration" class="hover:text-tech-500 transition-colors line-clamp-3">Java mainīgā deklarācija </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/latex-fractions">
						 <img src="https://techcodeview.com/img/latex-tutorial/76/latex-fractions.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Lateksa frakcijas" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/latex-fractions" class="hover:text-tech-500 transition-colors line-clamp-3">Lateksa frakcijas </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/how-find-an-angle-right-angled-triangle">
						 <img src="https://techcodeview.com/img/maths-calculators/87/how-find-an-angle-right-angled-triangle.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Kā atrast leņķi taisnleņķa trīsstūrī?" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/how-find-an-angle-right-angled-triangle" class="hover:text-tech-500 transition-colors line-clamp-3">Kā atrast leņķi taisnleņķa trīsstūrī? </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/linux-traceroute-command">
						 <img src="https://techcodeview.com/img/linux-networking/69/linux-traceroute-command.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Linux traceroute komanda" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/linux-traceroute-command" class="hover:text-tech-500 transition-colors line-clamp-3">Linux traceroute komanda </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/mylivecricket-alternatives">
						 <img src="https://techcodeview.com/img/alternatives/03/mylivecricket-alternatives.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="MyLiveCricket alternatīvas" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/mylivecricket-alternatives" class="hover:text-tech-500 transition-colors line-clamp-3">MyLiveCricket alternatīvas </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/whats-difference-131384">
						 <img src="https://techcodeview.com/img/blog/74/whats-difference.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Kāda atšķirība? Svērtais un nesvērtais GPA" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/whats-difference-131384" class="hover:text-tech-500 transition-colors line-clamp-3">Kāda atšķirība? Svērtais un nesvērtais GPA </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/types-relationship-dbms">
						 <img src="https://techcodeview.com/img/dbms-tutorial/19/types-relationship-dbms.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Attiecību veidi DBVS" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/types-relationship-dbms" class="hover:text-tech-500 transition-colors line-clamp-3">Attiecību veidi DBVS </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/how-create-file-java">
						 <img src="https://techcodeview.com/img/java-misc/22/how-create-file-java.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Kā izveidot failu Java" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/how-create-file-java" class="hover:text-tech-500 transition-colors line-clamp-3">Kā izveidot failu Java </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE --> <!-- ARTICLE -->
			 <article class="flex items-start gap-4 p-2 hover:bg-slate-50 dark:hover:bg-slate-700/50 rounded-lg transition-colors">
				 <div class="w-20 h-20 shrink-0 overflow-hidden rounded-md bg-slate-200 dark:bg-slate-700">
					 <a href="/lv/how-fixandroid-process-acorehas-stopped-errors-android">
						 <img src="https://techcodeview.com/img/android-tutorial/04/how-fixandroid-process-acorehas-stopped-errors-android.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Kā labot “android process acore” ir apturējis kļūdas operētājsistēmā Android:" class="w-full h-full object-cover">
					 </a>
				 </div>
				 <div class="flex-1 min-w-0">
					 <h4 class="text-sm font-semibold text-slate-800 dark:text-slate-200 leading-snug">
                         <a href="/lv/how-fixandroid-process-acorehas-stopped-errors-android" class="hover:text-tech-500 transition-colors line-clamp-3">Kā labot “android process acore” ir apturējis kļūdas operētājsistēmā Android: </a>
                     </h4>
				 </div>
			 </article>
			 <!-- /ARTICLE -->
		 </div>
		

         <!-- Categories -->
		 <div class="mt-8 mb-4 border-b border-slate-100 dark:border-slate-700 pb-2">
			 <h2 class="text-lg font-bold text-slate-900 dark:text-white uppercase tracking-wide">Kategorija </h2>
		 </div>
		 <div class="flex flex-wrap gap-2">
             <a href="/lv/blog/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Emuārs
             </a> <a href="/lv/java-conversion/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Java Konvertēšana
             </a> <a href="/lv/maths/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Matemātika
             </a> <a href="/lv/java-collections/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Java Kolekcijas
             </a> <a href="/lv/differences/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Atšķirības
             </a> <a href="/lv/java-string/" class="inline-block px-3 py-1 bg-slate-100 dark:bg-slate-700 text-xs font-medium text-slate-600 dark:text-slate-300 rounded-full hover:bg-tech-500 hover:text-white transition-colors">
                Java Virkne
             </a>
         </div>

         <!-- Interesting Articles Widget -->
		 <div class="mt-8">
			 <div class="mb-4 border-b border-slate-100 dark:border-slate-700 pb-2">
				 <h2 class="text-lg font-bold text-slate-900 dark:text-white uppercase tracking-wide">Interesanti Raksti </h2>
			 </div>
			
			 <div id="owl-carousel-4" class="owl-carousel owl-theme">
				 <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/get-informed/96/explained-what-is-fortnite-battle-royale.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Paskaidrots: Kas ir Fortnite Battle Royale?" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/lv/get-informed/">Saņemiet Informāciju </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/lv/explained-what-is-fortnite-battle-royale-2426">Paskaidrots: Kas ir Fortnite Battle Royale? </a> </h4>
					 </div>
				 </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/html-tags/55/html-tag.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="HTML tags" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/lv/html-tags/">Html Tagi </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/lv/html-tag">HTML tags </a> </h4>
					 </div>
				 </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/blog/86/complete-list-extracurricular-activities.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Pilns ārpusskolas aktivitāšu saraksts: 100 piemēru" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/lv/blog/">Emuārs </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/lv/complete-list-extracurricular-activities-13188">Pilns ārpusskolas aktivitāšu saraksts: 100 piemēru </a> </h4>
					 </div>
				 </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/html-xml/79/xhtml-introduction.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="XHTML ievads" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/lv/html-xml/">Html Un Xml </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/lv/xhtml-introduction">XHTML ievads </a> </h4>
					 </div>
				 </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/javascript-tutorial/95/confirm-password-validation-javascript.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Apstipriniet paroles apstiprināšanu JavaScript" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/lv/javascript-tutorial/">Javascript Apmācība </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/lv/confirm-password-validation-javascript">Apstipriniet paroles apstiprināšanu JavaScript </a> </h4>
					 </div>
				 </article>
				 <!-- /ARTICLE --> <!-- ARTICLE -->
				 <article class="relative aspect-video rounded-lg overflow-hidden group mb-2">
					 <div class="absolute inset-0">
						 <img src="https://techcodeview.com/img/blog/79/incomplete-dominance-vs-codominance.webp" onerror="this.onerror=null; this.src='https://techcodeview.com/template/assets/images/unnamed.webp'" alt="Nepilnīga dominēšana vs līdzdominance: kāda ir atšķirība?" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500">
                         <div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent"> </div>
					 </div>
					 <div class="absolute bottom-0 left-0 p-4">
						 <div class="text-xs text-tech-400 font-bold mb-1"> <a href="/lv/blog/">Emuārs </a> </div>
						 <h4 class="text-sm font-bold text-white leading-tight"> <a href="/lv/incomplete-dominance-vs-codominance-131696">Nepilnīga dominēšana vs līdzdominance: kāda ir atšķirība? </a> </h4>
					 </div>
				 </article>
				 <!-- /ARTICLE -->
			 </div>
		 </div>
	 </div>
 </div>
 <!-- /Aside Column -->         </div>
        </div>
     </div>

 <footer class="site-footer">
         <div class="container">
             <span class="footer-links">
                Copyright ©2026 Visas Tiesības Aizsargātas | 
                 <a href="//www.techcodeview.com/no/">techcodeview.com </a> | 
                 <a href="/disclaimer" rel="nofollow noopener noreferrer" target="_blank">Atruna </a> | 
                 <a href="/about-us" rel="nofollow noopener noreferrer" target="_blank">Par Mums </a> | 
                 <a href="/privacy-policy" rel="nofollow noopener noreferrer" target="_blank">Privātuma Politika </a> 
             </span>
         </div>
     </footer>
 
     <script type="text/javascript" src="https://techcodeview.com/template/assets/plugins/jquery-1.11.3.min.js"> </script>
     <script type="text/javascript" src="https://techcodeview.com/template/assets/plugins/bootstrap/js/bootstrap.min.js"> </script>    
     <script type="text/javascript" src="https://techcodeview.com/template/assets/js/main.js"> </script>     
	 <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"> </script>
	 <script>
    !function(){"use strict";let t=document.createElement("button");t.id="toTopBtn",t.innerHTML="↑";let e=`
        #toTopBtn {
            position: fixed; bottom: 25px; right: 25px; z-index: 9999; opacity: 0; visibility: hidden; background-color: #0ea5e9; color: white; border: none; border-radius: 8px; width: 50px; height: 50px; font-size: 24px; cursor: pointer; transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        }
        #toTopBtn:hover { background-color: #0284c7; }
    `,i=document.createElement("style");i.type="text/css",i.innerText=e,document.head.appendChild(i),document.body.appendChild(t),window.addEventListener("scroll",()=>{let e=window.scrollY||document.documentElement.scrollTop;e>300?(t.style.opacity="1",t.style.visibility="visible"):(t.style.opacity="0",t.style.visibility="hidden")}),t.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})})}();
     </script>
 </body>
 </html>