Skip to content

Commit

Permalink
ui work
Browse files Browse the repository at this point in the history
  • Loading branch information
gnugeek committed Dec 27, 2008
1 parent 09dd3bd commit f7273b0
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 17 deletions.
10 changes: 0 additions & 10 deletions main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@
erb :word
end

get '/word/:lemma/to_json' do
@word = Word.first(:lemma => params[:lemma])
"#{@word.to_json}"
end

get '/word/:lemma/to_xml' do
@word = Word.first(:lemma => params[:lemma])
"#{@word.to_xml}"
end

get '/stylesheets/style.css' do
header 'Content-Type' => 'text/css; charset=utf-8'
sass :style
Expand Down
49 changes: 49 additions & 0 deletions views/index.erb
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
<div id='wordnatra_index'>
<div id='wordnatra_welcome'>
Welcome to Wordnatra!
</div>

<div id='wordnatra_info'>
Wordnatra is a web interface to WordNet, a lexical database of the english language created and maintained by the Cognitive Science Laboratory of Princeton University. The goal of Wordnatra is to allow easy exploration of the semantic relationships between words in the english language. To play, just search for a word.
<p/>
Wordnatra is a work in progress, and periodic releases will be pushed as new features become available.
<p/>
The Wordnatra source code is available at <%= link_to 'Github', 'http://github.com/gnugeek/' %>

</div>
</div>


<div id='sidebar'>

<div id='sinatra_welcome'>
Sinatra
</div>

<div id='sinatra_info'>
"Sinatra is a Domain Specific Language(DSL) for quickly creating web-applications in ruby. It keeps a minimal feature set, leaving the developer to use the tools that best suit them and their application."
</div>

<div id='sinatra_links'>
<ul>
<li><%= link_to 'Sinatra Home Page', 'http://sinatra.rubyforge.org/' %></li>
<li><%= link_to 'Sinatra Book', 'http://sinatra.rubyforge.org/book.html' %></li>
<li><%= link_to 'Sinatra Github', 'http://github.com/bmizerany/sinatra/tree/master' %></li>
</ul>
</div>

<div id='wordnet_welcome'>
Wordnet
</div>

<div id='wordnet_info'>
"WordNet is a large lexical database of English, developed under the direction of George A. Miller. Nouns, verbs, adjectives and adverbs are grouped into sets of cognitive synonyms (synsets), each expressing a distinct concept. Synsets are interlinked by means of conceptual-semantic and lexical relations. The resulting network of meaningfully related words and concepts can be navigated with the browser. WordNet is also freely and publicly available for download. WordNet's structure makes it a useful tool for computational linguistics and natural language processing."
</div>

<div id='wordnet_links'>
<ul>
<li><%= link_to 'Wordnet Home Page', 'http://wordnet.princeton.edu/' %></li>
<li><%= link_to 'Wordnet Faq', 'http://wordnet.princeton.edu/faq' %></li>
<li><%= link_to 'Wordnet Documentation', 'http://wordnet.princeton.edu/doc' %></li>
</ul>
</div>
</div>
2 changes: 1 addition & 1 deletion views/layout.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>
<div id='banner'>
Wordnatra
<%= link_to 'Wordnatra', '/' %>
</div>
<div id='search'>
<form id="wordsearch" action='/' method='post'>
Expand Down
59 changes: 53 additions & 6 deletions views/style.sass
Original file line number Diff line number Diff line change
@@ -1,16 +1,63 @@
a:link
:color #eea
:text-decoration none

body
:background #000
:min-width 750px

a:link
:color #000
#sidebar
:float right
:width 40%

#wordnatra_index
:width 60%
:float left

#wordnatra_welcome
:font-family arial
:color #aaf
:padding 5px
:font-size 18px

.intro
#wordnatra_info
:font-family arial
:background #fff
:width 50%
:color #eee
:padding 5px

:font-size 14px

#sinatra_welcome
:font-family arial
:color #aaf
:padding 5px
:font-size 14

#sinatra_info
:font-family arial
:color #eee
:padding 5px
:font-size 12px

#sinatra_links
:font-family arial
:font-size 12px

#wordnet_welcome
:font-family arial
:color #aaf
:padding 5px
:font-size 14px

#wordnet_info
:font-family arial
:color #eee
:padding 5px
:font-size 12px

#wordnet_links
:font-family arial
:font-size 12px

#banner
:font-family arial
:font-size 24px
Expand Down

0 comments on commit f7273b0

Please sign in to comment.