|
Leshy posted:It's a hobby project, so there's no cost involved, and otherwise I wouldn't even start on implementing CSS variables yet In terms of assets to load, get concerned when you hit 10MB for a page load, 7.5k is nothing. Well if you're set on using php you could quite easily do it this way: In your head tag code:
code:
Create separate stylesheets for the theme specific colors and have TWO stylesheet links, one for your generic sheet and one for your color specific sheet. Using the exact same style property naming in all the sheets. I haven't written php in about 10 years and yeah I think I just came up with a way better and much easier to maintain piece of code than you've written. ModeSix fucked around with this message at 00:45 on Feb 18, 2016 |
# ? Feb 18, 2016 00:42 |
|
|
# ? Jun 5, 2024 05:17 |
|
I'm looking for a way I can wrap a static microsite (HTML, CSS, JS, some images and video) into a desktop app for windows so instead of users having to open index.html in their browser they can just run an exe. I've seen things like NWJS and electron but all the documentation I've read sounds overkill with adding libraries, node modules, operating system APIs, etc. I just want to take a static site and bundle it up. Am I looking in the right direction?
|
# ? Feb 18, 2016 00:57 |
|
nexus6 posted:I'm looking for a way I can wrap a static microsite (HTML, CSS, JS, some images and video) into a desktop app for windows so instead of users having to open index.html in their browser they can just run an exe. I would go with Electron, it's probably the fastest way to get what you want. So what it it's overkill. Most of the libraries/node modules you are adding are for Electron itself, and you only need to add OS APIs if you are going to use them, which is essential work you can't get around.
|
# ? Feb 18, 2016 01:39 |
|
ModeSix posted:Create separate stylesheets for the theme specific colors and have TWO stylesheet links, one for your generic sheet and one for your color specific sheet. Using the exact same style property naming in all the sheets. The point is that with CSS variables, that second stylesheet is no longer needed at all. You declare the colours for the elements as a CSS variable in the main stylesheet, at which point you only need the page to re-declare the CSS variable to update all colours as appropriate, which you can do with a single declaration in the <style> tag. Hence I was looking for a solution that specifically says: 1. Does the browser support CSS variables? If so, add "<style> :root {--accent-color: [section-color]} </style>" to the page. 2. Does the browser not support CSS variables? Then add "<link rel='stylesheet' href='styles-[section-color]'>" to the page. [eg. the secondary stylesheet from your solution, which is already what's in place]. Hence, I added a small piece of JavaScript to the page which does exactly this through feature detection. As I have the required section-color in a variable in the PHP template alrady, it made sense to pass it directly into the javascript. Fake edit: I realised after logging off yesterday that I made a thinking error with regard to the 'throw everything in the main stylesheet and switch through setting an class on the body' yesterday. It doesn't require setting all colours twice, so would be slightly less of an increase in CSS size. However, it also directly negates using CSS variables (which declare everything once, rather than declare everything n times for each colour) and requires the continued maintenance of the same extra stylesheets (now as partials), making it not really very different from the current situation. As previously said, this exercise was specifically to build in support for CSS variables for browsers that support it.
|
# ? Feb 18, 2016 09:00 |
|
nexus6 posted:I've seen things like NWJS and electron but all the documentation I've read sounds overkill with adding libraries, node modules, operating system APIs, etc. I just want to take a static site and bundle it up. Am I looking in the right direction? Skandranon posted:I would go with Electron, it's probably the fastest way to get what you want. So what it it's overkill. Most of the libraries/node modules you are adding are for Electron itself, and you only need to add OS APIs if you are going to use them, which is essential work you can't get around. Yeah this. I've barely touched it, but I had some success with getting Electron Boilerplate to actually compile and poo poo out a standalone installer inside an hour, where 2 or 3 other libs choked hard. There might be sorta simpler systems out there, but getting it to run cross platform has always a problem. Electron is just web enough that it should protect you from most the platform-specific requirements, libraries, and general fuckery. If you do use it, let me know how you get on. I'd like to know if continuing with Electron-Boilerplate is the way to go long-term or not.
|
# ? Feb 18, 2016 11:35 |
|
I've just read that Electron requires a minimum of Windows 7, we'll see if my client even has that but I'm suspecting XP.
|
# ? Feb 18, 2016 13:22 |
|
I've been slowly teaching myself html/php/css/etc as I customize my template on my webcomic. (Yesterday I read up on anchor points and got them working and was totally amazed) Anyway I was trying to get image maps to work yesterday. I can't quite figure how to marry image maps with how my cms loads my comic. This is what's there now: code:
code:
Any hints?
|
# ? Feb 19, 2016 01:44 |
|
Evil Vin posted:I've been slowly teaching myself html/php/css/etc as I customize my template on my webcomic. (Yesterday I read up on anchor points and got them working and was totally amazed) Does "<?=show('comic_image')?>" generate the <img> tag for you? What CMS are you using?
|
# ? Feb 19, 2016 02:14 |
|
DarkLotus posted:Does "<?=show('comic_image')?>" generate the <img> tag for you? What CMS are you using? '<?=show('comic_image')?> pops out this on a random comic page code:
|
# ? Feb 19, 2016 03:43 |
|
Evil Vin posted:'<?=show('comic_image')?> pops out this on a random comic page This is the show function php:<? function show($str=null) { global $grlxPage; $output = $grlxPage->returnShowOutput($str); // Add itemprops if ( $str == 'artist_name' ) { $output = '<span itemprop="author copyrightHolder">'.$output.'</span>'; } if ( $str == 'copyright' ) { $output = '<span itemprop="copyrightYear">'.$output.'</span>'; } return $output; } ?> I'd suggest reaching out to the developer and asking them for image map support.
|
# ? Feb 19, 2016 03:52 |
|
DarkLotus posted:This is the show function Thanks for the help. It might not be worth the effort for something I was just really playing around with. Though I may still ask them about next time I email them.
|
# ? Feb 19, 2016 03:57 |
|
I know this is pretty lame but would there be any interest in some SEO / analytics / adwords discussion? (Is there already a thread?) I'm doing more and more of this stuff and it would be great to talk over some things with non-insane people.
|
# ? Feb 19, 2016 16:37 |
|
more knowledge never hurts
|
# ? Feb 19, 2016 17:26 |
|
fuf posted:I know this is pretty lame but would there be any interest in some SEO / analytics / adwords discussion? (Is there already a thread?) I'm doing more and more of this stuff and it would be great to talk over some things with non-insane people. I do web development for an advertising agency, so I would probably have stuff to talk about at some point regarding those subjects.
|
# ? Feb 19, 2016 18:09 |
|
Ok well the site I'm trying to promote is [redacted] fuf fucked around with this message at 12:28 on Apr 30, 2016 |
# ? Feb 19, 2016 18:34 |
|
I'm a back end web dev and enough front end work is happening that I no longer feel comfortable just googling around for answers. Where is the best place to do a deep dive on CSS? Books or online classes. As long as the focus is css and really learning it, not just hot tips in one-off blog posts. I'm tired of fumbling around in the inspector trying to guess my way to making the page do what I want.
|
# ? Feb 19, 2016 19:34 |
|
PlesantDilemma posted:I'm a back end web dev and enough front end work is happening that I no longer feel comfortable just googling around for answers. Where is the best place to do a deep dive on CSS? Books or online classes. As long as the focus is css and really learning it, not just hot tips in one-off blog posts. I'm tired of fumbling around in the inspector trying to guess my way to making the page do what I want. I found this pretty helpful: http://learnlayout.com
|
# ? Feb 19, 2016 20:03 |
|
Evil Vin posted:Thanks for the help. It might not be worth the effort for something I was just really playing around with. Though I may still ask them about next time I email them. comedy option code:
|
# ? Feb 19, 2016 20:51 |
|
Leshy posted:(both as a CSS variable and as a fallback colour) I can't figure out what you mean by this and can only assume I'm missing something obvious.
|
# ? Feb 23, 2016 07:21 |
|
Leshy posted:CSS variables stuff Just seen this article in a newsletter that may help you out: https://justmarkup.com/log/2016/02/theme-switcher-using-css-custom-properties/
|
# ? Feb 23, 2016 09:59 |
|
This might be an idiot question, but anyway... I am interested in writing a vb or c# application that uses a socket listener to interact with a HTML5 (svg images & javascript) web page, HTML 5 style. To operate the application over the web page, you see..... This seems pretty simple, as there are socketListener examples around- https://msdn.microsoft.com/en-us/library/fx6588te%28v=vs.110%29.aspx And the web page just has to have javascript button events that sent text that the application server can interpret properly, and compose & return the correct HTML page code. I have seen it said that you can change a web page by sending data (or a new web page?) over a web socket, but I can't find any example of this. In particular--I would want to keep re-using the same web page address over if I want (to defeat the use of the browser's [back] button). Assuming you send the new page as data over the websocket, then how do you tell the browser to refresh, but render the page using the HTML code you sent it over the socket? Or is this possible at all? The "gee whiz" info about HTML 5 and webSockets seems to say that this is possible. In this example, the application server would be able to track the user's actions through the messages from the buttons, so the socket persistence over multiple pages would not matter. I can't find any example of this. ALL the web socket examples or socket listener examples I find are one of two types: 1--either the client is another application (not a regular web browser), or- 2--the web page with the web socket has the 'next' target page written into each of the JavaScript button click events, and the page address has to change in order to refresh the browser view at all.
|
# ? Feb 23, 2016 14:52 |
|
edmund745 posted:This might be an idiot question, but anyway... I just skimmed your post because I'm a bad person, but JS can put whatever HTML it wants on the page. I mean, you can send the literal text "make a blue div that says in all caps YOU'RE A COCK" over a websocket and JS can put the div and styling and text right on the page however you want.
|
# ? Feb 23, 2016 16:36 |
|
edmund745 posted:This might be an idiot question, but anyway... Listen for the onmessage event, and do whatever you want with the data... you can replace the contents of the BODY tag with what was sent back if that's what you need to do. e:f;b
|
# ? Feb 23, 2016 16:39 |
|
The Wizard of Poz posted:I can't figure out what you mean by this and can only assume I'm missing something obvious. code:
Heskie posted:Just seen this article in a newsletter that may help you out: The basic solution that this article uses is indeed the one that I ended up using as well, so it would have indeed been helpful. The article doesn't really provide any fallback beyond "serve a basic colour that does not change to incompatible browsers" either, however, although their use case also differs somewhat from mine as I don't need on-the-fly theme switching.
|
# ? Feb 23, 2016 19:50 |
|
I'm making a simple website to show daily weather data from locations around the world. Here it is so far: http://erbweather.com/. To start, I've just been doing the data analysis offline: I download the raw data files to my personal computer, run some R scripts to extract and process data, and then upload the new files to my website. However, I would like the website to update daily, so I need to automate this process. My website is on Bluehost. I'm pretty new to web development, though. I can SSH onto my website, but R doesn't seem to be installed. Can I treat a website just like linux on other machines and install the programs that I want, or is it more complicated than that? R is the main program I want to use. Or should I be taking a different approach?
|
# ? Feb 27, 2016 07:06 |
|
DorianGravy posted:I download the raw data files to my personal computer, run some R scripts to extract and process data, and then upload the new files to my website. However, I would like the website to update daily, so I need to automate this process. As for running things on the server, that gets a bit more sticky. quote:Can I treat a website just like linux on other machines and install the programs that I want The first problem is R. You are very unlikely to get them to install R system-wide, which means you need a local install. It's very unlikely that they'll have a compiler on the machine either, so you probably won't be able to compile it there. You maybe could find a machine running an identical OS and either compile it there or copy someone's prepackaged binaries over to your home directory on the shared host, but that's no guarantee of success. Check to see if there's a distribution of R that is statically compiled, meaning it doesn't rely on any specific system libraries. This is a long shot and is very unlikely. The second problem is the restrictions most shared hosts have in place. Shared hosting is only profitable by stuffing as many websites on a single machine as possible. Performance suffers as a result. Anything that sits and chews up CPU time is going to stick out like a sore thumb, and many hosts have automated process killers that will look for long running processes and murder them violently. If your data processing takes more than a few seconds, you aren't going to even want to run it on shared hosting, even if you could.
|
# ? Feb 27, 2016 10:22 |
|
DorianGravy posted:I'm making a simple website to show daily weather data from locations around the world. Here it is so far: http://erbweather.com/. To start, I've just been doing the data analysis offline: I download the raw data files to my personal computer, run some R scripts to extract and process data, and then upload the new files to my website. If you feel competent enough to manage your own server, you could try something like Digital Ocean or OVH, they offer fairly cheap VPS (around $5/month for the basic package) and you can run whatever you want on them without restriction, as long as you can set it up yourself. http://www.digitalocean.com http://www.ovh.com
|
# ? Feb 27, 2016 17:35 |
|
ModeSix posted:If you feel competent enough to manage your own server, you could try something like Digital Ocean or OVH, they offer fairly cheap VPS (around $5/month for the basic package) and you can run whatever you want on them without restriction, as long as you can set it up yourself. Or Amazon's EC2's free tier for a year of messing around at no cost.
|
# ? Feb 27, 2016 18:49 |
|
Here's what I'm sure is a really stupid question because I'm not a designer and I don't even own photoshop... I've got a stained/finished plank of wood that I want to build a color palette for a web site around. What a good technique to get a color value that best represents the range of color found found in the wood?
|
# ? Feb 27, 2016 21:55 |
|
Thermopyle posted:Here's what I'm sure is a really stupid question because I'm not a designer and I don't even own photoshop... https://play.google.com/store/apps/details?id=com.moffitj.horizon
|
# ? Feb 27, 2016 22:36 |
|
Lumpy posted:Or Amazon's EC2's free tier for a year of messing around at no cost. Just be very careful with these options, as it's very easy to accidentally leave yourself wide-open to security threats and other horrors if you aren't a sysadmin.
|
# ? Feb 27, 2016 22:48 |
|
Karthe posted:Would something like this help? Google introduced a Palette class with Android M (I think) that can generate a color palette from a bitmap. I'm all but positive that that's what apps like this use to create palettes from pictures: Oh, yeah that worked fine. In fact I didn't even realize such kinds of apps existed and that knowledge led me to all sorts of websites doing the same thing. Thanks.
|
# ? Feb 27, 2016 23:29 |
|
I have a JSON web token question in the context of integrating Auth0 (or similar third-party services) into an API server: do I somehow need to cache JWT tokens on the server? I understand how I might implement a JWT library like this one into Django, but I'm not sure what to do when the JWT is being generated on an outside server. Does my API server need to query Auth0 for every request to make sure that the JWT passed in from the client is valid? That seems kinda expensive versus the API server itself handling JWT generation, refreshing, and validating.
|
# ? Feb 28, 2016 08:56 |
|
Any recommendations for a wiki markup editor? I have a Mediawiki site set up but the standard WYSIWYG toolbar is horrendous and I keep having to look up a wikipedia page for markup syntax. There are WYSIWYG extensions but each has obsucre and esoteric installation methods and are not complete. Ideally I'd like something like MarkdownPad so I can write my content in a decent editor environment and copy/paste it into media wiki, but with wiki markup and not markdown.
|
# ? Mar 1, 2016 13:52 |
|
How about the reverse; integrate markdown support into Mediawiki? https://github.com/Rican7/MediaWiki-MarkdownExtraParser/ You'll still have to use some third party Markdown editor if you want a friendly editor, but I see Markdown as a much more portable format than the Mediawiki markup. Obviously this doesn't help you if you want to use other Mediawiki syntax and extensions which don't exist in plain ol' Markdown.
|
# ? Mar 2, 2016 03:42 |
|
v1nce posted:How about the reverse; integrate markdown support into Mediawiki? https://github.com/Rican7/MediaWiki-MarkdownExtraParser/ That sounds promising. I'm just annoyed because even writing simple articles on Mediawiki is a chore since you have to type out every bit of formatting yourself instead of it automatically being used (lists especially) and every time you want to insert and image you have to navigate to another page to upload it and enter the filename manually in the article instead of browsing uploaded files.
|
# ? Mar 2, 2016 13:54 |
|
I am considering changing careers and am interested in exploring web development. The master's program I am looking at is in information systems and has a concentration in web application (PHP, .NET along with Google web kit, MYSQL ect....). Before applying to the program though I was thinking about looking into the front end of websites. The OP is very detailed but I'm looking for more of "help I am a helpless child that has no idea what I'm doing--- Where do I start section?" Am I wrong to assume it's HTML5 and basic CSS? And even more abstract, professionally how coding intensive is this career? Are there areas that emphasize user experience / design more than others? Any suggestions or input would be incredibly appreciated.
|
# ? Mar 4, 2016 19:16 |
|
Ample posted:I am considering changing careers and am interested in exploring web development. The master's program I am looking at is in information systems and has a concentration in web application (PHP, .NET along with Google web kit, MYSQL ect....). Before applying to the program though I was thinking about looking into the front end of websites. The OP is very detailed but I'm looking for more of "help I am a helpless child that has no idea what I'm doing--- Where do I start section?" Am I wrong to assume it's HTML5 and basic CSS? And even more abstract, professionally how coding intensive is this career? Are there areas that emphasize user experience / design more than others? Any suggestions or input would be incredibly appreciated. The major difference between what would be called HTML4 and HTML5 is interactivity being considered as a major feature, so it is unlikely you'll do any significant web work without being somewhat capable in JavaScript, unless you are going towards purely design. However, pure design is more something you would come at from an artistic angle, not programming. I do almost pure TypeScript development now, very little styling or markup myself, so it can be coding intensive.
|
# ? Mar 4, 2016 19:30 |
|
I decided that I want to move my personal website (which has a rarely updated blog ) from WordPress to some static pages, so I'm looking into using a static site generator and maybe hosting on GitHub Pages. The obvious answer is to use Jekyll, but I'm leaning towards using Hugo because Ruby on Windows is a headache and a half. Anyone have any thoughts about other static site generators or static site generators in general?
|
# ? Mar 6, 2016 23:46 |
|
|
# ? Jun 5, 2024 05:17 |
|
Mecca-Benghazi posted:I decided that I want to move my personal website (which has a rarely updated blog ) from WordPress to some static pages, so I'm looking into using a static site generator and maybe hosting on GitHub Pages. The obvious answer is to use Jekyll, but I'm leaning towards using Hugo because Ruby on Windows is a headache and a half. Anyone have any thoughts about other static site generators or static site generators in general? You could always chuck Ubuntu on a VM, and have full access to all static generators.
|
# ? Mar 7, 2016 00:37 |