Jump to content

diogo

Moderators
  • Posts

    4,261
  • Joined

  • Last visited

  • Days Won

    75

diogo last won the day on July 11

diogo had the most liked content!

5 Followers

About diogo

  • Birthday 08/09/1978

Contact Methods

  • Website URL
    http://ed-works.com

Profile Information

  • Gender
    Male
  • Location
    Portuguese in Hamburg 🏴‍☠️, Germany

Recent Profile Visitors

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

diogo's Achievements

Hero Member

Hero Member (6/6)

4.9k

Reputation

53

Community Answers

  1. Moderator note: @ngrmm I understand that this thread is aimed at German speaking developers, but to keep the moderation manageable, we only allow English in the forum. Could you please edit the content of your post to be in English?
  2. You can also use the selector with the children() method: $page->children("children.count=0, sort=-date");
  3. This is exactly what creates the upgrading problem that Ryan is trying to avoid, since data is in HTML already in all processwire installs.
  4. Usually I set the font size in the html or body tags, and then use rem for pretty much everything else. I use em in the rare occasions that the size of an element should definitely dependent on the size of the parent, but usually I want the flexibility to control them independently of each other with rem. When you use em on everything, it's very easy to overlook small differences between the text inside elements and you end up having the same kind of text set in 11.5px and 12px in different places, for instance. As for the base size itself, it depends a lot on the layout. Some layouts account for large screens, and divide into multiple columns. On those cases the base font can usually stay the same though any screen size, and can be set in pixels or em. On more static layouts I normally want the font to grow a bit with the screen width, but not too much (I mean, not proportionally. I want it to grow less and less as the screen becomes larger). For that I use a calc() to create a relation between the vw and the pixels. For instance: font-size: calc(8px + .7vw); And I usually want to define a minimum and a maximum sizes. This can be done with media queries, or simply by using the clamp function: font-size: clamp(15px, calc(8px + .7vw), 20px); This defines that the font grows with the screen width but never becomes smaller than 15px or larger than 20px.
  5. Hm, for indexing, I would assume that's worse, since google would see it as a bunch of different documents. Also, I'm not sure about how efficient it would be to have pdf.js running individually for each page. I think you should separate indexing and viewing in two issues: show the pdf in a viewer, and link to it directly for indexing. I only checked pdf.js superficially, but I have the feeling that you could use it's api and css to control it as you wish. See this example from their page: https://jsfiddle.net/pdfjs/wagvs9Lf/, For what I've seen, you can also control zoom, and so on... Have a look at this video on how to build a PDF viewer with it. Maybe this is overkill for your project, but it's interesting for sure ?
  6. If you don't need specifically an imitation of a magazine, there might be other solutions. That one might be a good idea ? Did you see pdf.js from Mozilla?
  7. That's a tricky one. At least I didn't find anything like this some months ago. What about using something like Turnjs , which is for html5 content, not pdf, but use imagemagick to convert the PDFs to PNGs?
  8. if the DocumentRoot is now set to /var/www/html/pwire, there's no need to set the RewriteBase to the subdirectory anymore. Either leave them all commented, or uncomment only the first one: "RewriteBase /"
  9. Just want to point out that you can also do this with the new URL hooks https://processwire.com/blog/posts/pw-3.0.173/#introducing-url-path-hooks I can't test it now, but something like this should work (not tested!): $wire->addHook('/{building}', function($event) { $name = $event->sanitizer->pageName($event->arguments("building")); $building = $event->pages->findOne("parent=/buildings/, name=$name"); if($building->viewable()) return $building; });
  10. You're welcome ✌️ Svelte is also a great introduction to component based development, and the tutorial is great. React is a bit overwhelming at first because it feels so clunky, but it brings more job opportunities with it. If you still want to learn React after learning Svelte, at least you'll have already some of the shared concepts grasped.
  11. If you want to do something quickly, maybe gatsby is not ideal. Have a look at https://kit.svelte.dev/ or https://www.11ty.dev/. Those are two easy ones for creating static sites, and I would encourage you to have a look at them (particularly Svelte and SvelteKit) so you see what's new in the craft, but I'm sure you would find it as easy to get back on PW since there was no complexity added at all.
  12. I was curious about this, and did a quick search to see what there is besides Dailymotion. Only found two promising platforms, interestingly both from the Balkans: https://bunny.net/ from Slovenia and https://publit.io/ from Serbia.
  13. Dailymotion is French, you could give it a try.
  14. diogo

    Alpine.js help

    @jploch there's an error in your json. Close to the end: } } } }], "breakpointActive": "base", should be: } } }], "breakpointActive": "base",
  15. I don't work with webflow, but I don't think you can call an API from the webflow server. You could probably call it from AJAX, but that wouldn't make much sense for the whole website. It seems to me that you have two options: Build the site in webflow and export the html to use in ProcessWire, or use their API to sync data between ProcessWire and their CMS. Honestly, both options seem expensive to me, since you won't be taking full advantage of the system.
×
×
  • Create New...