├── static ├── .keep ├── website │ ├── arrow.png │ ├── chevron.png │ ├── bookmark.png │ ├── noobhub-fb.png │ ├── noobhub-twit.png │ ├── noobhub_nav.png │ ├── programming.png │ ├── noobhub_pattern.png │ ├── Noobhub-web_DESK.png │ ├── Noobhub-web_LEARN.png │ ├── Noobhub-web_LOGO.png │ ├── Noobhub-web_SHARE.png │ ├── Noobhub-web_BOOKMARK.png │ └── noobhub_pattern_opacity_1024.jpg ├── favicons │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── mstile-150x150.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ ├── browserconfig.xml │ ├── site.webmanifest │ └── safari-pinned-tab.svg ├── css │ ├── font-awesome │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ │ ├── fixed-width.less │ │ │ ├── screen-reader.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── core.less │ │ │ ├── stacked.less │ │ │ ├── font-awesome.less │ │ │ ├── bordered-pulled.less │ │ │ ├── rotated-flipped.less │ │ │ ├── path.less │ │ │ ├── animated.less │ │ │ └── mixins.less │ │ └── scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _core.scss │ │ │ ├── font-awesome.scss │ │ │ ├── _stacked.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _path.scss │ │ │ ├── _animated.scss │ │ │ └── _mixins.scss │ ├── starter-template.css │ ├── bootstrap-reboot.min.css.map │ └── bootstrap-reboot.min.css └── js │ └── noobhub.js ├── website ├── __init__.py ├── tests │ └── __init__.py ├── migrations │ ├── __init__.py │ ├── 0003_auto_20170128_1855.py │ ├── 0008_auto_20170216_1716.py │ ├── 0020_auto_20170426_1728.py │ ├── 0018_auto_20170422_0936.py │ ├── 0025_auto_20170508_0956.py │ ├── 0029_websiterecommendation_image_url.py │ ├── 0017_auto_20170422_0912.py │ ├── 0030_auto_20180122_1024.py │ ├── 0005_category_category_img.py │ ├── 0002_category_slug.py │ ├── 0033_auto_20180227_1241.py │ ├── 0032_subcategory_subcategory_img.py │ ├── 0031_subcategory_created_date.py │ ├── 0019_bookrecommendation_book_image_url.py │ ├── 0001_initial.py │ ├── 0021_bookrecommendation_book_publish_date.py │ ├── 0007_auto_20170216_1638.py │ ├── 0011_websiterecommendation_bookmark.py │ ├── 0026_auto_20170508_1001.py │ ├── 0034_auto_20180227_1304.py │ ├── 0014_bookrecommendation_recommended_by.py │ ├── 0009_websiterecommendation_website_author.py │ ├── 0004_subcategory.py │ ├── 0010_auto_20170313_1616.py │ ├── 0015_auto_20170419_0905.py │ ├── 0027_auto_20170510_0808.py │ ├── 0022_auto_20170428_0846.py │ ├── 0013_auto_20170419_0835.py │ ├── 0006_websiterecommendation.py │ ├── 0023_bookcomment.py │ ├── 0028_videocomment.py │ ├── 0012_websitecomment.py │ ├── 0016_auto_20170422_0855.py │ ├── 0035_auto_20180228_1121.py │ └── 0024_videorecommendation.py ├── templatetags │ ├── __init__.py │ └── noobhub_filters.py ├── apps.py ├── context_processor.py ├── templates │ ├── registration │ │ ├── logout.html │ │ ├── registration_complete.html │ │ ├── password_change_done.html │ │ ├── password_reset_email.html │ │ ├── password_reset_complete.html │ │ ├── password_change_form.html │ │ ├── password_reset_done.html │ │ ├── password_reset_form.html │ │ ├── password_reset_confirm.html │ │ ├── registration_form.html │ │ └── login.html │ └── website │ │ ├── delete_website_comment.html │ │ ├── delete_book_comment.html │ │ ├── delete_book.html │ │ ├── delete_video.html │ │ ├── delete_video_comment.html │ │ ├── delete_website.html │ │ ├── edit_book_comment.html │ │ ├── report_video_recommendation.html │ │ ├── edit_video_comment.html │ │ ├── edit_website_comment.html │ │ ├── report_website_recommendation.html │ │ ├── report_book_recommendation.html │ │ ├── create_website.html │ │ ├── video_comment_page.html │ │ ├── website_comment_page.html │ │ ├── book_comment_page.html │ │ ├── create_video.html │ │ ├── create_book.html │ │ ├── category.html │ │ ├── profile.html │ │ ├── subcategory_website_page.html │ │ ├── index.html │ │ ├── subcategory_book_page.html │ │ ├── subcategory_video_page.html │ │ ├── icons.html │ │ ├── website_comment.html │ │ ├── book_comment.html │ │ └── video_comment.html ├── admin.py └── urls.py ├── wikitowns ├── __init__.py ├── settings │ ├── __init__.py │ ├── staging.py │ ├── test.py │ ├── local.py │ ├── production.py │ └── base.py ├── wsgi.py └── urls.py ├── runtime.txt ├── Procfile ├── .gitattribute ├── .gitignore ├── staticfiles ├── admin │ ├── fonts │ │ ├── Roboto-Bold-webfont.woff │ │ ├── Roboto-Light-webfont.woff │ │ ├── Roboto-Regular-webfont.woff │ │ └── README.txt │ ├── js │ │ ├── cancel.js │ │ ├── prepopulate.min.js │ │ ├── jquery.init.js │ │ ├── prepopulate_init.js │ │ ├── popup_response.js │ │ ├── collapse.min.js │ │ ├── change_form.js │ │ ├── vendor │ │ │ ├── xregexp │ │ │ │ └── LICENSE-XREGEXP.txt │ │ │ └── jquery │ │ │ │ └── LICENSE-JQUERY.txt │ │ ├── collapse.js │ │ ├── prepopulate.js │ │ ├── actions.min.js │ │ ├── timeparse.js │ │ └── inlines.min.js │ ├── img │ │ ├── tooltag-arrowright.svg │ │ ├── README.txt │ │ ├── icon-addlink.svg │ │ ├── tooltag-add.svg │ │ ├── icon-changelink.svg │ │ ├── icon-deletelink.svg │ │ ├── icon-yes.svg │ │ ├── search.svg │ │ ├── icon-alert.svg │ │ ├── icon-no.svg │ │ ├── inline-delete.svg │ │ ├── icon-unknown.svg │ │ ├── icon-unknown-alt.svg │ │ ├── icon-clock.svg │ │ ├── gis │ │ │ ├── move_vertex_on.svg │ │ │ └── move_vertex_off.svg │ │ ├── icon-calendar.svg │ │ ├── calendar-icons.svg │ │ ├── LICENSE │ │ ├── sorting-icons.svg │ │ └── selector-icons.svg │ └── css │ │ ├── fonts.css │ │ ├── dashboard.css │ │ ├── login.css │ │ └── rtl.css └── css │ ├── starter-template.css │ ├── bootstrap-reboot.min.css.map │ └── bootstrap-reboot.min.css ├── requirements.txt ├── manage.py ├── LICENSE.md └── README.md /static/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wikitowns/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.6.0 2 | -------------------------------------------------------------------------------- /website/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /wikitowns/settings/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn wikitowns.wsgi 2 | -------------------------------------------------------------------------------- /.gitattribute: -------------------------------------------------------------------------------- 1 | static/* linguist-vendored 2 | -------------------------------------------------------------------------------- /wikitowns/settings/staging.py: -------------------------------------------------------------------------------- 1 | from .base import * 2 | -------------------------------------------------------------------------------- /wikitowns/settings/test.py: -------------------------------------------------------------------------------- 1 | from .base import * 2 | -------------------------------------------------------------------------------- /static/website/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/arrow.png -------------------------------------------------------------------------------- /static/website/chevron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/chevron.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *~ 3 | __pycache__ 4 | myvenv 5 | db.sqlite3 6 | .DS_Store 7 | media 8 | staticfiles 9 | -------------------------------------------------------------------------------- /static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/favicons/favicon.ico -------------------------------------------------------------------------------- /static/website/bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/bookmark.png -------------------------------------------------------------------------------- /static/website/noobhub-fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/noobhub-fb.png -------------------------------------------------------------------------------- /static/website/noobhub-twit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/noobhub-twit.png -------------------------------------------------------------------------------- /static/website/noobhub_nav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/noobhub_nav.png -------------------------------------------------------------------------------- /static/website/programming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/programming.png -------------------------------------------------------------------------------- /static/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /static/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /static/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /static/website/noobhub_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/noobhub_pattern.png -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /static/website/Noobhub-web_DESK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/Noobhub-web_DESK.png -------------------------------------------------------------------------------- /static/website/Noobhub-web_LEARN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/Noobhub-web_LEARN.png -------------------------------------------------------------------------------- /static/website/Noobhub-web_LOGO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/Noobhub-web_LOGO.png -------------------------------------------------------------------------------- /static/website/Noobhub-web_SHARE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/Noobhub-web_SHARE.png -------------------------------------------------------------------------------- /website/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class WebsiteConfig(AppConfig): 5 | name = 'website' 6 | -------------------------------------------------------------------------------- /static/website/Noobhub-web_BOOKMARK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/Noobhub-web_BOOKMARK.png -------------------------------------------------------------------------------- /static/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /wikitowns/settings/local.py: -------------------------------------------------------------------------------- 1 | from .base import * 2 | 3 | DEBUG = True 4 | 5 | # look into django debug_toolbar app to install for local 6 | -------------------------------------------------------------------------------- /static/css/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/css/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/website/noobhub_pattern_opacity_1024.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/website/noobhub_pattern_opacity_1024.jpg -------------------------------------------------------------------------------- /staticfiles/admin/fonts/Roboto-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/staticfiles/admin/fonts/Roboto-Bold-webfont.woff -------------------------------------------------------------------------------- /staticfiles/admin/fonts/Roboto-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/staticfiles/admin/fonts/Roboto-Light-webfont.woff -------------------------------------------------------------------------------- /staticfiles/admin/fonts/Roboto-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/staticfiles/admin/fonts/Roboto-Regular-webfont.woff -------------------------------------------------------------------------------- /static/css/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/css/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/css/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/css/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/css/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/css/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/css/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ollysmall/wikitowns/HEAD/static/css/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /website/context_processor.py: -------------------------------------------------------------------------------- 1 | from website.models import Category 2 | 3 | 4 | def category_context(request): 5 | return {'categories': Category.objects.order_by('name')} 6 | -------------------------------------------------------------------------------- /staticfiles/admin/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Roboto webfont source: https://www.google.com/fonts/specimen/Roboto 2 | Weights used in this project: Light (300), Regular (400), Bold (700) 3 | -------------------------------------------------------------------------------- /static/css/font-awesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /static/css/font-awesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /static/css/font-awesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /static/css/starter-template.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 3.5rem; 3 | background-color: #fafafa; 4 | } 5 | .starter-template { 6 | padding: 3rem 1.5rem; 7 | text-align: center; 8 | } 9 | -------------------------------------------------------------------------------- /staticfiles/css/starter-template.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 3.5rem; 3 | background-color: #fafafa; 4 | } 5 | .starter-template { 6 | padding: 3rem 1.5rem; 7 | text-align: center; 8 | } 9 | -------------------------------------------------------------------------------- /static/css/font-awesome/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /website/templates/registration/logout.html: -------------------------------------------------------------------------------- 1 | {% extends "website/base.html" %} 2 | 3 | 4 | {% block body_block %} 5 |
You are now logged out.
7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /website/templates/registration/registration_complete.html: -------------------------------------------------------------------------------- 1 | {% extends "website/base.html" %} 2 | 3 | 4 | {% block body_block %} 5 |You are now registered
7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /staticfiles/admin/js/cancel.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('.cancel-link').click(function(e) { 5 | e.preventDefault(); 6 | window.history.back(); 7 | }); 8 | }); 9 | })(django.jQuery); 10 | -------------------------------------------------------------------------------- /static/favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 |If you do not recieve an email, please make sure you have entered the address that you registered with and check your spam folder.
15 | 16 | 17 | 18 |Password reset failed. Please try again.
28 | 29 | {% endif %} 30 | 31 |Please enter the details of the website you would like to recommend.
16 |14 | {{ comment.created_date|timesince|upto:',' }} ago 15 | {% if user.is_authenticated %} 16 | {% if comment.author.pk == user.pk %} 17 | · Delete · 18 | Edit 19 | {% endif %} 20 | {% endif %} 21 |
22 |14 | {{ comment.created_date|timesince|upto:',' }} ago 15 | {% if user.is_authenticated %} 16 | {% if comment.author.pk == user.pk %} 17 | · Delete · 18 | Edit 19 | {% endif %} 20 | {% endif %} 21 |
22 |13 | 14 | {{ comment.created_date|timesince|upto:',' }} ago 15 | 16 | {% if user.is_authenticated %} 17 | {% if comment.author.pk == user.pk %} 18 | 19 | · Delete · 20 | 21 | 22 | Edit 23 | 24 | {% endif %} 25 | {% endif %} 26 |
27 |Please enter the URL of the YouTube video you would like to recommend.
16 |Please enter the 10 digit ISBN number of the book you would like to recommend.
16 | 17 | {% for error in form.non_field_errors %} 18 | {{error}} 19 | {% endfor %} 20 | 21 | {% if messages %} 22 | {% for message in messages %} 23 |{{ message }}
24 | {% endfor %} 25 | {% endif %} 26 | 27 |Please check your username and password and try again.
19 | {% endif %} 20 | 21 | 22 | 39 | 40 |
3 |
4 |
5 | # noobhub
6 |
7 | www.noobhub.io is a website to allow people to find, share, rank and bookmark coding resources.
8 |
9 | ## Why?
10 |
11 | Whilst learning to code I often found myself spending quite a lot of time trying to find the best resources to learn from.
12 | noobhub aims to help solve this by allowing people to share resources they found useful in order to make it easy for others to find.
13 | The ranking system ensures users see the best content first and the bookmarks let them quickly find their favourite content again.
14 |
15 | ## Features
16 |
17 | * Websites, books and videos can be recommended by registered users
18 | * Content can be ranked up or down to highlight the best resources.
19 | * Bookmarks allow users to easily find their favourite content.
20 | * To recommend a book you only need to enter the ISBN and the Amazon API is used to fetch the books details.
21 | * To recommend a video you only need to enter a youtube URL and the YouTube API fetches the videos details.
22 | * Users have profile pages which details the content they have bookmarked and recommended.
23 | * A simple search feature allows users to narrow down their search within categories.
24 | * Users can filter recommendations by all time best, best of year, best of month or by newest.
25 | * Users can leave comments on recommended resources.
26 | * Inappropriate recommendations can be reported by users.
27 |
28 |
29 | ## Built with
30 |
31 | * [Django](https://www.djangoproject.com/) - Back end framework
32 | * [Bootstrap](https://getbootstrap.com/) - Front end framework
33 | * [Heroku](https://www.heroku.com/home) - Platform as a Service
34 | * [Amazon S3](https://aws.amazon.com/s3) - Storage and serving of Media files
35 | * [PostgreSQL](https://www.postgresql.org/) - Database
36 | * [Bottlenose](https://github.com/lionheart/bottlenose) - Python wrapper over the Amazon Product Advertising API
37 | * [Django isbn field](https://github.com/secnot/django-isbn-field) - Provides django model field to store and validate ISBN numbers.
38 | * [Django registration redux](https://django-registration-redux.readthedocs.io/en/latest/) - User registration
39 | * [Django el pagination](https://github.com/shtalinberg/django-el-pagination) - Endless pagination
40 | * [Beautiful soup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) - Pull data out of XML files
41 | * [Boto 3](https://boto3.readthedocs.io/en/latest/) - Amazon S3 integration
42 |
43 | ## API Reference
44 |
45 | * [Amazon Product Advertising API](https://docs.aws.amazon.com/AWSECommerceService/latest/DG/Welcome.html) - To fetch book data
46 | * [Google API Python Client](https://developers.google.com/api-client-library/python/) - To fetch youtube data
47 |
48 | ## Author
49 |
50 | Oliver Small - You can reach me at oliver@rotherfields.co.uk
51 |
52 | ## Acknowledgments
53 |
54 | * [Robert Wheal](http://robertwheal.co.uk/) - Logo design and icon editing
55 | * [Flaticon](https://www.flaticon.com) - Website icons
56 | * [Font Awesome](https://fontawesome.com/) - Website icons
57 |
58 | ## License
59 |
60 | This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
61 |
--------------------------------------------------------------------------------
/staticfiles/admin/img/selector-icons.svg:
--------------------------------------------------------------------------------
1 |
35 |
--------------------------------------------------------------------------------
/staticfiles/admin/js/timeparse.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | 'use strict';
3 | var timeParsePatterns = [
4 | // 9
5 | {
6 | re: /^\d{1,2}$/i,
7 | handler: function(bits) {
8 | if (bits[0].length === 1) {
9 | return '0' + bits[0] + ':00';
10 | } else {
11 | return bits[0] + ':00';
12 | }
13 | }
14 | },
15 | // 13:00
16 | {
17 | re: /^\d{2}[:.]\d{2}$/i,
18 | handler: function(bits) {
19 | return bits[0].replace('.', ':');
20 | }
21 | },
22 | // 9:00
23 | {
24 | re: /^\d[:.]\d{2}$/i,
25 | handler: function(bits) {
26 | return '0' + bits[0].replace('.', ':');
27 | }
28 | },
29 | // 3 am / 3 a.m. / 3am
30 | {
31 | re: /^(\d+)\s*([ap])(?:.?m.?)?$/i,
32 | handler: function(bits) {
33 | var hour = parseInt(bits[1]);
34 | if (hour === 12) {
35 | hour = 0;
36 | }
37 | if (bits[2].toLowerCase() === 'p') {
38 | if (hour === 12) {
39 | hour = 0;
40 | }
41 | return (hour + 12) + ':00';
42 | } else {
43 | if (hour < 10) {
44 | return '0' + hour + ':00';
45 | } else {
46 | return hour + ':00';
47 | }
48 | }
49 | }
50 | },
51 | // 3.30 am / 3:15 a.m. / 3.00am
52 | {
53 | re: /^(\d+)[.:](\d{2})\s*([ap]).?m.?$/i,
54 | handler: function(bits) {
55 | var hour = parseInt(bits[1]);
56 | var mins = parseInt(bits[2]);
57 | if (mins < 10) {
58 | mins = '0' + mins;
59 | }
60 | if (hour === 12) {
61 | hour = 0;
62 | }
63 | if (bits[3].toLowerCase() === 'p') {
64 | if (hour === 12) {
65 | hour = 0;
66 | }
67 | return (hour + 12) + ':' + mins;
68 | } else {
69 | if (hour < 10) {
70 | return '0' + hour + ':' + mins;
71 | } else {
72 | return hour + ':' + mins;
73 | }
74 | }
75 | }
76 | },
77 | // noon
78 | {
79 | re: /^no/i,
80 | handler: function(bits) {
81 | return '12:00';
82 | }
83 | },
84 | // midnight
85 | {
86 | re: /^mid/i,
87 | handler: function(bits) {
88 | return '00:00';
89 | }
90 | }
91 | ];
92 |
93 | function parseTimeString(s) {
94 | for (var i = 0; i < timeParsePatterns.length; i++) {
95 | var re = timeParsePatterns[i].re;
96 | var handler = timeParsePatterns[i].handler;
97 | var bits = re.exec(s);
98 | if (bits) {
99 | return handler(bits);
100 | }
101 | }
102 | return s;
103 | }
104 |
105 | window.parseTimeString = parseTimeString;
106 | })();
107 |
--------------------------------------------------------------------------------
/website/templates/website/subcategory_website_page.html:
--------------------------------------------------------------------------------
1 | {% load el_pagination_tags %}
2 | {% load noobhub_filters %}
3 |
4 | {% paginate websites %}
5 |
6 | {% for website in websites %}
7 |
8 | {{ website.description }}
35 | {% else %} 36 |{{ website.description }}
43 | {% endif %} 44 | 45 | 46 | {{ website.website_author }} · {{ website.created_date|timesince|upto:',' }} ago 47 | 48 |Author: {{ book.book_author }}
40 |Published: {{ book.book_publish_date.year }}
41 |42 | 43 | {{ book.recommended_by }} · {{ book.created_date|timesince|upto:',' }} ago 44 | 45 |
46 |47 | 50 |
51 |43 | Published: {{ video.video_publish_date|date }} 44 |
45 |46 | 47 | {{ video.recommended_by }} · {{ video.created_date|timesince|upto:',' }} ago 48 | 49 |
50 | 53 |{{ website.description }}
39 | {% else %} 40 |{{ website.description }}
47 | {% endif %} 48 | 49 | 50 | {{ website.website_author }} · {{ website.created_date|timesince|upto:',' }} ago 51 | 52 |Author: {{ book.book_author }}
44 |Published: {{ book.book_publish_date.year }}
45 |46 | 47 | {{ book.recommended_by }} · {{ book.created_date|timesince|upto:',' }} ago 48 | 49 |
50 |51 | 54 |
55 |48 | Published: {{ video.video_publish_date|date }} 49 |
50 |51 | 52 | {{ video.recommended_by }} · {{ video.created_date|timesince|upto:',' }} ago 53 | 54 |
55 | 58 |