├── .github
└── pull_request_template.md
├── .gitignore
├── .vscode
└── launch.json
├── LICENSE.txt
├── README.md
├── manage.py
├── prideflagsearch
├── __init__.py
├── settings.py
├── urls.py
└── wsgi.py
├── requirements.txt
└── search
├── __init__.py
├── admin.py
├── apps.py
├── migrations
└── __init__.py
├── models.py
├── static
├── apple-touch-icon.png
├── favicon.ico
├── icon-192.png
├── icon-512.png
├── icon.svg
├── manifest.webmanifest
└── search
│ ├── css
│ ├── citation.css
│ ├── filters.css
│ ├── footer.css
│ ├── general.css
│ ├── header.css
│ ├── normalize.css
│ └── results.css
│ ├── data
│ ├── img
│ │ ├── agender_pride_flag.svg
│ │ ├── agender_pride_flag_9_stripe.svg
│ │ ├── agender_pride_flag_agender_info.svg
│ │ ├── agender_pride_flag_rumpus_parable.svg
│ │ ├── aromantic_pride_flag.svg
│ │ ├── asexual_pride_flag.svg
│ │ ├── bear_pride_flag.svg
│ │ ├── bigender_pride_flag.svg
│ │ ├── bigender_pride_flag_7_stripe.svg
│ │ ├── bisexual_pride_flag.svg
│ │ ├── bxy_pride_flag.svg
│ │ ├── demiboy_pride_flag.svg
│ │ ├── demigirl_pride_flag.svg
│ │ ├── demiromantic_pride_flag.svg
│ │ ├── demisexual_pride_flag.svg
│ │ ├── doe_pride_flag.svg
│ │ ├── gay_pride_1979.svg
│ │ ├── gay_pride_flag_philadelphia.svg
│ │ ├── gay_pride_flag_uk.svg
│ │ ├── gendercreative_pride_flag.svg
│ │ ├── genderfluid_pride_flag.svg
│ │ ├── genderflux_pride_flag.svg
│ │ ├── genderqueer_pride_flag.svg
│ │ ├── gxrl_pride_flag.svg
│ │ ├── ingender_pride_flag.svg
│ │ ├── intersex_pride_flag.svg
│ │ ├── lesbian_pride_flag_labrys.svg
│ │ ├── lesbian_pride_flag_rainbow.svg
│ │ ├── lipstick_lesbian_pride_flag_with_kiss.svg
│ │ ├── lipstick_lesbian_pride_flag_without_kiss.svg
│ │ ├── littlefluid_pride_flag.svg
│ │ ├── neutrois_pride_flag.svg
│ │ ├── new_queer_trans_pride_flag.svg
│ │ ├── new_trans_nonbinary_bbipoc_flag.svg
│ │ ├── nonbinary_pride_flag.svg
│ │ ├── nonbinary_pride_flag_transrants.svg
│ │ ├── nxnbinary_pride_flag.svg
│ │ ├── nxnbinary_pride_flag_green.svg
│ │ ├── nxnbinary_pride_flag_purple.svg
│ │ ├── pangender_pride_flag_white_center.svg
│ │ ├── pangender_pride_flag_yellow_center.svg
│ │ ├── pansexual_pride_flag.svg
│ │ ├── pocket_gender_pride_flag.svg
│ │ ├── pocket_gender_pride_flag_sleepygender.svg
│ │ ├── polysexual_pride_flag.svg
│ │ ├── progress_pride_flag.svg
│ │ ├── trans_intersex_pride_flag.svg
│ │ ├── transgender_pride_flag.svg
│ │ ├── transgender_pride_flag_israel.svg
│ │ └── transgender_pride_flag_jennifer.svg
│ └── prideflags.json
│ └── js
│ ├── flagSearchApp.js
│ ├── onload.js
│ └── searchForm.js
├── templates
└── search
│ ├── base.html
│ ├── index.html
│ └── privacy.html
├── tests.py
├── urls.py
└── views.py
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | # Changes Made
2 |
3 | -
4 |
5 | # Testing
6 |
7 | - [ ] Works cross browser
8 | - [ ] Chrome
9 | - [ ] Mobile
10 | - [ ] Desktop
11 | - [ ] Firefox
12 | - [ ] Mobile
13 | - [ ] Desktop
14 | - [ ] Edge
15 | - [ ] Desktop
16 | - [ ] WAVE reports no issues
17 | - [ ] ChromeVox can read and interact with the whole page
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # ============================
2 | # Environment settings ignores
3 | # ============================
4 | *__settings.py
5 |
6 | # ========================
7 | # Local Django dev ignores
8 | # ========================
9 | db.sqlite3
10 |
11 | # ==============
12 | # Python ignores
13 | # ==============
14 | *.pyc
15 | .venv/
16 |
17 | # ===============
18 | # VS Code ignores
19 | # ===============
20 | .vscode/*
21 | !.vscode/settings.json
22 | !.vscode/tasks.json
23 | !.vscode/launch.json
24 | !.vscode/extensions.json
25 | !.vscode/*.code-snippets
26 |
27 | # Local History for Visual Studio Code
28 | .history/
29 |
30 | # Built Visual Studio Code Extensions
31 | *.vsix
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Python: Django",
9 | "type": "python",
10 | "request": "launch",
11 | "program": "${workspaceFolder}\\manage.py",
12 | "args": [
13 | "runserver",
14 | "0.0.0.0:8000"
15 | ],
16 | "env": {
17 | "DEBUG": "True",
18 | "DJANGO_ALLOWED_HOSTS": "*"
19 | },
20 | "django": true,
21 | "justMyCode": true
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 | Copyright (C) 2007 Free Software Foundation, Inc.
4 | Everyone is permitted to copy and distribute verbatim copies
5 | of this license document, but changing it is not allowed.
6 | Preamble
7 | The GNU General Public License is a free, copyleft license for software and other kinds of works.
8 | The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is
9 | intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use
10 | the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
11 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of
12 | free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free
13 | programs, and that you know you can do these things.
14 | To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you
15 | distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
16 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure
17 | that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
18 | Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy,
19 | distribute and/or modify it.
20 | For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that
21 | modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
22 | Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally
23 | incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which
24 | is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially
25 | in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
26 | Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers,
27 | but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that
28 | patents cannot be used to render the program non-free.
29 | The precise terms and conditions for copying, distribution and modification follow.
30 | TERMS AND CONDITIONS
31 | 0. Definitions.
32 | "This License" refers to version 3 of the GNU General Public License.
33 | "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
34 | "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or
35 | organizations.
36 | To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work
37 | is called a "modified version" of the earlier work or a work "based on" the earlier work.
38 | A "covered work" means either the unmodified Program or a work based on the Program.
39 | To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law,
40 | except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in
41 | some countries other activities as well.
42 | To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer
43 | of a copy, is not conveying.
44 | An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate
45 | copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this
46 | License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
47 | 1. Source Code.
48 | The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
49 | A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular
50 | programming language, one that is widely used among developers working in that language.
51 | The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which
52 | is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is
53 | available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating
54 | system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
55 | The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify
56 | the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs
57 | which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with
58 | source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data
59 | communication or control flow between those subprograms and other parts of the work.
60 | The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
61 | The Corresponding Source for a work in source code form is that same work.
62 | 2. Basic Permissions.
63 | All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly
64 | affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content,
65 | constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
66 | You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to
67 | others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms
68 | of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf,
69 | under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
70 | Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
71 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
72 | No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted
73 | on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
74 | When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights
75 | under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's
76 | users, your or third parties' legal rights to forbid circumvention of technological measures.
77 | 4. Conveying Verbatim Copies.
78 | You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an
79 | appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all
80 | notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
81 | You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
82 | 5. Conveying Modified Source Versions.
83 | You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also
84 | meet all of these conditions:
85 | a) The work must carry prominent notices stating that you modified
86 | it, and giving a relevant date.
87 | b) The work must carry prominent notices stating that it is
88 | released under this License and any conditions added under section
89 | 7. This requirement modifies the requirement in section 4 to
90 | "keep intact all notices".
91 | c) You must license the entire work, as a whole, under this
92 | License to anyone who comes into possession of a copy. This
93 | License will therefore apply, along with any applicable section 7
94 | additional terms, to the whole of the work, and all its parts,
95 | regardless of how they are packaged. This License gives no
96 | permission to license the work in any other way, but it does not
97 | invalidate such permission if you have separately received it.
98 | d) If the work has interactive user interfaces, each must display
99 | Appropriate Legal Notices; however, if the Program has interactive
100 | interfaces that do not display Appropriate Legal Notices, your
101 | work need not make them do so.
102 | A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such
103 | as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit
104 | the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to
105 | the other parts of the aggregate.
106 | 6. Conveying Non-Source Forms.
107 | You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of
108 | this License, in one of these ways:
109 | a) Convey the object code in, or embodied in, a physical product
110 | (including a physical distribution medium), accompanied by the
111 | Corresponding Source fixed on a durable physical medium
112 | customarily used for software interchange.
113 | b) Convey the object code in, or embodied in, a physical product
114 | (including a physical distribution medium), accompanied by a
115 | written offer, valid for at least three years and valid for as
116 | long as you offer spare parts or customer support for that product
117 | model, to give anyone who possesses the object code either (1) a
118 | copy of the Corresponding Source for all the software in the
119 | product that is covered by this License, on a durable physical
120 | medium customarily used for software interchange, for a price no
121 | more than your reasonable cost of physically performing this
122 | conveying of source, or (2) access to copy the
123 | Corresponding Source from a network server at no charge.
124 | c) Convey individual copies of the object code with a copy of the
125 | written offer to provide the Corresponding Source. This
126 | alternative is allowed only occasionally and noncommercially, and
127 | only if you received the object code with such an offer, in accord
128 | with subsection 6b.
129 | d) Convey the object code by offering access from a designated
130 | place (gratis or for a charge), and offer equivalent access to the
131 | Corresponding Source in the same way through the same place at no
132 | further charge. You need not require recipients to copy the
133 | Corresponding Source along with the object code. If the place to
134 | copy the object code is a network server, the Corresponding Source
135 | may be on a different server (operated by you or a third party)
136 | that supports equivalent copying facilities, provided you maintain
137 | clear directions next to the object code saying where to find the
138 | Corresponding Source. Regardless of what server hosts the
139 | Corresponding Source, you remain obligated to ensure that it is
140 | available for as long as needed to satisfy these requirements.
141 | e) Convey the object code using peer-to-peer transmission, provided
142 | you inform other peers where the object code and Corresponding
143 | Source of the work are being offered to the general public at no
144 | charge under subsection 6d.
145 | A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
146 | A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2)
147 | anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a
148 | particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of
149 | the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has
150 | substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
151 | "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a
152 | covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified
153 | object code is in no case prevented or interfered with solely because modification has been made.
154 | If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the
155 | right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the
156 | Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party
157 | retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
158 | The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified
159 | or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and
160 | adversely affects the operation of the network or violates the rules and protocols for communication across the network.
161 | Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation
162 | available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
163 | 7. Additional Terms.
164 | "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable
165 | to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only
166 | to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional
167 | permissions.
168 | When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be
169 | written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you
170 | have or can give appropriate copyright permission.
171 | Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the
172 | terms of this License with terms:
173 | a) Disclaiming warranty or limiting liability differently from the
174 | terms of sections 15 and 16 of this License; or
175 | b) Requiring preservation of specified reasonable legal notices or
176 | author attributions in that material or in the Appropriate Legal
177 | Notices displayed by works containing it; or
178 | c) Prohibiting misrepresentation of the origin of that material, or
179 | requiring that modified versions of such material be marked in
180 | reasonable ways as different from the original version; or
181 | d) Limiting the use for publicity purposes of names of licensors or
182 | authors of the material; or
183 | e) Declining to grant rights under trademark law for use of some
184 | trade names, trademarks, or service marks; or
185 | f) Requiring indemnification of licensors and authors of that
186 | material by anyone who conveys the material (or modified versions of
187 | it) with contractual assumptions of liability to the recipient, for
188 | any liability that these contractual assumptions directly impose on
189 | those licensors and authors.
190 | All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains
191 | a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further
192 | restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the
193 | further restriction does not survive such relicensing or conveying.
194 | If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a
195 | notice indicating where to find the applicable terms.
196 | Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
197 | 8. Termination.
198 | You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically
199 | terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
200 | However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder
201 | explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after
202 | the cessation.
203 | Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the
204 | first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the
205 | notice.
206 | Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have
207 | been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
208 | 9. Acceptance Not Required for Having Copies.
209 | You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using
210 | peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any
211 | covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this
212 | License to do so.
213 | 10. Automatic Licensing of Downstream Recipients.
214 | Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License.
215 | You are not responsible for enforcing compliance by third parties with this License.
216 | An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations.
217 | If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the
218 | party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in
219 | interest, if the predecessor has it or can get it with reasonable efforts.
220 | You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or
221 | other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent
222 | claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
223 | 11. Patents.
224 | A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the
225 | contributor's "contributor version".
226 | A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed
227 | by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further
228 | modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of
229 | this License.
230 | Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import
231 | and otherwise run, modify and propagate the contents of its contributor version.
232 | In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to
233 | practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a
234 | patent against the party.
235 | If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the
236 | terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available,
237 | or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to
238 | extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a
239 | country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
240 | If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to
241 | some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is
242 | automatically extended to all recipients of the covered work and works based on it.
243 | A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of
244 | the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of
245 | distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any
246 | of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from
247 | those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that
248 | patent license was granted, prior to 28 March 2007.
249 | Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable
250 | patent law.
251 | 12. No Surrender of Others' Freedom.
252 | If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of
253 | this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence
254 | you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only
255 | way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
256 | 13. Use with the GNU Affero General Public License.
257 | Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General
258 | Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the
259 | special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
260 | 14. Revised Versions of this License.
261 | The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the
262 | present version, but may differ in detail to address new problems or concerns.
263 | Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies
264 | to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program
265 | does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
266 | If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version
267 | permanently authorizes you to choose that version for the Program.
268 | Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your
269 | choosing to follow a later version.
270 | 15. Disclaimer of Warranty.
271 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
272 | PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
273 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
274 | OR CORRECTION.
275 | 16. Limitation of Liability.
276 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE,
277 | BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
278 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
279 | OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
280 | 17. Interpretation of Sections 15 and 16.
281 | If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that
282 | most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program
283 | in return for a fee.
284 | END OF TERMS AND CONDITIONS
285 | How to Apply These Terms to Your New Programs
286 | If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can
287 | redistribute and change under these terms.
288 | To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and
289 | each file should have at least the "copyright" line and a pointer to where the full notice is found.
290 |
291 | Copyright (C)
292 | This program is free software: you can redistribute it and/or modify
293 | it under the terms of the GNU General Public License as published by
294 | the Free Software Foundation, either version 3 of the License, or
295 | (at your option) any later version.
296 | This program is distributed in the hope that it will be useful,
297 | but WITHOUT ANY WARRANTY; without even the implied warranty of
298 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
299 | GNU General Public License for more details.
300 | You should have received a copy of the GNU General Public License
301 | along with this program. If not, see . Also add information on how to contact you by electronic and paper mail.
302 | If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
303 | Copyright (C)
304 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
305 | This is free software, and you are welcome to redistribute it
306 | under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of
307 | course, your program's commands might be different; for a GUI interface, you would use an "about box".
308 | You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this,
309 | and how to apply and follow the GNU GPL, see .
310 | The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to
311 | permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please
312 | read
313 | .
314 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # About the Pride Flag Identification Guide
2 |
3 | This project is attempting to address the difficulty in figuring out just *what* that pride flag was. The queer community has seen a recent explosion of flags and this site should be used as a tool to help identify some of them in the wild. It's an open source project run by Emily Noble. Anyone is able to add a flag or features to the website. In short, here's what this project is trying to do:
4 |
5 | 1. Collect all the (queer) pride flags possbile
6 | 1. Make high quality, automatically scalable svg versions of those flags available on Wikimedia for use across the website
7 | 1. Provide the ability to search through flags by their appearance
8 |
9 | This project doesn't seek to decide which identities do and don't belong in queer spaces, so the flags accepted here are queer pride flags and flags that are often adjancent to queer identities; flags you might see at a pride parade. Do not use this site as an authority on which identities do and don't belong in your queer space(s). That discussion is far beyond what we can accomplish here.
10 |
11 | # Contributing
12 |
13 | ## General Principles
14 |
15 | The basic process for contributing to this project is:
16 |
17 | 1. Fork the repository
18 | 1. Make a branch named after the work you're doing
19 | 1. Commit and push that branch to your repository
20 | 1. Make a merge request to merge your branch into the main project's master branch
21 |
22 | While a full explanation of using git, GitHub, or any of the technologies used in this website is beyond the scope of this document, email Emily Noble at emily.c.noble@protonmail.com and xe will be happy to help you get started.
23 |
24 | ## Developer Setup (In VS Code)
25 |
26 | 1. Create a new environment for the project (the folder ".venv" is already ignored by git, if you'd like to use the same folder)
27 | 1. Install requirements.txt
28 | 1. Run the Python run configuration to start the development environment
29 |
30 | ## Contributing New Flags
31 |
32 | *Recommended skills: svg editing, json editing, ability to run a django website*
33 |
34 | A side objective of this site is to not just collect flags, but make high quality svg files of the flags available for use on other places. In rare cases, it may not be possible to render a flag properly in svg, in which case alternate file types will be accepted.
35 |
36 | To get a flag accepted in a merge request, you'll need to:
37 |
38 | 1. Have or make an svg version of the flag that automatically scales
39 | 1. Find or create a page in Wikimedia with that file
40 | 1. Add the flag to `prideflags.json` (with the flag details as described below!) and `search/static/data/img`
41 | 1. Mage a merge request into master
42 |
43 | ### Places to Find New Flags
44 |
45 | - Bigender: https://66.media.tumblr.com/3d86267d5d6ee6a42b9424c2aa514a6c/tumblr_inline_nwlg22va1T1snljqo_500.png?fbclid=IwAR2brjJLiNYDTfgYKWnFv_6nowHpiq2EtcTtkOion1ARfux8WQB1qPpVXKg
46 | - Bigender: https://66.media.tumblr.com/91941b330fbbfa81a94408d1035fc1a4/tumblr_inline_nwlgbgLNlI1snljqo_500.png?fbclid=IwAR1nQ7E_cWE4TS_KHpoLTJPBYVJtUteGt84_R6O2DAyr-yd7mXNT44p20N4
47 | - https://www.deviantart.com/pride-flags?fbclid=IwAR1etYmg5R84Reed3MT1aX4wlhjTBlJVQ2uPy-aGkDTu9O-9Nm5oE94YJ-M
48 | - https://beyond-mogai-pride-flags.tumblr.com/?fbclid=IwAR3vsLCXQ2bwKxAuyvUt8shy3ZzxLw6L97572EtTjCTzoOskaHC56Jt-cjI
49 | - https://pride-flags-for-us.tumblr.com/?fbclid=IwAR3ETJfoNNeMMnfa17GdhYt_Amb2zbnHfIlkZiLik8_4As0sVHDuqhxuXR8
50 |
51 | ## Contributing Flag Details
52 |
53 | *Recommended skills: json editing, ability to run a django website*
54 |
55 | Flag details sections need to be fleshed out with a description of the identity, name of the author, year of creation, and citations if available. For the more well-known identities Wikipedia can be a great source. However it's not always an accurate or informational source. Above all, make sure the description is how the community's members would describe themselves.
56 |
57 | The `prideflags.json` file uses the following keys in the `citation` key for each flag:
58 |
59 | `text` - This is a plain text description of the identity with the target audience being people who have never heard of the identity and don't know any queer theory. It should be written in a Wikipedia-like tone and style. All information should be cited using numbered citations (like `[1]`) corresponding to the list of sources in the `sourceList` key. If there is no description, this value should be set to false.
60 |
61 | `sourceList` - This is an ordered list of citations for the text in the `text` key. It is a list of strings that are citations in a modified APA format. Links to websites should be provided in markdown format within this citation to avoid printing a long url on the screen. The domain name, including `www` but excluding `http(s)://` should be inside the square brackets and the full url should be inside the parenthesis. If there are no sources because there is no description, this value should be set to false.
62 |
63 | `flagImageSource` - This is a citation in the modified APA format described above. It should be a link to the source svg image. If the svg form of the image seems to be an original work done for this project, that svg image should be uploaded to Wikimedia and Wikimedia should be cited. As a result of the policy of uploading images to Wikimedia, this should never need to be false.
64 |
65 | `firstAuthoring` - This is a citation in the modified APA format described above. It should be the first published source for the flag, as best you can determine. If this source cannot be determined, the value should be set to false.
66 |
67 | # Development Standards
68 |
69 | ## Accessibility
70 |
71 | Accessible web design is not taught as a routine part of formal or informal web development classes, but is absolutely vital. Building a completely and perfectly accessible site will always be a constant work in progress as technologies change, standards are revised, and screen readers interpret code in different ways. However, we want to follow the following principles as we develop:
72 |
73 | 1. A pull request *will not* be accepted if it breaks tab accessibility.
74 | 1. Custom styling of tab focus *must not* hide tab focus completely, but it can work to improve it for consistency across browsers, or improved visibility
75 | 1. Screen reader usability *must not* be worse than when the branch was started, though it *may* be left unfinished
76 |
77 | ### Accessibility Evaluation Tools
78 |
79 | #### WAVE
80 |
81 | [Web Accessiblity Evaluation Tool](http://wave.webaim.org/)
82 |
83 | Available as a plugin for Chrome and Firefox. Automatically evaluates compliance with WCAG.
84 |
85 | #### ChromeVox
86 |
87 | [ChromeVox](http://www.chromevox.com/)
88 |
89 | Chrome's built-in screenreader.
90 |
91 | ## Browser Compatibility
92 |
93 | This project aims to be compatible with the latest version of the following browsers:
94 |
95 | - Chrome
96 | - Desktop
97 | - Mobile
98 | - Firefox
99 | - Desktop
100 | - Mobile
101 | - Edge
102 | - Desktop
103 |
104 | ## Javascript Documentation
105 |
106 | Follow the JSDoc standard at http://usejsdoc.org/
107 |
108 | # Planned Features
109 |
110 | ## Accessibility Documentation
111 |
112 | Create a document in this project to list tools for web accessibility evaluation and standards to meet.
113 |
114 | ## Accessibility Review
115 |
116 | Use tools to evaluate and remove barriers on this site.
117 |
118 | ## Browser Compatibility Review
119 |
120 | Review the tool on each of the supported browsers to ensure it functions and renders properly.
121 |
122 | ## Flag Series
123 |
124 | Some flags have undergone a number of revisions. Add a feature that somehow links the flags in a series to each other.
125 |
126 | ## Fuzzy Matching
127 |
128 | Add the ability to automatically loosen search criteria. Someone might mis-remember a color on a flag, the number of stripes, or if it had shapes. This feature would slightly alter criteria to expand the list of possible search results.
129 |
130 | ## Rough Sorting
131 |
132 | Distinguish between very common flags and less common flags to help bump flags that the user was more likely to see towards the top.
133 |
--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import os
3 | import sys
4 |
5 | if __name__ == '__main__':
6 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'prideflagsearch.settings')
7 | try:
8 | from django.core.management import execute_from_command_line
9 | except ImportError as exc:
10 | raise ImportError(
11 | "Couldn't import Django. Are you sure it's installed and "
12 | "available on your PYTHONPATH environment variable? Did you "
13 | "forget to activate a virtual environment?"
14 | ) from exc
15 | execute_from_command_line(sys.argv)
16 |
--------------------------------------------------------------------------------
/prideflagsearch/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emily-noble/prideflagsearch/c94b75f03007fcd3599edf36ed4b501f090b3efe/prideflagsearch/__init__.py
--------------------------------------------------------------------------------
/prideflagsearch/settings.py:
--------------------------------------------------------------------------------
1 | """
2 | Django settings for prideflagsearch project.
3 |
4 | Generated by 'django-admin startproject' using Django 2.1.2.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/2.1/topics/settings/
8 |
9 | For the full list of settings and their values, see
10 | https://docs.djangoproject.com/en/2.1/ref/settings/
11 | """
12 | from django.core.management.utils import get_random_secret_key
13 | import os
14 |
15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 |
18 |
19 | # Quick-start development settings - unsuitable for production
20 | # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
21 |
22 | # SECURITY WARNING: keep the secret key used in production secret!
23 | SECRET_KEY = os.getenv("DJANGO_SECRET_KEY", get_random_secret_key())
24 |
25 | # SECURITY WARNING: don't run with debug turned on in production!
26 | DEBUG = os.getenv("DEBUG", "False") == "True"
27 |
28 | ALLOWED_HOSTS = os.getenv("DJANGO_ALLOWED_HOSTS", "127.0.0.1,localhost").split(",")
29 |
30 |
31 | # Application definition
32 |
33 | INSTALLED_APPS = [
34 | # 'django.contrib.admin', # Database admin done only through command line
35 | # 'django.contrib.auth',
36 | "django.contrib.contenttypes",
37 | # 'django.contrib.sessions',
38 | # 'django.contrib.messages',
39 | "django.contrib.staticfiles",
40 | "search",
41 | ]
42 |
43 | MIDDLEWARE = [
44 | # 'django.middleware.security.SecurityMiddleware',
45 | # 'django.contrib.sessions.middleware.SessionMiddleware',
46 | "django.middleware.common.CommonMiddleware",
47 | "django.middleware.csrf.CsrfViewMiddleware",
48 | # 'django.contrib.auth.middleware.AuthenticationMiddleware',
49 | # 'django.contrib.messages.middleware.MessageMiddleware',
50 | "django.middleware.clickjacking.XFrameOptionsMiddleware",
51 | ]
52 |
53 | ROOT_URLCONF = "prideflagsearch.urls"
54 |
55 | TEMPLATES = [
56 | {
57 | "BACKEND": "django.template.backends.django.DjangoTemplates",
58 | "DIRS": [],
59 | "APP_DIRS": True,
60 | "OPTIONS": {
61 | "context_processors": [
62 | "django.template.context_processors.debug",
63 | "django.template.context_processors.request",
64 | # 'django.contrib.auth.context_processors.auth',
65 | "django.contrib.messages.context_processors.messages",
66 | ],
67 | },
68 | },
69 | ]
70 |
71 | WSGI_APPLICATION = "prideflagsearch.wsgi.application"
72 |
73 |
74 | # Database
75 | # https://docs.djangoproject.com/en/2.1/ref/settings/#databases
76 |
77 | DATABASES = {
78 | "default": {
79 | "ENGINE": "django.db.backends.sqlite3",
80 | "NAME": os.path.join(BASE_DIR, "db.sqlite3"),
81 | }
82 | }
83 |
84 |
85 | # Password validation
86 | # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
87 |
88 | AUTH_PASSWORD_VALIDATORS = [
89 | {
90 | "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
91 | },
92 | {
93 | "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
94 | },
95 | {
96 | "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
97 | },
98 | {
99 | "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
100 | },
101 | ]
102 |
103 |
104 | # Internationalization
105 | # https://docs.djangoproject.com/en/2.1/topics/i18n/
106 |
107 | LANGUAGE_CODE = "en-us"
108 |
109 | TIME_ZONE = "UTC"
110 |
111 | USE_I18N = True
112 |
113 | USE_L10N = True
114 |
115 | USE_TZ = True
116 |
117 |
118 | # Static files (CSS, JavaScript, Images)
119 | # https://docs.djangoproject.com/en/2.1/howto/static-files/
120 |
121 | STATIC_URL = "/static/"
122 | STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
123 |
124 | DATA_FILE = "search/static/search/data/prideflags.json"
125 |
--------------------------------------------------------------------------------
/prideflagsearch/urls.py:
--------------------------------------------------------------------------------
1 | """prideflagsearch URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/2.1/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 | from django.contrib import admin
17 | from django.urls import include, path
18 |
19 | urlpatterns = [
20 | # path('admin/', admin.site.urls), # Database admin done only through command line
21 | path('', include('search.urls')),
22 | ]
23 |
--------------------------------------------------------------------------------
/prideflagsearch/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for prideflagsearch project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'prideflagsearch.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emily-noble/prideflagsearch/c94b75f03007fcd3599edf36ed4b501f090b3efe/requirements.txt
--------------------------------------------------------------------------------
/search/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emily-noble/prideflagsearch/c94b75f03007fcd3599edf36ed4b501f090b3efe/search/__init__.py
--------------------------------------------------------------------------------
/search/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/search/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class SearchConfig(AppConfig):
5 | name = 'search'
6 |
--------------------------------------------------------------------------------
/search/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emily-noble/prideflagsearch/c94b75f03007fcd3599edf36ed4b501f090b3efe/search/migrations/__init__.py
--------------------------------------------------------------------------------
/search/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | # Create your models here.
4 |
--------------------------------------------------------------------------------
/search/static/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emily-noble/prideflagsearch/c94b75f03007fcd3599edf36ed4b501f090b3efe/search/static/apple-touch-icon.png
--------------------------------------------------------------------------------
/search/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emily-noble/prideflagsearch/c94b75f03007fcd3599edf36ed4b501f090b3efe/search/static/favicon.ico
--------------------------------------------------------------------------------
/search/static/icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emily-noble/prideflagsearch/c94b75f03007fcd3599edf36ed4b501f090b3efe/search/static/icon-192.png
--------------------------------------------------------------------------------
/search/static/icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/emily-noble/prideflagsearch/c94b75f03007fcd3599edf36ed4b501f090b3efe/search/static/icon-512.png
--------------------------------------------------------------------------------
/search/static/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
49 |
--------------------------------------------------------------------------------
/search/static/manifest.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Pride Flag Identification Guide",
3 | "icons": [
4 | { "src": "/static/icon-192.png", "type": "image/png", "sizes": "192x192" },
5 | { "src": "/static/icon-512.png", "type": "image/png", "sizes": "512x512" }
6 | ]
7 | }
--------------------------------------------------------------------------------
/search/static/search/css/citation.css:
--------------------------------------------------------------------------------
1 | ol {
2 | display: block;
3 | list-style-type: decimal;
4 | margin-block-start: 1em;
5 | margin-block-end: 1em;
6 | margin-inline-start: 0px;
7 | margin-inline-end: 0px;
8 | padding-inline-start: 1.5em;
9 | }
10 |
11 | .flag-card-citation {
12 | box-sizing: border-box;
13 | position: relative;
14 | outline: black solid 1px;
15 | box-shadow: 2px 2px 5px 0px rgba(70,70,70,0.5);
16 | background: white;
17 | padding: 0.5em;
18 | }
19 |
20 |
21 | /* Small devices (landscape phones, 576px and up) */
22 | @media (min-width: 576px) {
23 |
24 | }
25 |
26 | /* Medium devices (tablets, 768px and up) */
27 | @media (min-width: 768px) {
28 |
29 | }
30 |
31 | /* Large devices (desktops, 992px and up) */
32 | @media (min-width: 992px) {
33 | }
34 |
35 | /* Extra large devices (large desktops, 1200px and up) */
36 | @media (min-width: 1200px) {
37 |
38 | }
--------------------------------------------------------------------------------
/search/static/search/css/filters.css:
--------------------------------------------------------------------------------
1 | /* Extra small devices (portrait phones, less than 576px) */
2 | /* No media query since this is the default */
3 |
4 | /* Control properties */
5 | .filter-card input, .filter-card select {
6 | width: 90%;
7 | margin: 0.5em 0;
8 | }
9 |
10 | .color-card input[type="checkbox"], .color-card svg {
11 | width: 1em;
12 | height: 1em;
13 | }
14 |
15 | /* Filter card flexbox */
16 | .filter-card-container {
17 | width: 100%;
18 | display: flex;
19 | flex-wrap: wrap;
20 | justify-content: space-between;
21 | }
22 |
23 | .filter-card {
24 | box-sizing: border-box;
25 | background-color: white;
26 | border-radius: 2px;
27 | }
28 |
29 | .filter-card:nth-child(1) {
30 | width: 100%;
31 | }
32 |
33 | .filter-card:nth-child(2) {
34 | width: 49%;
35 | }
36 |
37 | .filter-card:nth-child(3) {
38 | width: 49%;
39 | }
40 |
41 |
42 |
43 | /* Color card flexbox */
44 | .color-card-container {
45 | display: flex;
46 | flex-wrap: wrap;
47 | flex-direction: column;
48 | background-color: white;
49 | border-radius: 2px;
50 | max-height: calc(2em * 6);
51 | margin-bottom: 0.5em;
52 | }
53 |
54 | .color-card {
55 | box-sizing: border-box;
56 | width: 49%;
57 | max-height: 2em;
58 | padding: 0.5em 0;
59 | }
60 |
61 |
62 |
63 | /* Small devices (landscape phones, 576px and up) */
64 | @media (min-width: 576px) {
65 |
66 | }
67 |
68 | /* Medium devices (tablets, 768px and up) */
69 | @media (min-width: 768px) {
70 |
71 | }
72 |
73 | /* Large devices (desktops, 992px and up) */
74 | @media (min-width: 992px) {
75 | .filter-card input, .filter-card select {
76 | width: 65%;
77 | margin: 0.5em 0;
78 | }
79 |
80 | .filter-card:nth-child(1n) {
81 | width: 32%;
82 | }
83 | }
84 |
85 | /* Extra large devices (large desktops, 1200px and up) */
86 | @media (min-width: 1200px) {
87 | .filter-card input, .filter-card select {
88 | width: 40%;
89 | margin: 0.5em 0;
90 | }
91 | }
--------------------------------------------------------------------------------
/search/static/search/css/footer.css:
--------------------------------------------------------------------------------
1 | .footer {
2 | box-sizing: border-box;
3 | margin-top: 3em;
4 | padding: 1em 2em;
5 | width: 100%;
6 | background-color: #f5f5f5;
7 | }
8 |
9 | .text-muted {
10 | color: #42484c !important;
11 | }
12 |
13 |
14 | /* Small devices (landscape phones, 576px and up) */
15 | @media (min-width: 576px) {
16 |
17 | }
18 |
19 | /* Medium devices (tablets, 768px and up) */
20 | @media (min-width: 768px) {
21 |
22 | }
23 |
24 | /* Large devices (desktops, 992px and up) */
25 | @media (min-width: 992px) {
26 | .footer {
27 | padding: 1em 10em;
28 | }
29 | }
30 |
31 | /* Extra large devices (large desktops, 1200px and up) */
32 | @media (min-width: 1200px) {
33 |
34 | }
--------------------------------------------------------------------------------
/search/static/search/css/general.css:
--------------------------------------------------------------------------------
1 | html {
2 | height: 100%;
3 | }
4 |
5 | body {
6 | margin: 0;
7 | font-family: Arial,sans-serif;
8 | color: #444444;
9 | display: flex;
10 | flex-direction: column;
11 | min-height: 100%;
12 | }
13 |
14 | main {
15 | flex-grow: 1;
16 | }
17 |
18 | button {
19 | color: #444444;
20 | }
21 |
22 | hr {
23 | border-top: 1px solid #444444;
24 | margin: 1em 0;
25 | }
26 |
27 | h1 {
28 |
29 | }
30 |
31 | h2 {
32 | font-size: 2em;
33 | margin-bottom: 0.5em;
34 | }
35 |
36 | h3 {
37 | font-size: 1em;
38 | }
39 |
40 | h4 {
41 | font-size: 1em;
42 | margin-top: 0.5em;
43 | font-weight: bolder;
44 | }
45 |
46 | input, select {
47 | border: 1px solid #444444;
48 | }
49 |
50 | input:focus, select:focus, button:focus, a:focus {
51 | border: 2px solid #000000;
52 | }
53 |
54 | input[type="checkbox"]:focus {
55 | outline: 2px solid #000000;
56 | }
57 |
58 | p {
59 | font-size: 1em;
60 | margin: 0.1em 0;
61 | }
62 |
63 | a {
64 | color: #004793;
65 | }
66 |
67 | main {
68 | margin: 0 2em;
69 | }
70 |
71 | .hidden {
72 | display: none !important;
73 | }
74 |
75 |
76 | /* Small devices (landscape phones, 576px and up) */
77 | @media (min-width: 576px) {
78 |
79 | }
80 |
81 | /* Medium devices (tablets, 768px and up) */
82 | @media (min-width: 768px) {
83 |
84 | }
85 |
86 | /* Large devices (desktops, 992px and up) */
87 | @media (min-width: 992px) {
88 | main {
89 | margin: 0 10em;
90 | }
91 | }
92 |
93 | /* Extra large devices (large desktops, 1200px and up) */
94 | @media (min-width: 1200px) {
95 |
96 | }
--------------------------------------------------------------------------------
/search/static/search/css/header.css:
--------------------------------------------------------------------------------
1 | .navbar {
2 | background-color: #343a40;
3 | margin: 0 0 1rem 0;
4 | }
5 |
6 | .navbar-brand h1 {
7 | padding: .5rem 0 .5rem .5rem;
8 | color: #FFFFFF;
9 | font-size: 2.5rem;
10 | }
11 |
12 | .navbar-brand img {
13 | height: 1.8rem;
14 | vertical-align: baseline;
15 | }
16 |
17 | .navbar-link-wrapper {
18 | padding: 0.5rem 0.25rem 0.5rem 0.25rem;
19 | }
20 |
21 | a.navbar-link {
22 | color: #FFFFFF;
23 | font-size: 1rem;
24 | padding-left: 0.25rem;
25 | padding-right: 0.25rem;
26 | }
27 |
28 | a.navbar-link:focus {
29 | border-color: #FFFFFF;
30 | }
--------------------------------------------------------------------------------
/search/static/search/css/normalize.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | border: 0;
5 | outline: 0;
6 | font-size: 100%;
7 | vertical-align: baseline;
8 | background: transparent;
9 | }
--------------------------------------------------------------------------------
/search/static/search/css/results.css:
--------------------------------------------------------------------------------
1 | /* Extra small devices (portrait phones, less than 576px) */
2 | /* No media query since this is the default */
3 |
4 | .flag-card-container {
5 | display: flex;
6 | flex-wrap: wrap;
7 | justify-content: space-between;
8 | align-content: flex-start;
9 | align-items: stretch;
10 | }
11 |
12 | .flag-card {
13 | box-sizing: border-box;
14 | background-color: white;
15 | border-radius: 2px;
16 | width: 100%;
17 | margin-top: 2em;
18 |
19 | /* Properties for nested child flexbox */
20 | display: flex;
21 | flex-direction: column;
22 | }
23 |
24 | .flag-card-title {
25 | min-height: calc(1em * 2 + 0.5em);
26 | margin: 0 0 1em 0;
27 | }
28 |
29 | .flag-img {
30 | max-width: 100%;
31 | height: auto;
32 | margin-bottom: .5em;
33 | box-shadow: 2px 2px 5px 0px rgba(70,70,70,0.5);
34 | }
35 |
36 | .javascript-required-message {
37 | position: relative;
38 | padding: 0.5rem 0.5rem;
39 | margin-bottom: 1rem;
40 | border: 1px solid transparent;
41 | border-radius: .25rem;
42 |
43 |
44 | color: #664d03;
45 | background-color: #fff3cd;
46 | border-color: #ffecb5;
47 | }
48 |
49 | /* Small devices (landscape phones, 576px and up) */
50 | @media (min-width: 576px) {
51 | .flag-card {
52 | width: 49%;
53 | }
54 | }
55 |
56 | /* Medium devices (tablets, 768px and up) */
57 | @media (min-width: 768px) {
58 |
59 | }
60 |
61 | /* Large devices (desktops, 992px and up) */
62 | @media (min-width: 992px) {
63 | .flag-card {
64 | width: 32%;
65 | }
66 | }
67 |
68 | /* Extra large devices (large desktops, 1200px and up) */
69 | @media (min-width: 1200px) {
70 |
71 | }
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/search/static/search/data/img/agender_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/agender_pride_flag_9_stripe.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/agender_pride_flag_agender_info.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/search/static/search/data/img/agender_pride_flag_rumpus_parable.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/search/static/search/data/img/aromantic_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/search/static/search/data/img/asexual_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/search/static/search/data/img/bear_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/search/static/search/data/img/bigender_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
18 |
--------------------------------------------------------------------------------
/search/static/search/data/img/bigender_pride_flag_7_stripe.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/bisexual_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/search/static/search/data/img/bxy_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/demiboy_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/demigirl_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/demiromantic_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/search/static/search/data/img/demisexual_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/search/static/search/data/img/doe_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
86 |
--------------------------------------------------------------------------------
/search/static/search/data/img/gay_pride_1979.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/search/static/search/data/img/gay_pride_flag_philadelphia.svg:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/search/static/search/data/img/gay_pride_flag_uk.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/search/static/search/data/img/gendercreative_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/search/static/search/data/img/genderfluid_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/search/static/search/data/img/genderflux_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/genderqueer_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/search/static/search/data/img/gxrl_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/ingender_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/intersex_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/search/static/search/data/img/lesbian_pride_flag_labrys.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
--------------------------------------------------------------------------------
/search/static/search/data/img/lesbian_pride_flag_rainbow.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/lipstick_lesbian_pride_flag_with_kiss.svg:
--------------------------------------------------------------------------------
1 |
2 |
20 |
--------------------------------------------------------------------------------
/search/static/search/data/img/lipstick_lesbian_pride_flag_without_kiss.svg:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/search/static/search/data/img/littlefluid_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/neutrois_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/new_queer_trans_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/search/static/search/data/img/new_trans_nonbinary_bbipoc_flag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/search/static/search/data/img/nonbinary_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/search/static/search/data/img/nonbinary_pride_flag_transrants.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/nxnbinary_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/nxnbinary_pride_flag_green.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/nxnbinary_pride_flag_purple.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/pangender_pride_flag_white_center.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/pangender_pride_flag_yellow_center.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/pansexual_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/search/static/search/data/img/pocket_gender_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/pocket_gender_pride_flag_sleepygender.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/data/img/polysexual_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/search/static/search/data/img/progress_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
22 |
--------------------------------------------------------------------------------
/search/static/search/data/img/trans_intersex_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/search/static/search/data/img/transgender_pride_flag.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/search/static/search/data/img/transgender_pride_flag_israel.svg:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/search/static/search/data/img/transgender_pride_flag_jennifer.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/search/static/search/js/flagSearchApp.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | (() => {
4 | /**
5 | * A flag searching application
6 | */
7 | class FlagSearchApp {
8 | /**
9 | * Create a FlagSearchApp.
10 | * @param {array} flagList - List of flag objects
11 | */
12 | constructor(flagList, countElement, wordElement) {
13 | this.flagList = flagList;
14 | this.countElement = countElement;
15 | this.wordElement = wordElement;
16 | }
17 |
18 | /**
19 | * Run a search using the provided filters and display the results
20 | * @param {Object} filters - Object with the following optional values:
21 | * shapeFilter {boolean|null}
22 | * stripeFilter {int|null}
23 | * colorFilter {array} - List of color names
24 | */
25 | search(filters) {
26 | const defaultFilters = {
27 | shapeFilter: null,
28 | stripeFilter: null,
29 | colorFilter: [],
30 | }
31 |
32 | let visibleCards = 0;
33 |
34 | filters = filters || defaultFilters;
35 |
36 | this.flagList.forEach((flagElement) => {
37 | flagElement.classList.remove("hidden");
38 |
39 | // Search by shapes
40 | if (null !== filters.shapeFilter) {
41 | const hasShapes = flagElement.dataset.shapes === "True";
42 | if (filters.shapeFilter !== hasShapes) {
43 | flagElement.classList.add("hidden");
44 |
45 | return;
46 | }
47 | }
48 |
49 | // Search by stripes
50 | if (filters.stripeFilter && !isNaN(filters.stripeFilter)) {
51 | const stripeCount = parseInt(flagElement.dataset.stripes, 10);
52 | if (filters.stripeFilter !== stripeCount && !isNaN(stripeCount)) {
53 | flagElement.classList.add("hidden");
54 |
55 | return;
56 | }
57 | }
58 |
59 | // Search by colors
60 | if (filters.colorFilter.length) {
61 | const colorList = JSON.parse(flagElement.dataset.colors);
62 | const differenceList = filters.colorFilter.filter((i) => {
63 | return colorList.indexOf(i) < 0;
64 | });
65 |
66 | if (differenceList.length) {
67 | flagElement.classList.add("hidden");
68 |
69 | return;
70 | }
71 | }
72 |
73 | visibleCards += 1;
74 | });
75 |
76 | this.countElement.innerText = visibleCards;
77 | this.wordElement.innerText = 1 === visibleCards ? "flag" : "flags";
78 | }
79 | }
80 |
81 | window.PFS = window.PFS || {};
82 | window.PFS.FlagSearchApp = FlagSearchApp;
83 | })();
--------------------------------------------------------------------------------
/search/static/search/js/onload.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | document.addEventListener("DOMContentLoaded", function () {
4 | // Enable javascript-only features
5 | const javaScriptRequiredList = document.querySelectorAll(".jx-javascript-required");
6 | javaScriptRequiredList.forEach((element) => {
7 | if (element.classList.contains("hidden")) {
8 | element.classList.remove("hidden");
9 | } else {
10 | element.classList.add("hidden");
11 | }
12 | });
13 |
14 | // Create the search app (handles updating display)
15 | const searchApp = new PFS.FlagSearchApp(
16 | document.querySelectorAll(".jx-flag-card"),
17 | document.querySelector("#resultsCount"),
18 | document.querySelector("#resultsWord")
19 | );
20 |
21 | // Create search form (listens to and emits filter changes)
22 | const searchForm = new PFS.SearchForm();
23 | searchForm.addFormChangeCallback(
24 | (filter) => {
25 | // Update search results
26 | searchApp.search(filter);
27 | }
28 | );
29 | })
--------------------------------------------------------------------------------
/search/static/search/js/searchForm.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | (() => {
4 | /**
5 | * Collect filters based on dom elements and call functions to process the filters.
6 | */
7 | class SearchForm {
8 | /**
9 | * Create a SearchForm.
10 | */
11 | constructor() {
12 | this.formChangeCallbackList = [];
13 |
14 | const selectorString = "#colorFilter,#stripesFilter,#shapesFilter";
15 | const filteringElementList = document.querySelectorAll(selectorString);
16 |
17 | for (let i = 0; i < filteringElementList.length; i++) {
18 | const filteringElement = filteringElementList[i];
19 | filteringElement.addEventListener("change", () => {
20 | this.callFormChangeCallbacks();
21 | });
22 |
23 | if ("INPUT" === filteringElement.nodeName) {
24 | filteringElement.addEventListener("keyup", () => {
25 | this.callFormChangeCallbacks();
26 | });
27 | }
28 | }
29 | }
30 |
31 | /**
32 | * Add a function to be called when then search form changes.
33 | * Callback will be called with the filter as the first argument.
34 | * @param {Function} callback
35 | */
36 | addFormChangeCallback(callback) {
37 | this.formChangeCallbackList.push(callback);
38 | }
39 |
40 | /**
41 | * Call all callbacks with the filter as the first argument
42 | * @private
43 | */
44 | callFormChangeCallbacks() {
45 | const filter = {
46 | colorFilter: this.collectColors(),
47 | shapeFilter: this.collectShapes(),
48 | stripeFilter: this.collectStripes(),
49 | };
50 |
51 | this.formChangeCallbackList.forEach((callback) => {
52 | callback(filter);
53 | });
54 | }
55 |
56 | /**
57 | * Get a list of required colors
58 | * @private
59 | * @returns {array}
60 | */
61 | collectColors() {
62 | const colorPickElement = document.querySelector("#colorFilter");
63 | const checkedElements = colorPickElement.querySelectorAll("input:checked");
64 |
65 | const selectedColors = [];
66 | for (let i = 0; i < checkedElements.length; i++) {
67 | selectedColors.push(checkedElements[i].value);
68 | }
69 |
70 | return selectedColors;
71 | }
72 |
73 | /**
74 | * Get the number of stripes
75 | * @private
76 | * @returns {int}
77 | */
78 | collectStripes() {
79 | const inputElement = document.querySelector("#stripesFilter");
80 |
81 | return parseInt(inputElement.value);
82 | }
83 |
84 | /**
85 | * Get if shapes are required
86 | * @private
87 | * @returns {boolean|null}
88 | */
89 | collectShapes() {
90 | const selectElement = document.querySelector("#shapesFilter");
91 | const rawValue = selectElement.value;
92 |
93 | if ("true" === rawValue) {
94 | return true;
95 | } else if ("false" === rawValue) {
96 | return false;
97 | }
98 |
99 | return null;
100 | }
101 | }
102 |
103 | window.PFS = window.PFS || {};
104 | window.PFS.SearchForm = SearchForm;
105 | })();
--------------------------------------------------------------------------------
/search/templates/search/base.html:
--------------------------------------------------------------------------------
1 | {% load static %}
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | Pride Flag Identification Guide
24 |
25 |
26 |
27 |
39 |
40 |
41 |
42 | {% block content %}
43 | {% endblock %}
44 |
45 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/search/templates/search/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'search/base.html' %}
2 |
3 | {% block content %}
4 |
5 | It looks like JavaScript might not be running on your computer or you may be using an older browser. JavaScript is required to use the interactive search features.
6 |
7 |
8 | Filter Flags
9 |
10 |
11 | Select filters below to search for flags. Search results will update automatically.
12 |
13 |
14 |
15 |
16 | Colors
17 |
18 |
19 | {% for color in colorList %}
20 |
21 |
28 |
29 | {% endfor %}
30 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
47 |
48 |
49 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | Search Results
61 |
62 |
63 | All Pride Flags
64 |
65 |
66 | {{ flagCount }}{{ flagWord }} found.
67 |
68 |
69 | {% for flag in flagData %}
70 |
76 |
{{ flag.name }}
77 |
78 |
79 |
80 | Details
81 |
82 |
About the {{ flag.name }}
83 |
{{ flag.citation.text }}
84 |
Description Sources
85 |
86 | {% for source in flag.citation.sourceList %}
87 | {% if "simple" == source.type %}
88 |
This isn't a legal document, but as briefly as possible: prideflags.org does not collect any information about you and does not care to. It does not use trackers or analytics services and does not collect IP addresses, browser information, or device models.
6 |
However, the hosting provider for prideflags.org (DigitalOcean) and their third parties might. You'll need to reach out to them for information about what they and their third parties collect from site visitors.