[GoLUG] DRY in my 444domains.com system
Steve Litt
slitt at troubleshooters.com
Thu Dec 12 15:35:04 EST 2024
Kyle Terrien said on Thu, 12 Dec 2024 09:02:12 -0800
>On Thu, Dec 12, 2024 at 01:50:07AM -0500, Steve Litt wrote:
>> So the one and only place the price is quantified is in the line:
>>
>> span.bux::before{content: "$54,321.00";}
>>
>> Once the preceding CSS line is stated, anywhere I want to put the
>> price can be displayed simply by the following HTML tag sequence:
>>
>> <span class="bux"></span>
>>
>> And as far as the 444domains.com builder script, all it needs to do
>> is look in the Moretime.Com (or whatever domain I'm selling with a
>> website) index.html for "span.bux::before{content:", and then
>> capture the string that follows. In the 444domains.com builder
>> script I can strip out the dollar sign and commas and turn it into a
>> number for sorting.
>>
>> Kinda slick, huh?
>
>That’s interesting. I suppose you can move all the prices into a CSS
>“data file”.
>
>So, you could have http://moretime.com/prices.css contain
>
>span.bux::before{content: "$54,321.00";}
>
>And then from both moretime.com/index.html and
>444domains.com/index.html:
>
><link rel="stylesheet" href="http://moretime.com/prices.css" />
>
>This way, your price data is completely separate from presentation
>(which is very funny considering this is all CSS), and there is no
>JavaScript involved.
Whoaaaaaaa!
This is fascinating. For that matter, why have my data file at all?
Perhaps just put it ALL in the CSS file. I'll have to check whether I
could do something like the following:
==========================================================
/* DANGER: If you change this file, you must rerun the
444domains.com script!!!!!! */
body#moretimedotcom span.bux::before{content: "$49,000.00";}
body#moretimedotcom span.cmnt::before{content: "Eight letter highly
sought premium domain";}
body#moretimedotcom span.wbst::before{content: "Y";}
body#repairmensuckdotcom span.bux::before{content: "$49,000.00";}
body#repairmensuckdotcom span.cmnt::before{content: "Provocative and
easy to remember";}
body#repairmensuckdotcom span.wbst::before{content: "Y";}
body#repairprocessdotcom span.bux::before{content: "$990.00";}
body#repairprocessdotcom span.cmnt::before{content: "Provocative and
easy to remember";}
body#repairprocessdotcom span.wbst::before{content: "N";}
==========================================================
Of course, span.wbst and span cmnt are never used in the body of the
HTML file: They're just data for the pricelist script (444domains.com).
I don't know whether I'm actually going to use this technique, but Kyle,
it's a brilliant idea, so *thank you*!
This is one reason I always brag about my accomplishments. More often
than not, somebody comes up with something that's even better. Thanks
Kyle!
SteveT
Steve Litt
http://444domains.com
More information about the GoLUG
mailing list