8 Replies - 845 Views - Last Post: 23 July 2011 - 03:00 AM

#1 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Syntax Highlighting... am I out of line?

Posted 14 July 2011 - 06:57 PM

Hi Everybody,

I'm working on my personal website that will act as a Python resource. I'll say it directly: I fricken LOVE the Syntax highlighting at DIC. I set up syntax highlighter on my app... but it doesn't look as good as DIC's. I'm sure you guys have customized it a bit. I can copy the code for it using inspect, and I tried, but it still doesn't look as good.

Would it be uncool of me to ask how to make the syntax highlighting on my website's redesign look the way it looks on DIC? Do I also need to do some style sheet magic? What is it that I'm missing?

Is This A Good Question/Topic? 0
  • +

Replies To: Syntax Highlighting... am I out of line?

#2 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Syntax Highlighting... am I out of line?

Posted 15 July 2011 - 01:49 PM

I wonder if this is more of a skyhawk133 question?

This post has been edited by atraub: 15 July 2011 - 01:50 PM

Was This Post Helpful? 0
  • +
  • -

#3 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1877
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: Syntax Highlighting... am I out of line?

Posted 15 July 2011 - 01:58 PM

Stylesheet is probably what you're missing, I'm at a conference this week, but remind me next week if you haven't tracked it down.
Was This Post Helpful? 0
  • +
  • -

#4 RandomlyKnighted  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 118
  • View blog
  • Posts: 1,370
  • Joined: 14-January 10

Re: Syntax Highlighting... am I out of line?

Posted 15 July 2011 - 03:42 PM

Perhaps this thread would be of some assistance?
Was This Post Helpful? 0
  • +
  • -

#5 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Syntax Highlighting... am I out of line?

Posted 16 July 2011 - 06:51 AM

Thanks guys!! I think you're right about the style sheet; I'll be looking for it :)
Was This Post Helpful? 0
  • +
  • -

#6 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2876
  • View blog
  • Posts: 11,051
  • Joined: 15-July 08

Re: Syntax Highlighting... am I out of line?

Posted 16 July 2011 - 07:55 AM

If you can't find it, I have the same syntax highlighter on my site. Feel free to copy it from there as well. Just look for the part that looks like this and follow the links:
    <!-- Syntax Highlighter imports -->

    <script type="text/javascript" src="/scripts/highlighter/shCore.js"></script>
    <script type="text/javascript" src="/scripts/highlighter/shBrushJava.js"></script>
    <link type="text/css" rel="stylesheet" href="/scripts/highlighter/shCoreDefault.css"/>
	<script type="text/javascript">SyntaxHighlighter.all()</script>



http://thousandcodes...atid=1&tutid=12
Was This Post Helpful? 0
  • +
  • -

#7 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Syntax Highlighting... am I out of line?

Posted 16 July 2011 - 01:42 PM

Yeah, but I'm trying to figure out stuff like:

  • making lines alternate colors
  • making the buttons at the top corner look better and functional
  • etc...


I can get it to work the way it was intended to, I'm just trying to achieve DIC level awesomeness

This post has been edited by atraub: 16 July 2011 - 01:42 PM

Was This Post Helpful? 0
  • +
  • -

#8 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Syntax Highlighting... am I out of line?

Posted 16 July 2011 - 02:28 PM

Hey! I got the menu box on the top right to show up and 3/4 of the buttons too. It looks like copy to clipboard is accomplished with a swf thing... so I don't think I'll be doing that.
Was This Post Helpful? 0
  • +
  • -

#9 Hiram  Icon User is offline

  • D.I.C Head

Reputation: 69
  • View blog
  • Posts: 203
  • Joined: 02-June 09

Re: Syntax Highlighting... am I out of line?

Posted 23 July 2011 - 03:00 AM

Why not go to the source?

Alex Gorbatchev, the author, offers a few themes on his website, which would probably offer some insight into making your own.

Syntax Highlighter Themes
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1