|
ModeSix posted:I need some help with displaying different content in different view sizes, and I believe it's not something I can do with media queries via css. Euuugghhhh, I really hate your using ng-include, that just feels so wrong... I suspect much of your issues stem from the order in which your onresize and digest functions end up being called. I would look at Angular Material to do what you want, it has a number of functions for doing responsive designs like you describe.
|
# ? Jul 11, 2016 01:43 |
|
|
# ? May 9, 2024 04:33 |
|
Anony Mouse posted:Yeah rereading his post it seems like that's more what he uses paint.net for. Still, sketch uber alles. How do you guys recommend learning Sketch? I keep reading amazing things about it, but I never learned anything past the basic Photoshop stuff necessary to cobble together a halfway decent UI.
|
# ? Jul 11, 2016 02:16 |
|
I always stuck the latest 1.X branch of jQuery into my custom-made WordPress themes, but now jQuery 3 is out. Should I worry about using that? The slider I usually used, bxslider, doesn't work in jQuery 3, so is it worth it to keep using what works?
|
# ? Jul 11, 2016 02:50 |
|
ModeSix posted:I need some help with displaying different content in different view sizes, and I believe it's not something I can do with media queries via css. Use window.matchMedia to do media query stuff in JavaScript. Also, why aren't you cleaning up your event handler? code:
|
# ? Jul 11, 2016 09:05 |
|
kedo posted:To: Client Yeah, we tried that. The client can't accept that as an answer so they just wait a few weeks then complain again to see if the answer has changed. That, or they think we're deliberately lying to them and if they complain often enough maybe they'll catch us out
|
# ? Jul 11, 2016 13:48 |
|
Is there some magic incantation I need to do to go Safari on iOS to respect body{overflow-y:hidden}? Mobile Safari is the new IE.
|
# ? Jul 11, 2016 16:32 |
|
The Merkinman posted:Is there some magic incantation I need to do to go Safari on iOS to respect body{overflow-y:hidden}? Mobile Safari is the new IE. Did you explicitly height the body?
|
# ? Jul 11, 2016 19:35 |
|
Lumpy posted:Did you explicitly height the body? code:
|
# ? Jul 11, 2016 21:00 |
|
Hi everybody! Please let me know if this isn't the place to ask. Skill level: Pretty beginner, I have the basic concepts of HTML 5 and CSS down, with some JS Project Requirements: Probably CSS and JS Would anyone mind helping me out? I'd be very grateful! I'd even be happy with a point in the right direction. I'm looking for a simple, clean way to switch between different sets of text. Ideally I'd like to have a set of radio buttons at the top to let the user switch between three sets of text scattered throughout a page. The way I know how to do it would involve hiding each individual instance of all txtB and txtC while the txtA button is depressed, and that seems like it can get tedious and messy as far as code goes. I feel like there's got to be a better way for me to group everything according to type and use some buttons to toggle which values are shown. Simple code: code:
Text A./Text B./Text C. Universal Text Text A./Text B./Text C. Universal Text Any input would be AWESOME.
|
# ? Jul 11, 2016 22:57 |
|
FuriousAngle posted:Hi everybody! Please let me know if this isn't the place to ask. Assign a CSS class to each set of text (let's say "textA" "textB" "textC" to keep things simple). When a radio button is selected, set the two non-active classes to have "display:none" in CSS, and the active class to have "display:block". Is this enough to get started with or would you like more help?
|
# ? Jul 12, 2016 00:11 |
|
You could also lean more on CSS and write a style that hides all conditional elements, then show the elements that match the parent class:CSS code:
code:
|
# ? Jul 12, 2016 00:24 |
|
PT6A posted:Assign a CSS class to each set of text (let's say "textA" "textB" "textC" to keep things simple). When a radio button is selected, set the two non-active classes to have "display:none" in CSS, and the active class to have "display:block". That's a great start! Thanks! Let me see if I can do it with that!
|
# ? Jul 12, 2016 00:25 |
|
Depressing Box posted:You could also lean more on CSS and write a style that hides all conditional elements, then show the elements that match the parent class: So close! I hate to ask for help again so soon but this is driving me nuts. My JS skills aren't quite up to snuff, apparently, and I'm having a hell of a time figuring out the IF statement's syntax (if I should even be using IF statements for what I'm doing). Here's what I have so far. To simplify I just lumped the CSS in the main code. Can anyone spot what I'm doing wrong? code:
|
# ? Jul 12, 2016 03:28 |
|
Your code only runs on document load, you need to run it when your radio buttons are clicked.
|
# ? Jul 12, 2016 03:37 |
|
FuriousAngle posted:So close! I hate to ask for help again so soon but this is driving me nuts. My JS skills aren't quite up to snuff, apparently, and I'm having a hell of a time figuring out the IF statement's syntax (if I should even be using IF statements for what I'm doing). Mixing CSS and JS like that won't actually do anything. I'd recommend reading some introductory JavaScript tutorials to get familiar with how the language is structured (I've found Eloquent Javascript to be pretty straightforward, and it's free). To your specific question, here's a JSFiddle demonstrating a possible solution, using jQuery since I don't know which browsers you're targeting. Notice how the major sections (controls, text) are grouped under divs with descriptive classes, making them easier to target with your styles and scripts. Depressing Box fucked around with this message at 05:28 on Jul 12, 2016 |
# ? Jul 12, 2016 04:22 |
|
Skandranon posted:Euuugghhhh, I really hate your using ng-include, that just feels so wrong... I suspect much of your issues stem from the order in which your onresize and digest functions end up being called. I would look at Angular Material to do what you want, it has a number of functions for doing responsive designs like you describe. Yes I've played with Angular Material in the past and it may be worth slipping into the project for the responsive features alone, I've been messing with it the last couple days and the way it handles screen resizing is fantastic. I'm sure some of the other components will work very well with what I am doing also. I'd love to do the whole project using it, but it seems some things are less than intuitive with it, such as an actual navbar, however switching the content based on screen size is dead simple.
|
# ? Jul 12, 2016 15:56 |
|
The Merkinman posted:It's currently this: 100% of what...... Maybe try 100vh instead? Then again, isn't that just what browsers do when the content is bigger than the viewport?
|
# ? Jul 12, 2016 17:46 |
|
ModeSix posted:Yes I've played with Angular Material in the past and it may be worth slipping into the project for the responsive features alone, I've been messing with it the last couple days and the way it handles screen resizing is fantastic. Did you see the rather simple solution I posted about responding to media query events using window.matchMedia? Angular Material's $mdMedia service uses the same method to respond to media query events.
|
# ? Jul 12, 2016 18:13 |
|
Depressing Box posted:Mixing CSS and JS like that won't actually do anything. I'd recommend reading some introductory JavaScript tutorials to get familiar with how the language is structured (I've found Eloquent Javascript to be pretty straightforward, and it's free). That's great! It's exactly what I want it to do! And you're right, I definitely need to get more familiar with Javascript. I'm trying to run before I can walk. In the meanwhile, where do I place that JS code so it works? I've tried copying it directly in <SCRIPT> brackets in the HEAD and BODY sections and that doesn't work so I'm fairly certain I'm doing that wrong too.
|
# ? Jul 12, 2016 19:29 |
|
FuriousAngle posted:That's great! It's exactly what I want it to do! And you're right, I definitely need to get more familiar with Javascript. I'm trying to run before I can walk. In the meanwhile, where do I place that JS code so it works? I've tried copying it directly in <SCRIPT> brackets in the HEAD and BODY sections and that doesn't work so I'm fairly certain I'm doing that wrong too. You need to include jQuery first, and I recommend putting both at the very bottom of the page, just before the closing </body> tag, like so. Loading scripts last keeps them from slowing down the initial page load, and makes it so you don't (or very rarely) need to wait for the window.onload event.
|
# ? Jul 12, 2016 19:46 |
|
Depressing Box posted:You need to include jQuery first, and I recommend putting both at the very bottom of the page, just before the closing </body> tag, like so. Loading scripts last keeps them from slowing down the initial page load, and makes it so you don't (or very rarely) need to wait for the window.onload event. You are an amazing person. You deserve a raise and a back-rub. Thank you!
|
# ? Jul 12, 2016 19:52 |
|
I've asked this before but any suggestions for transactional email providers? It's for a server that sends ~1000 emails a month, mostly "new user", "here's your password", "contact form submission", etc. My dilemma: Mandrill - needs a paid Mailchimp account Mailgun - no throttling / IP whitelisting (as I learnt to my dismay after it happily let through 20k spam emails in a couple of hours last week) Sendgrid - no logs, so no way to see which sites are sending emails (I don't need to see the whole message, but want at least the sender, recipient and subject line so I can keep an eye on things) I'll just go with Mandrill if there are no other alternatives.
|
# ? Jul 13, 2016 16:26 |
|
fuf posted:I've asked this before but any suggestions for transactional email providers? It's for a server that sends ~1000 emails a month, mostly "new user", "here's your password", "contact form submission", etc. I use AWS - SES for all emails. Integrate with SNS and SQS to handle bounces and failed deliveries.
|
# ? Jul 13, 2016 18:52 |
DarkLotus posted:I use AWS - SES for all emails. Integrate with SNS and SQS to handle bounces and failed deliveries. Seconding SES. It's perfect for when all you wanna do is send email. I don't want or need any of the features that the other providers offer. I setup a postfix relay for it so everything on the box can just send to localhost:25 (usually the default config) and it will get sent via SES. So cron emails, jenkins, java webapp, etc all just works.
|
|
# ? Jul 13, 2016 19:01 |
|
So I'm trying to fix a CSRF vulnerability in an application I'm working on, but I'm pretty new to web security stuff in general and thought I'd bounce it off the thread. The front end uses AngularJS and the backend is made up of REST services written in Java. I've seen a few different ways of providing protection but I'm going with the method supported by AngularJS so I don't have to implement the client-side half of the equation myself. Basically I provide a token in a cookie labeled on the first GET and Angular sends that token on all subsequent requests in a custom header for me to validate. Most of the ways I've seen recommended to implement the server-side portion involve storing the token in the session and matching the header token with the token stored in the session. Since the application currently doesn't make use of session, I'm currently storing the token in a guava LoadingCache, which I'm using because it will handle expiration of the token for me. It works just fine as far as I can tell, but I'm wondering if there's some degree of security removed because the tokens aren't strictly tied to a user. The only thing I've been able to think of is that if two (or more) users were compromised that the attacker would be able to use either token. But I think I'd be able to prevent that too if I also checked if the cookie and header tokens matched in addition to checking if the header token was in the cache.
|
# ? Jul 14, 2016 01:01 |
|
argondamn posted:So I'm trying to fix a CSRF vulnerability in an application I'm working on, but I'm pretty new to web security stuff in general and thought I'd bounce it off the thread. If the tokens are not mapped to an individual user, how do you authenticate what each user is doing?
|
# ? Jul 14, 2016 01:18 |
|
fuf posted:I've asked this before but any suggestions for transactional email providers? It's for a server that sends ~1000 emails a month, mostly "new user", "here's your password", "contact form submission", etc. Explain more about mailgun? What is wrong with that?
|
# ? Jul 14, 2016 01:18 |
|
Skandranon posted:If the tokens are not mapped to an individual user, how do you authenticate what each user is doing? I'm not too keen on the details, but we are making use of jaas. I don't have to worry about authentication.
|
# ? Jul 14, 2016 04:01 |
|
Biowarfare posted:Explain more about mailgun? What is wrong with that? I'm just super paranoid about the lovely wordpress sites I host getting hacked and sending out spam. Spam from client domains = their domain reputation gets damaged = their legit emails end up in spam folders. Mandrill has a thing where if you usually only send a few emails per hour and then suddenly you start trying to send thousands, it will queue them up and give you a chance to delete them. I know that stuff should be handled directly on the server, but it's just an extra little layer of reassurance. One of my sites got hacked last week, and Mailgun just let all the spam through without a second thought. I actually emailed Mailgun a few months back to ask about implementing sending limits for spam protection, and they were like "yes this is a great idea, we'll get on it asap!" Then I emailed them again after all the spam (not to complain really, just to let them know) and they deleted the ticket lol I might go with SES, thanks for that. They don't log sent emails though unfortunately. https://postmarkapp.com/ looks promising too.
|
# ? Jul 14, 2016 13:44 |
|
fuf posted:I might go with SES, thanks for that. They don't log sent emails though unfortunately. Really? We use SES on one of our projects and we have a log of each email sent.
|
# ? Jul 14, 2016 14:41 |
|
nexus6 posted:Really? We use SES on one of our projects and we have a log of each email sent. You may have your own internal log, but SES itself does not provide any kind of a functional log of emails sent. It counts them sure, but doesn't list times and recipients with subjects or anything like Mandrill does. For those that need logging... If you're using postfix to dump messages to AWS, just monitor the postfix logs, it's not that hard to identify spam. You can also force authentication so only authenticated sources can send mail through postfix to SES. If you're running any kind of a web hosting server and host wordpress, it will eventually be compromised. I suggest you use something like mailchannels, they identify and stop spam and alert you to it so you can fix it. It's what Lithium uses on all shared hosting servers and we even sell low volume mailchannels plans if you want to try it out.
|
# ? Jul 14, 2016 14:47 |
|
DarkLotus posted:If you're running any kind of a web hosting server and host wordpress, it will eventually be compromised. I suggest you use something like mailchannels, they identify and stop spam and alert you to it so you can fix it. Oh hell yeah, that sounds like exactly what I need. Man I've been googling this poo poo all day but that never showed up. Ok new plan: Rely on server for logs / auditing Get a $10 mailchannels account from DarkLotus Profit
|
# ? Jul 14, 2016 15:31 |
|
fuf posted:Oh hell yeah, that sounds like exactly what I need. Man I've been googling this poo poo all day but that never showed up. Lithium Hosting is a MailChannels partner / reseller and they have referred people to us for low volume plans. Cost per message is cheaper than what they offer on their lowest tier. I don't normally advertise like this, but it is a solution to a problem at a good price. Shop around though, make the decision that works for your needs / company / website.
|
# ? Jul 14, 2016 15:40 |
|
man that was barely advertising, that was just genuinely helpful. I think you've earned enough goodwill in these threads over the years that no one minds
|
# ? Jul 14, 2016 16:06 |
|
DarkLotus posted:You may have your own internal log, but SES itself does not provide any kind of a functional log of emails sent. We use SNS to get SES notifications sent to our server for deliveries, bounces, e.t.c Our log includes the headers, message and SMTP respones for each message sent by SES.
|
# ? Jul 14, 2016 16:33 |
|
SES is surprisingly good, for once an Amazon product does what it says mostly on the tin. It's a Simple Email Service. I've think I've converted 5 or 6 shops to it in the last couple years.
|
# ? Jul 14, 2016 19:24 |
|
DarkLotus posted:Lithium Hosting is a MailChannels partner / reseller and they have referred people to us for low volume plans. Cost per message is cheaper than what they offer on their lowest tier. Any chance you could offer a smaller account (<500 emails/m)? Could pay in bitcoin to not be hit with transaction fees if needed? Or does mailchannels not like that
|
# ? Jul 14, 2016 21:29 |
|
Our designer handed us something I did not realize would be a problem until I got down to actually trying to make it work. The page masthead should be able to have an image on the right that is cut at a 30° angle and extends past the masthead into the nav. Mockup: I've been unable to figure out how to achieve this—first tried a skewed wrapper with overflow hidden and the image counter-skewed, but the clipping didn't come out right and there was no way to allow the client to specify what area of the image they want to appear in the unclipped portion. Worse, the masthead should theoretically expand as they overfill the intro text, revealing more of the image and the image comes to a point with another angle back toward the right-hand side. Has anyone got experience doing something like this before? Any insights to offer?
|
# ? Jul 14, 2016 22:23 |
|
SVG paths and masking might help.
|
# ? Jul 14, 2016 22:32 |
|
|
# ? May 9, 2024 04:33 |
|
Biowarfare posted:Any chance you could offer a smaller account (<500 emails/m)? Could pay in bitcoin to not be hit with transaction fees if needed? Or does mailchannels not like that We pay a per user account fee plus per message fees, so the plans are priced out to be affordable and profitable at the same time. I don't think you'll find better than our MC Starter plan, $10/mo isn't bad for what you get compared to buying from MailChannels directly.
|
# ? Jul 14, 2016 23:50 |