Jump to content

Stefanowitsch

Members
  • Posts

    293
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Stefanowitsch

  1. Rally nice work! The design is clean and futuristic and I love the text animations for the headlines or inside the menu. Kudos that this is all custom coded! Did you use some plugins for the animations or how did you approach it? Just asking because I was switching between aos.js and GSAP lately.
  2. First: This is a mix of an API, Module Development and General Support question here. I want to populate a field on an admin page with form submissions. Yeeeees I know this has been asked a few times before but I did not find a solution to my approach here: I don't want to add a template-XY in the backend and create pages underneath that template for each submission. What I would like to do is the following: Have a link inside the setup dropdown that goes to a single page. This page has a repeater field that holds formatted HTML mail message bodies for each submit. That's it. I have little to no experience in module development or backend development. I know how to populate fields via API but I need answers to a few fundamental questions here. 1. Creating the Dropdown Link I used @bernhard's tutorial for custom admin pages to create a simple module and thus a new entry (and a corresponding template) for the form submissions. That works fine! The page underneath is completely blank at the moment. 2. Adding the Repeater Field Do fields need to be added to a certain page to be populated or can they act "stand-alone"? I created a repeater field which holds body fields for the mail messages. This field is attached to no template. I wan't this field to be populated and displayed on the new admin page. Do i need to add this field to the new admin page to populate it? And how is this achieved? I can't edit the template and add fields since this page uses the "admin" template (otherwise it won't appear in the dropdown). I can "get" my repeater field and dump it in the console from the module code like this. Is this a usual method? <?php namespace ProcessWire; class ProcessFormSubmissions extends Process { public function ___execute() { $repeater = $this->fields->get('rep_form_submissions'); bd($repeater); foreach ($repeater as $item) { echo $item->body; } } } 3. Populating the Repeater Field In my custom form logic I would like to do something like this: $submits = $fields->get('rep_form_submissions')->getNew(); $submits->body = $message; $submits->save(); But this results in an exception: Exception: Method RepeaterField::getNew does not exist or is not callable in this context Why can I dump the repeater field inside the console but can't add content the same way? What do you think about my approach? I'm interested in hearing your opinions or getting some advices here πŸ™‚
  3. The grow feature looks promising. I know that in another thread we discussed the responsive font handling and I was hoping that I could use boostraps RFS feature for responsive fonts: https://getbootstrap.com/docs/5.2/getting-started/rfs/ I used this feature in my latest project. But it turned out in reality that some of my big headlines just did not shrink the way that I needed them to shrink. It resulted in ugly link breaks. So i needed to make custom font size adjustment via media queries (very oldschool nowadays it seems...) So can you adjust the "grow-shrink-factor" on this one? To control how much the font will shrink down once a breakpoint is reached? EDIT: Found a scale factor variable in the depths of the bootstrap files. Anyway I find this is an important value that someone might want to tinker with, it should be possible to adjust it via a value.
  4. Animations can add life and dynamics to your site. But they should be kept simple and subtile. I mean with those powerful animation engines and methods today you can animate almost everything in any way you want. Its super fun from a developer perspective but it might confuse the ordinary user who visits your site. What really impressed me is that UIKit has everything "on board". You have sliders, lightboxes, and even scrolltrigger stuff for animations and fade-ins. So you need no 3rd party plugin. Everything is controlled out of the box via data-attributes directly in you HTML code. That is super straight-forward. I just could not live with the way the grid system of UIKit works. My projects are always built upon the bootstrap grid system with all the utilities. I almost don't use any other feature it offers, so that is the most important thing to me. Anyway if you want to do more advanced animation and scroll trigger applications someone would propably stick to a solution like GSAP in favor to UIKits built-in tools anyway.
  5. There you go πŸ™‚ https://jsfiddle.net/4Lgw5vuh/
  6. Clip path is my preferred solution to obtain this effect but can be tricky if the clip path is a bit more complicated. As mentioned here the best way to achieve this is to make use of the mask-size property. -webkit-mask-image: url(path/to/svg); -webkit-mask-size: cover; If you chose "cover" for the mask size the SVG will fit to the image dimensions. I made a quick test and it seems to work really good. I didn't know this technique exists so thanks for the hint @3fingers!
  7. Thank you! I was thinking about doing a redesign since quite a time. But you motivated me to keep the look an the structure closer to the original version πŸ™‚
  8. Hello there! I recently updated my own website - I am a frontend developer living in the northern part of germany. https://www.thumann-media.de The old design has been online since five years (time flies...) and I thought that it was time to make things a bit flashier and include a better showcase of my web projects to give the user a more detailed description of the project features. It's a classic one pager design just for the sake of keeping things as short and simple as possible (I hope the image fits inside this thread). The new version of my site includes a "portolio section" where users get a sneak preview of each project I've been working on recently. It features nice fade-in-out animations powered by aos.js (animate on scroll). Also new is that every project gets a dedicated subpage where I describe some of the unique features that this website offers: I like to have some eye-catchers. I always used the animated wave theme on my website, so why not include a message in a bottle? The animation of the bottle is done via the awesome GSAP animation engine (https://greensock.com/gsap/). This is a super powerful library and I just started diving into the possibilities of this one. Tech Talk: Some of the things I used: - ProFields used for this one (repeater matrix, combo) - Frontend framework is Bootstrap 5. I had a hard time of deciding between Bootstrap and UIKit as my new go-to framework (I am bit biased though because I've been always using bootstrap since version 2). But the grid system alone makes bootstrap so flexible and powerful for me, so I will stick with it for another 10 years I think... - https://github.com/nbcommunication/PageimageSource for image srcsets with webp support - Ajax driven contact form with bootstraps frontend validation - AIOM+ for compressing the assets (CSS and JS) https://github.com/matjazpotocnik/ProcessWire-AIOM-All-In-One-Minify - SEO Maestro - WireMail SMTP AOS.js vs GSAP Which animation library you should use? I discovered the GSAP library a bit too late in the development process, tough. So I am still using aos.js for some animations. AOS has a super small footprint considering its filesize (14 kb, minified) and is super easy to use and super reliable. Whereas GSAP is quite large (71kb, minified) and if you want to make use of scroll triggers you have to include a second library which adds another 40kb. AOS has lots of nice animations which come out of the box. GSAP does not offer this, you have to program those transitions yourself. So you need to spent some time, reading the docs and looking for tutorials! GSAP can do all that AOS can and beyond. If you want to have full control over everything I would advice you to give it a try. So that's all for now. I wish all of you a great weekend!
  9. Basically you can add as much cols inside a row wrapper as you like in bootstrap. You then define the width of each col via class names. I compared both frameworks and this should clear it up it: Bootstrap class names: container -> defines the max width of the content. UIKit equivalent would be uk-container. row -> wrapper for the columns. UIkit equivalent would be uk-grid. col-x -> the column with the specified width. UIkit equivalent would be uk-width-x-x So the bootstrap variant of your code example would look like this: <div class="container"> <div class="row"> <div class="col">foo</div> <div class="col">bar</div> <div class="col">baz</div> <div class="col">foo</div> <div class="col">bar</div> <div class="col">baz</div> </div> </div>
  10. I am really impressed what UIkit is able to do out of the box. But the main bummer for me is that the grid system is so weird (for someone who is using bootstrap since 10+ years..). Why a classic 12-column grid is not supported in UIkit3 is beyond my comprehension. The 12-col grid is the basis of every project I worked on in the past and am working on in the future. But I am drifting away from the topic, sorry ?
  11. Which Bootstrap Version are you using? Since Bootstrap 4 there is a form validation component that you can use. It prevents submitting when required fields are empty (for example). https://getbootstrap.com/docs/4.6/components/forms/#validation https://getbootstrap.com/docs/5.1/forms/validation/ However this validation is frontend only. If you disable JavaScript you are still able to submit the form to the server. So I would advice you to make use of both frontend validation (Bootstrap) and backend validation (either via the processwire API or a third party PHP module (https://github.com/rakit/validation).
  12. I am using a SASS mixin which renders REM out of given PX values. So when designing my layouts you typically have px based font sizes. Then when developing the website I want to make use of rem instead of px. Calculating each value can be time consuming and it might be confusing cause rem is relative to the base font size. @function calculateRem($size) { $remSize: $size / 16px; @return #{$remSize}rem; } @mixin fontSize($size) { font-size: calculateRem($size); } @mixin lineHeight($size) { line-height: calculateRem($size); } This however is not responsive in the way that the font size adjusts to the viewport. I like to have control over my font sizes so I hard code - for example headlines - fitting the four big breakpoints: large desktop, desktop, tablet, mobile. Yes it is a bit of work... For big, prominent title headlines (over background images for example) I often use vw or vh as font height. That makes the fontsize fluid but it can give you some weird "inbetween" values. So you have also have to make small adjustments based on breakpoints to make sure it looks good everywhere. This however looks promising. It seems to combine REM and VW. I recently upgraded to Bootstrap 5 and totally overlooked this new feature (by the way I am still thinking about switching to UIKit3 but for other reasons but this is another point for bootstrap).
  13. Have not installed it yet - but this module looks promising at first sight. I am looking for a super-simple solution for selling vouchers on sites. A big shop module like Padloper would be way to oversized for this task.
  14. I am using the latest fork here. Works perfect for me. https://github.com/matjazpotocnik/ProcessWire-AIOM-All-In-One-Minify
  15. Well, what is "normal" nowadays? It totally depends on the amount of static pages, the features - and the design (+ custom desktop/tablet/mobile adaptations) Do you start from scratch with a blank processwire installation or did you build yourself a custom development project with a default stylesheet and all kinds of modules, fields and templates predefined (tools you would need in every project) so you can just grab what you need and just alter the layout and data you render? Last but not least it also depends on your skill level as a developer of course. So based on all this I guess someone could either spend 10 or 100+ hours on a project.
  16. This is a nice little time saver! By the way I find it hilarious that you get fined for not hosting the fonts on your own server. I always thought that this was the whole purpose of google fonts.
  17. I am using AIOM+ for years now and it works really well! The syntax for minifying styles with this module looks like this: <link rel="stylesheet" type="text/css" href="<?php echo AIOM::CSS($stylesheets); ?>"/> $stylesheets is an array which looks like this. I now there is only one file here so it's not necessary to use an array for that ? $stylesheets = array( 'styles/styles.css' ); I have not tried it yet but it should be possible to insert the RockFrontend AssetsArrray here (?)
  18. I am starting to dive into the possibilites of RockFrontend. I have a very simple question that came to my mind right at the beginning. To render markup you offer the new $rockfrontend->render() function. What is the advantage of this function over the default $file->render() function of processwire? Basically I can change all $file->render() code parts into $rockfrontend->render() and everything still works. But I guess there is a secret behind this ? this new render function supports the integration of Latte PHP templates, is this the main advantage? If I am allowed add something to the wishlist: When adding assets via RockFrontend it would be awesome if you could offer a minify option for CSS/JS files. (for example when debugging is disabled).
  19. Interesting. When excluding the sessions folder it stops from refreshing continuously. But when I make a change to a php file for example the page start reloading again and again. Until I exclude the templates folder which is not what I want of course.
  20. Mac OS 11.2.3. Browser is Chrome 104.0.5112.79. I am using MAMP Pro 6.6 There is something going on in the dev tools. I've got the feeling that something keeps triggering the autorefresh. I excluded all scripts and CSS but it keeps on refreshing.
  21. You can build great websites with everything that comes with processwire. If you need something more special there are almost always free modules available. I built all of my websites without any pro modules. Until now.... I thought I might give it a try ? the repeater matrix pro module is a really sophisticated way to add/manage content on pages. Creating forms can be a bit tricky though - there is no form editor or whatsoever included so I would advice you to give Pro Forms a try. Otherwise you would have to hard-code the forms or use the processwire API to create them. As long as there is only one simple contact form on your page I would try to code it myself in that case.
  22. @bernhard So far I want to make use of the livereload feature only. I installed the module and set the reloading in my config file: $config->livereload = 1; But now it keeps reloading the page in intervals of 1 second continuously even when there are no changes made. Can you explain why this is the case?
  23. Is there a way to set page fields to "hidden" or "readonly" in the backend? Just curious... However. my personal solution for this was to write a cronjob that runs on the 1st day of every month and simply sets the status of the previous month page to "hidden". In that case those months won't show up in the sub navigation. The events will later be updated on a 3-month basis, so I think it's okay to let the user create those "month" pages and populate them with events manually.
  24. Well, yes and no ? I love (!) Bernhards work but I just stick to my solution for now. If you take a closer look at the page structure in the backend here, I think no one can't deny that this is easier to maintain than having all event pages underneath a single parent. I am thinking about the client who has to do the content work at the end... From a technical perspective this is also convenient, because you can view all events of a specific month directly via URL, like www.mysite.com/programm/2022/august/ Otherwise I would have to make use of URL segments to make the filtering happen.
Γ—
Γ—
  • Create New...