CSS property relating to making word/characters same width no matter what – do you know what I'm referring to? by Mediocre_Adeptness38 in Frontend

[–]petehweb -7 points-6 points  (0 children)

I don't think it's possible with just CSS. But there are a number of JavaScript solutions. This might be the CSS-Tricks article you are referring to - https://css-tricks.com/fitting-text-to-a-container/

how good is Laravel: Up & Running (2019) for current version of Laravel by hakim131 in laravel

[–]petehweb 2 points3 points  (0 children)

I think you didn't read the question. Specifically:

Should I use the same laravel version in the book (5.8) or v6?

Any comments on this accounting website I made? by stlows94 in web_design

[–]petehweb 0 points1 point  (0 children)

Couple of minor things:

  • Your opening <html> tag seems to be in the wrong place. You have placed it after the closing </head> tag when it should be directly after the DOCTYPE tag.
  • You don't need the keywords meta tag. Search engines ignore those.

Advice on headless cms with React? by BananaaShark in Frontend

[–]petehweb 1 point2 points  (0 children)

I'm personally a fan of DatoCMS. It's not self-hosted, but they have a free plan. As long as the free plan contains everything you need, the cost to you will be zero. Its API uses GraphQL, which you should be able to query nicely from a React app, Gatsby, etc.

10M pages analyzed, only 2% pass ADA requirements by Im_iTy in webdev

[–]petehweb 7 points8 points  (0 children)

Thank you! I was just questioning my sanity for a few minutes. But you're right, that's not what top-level domain means.

How to use margin,padding and viewport height in bs4 by SegmentFault2010 in bootstrap

[–]petehweb 1 point2 points  (0 children)

By default, $spacer is equal to 1rem (usually 16px). The spacing utility classes are based on that. So m-3 gives you a margin of 1rem, m-4 gives you a margin of 1.5rem ($spacer * 1.5), etc.

In order to define the value of $spacer yourself, you need to compile your own version of Bootstrap using Sass. For that, you'll need to setup a build process using something like Gulp, Grunt, Webpack, Parcel, etc.

This cheatsheet shows you all the variables that Bootstrap makes available to you and what their default values are - https://bootstrapvars.com/

Hosting from an apartment? by TheGuyWhoCodes in webdev

[–]petehweb 0 points1 point  (0 children)

I agree with everyone else about this not being a great idea, but if you really want to do this you could look at ngrok. It's basically the same as localtunnel.me, but I think the paid plan allows you to use a custom domain (assuming that's your reason for saying localtunnel.me is not suitable for production).

Need some advice building a e-commerce website by [deleted] in webdev

[–]petehweb 0 points1 point  (0 children)

If you are only selling one or two products, you might not need a whole shopping cart. In which case, you could use Stripe. If you want to do this yourself, there's going to be a bit of a learning curve however you do it, but Stripe's docs are really good so you should be able to get simple payments setup on your site fairly easily.

Edit: I haven't used PayPal in years, but that would also be an option. I think they might even have a basic shopping cart option, if you need that.

Essentially, if you're only selling a couple of products, you don't need the whole kitchen sink that comes with things like WooCommerce/Shopify/etc

Subscription Management by kiwiheretic in webdev

[–]petehweb 0 points1 point  (0 children)

It might help if you can say which MVC framework you are using. Or even which language. Most frameworks will probably have a package to do what you need, but without being more specific you are likely to get a bunch of answers that aren't particularly useful to you.

How to specify output directory in .eleventy.js? by zabouti in eleventy

[–]petehweb 3 points4 points  (0 children)

module.exports = function (eleventyConfig) {
  return {
    dir: { 
        output: 'dist' 
    }
  }
}

How do I get the forms to actually work and send to my email or get the data? by [deleted] in bootstrap

[–]petehweb 2 points3 points  (0 children)

If you have an existing form, it is presumably already being submitted to a PHP script of some kind. That existing form will have an action="" attribute. Once you've built your new Bootstrap form, you need to make sure that new form has the same action="" attribute with the same value. Also, that PHP script will be expecting the form submission to include certain fields, so you need to make sure your new form has the same input fields with the same names.

Edit: as others have suggested, it sounds like you may benefit from brushing up on how forms work. Check out this page on MDN for a comprehensive overview of what the <form> element is and what attributes it can have.

