Customized Navigation

Ngatitore saiti i18n-demo.github.io semuenzaniso wekutsanangura maitiro ekufambisa.

Mafaira anoenderana nenzvimbo dzakaverengerwa mumufananidzo uri pamusoro ndeaya anotevera:

  1. Kuruboshwe .i18n/htm/t1.pug
  2. Right .i18n/htm/t2.pug

pug mutauro wetemplate unoburitsa HTML 's.

➔ Dzvanya apa kuti udzidze girama ye pug

Rudzi rwefomati ${I18N.sponsor} rinoshandiswa mufaira kuita zvekudyidzana nedzimwe nyika, uye zvirimo zvinotsiviwa nemavara anofambirana mudura remutauro i18n.yml

Iyo faira inoenderana nemaitiro eiyo navigation bar ndeye .i18n/htm/topbar.css :

[!WARN] Usanyora css uye js pug , kana zvisina kudaro pachava nekukanganisa.

Webhu Zvikamu

js haigoni kunyorwa mu pug Kana kupindirana kuchidiwa, kunogona kuwanikwa kuburikidza nekugadzira chikamu chewebhu.

Zvikamu zvinogona kutsanangura chikamu chepeji yewebhu muna md/.i18n/htm/index.js uyezve kushandisa chikamu foot.pug .

Zviri nyore kugadzira zvinhu zvewebhu, senge tsika <x-img> .

customElements.define(
  'x-img',
  class extends HTMLElement {
    constructor() {
      super();
      var img = document.createElement('img');
      img.src = '//p.3ti.site/i18n.svg';
      img.style = "height:99px;width:99px;";
      this.append(img);
    }
  }
)

Parizvino x/i-h.js inoratidzwa muna md/.i18n/htm/index.js , 18x/src/i-h.js chikamu chewebhu chinoshandiswa kutenderera pasirese uye tsoka dzakagadziridzwa zvinyorwa.