Couple basic web design questions.

Discussion in 'OT Technology' started by Bigsnake, Jun 25, 2007.

  1. Bigsnake

    Bigsnake OT Supporter

    Joined:
    Nov 30, 2003
    Messages:
    34,557
    Likes Received:
    0
    Location:
    Baton Rouge
    I'm wanting to get a webpage up for me to fool around with. Write some articles, etc.

    But, my main question is, I want to put something basic up now but, how do I have to set it up that when I want to change layouts, I don't have to do every single page again?

    I guess where the article text part is in a separate file and that file link is put into the layout text? or what?
     
  2. retorq

    retorq What up bitch??

    Joined:
    Dec 14, 2006
    Messages:
    6,061
    Likes Received:
    0
    Location:
    Mohave Desert
    Use shtml/include files??
     
  3. Bigsnake

    Bigsnake OT Supporter

    Joined:
    Nov 30, 2003
    Messages:
    34,557
    Likes Received:
    0
    Location:
    Baton Rouge
    Also forgot to mention, I have a version of Dreamweaver. Not sure which one, but I'll have to grab it next time I'm at my parents house. I know there is some hate for WYSIWIGs.
     
  4. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Behold, Penguin Man's magic Makefile-based CMS:

    Code:
    # Takes foo.left, foo.right and foo.sect, plus esc.template to create foo.html                                                                                                                                                                                            
    # through the magic of sed, cat, gcc -E and other UNIXey goodness                                                                                                                                                                                                         
    
    # Be sure to add all HTML files for your site here.                                                                                                                                                                                                                       
    FILES = index.html file1.html file2.html
    
    # The base of your website, relative to $CWD                                                                                                                                                                                                                              
    DEST = ../newesc                                                                                                                                                                                                                                                          
    # The name of the template to use.  Must reside in the file $(TEMPLATE).template                                                                                                                                                                                          
    TEMPLATE = mytemplate                                                                                                                                                                                                                                
    # Permissions for HTML files in some form chmod understands                                                                                                                                                                                                               
    PERMS = 0644                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                              
    # This will create the entire website                                                                                                                                                                                                                                     
    all: $(FILES)                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                              
    # Take the HTML file, get rid of blank lines, copy it and chmod it (creating directories if necessary)                                                                                                                                                                    
    %.html: %.out                                                                                                                                                                                                                                                             
            mkdir -p $(DEST)                                                                                                                                                                                                                                                  
            chmod $(PERMS) $(DEST)                                                                                                                                                                                                                                            
            chmod a+x $(DEST)                                                                                                                                                                                                                                                 
            cat -s $< > $(DEST)/$@                                                                                                                                                                                                                                            
            chmod $(PERMS) $(DEST)/$@                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                              
    # Take a content file, convert '/" characters so gcc doesn't complain, write the include into template                                                                                                                                                                    
    %.in: SECTION=$(shell cat $*.sect)                                                                                                                                                                                                                                        
    %.in: %.left %.right $(TEMPLATE).template                                                                                                                                                                                                                                 
            sed -i "s/'/\&\#39\;/g" $(TEMPLATE).template $^                                                                                                                                                                                                                   
            sed "s/^## LEFT ##/#include \"$*.left\"/g;s/^## RIGHT ##/#include \"$*.right\"/g;s/## SECT ##/$(SECTION)/g" $(TEMPLATE).template > $@                                                                                                                             
                                                                                                                                                                                                                                                                              
    # Inline the content with gcc, get rid of garbage gcc puts in                                                                                                                                                                                                             
    %.out: %.in $(TEMPLATE).template                                                                                                                                                                                                                                          
            gcc -x c -E $< -o $@                                                                                                                                                                                                                                              
            sed -i 's/^#.*//g' $@                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                              
    # Delete temporary files.  Not particularly useful, but it's here.                                                                                                                                                                                                        
    clean:                                                                                                                                                                                                                                                                    
            -rm -f *~ *.out *.in
    Tweak as necessary :).
     
  5. Coottie

    Coottie BOOMER......SOONER OT Supporter

    Joined:
    Jun 6, 2006
    Messages:
    32,407
    Likes Received:
    0
    Location:
    OKC
    I've been messin around with dreamweaver and adding articles is really as easy as copying and pasting.
     
  6. goober

    goober New Member

    Joined:
    Oct 20, 2005
    Messages:
    196
    Likes Received:
    0
    You may want to look into styles.
     
  7. Bigsnake

    Bigsnake OT Supporter

    Joined:
    Nov 30, 2003
    Messages:
    34,557
    Likes Received:
    0
    Location:
    Baton Rouge
    I had a webpage in the past that I did in dreamweaver. When I wanted to change the design, I ended up basically having to redo every page and copy and paste the text over. I want to avoid this.
     
  8. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    um, use a framework.
     
  9. deezil

    deezil New Member

    Joined:
    Sep 7, 2004
    Messages:
    1,968
    Likes Received:
    0
    Location:
    Murray, KY
    CSS if you must. Use some sort of framework, or even a blogging software with a way to do static pages.
     
  10. silent_ninja_8

    silent_ninja_8 New Member

    Joined:
    Jun 24, 2007
    Messages:
    32
    Likes Received:
    0
    I'm not sure if I'm understanding what exactly you are wanting to do. So if it sounds wrong then I might have misunderstood. but if you are wanting to keep like the text areas on the pages and just change the layout around it you could always just use iframes. that way you could always keep the same pages and just change the layout/template of the site.
     
  11. Bigsnake

    Bigsnake OT Supporter

    Joined:
    Nov 30, 2003
    Messages:
    34,557
    Likes Received:
    0
    Location:
    Baton Rouge
    basically what I'm wanting to do.

    Say I have 10 pages all the same layout with a article on each one.

    I want to be able to go and change the design of the actual webpage without having to go and make 10 new pages by creating the page and copying and pasting the text over.
     
  12. MrBrotato

    MrBrotato New Member

    Joined:
    Sep 7, 2005
    Messages:
    5,558
    Likes Received:
    0
    It's already been said long ago, server side includes. SSI
     
  13. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    ugh ssi is ghey
     
  14. markwill

    markwill New Member

    Joined:
    Jun 8, 2007
    Messages:
    19
    Likes Received:
    0
    need some programming things... where Content Management System can be established.
     
  15. MrBrotato

    MrBrotato New Member

    Joined:
    Sep 7, 2005
    Messages:
    5,558
    Likes Received:
    0
    :werd: but for someone who is just learning, it works well.
     
  16. Bigsnake

    Bigsnake OT Supporter

    Joined:
    Nov 30, 2003
    Messages:
    34,557
    Likes Received:
    0
    Location:
    Baton Rouge
    There is a better way to do it?
     
  17. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    yea, it's called a framework.
     
  18. Bigsnake

    Bigsnake OT Supporter

    Joined:
    Nov 30, 2003
    Messages:
    34,557
    Likes Received:
    0
    Location:
    Baton Rouge
    Is it worth learning?

    I'm not trying to learn this to the point to be able to do webdesign for other people, just for myself.
     
  19. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    learn to do it right, or don't do it at all (my motto)
     
  20. Bigsnake

    Bigsnake OT Supporter

    Joined:
    Nov 30, 2003
    Messages:
    34,557
    Likes Received:
    0
    Location:
    Baton Rouge
    Guess I'll put out the effort. Can you direct me to a good source on framework info?
     
  21. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
  22. antee

    antee Medium rare please...

    Joined:
    Jan 15, 2007
    Messages:
    23
    Likes Received:
    0
    Location:
    Southern California
    Where are you hosting your site? A free site or paid hosting. If it's paid www.wordpress.org since you need access to a database and php but it's flexible and will let you make your own custom pages and sections (most people use it as blogging software). It's a flexible CMS with an easy learning curve that'll let you update at will and thousands of templates for you to tweak and choose from not to mention a huge following making it easy to get support.
     
  23. Bigsnake

    Bigsnake OT Supporter

    Joined:
    Nov 30, 2003
    Messages:
    34,557
    Likes Received:
    0
    Location:
    Baton Rouge
    I don't have a host yet, but I'll be paying for service. Fuck that free shit.
     

Share This Page