Jump to content

SamC

Members
  • Posts

    733
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by SamC

  1. I changed it to this now: Sorted out the 'h2 {word-wrap: break-word;}' for those long paths too on the tutorial, broke the layout on mobile. You can see in the video when I demonstrate saving a page (missing required fields) at 1:06, I much prefer more subtle errors/warnings like this but that was a pain to change with the label colour being the same as the background of the error message. I find the default one very old fashioned, is like this: so I changed it to this: Sounds tasty! Look forward to seeing this!
  2. It's the slow kind I use gulp to pull everything in usually which is relatively simple. I've found the included build tools with uikit super slow. I like with gulp that I can use autoprefixer etc. but I don't think uikit requires this actually, bs4 does. Still not sure how to use only parts of the uikit JS rather than a large fie with the kitchen sink included. The webpack instructions I found to be lacking somewhat. @szabesz how do you compile your less in your workflow?
  3. I chucked up a tutorial here: https://www.pwtuts.com/processwire-tutorials/making-a-custom-admin-theme-using-uikit-3-and-the-included-build-tools/ Hoping this method will become redundant though if I can get my head round building a module to change the colours etc. Something to work on in January (without distracting me from my JS which I should be doing...).
  4. @pwired think I'll buy it to give it a test, it's cheap enough for a punt, maybe I could actually use it on my own portfolio site to see what can be achieved. At the moment, I spent so much time customising stuff that I'm starting to think this is a waste of time (spending hours upon hours working out how to build/compile with uikit 3 and actually building nothing) when I could churn out sites way quicker and cheaper. Cheaper is the key words here because round here, no-one wants to spend on (low functionality) websites, they go straight to wix and 'You want a website? Why not do it yourself?' *sigh* There seems to be zero 'romance' in the custom design, bespoke, [insert nice sounding keywords here] websites, it's purely about price. This is a bitter pill for me personally as I always considered high quality workmanship more important than price. Some crappy things have happened over Christmas though so maybe I'm just on a downer! Here's to a more positive 2018
  5. Canvas looks interesting. What's the license deal with it? Do you need to buy a license for each client project? One thing that always concerns me about pre-made is that you might be jumping through a lot of hoops if you want to change something especially if no source files (sass/less) are included. If I'm totally honest, sometimes I think why did I bother spending so much time learning stuff when I could just buy a template and be done with it. I wouldn't need to know hardly anything, only how to install PW, set up the fields etc. A portfolio full of bought themes isn't too impressive though when trying to convince the world you're a 'designer'. Always puts me on the fence this subject, pre-made vs custom. There's a lot of pros/cons in my mind to both methods. Kinda like singers using autotune, are they really singers?
  6. This is what I'm doing, been on plain JS for months. Still trying to get my head round that damn prototypal inheritance. My JS progress is so slow it's unreal, I just don't seem to get it. If there was another option for web programming, I'd be skipping JS entirely.
  7. This bit didn't work for me as I don't use phpstorm. And there's some missing pieces to this puzzle. You can't compile without the necessary node modules (and you need nodejs and npm installed). I did the following: 1) Git cloned AdminThemeUikIt into '/site/modules/' 2) 'npm install' (gets the modules) in '/site/modules/AdminThemeUikit/uikit/' 3) Created a new less file '/site/modules/AdminThemeUikit/uikit/custom/pw/gray-theme.less' 4) Commented out reno and imported mine instead in '/site/modules/AdminThemeUikit/uikit/custom/pw/_import.less': // Theme @import "gray-theme.less"; // @import "pw-theme-reno.less"; 5) Then, 'npm run compile'. 6) Generates 'pw.uikit.min.css'. 7) Use AdminThemeUikit from /sites/ instead of /wire/. The option to choose which is in the config page for the module when you have the same module in sites and wire. My custom less file is attached if anyone wants to try it out. It has modifications so the login form themes correctly, can set global margins (a few other users were not keen on the large padding) and other small tweaks. gray-theme.less
  8. I tried this with an (unlimited) images field just to see how it would work. <?php namespace ProcessWire; ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo $page->title; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/main.css" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> </head> <body> <div class="row"> <?php foreach($page->images as $image): ?> <div class="col-4"> <edit images> <img src="<?= $image->url; ?>" /> </edit> </div> <?php endforeach; ?> </div> </body> </html> (used Option C) I made a very rough video of it: You could just do what @flydev suggested with an overlay icon. They click on that, then can change images. It's not as user friendly as being able to just change one image at a time though, clicking on any of them brings up the entire field (as expected). Still pretty cool though! (this isn't a live site, nor do I use '/login/' on any live ones)
  9. I had second thoughts about my disqus module because of privacy concerns. However, this sounds like a golden opportunity to make a different kind of module, one for changing the default theme colours. Could have a colour wheel, pick the colours for various elements, saving compiles it and spits out the new css to be included within admin (replacing uikit.pw.min.css). Something like that. Would be happy to work with you on this. I like @theoretics idea of being able to choose precompiled css, but much prefer the ability to customise via a third party module.
  10. @bernhard I’m working on a tutorial for this i.e. compiling from source with node/npm and editing the less files. I’ll include my starter (less) file which allowed me to easily change the colour schemes as shown in my vid: https://www.youtube.com/watch?v=cKlzg_kIi-w It’s pretty simple but the only problem I can see is that copying the module to ‘/site/modules/‘ means you have to keep the admin theme updated yourself. There appears to be no way to simply use a css file (in the module config) because the icons then don’t point to the correct locations and modifying the paths in the original less files for this module was a huge pita so I ditched that idea. The way @theoretic did it above means the icons point to the correct locations but (a big but) this means modifying a core module.
  11. Woah! Put down your counter arguments. Now I've got your attention, hope you all have a great Christmas
  12. I've been retweeting this article, was a good one
  13. Do you get the actual message though? $message = $input->post->message; $message = "There is a message from {$name} with the email {$email} The message is: '{$message}'"; It looks like you're taking the message from the field, then overwriting it, so it'll always be the same, just with a different name and email. What about the actual message they wrote? Just tested this and $message does actually get included in the new variable. I thought it would be overwritten. Ignore that last bit :-p There is also a difference in how single and double quotes work in PHP, that may explain why you're seeing the html tags. https://stackoverflow.com/a/3446286
  14. Let me join you in that shame! Just spent an infuriating 30mins on this. My template? <?php namespace ProcessWire; ?> <?= $page->body; ?> So glad this thread exists!
  15. So I could hook a page with an image field and use it to create a page with that image on it? Like creating a centralized media library as you add images to various pages. Maybe not the best example, but this would be a candidate for hooks?
  16. Thanks @bernhard it's those hooks again! Thinking it may be prudent for me to learn about those before starting a module.
  17. Nice, really nice! love the header font too.
  18. Maybe a silly question, but how do you get this to run in the admin? Where do you put the code?
  19. Not sure I'm following you here. Have you got a screenshot or something of what your message looks like when you receive it? I can only guess what mixed up and unwieldy means (to you). I presume you mean this: //This is the HTML message $message = ' <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Contact Form | ' . $input->post->name . '</title> </head> <body> <p>' . $input->post->message . '</p> </body> </html>'; Mine looks like this: $message = " <html> <body> <p><b>Customer name:</b> {$name}</p> <p><b>Customer email:</b> {$email}</p> <p><b>Customer message:</b></p> <p>{$message}</p> </body> </html> "; ...which results in: -------------------------------------------- Customer name: Test Customer email: test@test.com Customer message: Test message here in a new paragraph -------------------------------------------- Not the prettiest, but to be honest, I only care about the message content! Maybe just fiddle around with your $message variable here.
  20. No less than issue #1. I added another comment, maybe will catch Ryans' attention.
  21. Anyone else having this on a datetime field with the new theme? Just noticed it on my new tutorial, needed to move the date forward a couple of days and had to manually type in date instead. z-index issue?
  22. Ouch, this could be a problem. I haven't looked at the built in PW comments and they might work. However, I still need to make a module!
  23. Wow! The lookbook page is deliciously smart
×
×
  • Create New...