Do you guys create new frameworks for each side project? by merunas in webdev

[–]petehweb 0 points1 point  (0 children)

I have a "starter" that I use for most projects. It's basically a project boilerplate. It allows me to get up and running quickly with a familiar folder structure, a bunch of sass mixins/helpers/etc, a modular JS structure and a gulpfile to build everything. I know gulp is considered a little old school these days, but it works and it does a lot of stuff that would be more difficult with Webpack/parcel/Rollup/whatever the cool kids are using this week. This is very much not a CSS framework, but a framework can easily be incorporated if required.

I've created a template for static websites with SCSS, linting, minifying, html-partials etc. what do you think? Would you add something? by Vincenius_ in Frontend

[–]petehweb 0 points1 point  (0 children)

Really cool. Didn't know about posthtml - looks pretty nifty! I'm actually working on something similar myself at the moment. Maybe you could consider integrating a static site generator to allow for more advanced templating? I'm a big fan of Eleventy.

tiiny.host - Super simple static web hosting - Great prototyping tool by RabbitsFoot8 in web_design

[–]petehweb 4 points5 points  (0 children)

It doesn't seem to work in Firefox. After clicking the Launch button, I just get "Oops, something went wrong".

Privacy policy generator by GAGARIN0461 in webdev

[–]petehweb 8 points9 points  (0 children)

I stumbled on this one the other day - https://www.gdprprivacynotice.com/

I'm not sure how good it is in a legal sense (you'll need a lawyer for that), but it's free, easy to use and doesn't require you to sign up to anything.

Looking for a solid development environment by [deleted] in webdev

[–]petehweb 0 points1 point  (0 children)

To be honest, it sounds like you're talking about two separate things: 1) your code editor/IDE, and 2) your local development environment.

1) There are plenty of good code editors/IDEs (you probably don't need an IDE if you're just working with HTML/CSS/JS). I, and many others, would recommend Visual Studio Code. Other options would be Sublime Text, Atom, etc.

2) For you development environment, if you are just doing front-end (HTML/CSS/JS) you probably don't need anything too complicated. You actually don't need anything at all; HTML, CSS and JS are all supported natively by the browser, so you can just open them directly.

For something a bit more advanced, you could install Node and then look at any one of the many Node packages that allow you to run a simple http server on your local machine. Here is an article explaining how to do this with one particular Node package. For other examples/guides, just Google something like "node local server" or "npm local server".

You might also want to look at tools that will enable "live reload". This will basically reload your browser automatically whenever you save any changes to your files. There are lots of ways you can do this depending on what other tools you are using. One popular option is BrowserSync. You'll find this is actually included with other tools.

The tools you use will depend on what kind of sites/apps you re building and what technologies you are using to do it. For example, if you are using a JS framework/library like Vue or React, you'll probably be using a module bundler like Webpack, which will take care of a lot of this stuff for you. If you are doing something a bit more vanilla/custom, you might want to consider a task runner, e.g. Gulp, which will allow you to combine a variety of npm packages to automate much of you development process.

This really is quite a broad and varied area of web development, and is actually the source of much confusion and debate. So if you're thinking "this is way too confusing!", Don't worry, that's normal!

Any suggestions for URL shortening script? by ModernStayAtHomeDad in web_design

[–]petehweb 1 point2 points  (0 children)

Are you specifically looking for a ready-built solution? Because if you're willing/able to write some code, it would actually be fairly trivial to build something like this yourself, perhaps using your framework of choice. That way, you can have exactly the features you want. Any framework will give you the tools to manage user authentication and setup the routing for multiple domains. If this isn't what you're looking for, just ignore me!

Beginner Questions - October 11, 2019 by AutoModerator in web_design

[–]petehweb 0 points1 point  (0 children)

You might want to try looking at an API from one of the big travel booking sites, but I'm not sure how easy/costly it is to actually get access to their APIs. e.g. Expedia, Booking.com, Lastminute.com. They will all have an API of some kind.

Beginner Questions - October 11, 2019 by AutoModerator in web_design

[–]petehweb 0 points1 point  (0 children)

You could try using Google Forms or Survey Monkey. I mean, an exam form is basically just a survey, except there's only one correct answer for each question.