{"id":1426,"date":"2014-08-02T08:44:16","date_gmt":"2014-08-02T08:44:16","guid":{"rendered":"http:\/\/musilda.cz\/?p=1426"},"modified":"2014-08-02T08:44:16","modified_gmt":"2014-08-02T08:44:16","slug":"jak-vytvorit-vlastni-sablonu-pro-wordpress-5-dil","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-vytvorit-vlastni-sablonu-pro-wordpress-5-dil\/","title":{"rendered":"Jak vytvo\u0159it vlastn\u00ed \u0161ablonu pro WordPress – 5 d\u00edl"},"content":{"rendered":"\n
V dal\u0161\u00edm d\u00edle seri\u00e1lu o tvorb\u011b \u0161ablony se zam\u011b\u0159\u00edme na vytvo\u0159en\u00ed vlastn\u00edch \u0161ablon str\u00e1nek. P\u0159iprav\u00edme si str\u00e1nku se stoprocentn\u00ed \u0161\u00ed\u0159kou a str\u00e1nku se sidebarem vlevo. Z\u00e1rove\u0148 u\u017e d\u00e1me \u0161ablon\u011b trochu vzhledu.<\/p>\n\n\n\n
P\u0159i instalaci nov\u00fdch \u0161ablon je \u010dasto t\u011b\u017ek\u00e9 p\u0159edstavit si, jak bude \u0161ablona vypadat s obsahem, naimportujeme si na web testovac\u00ed data, kter\u00e1 si st\u00e1hnete zde<\/a>. T\u00edm odpadne zdlouhav\u00e9 vytv\u00e1\u0159en\u00ed \u010dl\u00e1nk\u016f, kategori\u00ed a str\u00e1nek, jen pro testov\u00e1n\u00ed. N\u00e1stroj pro import najdete v N\u00e1stroj\u00edch -> Import. D\u016fle\u017eit\u00e9 je za\u0161krtnout – St\u00e1hnut a importovat soubory, d\u00edky tomu se v\u00e1m v\u0161echny soubory ulo\u017e\u00ed do slo\u017eky uploads.<\/p>\n\n\n\n Proto\u017ee od posledn\u00edho d\u00edlu n\u00e1vodu ji\u017e uplynulo trochu \u010dasu, mus\u00edme aktualizovat soubory Bootstrapu a z\u00e1rove\u0148 i n\u011bkter\u00e9 n\u00e1zvy t\u0159\u00edd. Ve verzi 2.2.2, kter\u00e1 je v \u0161ablon\u011b, se pou\u017e\u00edvaly pro ozna\u010den\u00ed jednotliv\u00fdch sloupc\u016f t\u0159\u00eddy s n\u00e1zvy span4<\/strong> a podobn\u011b. Bootstrap jako takov\u00fd, d\u011bl\u00ed obsah na 12 sloupc\u016f a \u010dty\u0159ka v n\u00e1zvu t\u0159\u00eddy, ozna\u010duje 4xsloupec. Aby jsme dostali 100% \u0161\u00ed\u0159e obsahu, museli jsme m\u00edt dva divy span8 a span4.<\/p>\n\n\n\n Proto\u017ee se v\u0161ak v\u0161e vyv\u00edj\u00ed, v nov\u011bj\u0161\u00edch verz\u00edch budeme pou\u017e\u00edvat t\u0159\u00eddy jako col-xs-12 col-sm-6 col-md-8<\/strong>, co\u017e je vlastn\u011b to sam\u00e9, ale rovnou t\u00edm ur\u010d\u00edte, \u0161\u00ed\u0159ky pro desktop, tablet a mobil. Zleva doprava to je 12 sloupc\u016f – mobil, 6 sloupc\u016f – tablet, 8 sloupc\u016f desktop. Tedy 100% \u0161\u00ed\u0159e, 50% \u0161\u00ed\u0159e a 75% \u0161\u00ed\u0159e. T\u00edm nahrad\u00edme v\u0161echny span8 v k\u00f3du \u0161ablony. Span4 nahrad\u00edme col-xs-12 col-sm-6 col-md-4<\/strong>.<\/p>\n\n\n\n Po \u00faprav\u011b \u0161ablony a importu obsahu se n\u00e1m zobraz\u00ed hlavn\u00ed strana takto:<\/p>\n\n\nZm\u011bny v souborech:<\/h3>\n\n\n\n