• Content count

  • Joined

  • Last visited

Community Reputation

37 Excellent

1 Follower

About lokomotivan

  • Rank
    Jr. Member

Recent Profile Visitors

890 profile views
  1. Ive done something simular recently, well not sure if this is what u looking for: Simple markup (number in a class represents opacity level) <div class="tm-overlay-dark-60"> <img src="" /> </div> If u want to use it with background image, just need to define height <div class="tm-overlay-dark-60" style="height:500px;background:url(./myimage.jpg) center center no-repeat;backgroudn-size:cover;"> </div> I usually use uikit framework and less @tm-overlay-dark-bg: #000; @tm-overlay-light-bg: #fff; /** * TM Overlay BG */ [class*='tm-overlay-'] { position:relative; } [class*='tm-overlay-']:before { content: ""; display:block; position: absolute; top:0; bottom:0; left:0; right:0; background: fade(@tm-overlay-dark-bg, 60%); z-index:0; } /** * Dark */ [class*='tm-overlay-10']:before, [class*='tm-overlay-dark-10']:before { background: fade(@tm-overlay-dark-bg, 10%); } [class*='tm-overlay-20']:before, [class*='tm-overlay-dark-20']:before { background: fade(@tm-overlay-dark-bg, 20%); } [class*='tm-overlay-30']:before, [class*='tm-overlay-dark-30']:before { background: fade(@tm-overlay-dark-bg, 30%); } [class*='tm-overlay-40']:before, [class*='tm-overlay-dark-40']:before { background: fade(@tm-overlay-dark-bg, 40%); } [class*='tm-overlay-50']:before, [class*='tm-overlay-dark-50']:before { background: fade(@tm-overlay-dark-bg, 50%); } [class*='tm-overlay-60']:before, [class*='tm-overlay-dark-60']:before { background: fade(@tm-overlay-dark-bg, 60%); } [class*='tm-overlay-70']:before, [class*='tm-overlay-dark-70']:before { background: fade(@tm-overlay-dark-bg, 70%); } [class*='tm-overlay-80']:before, [class*='tm-overlay-dark-80']:before { background: fade(@tm-overlay-dark-bg, 80%); } [class*='tm-overlay-90']:before, [class*='tm-overlay-dark-90']:before { background: fade(@tm-overlay-dark-bg, 90%); } /** * Light */ [class*='tm-overlay-light-10']:before { background: fade(@tm-overlay-light-bg, 10%); } [class*='tm-overlay-light-20']:before { background: fade(@tm-overlay-light-bg, 20%); } [class*='tm-overlay-light-30']:before { background: fade(@tm-overlay-light-bg, 30%); } [class*='tm-overlay-light-40']:before { background: fade(@tm-overlay-light-bg, 40%); } [class*='tm-overlay-light-50']:before { background: fade(@tm-overlay-light-bg, 50%); } [class*='tm-overlay-light-60']:before { background: fade(@tm-overlay-light-bg, 60%); } [class*='tm-overlay-light-70']:before { background: fade(@tm-overlay-light-bg, 70%); } [class*='tm-overlay-light-80']:before { background: fade(@tm-overlay-light-bg, 80%); } [class*='tm-overlay-light-90']:before { background: fade(@tm-overlay-light-bg, 90%); } Maybe u need to change :before z-index if you dont use image as background image
  2. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
  3. I think you just have to remove the parent=1018 from your selector, doctor page cant be child page of multiple locations... $doctors = $pages->find('template=staff-page,locations=$page'); foreach($doctors as $doc) { echo "<h4>$doc->title</h4>"; }
  4. Just installed it, first thing i noticed that it doesn't work with custom hanna tags, works with "[[", but not with custom one "{{" i currently use for hanna codes
  5. This seem exactly what i need at this moment, especially for hanna :), will try it out definitely, thank you!
  6. You need to echo image html and use image field as a src attribute. Processwire doesn't add any html to the front-end, 0, but it provides you everything you need. In this case, lets say you have image field on a page: <?php $page->image // will get you jsut image name my_image.jpg $page->image->url // will get you image path site/assets/files/1234/my_image.jpg ?> <!-- and here full image --> <img src="<?= $page->image->url ?>" />
  7. Not sure if this can help, but this is how i handle csv inport/export with pw: https://gist.github.com/lokomotivan/331aff00152b7cf2ac9b6605576e1e23
  8. How's jquery blocked in some browsers by default? Anyways, you can achieve this with just css, something like this (well this is way over simplified): <ul class="my-menu"> <li><a>item 1</a></li> <li><a>item 2</a></li> <li> <a>item 3</a> <ul class="submenu"> <li>submenu item</li> <li>submenu item</li> </ul> </li> <li><a>item 4</a></li> </ul> <style> .my-menu > li:nth-child(3) > .submenu { width:100%; } </style>
  9. Would be much easier to use html themes them wp ones. You can't avoid copy/paste html chunks, and there is many little things to handle like active classes on menus etc... very simple to do with pw, but requires some work and time. Processwire not adding any code to the front-end, so u have to build it ur self, thats one of the reasons pw is so great. It doesn't have any template system like drumlapress.
  10. Also, there is a nice monospace font with ligatures support you can use, its supported in atom, vscode, brackets etc. You guys might like it: https://github.com/tonsky/FiraCode
  11. I use dose mentioned packages only, haven't used or tested any other, they work fine for me, but im sure there are some more jquery related packages you can try. VSCode is great to, its faster, but for me copy-pasting chunks of code works lot better in atom (vscode somehow always mess up ident tab spaces). There are lots of plugins for it to choose from, but can't recommend any specific, haven't tried them...
  12. I use atom https://atom.io/ and some packages like: https://atom.io/packages/jQuery https://atom.io/packages/jquery-snippets
  13. Maybe u can take a look at snipcart. Edit: lol i just realised its post from 2013 . Anyways if someone looking for simular, snipcart is still relevant
  14. Not sure how do you wanna display results. If u want to group them by the template, u can simply have two search results and loop true them separately: $matches1 = $pages->find("title~=$q, template=speech-archive-detail"); $matches2 = $pages->find("title~=$q, template=training-detail"); Or, if you wanna mix the results, u can check for the template in a loop: <?php if ($count) : ?> <?php foreach ($matches as $result) : ?> <?php if($result->template == "speach-archive-detail"):?> <!-- Display results this way --> <?php else: ?> <!-- its not speach-archive-detail, display it in a nother way --> <?php endif;?> <?php endforeach; ?> <?php endif; ?>
  15. Yep, they are right, sorry about that echo "<ul class='uk-nav uk-nav-default'>"; foreach($categories->children() as $cat) { echo "<li><a href='$cat->url'>". $cat->title . $pages->find("categories=$cat")->count . "</li>"; } echo "</ul>";