Skip to content

Instantly share code, notes, and snippets.

View bsakhanov's full-sized avatar
😎

Beibit Sakhanov bsakhanov

😎
View GitHub Profile
@bsakhanov
bsakhanov / insert-ad.php
Created May 15, 2022 15:53 — forked from zaurmag/insert-ad.php
Функция добавления кода в статью
<?php
//отрисовка рекламы в статьях
function addContent($addTo, $add, $cntRep, $after = '</p>', $openTag = '<div align="center">', $closeTag = '</div>'){
$posAfter = 0;
for ($i=0; $i < $cntRep; $i++) {
$pos = stripos($addTo, $after, $posAfter);
$posAfter = $pos+strlen($after);
if($pos===FALSE){
return $addTo;
}
@bsakhanov
bsakhanov / view-module-teml-joomla.php
Created May 15, 2022 15:50 — forked from zaurmag/view-module-teml-joomla.php
Вывод модулей в шаблоне Joomla
<?php //вывод позиции модулей
$document = JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$options = array('style' => 'xhtml');
$position = 'user1';
echo $renderer->render($position, $options, null);
?>
<!-- или -->
@bsakhanov
bsakhanov / card-grid-category-v1-uikit-3.markdown
Created April 20, 2022 06:41
Card grid category v1 - Uikit 3
@bsakhanov
bsakhanov / index.html
Created April 20, 2022 06:37
Off-canvas :: mobile navigation & Transperent Hero & parallax effect | uiKit - front-end framework. version 3.7.2
<!-- codepen editor mode - you could open the HTML tab in full width + only one extra line of CSS (not from uikit core) on this example
**since rc.20(October 24, 2018)Offcanvas no longer requires a wrapping content div
-->
<!-- Sticky navbar -->
<div class="uk-position-top" id="top">
<nav class="uk-navbar-container uk-navbar-transparent uk-light" data-uk-navbar="dropbar: false;"
data-uk-sticky="animation: uk-animation-slide-top;
sel-target: .uk-navbar-container;
cls-active: uk-navbar-sticky;
@bsakhanov
bsakhanov / breadcrumb_schema.html
Created April 6, 2022 10:10 — forked from AlekVolsk/breadcrumb_schema.html
Correct markup for breadcrumbs
<ul itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemscope itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a title="Наименование сайта" itemprop="item" content="https://site.ru/" href="/">
<span itemprop="name">Главная</span>
</a>
<meta itemprop="position" content="1">
</li>
<li itemscope itemprop="itemListElement" itemtype="http://schema.org/ListItem">
<a title="Наименование раздела" itemprop="item" content="https://site.ru/category" href="/category">
<span itemprop="name">Раздел</span>
@bsakhanov
bsakhanov / index.html
Created December 26, 2020 13:02
Uikit 3 timeline
<div class="uk-section">
<div class="uk-container uk-container-small">
<div id="switcher">
<label class="uk-switch" for="on-1">
<input type="checkbox" id="on-1" />
<div class="uk-switch-slider uk-switch-on-off round"></div>
</label>
</div>
<div class="uk-timeline" uk-scrollspy="cls: uk-animation-fade; target: > div > .uk-card; delay: 500;">
<div class="uk-timeline-item">
@bsakhanov
bsakhanov / index.html
Created December 26, 2020 12:44
Uikit 3 news card section
<div class="uk-section">
<div class="uk-container">
<div class="uk-grid uk-grid-medium" uk-height-match="target: > div > .uk-card; row: false" uk-grid>
<div class="uk-width-1-2@m">
<div class="uk-card uk-card-default uk-grid-collapse uk-child-width-1-2@s uk-margin featured uk-background-cover" uk-grid>
<div class="uk-card-media-left uk-cover-container">
<img src="https://getuikit.com/docs/images/light.jpg" alt="" hidden uk-cover>
<canvas width="600" height="400"></canvas>
</div>
<div>
@bsakhanov
bsakhanov / index.pug
Created November 3, 2019 14:52
Styling unvisited links
.container
ol
li: a(href='#link1') Click on me and watch new disappear
li: a(href='#link2') Pretty cool eh? Try again here
li: a(href='#link3') One last try
//- Clicked on all of the links? Just change the href!