Changeset 17968d469c9f73e1db9c669ea9958d8bfe2a0094
- Timestamp:
- 12/23/09 00:34:29 (2 years ago)
- Children:
- 980abcd884374656c6988c9b856917e35bf19d69
- Parents:
- 1fc1a76f248140aa640ebd8c2aec18af407860a4
- git-committer:
- Flupke <luper.rouch@…> (12/23/09 00:34:29)
- Location:
- derez
- Files:
-
- 6 added
- 7 edited
-
derez.egg-info/SOURCES.txt (modified) (1 diff)
-
derez/apps/derezapp/context_processors.py (modified) (2 diffs)
-
derez/apps/derezapp/settings.py (added)
-
derez/apps/derezapp/templates/base.html (modified) (1 diff)
-
derez/projects/dev/manage (modified) (1 diff)
-
derez/projects/settings_base.py (modified) (2 diffs)
-
files/flags.svg (added)
-
files/images/eu-flag-hover.png (added)
-
files/images/eu-flag.png (added)
-
files/images/fr-flag-hover.png (added)
-
files/images/fr-flag.png (added)
-
static/css/derez.css (modified) (1 diff)
-
static/images/sprites.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
derez/derez.egg-info/SOURCES.txt
r1fc1a76 r17968d4 7 7 derez/apps/__init__.py 8 8 derez/apps/derezapp/__init__.py 9 derez/apps/derezapp/admin.py 9 10 derez/apps/derezapp/context_processors.py 10 11 derez/apps/derezapp/models.py -
derez/derez/apps/derezapp/context_processors.py
r30e2c39 r17968d4 1 from django.conf import settings 2 from derezapp import settings 3 4 1 5 def location(request): 6 # Compute location from the beginning of the URL 2 7 location = None 3 8 if request.path == "/" or request.path.startswith("/news"): … … 9 14 elif request.path.startswith("/contact"): 10 15 location = "contact" 11 return {"LOCATION": location} 16 # Compute french and english locations of the current page 17 fr_location = settings.FR_HOST + request.path 18 en_location = settings.EN_HOST + request.path 19 return { 20 "LOCATION": location, 21 "FR_LOCATION": fr_location, 22 "EN_LOCATION": en_location, 23 } -
derez/derez/apps/derezapp/templates/base.html
r1fc1a76 r17968d4 17 17 {% block content %}{% endblock %} 18 18 </div> 19 <div id="langs"> 20 <a id="fr-flag" href="{{ FR_LOCATION }}" {% ifequal LANGUAGE_CODE "fr-fr" %}class="selected"{% endifequal %}></a> 21 <a id="eu-flag" href="{{ EN_LOCATION }}" {% ifequal LANGUAGE_CODE "en-us" %}class="selected"{% endifequal %}></a> 22 </div> 19 23 </body> 20 24 </html> -
derez/derez/projects/dev/manage
r58ed492 r17968d4 1 1 #!/bin/sh 2 2 3 ./manage.py $@ --settings=derez.projects.dev.settings_fr3 django-admin.py $@ --settings=derez.projects.dev.settings_fr -
derez/derez/projects/settings_base.py
r1fc1a76 r17968d4 50 50 "django.core.context_processors.request", 51 51 "django.core.context_processors.media", 52 "django.core.context_processors.i18n", 52 53 "derezapp.context_processors.location", 53 54 ) … … 112 113 } 113 114 } 114 -
derez/static/css/derez.css
r1fc1a76 r17968d4 312 312 background: transparent url(../images/sprites.png) 0px -485px no-repeat; 313 313 } 314 315 /** 316 * Flags 317 */ 318 319 #fr-flag { 320 position: fixed; 321 right: 60px; 322 bottom: 5px; 323 width: 50px; 324 height: 36px; 325 background: transparent url(../images/sprites.png) -143px -21px no-repeat; 326 } 327 328 #fr-flag:hover, #fr-flag.selected { 329 position: fixed; 330 right: 60px; 331 bottom: 5px; 332 width: 50px; 333 height: 36px; 334 background: transparent url(../images/sprites.png) -75px -21px no-repeat; 335 } 336 337 #eu-flag { 338 position: fixed; 339 right: 5px; 340 bottom: 5px; 341 width: 50px; 342 height: 36px; 343 background: transparent url(../images/sprites.png) -143px -79px no-repeat; 344 } 345 346 #eu-flag:hover, #eu-flag.selected { 347 position: fixed; 348 right: 5px; 349 bottom: 5px; 350 width: 50px; 351 height: 36px; 352 background: transparent url(../images/sprites.png) -75px -79px no-repeat; 353 } 354
Note: See TracChangeset
for help on using the changeset viewer.
