ai_slop
Members-
Posts
42 -
Joined
-
Last visited
Everything posted by ai_slop
-
Mm picture tags could work but then that means creating portrait-oriented edits for every corresponding desktop slide image - and that's not always possible depending on what design will be shown, especially when I begin uploading the rest of my projects. If I'm querying mob vs desktop based on tagged images won't that impact caching regardless? Maybe I misunderstood. In the end I may end up doing extra edits but it's a bit of a pain. Maybe excluding the slideshow from Procache might be another idea...if possible
- 12 replies
-
- beginner portfolio
- masonry
-
(and 3 more)
Tagged with:
-
Thanks @Peter Knight 🙂 I learned a lot with this project. I definitely need to learn GIT for the next proj I do though, regressions keep popping up all over the place 😅. Some bits and pieces left to fix before I upload more projs. Well, I would like a separate selection of images for the slider for mobile users and at fullscreen. I had some QR codes printed on business cards so it would be nice to make the mobile image viewing experience nicer to people I meet out and about. I could probably do something with picture tags but it's not about cropping the same image at different ratios as much as having a separate group of images entirely for mobile, which I can update using tags. Just don't know how caching would work for the same page id. For desktop I like the 16:9 format because it works well for Behance, portfolio presentation books and web (desktop). Mobile not so much. This is what I want to avoid.
- 12 replies
-
- beginner portfolio
- masonry
-
(and 3 more)
Tagged with:
-
I'm back from the future lol. I studied some php in the mean time and I understand what use and & do now haha. https://www.johnfarrell.fr Eventually got round to implementing things. There are still a few things to fix overall. Your suggestions work well, I used slideshow image tags and it pulls in images into my home page slider from a WireArray based on that. Only thing is, it would be nice if I could change the images for mobile portrait layouts, based on the user-agent. Some of my designs don't really suit portrait viewing. I thought about using MobileDetect, and make the slider pull images with another tag, say slidermobile. It looks like that doesn't play nicely with ProCache though... I don't want to change the url for mobile either...as I've printed qr codes for the site already 😅 Any suggestions? A PHP solution would be nice but maybe JS is needed. I may make a seperate post in case others find this useful. The last topics on this are old:
- 12 replies
-
- 2
-
-
- beginner portfolio
- masonry
-
(and 3 more)
Tagged with:
-
It's nice to see that there are more alternatives now. Maxon released Autograph for free too recently. Not sure how they are going to monetise though. https://www.maxon.net/en/autograph
-
So Canva seems to be shaping up to be a real challenge to Adobe in some ways after acquiring Affinity's design suite, and now Cavalry. I haven't tested Cavalry yet but I didn't think it had any web animation capabilities until I came across this beta web-player integration (?) Have any of you tried Cavalry? https://docs.cavalry.scenegroup.co/web-player/ It looks like it's available for free now. https://www.canva.com/newsroom/news/cavalry/
-
@szabesz Sorry to hear that. I've been billed from Singapore for Kimi Code... Not sure if it would be useful to add mandarin in the email subject to create urgency? Though I think english is widely spoken there too.
-
@szabesz So sorry for the late reply! I must have missed a notification. This is what mine looks like: Hope you manage to get it sorted.
-
Well that was quick! 😅 Wrapping with json_encode() worked for me. Gsap text animation now works: const paragraphs = [ <?=json_encode(__("Here is some text"))?>, <?=json_encode(__("Here is some more text"))?> ];
- 1 reply
-
- translation
- multi-language urls
-
(and 1 more)
Tagged with:
-
I have a javascript animation similar to this codepen here: https://codepen.io/Anthony-Osceola/pen/YPPXwJw My version requires that the string is contained in a const variable. This is what I've tried: ..... .......... const paragraphs = [ <?=__("Here is some text.")?>, <?=__("Here is some more text")?> ]; function buildParagraph(text) {.......... While I've managed to translate the rest of the page, I'm having trouble getting text within javascript tags to work. They show in the admin but the translated text won't display for the JS animation. Would I be better off just creating another template for this translated page? I thought that doing so could be bad for SEO if it's counted as duplicate content. Any advice appreciated.
- 1 reply
-
- translation
- multi-language urls
-
(and 1 more)
Tagged with:
-
@szabesz I forgot to cancel my trial yesterday lol. But so far it's been working well for me albeit slower than what I'm used to with claude. That being said, I'm on the cheapest plan. For me at least there's a cancel button under settings > subscription > cancel plan... Here's hoping it works next month if I change my mind
-
Think I got it working, but not sure which of these steps were needed. Posting in case others find it helpful. I uncommented RewriteBase / in .htaccess I truncated the cache in the database with Phpadmin6 (I'd avoid this one if the others work first!) Using Tracy Debugger > Clear sessions, cookies & module refresh. A normal browser cache clear didn't work for me.
-
That's a good point. There seem to be ways around it but I've never worked with these before: https://developers.google.com/analytics/devguides/collection/ga4/single-page-applications?implementation=browser-history For the moment I'm trying out css view transitions api to fake a single page app look but it doesn't seem to work for Firefox yet. I just added this to style.css: @view-transition { navigation: auto; }
-
I haven't made my site live yet but I have a similar issue. I'm developing on laragon, and my Processwire site was installed with a folder /pw-template/ such that the site loads at: http://localhost/pw-template/ So far I've tried the following: - moving everthing in /pw-template/ to the root / - adding the following lines to config: $config->urls->root = '/'; $config->urls->admin = '/processwire/'; - deleting cache files in the site folder - doing a hard reload in the browser The site pages seem to load fine, but the Admin is not working correctly. Selecting Pages for example returns url http://localhost/pw-template/processwire/page/ so something hasnt been updated. Do I need to play with the database? I'm terrified of screwing up my database and progress and I'm not used to playing with MySQL. If I do something with the htaccess file is there a risk of breaking something in the database? I'm using laragon for the moment. When development is finished, I'd like to migrate or clone everything to the server if possible. Not sure how recommended that is if I change the root - hoping this doesn't screw up installed modules...
-
I just came across this library and thought I'd share. Are any of you using this in your ProcessWire sites? It looks very similar to what I've read about HTMX but I have yet to test either properly. I just dropped the following into the head of my portfolio site and now navigation is as smooth as butter! No page load flicker, and I didn't modify anything else. The only bug on my site was when I tried to load the landing page in another language, but that may be as related to the URL segment, or the way in which PW organises translated pages? Not sure. I haven't learned enough about AJAX to know if this would interfere with existing contact forms or not without customisation (?). Curious to hear what you think, or if you're implementing this, HTMX or similar on your sites. Alpine AJAX looks like another interesting alternative. <!-- 1. uJS Script - Include the script --> <script src="https://unpkg.com/@digicreon/mujs/dist/mu.min.js"></script> <!-- 2. Initialize --> <script>mu.init();</script> https://mujs.org/
-
Ah excellent, thanks 🙂 Exactly what I was looking for.
-
@wbmnfktr MiniMax looks interesting. How does it compare to something like Claude? If I'm not mistaken, you or another member on here mentioned Kimi Code on here recently... Curious if there are any useful alternatives to Claude. When I last tried it I hit usage limits rather quickly. I'm wondering if there's any easy way of giving AI an awareness of a ProcessWire site's template structure and fields when working with them? Are MCP's capable of that or is it more of a knowledgebase type thing? (noob alert🚨)
-
So I tried the following but I'm not sure if it's good practice or not. Sharing in case anyone finds it useful. This setup requires that the PageImageSource module is installed with srcset image sizes setup in its config. It basically involves creating a page where cross-site images can be uploaded - like a simple image library. I created a short function to make it easier to grab the images where needed. Adding ->render() will output <picture> with srcsets. The media page should be set as hidden. Create a template, give it a name and add a multi-image field In the templates folder create _func.php and add the following: <?php namespace ProcessWire; /* Create a fn. that returns a Pageimage object from media library page you just created. Here i called my function medialib, and $medialibrary is the name of my template.*/ function medialib($filename) { static $medialibrary = null; if (is_null($medialibrary)) { // REPLACE the get directory with the Media Library page url created in admin. Mine was /media-library/ $medialibrary = wire('pages')->get('/media-library/'); } // Returns the image object if found, or null return $medialibrary->id ? $medialibrary->images->get("name=$filename") : null; } Add the include for _func.php in your _init.php in the templates folder: <?php namespace ProcessWire; // This makes the medialib() function available to all templates include_once("./_func.php"); // Render media library images on other pages using format: /*<?= medialib("imagefile.jpg")?->render() ?>*/ Function can now be called in template markup using: // Render media library images on other pages using format: <?= medialib("imagefile.jpg")?->render() ?> //Example <?=medialib("imageNameMustMatchFileName.jpg")->render()?> // Outputs <picture> tag. For CSS styling, target outer div class like so: .class img{.....} Combining this with another module might https://processwire.com/modules/process-media-lister/ might be useful.
- 1 reply
-
- images
- image library
-
(and 3 more)
Tagged with:
-
[WIP] Media Hub - the centralised hub for your PW media
ai_slop replied to Peter Knight's topic in Module/Plugin Development
Looking good, @Peter Knight! This is exactly what I was looking for. New to PW and building a portfolio site so quickly running into image management questions. I just posted a question on handling static or non-image field images - more specfically, how can we generate <picture> srcsets with PageImageSource when dealing with asset folder images. A solution without duplication would be nice. Not sure how relevant that is to your module but thought I'd share: Picture srcsets have to be the most tedious thing in html markup. I'd be happy to beta test the module if you like. Are you planning on releasing it as paid or open source? -
I've been reading through the forums for best practices on handling images on static pages - that's to say, how best to handle images in my static html markup when I don't have any need for image fields. On my current site, I have a lot of images on the home page and it seems silly creating an image field for all of these. Also, for pages where I do have image fields, I've been using the PageImageSource module to create wepb srcsets automatically (and it works great). I like setting my desired image sizes for the srcsets in one place, so I'd like to use this module for everything everywhere if possible. The problem is that it only works with PageImage objects, so I have to do something with my static images in order for the plugin to work with those. It looks like the media manager modules are not maintained. Could I just somehow put all my non-image field images in one page reference or something and have the PageImageSource module render those wherever they're needed? Could the following work? 1) Create an images/media page and template with images field. Set it to hidden. 2) // In _init.php: $media = $pages->get("template=media", include=hidden); 3) // on a template page markup: $desiredImage = $media->images->get("name=imageName.jpg"); .... <div><=?php $desiredImage->render()?></div> // renders the srcsets and <picture> tags with the PageImageSource module I don't know if this is the recommended way of dealing with <picture> tags for static pages (srcsets are such a pain to do manually!). Maybe there are some downsides to this that I'm not aware of. Any guidance would be very welcome.
- 1 reply
-
- images
- image library
-
(and 3 more)
Tagged with:
-
Looks great. New to PW here and have been scanning the forums for best practices on including images on static pages (no image fields). A media library seems to be the way... I wanted to understand how I might use the PageImageSource module to render webp srcsets on the fly for static images but was disappointed to learn that it can only be used with PageImage images. https://github.com/nbcommunication/PageimageSource I think ProcessWire would be a hard sell to many clients without some a full-featured image library solution, which is a great pity. The UI looks well done.
-
Using markup regions causes template to render twice?
ai_slop replied to jtborger's topic in API & Templates
Strange... I'm seeing some inconsistencies which seem at odds with what the docs say is possible, but maybe I'm going wrong somewhere... If anyone has any tips, I'd appreciate it! For example, in my _main.php and template.php I had: <main id="main-content">...</main> but content would not populate until I used pw-id: <main pw-id="main-content">...</main> I thought that both id and pw-id were possible? I've also had more luck adding scripts before the body tag using divs instead of putting the script tags within region tags for some reason. What worked for me: <div id="regionscript">...</div><!--#regionscript--> in the template instead of placing scripts within region tags. With an optional div in the _main.php: <div id="regionscript" pw-optional></div> -
Using markup regions causes template to render twice?
ai_slop replied to jtborger's topic in API & Templates
I'm having the same issue however the content is repeated 4 times. Building on the site-blank template and I haven't touched anything above the Doctype declaration, though there are existing variables mentioned below. Should those be deleted? I read the Markup Regions docs thoroughly though I'm at a loss here... Wondering if it's one of my scripts or something interfering with things. I have a GSAP typing text animation plugin before my closing body tag on a markup action region tag (on a template)... /** @var Page $page */ /** @var Pages $pages */ /** @var Config $config */ $home = $pages->get('/'); /** @var HomePage $home */ -
Very helpful, thanks. Haha yes Claude is very supportive 😂 Always try to verify if I can though while I'm learning. So it's a bit like function scope in JS then, the use keyword lets the function see outside itself. You've taught me a lot in this thread, cheers for that
- 12 replies
-
- beginner portfolio
- masonry
-
(and 3 more)
Tagged with: