Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
2 changes: 1 addition & 1 deletion README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ LightWrite is a free and open source web-based clone of [WriteRoom](http://www.h

LightWrite is built on lots of open source componants, including Python, Django, jQuery, and Smoke.js.

Are there bugs or features you want for LightWrite? Get in touch!
Are there bugs or features you want for LightWrite? Get in touch!
2 changes: 1 addition & 1 deletion lightwrite/local_settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MEDIA_ROOT = '/home/tuttle/Projects/LightWrite/static'
SITE_ROOT = '/home/tuttle/Projects/LightWrite/'
STATICFILES_DIRS = (
'/home/tuttle/Projects/LightWrite/static/',
'/home/tuttle/Projects/LightWrite/static/',
)

10 changes: 5 additions & 5 deletions lightwrite/templates/light.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
jQuery('#logoo').attr("src", "/static/gunio2.png")
}, function(){
jQuery('#logoo').attr("src", "/static/gunio.png");
});
});
})
var light = true;
</script>
Expand Down Expand Up @@ -50,19 +50,19 @@
$('#footer-items').css('background-color', '#ffffff');
$('#main form div textarea#writearea').css('color', '#000000');
$('#main form div textarea#writearea').css('text-shadow', '0 0 1px #666677');
light = true;
light = true;
}
else{
else{
$('#writearea').css('background-color', '#000000');
$('body').css('background-color', '#000000');
$('#footer').css('background-color', '#000000');
$('#footer-items').css('background-color', '#000000');
$('#main form div textarea#writearea').css('color', '#ffffff');
$('#main form div textarea#writearea').css('text-shadow', '0 0 1px #999988');
light = false;
light = false;
}


}
</script>
<script TYPE="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion lightwrite/texts/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.db import models
from django import forms
from django import forms
from django.forms import ModelForm

# Create your models here.
Expand Down
12 changes: 6 additions & 6 deletions lightwrite/texts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

import json
import random
import string
import string

# Redirect to a random page
# If deploying, make sure you have a REDIR in your local_settings
# TODO: Don't redirect to already taken pads
def root(request):
wash = ''.join(random.choice(string.ascii_lowercase + string.digits) for x in range(9))
return HttpResponseRedirect(settings.REDIR + '/' + wash)
return HttpResponseRedirect(settings.REDIR + '/' + wash)

# The main event
def write(request, wash):
Expand All @@ -26,12 +26,12 @@ def write(request, wash):
if (len(t)==0):
t = Text(wash=wash)
t.text = request.POST['writearea']
t.save()
t.save()
t = Text.objects.filter(wash=wash)
else:
t = t[0]
t = t[0]
t.text = request.POST['writearea']
t.save()
t.save()
t = Text.objects.filter(wash=wash)
if 'save' in request.POST:
return render_to_response('light.html', {'wash': wash,}, context_instance=RequestContext(request))
Expand All @@ -49,7 +49,7 @@ def json_get_text(request, wash):
t = Text(wash=wash)
# Display mac command as HTML entity
t.text = '\n\nWelcome to LightWrite!\nby Gun.io\n\nLightWrite is a web-based clone of WriteRoom - it\'s a place to write your thoughts without any distractions.\n\nTo use LightWrite, just start typing! You can move your mouse over the bottom of the page to save your text online or export to a file. \n\nTo enter fullscreen mode, just press F11, or &#8984;F if you\'re using OSX.\n\nEnjoy!\n\nLove,\nTeam Gun.io'
t.save()
t.save()
t = Text.objects.filter(wash=wash)
data = serializers.serialize("json", t)
return HttpResponse(data, mimetype='application/json')
Expand Down
Loading