rafaoski

Members
  • Content count

    58
  • Joined

  • Last visited

  • Days Won

    2

rafaoski last won the day on March 9

rafaoski had the most liked content!

Community Reputation

100 Excellent

About rafaoski

  • Rank
    Full Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks to @dragan ... It looks like it's okay now after adding the margin auto to the grid /* eliminate horizontal scrollbars */ .grid { margin-right: auto; margin-left: auto; }
  2. Thanks to @Pixrael ... I have already added this profile, but as usual, it will take some time before the profile is approved I think that in a few hours the profile should be in the module catalog
  3. This profile can be used as a business card or very simple blog. Milligram Site Profile For Processwire 3x with include functions like: MarkupRegions FunctionsAPI wireIncludeFile | wireRenderFile Essentially, this structure uses minimalist CSS framework Milligram and the Flexbox Grid System Gridlex Live Example CAN DOWNLOAD FROM THIS LINK ( Basic Version and simple Blog Version ) https://github.com/rafaoski/site-milligram https://github.com/rafaoski/site-milligram-blog Screenshot: If you want to use Laravel Mix you must first ensure that Node.js and NPM are installed on your machine. Basic example to Debian and Ubuntu based Linux distributions: Node.js curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs See more installation options LINK npm is installed with Node.js just check in linux terminal like below: node -v npm -v Set BrowserSync inside folder /templates/webpack.mix.js and change your dev url proxy: 'http://localhost/mix/', to your installation processwire folder like: proxy: 'http://localhost/your-processwire-installation-folder/', Next install npm packages in your templates folder with command npm install Now, boot up the dev server npm run watch, and you're all set go! On completion, use the command npm run production to build styles and scripts in the dist folder Simple Usage ( Basic Command ) Run npm install Watch npm run watch Build npm run production All files to Webpack build steps is inside file ( webpack.mix.js ) Folder With all SCSS files is inside templates/src/scss All build styles and scripts is inside the ( dist ) folder References: Milligram Gridlex Laravel Mix Feather Icons Web Font Loader Verlok Lazy Load Cookie Consent Particles.js
  4. I was wondering if it would be better to change the name of the page after publishing ... wire()->addHookBefore('Pages::publishReady', function($event) { $page = $event->arguments('page'); if ($page->template->name == 'news-article') { $page->name = $page->title . '-myslug'; } });
  5. rafaoski

    @matjazp You can try pages.id==1234 It seems to me that in the settings the search appliance looks for similar expressions instead of identical ones which you change with the operator's ( == )
  6. rafaoski

    In your example @JoelB95, just use pw-before ... <div pw-before="page-content"> <h1><?= 'BEFORE #page-content' ?></h1> </div> <div id="page-content"> <h1><?=$page->title?></h1> Overview page </div> <div pw-after="page-content"> <h1><?= 'AFTER #page-content' ?></h1> </div>
  7. I tested your version on the latest issue of Processwire 3.0.95 with a defolt Profile (site-beginner) and it works if I add into $pages->find() selector => images.count>0 Now he should search only if the field has images images.count>0 _func.php function test($selectTemplate) { $pages = wire('pages'); $children = $pages->find("parent.template={$selectTemplate}, include=all, limit=3, images.count>0"); $out = ''; foreach($children as $child) { $image = $child->images->first; $out .= '<img src="'.$image->width(50)->url.'">'; } return $out; } basic-page.php <?=test('basic-page'); ?>
  8. Thanks to you and ( @kongondo' , @Pete , @justb3a ) for a great blog profile which is a good alternative to wordpress ... I noticed a very small error in ready.php, the translation function lacks ... Error: Uncaught Error: Call to undefined function _() in /srv/http/proc-blog/site/ready.php:12 "nextItemLabel" => _("Next Page &gt;"), "previousItemLabel" => _("&lt; Previous Page"), "nextItemLabel" => _("Next Page &gt;"), "previousItemLabel" => _("&lt; Previous Page"), Just add double underlining to translations __() Yeah, thanks a great profile for once.
  9. Maybe it will help you _func.php // IMAGE FROM FIRST CHILDREN function myThumb($page) { $out = ''; if ( !count($page->child->images) ) return 'Add Image'; $image = $page->child->images->first; $out .= '<img src="'.$image->width(200)->url.'">'; return $out; } // IMAGES FROM PAGE CHILDRENS function myThumbs($p_children) { $out = ''; foreach ($p_children as $page) { if (count($page->images) ) { $image = $page->images->first; $out .= "<img src='{$page->images->first->width(200)->url}'>"; } } return $out; } basic-page.php <?php echo myThumb($page); ?> <hr> <?php echo myThumbs($page->children); ?>
  10. This profile can be used as a simple business card or blog. The profile does not use any framework css structure, only styles based on CSS GRID and FLEX. To minimize page loading, I added lazy load for images ( Tupola Lazy Load ). With include functions like: MarkupRegions FunctionsAPI CAN DOWNLOAD FROM THIS LINK: https://github.com/rafaoski/site-grayscale-pw https://github.com/rafaoski/site-min-grayscale-pw Live Example Screenshot:
  11. rafaoski

    This code should help you get to the wire directory: <link rel="icon" type="image/x-icon" href="<?php echo $config->urls->root ?>wire/favicon.ico"> But I prefer to add in the directory of my template files in which I change the path to (templates/): <link rel="icon" type="image/x-icon" href="<?php echo $config->urls->templates ?>assets/img/favicon.ico"> Here you can read more about $config: https://processwire.com/api/variables/config/
  12. @desbest this profile is probably adapted to older versions of Processwire like 2.5 and I do not know if it's a good idea to try to implement it with the current version of 3x, maybe it's better to install the blog module ProcessBlog & MarkupBlog ( The Blog Module for ProcessWire replicates and extends the popular Blog Profile ) ...
  13. rafaoski

    Thanks @Milenko for investigating what's happening ... Honestly, I do not know what can cause installer errors ... I also had a problem with the test machine (xampp, wampp) ... But after switching to the laragon everything works much better ...
  14. rafaoski

    Hi and thanks @MilenKo ... I've just tested on version 3.0.85 and installed the profile without any problems ... I do not know if you have unpacked catalog correctly in the installer folder ... A while back I added a simple tutorial on how to install profiles and maybe this simple tutorial will help you: I also recommend you this profile: Which I recently added and is based on Spectre.css ... I think you should also like it ... It is very simple and clean ... You may have trouble with CHMOD access rights if you use Linux or Mac locally, but I'm not sure because I installed the profiles on the Laragon test environment as well as ordinary shared hosting ... Maybe these links will help in something: https://processwire.com/docs/security/file-permissions/ A simple example for files and folders: https://help.directadmin.com/item.php?id=589
  15. rafaoski

    Maybe this way can help ... I often use delayed loading for images from this page https://appelsiini.net/projects/lazyload/ Adds a script in bottom with async or defer to better load page time <script src="<?php echo $templ_url?>assets/js/lazyload.min.js" defer></script> <script> window.addEventListener("load", function(){ lazyload(); }); </script> And I add the lazyload class for the image along with data-src <img class='lazyload' data-src="/your-image-url" alt="img-alt">